在 org latex 导出中禁用标题

Fan*_*eng 3 emacs latex org-mode

当将 org 文件导出到 Latex 时,是否可以完全禁用标题,即甚至不能\title{}?我是用org模式写论文 出版社提供的latex模板不允许\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"))))
Run Code Online (Sandbox Code Playgroud)

这是否意味着无法摆脱\title{}导出的乳胶文件中的命令?

谢谢你的协助!

leg*_*cia 5

我想出了这个\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)
Run Code Online (Sandbox Code Playgroud)