Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 16.72 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %% LaTeX document class: cseethesis.cls
  3. %% Licentiate or doctoral thesis style file,
  4. %% Luleå Univ. of Tech., Sweden.
  5. %%
  6. %% Created by: Johan E. Carlson, November 5, 2002, originally named
  7. %%             eisthesis.cls
  8. %%
  9. %% Derived from the Standard LaTeX Book document class.
  10. %%
  11. %% This document class is free to use, copy, distribute,
  12. %% and modify, as long as reference to the original author
  13. %% is given.
  14. %%
  15. %% Last modified by: Johan E. Carlson, June 7, 2009.
  16. %%
  17. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  18. %%
  19. %% Revisions (see example document for more information)
  20. %% -------------------------------------------------------
  21. %%   April 7, 2004:
  22. %%      Removed '\ifnum' error
  23. %%      Removed conflict between this template and the
  24. %%        amsmath package.
  25. %%   November 17, 2004:
  26. %%      Corrected float-to-text separation error.
  27. %%   November 19, 2004:
  28. %%      Included support for EU logo and pdfLaTeX/LaTeX
  29. %%      class options.
  30. %%   February 22, 2005:
  31. %%      Major bug fixes (see example document)
  32. %%   January 17, 2007:
  33. %%      See example document.
  34. %%   January 19, 2007:
  35. %%      See example document.
  36. %%   January 25, 2009:
  37. %%      See example document
  38. %%   February 2, 2009
  39. %%   March 5, 2009
  40. %%   June 7, 2009
  41. %%   September 1, 2010
  42. %%  
  43. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  44.  
  45. % ******************************************************
  46. % Identification
  47. % ******************************************************
  48. \def\classversion{3.1}
  49. \def\classdate{September 1, 2010}
  50.  
  51. \typeout{Document class version: \classversion}
  52. \typeout{Last modified: \classdate}
  53. \NeedsTeXFormat{LaTeX2e}
  54. \ProvidesClass{cseethesis}
  55.  
  56. % ******************************************************
  57. % Declare Options
  58. % ******************************************************
  59. % Do not know how to handle other options and therefore
  60. % just pass them on to 'book'
  61. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
  62.  
  63. % ******************************************************
  64. % Process Options
  65. % ******************************************************
  66. \ProcessOptions*
  67.  
  68. % ******************************************************
  69. % Load Used Packages and Classes
  70. % ******************************************************
  71. \LoadClass{book}
  72. \RequirePackage{graphicx}
  73. \RequirePackage{fancyhdr}
  74. \RequirePackage{amsmath}
  75. \RequirePackage{amsfonts}
  76. \RequirePackage{amssymb}
  77. \RequirePackage{ifthen}
  78. \RequirePackage[sectionbib]{bibunits}
  79. \usepackage[utf8]{inputenc}
  80. \usepackage{url}
  81. \usepackage{amsthm}
  82. %\RequirePackage[latin1]{inputenc}
  83. \RequirePackage{titletoc}
  84.  
  85. % ******************************************************
  86. % Start defining and redefining old book style stuff
  87. % ******************************************************
  88.  
  89. \setlength{\topmargin}{0in}
  90. \setlength{\textwidth}{6.25in}
  91. \setlength{\textheight}{8.75in}
  92. \setlength{\evensidemargin}{-4.5mm}
  93. \setlength{\oddsidemargin}{5.5mm}
  94. \setcounter{tocdepth}{1}
  95. \setcounter{topnumber}{2}
  96. \setcounter{totalnumber}{3}
  97. \renewcommand{\thechapter}{\arabic{chapter}}
  98. \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
  99. \renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.
  100.                              \arabic{subsection}}
  101. \renewcommand{\thesubsubsection}{\arabic{chapter}.\arabic{section}.
  102.                                 \arabic{subsection}.\arabic{subsubsection}}
  103. \renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
  104. \renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
  105. \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
  106. \renewcommand{\topfraction}{.95}
  107. \renewcommand{\textfraction}{.05}
  108. \renewcommand{\floatpagefraction}{.75}
  109. \renewcommand{\jot}{.6\baselineskip}
  110. \setlength{\intextsep}{24pt}
  111. \setlength{\headheight}{15pt}
  112.  
  113. \newcommand{\ischapter}{1} % 1=chapters, 0=papers (used in contents page generation)
  114.  
  115. %----------------------------------------------
  116. % Make chapter headings look nice
  117. %----------------------------------------------
  118. \def\@chapter[#1]#2{
  119.      \refstepcounter{chapter}
  120.    {\ifthenelse{\equal{\ischapter}{1}}
  121.       {
  122.               \addcontentsline{toc}{chapter}{{\sc\chaptername}\space%
  123.                 \textnormal{\thechapter\space--} \sc #1}%
  124.        }
  125.        {
  126.           \addcontentsline{toc}{chapter}{{\sc\chaptername}\space%
  127.                 \textnormal{\thechapter} \sc #1}%
  128.        }
  129.     }
  130.      \chaptermark{#1}
  131.    \@makechapterhead{#2}%
  132.     %\@afterheading%                % No indendation of first row after heading
  133. }
  134.  
  135. \def\@makechapterhead#1{%
  136.   {\parindent \z@ \raggedleft
  137.    \reset@font
  138.    \vspace*{2cm}
  139.    \hrule
  140.    \vspace*{8\p@}%
  141.     \par
  142.     \Large {\Huge{\sc\@chapapp{}}\textnormal{\space\thechapter}}
  143.    \par\nobreak
  144.    \vspace*{8\p@}%
  145.     \par
  146.     \vspace*{1\p@}%
  147.     \hrule
  148.     \vspace*{8\p@}
  149.    \parbox{12.5cm}
  150.     {
  151.       \begin{flushright}
  152.          \Huge \textnormal{#1}\par\nobreak
  153.       \end{flushright}
  154.     }
  155.    \vskip 50\p@
  156.  }
  157. }
  158.  
  159. % ------------------------------------------
  160. % Make figure captions \it and \small
  161. % ------------------------------------------
  162. \long\def\@makecaption#1#2{
  163.  \vskip\abovecaptionskip
  164.  \sbox\@tempboxa{\small{\it{#1: #2}}}
  165.  \ifdim \wd\@tempboxa >\hsize
  166.    \small{\it{#1: #2\par}}
  167.  \else
  168.    \global \@minipagefalse
  169.    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}
  170.  \fi
  171.  \vskip\belowcaptionskip}
  172.  
  173. % ------------------------------------------
  174. % The \startpreamble command.
  175. % Generates all the stuff before the first
  176. % "real" chapter starts, like Abstract,
  177. % Title page, TOC, etc..
  178. % ------------------------------------------
  179. \newcommand{\startpreamble}[8]
  180. {
  181.  \pagestyle{plain}
  182.  \thispagestyle{empty}
  183.  
  184.   %--- Make title page
  185.   \setcounter{page}{1}
  186.  \pagenumbering{roman}
  187.  \begin{center}
  188.     \vspace{1cm} \mbox{}\hrulefill \mbox{}\\[2.5cm]
  189.     {\Huge \textbf{#1\\[3cm]}}
  190.     {\LARGE \textbf{#2}}\\[20mm]
  191.     {\large #3} \vfill
  192.     {\large \mbox{}\hrulefill\mbox{}\\[10mm]
  193.      \textbf{\supervisorstring}\\[3mm]#4\\[12mm]}
  194.     #8
  195.  \end{center}
  196.  
  197.   \cleardoublepage
  198.  
  199.   %--- Make page with the \dedication string
  200.  
  201.   %\thispagestyle{plain}
  202.   %\vspace*{6cm} \hfill{\emph{#5}}
  203.  
  204.    %--- Make abstract page
  205.    \chapter*{\hrule\medskip\hfill \sc Abstract\medskip\hrule}
  206.    \noindent #5
  207.  
  208.    \cleardoublepage
  209.  
  210.    %--- Make Table of Conents
  211.   \renewcommand{\contentsname}{\hrule\vspace*{8pt}\Huge{\hfill{\sc
  212.                Contents}\vspace*{8pt}\hrule\vspace*{-1cm} }}
  213.    
  214.  \titlecontents{chapter}[0.7cm]
  215.    {\vspace{0.3cm}}
  216.    {\contentslabel{1.7cm}}
  217.    {\hspace{-0.7cm}}
  218.    {\hfill\contentspage}
  219.  
  220.    \tableofcontents
  221.    \cleardoublepage
  222.  
  223.  %--- Include preface
  224.  
  225.  %\setcounter{secnumdepth}{-2}
  226.  %\chapter*{\hrule\medskip\hfill \sc Acknowledgments \medskip\hrule}
  227.  %\setcounter{secnumdepth}{2}
  228.  %\noindent #7
  229.  %\cleardoublepage
  230.  \pagenumbering{arabic}
  231. }
  232.  
  233. % ------------------------------------------
  234. % Make \startchapters command
  235. % ------------------------------------------
  236. \newcommand{\startchapters}
  237. {
  238. \cleardoublepage
  239. \renewcommand{\chaptername}{Chapter}
  240. \renewcommand{\ischapter}{1}
  241. \pagestyle{fancy}
  242. \fancyhf{}
  243. \fancyhead[RE]{}
  244. \fancyhead[LO]{}
  245. \fancyhead[LE]{\thepage}
  246. \fancyhead[RO]{\thepage}
  247. }
  248.  
  249. % ------------------------------------------
  250. % Make \startpapers command
  251. % ------------------------------------------
  252. \newcommand{\startpapers}
  253.  {
  254.   % ------------------------------------------
  255.   % Adjust section headings
  256.   % ------------------------------------------
  257.   \renewcommand\section{\@startsection {section}{1}{-1pt}%
  258.                                    {-3.5ex \@plus -1ex \@minus -.2ex}%
  259.                                    {2.3ex \@plus.2ex}%
  260.                                    {\Large\bfseries}}
  261.  
  262.  \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
  263.                                      {-3.25ex\@plus -1ex \@minus -.2ex}%
  264.                                      {1.5ex \@plus .2ex}%
  265.                                      {\large\bfseries}}
  266.  \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
  267.                                      {-3.25ex\@plus -1ex \@minus -.2ex}%
  268.                                      {1.5ex \@plus .2ex}%
  269.                                      {\normalsize\bfseries}}
  270.  
  271.   %\setcounter{secnumdepth}{3}
  272.   \renewcommand{\thesection}{\arabic{section}}
  273.  \renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
  274.  \renewcommand{\thesubsubsection}{\arabic{section}.\arabic{subsection}.
  275.                                   \arabic{subsubsection}}
  276.  \renewcommand{\theequation}{\arabic{equation}}
  277.  \renewcommand{\thefigure}{\arabic{figure}}
  278.  \renewcommand{\thetable}{\arabic{table}}
  279.  \renewcommand{\chaptername}{Paper}
  280.  \renewcommand{\thechapter}{\textnormal{\Alph{chapter}}}
  281.  \setcounter{chapter}{0}
  282.  \def\bibname{References}
  283.  \renewcommand{\ischapter}{0}
  284.  \pagestyle{fancy}
  285.  \fancyhf{}
  286.  \fancyhead[RE]{}
  287.  \fancyhead[LO]{}
  288.  \fancyhead[LE]{\thepage}
  289.  \fancyhead[RO]{\thepage}
  290. }
  291.  
  292. % ------------------------------------------
  293. % Make new part page
  294. % ------------------------------------------
  295. \newcommand{\makepartpage}[1]{%
  296.  \cleardoublepage
  297.  \thispagestyle{plain}
  298. \vspace*{7cm}
  299. {\Huge\hfill #1}
  300. \addcontentsline{toc}{part}{#1}
  301. \pagestyle{fancy}
  302. \fancyhf{}
  303. \fancyhead[RE]{}
  304. \fancyhead[LO]{}
  305. \fancyhead[LE]{\thepage}
  306. \fancyhead[RO]{\thepage}
  307. \cleardoublepage
  308. }
  309.  
  310. % ------------------------------------------
  311. % \makechapter command
  312. % ------------------------------------------
  313. \newcommand{\makechapter}[4][]
  314. {
  315.    % First argument is an abbreviated version
  316.    % of the chapter name, used as page header
  317.    % Second argument is the chapter name as it occurs in the TOC.
  318.    % The third argument is what is actually printed on the first page
  319.    % of the chapter.
  320.  
  321.   % ------------------------------------------
  322.   % Adjust section headings
  323.   % ------------------------------------------
  324.   \renewcommand\section{\@startsection {section}{1}{-1pt}%
  325.                                    {-3.5ex \@plus -1ex \@minus -.2ex}%
  326.                                    {2.3ex \@plus.2ex}%
  327.                                    {\Large\bfseries}}
  328.  
  329.  \renewcommand\subsection{\@startsection{subsection}{2}{-6pt}%
  330.                                      {-3.25ex\@plus -1ex \@minus -.2ex}%
  331.                                      {1.5ex \@plus .2ex}%
  332.                                      {\large\bfseries}}
  333.  \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
  334.                                      {-3.25ex\@plus -1ex \@minus -.2ex}%
  335.                                      {1.5ex \@plus .2ex}%
  336.                                      {\normalsize\bfseries}}
  337.  
  338.  
  339.   \renewcommand{\thechapter}{\arabic{chapter}}
  340.   \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
  341.   \renewcommand{\thesubsection}{
  342.                 \arabic{chapter}.\arabic{section}.\arabic{subsection}}
  343.   \renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
  344.   \renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
  345.   \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
  346.  
  347.   \cleardoublepage
  348.   \thispagestyle{plain}
  349.   \chapter[#3]{#4}
  350.  
  351.   \vspace*{-2\baselineskip}
  352.   \hfill\parbox[t]{.6\textwidth}{%
  353.       \begin{flushright}
  354.            \textit{#1}
  355.      \end{flushright}
  356.   }
  357.  
  358.   \fancyhf{}
  359.   \fancyhead[RE]{\sc{\nouppercase{#2}}}
  360.   \fancyhead[LO]{\sc{\nouppercase{\rightmark}}}
  361.   \fancyhead[LE]{\thepage}
  362.   \fancyhead[RO]{\thepage}
  363. }
  364.  
  365. % ------------------------------------------
  366. % \makepaper command
  367. % ------------------------------------------
  368. \newcommand{\makepaper}[5]
  369. {
  370.   \fancyhead[RE]{}
  371.   \fancyhead[LO]{}
  372.   \fancyhead[LE]{\thepage}
  373.   \fancyhead[RO]{\thepage}
  374.   \cleardoublepage
  375.   \thispagestyle{plain}
  376.   \chapter[\space]{#2}
  377.   \vspace{25mm}
  378.   \textbf{Authors:}\\ #3
  379.   \vspace{10mm} \\ \noindent \textbf{Reformatted version of paper
  380.    originally published in:} \\ #4
  381.   \vspace{15mm} \\ \noindent{\copyright} #5
  382.   \cleardoublepage
  383.   \fancyhf{}
  384.   \fancyhead[RE]{\sc{\nouppercase{#1}}}
  385.   \fancyhead[LO]{\sc{\nouppercase{\rightmark}}}
  386.   \fancyhead[LE]{\thepage}
  387.   \fancyhead[RO]{\thepage}
  388. }
  389.  
  390. % ------------------------------------------
  391. % \makepaperaccepted command, same as above
  392. % for submitted, not yet accepted paper
  393. % ------------------------------------------
  394. \newcommand{\makepaperaccepted}[5]
  395. {
  396.   \fancyhead[RE]{}
  397.   \fancyhead[LO]{}
  398.   \fancyhead[LE]{\thepage}
  399.   \fancyhead[RO]{\thepage}
  400.   \cleardoublepage
  401.   \thispagestyle{plain}
  402.   \chapter[\space]{#2}
  403.   \vspace{25mm}
  404.   \textbf{Authors:}\\ #3
  405.   \vspace{10mm} \\ \noindent \textbf{Reformatted version of paper
  406.    accepted for publication in:} \\ #4
  407.   \vspace{15mm} \\ \noindent{\copyright} #5
  408.   \cleardoublepage
  409.   \fancyhf{}
  410.   \fancyhead[RE]{\sc{\nouppercase{#1}}}
  411.   \fancyhead[LO]{\sc{\nouppercase{\rightmark}}}
  412.   \fancyhead[LE]{\thepage}
  413.   \fancyhead[RO]{\thepage}
  414. }
  415.  
  416. % ------------------------------------------
  417. % \makepapersubmitted command, same as above
  418. % for submitted, not yet accepted paper
  419. % ------------------------------------------
  420. \newcommand{\makepapersubmitted}[5]
  421. {
  422.   \fancyhead[RE]{}
  423.   \fancyhead[LO]{}
  424.   \fancyhead[LE]{\thepage}
  425.   \fancyhead[RO]{\thepage}
  426.   \cleardoublepage
  427.   \thispagestyle{plain}
  428.   \chapter[\space]{#2}
  429.   \vspace{25mm}
  430.   \textbf{Authors:}\\ #3
  431.   \vspace{10mm} \\ \noindent \textbf{Reformatted version of paper
  432.    submitted to:} \\ #4
  433.   \vspace{15mm} \\ \noindent{\copyright} #5
  434.   \cleardoublepage
  435.   \fancyhf{}
  436.   \fancyhead[RE]{\sc{\nouppercase{#1}}}
  437.   \fancyhead[LO]{\sc{\nouppercase{\rightmark}}}
  438.   \fancyhead[LE]{\thepage}
  439.   \fancyhead[RO]{\thepage}
  440. }
  441.  
  442. % ------------------------------------------
  443. % \makepapersubmitted command, same as above
  444. % for submitted, not yet accepted paper
  445. % ------------------------------------------
  446. \newcommand{\makepapertobesubmitted}[3]
  447. {
  448.   \fancyhead[RE]{}
  449.   \fancyhead[LO]{}
  450.   \fancyhead[LE]{\thepage}
  451.   \fancyhead[RO]{\thepage}
  452.   \cleardoublepage
  453.   \thispagestyle{plain}
  454.   \chapter[\space]{#2}
  455.   \vspace{25mm}
  456.   \textbf{Authors:}\\ #3
  457.   \vspace{10mm} \\ \noindent \textbf{To be submitted.} \\
  458.   \cleardoublepage
  459.   \fancyhf{}
  460.   \fancyhead[RE]{\sc{\nouppercase{#1}}}
  461.   \fancyhead[LO]{\sc{\nouppercase{\rightmark}}}
  462.   \fancyhead[LE]{\thepage}
  463.   \fancyhead[RO]{\thepage}
  464. }
  465.  
  466. % ------------------------------------------
  467. % \makebib command
  468. % ------------------------------------------
  469. \newcommand{\makebib}
  470. {
  471.    \def\bibname{}
  472.    \cleardoublepage
  473.    \fancyhead[RE]{\sc References}
  474.    \fancyhead[LO]{\sc References}
  475.    \fancyhead[LE]{\thepage}
  476.    \fancyhead[RO]{\thepage}
  477.    \thispagestyle{plain}
  478.    \vspace*{2cm}
  479.    \hrule
  480.    \vspace*{8\p@}%
  481.     \par
  482.     {\Huge{\hfill\sc References}}\\[-6pt]
  483.    \hrule
  484.    \addcontentsline{toc}{chapter}{\sc References}
  485.    \putbib[thesisreferences]
  486.    \cleardoublepage
  487.  
  488. }
  489.  
  490. % ------------------------------------------
  491. % \appendix command
  492. % ------------------------------------------
  493. \renewcommand{\appendix}%
  494. {
  495.   \cleardoublepage%
  496.   \setcounter{section}{0}
  497.   % ------------------------------------------
  498.   % Adjust section headings
  499.   % ------------------------------------------
  500.   \renewcommand\section{\@startsection {section}{1}{-1pt}%
  501.                                    {-3.5ex \@plus -1ex \@minus -.2ex}%
  502.                                    {2.3ex \@plus.2ex}%
  503.                                    {\Large\bfseries}}
  504.  
  505.  \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
  506.                                      {-3.25ex\@plus -1ex \@minus -.2ex}%
  507.                                      {1.5ex \@plus .2ex}%
  508.                                      {\large\bfseries}}
  509.  \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
  510.                                      {-3.25ex\@plus -1ex \@minus -.2ex}%
  511.                                      {1.5ex \@plus .2ex}%
  512.                                      {\normalsize\bfseries}}
  513.  \renewcommand{\thesection}{\arabic{chapter}\Alph{section}}%
  514.   \renewcommand{\thesubsection}{%
  515.                 \arabic{chapter}\Alph{section}.\arabic{subsection}}%
  516.   \renewcommand{\theequation}{\arabic{chapter}\Alph{section}.\arabic{equation}}
  517. }
  518.  
  519. % ------------------------------------------
  520. % \paperappendix command
  521. % ------------------------------------------
  522. \newcommand{\paperappendix}%
  523. {
  524.  \setcounter{section}{0}%
  525.   \renewcommand{\thesection}{\Alph{section}}%
  526.   \renewcommand{\thesubsection}{\Alph{section}.\arabic{subsection}}%
  527.   \renewcommand{\thesubsubsection}{%
  528.                 \Alph{section}.\arabic{subsection}.\arabic{\thesubsubsection}}%
  529.   \renewcommand{\theequation}{\Alph{section}.\arabic{equation}}
  530. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement