diff --git a/example/example.tex b/example/example.tex index a9011522b4f437d383e87c86a940a9efb84b9003..1abccfa97a3995f022a1468626d0310bc0c39041 100644 --- a/example/example.tex +++ b/example/example.tex @@ -9,7 +9,7 @@ \setDocProgram{SDC} \setDocChangeRecord{ - \addtohist{1.0}{2020-11-15}{Initial release} + \addChangeRecord{1.0}{2020-11-15}{Initial release} } \setDocAuthors{ diff --git a/texmf/tex/latex/astron/astron.cls b/texmf/tex/latex/astron/astron.cls index 8d763303f79ceacc82a14d3fcb5a710becd92fd8..c4c6e3f0b278b929e320cb68b3649b113d3ff4d6 100644 --- a/texmf/tex/latex/astron/astron.cls +++ b/texmf/tex/latex/astron/astron.cls @@ -18,7 +18,6 @@ \RequirePackage{geometry} \RequirePackage{fancyhdr} \RequirePackage{lastpage} -\RequirePackage{longtable} \RequirePackage[absolute]{textpos} \RequirePackage{tabularx} @@ -64,40 +63,26 @@ % % Document history % -\newenvironment{docHistory}[0]{ - \newpage - \section*{Document History} - \begin{small} - % flush table to the left - \setlength\LTleft{0pt} - \setlength\LTright{\fill} - \addtocounter{table}{-1} - \begin{longtable}{|l|p{.13\textwidth}|p{.68\textwidth}|} - \hline - \textbf{Revision} & \textbf{Date} & \textbf{Description} \\ \hline\hline - \endfirsthead - \hline - \textbf{Revision} & \textbf{Date} & \textbf{Description} \\ \hline\hline - \endhead - \multicolumn{3}{r}{\emph{Continued on next page}} - \endfoot - \endlastfoot -}{ - \end{longtable} - \end{small} - \clearpage +\providecommand{\addChangeRecord}[3]{ #1 & #2 & #3 \tabularnewline \hline} +\newcommand{\docChangeRecord}{ +... & ... & ... \tabularnewline \hline } -\providecommand{\addtohist}[3]{ #1 & #2 & #3 \\\hline} - -\newcommand{\docChangeRecord}{} \newcommand{\setDocChangeRecord}[1]{\renewcommand{\docChangeRecord} { -\clearpage -\begin{docHistory} #1 -\end{docHistory} }} +\newcommand{\changeRecord}{% + \clearpage + \section*{Document History} + \begin{tabularx}{\textwidth}{|X|p{0.13\textwidth}|p{0.68\textwidth}|X|} + \hline + \textbf{Revision} & \textbf{Date} & \textbf{Description} \tabularnewline + \hline\hline + \docChangeRecord + \end{tabularx} + \clearpage +} % % Define authors, approvers, etc for the front page @@ -136,6 +121,29 @@ #1 }} +\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} +} + % % Define headers and footers % @@ -185,29 +193,6 @@ } \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} -} - % 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. @@ -220,5 +205,5 @@ \clearpage -\docChangeRecord{} +\changeRecord }