\makeatletter \usepackage{lmodern} \usepackage[sc]{mathpazo} \usepackage{bm} \linespread{1.1} \usepackage{microtype} \microtypesetup{stretch=15,shrink=15} \usepackage{geometry} \geometry{letterpaper,left=1in,right=1in,top=0.75in,bottom=0.75in,includeheadfoot, headheight=15pt,headsep=16pt,footskip=26pt} \setlength{\parindent}{1.5em} \setlength{\parskip}{0pt} \setlength{\emergencystretch}{3em} \tolerance=1000 \clubpenalty=3000 \widowpenalty=3000 \displaywidowpenalty=1500 \raggedbottom \allowdisplaybreaks[2] \usepackage{enumitem} \setlist{topsep=4pt plus 2pt minus 1pt,itemsep=2pt plus 1pt,parsep=0pt} \setlist[itemize]{leftmargin=1.5em} \setlist[enumerate]{leftmargin=2em} \usepackage[newparttoc]{titlesec} \usepackage{titletoc,fancyhdr} \newcommand{\trilogy@spacedsc}[1]{{\scshape\textls[90]{\MakeLowercase{#1}}}} \newcommand{\trilogy@headpar}{\rightskip=0pt plus 0.5\hsize\relax \parfillskip=0pt plus 0.5\hsize\relax\hyphenpenalty=10000\relax\exhyphenpenalty=10000\relax} \titleformat{\part}[display] {\normalfont\centering} {\large\trilogy@spacedsc{\partname\ \thepart}} {22pt} {\fontsize{22}{28}\selectfont} \assignpagestyle{\part}{empty} \titleformat{\chapter}[display] {\normalfont\trilogy@headpar} {\trilogy@spacedsc{\chaptertitlename\ \thechapter}} {12pt} {\fontsize{20}{25}\selectfont} \titleformat{name=\chapter,numberless}[display] {\normalfont\trilogy@headpar} {} {0pt} {\fontsize{20}{25}\selectfont\trilogy@starmark} \titlespacing*{\chapter}{0pt}{12pt}{30pt} \newcommand{\trilogy@starmark}[1]{#1\markboth{#1}{#1}} \titleformat{\section} {\normalfont\fontsize{13.5}{17}\selectfont\bfseries\trilogy@headpar}{\thesection}{0.75em}{} \titlespacing*{\section}{0pt}{22pt plus 4pt minus 2pt}{9pt plus 2pt} \titleformat{\subsection} {\normalfont\normalsize\bfseries\trilogy@headpar}{\thesubsection}{0.75em}{} \titlespacing*{\subsection}{0pt}{15pt plus 3pt minus 2pt}{6pt plus 1pt} \titleformat{\paragraph}[runin] {\normalfont\normalsize\bfseries}{}{0pt}{} \titlespacing*{\paragraph}{0pt}{9pt plus 2pt minus 1pt}{0.6em} \setcounter{tocdepth}{1} \setcounter{secnumdepth}{1} \newcommand{\shorthead}[2]{\expandafter\def\csname trilogy@sh@\detokenize{#1}\endcsname{#2}} \newcommand{\trilogy@lookup}[1]{% \ifcsname trilogy@sh@\detokenize{#1}\endcsname \expandafter\let\expandafter\trilogy@headtext\csname trilogy@sh@\detokenize{#1}\endcsname \else \def\trilogy@headtext{#1}% \fi} \newcommand{\trilogy@headfont}{\normalfont\small\itshape} \DeclareRobustCommand{\trilogy@hd}[2]{% \ifx\relax#1\relax\else{\upshape#1}\hspace{0.8em}\fi#2} \newsavebox{\trilogy@chapbox} \newsavebox{\trilogy@secbox} \newsavebox{\trilogy@cachedchapbox} \newsavebox{\trilogy@cachedsecbox} \newif\iftrilogy@headtoolong \newif\iftrilogy@cachedheadtoolong \let\trilogy@cachedheadkey\relax \newcommand{\trilogy@computeheads}{% \trilogy@headtoolongfalse \sbox\trilogy@chapbox{\trilogy@headfont\nouppercase{\leftmark}}% \sbox\trilogy@secbox{}% \protected@edef\trilogy@l{\leftmark}% \protected@edef\trilogy@r{\rightmark}% \ifx\trilogy@r\@empty\else\ifx\trilogy@r\trilogy@l\else \sbox\trilogy@secbox{\trilogy@headfont\nouppercase{\rightmark}}% \fi\fi \dimen@=\wd\trilogy@chapbox\advance\dimen@ 4em\relax \ifdim\dimen@>\headwidth \sbox\trilogy@chapbox{\trilogy@headfont\@chapapp\ \thechapter}% \trilogy@headtoolongtrue \fi \dimen@=\wd\trilogy@chapbox\advance\dimen@\wd\trilogy@secbox\advance\dimen@ 8em\relax \ifdim\dimen@>\headwidth \sbox\trilogy@secbox{\trilogy@headfont \expandafter\let\csname trilogy@hd \endcsname\trilogy@hdnum\nouppercase{\rightmark}}% \fi} \newcommand{\trilogy@heads}[1]{% \protected@edef\trilogy@headkey{% {\leftmark}{\rightmark}{\the\headwidth}% {\fontname\font}{\the\dimexpr1em\relax}{\thechapter}{\@chapapp}}% \ifx\trilogy@headkey\trilogy@cachedheadkey\else \trilogy@computeheads \global\setbox\trilogy@cachedchapbox=\copy\trilogy@chapbox \global\setbox\trilogy@cachedsecbox=\copy\trilogy@secbox \global\let\trilogy@cachedheadkey\trilogy@headkey \iftrilogy@headtoolong \global\trilogy@cachedheadtoolongtrue \else \global\trilogy@cachedheadtoolongfalse \fi \fi \setbox\trilogy@chapbox=\copy\trilogy@cachedchapbox \setbox\trilogy@secbox=\copy\trilogy@cachedsecbox \iftrilogy@cachedheadtoolong \ifx\relax#1\relax\else\PackageWarningNoLine{trilogy-style}{Running head too long on page \thepage; give the chapter a \string\shorthead}\fi \fi} \newcommand{\trilogy@hdnum}[2]{\ifx\relax#1\relax\else\S\,{\upshape#1}\fi} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{\trilogy@heads{warn}\usebox\trilogy@chapbox} \fancyhead[R]{\trilogy@heads{}% \ifdim\wd\trilogy@secbox>\z@\usebox\trilogy@secbox\hspace{2em}\fi \normalfont\small\thepage} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\normalfont\small\thepage}% \renewcommand{\headrulewidth}{0pt}\renewcommand{\footrulewidth}{0pt}} \renewcommand{\chaptermark}[1]{\trilogy@lookup{#1}% \markboth{\trilogy@hd{\ifnum\c@secnumdepth>\m@ne\if@mainmatter\thechapter\fi\fi}{\trilogy@headtext}}{}} \renewcommand{\sectionmark}[1]{\trilogy@lookup{#1}% \markright{\trilogy@hd{\ifnum\c@secnumdepth>\z@\thesection\fi}{\trilogy@headtext}}} \contentsmargin{2.2em} \titlecontents{part}[0pt] {\addvspace{16pt plus 2pt}\normalfont} {\trilogy@spacedsc{\partname\ \thecontentslabel}\hspace{1em}} {} {\hfill\contentspage} [\addvspace{4pt}] \titlecontents{chapter}[2.2em] {\addvspace{7pt plus 1pt}\normalfont} {\contentslabel{2.2em}} {\hspace*{-2.2em}} {\hfill\contentspage} \titlecontents{section}[4.8em] {\normalfont\small} {\contentslabel{2.6em}} {\hspace*{-2.6em}} {\titlerule*[0.9em]{.}\contentspage} \indexsetup{othercode={\small\raggedcolumns\maxbalancingoverflow=\z@}} \@ifpackageloaded{natbib}{% \renewcommand{\bibsection}{\chapter*{References}% \addcontentsline{toc}{chapter}{References}}% }{} \newlength{\trilogyenvskip} \setlength{\trilogyenvskip}{10pt plus 3pt minus 2pt} \newtheoremstyle{plain}{\trilogyenvskip}{\trilogyenvskip} {\itshape}{}{\bfseries}{.}{0.5em}{} \newtheoremstyle{definition}{\trilogyenvskip}{\trilogyenvskip} {\normalfont}{}{\bfseries}{.}{0.5em}{} \newtheoremstyle{remark}{\trilogyenvskip}{\trilogyenvskip} {\normalfont}{}{\itshape}{.}{0.5em}{} \newcommand{\trilogynote}[2]{\par\addvspace{5pt plus 1pt}\noindent{\itshape #1}\enspace #2\par} \newcommand{\usedin}[1]{\trilogynote{Used in:}{#1}} \newcommand{\walkthroughname}{Technical walkthrough} \newcommand{\walkthroughend}{\ensuremath{\square}} \newtheoremstyle{trilogysetoff}{\trilogyenvskip}{\trilogyenvskip} {\normalfont\leftskip=1.5em\rightskip=1.5em\relax}{}{\bfseries}{.}{0.5em}{} \theoremstyle{definition} \newtheorem{trilogywalk}{\walkthroughname}[chapter] \newenvironment{walkthrough}[1][] {\ifx\relax#1\relax\begin{trilogywalk}\else\begin{trilogywalk}[#1]\fi \pushQED{\qed}\renewcommand{\qedsymbol}{\walkthroughend}} {\popQED\end{trilogywalk}} \theoremstyle{plain} \newenvironment{trilogyaside}[1] {\par\addvspace{11pt plus 3pt minus 2pt}% \list{}{\leftmargin=1.5em\rightmargin=1.5em\topsep=0pt\partopsep=0pt\parsep=0pt \listparindent=1.5em\itemsep=0pt}% \item\relax{\trilogy@spacedsc{#1}}\par\nopagebreak\vspace{3pt}\noindent\ignorespaces} {\endlist\par\addvspace{11pt plus 3pt minus 2pt}} \newenvironment{sayit}{\begin{trilogyaside}{How to say it}}{\end{trilogyaside}} \newenvironment{fiveminute}{\begin{trilogyaside}{Five-minute explanation}}{\end{trilogyaside}} \newcommand{\tophysicist}{\par\addvspace{2pt}\noindent{\itshape To a physicist.}\enspace\ignorespaces} \newcommand{\tomathematician}{\par\addvspace{4pt}\noindent{\itshape To a mathematician.}\enspace\ignorespaces} \newcommand{\trilogyneedspace}[1]{\par\penalty-100\begingroup \setlength{\dimen@}{#1}\dimen@ii\pagegoal\advance\dimen@ii-\pagetotal \ifdim\dimen@>\dimen@ii\ifdim\dimen@ii>\z@\vfil\fi\break\fi\endgroup} \usepackage[font=small,labelsep=period,skip=8pt]{caption} \usepackage{etoolbox} \patchcmd{\@footnotetext}{\footnotesize}{\small}{}{} \newcommand{\trilogy@overhang}{0pt} \newcommand{\widetablesetup}{% \setlength{\LTleft}{-\trilogy@overhang plus 1fill}% \setlength{\LTright}{-\trilogy@overhang plus 1fill}% \setlength{\linewidth}{\dimexpr\textwidth+2\dimexpr\trilogy@overhang\relax\relax}} \usepackage[hidelinks,bookmarksnumbered=true]{hyperref} \usepackage{bookmark} \hypersetup{pdfauthor={},pdfpagemode=UseNone,pdfdisplaydoctitle=true, pdfstartview={FitH \hypercalcbp{\paperheight}}} \newcommand{\trilogyseries}{Notes on Spin Glasses} \newcommand{\trilogytitlepage}[3]{% \hypersetup{pageanchor=false}% \begin{titlepage} \centering\normalfont \vspace*{1.7in} {\large\trilogy@spacedsc{\trilogyseries}\par} \vspace{12pt} {\normalsize\itshape Volume #1\par} \vspace{1.05in} {\fontsize{28}{35}\selectfont #2\par} \vspace{24pt} {\Large\itshape #3\par} \vfill \end{titlepage}% \hypersetup{pageanchor=true}} \makeatother