Warm tip: This article is reproduced from serverfault.com, please click

How do I put the following LaTeX code in org-mode?

发布于 2020-12-08 07:35:06

I want to customize my title of the article class to align to left rather than defaultt centering. I found a solution to do it in LaTeX StackExchange TeX.

The code is:

\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
  \textbf{\@title}

  \@author
\end{flushleft}\egroup
}
\makeatother

\title{Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit}
\date{}
\author{%
    Author One$^{1}$, Author2$^{2}$\\
    $^{1}$Institution 1, I 1 City, I 1 Country\\
    $^{2}$Institution 1, I 1 City, I 1 Country\\
    \underline{$^{1}$mail@domain.com}\\
    \underline{$^{2}$mail2@domain.com }
}

I want to incorporate this into my org file which will be exported to pdf using LaTeX. How can I do that?

Questioner
Sreekumar R
Viewed
11
4,548 2020-12-09 00:22:40

The easiest way is to prepend each of the lines from \makeatletter to \makeatother, inclusive, with #+latex_header: and include these in your org file.