在将组织文件导出到乳胶时,是否可以完全禁用标题,即甚至\title{}
?我正在使用组织模式来写纸,出版商提供的乳胶模板不允许\title{}
出现在\begin{document}
我尝试了许多在线找到的解决方案,但是它们都不能与我使用的乳胶模板一起使用。目前,我将#+BIND: org-latex-title-command "
放入了我的组织文件中。从ox-latex
的源代码中,我在org-latex-template (contents info)
内找到了以下代码:
;; Title and subtitle.
(let* ((subtitle (plist-get info :subtitle))
(formatted-subtitle
(when subtitle
(format (plist-get info :latex-subtitle-format)
(org-export-data subtitle info))))
(separate (plist-get info :latex-subtitle-separate)))
(concat
(format "\\title{%s%s}\n" title
(if separate "" (or formatted-subtitle "")))
(when (and separate subtitle)
(concat formatted-subtitle "\n"))))
这是否意味着无法消除导出的乳胶文件中的\title{}
命令?
感谢您的协助!
答案 0 :(得分:4)
我想到了这个小建议功能,该功能从输出中删除了\title{...}
行:
(defun my-org-latex-remove-title (str)
(replace-regexp-in-string "^\\\\title{.*}$" "" str))
(advice-add 'org-latex-template :filter-return 'my-org-latex-remove-title)