Investigating issue with paper size not being correct

main
Taha Ahmed 4 years ago
parent 29e5dc4ad0
commit 6b14df2ebc

@ -21,11 +21,11 @@
% Paper resizing commands % Paper resizing commands
\providecommand{\UU@setsfivepaper}{ \providecommand{\UU@setsfivepaper}{
\setlength{\paperheight}{242mm} \setlength{\paperheight}{242mm}
\setlength{\paperwidth}{165mm} \setlength{\paperwidth}{165mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
\setlength{\topmargin}{8,8mm} \setlength{\topmargin}{8,8mm}
\setlength{\oddsidemargin}{22,5mm} \setlength{\oddsidemargin}{22,5mm}
\setlength{\evensidemargin}{22,5mm} \setlength{\evensidemargin}{22,5mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
@ -40,42 +40,31 @@
\setlength{\pdfpageheight}{\paperheight} \setlength{\pdfpageheight}{\paperheight}
} }
% extra-large margins for use during draft
% Note that this is effectively s5paper format
% with all extra space used for margins (out to a4paper dimensions)
\providecommand{\UU@setafourpaper}{ \providecommand{\UU@setafourpaper}{
\setlength{\paperheight}{297mm} %242mm % 55mm \setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm} %165mm % 45mm \setlength{\paperwidth}{210mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
% add half the excess height to topmargin (plus original value) \setlength{\topmargin}{13,8mm}
\setlength{\topmargin}{36,3mm} % 8.8 + 0.5 * 55 \setlength{\oddsidemargin}{30mm}
% add 50 percent of the excess width to oddsidemargin (plus original value) \setlength{\evensidemargin}{30mm}
\setlength{\oddsidemargin}{45mm} % 22.5 + 0.50 * 45
\setlength{\evensidemargin}{45mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
\setlength{\headsep}{4,6mm} \setlength{\headsep}{4,6mm}
% keep textheight and textwidth same as for s5paper \setlength{\textheight}{242mm}
% remember, the idea here was to expand the margins, to make room \setlength{\textwidth}{150mm}
% for more marginnotes during draft work
\setlength{\textheight}{572pt}
\setlength{\textwidth}{120mm}
\setlength{\marginparsep}{1mm} \setlength{\marginparsep}{1mm}
% add 50 percent of the excess page width to marginparwidth (plus original value) \setlength{\marginparwidth}{20mm}
% remember, marginparwidth should be slightly smaller than odd/evensidemargin
\setlength{\marginparwidth}{42,5mm} % 20 + 0.50 * 45
\setlength{\footskip}{26pt} \setlength{\footskip}{26pt}
\setlength{\topskip}{13pt}
\setlength{\pdfpagewidth}{\paperwidth} \setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight} \setlength{\pdfpageheight}{\paperheight}
\special{papersize=297mm,210mm} \special{papersize=297mm,210mm}
} }
\providecommand{\UU@setafivepaper}{ \providecommand{\UU@setafivepaper}{
\setlength{\paperheight}{210mm} \setlength{\paperheight}{210mm}
\setlength{\paperwidth}{148mm} \setlength{\paperwidth}{148mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
\setlength{\topmargin}{8,8mm} \setlength{\topmargin}{8,8mm}
\setlength{\oddsidemargin}{20mm} \setlength{\oddsidemargin}{20mm}
\setlength{\evensidemargin}{20mm} \setlength{\evensidemargin}{20mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
@ -89,11 +78,11 @@
\setlength{\pdfpageheight}{\paperheight} \setlength{\pdfpageheight}{\paperheight}
} }
\providecommand{\UU@setbfivepaper}{ \providecommand{\UU@setbfivepaper}{
\setlength{\paperheight}{250mm} \setlength{\paperheight}{250mm}
\setlength{\paperwidth}{176mm} \setlength{\paperwidth}{176mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
\setlength{\topmargin}{8,8mm} \setlength{\topmargin}{8,8mm}
\setlength{\oddsidemargin}{22,5mm} \setlength{\oddsidemargin}{22,5mm}
\setlength{\evensidemargin}{22,5mm} \setlength{\evensidemargin}{22,5mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
@ -111,42 +100,42 @@
\let\UU@papersize\UU@setsfivepaper \let\UU@papersize\UU@setsfivepaper
\DeclareOption{s5paper}{ \DeclareOption{s5paper}{
\let\UU@papersize\UU@setsfivepaper \let\UU@papersize\UU@setsfivepaper
} }
\DeclareOption{a4paper}{ \DeclareOption{a4paper}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\PassOptionsToPackage{\CurrentOption}{geometry} \PassOptionsToPackage{\CurrentOption}{geometry}
\PassOptionsToPackage{\CurrentOption}{hyperref} \PassOptionsToPackage{\CurrentOption}{hyperref}
\let\UU@papersize\UU@setafourpaper \let\UU@papersize\UU@setafourpaper
} }
\DeclareOption{a5paper}{ \DeclareOption{a5paper}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\PassOptionsToPackage{\CurrentOption}{geometry} \PassOptionsToPackage{\CurrentOption}{geometry}
\PassOptionsToPackage{\CurrentOption}{hyperref} \PassOptionsToPackage{\CurrentOption}{hyperref}
\@sfivepaperfalse \@sfivepaperfalse
\let\UU@papersize\UU@setafivepaper \let\UU@papersize\UU@setafivepaper
} }
\DeclareOption{b5paper}{ \DeclareOption{b5paper}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\PassOptionsToPackage{\CurrentOption}{geometry} \PassOptionsToPackage{\CurrentOption}{geometry}
\PassOptionsToPackage{\CurrentOption}{hyperref} \PassOptionsToPackage{\CurrentOption}{hyperref}
\let\UU@papersize\UU@setbfivepaper \let\UU@papersize\UU@setbfivepaper
} }
\DeclareOption{letterpaper}{ \DeclareOption{letterpaper}{
\ClassWarning{Invalid papersize \CurrentOption} \ClassWarning{Invalid papersize \CurrentOption}
} }
\DeclareOption{legalpaper}{ \DeclareOption{legalpaper}{
\ClassWarning{Invalid papersize \CurrentOption} \ClassWarning{Invalid papersize \CurrentOption}
} }
\DeclareOption{titles}{ \DeclareOption{titles}{
\@culumntitlestrue \@culumntitlestrue
} }
\DeclareOption{margnum}{ \DeclareOption{margnum}{
\@UU@margnumtrue \@UU@margnumtrue
} }
\DeclareOption{twocolumn}{ \DeclareOption{twocolumn}{
\ClassWarning{This class does not support \CurrentOption} \ClassWarning{This class does not support \CurrentOption}
} }
\DeclareOption{swedish}{ \PassOptionsToPackage{\CurrentOption}{babel} } \DeclareOption{swedish}{ \PassOptionsToPackage{\CurrentOption}{babel} }
@ -176,17 +165,16 @@
\fi% \fi%
}% }%
%% disable this block since it seems to only be for dvips route anyway
% Define page size and tell dvips to use it by entering the \special command % Define page size and tell dvips to use it by entering the \special command
%\UU@papersize \UU@papersize
%\special{papersize=\the\pdfpagewidth,\the\pdfpageheight} \special{papersize=\the\pdfpagewidth,\the\pdfpageheight}
% ============================================ % ============================================
% Font settings % Font settings
% ============================================ % ============================================
% these sizes only work well with the UUThesis default font (Times new roman and its clones) % these font sizes only work well with the UUThesis default font (Times new roman and its clones)
\AtBeginDocument{% \AtBeginDocument{%
% \renewcommand\normalsize{\@setfontsize{\normalsize}{11}{13}} %11/13pt % \renewcommand\normalsize{\@setfontsize{\normalsize}{11}{13}} %11/13pt
% \renewcommand\small{\@setfontsize{\small}{10}{12}}%10/12pt % \renewcommand\small{\@setfontsize{\small}{10}{12}}%10/12pt
@ -298,7 +286,7 @@
% Page layout % Page layout
% ============================================ % ============================================
% Plain - Empty header with page number outer end of footer % Plain - Empty header with page number outer end of footer
\renewcommand{\ps@plain}{% \renewcommand{\ps@plain}{%
\let\@oddhead\@empty% \let\@oddhead\@empty%
\let\@evenhead\@empty% \let\@evenhead\@empty%
@ -322,10 +310,10 @@
\def\sectionmark ##1{\markright {\ifnum \c@secnumdepth >\z@ \thesection~~\fi ##1}}% \def\sectionmark ##1{\markright {\ifnum \c@secnumdepth >\z@ \thesection~~\fi ##1}}%
} }
\let\@oddfoot\@empty \let\@oddfoot\@empty
\let\@evenfoot\@empty \let\@evenfoot\@empty
\let\@mkboth\@gobbletwo \let\@mkboth\@gobbletwo
\let\chaptermark\@gobble \let\chaptermark\@gobble
\let\sectionmark\@gobble \let\sectionmark\@gobble
\def\appendixmark#1{% \def\appendixmark#1{%
\markboth{Appendix \theappendix}{}% \markboth{Appendix \theappendix}{}%
@ -357,20 +345,20 @@
% Remove page numbers and numbering of headings % Remove page numbers and numbering of headings
\let\oldfrontmatter\frontmatter \let\oldfrontmatter\frontmatter
\renewcommand{\frontmatter}{% \renewcommand{\frontmatter}{%
\renewcommand{\thepage}{\roman{page}}% \renewcommand{\thepage}{\roman{page}}%
\setcounter{secnumdepth}{-2} % \setcounter{secnumdepth}{-2} %
\@mainmatterfalse% \@mainmatterfalse%
\pagestyle{empty}% \pagestyle{empty}%
} }
% Adjust to odd page and restore numbering of headings % Adjust to odd page and restore numbering of headings
\let\oldmainmatter\mainmatter \let\oldmainmatter\mainmatter
\renewcommand{\mainmatter}{% \renewcommand{\mainmatter}{%
\cleardoublepage% \cleardoublepage%
\renewcommand{\thepage}{\arabic{page}}% \renewcommand{\thepage}{\arabic{page}}%
\setcounter{secnumdepth}{\c@secnumdepthmainmatter} % \setcounter{secnumdepth}{\c@secnumdepthmainmatter} %
\@mainmattertrue% \@mainmattertrue%
\if@culumntitles% \if@culumntitles%
\pagestyle{headings}% \pagestyle{headings}%
\else% \else%
@ -380,20 +368,20 @@
% Remove page numbers and numbering of headings % Remove page numbers and numbering of headings
\let\oldbackmatter\backmatter \let\oldbackmatter\backmatter
\renewcommand{\backmatter}{% \renewcommand{\backmatter}{%
\oldbackmatter% \oldbackmatter%
\setcounter{secnumdepth}{-2} \setcounter{secnumdepth}{-2}
\makeatletter% \makeatletter%
\ifx\toclevel@chapter\undefined\else% \ifx\toclevel@chapter\undefined\else%
\renewcommand{\toclevel@appendix}{-1}% \renewcommand{\toclevel@appendix}{-1}%
\renewcommand{\toclevel@chapter}{-1}% \renewcommand{\toclevel@chapter}{-1}%
\renewcommand{\toclevel@section}{0}% \renewcommand{\toclevel@section}{0}%
\renewcommand{\toclevel@subsection}{1}% \renewcommand{\toclevel@subsection}{1}%
\renewcommand{\toclevel@subsubsection}{2}% \renewcommand{\toclevel@subsubsection}{2}%
\renewcommand{\toclevel@paragraph}{3}% \renewcommand{\toclevel@paragraph}{3}%
\renewcommand{\toclevel@subparagraph}{4}% \renewcommand{\toclevel@subparagraph}{4}%
\fi% \fi%
\makeatother% \makeatother%
} }
% Change the chapter command to create appendixes % Change the chapter command to create appendixes
@ -404,7 +392,7 @@
\let\chaptername\appendixname% \let\chaptername\appendixname%
\@mainmattertrue% \@mainmattertrue%
}{% }{%
} }
% ============================================ % ============================================
@ -415,11 +403,11 @@
\providecommand{\toclevel@part}{-1} \providecommand{\toclevel@part}{-1}
\providecommand{\toclevel@appendix}{0}% \providecommand{\toclevel@appendix}{0}%
\providecommand{\toclevel@chapter}{0}% \providecommand{\toclevel@chapter}{0}%
\providecommand{\toclevel@section}{1}% \providecommand{\toclevel@section}{1}%
\providecommand{\toclevel@subsection}{2}% \providecommand{\toclevel@subsection}{2}%
\providecommand{\toclevel@subsubsection}{3}% \providecommand{\toclevel@subsubsection}{3}%
\providecommand{\toclevel@paragraph}{4}% \providecommand{\toclevel@paragraph}{4}%
\providecommand{\toclevel@subparagraph}{5}% \providecommand{\toclevel@subparagraph}{5}%
\providecommand{\numberingdepth}[1]{% \providecommand{\numberingdepth}[1]{%
\setcounter{secnumdepth}{\csname toclevel@#1\endcsname}% \setcounter{secnumdepth}{\csname toclevel@#1\endcsname}%
@ -727,7 +715,7 @@
\def\longtable{\small\par\olongtable}% \def\longtable{\small\par\olongtable}%
\g@addto@macro\endlongtable{\addvspace{0pt plus 13pt}\normalsize}% \g@addto@macro\endlongtable{\addvspace{0pt plus 13pt}\normalsize}%
\let\oLT@array\LT@array% \let\oLT@array\LT@array%
\def\LT@array[#1]#2{% \def\LT@array[#1]#2{%
\oLT@array[#1]{#2}% \oLT@array[#1]{#2}%
\hline \multicolumn{\LT@cols}{r@{}}{{\continuednextpage}} % \hline \multicolumn{\LT@cols}{r@{}}{{\continuednextpage}} %
\endfoot}% \endfoot}%
@ -900,7 +888,7 @@
\renewcommand*\l@subsubsection[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@subsubsection}{\tocnumindent@subsubsection}{2}} \renewcommand*\l@subsubsection[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@subsubsection}{\tocnumindent@subsubsection}{2}}
\renewcommand*\l@paragraph[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@paragraph}{\tocnumindent@paragraph}{3}} \renewcommand*\l@paragraph[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@paragraph}{\tocnumindent@paragraph}{3}}
\renewcommand*\l@subparagraph[2]{\nopagebreak[1]\@nopagebreaktoc{5}\customtocline{#1}{#2}{\tocindent@subparagraph}{\tocnumindent@subparagraph}{4}} \renewcommand*\l@subparagraph[2]{\nopagebreak[1]\@nopagebreaktoc{5}\customtocline{#1}{#2}{\tocindent@subparagraph}{\tocnumindent@subparagraph}{4}}
\setcounter{tocdepth}{2} \setcounter{tocdepth}{2}
\newcommand*\l@appendix[2]{% \newcommand*\l@appendix[2]{%
\@nopagebreaktoc{0} \@nopagebreaktoc{0}
@ -977,13 +965,13 @@
\providecommand{\listofpapersintro}[1]{\gdef\@listofpapersintro{#1}} \providecommand{\listofpapersintro}[1]{\gdef\@listofpapersintro{#1}}
\providecommand{\listofpapersoutro}[1]{\gdef\@listofpapersoutro{#1}} \providecommand{\listofpapersoutro}[1]{\gdef\@listofpapersoutro{#1}}
\listofpapersintro{This thesis is based on the following papers, which are referred to in the text by their roman numerals.}% \listofpapersintro{This thesis is based on the following papers, which are referred to in the text by their roman numerals.}%
\listofpapersoutro{Reprints were made with permission from the publishers.} \listofpapersoutro{Reprints were made with permission from the publishers.}
\providecommand{\pgs@language@swedish}{% \providecommand{\pgs@language@swedish}{%
\renewcommand{\bibname}{\refname}% \renewcommand{\bibname}{\refname}%
\renewcommand{\listofpapersname}{Lista \"over delarbeten}% \renewcommand{\listofpapersname}{Lista \"over delarbeten}%
\listofpapersintro{Denna avhandling \"ar baserad p\r{a} f\"oljande artiklar, vilka i texten h\"anvisas till med romerska siffror.}% \listofpapersintro{Denna avhandling \"ar baserad p\r{a} f\"oljande artiklar, vilka i texten h\"anvisas till med romerska siffror.}%
\listofpapersoutro{Reproduktion med tillst\aa nd fr\aa n respektive utgivare.}% \listofpapersoutro{Reproduktion med tillst\aa nd fr\aa n respektive utgivare.}%
\renewcommand{\continuednextpage}{Fortsatt p\r{a} n\"a{}sta sida}% \renewcommand{\continuednextpage}{Fortsatt p\r{a} n\"a{}sta sida}%
\renewcommand{\keywordsname}{Nyckelord}% \renewcommand{\keywordsname}{Nyckelord}%

@ -21,11 +21,11 @@
% Paper resizing commands % Paper resizing commands
\providecommand{\UU@setsfivepaper}{ \providecommand{\UU@setsfivepaper}{
\setlength{\paperheight}{242mm} \setlength{\paperheight}{242mm}
\setlength{\paperwidth}{165mm} \setlength{\paperwidth}{165mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
\setlength{\topmargin}{8,8mm} \setlength{\topmargin}{8,8mm}
\setlength{\oddsidemargin}{22,5mm} \setlength{\oddsidemargin}{22,5mm}
\setlength{\evensidemargin}{22,5mm} \setlength{\evensidemargin}{22,5mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
@ -40,42 +40,31 @@
\setlength{\pdfpageheight}{\paperheight} \setlength{\pdfpageheight}{\paperheight}
} }
% extra-large margins for use during draft
% Note that this is effectively s5paper format
% with all extra space used for margins (out to a4paper dimensions)
\providecommand{\UU@setafourpaper}{ \providecommand{\UU@setafourpaper}{
\setlength{\paperheight}{297mm} %242mm % 55mm \setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm} %165mm % 45mm \setlength{\paperwidth}{210mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
% add half the excess height to topmargin (plus original value) \setlength{\topmargin}{13,8mm}
\setlength{\topmargin}{36,3mm} % 8.8 + 0.5 * 55 \setlength{\oddsidemargin}{30mm}
% add 50 percent of the excess width to oddsidemargin (plus original value) \setlength{\evensidemargin}{30mm}
\setlength{\oddsidemargin}{45mm} % 22.5 + 0.50 * 45
\setlength{\evensidemargin}{45mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
\setlength{\headsep}{4,6mm} \setlength{\headsep}{4,6mm}
% keep textheight and textwidth same as for s5paper \setlength{\textheight}{242mm}
% remember, the idea here was to expand the margins, to make room \setlength{\textwidth}{150mm}
% for more marginnotes during draft work
\setlength{\textheight}{572pt}
\setlength{\textwidth}{120mm}
\setlength{\marginparsep}{1mm} \setlength{\marginparsep}{1mm}
% add 50 percent of the excess page width to marginparwidth (plus original value) \setlength{\marginparwidth}{20mm}
% remember, marginparwidth should be slightly smaller than odd/evensidemargin
\setlength{\marginparwidth}{42,5mm} % 20 + 0.50 * 45
\setlength{\footskip}{26pt} \setlength{\footskip}{26pt}
\setlength{\topskip}{13pt}
\setlength{\pdfpagewidth}{\paperwidth} \setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight} \setlength{\pdfpageheight}{\paperheight}
\special{papersize=297mm,210mm} \special{papersize=297mm,210mm}
} }
\providecommand{\UU@setafivepaper}{ \providecommand{\UU@setafivepaper}{
\setlength{\paperheight}{210mm} \setlength{\paperheight}{210mm}
\setlength{\paperwidth}{148mm} \setlength{\paperwidth}{148mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
\setlength{\topmargin}{8,8mm} \setlength{\topmargin}{8,8mm}
\setlength{\oddsidemargin}{20mm} \setlength{\oddsidemargin}{20mm}
\setlength{\evensidemargin}{20mm} \setlength{\evensidemargin}{20mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
@ -89,11 +78,11 @@
\setlength{\pdfpageheight}{\paperheight} \setlength{\pdfpageheight}{\paperheight}
} }
\providecommand{\UU@setbfivepaper}{ \providecommand{\UU@setbfivepaper}{
\setlength{\paperheight}{250mm} \setlength{\paperheight}{250mm}
\setlength{\paperwidth}{176mm} \setlength{\paperwidth}{176mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
\setlength{\topmargin}{8,8mm} \setlength{\topmargin}{8,8mm}
\setlength{\oddsidemargin}{22,5mm} \setlength{\oddsidemargin}{22,5mm}
\setlength{\evensidemargin}{22,5mm} \setlength{\evensidemargin}{22,5mm}
\setlength{\headheight}{4,6mm} \setlength{\headheight}{4,6mm}
@ -111,42 +100,42 @@
\let\UU@papersize\UU@setsfivepaper \let\UU@papersize\UU@setsfivepaper
\DeclareOption{s5paper}{ \DeclareOption{s5paper}{
\let\UU@papersize\UU@setsfivepaper \let\UU@papersize\UU@setsfivepaper
} }
\DeclareOption{a4paper}{ \DeclareOption{a4paper}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\PassOptionsToPackage{\CurrentOption}{geometry} \PassOptionsToPackage{\CurrentOption}{geometry}
\PassOptionsToPackage{\CurrentOption}{hyperref} \PassOptionsToPackage{\CurrentOption}{hyperref}
\let\UU@papersize\UU@setafourpaper \let\UU@papersize\UU@setafourpaper
} }
\DeclareOption{a5paper}{ \DeclareOption{a5paper}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\PassOptionsToPackage{\CurrentOption}{geometry} \PassOptionsToPackage{\CurrentOption}{geometry}
\PassOptionsToPackage{\CurrentOption}{hyperref} \PassOptionsToPackage{\CurrentOption}{hyperref}
\@sfivepaperfalse \@sfivepaperfalse
\let\UU@papersize\UU@setafivepaper \let\UU@papersize\UU@setafivepaper
} }
\DeclareOption{b5paper}{ \DeclareOption{b5paper}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\PassOptionsToPackage{\CurrentOption}{geometry} \PassOptionsToPackage{\CurrentOption}{geometry}
\PassOptionsToPackage{\CurrentOption}{hyperref} \PassOptionsToPackage{\CurrentOption}{hyperref}
\let\UU@papersize\UU@setbfivepaper \let\UU@papersize\UU@setbfivepaper
} }
\DeclareOption{letterpaper}{ \DeclareOption{letterpaper}{
\ClassWarning{Invalid papersize \CurrentOption} \ClassWarning{Invalid papersize \CurrentOption}
} }
\DeclareOption{legalpaper}{ \DeclareOption{legalpaper}{
\ClassWarning{Invalid papersize \CurrentOption} \ClassWarning{Invalid papersize \CurrentOption}
} }
\DeclareOption{titles}{ \DeclareOption{titles}{
\@culumntitlestrue \@culumntitlestrue
} }
\DeclareOption{margnum}{ \DeclareOption{margnum}{
\@UU@margnumtrue \@UU@margnumtrue
} }
\DeclareOption{twocolumn}{ \DeclareOption{twocolumn}{
\ClassWarning{This class does not support \CurrentOption} \ClassWarning{This class does not support \CurrentOption}
} }
\DeclareOption{swedish}{ \PassOptionsToPackage{\CurrentOption}{babel} } \DeclareOption{swedish}{ \PassOptionsToPackage{\CurrentOption}{babel} }
@ -183,7 +172,7 @@
% ============================================ % ============================================
% XeTeX requirements % XeTeX requirements
% ============================================ % ============================================
\newif\ifFontIsAvailable \newif\ifFontIsAvailable
\def\testFontAvailability#1{ \def\testFontAvailability#1{
\count255=\interactionmode \count255=\interactionmode
@ -224,7 +213,7 @@
\renewcommand\Large{\@setfontsize{\Large}{15}{17}}%15/17 \renewcommand\Large{\@setfontsize{\Large}{15}{17}}%15/17
\renewcommand\LARGE{\@setfontsize{\LARGE}{18}{20}}%18/20 \renewcommand\LARGE{\@setfontsize{\LARGE}{18}{20}}%18/20
\renewcommand\huge{\@setfontsize{\huge}{20}{23}}%20/23 \renewcommand\huge{\@setfontsize{\huge}{20}{23}}%20/23
\renewcommand\Huge{\@setfontsize{\Huge}{24}{28}}%24/28 \renewcommand\Huge{\@setfontsize{\Huge}{24}{28}}%24/28
\let\superscript\textsuperscript \let\superscript\textsuperscript
\let\subscript\textsubscript \let\subscript\textsubscript
@ -343,7 +332,7 @@
% Page layout % Page layout
% ============================================ % ============================================
% Plain - Empty header with page number outer end of footer % Plain - Empty header with page number outer end of footer
\renewcommand{\ps@plain}{% \renewcommand{\ps@plain}{%
\let\@oddhead\@empty% \let\@oddhead\@empty%
\let\@evenhead\@empty% \let\@evenhead\@empty%
@ -367,10 +356,10 @@
\def\sectionmark ##1{\markright {\ifnum \c@secnumdepth >\z@ \thesection~~\fi ##1}}% \def\sectionmark ##1{\markright {\ifnum \c@secnumdepth >\z@ \thesection~~\fi ##1}}%
} }
\let\@oddfoot\@empty \let\@oddfoot\@empty
\let\@evenfoot\@empty \let\@evenfoot\@empty
\let\@mkboth\@gobbletwo \let\@mkboth\@gobbletwo
\let\chaptermark\@gobble \let\chaptermark\@gobble
\let\sectionmark\@gobble \let\sectionmark\@gobble
\def\appendixmark#1{% \def\appendixmark#1{%
\markboth{Appendix \theappendix}{}% \markboth{Appendix \theappendix}{}%
@ -406,20 +395,20 @@
% Remove page numbers and numbering of headings % Remove page numbers and numbering of headings
\let\oldfrontmatter\frontmatter \let\oldfrontmatter\frontmatter
\renewcommand{\frontmatter}{% \renewcommand{\frontmatter}{%
\renewcommand{\thepage}{\roman{page}}% \renewcommand{\thepage}{\roman{page}}%
\setcounter{secnumdepth}{-2} % \setcounter{secnumdepth}{-2} %
\@mainmatterfalse% \@mainmatterfalse%
\pagestyle{empty}% \pagestyle{empty}%
} }
% Adjust to odd page and restore numbering of headings % Adjust to odd page and restore numbering of headings
\let\oldmainmatter\mainmatter \let\oldmainmatter\mainmatter
\renewcommand{\mainmatter}{% \renewcommand{\mainmatter}{%
\cleardoublepage% \cleardoublepage%
\renewcommand{\thepage}{\arabic{page}}% \renewcommand{\thepage}{\arabic{page}}%
\setcounter{secnumdepth}{\c@secnumdepthmainmatter} % \setcounter{secnumdepth}{\c@secnumdepthmainmatter} %
\@mainmattertrue% \@mainmattertrue%
\if@culumntitles% \if@culumntitles%
\pagestyle{headings}% \pagestyle{headings}%
\else% \else%
@ -429,20 +418,20 @@
% Remove page numbers and numbering of headings % Remove page numbers and numbering of headings
\let\oldbackmatter\backmatter \let\oldbackmatter\backmatter
\renewcommand{\backmatter}{% \renewcommand{\backmatter}{%
\oldbackmatter% \oldbackmatter%
\setcounter{secnumdepth}{-2} \setcounter{secnumdepth}{-2}
\makeatletter% \makeatletter%
\ifx\toclevel@chapter\undefined\else% \ifx\toclevel@chapter\undefined\else%
\renewcommand{\toclevel@appendix}{-1}% \renewcommand{\toclevel@appendix}{-1}%
\renewcommand{\toclevel@chapter}{-1}% \renewcommand{\toclevel@chapter}{-1}%
\renewcommand{\toclevel@section}{0}% \renewcommand{\toclevel@section}{0}%
\renewcommand{\toclevel@subsection}{1}% \renewcommand{\toclevel@subsection}{1}%
\renewcommand{\toclevel@subsubsection}{2}% \renewcommand{\toclevel@subsubsection}{2}%
\renewcommand{\toclevel@paragraph}{3}% \renewcommand{\toclevel@paragraph}{3}%
\renewcommand{\toclevel@subparagraph}{4}% \renewcommand{\toclevel@subparagraph}{4}%
\fi% \fi%
\makeatother% \makeatother%
} }
% Change the chapter command to create appendixes % Change the chapter command to create appendixes
@ -453,23 +442,23 @@
\let\chaptername\appendixname% \let\chaptername\appendixname%
\@mainmattertrue% \@mainmattertrue%
}{% }{%
} }
% ============================================ % ============================================
% Headings % Headings
% ============================================ % ============================================
% Provides a readable command to set numbering of headings % Provides a readable command to set numbering of headings
\providecommand{\toclevel@part}{-1} \providecommand{\toclevel@part}{-1}
\providecommand{\toclevel@appendix}{0}% \providecommand{\toclevel@appendix}{0}%
\providecommand{\toclevel@chapter}{0}% \providecommand{\toclevel@chapter}{0}%
\providecommand{\toclevel@section}{1}% \providecommand{\toclevel@section}{1}%
\providecommand{\toclevel@subsection}{2}% \providecommand{\toclevel@subsection}{2}%
\providecommand{\toclevel@subsubsection}{3}% \providecommand{\toclevel@subsubsection}{3}%
\providecommand{\toclevel@paragraph}{4}% \providecommand{\toclevel@paragraph}{4}%
\providecommand{\toclevel@subparagraph}{5}% \providecommand{\toclevel@subparagraph}{5}%
\providecommand{\numberingdepth}[1]{% \providecommand{\numberingdepth}[1]{%
\setcounter{secnumdepth}{\csname toclevel@#1\endcsname}% \setcounter{secnumdepth}{\csname toclevel@#1\endcsname}%
@ -671,7 +660,7 @@
% ============================================ % ============================================
% Captions % Captions
% ============================================ % ============================================
\setlength{\abovecaptionskip}{3pt plus 2pt} \setlength{\abovecaptionskip}{3pt plus 2pt}
\setlength{\belowcaptionskip}{0pt plus 42pt} \setlength{\belowcaptionskip}{0pt plus 42pt}
@ -721,7 +710,7 @@
% ============================================ % ============================================
% Package fixes % Package fixes
% ============================================ % ============================================
\AtBeginDocument{% \AtBeginDocument{%
% %
@ -784,7 +773,7 @@
\def\longtable{\small\par\olongtable}% \def\longtable{\small\par\olongtable}%
\g@addto@macro\endlongtable{\addvspace{0pt plus 13pt}\normalsize}% \g@addto@macro\endlongtable{\addvspace{0pt plus 13pt}\normalsize}%
\let\oLT@array\LT@array% \let\oLT@array\LT@array%
\def\LT@array[#1]#2{% \def\LT@array[#1]#2{%
\oLT@array[#1]{#2}% \oLT@array[#1]{#2}%
\hline \multicolumn{\LT@cols}{r@{}}{{\continuednextpage}} % \hline \multicolumn{\LT@cols}{r@{}}{{\continuednextpage}} %
\endfoot}% \endfoot}%
@ -818,7 +807,7 @@
% ============================================ % ============================================
% Table of contents % Table of contents
% ============================================ % ============================================
% Provides a readable command to set the level of detail in toc % Provides a readable command to set the level of detail in toc
\providecommand{\contentsdepth}[1]{% \providecommand{\contentsdepth}[1]{%
@ -962,7 +951,7 @@
\renewcommand*\l@subsubsection[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@subsubsection}{\tocnumindent@subsubsection}{2}} \renewcommand*\l@subsubsection[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@subsubsection}{\tocnumindent@subsubsection}{2}}
\renewcommand*\l@paragraph[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@paragraph}{\tocnumindent@paragraph}{3}} \renewcommand*\l@paragraph[2]{\@nopagebreaktoc{4}\customtocline{#1}{#2}{\tocindent@paragraph}{\tocnumindent@paragraph}{3}}
\renewcommand*\l@subparagraph[2]{\nopagebreak[1]\@nopagebreaktoc{5}\customtocline{#1}{#2}{\tocindent@subparagraph}{\tocnumindent@subparagraph}{4}} \renewcommand*\l@subparagraph[2]{\nopagebreak[1]\@nopagebreaktoc{5}\customtocline{#1}{#2}{\tocindent@subparagraph}{\tocnumindent@subparagraph}{4}}
\setcounter{tocdepth}{2} \setcounter{tocdepth}{2}
\newcommand*\l@appendix[2]{% \newcommand*\l@appendix[2]{%
\@nopagebreaktoc{0} \@nopagebreaktoc{0}
@ -1001,7 +990,7 @@
% ============================================ % ============================================
% List of papers % List of papers
% ============================================ % ============================================
\renewcommand{\bibname}{\refname} \renewcommand{\bibname}{\refname}
@ -1011,14 +1000,14 @@
\providecommand{\listofpapersintro}[1]{\gdef\@listofpapersintro{#1}} \providecommand{\listofpapersintro}[1]{\gdef\@listofpapersintro{#1}}
\providecommand{\listofpapersoutro}[1]{\gdef\@listofpapersoutro{#1}} \providecommand{\listofpapersoutro}[1]{\gdef\@listofpapersoutro{#1}}
\listofpapersintro{This thesis is based on the following papers, which are referred to in the text by their roman numerals.}% \listofpapersintro{This thesis is based on the following papers, which are referred to in the text by their roman numerals.}%
\listofpapersoutro{Reprints were made with permission from the publishers.} \listofpapersoutro{Reprints were made with permission from the publishers.}
\providecommand{\pgs@language@swedish}{% \providecommand{\pgs@language@swedish}{%
\renewcommand{\bibname}{\refname}% \renewcommand{\bibname}{\refname}%
\renewcommand{\listofpapersname}{Lista \"over delarbeten}% \renewcommand{\listofpapersname}{Lista \"over delarbeten}%
\listofpapersintro{Denna avhandling \"ar baserad p\r{a} f\"oljande artiklar, vilka i texten h\"anvisas till med romerska siffror.}% \listofpapersintro{Denna avhandling \"ar baserad p\r{a} f\"oljande artiklar, vilka i texten h\"anvisas till med romerska siffror.}%
\listofpapersoutro{Reproduktion med tillst\aa nd fr\aa n respektive utgivare.}% \listofpapersoutro{Reproduktion med tillst\aa nd fr\aa n respektive utgivare.}%
\renewcommand{\continuednextpage}{Fortsatt p\r{a} n\"a{}sta sida}% \renewcommand{\continuednextpage}{Fortsatt p\r{a} n\"a{}sta sida}%
\renewcommand{\keywordsname}{Nyckelord}% \renewcommand{\keywordsname}{Nyckelord}%
@ -1026,12 +1015,12 @@
\providecommand{\pgs@language@english}{% \providecommand{\pgs@language@english}{%
\renewcommand{\bibname}{\refname}% \renewcommand{\bibname}{\refname}%
\renewcommand{\listofpapersname}{List of papers}% \renewcommand{\listofpapersname}{List of papers}%
\listofpapersintro{This thesis is based on the following papers, which are referred to in the text by their Roman numerals.}% \listofpapersintro{This thesis is based on the following papers, which are referred to in the text by their Roman numerals.}%
\listofpapersoutro{Reprints were made with permission from the publishers.}% \listofpapersoutro{Reprints were made with permission from the publishers.}%
\renewcommand{\continuednextpage}{Continued on next page}% \renewcommand{\continuednextpage}{Continued on next page}%
\renewcommand{\keywordsname}{Keywords}% \renewcommand{\keywordsname}{Keywords}%
} }
\AtBeginDocument{% \AtBeginDocument{%
@ -1075,7 +1064,7 @@
% ============================================ % ============================================
% Basic bibliography % Basic bibliography
% ============================================ % ============================================
\let\oldbib\thebibliography \let\oldbib\thebibliography
\let\endoldbib\endthebibliography \let\endoldbib\endthebibliography
@ -1108,7 +1097,7 @@
% ============================================ % ============================================
% Index % Index
% ============================================ % ============================================
\newcommand{\UU@theindex}{ \newcommand{\UU@theindex}{
\clearpage% \clearpage%
@ -1126,7 +1115,7 @@
\columnsep 35\p@ % \columnsep 35\p@ %
\let \item \@idxitem % \let \item \@idxitem %
}% }%
\AtBeginDocument{% \AtBeginDocument{%
\let\theindex\UU@theindex% \let\theindex\UU@theindex%
\@ifpackageloaded{makeidx}{% \@ifpackageloaded{makeidx}{%

Loading…
Cancel
Save