Commented out hack that redefined cleardoublepage

I could see no effect with or without that hack.
Reasoning behind it was never documented it seems.
Whatever it was originally needed for probably no longer the case.
Feel free to remove the lines completely on next commit.
main
Taha Ahmed 2 years ago
parent edf38643ab
commit 64a83713d5

@ -21,7 +21,7 @@
% 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}
@ -41,7 +41,7 @@
} }
\providecommand{\UU@setafourpaper}{ \providecommand{\UU@setafourpaper}{
\setlength{\paperheight}{297mm} \setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm} \setlength{\paperwidth}{210mm}
\setlength{\hoffset}{-1in} \setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in} \setlength{\voffset}{-1in}
@ -60,7 +60,7 @@
\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}
@ -78,7 +78,7 @@
\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}
@ -100,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} }
@ -287,7 +287,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%
@ -311,10 +311,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}{}%
@ -324,13 +324,16 @@
\pagestyle{plain} \pagestyle{plain}
} }
%% Why is the UU class redefining the cleardoublepage command?
%% I don't see what could be the reason... /TA
%% Commented out or not, I saw no difference. Pls remove on next commit. /TA
% Adjust to odd pagenumber using an optional blank page % Adjust to odd pagenumber using an optional blank page
\let\origdoublepage\cleardoublepage % \let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{% % \newcommand{\clearemptydoublepage}{%
\clearpage % \clearpage
{\pagestyle{empty}\origdoublepage}% % {\pagestyle{empty}\origdoublepage}%
} % }
\let\cleardoublepage\clearemptydoublepage % \let\cleardoublepage\clearemptydoublepage
% ============================================ % ============================================
@ -346,20 +349,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%
@ -369,20 +372,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
@ -393,7 +396,7 @@
\let\chaptername\appendixname% \let\chaptername\appendixname%
\@mainmattertrue% \@mainmattertrue%
}{% }{%
} }
% ============================================ % ============================================
@ -404,11 +407,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}%
@ -716,7 +719,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}%
@ -889,7 +892,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}
@ -966,13 +969,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}%
@ -1037,7 +1040,7 @@
\providecommand{\listofcontributionsname}{Other publications} \providecommand{\listofcontributionsname}{Other publications}
\providecommand{\listofcontributionsintro}[1]{\gdef\@listofcontributionsintro{#1}} \providecommand{\listofcontributionsintro}[1]{\gdef\@listofcontributionsintro{#1}}
\providecommand{\listofcontributionsoutro}[1]{\gdef\@listofcontributionsoutro{#1}} \providecommand{\listofcontributionsoutro}[1]{\gdef\@listofcontributionsoutro{#1}}
\listofcontributionsintro{Other publications or contributions, not included in the thesis, but referred to in the summary.}% \listofcontributionsintro{Other publications or contributions, not included in the thesis, but referred to in the summary.}%
\listofcontributionsoutro{Contributions listed above.} \listofcontributionsoutro{Contributions listed above.}
\providecommand{\pgs@language@swedish}{% \providecommand{\pgs@language@swedish}{%

Loading…
Cancel
Save