(setq-local org-latex-title-command "") Can be set as a buffer local variable. -k. On Fri, Dec 30, 2016 at 12:26 PM, Charles C. Berry wrote: > On Fri, 30 Dec 2016, Fanpeng Kong wrote: > > I am trying to use org mode to write a paper. The latex template of the >> journal restricts the location of `\title{}` command to be after the >> `\begin{document}`. While by leaving `#+TITLE:` empty and specify >> `#+OPTIONS: title:nil` in my org file, I can remove the `\maketitle` >> command in the >> latex export. However, and empty title `\title{}` is still exported >> prior to the `\begin{document}`. And it causes problem for the template >> I am using. >> >> Following is an minimal example of the org mode latex export. Is there >> any way to excude the empty `\title{}` command? >> > > [example deleted] > > Any suggestion will be appreciated. And of course, Happy New Year! >> > > Use a filter to comment it out: > > > > #+OPTIONS: title:nil toc:nil > #+BIND: org-export-filter-final-output-functions (comment-out-title-line) > > #+BEGIN_SRC emacs-lisp :exports results :results none > (defun comment-out-title-line (doc &optional bk info) > (replace-regexp-in-string "\\\\title" "%% \\title" doc nil t )) > (setq-local org-export-allow-bind-keywords t) > #+END_SRC > > > > * section 1 > > ... > > HTH, > > Chuck > >