Skip to content

Instantly share code, notes, and snippets.

@dweinstein
Created September 5, 2012 20:42
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dweinstein/3644419 to your computer and use it in GitHub Desktop.
Save dweinstein/3644419 to your computer and use it in GitHub Desktop.
my org-mode template for exporting to LaTeX/PDF
#+TITLE: Template org-mode document for export to LaTeX/PDF
#+AUTHOR: David Weinstein
#+LaTeX_HEADER: \usepackage[left=1in,top=1in,right=1in,bottom=1.5in]{geometry}
#+LaTeX_HEADER: \usepackage{palatino}
#+LaTeX_HEADER: \usepackage{fancyhdr}
#+LaTeX_HEADER: \usepackage{sectsty}
#+LaTeX_HEADER: \usepackage{engord}
#+LaTeX_HEADER: \usepackage{cite}
#+LaTeX_HEADER: \usepackage{graphicx}
##+LaTeX_HEADER: \usepackage{bibspacing}
#+LaTeX_HEADER: \usepackage{setspace}
#+LaTeX_HEADER: \usepackage[compact]{titlesec}
#+LaTeX_HEADER: \usepackage[center]{caption}
#+LaTeX_HEADER: \usepackage{multirow}
#+LaTeX_HEADER: \usepackage{ifthen}
#+LaTeX_HEADER: \usepackage{longtable}
#+LaTeX_HEADER: \usepackage{color}
#+LaTeX_HEADER: \usepackage{amsmath}
#+LaTeX_HEADER: \usepackage{listings}
#+LaTeX_HEADER: \usepackage{pdfpages}
#+LaTeX_HEADER: \usepackage{nomencl} % For glossary
#+LaTeX_HEADER: \usepackage{pdflscape} % For landscape pictures and environment
#+LaTeX_HEADER: \usepackage{verbatim} % For multiline comment environments
#+LaTeX_HEADER: \usepackage[table]{xcolor}
* Section
** Subsection with code example
#+begin_latex
\lstset{ %
language=XML, % the language of the code
basicstyle=\footnotesize, % the size of the fonts that are used for the code
numbers=right, % where to put the line-numbers
frame=single, % adds a frame around the code
breaklines=true, % sets automatic line breaking
}
\lstset{label=code:manifest}
\begin{lstlisting}
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="...">
<uses-permission android:name="android.permission.VIBRATE"/>
<application android:label="...">
...
</application>
</manifest>
\end{lstlisting}
#+end_latex
* Section 2
** Subsection 2
#+begin_latex
\begin{figure}[h!]
\begin{center}
\resizebox{14cm}{!}{\includegraphics{./example.png}}
\caption{Permission requirements for Vibrator system service as
confirmed @ http://www.android-permissions.org/permissionmap.html
\label{fig:runtime:exec}}
\end{center}
\end{figure}
#+end_latex
@felipelalli
Copy link

Wow! Beautiful. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment