Skip to content

Commit

Permalink
Support for a3 pages in the middle of the document with the new envir…
Browse files Browse the repository at this point in the history
…onemtnt "newpdflayout". See example in Appendix 2.
  • Loading branch information
joaomlourenco committed Sep 30, 2023
1 parent d5c52ad commit a80d532
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 37 deletions.
3 changes: 3 additions & 0 deletions Chapters/appendix2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@

\typeout{NT FILE appendix2.tex}%

\begin{newpdflayout}{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]

\end{newpdflayout}
12 changes: 10 additions & 2 deletions NOVAthesisFiles/Schools/uminho/cover-final.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@
)%

\let\oldstockwidth=\stockwidth
\begin{newlayout}{\stockheight}{2\stockwidth+\myspinewidth}%
\begin{newpdflayout}[%
\settrims{0pt}{0pt}%
\setlrmarginsandblock{0pt}{*}{*}%
\setulmarginsandblock{0pt}{*}{*}%
\setlength{\parskip}{0pt}%
\setheadfoot{0pt}{0pt}%
\setheaderspaces{*}{0pt}{*} %
\setmarginnotes{0pt}{0pt}{0pt}%
]{\stockheight}{2\stockwidth+\myspinewidth}%
% \noindent% \Huge HELLO
\begin{tikzpicture}[remember picture, overlay, transform shape]
% BACKGROUND
Expand Down Expand Up @@ -139,5 +147,5 @@
};
\end{tikzpicture}

\end{newlayout}
\end{newpdflayout}

4 changes: 2 additions & 2 deletions NOVAthesisFiles/nt-version.sty
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
\newcommand*{\novathesisversion}{7.1.5}
\newcommand*{\novathesisdate}{2023-08-14}
\newcommand*{\novathesisversion}{7.1.6}
\newcommand*{\novathesisdate}{2023-09-30}
66 changes: 34 additions & 32 deletions novathesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%% To view a copy of this license, visit
%% https://www.latex-project.org/lppl/lppl-1-3c/
%%
%% Version 2023-08-14 [7.1.5]
%% Version 2023-09-30 [7.1.6]
%% Departamento de Informática (www.di.fct.unl.pt)
%% Faculdade de Ciências e Tecnologia (www.fct.unl.pt)
%% Universidade NOVA de Lisboa (www.unl.pt)
Expand Down Expand Up @@ -61,7 +61,7 @@
%%% WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ProvidesClass{novathesis}[2023-08-14 novathesis template]
\ProvidesClass{novathesis}[2023-09-30 novathesis template]
\NeedsTeXFormat{LaTeX2e}[2020-02-02]


Expand Down Expand Up @@ -2221,44 +2221,46 @@
\ifoptionequal{/novathesis/media}{paper}{\openright}{}%
}

\newenvironment{newlayout}[2]{%
\clearpage%
% \typeout{V=#1 H=#2}\aaaa
\@tempdima=\dimexpr#1\relax%
\@tempdimb=\dimexpr#2\relax%
% \showthe\@tempdima \showthe\@tempdimb
\setstocksize{\the\@tempdima}{\the\@tempdimb}%
\settrimmedsize{\stockheight}{\stockwidth}{*}%
\settrims{0pt}{0pt}%
\setlrmarginsandblock{0pt}{*}{*}%
\setulmarginsandblock{0pt}{*}{*}%
\setlength{\parskip}{0pt}%
\setheadfoot{0pt}{0pt}%
\setheaderspaces{*}{0pt}{*} %
\setmarginnotes{0pt}{0pt}{0pt}%
\checkandfixthelayout[fixed]%
%
\ifluatex%
\pageheight=\stockheight\relax% \pageheight=3in
\pagewidth=\stockwidth\relax% \pageheight=3in
\else%
\pdfpageheight=\stockheight\relax% \pdfpageheight=3in
\pdfpagewidth=\stockwidth\relax% \pdfpageheight=3in
\fi%
\setlength{\@colht}{\textheight}%
\newcommand*{\setpdftexpagesize}{%
\ifundef{\pdfpagewidth}{%
\ifundef{\pagewidth}{}{\pagewidth=\paperwidth}%
}{\pdfpagewidth=\paperwidth}%
\ifundef{\pdfpageheight}{%
\ifundef{\pageheight}{}{\pageheight=\paperheight}%
}{\pdfpageheight=\paperheight}%
}

\newenvironment{newpdflayout}[3][]{%
\clearforchapter
\begingroup
\setstocksize{#2}{#3}
\settrimmedsize{#2}{#3}{*}
\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)}%
{*}%
#1%
\checkandfixthelayout[fixed]
\setpdftexpagesize
% From geometry
\setlength{\@colht}{\textheight}
\setlength{\@colroom}{\textheight}%
\setlength{\vsize}{\textheight}%
\setlength{\vsize}{\textheight}
\setlength{\columnwidth}{\textwidth}%
\if@twocolumn%
\advance\columnwidth-\columnsep%
\advance\columnwidth-\columnsep
\divide\columnwidth\tw@%
\@firstcolumntrue%
\fi%
\setlength{\hsize}{\columnwidth}%
\setlength{\linewidth}{\hsize}%
}{%
\clearpage%
}
}{\clearforchapter\endgroup}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
2 changes: 1 addition & 1 deletion template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%% To view a copy of this license, visit
%% https://www.latex-project.org/lppl/lppl-1-3c/
%%
%% Version 2023-08-14 [7.1.5]
%% Version 2023-09-30 [7.1.6]
%% Departamento de Informática (www.di.fct.unl.pt)
%% Faculdade de Ciências e Tecnologia (www.fct.unl.pt)
%% Universidade NOVA de Lisboa (www.unl.pt)
Expand Down

0 comments on commit a80d532

Please sign in to comment.