emacs - Export org special text block to Latex -
my problem export org-block
#+begin_note text here #+end_note
to latex code
\begin{bclogo}[logo=\bcattention, noborder=true, barre=none]{some text here} \end{bclogo}
is there way customize how export in latex block of text?
you can custom block in org-mode:
+begin_bclogo
some text here
+end_bclogo
then, use filter modify export this:
(defun ox-mrkup-filter-special-block (text back-end info) (let ((text (replace-regexp-in-string "\\\\begin{bclogo}" "\\\\begin{bclogo}[logo=\\\\bcattention, noborder=true, barre=none]{" text))) (replace-regexp-in-string "\\\\end{bclogo}" "}\\\\end{bclogo}" text))) (let ((org-export-filter-special-block-functions '(ox-mrkup-filter-special-block))) (find-file (org-export-to-file 'latex "custom.tex")))
that exports to:
\begin{bclogo}[logo=\bcattention, noborder=true, barre=none]{ text here }\end{bclogo}
this seems close want. not sure how body in environment. think need use attribute set text in {} , use text body. not easy implement in filter, , better implemented in custom export.
Comments
Post a Comment