| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2022-2023 by Jan Eike Suchard |
| 4 |
% |
| 5 |
% This file may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either |
| 7 |
% version 1.3c of this license or (at your option) any later |
| 8 |
% version. The latest version of this license is in: |
| 9 |
% |
| 10 |
% http://www.latex-project.org/lppl.txt |
| 11 |
% |
| 12 |
% and version 1.3c or later is part of all distributions of |
| 13 |
% LaTeX version 2005/12/01 or later. |
| 14 |
% |
| 15 |
% \fi |
| 16 |
% |
| 17 |
% \iffalse |
| 18 |
%<*driver> |
| 19 |
\ProvidesFile{uol-physics-report.dtx} |
| 20 |
%</driver> |
| 21 |
%<class>\NeedsTeXFormat{LaTeX2e} |
| 22 |
%<class>\ProvidesClass{uol-physics-report} |
| 23 |
%<*class> |
| 24 |
[2023/02/01 v1.1 A class providing special environments and commands for writing reports for laboratory courses realized by the Institute of Physics] |
| 25 |
%</class> |
| 26 |
% |
| 27 |
% Used Packages and base class |
| 28 |
%<class>\LoadClass[a4paper,12pt,leqno]{article} |
| 29 |
%<class>\RequirePackage{babel} |
| 30 |
%<class>\RequirePackage[left=1.25cm, right=1.25cm, top=1.75cm, bottom=1.5cm, footskip=15pt, head=28pt, headsep=0.25cm]{geometry} |
| 31 |
%<class>\RequirePackage{amsmath,amssymb,amsfonts,amsthm} |
| 32 |
%<class>\RequirePackage{mathtools} |
| 33 |
%<class>\RequirePackage{fancyhdr} |
| 34 |
%<class>\RequirePackage{titling} |
| 35 |
%<class>\RequirePackage{subcaption} |
| 36 |
%<class>\RequirePackage{graphicx} |
| 37 |
%<class>\RequirePackage{float} |
| 38 |
%<class>\RequirePackage[bottom]{footmisc} |
| 39 |
%<class>\RequirePackage[useregional]{datetime2} |
| 40 |
%<class>\RequirePackage{listings} |
| 41 |
%<class>\RequirePackage[hypcap=true]{caption} |
| 42 |
%<class>\RequirePackage{pdfpages} |
| 43 |
%<class>\RequirePackage{siunitx} |
| 44 |
%<class>\RequirePackage{esdiff} |
| 45 |
%<class>\RequirePackage{tcolorbox} |
| 46 |
%<class>\RequirePackage{xcolor} |
| 47 |
%<class>\RequirePackage{titleref} |
| 48 |
%<class>\RequirePackage{parskip} |
| 49 |
%<class>\RequirePackage{setspace} |
| 50 |
%<class>\RequirePackage[european,siunitx]{circuitikz} |
| 51 |
%<class>\RequirePackage[pdfusetitle,hidelinks]{hyperref} |
| 52 |
%<class>\RequirePackage[nameinlink,capitalize]{cleveref} |
| 53 |
%<class>\RequirePackage{arrayjobx} |
| 54 |
%<class>\RequirePackage{multido} |
| 55 |
%<class>\RequirePackage[compact]{titlesec} |
| 56 |
% set the page style to fancy to display headers |
| 57 |
%<class>\pagestyle{fancy} |
| 58 |
% set the head height to 27.5pt to display the content correctly |
| 59 |
%<class>\setlength{\headheight}{27.5pt} |
| 60 |
% set up the siunitx package to correctly display numbers and uncertainites |
| 61 |
%<class>\sisetup{group-digits=none, table-alignment=center, locale=DE, uncertainty-mode=separate, output-open-uncertainty = [, output-close-uncertainty = ]} |
| 62 |
% set the content table depth to display subsubsections |
| 63 |
%<class>\setcounter{tocdepth}{3} |
| 64 |
% set up the page header |
| 65 |
%<class>\fancyhead[L]{\small\multido{\iP=1+1}{\value{partnerCounter}}{\arrayx{PartnerLastNames}(\iP)\ifnumcomp{\iP}{<}{\value{partnerCounter}}{, }{}}} |
| 66 |
%<class>\fancyhead[C]{\small\@title \\ \@moduleNumber \ -- \@moduleName} |
| 67 |
%<class>\fancyhead[R]{\small\@date \\ \@semester} |
| 68 |
% setup the all the chapter headings |
| 69 |
%<class>\titleformat{\part}{\large\scshape}{\thepart}{1ex}{} |
| 70 |
%<class>\titleformat{\section}{\bfseries}{\thesection}{1ex}{} |
| 71 |
%<class>\titleformat{\subsection}{\slshape}{\thesubsection}{1ex}{} |
| 72 |
%<class>\titleformat{\subsubsection}{\itshape}{\thesubsubsection}{1ex}{} |
| 73 |
%<class>\titlespacing*{\part}{0pt}{0pt}{*1} |
| 74 |
%<class>\titlespacing*{\section}{0pt}{*1}{*1} |
| 75 |
%<class>\titlespacing*{\subsection}{0pt}{*1}{*1} |
| 76 |
%<class>\titlespacing*{\subsubsection}{0pt}{*1}{*1} |
| 77 |
% set up the lists for the names and matriculation numbers |
| 78 |
%<class>\newarray\PartnerFirstNames |
| 79 |
%<class>\newarray\PartnerLastNames |
| 80 |
%<class>\newarray\PartnerEmails |
| 81 |
%<class>\newarray\PartnerMatriculationNumbers |
| 82 |
% set up a counter to keep track of the partners |
| 83 |
%<class>\newcounter{partnerCounter} |
| 84 |
% |
| 85 |
%<*driver> |
| 86 |
\documentclass{ltxdoc} |
| 87 |
\usepackage{shortvrb} |
| 88 |
\usepackage{etoolbox} |
| 89 |
\EnableCrossrefs |
| 90 |
\CodelineIndex |
| 91 |
\RecordChanges |
| 92 |
\begin{document} |
| 93 |
\DocInput{uol-physics-report.dtx} |
| 94 |
\end{document} |
| 95 |
%</driver> |
| 96 |
% \fi |
| 97 |
% |
| 98 |
% \CheckSum{0} |
| 99 |
% |
| 100 |
% |
| 101 |
% \changes{v1.0}{2022/12/13}{Initial version} |
| 102 |
% \changes{v1.1}{2023/02/01}{Updated page geometry to create more space in accordance to the guidelines, Fixed erorr in commands create the titlepage} |
| 103 |
% |
| 104 |
% \GetFileInfo{uol-physics-report.dtx} |
| 105 |
% |
| 106 |
% \title{The uol-physics-report class\thanks{This document |
| 107 |
% corresponds to \textsf{uol-physics-report}~\fileversion, |
| 108 |
% dated \filedate.}} |
| 109 |
% \author{Jan Eike Suchard \\ \texttt{[email protected]}} |
| 110 |
% |
| 111 |
% \maketitle |
| 112 |
% |
| 113 |
% \begin{abstract} |
| 114 |
% This document describes the usage of the \texttt{uol-physics-report} document class. |
| 115 |
% |
| 116 |
% The document class is based on an initial laboratory report wirtten by me which I have been asked to share with |
| 117 |
% other students at my university. The laboratory report class is mainly optimized for reports written during the |
| 118 |
% Basic Laboratory Course for first semester students of physics at the Carl von Ossietzky University of Oldenburg. |
| 119 |
% Therefore, there are some macros available for generating the titles and headers of every page. |
| 120 |
% \end{abstract} |
| 121 |
% |
| 122 |
% \section{Introduction} |
| 123 |
% Writing a laboratory report is not easy as a first semester who is learning to use \LaTeX{} in a professional setting. |
| 124 |
% Furthermore, students need to write their laboratory reports with consistency and predefined formatting. To help with |
| 125 |
% this, the class uses some packages like \texttt{siunitx} to help with the correct display of results and formatting of |
| 126 |
% tables. |
| 127 |
% |
| 128 |
% When using this class it is mandatory to set the date and the title with the commands |\date| and |\title|. Otherwise |
| 129 |
% the command |\maketitle| exits with an error. |
| 130 |
% |
| 131 |
% \section{Usage} |
| 132 |
% \subsection{General} |
| 133 |
% \DescribeMacro{\rom} |
| 134 |
% |\rom| \marg{number} prints out an uppercase roman letter number. The input argument is a positive integer excluding zero. |
| 135 |
% |
| 136 |
% \subsection{Report Setup} |
| 137 |
% This section contains the macros used to set up the general report texts like headers and such. You may want to put |
| 138 |
% those commands into a \texttt{header.tex} file since those values never change. |
| 139 |
% |
| 140 |
% \DescribeMacro{\partner} |
| 141 |
% |\partner| \marg{First Name} \marg{Last Name} \marg{E-Mail Address} \marg{Matriculation Number} Sets one of many partners |
| 142 |
% participating in the protocol |
| 143 |
% |
| 144 |
% |
| 145 |
% \DescribeMacro{\module} |
| 146 |
% |\module| \marg{number} \marg{title} allows setting the module title and number which is printed in the file |
| 147 |
% header |
| 148 |
% |
| 149 |
% \DescribeMacro{\tutor} |
| 150 |
% |\tutor| \marg{name} sets the name of the tutor who is present during the experiments |
| 151 |
% |
| 152 |
% \DescribeMacro{\supervisor} |
| 153 |
% |\supervisor| \marg{name} sets the name of the supervisor who is present during the experiments |
| 154 |
% |
| 155 |
% \DescribeMacro{\group} |
| 156 |
% |\group| \marg{number} sets the number of the group the two partners are in |
| 157 |
% |
| 158 |
% \DescribeMacro{\semester} |
| 159 |
% |\semester| \marg{semester} sets the semester in which the module takes place |
| 160 |
% |
| 161 |
% \section{Implementation} |
| 162 |
% \begin{macro}{\rom} |
| 163 |
% The macro |\rom| \marg{number} takes the supplied number and prints out the uppercase roman number |
| 164 |
% \begin{macrocode} |
| 165 |
\newcommand{\rom}[1]{\uppercase\expandafter{\romannumeral #1\relax}} |
| 166 |
% \end{macrocode} |
| 167 |
% \end{macro} |
| 168 |
|
| 169 |
% \begin{macro}{\partner} |
| 170 |
% |\partner| \marg{First Name} \marg{Last Name} \marg{E-Mail Address} \marg{Matriculation Number} takes the name, |
| 171 |
% matriculation number and email address of a partner and sets it in a way the similat to how the |
| 172 |
% author command works. |
| 173 |
% \begin{macrocode} |
| 174 |
\newcommand{\partner}[4]{%% |
| 175 |
\addtocounter{partnerCounter}{1} |
| 176 |
\PartnerFirstNames(\value{partnerCounter})={#1} |
| 177 |
\PartnerLastNames(\value{partnerCounter})={#2} |
| 178 |
\PartnerEmails(\value{partnerCounter})={#3} |
| 179 |
\PartnerMatriculationNumbers(\value{partnerCounter})={#4} |
| 180 |
} |
| 181 |
% \end{macrocode} |
| 182 |
% \end{macro} |
| 183 |
% |
| 184 |
% \begin{macro}{\module} |
| 185 |
% |\module| \marg{number} \marg{title} uses the same structure as the author command |
| 186 |
% \begin{macrocode} |
| 187 |
\newcommand{\module}[2]{ |
| 188 |
\renewcommand{\@moduleNumber}{#1} |
| 189 |
\renewcommand{\@moduleName}{#2} |
| 190 |
} |
| 191 |
\newcommand{\@moduleNumber}{} |
| 192 |
\newcommand{\@moduleName}{} |
| 193 |
% \end{macrocode} |
| 194 |
% \end{macro} |
| 195 |
% |
| 196 |
% \begin{macro}{\tutor} |
| 197 |
% |\tutor| \marg{name} uses the same structure as the author command |
| 198 |
% \begin{macrocode} |
| 199 |
\newcommand{\tutor}[1]{ |
| 200 |
\renewcommand{\@tutor}{#1} |
| 201 |
} |
| 202 |
\newcommand{\@tutor}{} |
| 203 |
% \end{macrocode} |
| 204 |
% \end{macro} |
| 205 |
% |
| 206 |
% \begin{macro}{\supervisor} |
| 207 |
% |\supervisor| \marg{name} uses the same structure as the author command |
| 208 |
% \begin{macrocode} |
| 209 |
\newcommand{\supervisor}[1]{ |
| 210 |
\renewcommand{\@supervisor}{#1} |
| 211 |
} |
| 212 |
\newcommand{\@supervisor}{} |
| 213 |
% \end{macrocode} |
| 214 |
% \end{macro} |
| 215 |
% |
| 216 |
% \begin{macro}{\group} |
| 217 |
% |\group| \marg{number} uses the same structure as the author command |
| 218 |
% \begin{macrocode} |
| 219 |
\newcommand{\group}[1]{ |
| 220 |
\renewcommand{\@group}{#1} |
| 221 |
} |
| 222 |
\newcommand{\@group}{} |
| 223 |
% \end{macrocode} |
| 224 |
% \end{macro} |
| 225 |
% |
| 226 |
% \begin{macro}{\semester} |
| 227 |
% |\semester| \marg{semester} uses the same structure as the author command |
| 228 |
% \begin{macrocode} |
| 229 |
\newcommand{\semester}[1]{ |
| 230 |
\renewcommand{\@semester}{#1} |
| 231 |
} |
| 232 |
\newcommand{\@semester}{} |
| 233 |
% \end{macrocode} |
| 234 |
% \end{macro} |
| 235 |
% |
| 236 |
% |
| 237 |
% \begin{macro}{\maketitle} |
| 238 |
% |\maketitle| creates a title page for the laboratory report |
| 239 |
% \begin{macrocode} |
| 240 |
\renewcommand{\maketitle}{% |
| 241 |
\begin{titlepage} |
| 242 |
\begin{center} |
| 243 |
\singlespacing |
| 244 |
\topskip0pt |
| 245 |
\vspace*{\fill} |
| 246 |
\pagenumbering{Roman} |
| 247 |
{\Large \@moduleName \ -- \@semester }\\ |
| 248 |
\vspace{4em} |
| 249 |
{\huge \textsc{\thetitle}}\\ |
| 250 |
\vspace{4em} |
| 251 |
{\Large \thedate}\\ |
| 252 |
\vspace{0.5em} |
| 253 |
{\Large Gruppe \@group}\\ |
| 254 |
\vspace{3em} |
| 255 |
\begin{tabular}[t]{c@{\extracolsep{8em}}c} |
| 256 |
{\Large\textbf{Betreuer}} & {\Large\textbf{Tutor}} \\ |
| 257 |
{\large \@supervisor} & {\large \@tutor} \\ |
| 258 |
\end{tabular}\\ |
| 259 |
\vspace{3em} |
| 260 |
{\Large\textbf{Gruppenmitglieder}} \\ |
| 261 |
\multido{\iP=1+1}{\value{partnerCounter}}{% |
| 262 |
{\large\slshape {\arrayx{PartnerFirstNames}(\iP) \arrayx{PartnerLastNames}(\iP)}} \\ |
| 263 |
Matrikelnummer: \arrayx{PartnerMatriculationNumbers}(\iP) \\ |
| 264 |
\arrayx{PartnerEmails}(\iP) \\ \vspace{1.5em} |
| 265 |
} |
| 266 |
\vspace*{\fill} |
| 267 |
\thispagestyle{empty} |
| 268 |
\newpage |
| 269 |
\end{center} |
| 270 |
\tableofcontents |
| 271 |
\end{titlepage} |
| 272 |
\pagenumbering{arabic} |
| 273 |
} |
| 274 |
% \end{macrocode} |
| 275 |
% \end{macro} |