emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting comments to comments?
@ 2020-02-19 16:04 Allen S. Rout
  2020-02-19 16:13 ` Fraga, Eric
  2020-02-23 20:41 ` Christian Moe
  0 siblings, 2 replies; 3+ messages in thread
From: Allen S. Rout @ 2020-02-19 16:04 UTC (permalink / raw)
  To: emacs-orgmode



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exporting comments to comments?
  2020-02-19 16:04 Exporting comments to comments? Allen S. Rout
@ 2020-02-19 16:13 ` Fraga, Eric
  2020-02-23 20:41 ` Christian Moe
  1 sibling, 0 replies; 3+ messages in thread
From: Fraga, Eric @ 2020-02-19 16:13 UTC (permalink / raw)
  To: Allen S. Rout; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exporting comments to comments?
  2020-02-19 16:04 Exporting comments to comments? Allen S. Rout
  2020-02-19 16:13 ` Fraga, Eric
@ 2020-02-23 20:41 ` Christian Moe
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Moe @ 2020-02-23 20:41 UTC (permalink / raw)
  To: Allen S. Rout; +Cc: emacs-orgmode


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:<!-- $1 -->@@

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-23 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 16:04 Exporting comments to comments? Allen S. Rout
2020-02-19 16:13 ` Fraga, Eric
2020-02-23 20:41 ` Christian Moe

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).