Commit 0d87a5fe authored by Skutnik, Steve's avatar Skutnik, Steve
Browse files

Minor technical tweaks to ORNL-TM template

-Render & expand bookmarks toolbar by default
-Suppress hyphenation in cover page title
-Ensure proper capitalization for first-order titles
-Handle acronyms within appendices
parent 05a4b22f
Loading
Loading
Loading
Loading
+47 −6
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
\RequirePackage{amsmath}

% Use Times for math font and text font.
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{txfonts}

@@ -76,9 +77,12 @@
% TABLE OF CONTENTS STYLING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\RequirePackage{tocloft} % table of contents styling
      
\setcounter{tocdepth}{2} % subsections
\setcounter{tocdepth}{3} % subsubsections
\setcounter{table}{-1}

% Make the contents, figure, and table titles uppercase and centered
\renewcommand\cfttoctitlefont{\noindent\hspace*{\fill}\bfseries\MakeUppercase}
@@ -88,7 +92,7 @@
\renewcommand\cftafterloftitle{\hspace*{\fill}}
\renewcommand\cftafterlottitle{\hspace*{\fill}}
% Use plain font style and regular size
\renewcommand\cftsecfont{}
\renewcommand{\cftsecfont}{}
% Add a dot after section numbers
\renewcommand\cftsecaftersnum{.}
% Squish section lines together
@@ -96,6 +100,9 @@
% Add leaders to all sections and subsections in the TOC.
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}




%%% EXTENSIONS FOR SPHINX MANUAL %%%

\if@cfthaspart
@@ -106,6 +113,9 @@
\setlength\cftbeforechapskip{.5\baselineskip}
\fi




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE STYLES 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -161,13 +171,13 @@
% is not numbered, followed by a blank unnumbered page.
\renewcommand\appendix{%
  \cleardoublepage
  % Reset page style
  \pagenumbering{arabic}%
  \renewcommand\thepage{\thesection--\arabic{page}}%
  % Reset section numbering
  \gdef\thesection{\@Alph\c@section}%
  % Reset section formatting
  \setcounter{section}{0}%
% Reset page style
  \pagenumbering{arabic}%
  \renewcommand*{\thepage}{\thesection--\arabic{page}}%  
  % Change equation numbering
  \gdef\theequation{\@Alph\c@section.\arabic{equation}}%
  % Reset page and equation numbers at the beginning of every section
@@ -184,10 +194,41 @@
  \let\section\@appendixsection
}

% Deal with acronyms / glossary entries within the appendices;
\@ifpackageloaded{glossaries}{
\let\oldappendix\appendix
\renewcommand\appendix{%
    \oldappendix
    \renewcommand\theHpage{\thepage}
    }
}{} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Capitalizes first-order headings in ToC
%% Need to figure out how to add second-order (subsection) headigns

\makeatletter
\let\oldcontentsline\contentsline
\def\contentsline#1#2{%
   \expandafter \ifx\csname l@#1\endcsname\l@section 
      \expandafter\@firstoftwo
   \else 
     \expandafter\@secondoftwo
  \fi 
  {%
    \oldcontentsline{#1}{\MakeTextUppercase{#2}}%
  }{%
    \oldcontentsline{#1}{#2}%
  }%
}

\makeatother


\endinput

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end of ornltm/ornltm/ornltm-style.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+9 −3
Original line number Diff line number Diff line
@@ -23,14 +23,20 @@
\RequirePackage{wallpaper} % background on cover page
\RequirePackage{fancyhdr} % headers and footers
\RequirePackage{emptypage} % hide footers on blank pages
\RequirePackage[pdfusetitle]{hyperref} % url and links in PDF
\RequirePackage[shortcuts,acronym,nonumberlist,nogroupskip,nopostdot]{glossaries} % acronym support
\RequirePackage[pdfusetitle,bookmarksopen=true, bookmarksnumbered=true,hypertexnames=false]{hyperref} % url and links in PDF
\RequirePackage[shortcuts,acronym,nonumberlist,nogroupskip,nopostdot,toc,nomain]{glossaries} % acronym support

\RequirePackage{tocloft} % table of contents styling
\RequirePackage{color} % colored fonts and boxes

% Load document style
\RequirePackage{ornltm-style}

% Disable hyphenation suppression in PDF strings (for titles)
\pdfstringdefDisableCommands{%
  \def\nohyphens{}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VARIABLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -122,7 +128,7 @@
%% TITLE %%
\begin{minipage}{\textwidth}%
  \Huge\textbsf{%
    \@title
     \nohyphens{ \@title }
  }
\end{minipage}%