emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Fanpeng Kong <kshark343@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org mode latex export excude title
Date: Fri, 30 Dec 2016 09:26:01 -0800	[thread overview]
Message-ID: <alpine.OSX.2.20.1612300922100.982@charles-berrys-macbook.local> (raw)
In-Reply-To: <m2tw9lr506.fsf@gmail.com>

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

  reply	other threads:[~2016-12-30 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 12:11 org mode latex export excude title Fanpeng Kong
2016-12-30 17:26 ` Charles C. Berry [this message]
2016-12-30 19:13   ` Ken Mankoff
2016-12-30 19:55     ` Charles C. Berry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.20.1612300922100.982@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=kshark343@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).