Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.89 KB | None | 0 0
  1. % ****************************************************************************************** % Dissertation template and document class
  2. % ****************************************************************************************** %
  3.  
  4.  
  5. %%% For print copies
  6. %% set 'singlespace' option to set entire thesis to single space, and define "printmode" to remove all hyperlinks for printed copies of the thesis. Delete all output files before changing this mode -- it will turn hyperref package on and off
  7. %documentclass[12pt,lot, lof, singlespace]{puthesis}
  8. %newcommand{printmode}{}
  9.  
  10. %%% For the electronic copy, use doublespacing, define "proquestmode" to use outlined links, instead of colored links.
  11. documentclass[12pt,lot, lof]{puthesis}
  12. newcommand{proquestmode}{}
  13. % I prefer proquestmode to be off for electronic copies for normal use, since the colored links are less distracting. However when printed in black and white, the colored links are difficult to read.
  14.  
  15. %%% For early drafts without some of the frontmatter
  16. % Also see the "ifodd" command below to disable more frontmatter
  17. %documentclass[12pt]{puthesis}
  18.  
  19. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  20. %%%% Author & title page info
  21.  
  22. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  23. %%%% Tweak float placements
  24.  
  25. % Alter some LaTeX defaults for better treatment of figures:
  26. % See p.105 of "TeX Unbound" for suggested values.
  27. % See pp. 199-200 of Lamport's "LaTeX" book for details.
  28. % General parameters, for ALL pages:
  29. renewcommand{topfraction}{0.85} % max fraction of floats at top
  30. renewcommand{bottomfraction}{0.6} % max fraction of floats at bottom
  31. % Parameters for TEXT pages (not float pages):
  32. setcounter{topnumber}{2}
  33. setcounter{bottomnumber}{2}
  34. setcounter{totalnumber}{4} % 2 may work better
  35. setcounter{dbltopnumber}{2} % for 2-column pages
  36. renewcommand{dbltopfraction}{0.66} % fit big float above 2-col. text
  37. renewcommand{textfraction}{0.15} % allow minimal text w. figs
  38. % Parameters for FLOAT pages (not text pages):
  39. renewcommand{floatpagefraction}{0.66} % require fuller float pages
  40. % N.B.: floatpagefraction MUST be less than topfraction !!
  41. renewcommand{dblfloatpagefraction}{0.66} % require fuller float pages
  42.  
  43. % The documentclass already sets parameters to make a high penalty for widows and orphans.
  44.  
  45. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  46. %%%% Use packages
  47.  
  48. %usepackage{amsfonts}
  49. usepackage{amsmath}
  50.  
  51. %%% For figures
  52. usepackage{graphicx}
  53. %usepackage{subfig,rotate}
  54.  
  55. %%% for comments
  56. usepackage{verbatim}
  57.  
  58. %%% For tables
  59. usepackage{multirow}
  60. % Longtable lets you have tables that span multiple pages.
  61. usepackage{longtable}
  62. usepackage{rotating}
  63. usepackage[section]{placeins}
  64. usepackage{caption}
  65.  
  66. % Booktabs produces far nicer tables than the standard LaTeX tables.
  67. usepackage{booktabs}
  68.  
  69. %set parameters for longtable:
  70. % default caption width is 4in for longtable, but wider for normal tables
  71. setlength{LTcapwidth}{textwidth}
  72.  
  73.  
  74.  
  75. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  76. %%% Printed vs. online formatting
  77. ifdefinedprintmode
  78.  
  79. % Printed copy
  80. % url package understands urls (with proper line-breaks) without hyperlinking them
  81. usepackage{url}
  82.  
  83.  
  84. else
  85.  
  86. ifdefinedproquestmode
  87. %ProQuest copy -- http://www.princeton.edu/~mudd/thesis/Submissionguide.pdf
  88.  
  89. % ProQuest requires a double spaced version (set previously). They will take an electronic copy, so we want links in the pdf, but also copies may be printed or made into microfilm in black and white, so we want outlined links instead of colored links.
  90. usepackage{hyperref}
  91. hypersetup{bookmarksnumbered}
  92.  
  93. % copy the already-set title and author to use in the pdf properties
  94. makeatletter
  95. hypersetup{pdftitle=@title,pdfauthor=@author}
  96. makeatother
  97.  
  98. else
  99. % Online copy
  100.  
  101. % adds internal linked references, pdf bookmarks, etc
  102.  
  103. % turn all references and citations into hyperlinks:
  104. % -- not for printed copies
  105. % -- automatically includes url package
  106. % options:
  107. % colorlinks makes links by coloring the text instead of putting a rectangle around the text.
  108. usepackage{hyperref}
  109. hypersetup{colorlinks,bookmarksnumbered}
  110.  
  111. % copy the already-set title and author to use in the pdf properties
  112. makeatletter
  113. hypersetup{pdftitle=@title,pdfauthor=@author}
  114. makeatother
  115.  
  116. % make the page number rather than the text be the link for ToC entries
  117. %hypersetup{linktocpage}
  118. fi % proquest or online formatting
  119. fi % printed or online formatting
  120.  
  121.  
  122. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  123. %%%% Define commands
  124.  
  125. % Define any custom commands that you want to use.
  126. % For example, highlight notes for future edits to the thesis
  127. %newcommand{todo}[1]{textbf{emph{TODO:}#1}}
  128.  
  129.  
  130. % create an environment that will indent text
  131. % see: http://latex.computersci.org/Reference/ListEnvironments
  132. % raggedright makes them left aligned instead of justified
  133. newenvironment{indenttext}{
  134. begin{list}{}{ itemsep 0in itemindent 0in
  135. labelsep 0in labelwidth 0in
  136. listparindent 0in
  137. topsep 0in partopsep 0in parskip 0in parsep 0in
  138. leftmargin 1em rightmargin 0in
  139. raggedright
  140. }
  141. item
  142. }
  143. {end{list}}
  144.  
  145. % another environment that's an indented list, with no spaces between items -- if we want multiple items/lines. Useful in tables. Use item inside the environment.
  146. % raggedright makes them left aligned instead of justified
  147. newenvironment{indentlist}{
  148. begin{list}{}{ itemsep 0in itemindent 0in
  149. labelsep 0in labelwidth 0in
  150. listparindent 0in
  151. topsep 0in partopsep 0in parskip 0in parsep 0in
  152. leftmargin 1em rightmargin 0in
  153. raggedright
  154. }
  155.  
  156. }
  157. {end{list}}
  158.  
  159.  
  160.  
  161. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  162. %%%% Front-matter
  163.  
  164. % For early drafts, you may want to disable some of the frontmatter. Simply change this to "ifodd 1" to do so.
  165. ifodd 0
  166. % front-matter disabled while writing chapters
  167. renewcommand{maketitlepage}{}
  168. renewcommand*{makecopyrightpage}{}
  169. renewcommand*{makeabstract}{}
  170.  
  171. % you can just skip the acknowledgements and dedication commands to leave out these sections.
  172.  
  173. else
  174.  
  175.  
  176. abstract{
  177. % Abstract can be any length, but should be max 350 words for a Dissertation for ProQuest's print indicies (150 words for a Master's Thesis) or it will be truncated for those uses.
  178. input{abstract}
  179. }
  180.  
  181. acknowledgements{
  182. %I would like to thank...
  183. input{acknowledgements}
  184. }
  185.  
  186. dedication{To my parents.}
  187.  
  188. fi % disable frontmatter
  189.  
  190.  
  191. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  192. %%%% Hide some chapters
  193.  
  194. %%% If you want to produce a pdf that includes only certain chapters, specify them with includeonly, in addition to including all chapters below.
  195. %includeonly{ch-intro/chapter-intro}
  196. %%% You can also specify multiple chapters.
  197. %includeonly{ch-intro/chapter-intro,ch-usage/chapter-usage}
  198. %includeonly{chap1,chap2,chap3}
  199.  
  200.  
  201. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  202. %%%% Notes:
  203.  
  204. % Footnotes should be placed after punctuation.footnote{place here.}
  205. % Generally, place citations before the period~cite{anotherauthor}.
  206. % The proper usage for i.e., and e.g., include commas ``(e.g., option A, option B)''
  207.  
  208. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  209. %%%% Import chapters
  210.  
  211. begin{document}
  212.  
  213. makefrontmatter
  214.  
  215. % If you've disabled frontmatter, you can insert the toc manually
  216. %tableofcontentsclearpage
  217.  
  218. % include lets us split up the document (and each include starts a new page):
  219. include{ch-intro/chapter-intro}
  220.  
  221. include{ch-pastwork/chapter-pastwork}
  222.  
  223. %include{ch-usage/chapter-usage}
  224. %include{ch-conclusion/chapter-conclusion}
  225. %appendix % all chapters following will be labeled as appendices
  226. %include{ch-appendicies/implementation}
  227. %include{ch-appendicies/printing}
  228.  
  229.  
  230. % Make the bibliography single spaced
  231. singlespacing
  232. bibliographystyle{plain}
  233.  
  234. % add the Bibliography to the Table of Contents
  235. cleardoublepage
  236. ifdefinedphantomsection
  237. phantomsection % makes hyperref recognize this section properly for pdf link
  238. else
  239. fi
  240. addcontentsline{toc}{chapter}{Bibliography}
  241.  
  242. % include your .bib file
  243. bibliography{thesis}
  244.  
  245. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement