Re: Exporting comments to comments?
I use a rather complex comment macro to make ODT annotations without introducing unwanted paragraph breaks. I'm not sure what the Markdown comment syntax is. But e.g. for HTML, the macro could be defined as simply as: #+MACRO: comment @@html:@@ Then you can write things like This is a sentence with a comment.{{{comment(This is the comment.)}}} This is another sentence. and get comments in the exported HTML. It's ugly, and any commas within the comment text must be backslash-escaped, but it works, and could be adapted for Markdown. HTH, Christian Allen S. Rout writes: > I'd like to write an org-mode document, export it to markdown, and have > comments exist in the markdown. > > > I feel like I'm thinking about the process incorrectly, and it's hard to > search around because the discussions around 'org-mode comments' focus > on org data for which authors would like to _prevent_ export. > > I saw some old conversations about making links to the hacked-in > comment: URI scheme, but that seemed quite hackish indeed. > > I thought about making a block of a 'comment' type, but of course all > the workflow for that is, again, focused on either preventing its export > in the first place, or making sure that it's exported in a visible > manner in the output. ("I want to print the comments in my LaTeX.."). > > > So... am I missing something obvious? Anyone else trying something similar? > > > - Allen S. Rout
Re: Exporting comments to comments?
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
Exporting comments to comments?
I'd like to write an org-mode document, export it to markdown, and have comments exist in the markdown. I feel like I'm thinking about the process incorrectly, and it's hard to search around because the discussions around 'org-mode comments' focus on org data for which authors would like to _prevent_ export. I saw some old conversations about making links to the hacked-in comment: URI scheme, but that seemed quite hackish indeed. I thought about making a block of a 'comment' type, but of course all the workflow for that is, again, focused on either preventing its export in the first place, or making sure that it's exported in a visible manner in the output. ("I want to print the comments in my LaTeX.."). So... am I missing something obvious? Anyone else trying something similar? - Allen S. Rout