Org modundan kılavuz :
Kalın ,/italik /, altı çizili , ‘= verbatim =’ sözcükleri yapabilirsiniz.
Code ~ code ~ ’ve eğer yapmanız gerekiyorsa‘ + strike-through + ’. Koddaki metin ve
Org moduna özgü sözdizimi için verbatim dizesi işlenmiyor,
ihraç edilen verbatim.
Indeed ~> (cons 1 nil) \to (1)~
is exported as LaTeX \texttt{> (cons 1 nil) \textbackslash{}to (1)}
.
Ancak bu, LaTeX için bir geçici çözüm önerir: geri almak için bir dışa aktarma filtre kullanın \
'ın \ textbackslash {}
' a çevrilmesi.
(defun my-latex-filter-allow-latex-in-code (text backend info)
"Undo backslash escaping"
(when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "textbackslash{}" "" text)))
(add-to-list 'org-export-filter-code-functions
#'my-latex-filter-allow-latex-in-code)
İhracat filtresi html işlemek için de genişletilebilir. İşte ilk taslak işleme sadece \ to
:
(defun my-filter-allow-latex-in-code (text backend info)
"Allow LaTeX symbols in code"
(cond
((org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "textbackslash{}" "" text))
((org-export-derived-backend-p backend 'html)
;; either extend this or find the html export function doing these conversions
(replace-regexp-in-string "\\\\to" "→" text))))
(add-to-list 'org-export-filter-code-functions
#'my-filter-allow-latex-in-code)