LaTeX Template for Hochschule Hannover (mostly Fakulty I)
What this is
This is a template designed to ease the workflow when writing documents for the
Hochschule Hannover. It is intended to be used in all sophisticated works, from
lab-reports to master’s thesis's.
The project provides custom document-classes caring
the HsH-
prefix as well as support files. These classes extend the well known
KOMA-Script classes and customize them with specific configurations, presets and provide
commonly needed features.
Documentation
This project provides a set of additional classes designed for use in the Hochschule Hannover, Germany. They extend the well-known KOMA-Script classes by adding styling and providing some additional commands.
You can find the full documentation of all features in src/HsH-classes.pdf, but here is a short description of the different classes:
HsH-article
-
Based on the
scrartcl
this class is designed for quick and compact documents. It does not have chapters and therefore never breaks to a new page on its own. This class is useful for writing lab-protocols and alike. HsH-report
-
This is probably the most useful class. It is based on the
scrreprt
and can be used for a wide variety of documents, beginning with lab-reports and ending at complete thesis. The line between article and report is somewhat blurry, so use as you see fit. HsH-book
- // ToDo has no been required up to this point
HsH-beamer
- // ToDo may be interesting, but also not requried up to now
HsH-standalone
-
A helper class based on the normal
standalone
class. It is designed only for creating images as separate documents to keep things organized and compiler times low. It is useful for creating graphs, circuit diagrams or other kind of complex sub documents.
Quick start guide
I have now Idea how to start, show me 🔍
To get you started, there is a working example Project on the example branch that has
loads of tips. Check it out
Online or
locally using git checkout example
.
Recommended software
As a Tex-Distribution, MiKTeX is recommended, TexLive should also
work, but I don't use it much. You will also need perl
to run latexmk
and other
useful tools. To edit the .tex
files, you could use any text editor, but I personally
like Visual Studio Code the most, which can also be
used for pretty much all other programming languages. Use the
Latex Workshop extension.
If you have winget
(windows new, build in package manager) and just want to install everything without any
fuzz, use the following command:
winget install "MiKTeX.MiKTeX" "StrawberryPerl.StrawberryPerl" "Git.Git" "Microsoft.VisualStudioCode"
code --install-extension "James-Yu.latex-workshop"
Using the project as a template
The projects also provides a recommendation for a subfolder structure to keep things organized. If you don't want to use git and just want to get started in LaTeX, download the zip-Archive and unpack it.
It is recommended you use git to take full advantage of its features (like having backups and being able to easily see what changed from the last version) and also be able to easily update should a newer version of this repo be released. First create a new, empty project on the platform of your choice (for example here on https://lab.it.hs-hannover.de), than you can use the following to set it up locally on your system.
Note replace
[Project]
with your projects name (for example "Report") and[Project_URL]
with the git-url for the project you created on the online git platform
# set up local git repo from template
git clone -o upstream https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh.git [Project]
cd [Project]
git branch -M [Project] # optional if you want to seperate your branch from origin/master
git remote add origin [Project_URL]
git push --set-upstream origin
# optionally do some cleanup (linux syntax, adjust when needed)
rm CHANGELOG.md LICENSE
mv project.tex [Project].tex
echo "# [Project]" > README.md
git commit --all -m "initalise for [Project]"
git push
Note giving you
[Project]
name as the default branch name is optional, and you could keep the default name ofmaster
, but as the template also has amaster
branch it is less confusing if you choose a different name.
Compiling
The Project comes with setting for latexmk
, so you should be able to instantly compile
using it.
latexmk
Note If you use the recommended folder-structure, it stores the class files and other needed files in the ./src folder. If you use
latexmk
this is already configured correctly, but might be relevant if you choose a different build system (see below).
Common additions and expansions (Snippets)
Sadly most Profs have widely different expectations when it comes to styling of written works. So you might find yourself having to change some settings. For some cases this has already been done and, to help others, uploaded in the snippets' section of the project.
Also, if you create your own set of additions that are useful for other, feel free to contact me and I will give you access right, so you can upload it there.
Frequently Asked Questions
How can I create my own title page
If you don't like the title page, feel free to create your own. You can simply redefine
the \maketitle
command to you liking.
Before you go to town, check out what others already published in the snippets section. This will be a good starting point or maybe even already be what you want.
How can I increase the left margin for printing?
What you are trying to mmodify is called the "bindin correction". The option for that is BCOR
.
You can set it to any size know to LaTeX and the margin will be increased accordingly,
always on the left side for oneside
documents and alternating for twoside
documents.
Note the textarea is not reduced, only moved. So a very large value for
BCOR
will move the content off the page.
Italic vs. upright Index? (changing subscript)
The classes by default set all sub scripts upright ("steil" in German), because this is
required in Germany in most cases. You can deactivate this permanently with
\normalsubscripts
and reactivate it with \upsubscripts
.
If you want to change it for a single use, you can use the original Tex Macro \sb{}
instead of the _
to get the original behaviour.
Warning DO NOT use
_\math..{}
! This would be a nested font change and lead to unexpected results.\sb{\math..{}}
is possible.
Adding ./src to path
You need to do this if you get errors like this:
! LaTeX Error: File `HsH-report.cls' not found.
Usually the latexmkrc
files handles setting this up, but if you have problems or just
want more control,
here are
more details.
LaTeX errors
You have requested document class `src/HsH-report', but the document class provides `HsH-report'.
This happens when you tried to use something like \documentclass{src/HsH-report}
,
which was a good idea, but doesn't quite work. You need to properly add the src
directory to the path searched by LaTeX (as explained here). You
can than simply use \documentclass{HsH-report}
.
BibTeX errors
Sorry, but BibTeX did not succeed
You are probably using bibtex
as your backend, but biber
the standard configuration.
You can change it, see
here for most editors
and
here for VS Code
or use \usepackage[backend=bibtex]{biblatex}
in your preamble to keep using BibTeX.