Make CC specific to CC-by-sa v3.0 0.4
authorW. Trevor King <wking@drexel.edu>
Tue, 23 Feb 2010 14:02:56 +0000 (09:02 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 23 Feb 2010 14:07:41 +0000 (09:07 -0500)
1  2 
drexel-thesis.dtx

diff --combined drexel-thesis.dtx
index 7f7869e76689b81f98c4d634c8db6fda40d5e162,3a9bb1df36a810768cbc900761c559f2026e7b20..cdad70985b26a252a72142b2ddc2da945ba1a3f7
@@@ -1,8 -1,8 +1,8 @@@
--% \def\fileversion{0.3}
--% \def\filedate{2010/01/13}
++% \def\fileversion{0.4}
++% \def\filedate{2010/02/23}
  % \iffalse meta-comment
--%<class>\def\fileversion{0.3}
--%<class>\def\filedate{2010/01/13}
++%<class>\def\fileversion{0.4}
++%<class>\def\filedate{2010/02/23}
  %
  % Copyright (C) 2010  C.Y. Ip
  %                     Christopher D. Cera
  %   \Lopt{mydraftwatermark} & It's good to have a timestamp. \\
  % \end{tabular}
  %
+ % \DescribeOption{subfig}
+ % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/}{\pkg{subfig}}
+ % makes it easy to include and caption multi-part figures.  However,
+ % getting \pkg{subfig} to cooperate with \pkg{floatrow} and
+ % \pkg{tocloft} can be tricky.  If you want to use \pkg{subfig}, just
+ % pass the \Lopt{subfig} option to \cls{drexel-thesis}, and all the
+ % pesky details will be taken care of.  See Section
+ % \ref{sec:better-example} for an example.
+ %
  % \DescribeOption{finalspace}
  % Loosen spacing.
  %
  % options set all of the types.  For example, \Lopt{boldtoc} is
  % equivalent to \Lopt{boldchapter,boldpart}.
  %
+ % \DescribeOption{indenttoc}
+ % The example table of contents in the Manual p17 does not indent
+ % section entries, etc., so neither does \cls{drexel-thesis}.  If you
+ % \emph{do} want pretty, indented TOCs, like the \LaTeX\ defaults pass
+ % \Lopt{indenttoc} to \cls{drexel-thesis}.
+ %
  % \DescribeOption{draftwatermark}
  % \Lopt{draftwatermark} adds ``DRAFT \meta{date}'' watermarks to each
  % page.  A useful way to remember that the version you're looking at
  % See the Manual 3.2 p9.
  %
  % \begin{command}
 -%   `\cs{copyrighttextCC}'
 +%   `\cs{copyrighttextCCBYSA}'
  % \end{command}
  % There are a number of predefined copyright messages for ease of use \\
  % \begin{tabular}{l l}
 -%   |\copyrighttextCC| & Creative Commons copyright \\
 +%   |\copyrighttextCCBYSA| &
 +%     Creative Commons Attribution-ShareAlike License Version 3.0.\\
  % \end{tabular}
  %
  % \begin{command}
  %      \caption{Some caption text}
  %   \end{float}
  % \end{example}
- % For more useful float information, see the
+ % For more useful float information, see the examples in Section
+ % \ref{sec:better-example-part} and the
  % \href{http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions}
  %   {\LaTeX\ wikibook page}.
- % 
+ %
  %
  % \subsubsection{Citations}
  %
  %
  % \subsubsection{References}
  %
+ % Easier cross referencing with
  % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/cleveref/}{\pkg{cleveref}}.
- % Is a wonderful tool for easy, consistent crosslinking.  The manual is also very good.
+ % Is a wonderful tool for easy, consistent crosslinking via |\cref|,
+ % |\Cref|, etc..  The manual is also very good.
+ % Note that if you use |\part|s in your document, you need to tell
+ % \pkg{cleveref} how to deal with them:
+ % \begin{example}
+ %   \usepackage{cleveref}
+ %   \crefname{part}{part}{parts}
+ % \end{example}
  %
  %
  % \subsubsection{Hyperlinks}
  % set options overriding these defaults.
  %
  %
+ % \subsubsection{Developing large \LaTeX\ documents}
+ %
+ % A thesis may take a while to compile, especially if it contains
+ % lots of images, etc..  One way to save time, is to use |\includeonly|
+ % when including chapter \file{*.tex} files (see
+ % \href{http://en.wikibooks.org/wiki/TeX/includeonly}{the \TeX\ Wikibook}).
+ % Usage would be something like
+ % \begin{example}
+ % \documentclass{drexel-thesis}
+ % ...
+ % \includeonly{chapter2.tex,chapter3.tex}
+ % \begin{document}
+ % ...
+ % \begin{thesis}
+ % \include{chapter1.tex}
+ % \include{chapter2.tex}
+ % \include{chapter3.tex}
+ % \include{chapter4.tex}
+ % \end{thesis}
+ % ...
+ % \end{document}
+ % \end{example}
+ % which would only compile chapters two and three.  Don't confuse the
+ % similar commands |\include| and |\input|.  The more fundamental
+ % |\input| just inserts the file contents at that point, while
+ % |\include|
+ % \begin{itemize}
+ %   \item may only be used after |\begin{document}|
+ %   \item acts like |\clearpage \input{} \clearpage|
+ %   \item will not crash on nonexistent files
+ % \end{itemize}
+ %
+ %
  % \StopEventually{\pagebreak\PrintChanges}
  %
  %
  % Define some booleans to store option states
  %    \begin{macrocode}
  \newif\if@mainmatter \@mainmattertrue
+ \newif\if@DUT@subfigopt
  \newif\if@dottedchapter 
  \newif\if@boldchapter
  \newif\if@boldpart
  \newif\if@dottedpart
+ \newif\if@indenttoc
  \newif\if@draftwatermark
  \newif\if@mydraftwatermark
  \newif\if@indentfirst
  \newif\if@final \@finalfalse
  %    \end{macrocode}
  %
+ % \begin{option}{subfig}
+ % Set \Lopt{subfig} flag
+ %    \begin{macrocode}
+ \DeclareOptionX{subfig}{\@DUT@subfigopttrue}
+ %    \end{macrocode}
+ % \end{option}
+ %
  % \begin{option}{finalspace}
  %    \begin{macrocode}
  \DeclareOptionX{finalspace}{
  % \begin{option}{dottedchapter}
  %    \begin{macrocode}
  \DeclareOptionX{dottedchapter}{\@dottedchaptertrue}
- %    \end{macrocode}
+ %    \end{macrocode}1
  % \end{option}
  % \begin{option}{boldpart}
  %    \begin{macrocode}
  %    \end{macrocode}
  % \end{option}
  %
+ % \begin{option}{indenttoc}
+ % Set \Lopt{indenttoc} flag
+ %    \begin{macrocode}
+ \DeclareOptionX{indenttoc}{\@indenttoctrue}
+ %    \end{macrocode}
+ % \end{option}
+ %
  % \begin{option}{draftwatermark}
  % Set \Lopt{draftwatermark} flag
  %    \begin{macrocode}
  % Typeset the table of contents, etc., with
  % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/}{\pkg{tocloft}}.
  %    \begin{macrocode}
- \RequirePackage{tocloft}
+ \if@DUT@subfigopt
+   \RequirePackage[subfigure]{tocloft}
+ \else
+   \RequirePackage{tocloft}
+ \fi
  %    \end{macrocode}
+ % The \Lopt{subfigure} option sets up \pkg{tocloft} for
+ % \pkg{subfig}/\pkg{subfigure} compatibility. See the
+ % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf}{%
+ %   \pkg{tocloft} manual, Section 2.1}
+ % for details.
+ %
  % The configuration of \pkg{tocloft} takes place in Sections
  % \ref{sec:implement-toc}, \ref{sec:implement-lof}, and
  % \ref{sec:implement-lot}.
  \floatsetup{captionskip=10pt}
  \floatsetup[table]{captionskip=10pt}
  %    \end{macrocode}
+ % Use \pkg{fr-subfig} for \pkg{floatrow}/\pkg{subfig} compatibility.
+ % See the \pkg{floatrow} documentation (Sec.~7.1, ``The \pkg{subfig}
+ % package'') and \pkg{subfig} documentation (Sec.~4.3,
+ % ``\pkg{FloatRow} Package'') for details.
+ %    \begin{macrocode}
+ \if@DUT@subfigopt
+   \RequirePackage{fr-subfig}
+ \fi
+ %    \end{macrocode}
  % We set up the three-line surrounding spaces in Section
  % \ref{sec:implement-floats}.
  %
  % won't need to.
  %
  %
+ % \subsubsection{\pkg{subfig}}
+ % \label{sec:subfig}
+ %
+ % Allow multi-part figures with
+ % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/}{\pkg{subfig}}.
+ %    \begin{macrocode}
+ \if@DUT@subfigopt
+   \RequirePackage{subfig}
+ \fi
+ %    \end{macrocode}
+ %
+ %
  % \subsubsection{\pkg{fancyhdr}}
+ % \label{sec:fancyhdr}
  %
  % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/}{\pkg{fancyhdr}}
  % for correct page numbering and fancy headers.
  %    \begin{macrocode}
  \pagestyle{fancy}
  \fancyhf{}
+ %    \end{macrocode}
+ % Turn off the header rule by setting its width to $0$.
+ %    \begin{macrocode}
  \renewcommand{\headrulewidth}{0pt}
  %    \end{macrocode}
  % 0.4 pt is \pkg{fancyhdr}'s default |\headrulewidth|, so we'll
  }
  %    \end{macrocode}
  %
+ % Note that the Chapter / Section footer is not required.  You can
+ % remove the footer text and rule entirely with.
+ % \begin{example}
+ %   \renewcommand{\footrulewidth}{0pt}
+ %   \fancyfoot[RE,LO]{}
+ %   \fancyfoot[LE,RO]{}
+ % \end{example}
+ %
  %
  % \subsubsection{\pkg{ifpdf}}
  %
  %    \end{macrocode}
  % \end{macro}
  %
 -% \begin{macro}{\copyrighttextCC}
 -% The Creative Commons license.
 +% \begin{macro}{\copyrighttextCCBYSA}
 +% The Creative Commons Attribution-ShareAlike License.
++% \changes{0.4}{2010/02/23}{W.~Trevor King renamed from
++% \\copyrighttextCC, and made specific to Creative Commons
++% Attribution-ShareAlike Version 3.0.}
  %    \begin{macrocode}
 -\newcommand\copyrighttextCC{
 +\newcommand\copyrighttextCCBYSA{
    \begin{quote}
      This work is licensed under the terms of the Creative Commons
 -    Attribution-ShareAlike license.  The license is available at \\
 +    Attribution-ShareAlike license Version 3.0.  The license is
 +    available at \\
      \url{http://creativecommons.org/licenses/by-sa/3.0/}.
    \end{quote}
  }
  % \end{macro}
  % \end{macro}
  %
+ % The default indents above are all |0pt|.  If \Lopt{indenttoc} was
+ % given, override this, restoring the \pkg{tocloft} defaults, see the
+ % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf}{%
+ %   \pkg{tocloft} manual, Table 1}.
+ %    \begin{macrocode}
+ \if@indenttoc
+   \cftsetindents{chapter}{0pt}{1.5em}
+   \cftsetindents{section}{1.5em}{2.3em}
+   \cftsetindents{subsection}{3.8em}{3.2em}
+   \cftsetindents{subsubsection}{7.0em}{4.1em}
+ \fi
+ %    \end{macrocode}
+ %
  %
  % \subsubsection{List of figures}
  % \label{sec:implement-lof}
  % \end{macro}
  %
  % \subsubsection{Words}
+ % \label{sec:words}
  %
  % Set the official names of the various sections encountered.  Some of
  % these are not defined in \file{classes.dtx} but are close analogs of
  %     \begin{macrocode}
  %<*example|example-draft>
  %% See drexel-thesis.pdf for details.
- %<example>\documentclass{drexel-thesis}
- %<example-draft>\documentclass[draft]{drexel-thesis}
+ %<example>\documentclass[subfig]{drexel-thesis}
+ %<example-draft>\documentclass[draft,subfig]{drexel-thesis}
  
  %% Enter the appropriate information here
  \author{Johny Henry}
  \advisor{Collis Potter Huntington, R.R.D.}
  \advisor{Advisor 2, Ph.D.}
  \advisor{Advisor 3, Ph.D.}
 -\copyrighttext{\copyrighttextCC}
 +\copyrighttext{\copyrighttextCCBYSA}
  
  \usepackage[super,sort&compress]{natbib} % fancy citation extensions
  \bibliographystyle{unsrtnat}
  \usepackage{fancyvrb} % nicer verbatim handling
  \DefineShortVerb{\|}  % \verb+TEXT+  ->  |TEXT|
  
- \usepackage{blabla} % \blabla macro for producing dummy output
+ %     \end{macrocode}
+ % Use
+ % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/blindtext/}{\pkg{blindtext}}
+ % for dummy text creation.  \pkg{blindtext} requires
+ % \href{}{\pkg{babel}}.
+ %     \begin{macrocode}
+ \usepackage[english]{babel} % English blindtext
+ \usepackage{blindtext} % macros for producing dummy output
+ %     \end{macrocode}
+ % \pkg{babel} messes with some of our words (Section \ref{sec:words}), so
+ % we have to reset them.  See the
+ % \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}{\TeX\ FAQ}
+ % for details.
+ %     \begin{macrocode}
+ \addto\captionsenglish{%
+   \renewcommand\dedicationsname{Dedications}%
+   \renewcommand\acknowledgmentsname{Acknowledgments}%
+   \renewcommand\contentsname{Table of Contents}%
+   \renewcommand\listtablename{List of Tables}%
+   \renewcommand\listfigurename{List of Figures}%
+   \renewcommand\abstractname{Abstract}%
+   \renewcommand\bibname{Bibliography}%
+   \renewcommand\appendixname{Appendix}%
+   \renewcommand\vitaname{Vita}%
+ }
  
  \begin{document}
  \begin{preamble}
  
  \begin{dedications}
- \blabla{10}{20}
+ \Blindtext{10}{10}
  \end{dedications}
  
  \begin{acknowledgments}
- \blabla{10}{20}
+ \Blindtext{10}{10}
  \end{acknowledgments}
  
  \tableofcontents
  \listoffigures
  
  \begin{abstract}
- \blabla{10}{20}
+ \Blindtext{10}{10}
  \end{abstract}
  \end{preamble}
  
  \include{example-a}
  
  \begin{vita}
- \blabla{10}{20}
+ \Blindtext{10}{10}
  \end{vita}
  
  \end{document}
  %
  %
  % \subsubsection{Part}
+ % \label{section:better-example-part}
  %
  %     \begin{macrocode}
  %<*example-part>
@@@ -2808,7 -2961,7 +2966,7 @@@ Here we have a text citation \citet{rie
  parenthetical citation\citep{rief97}.
  
  \subsubsection{Tables and Figures}
- \blabla{2}{20}
+ \Blindtext{2}{20}
  \begin{table}
    \begin{center}
    \begin{tabular}{r@{.}l r@{.}l r@{.}l}
      30&0 & 11&9 & 10&1 \\
      \ldots
    \end{tabular}
-   \caption{A table float. \bla{20}}  % low caption allowed with floatrow
+   \caption{A table float.} %\blindtext{20}}  % low caption allowed with floatrow
  %% Note the strange |r@{.}l| notation in the |\tabular| column
  %% definition.  This allows for numbers aligned at the decimal point
  %% (see \href{http://www.stat.unipg.it/tex-man/ltx-68.html}{here}).
  %% to span the pre- and post-decimal columns.
    \end{center}
  \end{table}
- \blabla{5}{20}
+ \Blindtext{5}{20}
  \begin{figure}
-   \caption{A figure float. \bla{20}} % high caption allowed with floatrow
+   \caption{A figure float. \blindtext{20}} % high caption allowed with floatrow
    \begin{center}
      \includegraphics[width=0.4\textwidth]{drexel-logo}
    \end{center}
  \end{figure}
- \blabla{10}{20}
+ \Blindtext{10}{20}
+ \begin{figure}
+   \begin{center}
+     \subfloat[][]{%
+       \includegraphics[width=0.2\textwidth]{drexel-logo}%
+       \label{fig:sub-a}}
+     \subfloat[][]{%
+       \includegraphics[width=0.2\textwidth]{drexel-logo}%
+       \label{fig:sub-b}}
+     \caption{(a) One subfig float. (b) Another subfig float.%
+       \label{fig:both}}
+   \end{center}
+ \end{figure}
+ You can reference the subfig floats individually (\ref{fig:sub-a}) or
+ together (\ref{fig:both}).
+ \Blindtext{10}{20}
  
  \part{Another Part}
  \chapter{Another Chapter}
- \blabla{30}{20}
+ \Blindtext{30}{20}
  \chapter{A Long Title Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla
  Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla}
- \blabla{30}{20}
+ \Blindtext{30}{20}
  %</example-part>
  %    \end{macrocode}
  %
  %    \begin{macrocode}
  %<*example-appendix>
  \chapter{Some Appendix Heading}
- \blabla{10}{20}
+ \Blindtext{10}{20}
  \chapter{Another Appendix Heading}
- \blabla{10}{20}
+ \Blindtext{10}{20}
  %</example-appendix>
  %    \end{macrocode}
  %
  %
- % \subsubsection{\pkg{blabla}}
- %
- % Define the \pkg{blabla} package for generating dummy text.  This
- % will make it easier to generate reasonable exampes.
- %    \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]
- \newcounter{blabla@i}
- \newcounter{blabla@j}
- \newcommand{\bla}[1]{
-    Bla
-   \forloop{blabla@i}{0}{\value{blabla@i} < #1}{ bla }
-   bla.
- }
- \newcommand{\blabla}[2]{
-   \forloop{blabla@j}{0}{\value{blabla@j} < #1}{ \bla{#2}\par }
- }
- %</blabla>
- %    \end{macrocode}
- %
- %
  % \section{Known bugs and issues}
  %
  %
  % \begin{itemize}
  %   \item Different space between chapter heading and section heading,
  %     vs.\ chapter heading and text.  Compare \emph{A Chapter Heading}
- %     and \emph{Another Chapter} in \file{example.pdf}.
+ %     and \emph{Another Chapter} in \file{example.pdf}.  This is a
+ %     problem (although with opposite order) in the \cls{book} class
+ %     itself.  For example, compile
+ %     \begin{example}
+ %\documentclass{book}
+ %\begin{document}
+ %\chapter{Chapter with text}
+ %Bla bla bla.
+ %\chapter{Chapter with section}
+ %\section{Section}
+ %Bla bla bla.
+ %\end{document}
+ %     \end{example}
+ %   \item Footer overlap if chapter/section names are particularly long.
+ %     See \emph{Section in long-titled chapter} in \file{example.pdf}.
+ %     Workaround: turn off sections in the footer:
+ %     \begin{example}
+ %       \fancyfoot[RE,LO]{\scshape\leftmark}
+ %       \fancyfoot[LE,RO]{}
+ %     \end{example}
+ %     For more header or footer manipulation ideas, see Section \ref{sec:fancyhdr}.
  % \end{itemize}
  %
  %