Skip to content
Snippets Groups Projects
Commit 0a8227a3 authored by John Swinbank's avatar John Swinbank
Browse files

Add a short mode, with no title page

parent cc5f9806
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,14 @@ ...@@ -80,6 +80,14 @@
\renewcommand{\docType}{Baseline} \renewcommand{\docType}{Baseline}
\@hastypetrue \@hastypetrue
} }
% Short documents don't have a title page; just stick the title next to the logo on the first page.
\newif\if@shortDoc
\@shortDocfalse
\DeclareOption{short}{
\@shortDoctrue
}
\ProcessOptions\relax \ProcessOptions\relax
% %
...@@ -182,62 +190,67 @@ ...@@ -182,62 +190,67 @@
% %
% Construct the title page, history, etc. % Construct the title page, history, etc.
% %
\renewcommand{\maketitle}{ \if@shortDoc
\vspace*{4cm} \renewcommand{\maketitle}{
\begin{center} \begin{textblock*}{0.5\textwidth}(\sideMargin, 0.98cm)
\begin{minipage}{0.7\textwidth} \Large\textbf{\docTitle{}}
\centering\LARGE\textbf{\docTitle{}}
\end{minipage}
\end{center}
% 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}
\ifthenelse{\equal{\vcsFirstYear}{\vcsLastYear}}
{\textcopyright{} ASTRON \vcsFirstYear.\\}
{\textcopyright{} ASTRON \vcsFirstYear--\vcsLastYear.\\}
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*}
% 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}
\if@hastype
\newlength{\docTypeHalfHeight}
\settoheight{\docTypeHalfHeight}{\docTypeDescription}
\begin{textblock*}{1\textwidth}(\sideMargin,
\dimexpr\copyrightBoxPosition-2\docTypeHalfHeight+\fboxsep)
\docTypeDescription
\end{textblock*} \end{textblock*}
}
\else
\renewcommand{\maketitle}{
\vspace*{4cm}
\begin{center}
\begin{minipage}{0.7\textwidth}
\centering\LARGE\textbf{\docTitle{}}
\end{minipage}
\end{center}
\begin{textblock*}{1\textwidth}(\sideMargin, % This position was determined by trial and error; a bit unsatisfying.
\dimexpr\copyrightBoxPosition-2\docTypeHalfHeight-2\authorTableHalfHeight+2\fboxsep) \newlength{\copyrightBoxPosition}
\authorTable \setlength{\copyrightBoxPosition}{25.2cm}
\end{textblock*}
\else % Add the copyright notice towards the bottom of the page.
\begin{textblock*}{1\textwidth}(\sideMargin, \begin{textblock*}{1\textwidth}(\sideMargin, \copyrightBoxPosition)
\dimexpr\copyrightBoxPosition-2\authorTableHalfHeight+\fboxsep) \fbox{%
\authorTable \begin{minipage}{\dimexpr\linewidth-2\fboxrule-2\fboxsep}
\begin{center}
\begin{small}
\ifthenelse{\equal{\vcsFirstYear}{\vcsLastYear}}
{\textcopyright{} ASTRON \vcsFirstYear.\\}
{\textcopyright{} ASTRON \vcsFirstYear--\vcsLastYear.\\}
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*} \end{textblock*}
\fi
% 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}
\clearpage \if@hastype
\newlength{\docTypeHalfHeight}
\settoheight{\docTypeHalfHeight}{\docTypeDescription}
\begin{textblock*}{1\textwidth}(\sideMargin,
\dimexpr\copyrightBoxPosition-2\docTypeHalfHeight+\fboxsep)
\docTypeDescription
\end{textblock*}
\changeRecord \begin{textblock*}{1\textwidth}(\sideMargin,
} \dimexpr\copyrightBoxPosition-2\docTypeHalfHeight-2\authorTableHalfHeight+2\fboxsep)
\authorTable
\end{textblock*}
\else
\begin{textblock*}{1\textwidth}(\sideMargin,
\dimexpr\copyrightBoxPosition-2\authorTableHalfHeight+\fboxsep)
\authorTable
\end{textblock*}
\fi
\clearpage
\changeRecord
}
\fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment