%!TEX root=./user_guide.tex
\documentclass[a4paper,11pt,twoside]{book}
\usepackage[top=3cm,bottom=3cm,left=2cm,right=2cm]{geometry}
\usepackage{footnote}
\usepackage{amsbsy}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{fancyhdr}
\usepackage[T1]{fontenc} % important for having searchable underscores
\usepackage{bm}
\usepackage[sort&compress,numbers]{natbib}
%\usepackage{fancyheadings}
%\setlength{\parindent}{0in}
%\setlength{\parskip}{0.05in}
\setlength{\parskip}{0.1in}


%\usepackage{a4wide}
\usepackage{color}
\def\red{\textcolor{red}}       %
\def\old#1{\textcolor{red}{#1}}
\def\new#1{\textcolor{blue}{#1}}

\usepackage{amsmath}

\usepackage{multirow}

% Print only chapters in the Table Of Contents
\setcounter{tocdepth}{0} 


%\parskip=2mm

% Ensure that blank pages don't have numbers or heading on them 
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
 \hbox{}
 \vspace*{\fill}
 \thispagestyle{empty}
 \newpage\fi\fi}
\makeatother

% set fancy headings
\pagestyle{fancy}
\lhead[{\it \thepage}]{{\bf\it {\tt wannier90}: User Guide}}
\chead{}
\rhead[{\bf\it {\tt wannier90}: User Guide}]{{\it \thepage}}
\renewcommand{\headrulewidth}{0.2pt}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\footrulewidth}{0pt}
\setlength{\footskip}{0.25in}
\setlength{\parindent}{0in}


%% This part slightly modifies the default definition of \chapter
%% (found in book.cls) to add a \hspace{2em} before numbered chapters.
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                       \if@mainmatter
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\hspace{2em}\protect\numberline{\thechapter}#1}%
                       \else
                         \addcontentsline{toc}{chapter}{#1}%
                       \fi
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\makeatother

\title{{\tt wannier90}: User Guide}

\author{Version 3.1}

\date{}
%\date{\color{red} \today}


%%% THIS SHOULD BE THE LAST PACKAGE TO BE LOADED!
%hidelinks to remove colored borders from links
%plainpages=false needed for the unnumbered pages
%breaklinks=true to allow to break long links (e.g. long titles) on
%more than one line
%bookmarksopen open the bookmarks in the adobe reader plugin
%bookmarksopenlevel decide the max level at which the bookmarks should
%be open
% pdfdisplaydoctitle=true to show the document title instead of the
% filename in the titlebar of adobereader
\usepackage[plainpages=false,breaklinks=true,pdfborder=0 0 0,pdfdisplaydoctitle=true,bookmarksopen=true,bookmarksopenlevel=0,pdftex,%
%Comment next line if it makes problems
%(it requires a recent LaTeX distribution)
            hidelinks,
            pdftitle={Wannier90 User Guide},
            pdfkeywords={wannier90;postw90;pwscf;user guide}]{hyperref}

\begin{document}
\newcommand{\wannier}{\texttt{wannier90}}
\newcommand{\postw}{\texttt{postw90}}
\newcommand{\bw}{\texttt{BoltzWann}}
\newcommand{\pwscf}{\textsc{pwscf}}
\newcommand{\QE}{\textsc{quantum-espresso}}
\newcommand{\Mkb}{\mathbf{M}^{(\mathbf{k},\mathbf{b})}}
\newcommand{\Ak}{\mathbf{A}^{(\mathbf{k})}}
\newcommand{\Uk}{\mathbf{U}^{(\mathbf{k})}}
\newcommand{\cond}{\item[$\star$]}
\newcommand{\omi}{\Omega_{\mathrm{I}}}
\newcommand{\omt}{\widetilde{\Omega}}
\newcommand{\bvec}[1]{\bm{\mathrm{#1}}}


%%% Tsirkin
\def\nn{\nonumber\\}
\def\dk{[d\kk]}
\def\im{{\rm Im}}
\def\re{{\rm Re}}
\def\tr{{\rm Tr}}
\def\beq{\begin{equation}}
\def\eeq{\end{equation}}
\def\bea{\begin{eqnarray}}
\def\eea{\end{eqnarray}}
\def\ket#1{\vert#1\rangle}
\def\bra#1{\langle#1\vert}
\def\ip#1#2{\langle#1\vert#2\rangle}
\def\me#1#2#3{\langle#1\vert#2\vert#3\rangle}
\def\wt#1{\widetilde{#1}}
\def\kpar{{\boldsymbol\kappa}}
\def\T{\mathcal T}
\def\P{\mathcal P}
\def\ww{\omega}
\def\kk{{\bm k}}
\def\KK{{\bm K}}
\def\kz{K_z}
\def\qq{{\bm q}}
\def\rr{{\bm r}}
\def\RR{{\bm R}}
\def\GG{{\bm G}}
\def\EE{{\bm E}}
\def\BB{{\bm B}}
\def\MM{{\bm M}}
\def\jj{{\bm j}}
\def\E{{\mathcal E}}
\def\bE{{\bm{\mathcal E}}}
\def\ee{\hat{\bm e}}
\def\eps{\epsilon}
\def\vareps{\varepsilon}
\def\alfa{{\mathfrak a}}
\newcommand{\eq}[1]{Eq.~(\ref{eq:#1})}
\newcommand{\eqs}[2]{Eqs.~(\ref{eq:#1}) and~(\ref{eq:#2})}





\maketitle


\tableofcontents

%\listoftables

%\listoffigures

\part{Introduction}

\include{overview}

\part{\texttt{wannier90.x}\label{part:w90}}

\include{wannier90}

\include{parameters}

\include{projections}

\include{developers}

\include{wannier-pp}

\include{wannier}

\include{transport}

\include{files}

\include{interpolation}

\include{sample_input_files}

\part{\texttt{postw90.x}}

\include{postw90params}

\include{berry}

\include{gyrotropic}

\include{boltzwann}

\include{geninterp}

\appendix
\part{Appendices}

\include{utilities}

\include{faq}

%\include{other_thoughts}

\bibliographystyle{apsrev4-1}
\bibliography{../wannier90}

\end{document} 

