mirror of
https://github.com/vale981/Lab_Report_LaTeX
synced 2025-03-05 09:01:39 -05:00
init
This commit is contained in:
parent
16f9089566
commit
afa7cafac1
1 changed files with 78 additions and 0 deletions
78
lab_report.cls
Normal file
78
lab_report.cls
Normal file
|
@ -0,0 +1,78 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{lab_report}[Hiro's Lab Course Class]
|
||||
\LoadClass{scrartcl}
|
||||
|
||||
\RequirePackage[version=3]{mhchem} % Package for chemical equation typesetting
|
||||
\RequirePackage{siunitx} % Provides the \SI{}{} and \si{} command for typesetting SI units
|
||||
\RequirePackage{graphicx} % Required for the inclusion of images
|
||||
\RequirePackage{natbib} % Required to change bibliography style to APA
|
||||
\RequirePackage{amsmath} % Required for some math elements
|
||||
\RequirePackage{xkeyval}%
|
||||
\RequirePackage{physics}%
|
||||
\RequirePackage{float}%
|
||||
\RequirePackage[automark,headsepline]{scrpage2}
|
||||
\KOMAoptions{DIV=14}
|
||||
|
||||
\newcommand{\headsection}{\leftmark}
|
||||
|
||||
\deftripstyle{pagestyle}
|
||||
[0.3pt]
|
||||
[0.3pt]
|
||||
{\pagemark}
|
||||
{}
|
||||
{\headsection}
|
||||
{\pagemark}
|
||||
{\@author}
|
||||
{\@title\ifx\slug\empty\else\ (\slug)\fi}
|
||||
\pagestyle{pagestyle}
|
||||
\setlength\parindent{0pt} % Removes all indentation from paragraphs
|
||||
|
||||
\renewcommand{\labelenumi}{\alph{enumi}.} % Make numbering in the enumerate environment by letter rather than number (e.g. section 6)
|
||||
|
||||
\define@key{lab_report.cls}{course}[]{%
|
||||
\def\course{#1}
|
||||
}
|
||||
|
||||
\define@key{lab_report.cls}{slug}[]{%
|
||||
\def\slug{#1}
|
||||
}
|
||||
|
||||
\define@key{lab_report.cls}{partner}[]{%
|
||||
\def\partner{#1}
|
||||
}
|
||||
\define@key{lab_report.cls}{supervisor}[]{%
|
||||
\def\supervisor{#1}
|
||||
}
|
||||
\define@key{lab_report.cls}{room}[]{%
|
||||
\def\room{#1}
|
||||
}
|
||||
|
||||
\define@key{lab_report.cls}{coursedate}[\today]{%
|
||||
\def\coursedate{#1}
|
||||
}
|
||||
|
||||
\ExecuteOptionsX{course, slug, partner, supervisor, room, coursedate}
|
||||
\ProcessOptionsX%
|
||||
|
||||
\renewcommand*{\@date}{\today}
|
||||
|
||||
\renewcommand*{\maketitle}{%
|
||||
\begin{titlepage}
|
||||
\centering
|
||||
{\huge\bfseries\@title\unskip\strut\par}
|
||||
{\noindent\rule{2cm}{0.4pt}\par}
|
||||
{\scshape\Large\slug\unskip\strut\par}
|
||||
\vspace{2cm}
|
||||
{\Large\itshape\@author\unskip\strut\par}
|
||||
{\large \@date\par}
|
||||
\begin{center}%
|
||||
\begin{tabular}{l r}%
|
||||
Date Performed: & \coursedate\\%
|
||||
Partner(s): & \partner\\%
|
||||
Room/Seat: & \room\\%
|
||||
Instructor(s): & \supervisor\\%
|
||||
\end{tabular}%
|
||||
\end{center}%
|
||||
\tableofcontents
|
||||
\end{titlepage}
|
||||
}
|
Loading…
Add table
Reference in a new issue