DTU Cover
Author
DTU LaTeX support
Last Updated
6 yıl önce
License
Creative Commons CC BY 4.0
Abstract
\documentclass[b5paper]{article}
\usepackage[english]{babel}
\usepackage{verbatim,ifthen,xspace,blindtext,datetime}
\RequirePackage{ifxetex}
\ifxetex
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Scale=MatchUppercase]{TimesNewRomanPSMT}
\setsansfont[Ligatures=TeX,Scale=MatchUppercase]{Arial}
\else
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\fi
%
\usepackage[%
% department=mekanik, % select your department
% bgcolor=dtulightgreen, % the colour of the tiles
% licolor=dtured % the colour of the line
]{dtucover}
%
% We start by drawing the cover page and putting test onto it
\AtBeginDocument{
\dtucoverThreeTiles % make the title page background
\dtucoverTitleText %
[Description of the options and examples] % This is the subtitle
{The \texttt{dtucover} package} % This is the title
{Manual} % This is the report type
{Jorrit Wronski \\ DTU Mechanical Engineering \\ \monthname{} \the\year} % This is the author information
\clearpage
}
% ... and at the end, we need the back cover
\AtEndDocument{
\clearpage
\dtucoverBackMatter%
[ Gadenavn 00 \\ Evt. Post Box 000 \\ 0000 Bynavn \\ Tlf. 00000000 \\ Fax 00000000 \\~ \\ www.institut.dtu.dk]%
[\blindtext]%
[\textbf{Partner Corporation} \\ ~ \\ Gadenavn 11 \\ Evt. Post Box 111 \\ 1111 Bynavn \\ Tlf. 11111111 \\ Fax 11111111 \\~ \\ www.partner.dtu.dk ]%
}
\begin{document}
\section{Introduction}
There are some recommendations from DTU regarding the design of cover pages and titles for reports. At DTU Mechanical Engineering, those are also used for
student theses and other material. Hence the need to include such pages in your own documents. This package implements only one of the recommended designs,
but more could be implemented if needed. The package uses both commands and package options to customise the appearance of cover and back page.
\section{Package Options}
Some basic settings can be made when the package gets loaded. The three available options are listed below together with some explanatory text.
\begin{itemize}
\item \texttt{department} specifies the department or institute. It selects the correct department logo and text. Possible values are: \verb|admin|, \verb|aqua|, \verb|byg|, \verb|compute|, \verb|elektro|, \verb|energikonvertering|, \verb|fotonik|, \verb|fysik|, \verb|food|, \verb|kemi|, \verb|kemiteknik|, \verb|management|, \verb|mekanik|, \verb|miljo|, \verb|nanotek|, \verb|space|, \verb|systembiologi|, \verb|transport|, \verb|veterinaerinstituttet|, \verb|vindenergi|. The default value is \verb|admin|.
\item \texttt{bgcolor} specifies the colour used for the tiles on the front cover page and the background of the back cover. You can use any colour name that has been defined in your document. Please have a look at \texttt{dtucolours.sty} for a list of DTU colours. The default value is \texttt{dtulightblue} \textcolor{dtulightblue}{\rule{10pt}{10pt}}.
\item \texttt{licolor} is the colour of the lines on the front cover and the back cover. You can use any colour name that has been defined in your document. Please have a look at \texttt{dtucolours.sty} for a list of DTU colours. It defaults to \texttt{dtuorange} \textcolor{dtuorange}{\rule{10pt}{10pt}}.
\end{itemize}
\section{Package Commands}
\begin{itemize}
\item \texttt{\textbackslash dtucoverThreeTiles[depImage][covImage]} \\
This command draws the background with the horizontal line and the DTU logo. If available, it also puts the logo of the
department in the bottom left corner of the frontpage. The first optional parameter \texttt{depImage} can be used to
specify a custom image. On top of these elements, it draws the two almost quadratic tiles
(you can change their colour with the \texttt{bgcolor} option). In the end, it puts an image on the right hand side using
the department's "frise" by default. Customise this by using the second optional parameter \texttt{covImage}.
\item \texttt{\textbackslash dtucoverTitleText[subtitle]\{title\}\{type\}\{author\}} \\
A command to add text to the cover background. It uses an optional parameter for the \texttt{subtitle} and
requires you to provide \texttt{title}, \texttt{type} and \texttt{author} to specify the details of your report. Note that
the fields can contain line breaks.
\item \texttt{\textbackslash dtucoverBackMatter[contact][backtext][addInfo]} \\
Draw the background for the back cover and add some text to it. It automatically adds the name of the institute and the
university in the bottom left corner, but you can provide additional contact information with the optional \texttt{contact}
parameter. You can also add some closing text or a synopsis to the top of the page by using the \texttt{backtext} parameter.
In case you have a cooperation partner or organisation, you can specify a second contact block with \texttt{addInfo}. All
three parameters can contain line breaks and other advanced \LaTeX{} commands.
\end{itemize}
\section{Examples}
\begin{figure}
\centering
\IfFileExists{doc_dtucover_adm.pdf}{ %
\includegraphics[width=.2\linewidth,page=1]{doc_dtucover_adm} %
\includegraphics[width=.2\linewidth,page=2]{doc_dtucover_adm} %
}{ %
\typeout{ }
\typeout{------------------------------------------------------------------------------}
\typeout{Cannot find doc_dtucover_adm.pdf, rerun with the -shell-escape option.}
} %
\quad %
\IfFileExists{doc_dtucover_mek_col_img.pdf}{ %
\includegraphics[width=.2\linewidth,page=1]{doc_dtucover_mek_col_img} %
\includegraphics[width=.2\linewidth,page=2]{doc_dtucover_mek_col_img} %
}{ %
\typeout{Cannot find doc_dtucover_mek_col_img.pdf, rerun with the -shell-escape option.}
\typeout{------------------------------------------------------------------------------}
\errmessage{You are missing some important files}
} %
\caption{An example of the default settings and a customised cover}\label{fig:ex}
\end{figure}
The impact of the customisation options described above is illustrated in Fig.~\ref{fig:ex}. On the left hand side there is the
default cover page with the general DTU "frise" and the blue and orange colours, while the right hand side shows a cover with
custom colours and specific images for the Department of Mechanical Engineering. You could also add completely different pictures.
The default example uses the command \texttt{\textbackslash usepackage\{dtucover\}} to load the package and the
second example was created with \texttt{\textbackslash usepackage[department=mekanik, bgcolor=dtulightgreen, licolor=dtured]\{dtucover\}}.
\end{document}