From c2430f316b36ea5c33fbd5570983d2798eb1925d Mon Sep 17 00:00:00 2001 From: "taha@luxor" Date: Sun, 26 Sep 2021 21:12:34 +0200 Subject: [PATCH] Created env for "other contributions". Replaced decimal commas with decimal points (not sure why LaTeX was not complaining about that). Anyway, I can't see any changes in the document after changing the decimal symbol here. --- LuaUUThesis.cls | 119 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 92 insertions(+), 27 deletions(-) diff --git a/LuaUUThesis.cls b/LuaUUThesis.cls index 7af5d0c..ed845ba 100644 --- a/LuaUUThesis.cls +++ b/LuaUUThesis.cls @@ -25,11 +25,11 @@ \setlength{\paperwidth}{165mm} \setlength{\hoffset}{-1in} \setlength{\voffset}{-1in} - \setlength{\topmargin}{8,8mm} - \setlength{\oddsidemargin}{22,5mm} - \setlength{\evensidemargin}{22,5mm} - \setlength{\headheight}{4,6mm} - \setlength{\headsep}{4,6mm} + \setlength{\topmargin}{8.8mm} + \setlength{\oddsidemargin}{22.5mm} + \setlength{\evensidemargin}{22.5mm} + \setlength{\headheight}{4.6mm} + \setlength{\headsep}{4.6mm} \setlength{\textheight}{572pt} \setlength{\textwidth}{120mm} \setlength{\marginparsep}{1mm} @@ -45,11 +45,11 @@ \setlength{\paperwidth}{210mm} \setlength{\hoffset}{-1in} \setlength{\voffset}{-1in} - \setlength{\topmargin}{13,8mm} + \setlength{\topmargin}{13.8mm} \setlength{\oddsidemargin}{30mm} \setlength{\evensidemargin}{30mm} - \setlength{\headheight}{4,6mm} - \setlength{\headsep}{4,6mm} + \setlength{\headheight}{4.6mm} + \setlength{\headsep}{4.6mm} \setlength{\textheight}{242mm} \setlength{\textwidth}{150mm} \setlength{\marginparsep}{1mm} @@ -64,11 +64,11 @@ \setlength{\paperwidth}{148mm} \setlength{\hoffset}{-1in} \setlength{\voffset}{-1in} - \setlength{\topmargin}{8,8mm} + \setlength{\topmargin}{8.8mm} \setlength{\oddsidemargin}{20mm} \setlength{\evensidemargin}{20mm} - \setlength{\headheight}{4,6mm} - \setlength{\headsep}{4,6mm} + \setlength{\headheight}{4.6mm} + \setlength{\headsep}{4.6mm} \setlength{\textheight}{172mm} \setlength{\textwidth}{108mm} \setlength{\marginparsep}{1mm} @@ -82,11 +82,11 @@ \setlength{\paperwidth}{176mm} \setlength{\hoffset}{-1in} \setlength{\voffset}{-1in} - \setlength{\topmargin}{8,8mm} - \setlength{\oddsidemargin}{22,5mm} - \setlength{\evensidemargin}{22,5mm} - \setlength{\headheight}{4,6mm} - \setlength{\headsep}{4,6mm} + \setlength{\topmargin}{8.8mm} + \setlength{\oddsidemargin}{22.5mm} + \setlength{\evensidemargin}{22.5mm} + \setlength{\headheight}{4.6mm} + \setlength{\headsep}{4.6mm} \setlength{\textheight}{210mm} \setlength{\textwidth}{131mm} \setlength{\marginparsep}{1mm} @@ -471,18 +471,18 @@ % Chapter numbering formats \newcommand{\@seccntformat@part}{% - {\partname~\thepart}\hspace{0,5em}% + {\partname~\thepart}\hspace{0.5em}% } \newcommand{\@seccntformat@chapter}{% - {\thechapter}.\hspace{0,5em}% + {\thechapter}.\hspace{0.5em}% } \newcommand{\@seccntformat@section}{% - {\thesection}\hspace{0,5em}% + {\thesection}\hspace{0.5em}% } -\newcommand{\@seccntformat@subsection}{{\thesubsection}\hspace{0,5em}} -\newcommand{\@seccntformat@subsubsection}{{\thesubsubsection}\hspace{0,5em}} -\newcommand{\@seccntformat@paragraph}{{\theparagraph}\hspace{0,5em}} -\newcommand{\@seccntformat@subparagraph}{{\thesubparagraph}\hspace{0,5em}} +\newcommand{\@seccntformat@subsection}{{\thesubsection}\hspace{0.5em}} +\newcommand{\@seccntformat@subsubsection}{{\thesubsubsection}\hspace{0.5em}} +\newcommand{\@seccntformat@paragraph}{{\theparagraph}\hspace{0.5em}} +\newcommand{\@seccntformat@subparagraph}{{\thesubparagraph}\hspace{0.5em}} \renewcommand{\@seccntformat}[1]{% \csname @seccntformat@#1\endcsname% } @@ -1013,11 +1013,13 @@ \noindent {\@listofpapersintro}\vspace{1\baselineskip}% \setcounter{listofpapersc}{0}% \begin{list}{\Roman{listofpapersc}}{% - \def\@currentlabel{\Roman{listofpapersc}}% - \UU@RaggedRight% - \hyphenpenalty=10000% + \def\@currentlabel{\Roman{listofpapersc}}% + \UU@RaggedRight% + % default penalty for undesirable hyphenation is 50 (this setting is LuaTeX specific) + % https://tex.stackexchange.com/a/586405 + % \hyphenpenalty=10% changed from 10000 to 10 caused no appreciable difference \usecounter{listofpapersc}% - \setlength{\leftmargin}{2,5em}% + \setlength{\leftmargin}{2.5em}% \setlength{\labelsep}{1em}% \setlength{\itemsep}{1em plus 0.2em minus 0.2em}% \setlength{\parsep}{0mm}% @@ -1028,6 +1030,69 @@ } +% ============================================ +% List of contributions +% ============================================ + +\providecommand{\listofcontributionsname}{List of contributions} +\providecommand{\listofcontributionsintro}[1]{\gdef\@listofcontributionsintro{#1}} +\providecommand{\listofcontributionsoutro}[1]{\gdef\@listofcontributionsoutro{#1}} +\listofcontributionsintro{Other contributions, not part of the thesis.}% +\listofcontributionsoutro{Contributions listed above.} + +\providecommand{\pgs@language@swedish}{% + \renewcommand{\listofcontributionsname}{Lista \"over andra bidrag}% + \listofcontributionsintro{Andra bidrag.}% + \listofcontributionsoutro{Bidrag listade ovan.}% + \renewcommand{\continuednextpage}{Fortsatt p\r{a} n\"a{}sta sida}% +} + +\providecommand{\pgs@language@english}{% + \renewcommand{\listofcontributionsname}{List of contributions}% + \listofcontributionsintro{Other contributions, not part of the thesis.}% + \listofcontributionsoutro{Contributions listed above.}% + \renewcommand{\continuednextpage}{Continued on next page}% +} + +\AtBeginDocument{% + \@ifpackageloaded{babel}{% + \addto\captionsswedish{% + \pgs@language@swedish + }% + \addto\captionsenglish{% + \pgs@language@english + }% + }{}% + \@ifpackageloaded{polyglossia}{% + \renewcommand{\xpg@hook@setlanguage}{\csname pgs@language@\languagename \endcsname} + \xpg@hook@setlanguage% + }{}% +} + +\newcounter{listofcontributionsc} +\renewcommand{\thelistofcontributionsc}{\arabic{listofcontributionsc}} +\newenvironment{listofcontributions}{% + % \clearpage% + \@ifundefined{pdfbookmark}{}{\pdfbookmark[0]{\listofcontributionsname}{loc}}% + \chapter*{\listofcontributionsname}% + \noindent {\@listofcontributionsintro}\vspace{1\baselineskip}% + \setcounter{listofcontributionsc}{0}% + \begin{list}{\arabic{listofcontributionsc}}{% + \def\@currentlabel{\arabic{listofcontributionsc}}% + \UU@RaggedRight% + \usecounter{listofcontributionsc}% + \setlength{\leftmargin}{2.5em}% + \setlength{\labelsep}{1em}% + \setlength{\itemsep}{1em plus 0.2em minus 0.2em}% + \setlength{\parsep}{0mm}% + \setlength{\topsep}{0mm}}% +}{% + \end{list}\nopagebreak% + \vspace{1\baselineskip}\noindent {\@listofcontributionsoutro}% +} + + + % ============================================ % Dummy pages % ============================================