如何在组织模式下进行内联注释? [英] How to make inline comments in Org-mode?

查看:845
本文介绍了如何在组织模式下进行内联注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在组织模式中,有几种方式发表评论。但我不知道有什么办法做内联评论。根据手册

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


由'#+ BEGIN_COMMENT'...'#+ END_COMMENT'包围的区域不会
被导出

regions surrounded by ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.

但是,如果所述区域开始一行,则只有这样。

But this is only true if the said region starts a line.

在以下

#+TITLE: Test

text #+BEGIN_COMMENT comment 1 #+END_COMMENT text

text
#+BEGIN_COMMENT comment 2 #+END_COMMENT text

只有评论2被视为评论。它出口(例如 Ce A )as

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 #+BEGIN_COMMENT comment 1 #+END_COMMENT text

文本

另外, org-toggle-comment 不适用于在区域上使用内联评论,而 comment-region 甚至不会创建评论。

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.

那么,如何在Org模式下进行内联注释?

So, how can I make inline comments in Org-mode?

推荐答案

Jonathan Leech-Pepin的评论您在 \printbibliography上的问题 给了我一个想法。您可以使用宏来进行内联注释。请注意,您需要在注释定义后的尾部空格。

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.

#+macro: comment  

...

{{{comment(here is a comment)}}}

编辑:由于这应该是一个宏奇数输入可能会拧紧。我有点惊讶,

Since this is supposed to be a macro odd input may screw things up. I'm a little surprised that

{{{comment(here is a)}} comment)}}}

适用于我,虽然

{{{comment(here is a comment) more}}}

不。我假设除了相当简单的文本之外的任何东西,如果他们决定改变他们将来解析宏的方式,将是相当脆弱的。

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.

这篇关于如何在组织模式下进行内联注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆