Select Git revision
example.tex
example.tex 5.93 KiB
%---------------------- the documentclass -----------------------------------------------------------------------------------------------------------%
% using this command you confige the "look and feel" of your document.
% you can pass different options to configure common usecases
% the options are shown for clarity, but most of them are allready the default,
% so no need to pass them explicitly
\documentclass[
faculty=f1,
paper=a4,
fontsize=11pt,
fontfamily=sans-serif,
language=english,
parskip=never+,
linespacing=single,
twoside=true,
todos=off,
draft=false,
]{HsH-report}
%---------------------- the preamble ----------------------------------------------------------------------------------------------------------------%
% everything between `\documentclass' and `\begin{document}' is called the preamble. Here you configure all settings for your document.
% The `\documentclass' command is actually part of that configuration. Lets see what you could do here:
% ----- package loading -----
% first thing you do is declare all the packages you need for your document
% you can also pass options to this packages to configure their behavior
\usepackage{listings} % for pretty-printing code snippets
\usepackage{soul} % for strickesthough text
\usepackage{lipsum} % for dummy text
% for some packages you also call some commands to configure them or your document
\lstMakeShortInline[language={[LaTeX]TeX}]|
% ----- document information -----
% In your preamble you also list your documents information and metadata. These will be used on the titlepage as well
% as being available throughout the document. Additionally, these documentclasses set up the resulting PDF file with
% the appropriate Metadata.
% You can just delete any of this commands or leave them empty if you don't need it for a project.
% See the following examples and what they create in the PDF file:
\author{
Max Mustermann,
Mira Musterfrau
} % the author and matrikelnr commands could also be on a single line, this is just more readable
\matrikelnr{
1234567,
9876543
}
\titlehead{Found on GitLab}
\subject{Example Project}
\title{How to write in Latex}
\subtitle{A helpful guide to get started and to show some common use cases}
\date{\st{01.01.2020}\\\today}
\professor{your Professor}
\keywords{some, informative, keywords}
% ----- document seperation -----
% If you split your document into seperate files using `\include',
% you can temporarily exclude not required files to save compiletime
% LATeX will still remember chapter-numbers, page-numbers and alike
% from the last run (but only if the temp files are still around)
% comment this in to use it:
%\includeonly{chap/startingAdocument}
%---------------------- beginning of document -------------------------------------------------------------------------------------------------------%
% Now that you are all set, let's begin with the actual content of the document.
% Don't forget the corresponding `\end{document}'!
\begin{document}
% for longer documents it is custom to have different numbering until the first page of actuall content.
% For that use this command to switch to Roman pagenumbers and turn off chapternumbers:
\frontmatter
% While you can of course create your own title-page, either with latex or externally, the easiest way is to use the build in command.
% These classes redefine it to include the HsH-logo (depending on the chosen faculty) and to use the additional data provided in the preamble.
% You can also use the optional argument to change the title-pages alignment to l,c or r:
\maketitle[c]
% this command is provided by these documentclasses. It creates a standard Text at the bottom of the page and a line to sign on for every author.
% You are not restricted to this exact position and can use it where ever you want in your document, if you prefer it at the back, but it there.
\declarationofauthorship
% sometimes you are required to also create an abstract. Use this environment for that.
% It will create a new page and a heading for you as well as indenting the whole text block a little.
% if you have provided keywords, they will also be put at the end of the abstract.
\begin{abstract}
If you need an abstract for your document, you can write it wherever you see fit by using the |\begin{abstract}...\end{abstract}|
environment, like demonstrated here. It acts as an unnumbered chapter. You can choose if you want it in the TOC using the
|abstract=totoc| and |abstract=nottotoc| options of the documentclass.
If you prefere your abstract to be on a clean page, you can use |\thispagestyle{plain}| to get only a page number or |\thispagestyle{empty}|
to get nor header or footer.
If you use the |\keywords{list, of, keywords}| command in your preamble, the given keywords will also be printed here. You may use
|abstract=nokeywords| as a documentclass option to disable this.
\end{abstract}
% this command will create the table of contents (TOC).
\tableofcontents
% the following command is the counterpiece of the `\frontmatter' command.
% It resets pagenumbers so that the next chapter is the first with actuall content.
\mainmatter
% now we can begin with the actuall relevant content
% you could just put all commands and content here,
% but for larger documents it makes sense to split each chapter into a seperate file.
% NOTE: you can use the \includeonly{} in the preamble to temporarily only work on a
% small subset of the document.
%
% We include this files here:
\include{chap/whatsLaTeX}
\include{chap/startingAdocument}
\include{chap/textFormating}
% ATTENTION: you can NOT nest multiple `\inlcude' commands into each other.
% You can use `\input' inside included files though
% print list of figures and tables
\listoffigures
\listoftables
\end{document}