Skip to content
Snippets Groups Projects
revtex.template 3.45 KiB
Newer Older
Bas Nijholt's avatar
Bas Nijholt committed
\documentclass[english, twocolumn, 10pt, aps, superscriptaddress, floatfix, prb, citeautoscript]{revtex4-1}
\pdfoutput=1
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
Bas Nijholt's avatar
Bas Nijholt committed
\usepackage{units}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wasysym}
\usepackage{layouts}
\usepackage{siunitx}
\usepackage{bm}
\usepackage{xcolor}
\usepackage[colorlinks, citecolor={blue!50!black}, urlcolor={blue!50!black}, linkcolor={red!50!black}]{hyperref}
\usepackage{bookmark}
\usepackage{tabularx}
\usepackage{microtype}
\usepackage{babel}
Bas Nijholt's avatar
Bas Nijholt committed
\usepackage{textcomp}
Bas Nijholt's avatar
Bas Nijholt committed
\hypersetup{pdfauthor={$for(author)$$author.name$$sep$, $endfor$},pdftitle={$if(title)$$title$$endif$}}

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}

\DeclareMathOperator{\e}{e}
\DeclareMathOperator{\de}{d\!}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\Res}{Res}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\Pf}{Pf}
\DeclareMathOperator{\Det}{Det}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\re}{Re}
\newcommand{\kx}{k_x}
\newcommand{\ky}{k_y}
\newcommand{\meff}{m_\text{eff}}
Bas Nijholt's avatar
Bas Nijholt committed
\newcommand{\R}{\mathbb{R}}
Bas Nijholt's avatar
Bas Nijholt committed

\newcounter{CommentNumber}
% \renewcommand{\paragraph}[1]{\stepcounter{CommentNumber}\belowpdfbookmark{#1}{\arabic{CommentNumber}}}

\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}

\makeatletter
\let\oldabs\abs
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
\let\oldnorm\norm
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
\makeatother

\newcommand{\ev}[1]{\langle#1\rangle}
\newcommand{\bra}[1]{\langle#1|}
\newcommand{\ket}[1]{|#1\rangle}
\newcommand{\bracket}[2]{\langle#1|#2\rangle}

\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}

% workaround for https://github.com/jgm/pandoc/issues/2392#issuecomment-140114736
\renewcommand{\citep}{\cite}

% workaround for https://github.com/jgm/pandoc/issues/4716
\newcommand{\passthrough}[1]{\lstset{mathescape=false}#1\lstset{mathescape=true}}

Bas Nijholt's avatar
Bas Nijholt committed
% listing settings, from https://tex.stackexchange.com/a/179956
Bas Nijholt's avatar
Bas Nijholt committed
\lstset{
    basicstyle=\ttfamily,
    numbers=left,
    keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries,
    stringstyle=\color[rgb]{0.31,0.60,0.02},
    commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape,
    numberstyle=\footnotesize,
    stepnumber=1,
    numbersep=5pt,
    backgroundcolor=\color[RGB]{248,248,248},
    showspaces=false,
    showstringspaces=false,
    showtabs=false,
    tabsize=2,
    captionpos=b,
    breaklines=true,
    breakatwhitespace=true,
    breakautoindent=true,
    escapeinside={\%*}{*)},
Bas Nijholt's avatar
Bas Nijholt committed
    linewidth=\columnwidth,
Bas Nijholt's avatar
Bas Nijholt committed
    basewidth=0.5em,
}


Bas Nijholt's avatar
Bas Nijholt committed
\begin{document}

\title{$if(title)$$title$$endif$}

$for(author)$
$if(author.name)$
\author{$author.name$}
\email[Electronic address: ]{$author.email$}
$for(author.affiliation)$
\affiliation{$author.affiliation$}
$endfor$
$endif$
$endfor$

\date{\today}

$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$

\flushbottom
\maketitle

$body$

$if(acknowledgements)$
\section*{Acknowledgements}
$acknowledgements$
$endif$

$if(contribution)$
\section*{Author contributions statement}
$contribution$
$endif$

$if(additionalinformation)$
\section*{Additional information}
$additionalinformation$
$additionalinformation$
$endif$

\bibliographystyle{apsrev4-1}
\bibliography{$bibliography$}

\end{document}