在 Org-mode 中,您可以发表评论,在 Org-mode 中,您可以导出到 LaTeX,但 Org-mode 评论不会导出到 LaTeX 评论。如何使 Org-mode 将 Org-mode 注释导出为 LaTeX 注释?
这是一个例子。下列
* Test
Text before comment
# Comment
Text after comment
Text before comment
#+BEGIN_COMMENT
Comment
#+END_COMMENT
Text after comment
导出到
\section{Test}
\label{sec-1}
Text before comment
Text after comment
Text before comment
Text after comment
但我希望将 Org-mode 注释导出为 LaTeX 注释。因此,我想要以下 LaTeX 输出:
\section{Test}
\label{sec-1}
Text before comment
% Comment
Text after comment
Text before comment
\begin{comment}
Comment
\end{comment}
Text after comment
我在 Emacs 23.3.1 中运行 Org-mode 7.6。
最佳答案
在当前的导出器下,我能想到的唯一允许您导出评论的方法是后端特定的。您可以使用以下内容:
#+latex: comment
或者
#+begin_latex
\begin{comment}
comment
\end{comment}
#+end_latex
但是,两者都是人为设计的,如果您打算导出为多种格式,则需要对 HTML 等进行等效操作。
有一个new exporter然而,在开发中,这应该不太难实现(注释已经在解析器中被识别为块,所以它只需要一种方法来在导出时转换它们)。
我正在将此请求转发到邮件列表,以查看是否可以包含此请求。
编辑:线程位于 here .
编辑:来自 Org-Mode 维护者的回应
the current exporters don't allow this, but the new export engine by Nicolas makes it possible.
The plan is to merge the new export engine into Org's core before version 8.0, so please stay tuned.
关于emacs - 将评论导出为评论,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9873365/