emacs - 将评论导出为评论

标签 emacs latex comments org-mode

在 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/

相关文章:

emacs - 独立的可移植 emacs

math - 如何在 Latex 中将字符放置在函数下方?

python - 为什么 siunitx LaTeX 包会为 matplotlib 图形中的某些文本元素添加垂直偏移?

emacs - (读取命令...)在空白输入时返回奇怪的对象

emacs - 如何在组织模式链接中转义方括号?

emacs - 如何使用特定的 user-init-file 和 user-emacs-directory 启动 emacs?

r - 在 Windows 上设置 R 以使用 texlive 而不是 miktex

visual-studio - Visual Studio 2017 中的注释样式

java - 在 JSON 中处理 shell 风格的注释

javascript - Android (5.0.1) Chrome 正在删除 javascript 空格和注释,有办法阻止吗?