454 lines
16 KiB
TeX
454 lines
16 KiB
TeX
%%%
|
|
%%% based on DMD - LaTeX Document Style v0.2, 2002
|
|
%%% edited by J.A. van den Born, 2021
|
|
%%%
|
|
% Declare that this style file requires at least LaTeX version 2e.
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
% Provide the name of your page, the date it was last updated, and a comment about what it's used for
|
|
\ProvidesPackage{micado}[2021/03/09 MICADO document housestyle]
|
|
|
|
% Document preamble, adds useful packages and sets up the document.
|
|
|
|
%FONT AND TYPESETTING
|
|
\usepackage[english]{babel} % makes latex aware of your language, so better hyphenating etc
|
|
\usepackage[T1]{fontenc} % use the T1 for proper searching and use of ligatures etc
|
|
\usepackage[utf8]{inputenc} % use UTF8 encoding for reading source code
|
|
\usepackage{helvet} % use the helvetica font. This is very similar to the Arial font
|
|
% used in the Office templates.
|
|
\usepackage{inconsolata} % use the inconsolata font for code as it looks nice.
|
|
\renewcommand{\familydefault}{\sfdefault} % set the text font to helvetica
|
|
\usepackage{microtype} % enables microtypesetting
|
|
\usepackage{csquotes} % package for writing quotes. Used by 'babel'.
|
|
|
|
%PAGE LAYOUT
|
|
\usepackage{geometry} % adjusts page layout including margins
|
|
\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=5cm} % the page geometry as defined, A4=210x297mm
|
|
|
|
%MATHS
|
|
\usepackage{mathtools} % for the rendering of maths, mathtools includes amsmath
|
|
\numberwithin{equation}{section} % reset numbering within a structural object
|
|
\numberwithin{figure}{section} % reset numbering within a structural object
|
|
|
|
%SCIENCE
|
|
\usepackage{siunitx} % typesetting of units and quantities with uncertainties etc
|
|
\sisetup{detect-all, detect-weight=true, detect-family=true} % if the rest of the text is bold the units will be as well
|
|
\sisetup{range-units=single} % don't include units in both parts of an \SIrange
|
|
\sisetup{multi-part-units=single} % don't repeat units for multi-part numbers such as numbers with uncertainties
|
|
\sisetup{separate-uncertainty} % list values with uncertanties as X\pm Y rather than X(Y).
|
|
|
|
%FIGURES AND TABLES
|
|
\usepackage[labelfont=bf]{caption} % adds bold labels, but normal captions for the figures and tables.
|
|
\usepackage{graphicx} % for the rendering of floating graphics
|
|
\usepackage{array} % for creating tables
|
|
\usepackage{booktabs} % professional looking tables, provides /toprule etc
|
|
\usepackage{longtable} % for creating tables that continue on the next page
|
|
\usepackage{chngcntr} % for labeling tables such that the section number is included
|
|
\counterwithin{table}{section} % change 'section' to 'subsection' or 'subsubsection' if desired.
|
|
|
|
% PROGRAMMING CODE
|
|
\usepackage{listings} % for nicely rendering programming code
|
|
\lstloadlanguages{csh, python}
|
|
\usepackage{xcolor}
|
|
\definecolor{codegreen}{rgb}{0,0.6,0}
|
|
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
|
|
\definecolor{codepurple}{rgb}{0.58,0,0.82}
|
|
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
|
|
|
|
% Defining the way code looks in the document
|
|
\lstdefinestyle{mystyle}{
|
|
backgroundcolor=\color{backcolour},
|
|
commentstyle=\color{codegreen},
|
|
keywordstyle=\color{magenta},
|
|
numberstyle=\tiny\color{codegray},
|
|
stringstyle=\color{codepurple},
|
|
basicstyle=\ttfamily\footnotesize,
|
|
breakatwhitespace=false,
|
|
breaklines=true,
|
|
captionpos=b,
|
|
keepspaces=true,
|
|
numbers=left,
|
|
numbersep=5pt,
|
|
showspaces=false,
|
|
showstringspaces=false,
|
|
showtabs=false,
|
|
tabsize=2
|
|
}
|
|
\lstset{style=mystyle}
|
|
|
|
|
|
%BIBLIOGRAPHY
|
|
% relies on .bib files of the applicable documents and the reference documents to be in the right place.
|
|
\usepackage[backend=biber, style=numeric, sorting=none, defernumbers=true, date=short]{biblatex}
|
|
\usepackage{biblatex-ext-tabular} % For generating references in a table.
|
|
\addbibresource{references/ApplicableDocuments.bib}
|
|
\addbibresource{references/ReferenceDocuments.bib}
|
|
|
|
%Function that automatically adds keyword to all Reference Documents
|
|
\DeclareSourcemap{
|
|
\maps[datatype=bibtex]{
|
|
\map[overwrite]{
|
|
\perdatasource{references/ReferenceDocuments.bib}
|
|
\step[fieldset=keywords, fieldvalue={,RD}, append]
|
|
}
|
|
}
|
|
}
|
|
% Function that enables applicable documents to appear without citation, using \nocite(*)
|
|
\DeclareSourcemap{
|
|
\maps[datatype=bibtex]{
|
|
\map{
|
|
\step[nocited, final]
|
|
\step[fieldsource=keywords, notmatch={RD}, final]
|
|
% \step[entrynull]
|
|
}
|
|
}
|
|
}
|
|
|
|
% % \makeatletter
|
|
% % \def\fixextblx@setrefcontext{%
|
|
% % \expandafter\blx@setdefaultrefcontext\expandafter{\abx@field@entrykey}}
|
|
|
|
% % Defines the function that prints references in a table
|
|
% \defbibtabular{bibtabular}{
|
|
% \begin{center}
|
|
% % \setlength\LTleft{10pt}
|
|
% % \setlength\LTright{0pt}
|
|
% \begin{longtable}{@{\extracolsep{\fill}}|c|p{0.3\linewidth}|p{0.3\linewidth}|c|c|@{}}
|
|
% \hline \textbf{RD Nr} & \textbf{Document Number} & \textbf{Document Title} & \textbf{Issue} & \textbf{Date}\endhead
|
|
% \hline
|
|
% }
|
|
% {
|
|
% \hline
|
|
% \end{longtable}
|
|
% \end{center}}{
|
|
% \anchorlang{%
|
|
% % \fixextblx@setrefcontext
|
|
% \printtext[labelnumberwidth]{%
|
|
% \printfield{labelprefix}%
|
|
% \printfield{labelnumber}}}
|
|
% & \plainlang{\printfield{label}}
|
|
% & \plainlang{\usebibmacro{title}} \plainlang{\usebibmacro{author}}
|
|
% & \plainlang{\printfield{issue}}
|
|
% & \plainlang{\printdate}\\ \hline}
|
|
% % \makeatother
|
|
|
|
% OTHER
|
|
\usepackage{blindtext} %to print filler text
|
|
\usepackage[printonlyused]{acronym} %for defining acronyms. Only acronyms used at least once will appear in the list.
|
|
\usepackage{hyperref, bookmark} %turns the references and citations into hyperlinks. This needs to be last on the preamble.
|
|
\hypersetup{colorlinks=true,linkcolor=black,citecolor=black,urlcolor=blue} %sets colors of links within the text.
|
|
|
|
%useful shorthands for common Astronomical Journals
|
|
\newcommand{\aap}{Astronomy \& Astrophysics}
|
|
\newcommand{\aaps}{Astronomy \& Astrophysics, Supplement}
|
|
\newcommand{\mnras}{Monthly Notices of the Royal Astronomical Society}
|
|
\newcommand{\procspie}{Proceedings of the International Society for Optical Engineering}
|
|
\newcommand{\pasp}{Publications of the Astronomical Society of the Pacific}
|
|
\newcommand{\apjs}{The Astrophysical Journal, Supplement}
|
|
\newcommand{\jatis}{Journal of Astronomical Telescopes, Instruments, and Systems}
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
% Part that sets the document layout (title page, header, etc.) %
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
\RequirePackage{epsfig}
|
|
\RequirePackage{fancyhdr}
|
|
\RequirePackage{lastpage}
|
|
\RequirePackage{mathptmx}
|
|
\RequirePackage{array}
|
|
\RequirePackage{multirow}
|
|
|
|
% Defining the package argument options
|
|
\newif\if@dmddraft
|
|
\newif\if@dmdreview
|
|
\newif\if@dmdexternal
|
|
\newif\if@openright
|
|
\newif\if@technote
|
|
\newif\if@memo
|
|
|
|
\DeclareOption{draft}{\@dmddrafttrue}
|
|
\DeclareOption{review}{\@dmdreviewtrue}
|
|
\DeclareOption{external}{\@dmdexternaltrue}
|
|
\DeclareOption{openright}{\@openrighttrue}
|
|
\DeclareOption{openany}{\@openrightfalse}
|
|
\DeclareOption{technote}{\@technotetrue}
|
|
\DeclareOption{memo}{\@memotrue}
|
|
\ProcessOptions
|
|
|
|
\newlength\LogoWidth
|
|
\newlength\LogoHeight
|
|
\newlength\VLTheadWidth
|
|
|
|
\setlength{\LogoHeight}{2.25cm}
|
|
\setlength{\LogoWidth}{0.8\LogoHeight}
|
|
\setlength{\VLTheadWidth}{\linewidth minus \LogoWidth}
|
|
% \setlength{\topmargin}{-2.5cm}
|
|
% \setlength{\textheight}{21.8cm}
|
|
% \setlength{\textwidth}{17.1cm}
|
|
\setlength{\headwidth}{\textwidth}
|
|
\setlength{\headheight}{2.75cm}
|
|
|
|
% \setlength{\oddsidemargin}{-3.0mm}
|
|
% \setlength{\evensidemargin}{-3.0mm}
|
|
% \setlength{\marginparwidth}{1.4cm}
|
|
% \setlength{\marginparsep}{1.0mm}
|
|
|
|
|
|
% \setlength{\parindent}{0pt}
|
|
% \setlength{\parskip}{1.5ex plus 0.1ex minus 0.1ex}
|
|
|
|
\def\@dmdPreparedBy{}
|
|
\def\@dmdPreparedOn{}
|
|
\def\@dmdPreparedSig{}
|
|
\def\@dmdApprovedBy{}
|
|
\def\@dmdApprovedOn{}
|
|
\def\@dmdApprovedSig{}
|
|
\def\@dmdReleasedBy{}
|
|
\def\@dmdReleasedOn{}
|
|
\def\@dmdReleasedSig{}
|
|
\def\@dmdChangeRecord{}
|
|
|
|
\def\dmdTitle#1{\gdef\@dmdTitle{#1}}
|
|
\def\dmdDocId#1{\gdef\@dmdDocId{#1}}
|
|
\def\dmdIssue#1{\gdef\@dmdIssue{#1}}
|
|
\def\dmdDate#1{\gdef\@dmdDate{ #1}}
|
|
\def\dmdPreparedBy#1{\gdef\@dmdPreparedBy{\texttt{#1}}}
|
|
\def\dmdApprovedBy#1{\gdef\@dmdApprovedBy{\texttt{#1}}}
|
|
\def\dmdReleasedBy#1{\gdef\@dmdReleasedBy{\texttt{#1}}}
|
|
\def\dmdPreparedOn#1{\gdef\@dmdPreparedOn{\texttt{#1}}}
|
|
\def\dmdApprovedOn#1{\gdef\@dmdApprovedOn{\texttt{#1}}}
|
|
\def\dmdReleasedOn#1{\gdef\@dmdReleasedOn{\texttt{#1}}}
|
|
\def\dmdPreparedSig#1{\gdef\@dmdPreparedSig{#1}}
|
|
\def\dmdApprovedSig#1{\gdef\@dmdApprovedSig{#1}}
|
|
\def\dmdReleasedSig#1{\gdef\@dmdReleasedSig{#1}}
|
|
\def\dmdChangeRecord#1{\gdef\@dmdChangeRecord{#1}}
|
|
|
|
% Define the header title (add [DRAFT] to draft version of the document)
|
|
\if@dmddraft
|
|
\def\dmdHeaderTitle{[DRAFT] \@dmdTitle}
|
|
\fi
|
|
\if@dmdreview
|
|
\def\dmdHeaderTitle{\@dmdTitle}
|
|
\fi
|
|
\if@technote
|
|
\def\dmdHeaderTitle{Technical Note - \@dmdTitle}
|
|
\fi
|
|
\if@memo
|
|
\def\dmdHeaderTitle{Memo - \@dmdTitle}
|
|
\def\dmdPreparedBy#1{\gdef\@dmdMemoAuthor{#1}}
|
|
\fi
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
% Page header definition %
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
\fancyhead{}
|
|
\fancyfoot[C]{MICADO Consortium}
|
|
\fancyhead[C]{%
|
|
\setlength{\tabcolsep}{0.125cm}
|
|
\begin{tabular}{|p{2.cm}|p{7cm}|p{1cm}p{5.0cm}|}
|
|
\hline
|
|
\multirow{4}{1.5cm}{%
|
|
\if@memo
|
|
\parbox[c]{2cm}{\vspace{0.5mm} \centering \includegraphics[width=1.5cm]{micado_logo.png}}
|
|
\else
|
|
\parbox[c][][c]{2cm}{\centering \vspace{0.5cm} MICADO\\Consortium}
|
|
\fi
|
|
} &
|
|
\multirow{4}{7cm}{%
|
|
\centering{\large \dmdHeaderTitle}
|
|
} &
|
|
\if@memo
|
|
\small Author:\rule[1ex]{0pt}{1.1ex} & \hspace*{\fill}\small \@dmdMemoAuthor \\ %\cline{3-4}
|
|
& & \small Date:\rule[1ex]{0pt}{1.1ex} &
|
|
\hspace*{\fill}\small \@dmdDate \\ %\cline{3-4}
|
|
& & \small Page: \rule[1ex]{0pt}{1.1ex} &
|
|
\hspace*{\fill}\small \thepage\ of \pageref{LastPage}\\
|
|
& & & \\
|
|
\else
|
|
\small Doc:\rule[1ex]{0pt}{1.1ex} &
|
|
\hspace*{\fill}\small \@dmdDocId \\ %\cline{3-4}
|
|
& & \small Issue:\rule[1ex]{0pt}{1.1ex} &
|
|
\hspace*{\fill}\small \@dmdIssue \\ %\cline{3-4}
|
|
& & \small Date:\rule[1ex]{0pt}{1.1ex} &
|
|
\hspace*{\fill}\small \@dmdDate \\ %\cline{3-4}
|
|
& & \small Page: \rule[1ex]{0pt}{1.1ex} &
|
|
\hspace*{\fill}\small \thepage\ of \pageref{LastPage}\\
|
|
\fi
|
|
\hline
|
|
\end{tabular}
|
|
}
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
% Title page definition %
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
\renewcommand{\headrulewidth}{0pt}
|
|
\renewcommand{\footrulewidth}{1pt}
|
|
\pagestyle{fancy}
|
|
|
|
\newcommand{\MIChead}{%
|
|
\vspace*{-\headheight}
|
|
\vspace*{-\headsep}
|
|
\vspace*{-\topskip}
|
|
\begin{center}
|
|
\resizebox{1.32in}{1.64in}{\includegraphics{micado_logo.png}}\\
|
|
\vspace{0.5in}
|
|
{\Huge ELT -- MICADO}\\[7ex]
|
|
{\Large Phase C}
|
|
\end{center}
|
|
}
|
|
|
|
\newcommand{\dmdsignature}{%
|
|
\tabular{llllr}
|
|
\rule{4.8em}{0pt} & \rule{4.5cm}{0pt} & \rule{1.7cm}{0pt} &
|
|
\rule{3cm}{0pt} & \rule{0.7cm}{0pt} \\
|
|
Prepared: & {\hspace*{0.5em}\@dmdPreparedBy} &
|
|
{\hspace*{0.5em}\@dmdPreparedOn} &
|
|
{\hspace*{0.5em}\@dmdPreparedSig} & \\[-1.7ex]
|
|
& \multicolumn{4}{c}{\mbox{}\dotfill\mbox{}}\\[-1ex]
|
|
& {\hspace*{0.5em}\small Name} &
|
|
{\hspace*{0.5em}\small Date} &
|
|
{\hspace*{0.5em}\small Signature} & \\[1cm]
|
|
|
|
Approved: & {\hspace*{0.5em}\@dmdApprovedBy} &
|
|
{\hspace*{0.5em}\@dmdApprovedOn} &
|
|
{\hspace*{0.5em}\@dmdApprovedSig} & \\[-1.7ex]
|
|
& \multicolumn{4}{c}{\mbox{}\dotfill\mbox{}}\\[-1ex]
|
|
& {\hspace*{0.5em}\small Name} &
|
|
{\hspace*{0.5em}\small Date} &
|
|
{\hspace*{0.5em}\small Signature} & \\[1cm]
|
|
|
|
Released: & {\hspace*{0.5em}\@dmdReleasedBy} &
|
|
{\hspace*{0.5em}\@dmdReleasedOn} &
|
|
{\hspace*{0.5em}\@dmdReleasedSig} & \\[-1.7ex]
|
|
& \multicolumn{4}{c}{\mbox{}\dotfill\mbox{}}\\[-1ex]
|
|
& {\hspace*{0.5em}\small Name} &
|
|
{\hspace*{0.5em}\small Date} &
|
|
{\hspace*{0.5em}\small Signature} & \\
|
|
\endtabular}
|
|
|
|
% To generate one or multipple empty pages
|
|
\newcommand{\emptypage}[1]{%
|
|
\newpage
|
|
\thispagestyle{empty}
|
|
\vspace*{\fill}\par
|
|
\begin{center}
|
|
#1
|
|
\end{center}
|
|
\vspace*{\fill}
|
|
\clearpage}
|
|
|
|
% Define a change record table environment
|
|
\newenvironment{ChangeRecordTable}[0]{
|
|
\begin{center}
|
|
\textbf{Change record}\vspace{0.5cm}
|
|
\setlength\LTleft{0pt}
|
|
\setlength\LTright{0pt}
|
|
\begin{longtable}{@{\extracolsep{\fill}}|c|c|c|p{0.45\linewidth}|@{}}
|
|
% \begin{longtable}{@{}|c|c|c|p{0.4\linewidth}|@{}}
|
|
\hline Issue/Rev. & Date & Affected Sections & Reason/Initiation/Documents/Remarks\endhead
|
|
\hline
|
|
}
|
|
{
|
|
\hline
|
|
\end{longtable}
|
|
\end{center}}
|
|
|
|
|
|
% Generate a title page, change record table and table of contents
|
|
\newcommand{\dmdmaketitle}{%
|
|
\begin{titlepage}
|
|
\setlength{\topmargin}{-0.5cm}
|
|
\setlength{\topsep}{0pt}
|
|
\setlength{\oddsidemargin}{-3.0mm}
|
|
\setlength{\evensidemargin}{-3.0mm}
|
|
\setlength{\marginparwidth}{1.4cm}
|
|
\setlength{\marginparsep}{1.0mm}
|
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\thispagestyle{empty}
|
|
|
|
\MIChead
|
|
\vspace*{\fill}
|
|
\begin{center}
|
|
\mbox{%
|
|
\picture(10,1)(0,0)
|
|
\if@dmddraft
|
|
\unitlength1cm
|
|
\put(-5,0){\unitlength1pt\line(0,-1){6}}
|
|
\put(-5,0){\unitlength1pt\line(1,0){6}}
|
|
\put(5,0){\unitlength1pt\line(0,-1){6}}
|
|
\put(5,0){\unitlength1pt\line(-1,0){6}}
|
|
\fi
|
|
\endpicture
|
|
}
|
|
\par
|
|
\vskip0.25cm
|
|
\parbox{9.5cm}{\begin{center}\textbf{\LARGE\@dmdTitle}\end{center}}\par
|
|
\vspace{0.5cm}
|
|
\normalsize
|
|
\parbox{9.5cm}{\begin{center}\large\@dmdDocId\end{center}}\par
|
|
\vspace{0.5cm}
|
|
\parbox{9.5cm}{\begin{center}Issue: \@dmdIssue\end{center}}\par
|
|
\parbox{9.5cm}{\begin{center}Date: \@dmdDate\end{center}}\par
|
|
\mbox{%
|
|
\picture(10,1)(0,0)
|
|
\if@dmddraft
|
|
\unitlength1cm
|
|
\put(-5,0){\unitlength1pt\line(0,1){6}}
|
|
\put(-5,0){\unitlength1pt\line(1,0){6}}
|
|
\put(5,0){\unitlength1pt\line(0,1){6}}
|
|
\put(5,0){\unitlength1pt\line(-1,0){6}}
|
|
\fi
|
|
\endpicture
|
|
}
|
|
\par
|
|
\vspace*{\fill}
|
|
\if@dmddraft
|
|
\vskip0.75cm
|
|
\textbf{\Large -- DRAFT -- }\par
|
|
\vskip0.5cm
|
|
\if@dmdreview
|
|
\if@dmdexternal
|
|
\textbf{\Large -- DISTRIBUTED FOR REVIEW ONLY --}\par
|
|
\else
|
|
\textbf{\Large -- DISTRIBUTED FOR INTERNAL REVIEW --}\par
|
|
\fi
|
|
\else
|
|
\textbf{\Large -- DISTRIBUTED FOR INTERNAL USE ONLY --}\par
|
|
\fi
|
|
\vskip1.0cm
|
|
\else
|
|
\vskip3.5cm
|
|
\fi
|
|
\vspace*{\fill}
|
|
\dmdsignature
|
|
\end{center}
|
|
\vspace*{1.5cm}
|
|
\end{titlepage}
|
|
\begin{ChangeRecordTable}
|
|
\@dmdChangeRecord
|
|
\end{ChangeRecordTable}
|
|
\newpage
|
|
\tableofcontents
|
|
\newpage
|
|
}
|
|
|
|
|
|
% A technical note does not require a cover page
|
|
\if@technote
|
|
\renewcommand{\dmdmaketitle}{
|
|
\begin{ChangeRecordTable}
|
|
\@dmdChangeRecord
|
|
\end{ChangeRecordTable}
|
|
}
|
|
\fi
|
|
|
|
% A memo does not require a cover page or change record table. Neither does it have a document number
|
|
\if@memo
|
|
\renewcommand{\dmdmaketitle}{
|
|
}
|
|
\fi
|