21

I am very new to LaTeX and exporting org-mode files to pdf. When I run the command org-latex-export-to-pdf it adds a title, author name, and date to the top of the exported pdf. Looking at the generated LaTeX, I assume that comes from the lines:

\author{Ethan Skinner}
\date{\today}
\title{My Title}

How can I export a pdf without these properties? I have tried using both the VISIBLE-ONLY and BODY-ONLY arguments to org-latex-export-to-pdf, but this didn't work for me

elethan
  • 4,755
  • 3
  • 29
  • 56
  • 3
    I think `#+OPTIONS: author:nil` will remove the author from exports, I'm almost sure the rest can be handled by options too, but I don't remember the syntax for it. – wvxvw Mar 18 '16 at 19:50
  • with the option it keeps the spacing though, I'd like to remove them completely... – xeruf Jan 06 '22 at 19:30

3 Answers3

30

OK, thanks to @wvxvw putting me on the right track I figured it out.

You can get rid of the author and date with:

#+OPTIONS: author:nil date:nil

The Org Manual says that you can also toggle title with title:nil (org-export-with-title). However, this option didn't get rid of the title, and I couldn't find a variable or command org-export-with-title. However, from this thread I found that I can get rid of the title simply by adding: #+TITLE: and not entering a title. This does add an extra line to my document, and it seems like it would make more sense to do it in the #+OPTIONS, but this will do.

elethan
  • 4,755
  • 3
  • 29
  • 56
14

You can also redefine LaTeX's \maketitle to do nothing:

#+Title: Test title
#+Author: Test Author
#+Date: [2016-03-28 Mon]

#+LATEX_HEADER: \renewcommand\maketitle{}

* hello
test text
Sean Allred
  • 6,861
  • 16
  • 85
2

Setting

#+OPTIONS: title:nil

on top of your file makes the \maketitle macro not to be inserted into the generated .tex file which makes neither the author, date or title to be shown in the resulting PDF file.

doltes
  • 567
  • 2
  • 11