uuthesis-2016-guide.sty 3.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
%%% ====================================================================
%%% This file contains definitions, and redefinitions of LaTeX 
%%% internals, for typesetting the document in uuthesis-2016-guide.ltx.
%%% [24-Mar-2016]
%%% ====================================================================

\usepackage{tgbonum}

\renewcommand{\ttdefault}{zi4} % bad: produces irregular spacing
\renewcommand{\ttdefault}{txtt}
\renewcommand{\ttdefault}{ntxtt}
\renewcommand{\ttdefault}{lmtt}
\renewcommand{\ttdefault}{fdm}
\renewcommand{\ttdefault}{cmtl}
\renewcommand{\ttdefault}{ntxtt}

\usepackage{color}
\usepackage{coloralias}
\usepackage{rgb}

\definecolor{utahred}      {rgb}           {0.8, 0.0, 0.0}
\definecoloralias          {filecolor}     {darkgreen}    % too much like black on Xerox 7545 printers!
\definecoloralias          {filecolor}     {forestgreen}
\definecoloralias          {headingcolor}  {utahred}
\definecoloralias          {envcolor}      {royalblue2}
\definecoloralias          {pgmcolor}      {forestgreen}
\definecoloralias          {pkgcolor}      {royalblue1}
\definecoloralias          {urlcolor}      {darkgreen}
\definecoloralias          {verbatimcolor} {royalblue3}

\newcommand{\heading}[1]{{\color{utahred}#1}}
\let \MakeUppercase = \relax

\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  \fi
  \@tempskipa #5\relax
  \ifdim \@tempskipa>\z@
    \begingroup
      \color{headingcolor}#6{%
        \@hangfrom{\hskip #3\relax\@svsec}%
          \interlinepenalty \@M \color{headingcolor}#8\@@par}%
    \endgroup
    \csname #1mark\endcsname{#7}%
    \addcontentsline{toc}{#1}{%
      \ifnum #2>\c@secnumdepth \else
        \protect\numberline{\csname the#1\endcsname}%
      \fi
      #7}%
  \else
    \def\@svsechd{%
      #6{\hskip #3\relax
      \@svsec #8}%
      \csname #1mark\endcsname{#7}%
      \addcontentsline{toc}{#1}{%
        \ifnum #2>\c@secnumdepth \else
          \protect\numberline{\csname the#1\endcsname}%
        \fi
        #7}}%
  \fi
  \@xsect{#5}}

\renewcommand {\contentsname} {\color{headingcolor}Contents}

\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{1.5em}%
    \begingroup
      \color{headingcolor}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}%
      \vspace*{-1.5ex}%
      \par
    \endgroup
  \fi}


\pagestyle{headings}

\def \verbatim@font {\normalfont \ttfamily \color{verbatimcolor}}
% \def \verbatim@font {\normalfont \ttfamily \color{blue}}
% \def \verbatim@font {\color{blue}\normalfont \ttfamily}

\newcommand{\booktitle} [1] {\emph{#1}}
\newcommand{\env}       [1] {\texttt{\color{envcolor}#1}}
\newcommand{\file}      [1] {\texttt{\color{filecolor}#1}}
\newcommand{\pgm}       [1] {\texttt{\color{pgmcolor}#1}}
\newcommand{\pkg}       [1] {\texttt{\color{pkgcolor}#1}}
\newcommand{\url}       [1] {\texttt{\color{urlcolor}#1}}

%%% Usage: \begin{epigraph} text \end{epigraph}
\newenvironment{epigraph}%
{%
    \begin{flushright}%
        \index{epigraph}%
        \small
        \scshape
}
{%
    \end{flushright}
}