From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: org mode latex export excude title Date: Fri, 30 Dec 2016 14:13:57 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c06fa82fe02720544e5001e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN2cq-0005bv-0i for emacs-orgmode@gnu.org; Fri, 30 Dec 2016 14:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cN2cp-0001dv-2D for emacs-orgmode@gnu.org; Fri, 30 Dec 2016 14:13:59 -0500 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:34405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cN2co-0001dE-UG for emacs-orgmode@gnu.org; Fri, 30 Dec 2016 14:13:59 -0500 Received: by mail-qk0-x231.google.com with SMTP id h201so164608097qke.1 for ; Fri, 30 Dec 2016 11:13:58 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Charles C. Berry" Cc: Fanpeng Kong , Org-mode --94eb2c06fa82fe02720544e5001e Content-Type: text/plain; charset=UTF-8 (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 > > --94eb2c06fa82fe02720544e5001e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
(setq-local org-latex-title-command "")
=
Can be set as a buffer local variable.

<= div>=C2=A0 -k.

On Fri, Dec 30, 2016 at 12:26 PM, Charles C. Berry <ccberry@ucsd.e= du> 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` comman= d 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-li= ne)

#+BEGIN_SRC emacs-lisp :exports results :results none
=C2=A0 (defun comment-out-title-line (doc &optional bk info)
=C2=A0 =C2=A0 (replace-regexp-in-string "\\\\title" "%% \\ti= tle" doc nil t ))
=C2=A0 (setq-local org-export-allow-bind-keywords t)
#+END_SRC



* section 1

...

HTH,

Chuck


--94eb2c06fa82fe02720544e5001e--