[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exporting comments to comments?
From: |
Fraga, Eric |
Subject: |
Re: Exporting comments to comments? |
Date: |
Wed, 19 Feb 2020 16:13:26 +0000 |
On Wednesday, 19 Feb 2020 at 11:04, Allen S. Rout wrote:
> I thought about making a block of a 'comment' type, but of course all
I use drawers for this functionality. By default, I do not export
drawers (#+options: d:nil) but I can turn this on and then process
specific drawers using filters, as in:
#+begin_src elisp
(setq org-latex-format-drawer-function
(lambda (name contents)
(cond ((string= name "solution")
(format
"\\begin{mdframed}\\paragraph{Solution.} %s\\end{mdframed}"
contents))
(t (format "\\textbf{%s}: %s" name contents)))))
#+end_src
which I use for :solution: drawers when preparing courseworks/exams. If
you want to ignore all other drawers except specific ones, have no
action in the =t= clause of the =cond=.
Using this right now preparing a coursework for my students... ;-)
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-350-g39f1c1