Skip to content

Commit

Permalink
Fixes #497.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomlourenco committed Mar 28, 2024
1 parent a5cecc0 commit 690fc60
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Chapters/appendix1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ \chapter{\emph{NOVAthesis} covers showcase}
% cover-ips-ests-msc,
% cover-other-mscgt-msc%
% }

\lipsum[1-20]

\section{A section here}

\lipsum[1-20]
6 changes: 4 additions & 2 deletions Chapters/appendix2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@

\typeout{NT FILE appendix2.tex}%

\begin{newpdflayout}{297mm}{420mm}
\begin{newpdflayout}{210mm}{297mm}%{420mm}

\chapter{Appendix 2 Lorem Ipsum}
\label{app:lorem_ipsum2}

This is a test with citing something~\cite{ecoop12-dias} in the appendix.

\lipsum[1-5]
\lipsum[1-10]

\end{newpdflayout}

\lipsum[1-10]
50 changes: 48 additions & 2 deletions novathesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1270,12 +1270,20 @@

% --------------------------------------------------------
% Customize the pagestyle
\newcommand{\rightorleftmark}{%
\setbox0=\hbox{\rightmark}
\ifdim\wd0>0.1pt\relax
\rightmark
\else
\leftmark
\fi
}
\makepagestyle{novathesis@mainmatter}
\makeoddfoot{novathesis@mainmatter}{}{\thepage}{}
\makeevenfoot{novathesis@mainmatter}{}{\thepage}{}
\makeheadrule{novathesis@mainmatter}{\textwidth}{\normalrulethickness}
\makeevenhead{novathesis@mainmatter}{\small\textsc{\leftmark}}{}{}
\makeoddhead{novathesis@mainmatter}{}{}{\small\textsc{\rightmark}}
\makeoddhead{novathesis@mainmatter}{}{}{\small\rightorleftmark}

\makepagestyle{novathesis@frontmatter}
\makeoddfoot{novathesis@frontmatter}{}{\thepage}{}
Expand Down Expand Up @@ -2236,6 +2244,11 @@
}

\newenvironment{newpdflayout}[3][]{%
% \typeout{textheight=\the\textheight}
% \typeout{textwidth=\the\textwidth}
% \AAAA
\let\oldstockheight=\stockheight
\let\oldstockwidth=\stockwidth
\clearforchapter
\begingroup
\setstocksize{#2}{#3}
Expand All @@ -2254,6 +2267,38 @@
\checkandfixthelayout[fixed]
\setpdftexpagesize
% From geometry
% \typeout{textheight=\the\textheight}
% \typeout{textwidth=\the\textwidth}
% \BBBB
\setlength{\@colht}{\textheight}
\setlength{\@colroom}{\textheight}%
\setlength{\vsize}{\textheight}
\setlength{\columnwidth}{\textwidth}%
\if@twocolumn%
\advance\columnwidth-\columnsep
\divide\columnwidth\tw@%
\@firstcolumntrue%
\fi%
\setlength{\hsize}{\columnwidth}%
\setlength{\linewidth}{\hsize}%
}{%
\clearforchapter%
\endgroup%
\setstocksize{\oldstockheight}{\oldstockwidth}
\settrimmedsize{\oldstockheight}{\oldstockwidth}{*}
\paperwidth=\stockwidth
\paperheight=\stockheight
\setlrmarginsandblock%
{\themargin(\option{/novathesis/media},left)}%
{\themargin(\option{/novathesis/media},right)}%
{*}%
\setulmarginsandblock%
{\themargin(\option{/novathesis/media},top)}%
{\themargin(\option{/novathesis/media},bottom)}%
{*}%
\checkandfixthelayout[fixed]
\setpdftexpagesize
% From geometry
\setlength{\@colht}{\textheight}
\setlength{\@colroom}{\textheight}%
\setlength{\vsize}{\textheight}
Expand All @@ -2265,7 +2310,8 @@
\fi%
\setlength{\hsize}{\columnwidth}%
\setlength{\linewidth}{\hsize}%
}{\clearforchapter\endgroup}
\clearforchapter%
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit 690fc60

Please sign in to comment.