diff --git a/example/example.tex b/example/example.tex index 06553152b437d28822d8eccbdef2083344ef68fd..a9011522b4f437d383e87c86a940a9efb84b9003 100644 --- a/example/example.tex +++ b/example/example.tex @@ -18,12 +18,12 @@ \setDocCheckers{ \addPerson{Checker 1}{A place}{today} - \addPerson{Checker 2 Swinbank}{Another place}{tomorrow} + \addPerson{Checker 2}{Another place}{Tomorrow} } \setDocApprovers{ - \addPerson{Approver 1}{A place}{today} - \addPerson{Approver 2}{Another place}{tomorrow} + \addPerson{Approver 1}{A place}{Today} + \addPerson{Approver 2}{Another place}{Tomorrow} } \setDocAuthorizers{ diff --git a/texmf/tex/latex/astron/astron.cls b/texmf/tex/latex/astron/astron.cls index aee573eba6c254c7630a9de294f5c217827e8c55..8d763303f79ceacc82a14d3fcb5a710becd92fd8 100644 --- a/texmf/tex/latex/astron/astron.cls +++ b/texmf/tex/latex/astron/astron.cls @@ -7,15 +7,27 @@ \LoadClass[a4paper,12pt,twoside]{article} +\newlength{\topMargin} +\newlength{\bottomMargin} +\newlength{\sideMargin} +\setlength{\topMargin}{3.5cm} +\setlength{\bottomMargin}{3.5cm} +\setlength{\sideMargin}{2cm} + \RequirePackage{graphicx} \RequirePackage{geometry} -\geometry{tmargin=3.5cm,bmargin=3.5cm,lmargin=2cm,rmargin=2cm,headheight=52.05211pt} \RequirePackage{fancyhdr} \RequirePackage{lastpage} \RequirePackage{longtable} \RequirePackage[absolute]{textpos} \RequirePackage{tabularx} +\geometry{tmargin=\topMargin, + bmargin=\bottomMargin, + lmargin=\sideMargin, + rmargin=\sideMargin, + headheight=52.05211pt} + \setlength{\parindent}{0cm} % No indent at start of paragraphs \setlength{\parskip}{\baselineskip} % Blank line between paragraph @@ -149,70 +161,63 @@ % Construct the title page, history, etc. % \renewcommand{\maketitle}{ -~\\ +\vspace*{4cm} \begin{center} -\vspace{3cm} \LARGE\textbf{\docTitle{}} -\vspace{4cm} \end{center} -\newlength{\mylength} -\settoheight{\mylength}{% -\begin{tabularx}{\textwidth}{|p{0.35\textwidth}|p{0.35\textwidth}|X|} -\cline{2-3} \cline{3-3} -\multicolumn{1}{c|}{} & \textbf{\footnotesize{}Organisatie / Organization} & \textbf{\footnotesize{}Datum / Date}\tabularnewline -\hline -\textbf{\footnotesize{}Auteur(s) / Author(s):\vspace{0.2cm}} & & \tabularnewline -\docAuthors -\hline -\textbf{\footnotesize{}Controle / Checked:\vspace{0.2cm}} & & \tabularnewline -\docCheckers -\hline -\textbf{\footnotesize{}Goedkeuring / Approval:\vspace{0.2cm}} & & \tabularnewline -\docApprovers -\hline -\textbf{\footnotesize{}Autorisatie / Authorization:} & & \tabularnewline -\docAuthorizers -\textbf{\footnotesize{}Handtekening / Signature:\vspace{1cm}} & & \tabularnewline -\hline -\end{tabularx} -} - -\begin{textblock*}{1\textwidth}(2cm,\dimexpr25.2cm-2\mylength+\fboxsep) -\begin{tabularx}{\textwidth}{|p{0.35\textwidth}|p{0.35\textwidth}|X|} -\cline{2-3} \cline{3-3} -\multicolumn{1}{c|}{} & \textbf{\footnotesize{}Organisatie / Organization} & \textbf{\footnotesize{}Datum / Date}\tabularnewline -\hline -\textbf{\footnotesize{}Auteur(s) / Author(s):\vspace{0.2cm}} & & \tabularnewline -\docAuthors -\hline -\textbf{\footnotesize{}Controle / Checked:\vspace{0.2cm}} & & \tabularnewline -\docCheckers -\hline -\textbf{\footnotesize{}Goedkeuring / Approval:\vspace{0.2cm}} & & \tabularnewline -\docApprovers -\hline -\textbf{\footnotesize{}Autorisatie / Authorization:} & & \tabularnewline -\docAuthorizers -\textbf{\footnotesize{}Handtekening / Signature:\vspace{1cm}} & & \tabularnewline -\hline -\end{tabularx} +% This position was determined by trial and error; a bit unsatisfying. +\newlength{\copyrightBoxPosition} +\setlength{\copyrightBoxPosition}{25.2cm} + +% Add the copyright notice towards the bottom of the page. +\begin{textblock*}{1\textwidth}(\sideMargin, \copyrightBoxPosition) + \fbox{% + \begin{minipage}{\dimexpr\linewidth-2\fboxrule-2\fboxsep} + \begin{center} + \begin{small} + \textcopyright{} ASTRON 2020.\\ + All rights are reserved. Reproduction in whole or in part is\\ + prohibited without written consent of the copyright owner. + \end{small} + \end{center} + \end{minipage}% + } \end{textblock*} +\newcommand{\authorTable}{% + \begin{tabularx}{\textwidth}{|p{0.35\textwidth}|p{0.35\textwidth}|X|} + \cline{2-3} \cline{3-3} + \multicolumn{1}{c|}{} & + \textbf{\footnotesize{}Organisatie / Organization} & + \textbf{\footnotesize{}Datum / Date} \tabularnewline + \hline + \textbf{\footnotesize{}Auteur(s) / Author(s):\vspace{0.2cm}} & & \tabularnewline + \docAuthors + \hline + \textbf{\footnotesize{}Controle / Checked:\vspace{0.2cm}} & & \tabularnewline + \docCheckers + \hline + \textbf{\footnotesize{}Goedkeuring / Approval:\vspace{0.2cm}} & & \tabularnewline + \docApprovers + \hline + \textbf{\footnotesize{}Autorisatie / Authorization:} & & \tabularnewline + \docAuthorizers + \textbf{\footnotesize{}Handtekening / Signature:\vspace{1cm}} & & \tabularnewline + \hline + \end{tabularx} +} -\begin{textblock*}{1\textwidth}(2cm,25.2cm) - -\fbox -{\begin{minipage}{\dimexpr\linewidth-2\fboxrule-2\fboxsep} -\begin{center} -\begin{small} -\textcopyright{} ASTRON 2020.\\ -All rights are reserved. Reproduction in whole or in part is\\ -prohibited without written consent of the copyright owner. -\end{small} -\end{center} -\end{minipage}} +% We generate the author table once (but don't print it) to measure its height, +% then use that to position the textblock* which ultimately contains the table. +% Note the measured height is (approximately) half the full height. +\newlength{\authorTableHalfHeight} +\settoheight{\authorTableHalfHeight}{\authorTable} +\begin{textblock*}{1\textwidth}(\sideMargin, + \dimexpr\copyrightBoxPosition-2\authorTableHalfHeight+\fboxsep) +\authorTable \end{textblock*} + \clearpage \docChangeRecord{}