In Org-mode there are several ways to make comments. But I do not know of any way to make inline comments. According to the manual
regions surrounded by ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.
But this is only true if the said region starts a line.
In the following
#+TITLE: Test
text #+BEGIN_COMMENT comment 1 #+END_COMMENT text
text
#+BEGIN_COMMENT comment 2 #+END_COMMENT text
only comment 2 is treated as a comment. It exports (e.g. C-e A) as
text #+BEGIN_COMMENT comment 1 #+END_COMMENT text
text
Also, org-toggle-comment
does not work for making inline comments by using it on regions and comment-region
does not even create a comment.
So, how can I make inline comments in Org-mode?
Jonathan Leech-Pepin's comment on your question on
\printbibliography
gave me an idea. You can use a macro for inline comments. Note that you need trailing space after the comment definition.EDIT: Since this is supposed to be a macro odd input may screw things up. I'm a little surprised that
works for me, although
does not. I would assume that anything other than fairly simple text would be fairly fragile if they decide to change the way they parse macros in the future.
Another way will be to use the export snippets (defined in Org Syntax (draft), search for "Export Snippets"), like so:
I used the word
comment
where the export backend should be just for clarity, you can use any other word (besides the backend you're exporting to).