I stumbled upon this archived email: https://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01281.html and a suggestion is to create a custom title page that picks up the title, author, and date from the org file. There is a code block in the post that contains the syntax:
address@hidden
\newpage
\null
\begin{center}%
\let \footnote \thanks
{\usebox{\FIRM}}%
\vskip 3em%
{\LARGE address@hidden \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
address@hidden
\end{tabular}\par}%
\vskip 1em%
{\large address@hidden
\end{center}%
\par
\vskip 1.5em}
, but the post does not specify a way to add this to the org-latex-classes
, on top of that, the post is really old and not up to date with the org-version
I use (9.1.9). There are several posts in here that ask how to add custom classes to latex but I'm trying to do both add a custom title page that reads from the org metadata latex headers. Given that I have this written in my init.el:
;; Org Mode Custom Classes for Latex
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("article"
"\\documentclass{article}"
" address@hidden
\newpage
\null
\begin{center}%
\let \footnote \thanks
{\usebox{\FIRM}}%
\vskip 3em%
{\LARGE address@hidden \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
address@hidden
\end{tabular}\par}%
\vskip 1em%
{\large address@hidden
\end{center}%
\par
\vskip 1.5em}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
and that I am new to org-mode. How can I accomplish this by editing an existing org file that contains this:
#+TITLE: testing out org mode export latex
#+AUTHOR: me
#+EMAIL: me@meme.com
#+LANGUAGE: es
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [12pt,titlepage]
#+LATEX_HEADER: \usepackage{baskervald}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{setspace}
#+LATEX_HEADER: \usepackage[AUTO]{babel}
#+LATEX_HEADER: \usepackage[hyperref,x11names]{xcolor}
#+LATEX_HEADER: \usepackage[colorlinks=true,linkcolor=SteelBlue4,urlcolor=Firebrick4]{hyperref}
#+EXPORT_FILE_NAME: export_with_custom_title
#+OPTIONS: f:t toc:nil |:t
#+STARTUP: showall
#+BEGIN_ABSTRACT
lorem ipsum lorem ipsum ....
#+END_ABSTRACT
#+BEGIN_LATEX latex
\thispagestyle{empty}
\newpage
\doublespacing
#+END_LATEX
#+TOC: headlines 2
#+BEGIN_LATEX latex
\singlespacing
\thispagestyle{empty}
\newpage
\setcounter{page}{1}
#+END_LATEX
* First heading
** second
*** and so on
paragraphs
So, how do I add a custom page title that modifies my title but retains the structure I have in my current org file? So, I am thinking that what I am trying to do is modify the custom article class so that it modifies only the title section by using #+TITLE:...
, #+EMAIL:..
and #+AUTHOR:..
but keeps the rest of the edits.
org-latex-hyperref-template
andorg-latex-title-command
. i'll open another question just aboutorg-latex-title-command