X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=drexel-thesis.dtx;h=b3d470d3273cf2474a3111dc4564d384f8eff6e2;hb=c0649e9e8778aad83f79dae66a2713309d569866;hp=666aaefc8dc0b2753f9012457b8e194dfb3cc7c9;hpb=12ee6441cd6cc9df8822760fc49d2626470b6fcf;p=drexel-thesis.git diff --git a/drexel-thesis.dtx b/drexel-thesis.dtx index 666aaef..b3d470d 100644 --- a/drexel-thesis.dtx +++ b/drexel-thesis.dtx @@ -196,6 +196,9 @@ % is not final. Also helps reviewers tell you what version they're % correcting. % +% \DescribeOption{indentfirst} +% \Lopt{indentfirst} indents the first paragraph after sections etc. +% % % \subsubsection{Interesting \cls{book} options} % @@ -559,6 +562,7 @@ \newif\if@boldpart \newif\if@dottedpart \newif\if@draftwatermark +\newif\if@indentfirst \newif\if@appendix \newif\if@final \@finalfalse % \end{macrocode} @@ -630,12 +634,19 @@ % \end{option} % % \begin{option}{draftwatermark} -% Set draft watermark flag +% Set \Lopt{draftwatermark} flag % \begin{macrocode} \DeclareOptionX{draftwatermark}{\@draftwatermarktrue} % \end{macrocode} % \end{option} % +% \begin{option}{indentfirst} +% Set \Lopt{indentfirst} flag +% \begin{macrocode} +\DeclareOptionX{indentfirst}{\@indentfirsttrue} +% \end{macrocode} +% \end{option} +% % Define the book options that \Lopt{final} and \Lopt{draft} need to % access. % \begin{option}{oneside} @@ -692,7 +703,7 @@ % % \subsection{Internal package includes} % - +% % Include some other packages we'll need. If the package is not % installed on your system, see Section \ref{sec:dependencies} for % installation instructions. @@ -711,6 +722,7 @@ \RequirePackage{setspace} % \end{macrocode} % +% % \subsubsection{\pkg{calc}} % % \href{http://www.ctan.org/tex-archive/macros/latex/required/tools/}{\pkg{calc}} @@ -719,6 +731,7 @@ \RequirePackage{calc} % \end{macrocode} % +% % \subsubsection{\pkg{graphicx}} % % \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}} @@ -740,6 +753,7 @@ % [final] % \end{example} % +% % \subsubsection{\pkg{draftmark}} % % The Comp.~Sci.\ class used @@ -751,10 +765,10 @@ % which unfortunately has a number of apparently non-standard dependencies % (\href{http://www.ctan.org/tex-archive/macros/latex/contrib/etextools/}{\pkg{etextools}}, % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/etoolbox/}{\pkg{etoolbox}}, -% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xifthen/}{\pkg{xifthen}}, +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/lastpage/}{\pkg{lastpage}}, % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/ltxnew/}{\pkg{ltxnew}}, % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/pagerange/}{\pkg{pagerange}}, -% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/lastpage/}{\pkg{lastpage}}, +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xifthen/}{\pkg{xifthen}}, % if only I had the space to install |texlive-latexextra| |:p|). % The output is, however, very flexible, and it \emph{does} work with % both \LaTeX\ and pdf\LaTeX. If you don't like the default watermark, @@ -766,6 +780,16 @@ \fi % \end{macrocode} % +% +% \subsubsection{\pkg{indentfirst}} +% +% \begin{macrocode} +\if@indentfirst + \RequirePackage{indentfirst} +\fi +% \end{macrocode} +% +% % \subsubsection{\pkg{geometry}} % % Setup page margins with the @@ -786,29 +810,52 @@ % Note that we include the \pkg{geometry} package after loading \cls{book} to % override the margin manipulation that takes place in \cls{book}. % +% % \subsubsection{\pkg{fancyhdr}} % % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/}{\pkg{fancyhdr}} % for correct page numbering and fancy headers. +% From the Manual 2.3 p5, ``Pagination'' +% \begin{quote} +% Place page numbers in the upper right-hand corner of the page, +% 3/4'' from the top. +% \end{quote} % \begin{macrocode} \RequirePackage{fancyhdr} % \end{macrocode} -% Setup the standard |fancy| format. |\leftmark| is the higher level -% mark, see |\chaptermark| below. |\rightmark| is the lower level -% mark, see |\sectionmark| below. +% Setup the standard |fancy| format. % \begin{macrocode} \pagestyle{fancy} \fancyhf{} -\fancyhead[LE,RO]{\slshape\rightmark} -\fancyhead[LO,RE]{\slshape\leftmark} -\fancyfoot[LE,RO]{\thepage} +\renewcommand{\headrulewidth}{0pt} +% \end{macrocode} +% 0.4 pt is \pkg{fancyhdr}'s default |\headrulewidth|, so we'll +% recycle the value. +% \begin{macrocode} +\renewcommand{\footrulewidth}{0.4pt} % \end{macrocode} -% Override the |plain| format (for chapter pages, etc.). +% |\leftmark| is the higher level mark, see |\chaptermark| below. +% |\rightmark| is the lower level mark, see |\sectionmark| below. +% We put the lower level mark to the outside because it changes more +% often. Page numbers also go on the outside. +% \begin{macrocode} +\fancyfoot[RE,LO]{\slshape\leftmark} +\fancyfoot[LE,RO]{\slshape\rightmark} +\fancyhead[LE,RO]{\thepage} +% \end{macrocode} +% Override the |plain| format (for part pages, etc.). % \begin{macrocode} \fancypagestyle{plain}{ \fancyhf{} - \renewcommand{\headrulewidth}{0pt} - \fancyfoot[LE,RO]{\thepage} + \renewcommand{\footrulewidth}{0pt} + \fancyhead[LE,RO]{\thepage} +} +% \end{macrocode} +% Keep the |empty| format at its default. +% \begin{macrocode} +\fancypagestyle{empty}{ + \fancyhf{} + \renewcommand{\footrulewidth}{0pt} } % \end{macrocode} % @@ -1486,7 +1533,14 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\chaptermark} +% \begin{macro}{\schaptermark} +% Setup unnumbered chapter marks for \pkg{fancyhdr}. +% \begin{macrocode} +\newcommand\schaptermark[1]{\markboth{\MakeUppercase{#1}}{}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sectionmark} % Setup space rather than period separated section marks. % (\file{classes.dtx}, L2054) % \begin{macrocode} @@ -1801,12 +1855,14 @@ % \end{macro} % % \begin{macro}{\@schapter} -% We don't have to worry about |\@schapter|, since it is very simple. -% In onecolumn mode it's just +% This macro is called when we have an unnumbered chapter. We drop +% \file{classes.dtx}'s \Lopt{twocolumn} code and set marks for +% \pkg{fancyhdr}. % (\file{classes.dtx}, L2582). % \begin{macrocode} -%\def\@schapter#1{\@makeschapterhead{#1}% -% \@afterheading} +\def\@schapter#1{\schaptermark{#1}% + \@makeschapterhead{#1}% + \@afterheading} % \end{macrocode} % \end{macro} % @@ -2928,8 +2984,15 @@ parenthetical citation\citep{rief97}. % \begin{macrocode} %<*blabla> \ProvidesPackage{blabla} [2010/01/11 1.0 Dummy text generation] +% \end{macrocode} +% Use +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/forloop/}{\pkg{foorloop}} +% for +% \begin{command} +% `\cs{forloop}\oarg{step}\marg{counter}\marg{initial value}\marg{condition}\marg{code}' +% \end{command} +% \begin{macrocode} \RequirePackage{forloop}[2006/09/18] -%% http://www.ctan.org/tex-archive/macros/latex/contrib/forloop/ \newcounter{blabla@i} \newcounter{blabla@j}