Skip to content
Snippets Groups Projects
Commit 632f4ed9 authored by Jan Wille's avatar Jan Wille
Browse files

Merge branch 'development'

parents 3127265d 1e1da135
No related branches found
Tags
No related merge requests found
# Change Log
All notable changes to this project will be documented in this file.
## [Current]
### Changed
- `\title` now accepts an optional argument. It will be used as a short version of the title and will be put into the header.
### Fixed
- `\ihead` and `\ohead` now have a max width and will break into multiple lines (#7)
## [1.4] - 2022-03-28
### Added
- defined `\fronmatter`, `\mainmatter` and `\backmatter` for HsH-report class
- included the caption package to fix #6
### Fixes
- references now get point to the to of floats, not to the captions position (#6)
- references now get point to the top of floats, not to the captions position (#6)
## [1.3] - 2022-03-07
......@@ -28,10 +42,12 @@ All notable changes to this project will be documented in this file.
## [1.2] - 2021-10-24
### Fixed
- Issues that came with the Kernel update from 01.06.2021 are fixed (#2, #3, #4)
- typos
### Added
- defined checklist environment via enumitem-package in `config.tex`
- added required package for enum item
......@@ -42,23 +58,28 @@ This version provides mostly minor fixed and upgrades.
**IMPORTANT:** the `personal.tex` has been removed
### Added
- dtx installer file. All class files can be generated from this file. This removes code duplications and allows for more easy maintenance as well as
- Dtx installer file. All class files can be generated from this file. This removes code duplications and allows for more easy maintenance as well as
deployment. This file will only be available on a separate branch and not be part of the master branch.
### Changed
- Makefile has been reworked. Should now be more stable and easier to understand
- Title page as been improved. You can now align the standard title page as you prefer
- the declaration of authorship now uses the proper babel interface for localization
- Licence is now LPPL
### Removed
- `personal.tex` has been removed. It pretty much not used anyway. All contents have been moved to the project files preamble.
## [1.0] - 2021-03-31
Initial Version. Official first release
### Added
- HsH-article class
- HsH-report class
- HsH-standalone class
......
......@@ -4,18 +4,18 @@ 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.
**Provided classes are:**
[![Version](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/badges/release.svg)](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/releases)
HsH-article
HsH-report
HsH-book (planed)
HsH-standalone
**Provided classes are:**
[![Version](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/badges/release.svg)](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/releases)
- `HsH-article`
- `HsH-report`
- `HsH-book` (planed)
- `HsH-standalone`
# Quick start guide:
# Quick start guide
## Recommended software
......@@ -55,7 +55,7 @@ The provided Makefile demonstrates how to run a successful build, you might want
# Documentation:
# Documentation
## The different classes
......@@ -64,6 +64,7 @@ This project provides a set of additional classes designed for use in the Hochsc
classes](https://ctan.org/pkg/koma-script) by adding styling and providing some additional commands. The provided classes are:
### `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.
......@@ -123,7 +124,7 @@ used in pretty much every project anyway.
- `pgffor` allows for the use of for-loops (internal)
- `graphicx` for importing images
- `hyperref` for references and links
- `caption` to customise captions and make references point to the begining of the floats
- `caption` to customize captions and make references point to the beginning of the floats
- `bookmark` for bookmarking
- `amsmath` for a lot of general purpose maths features
- `csquotes` makes quotations easier
......@@ -162,7 +163,8 @@ You can use the following macros to define the different information presented o
comma-seperated list, if more than one author is present.
- `\titlehead` is for a small line left of the logo. This is usually the department or division. May be empty
- `\subject` is for a broad description of what your file is. "Laborbericht" for example. Can be empty.
- `\title` is quite obvious. The only one that must be present.
- `\title` is quite obvious. The only one that must be present. I additionally accept an optional parameter which will be treated as a short form of
the title and used in the header (this makes sense if your title is very long and fills your header too much)
- `\subtitle` is a smaller second line under the title. Can be empty
- `\date` is the date of your project. You can use a custom one, but if you don't set it, the current date at compile time will be used.
- `\professor` a new macro do define your professors name, if needed.
......@@ -175,7 +177,8 @@ separated by a horizontal line.
The macro is defined in German and English and will automatically match your document language.
### `\abs`
A helpful macro for absolute values. It can be used in maths mode and will put vertical lines around its content, that match the height of the content.
A helpful macro for absolute values. It can be used in maths mode and will put vertical lines around its content, that match the height of the
content.
This macro is only provided, meaning if another package defines it, its definition will be used.
### HsH-Logo macros
......@@ -192,11 +195,12 @@ Sadly most Profs have widely different expectations when it comes to styling of
settings. For some cases this has already been done and, to help others, uploaded in
[the snippets section](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets) of the project. Most of them are only visible when you
are logged in!!
Also, if you create your own set of additions that are usefull for other, feel free to contact me and I will give you acces right so you can upload it there.
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:
# Frequently Asked Questions
## What is the `config.tex`?
......@@ -229,7 +233,7 @@ For building from sub folders, just add a second `-include-directory=../src` to
### Using Texmaker and MiKTeX
As stated above, you just need to extend your Latex-call with the needed include path.
To do this, go to *Options → config Texmaker → Commands*
To do this, go to _Options → config Texmaker → Commands_
change the pdflatex command to:
```bash
......@@ -237,7 +241,9 @@ pdflatex -synctex=1 -interaction=nonstopmode -include-directory=./src -include-d
```
### Using VS Code with LaTeX Workshop
In VS Code you can configure your launch to set environment variables. Just edit your `settings.json`, so that your pdflatex tool contains a `env:` (add it, if it isn't there yet). If you use the template below, you will also get some additional nice configurations. See also [here](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets/111) for some additional configs.
In VS Code you can configure your launch to set environment variables. Just edit your `settings.json`, so that your pdflatex tool contains a `env:`
(add it, if it isn't there yet). If you use the template below, you will also get some additional nice configurations. See also
[here](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets/111) for some additional configs.
```json
"latex-workshop.latex.tools": [
......@@ -296,6 +302,13 @@ pdflatex -output-directory=. -aux-directory=.aux project.tex
TexLive does not have this functionality built-in.
## 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](#adding-src-to-path)). You can than simply use `\documentclass{HsH-report}`.
## BibTeX errors
> Sorry, but BibTeX did not succeed
......
......@@ -101,6 +101,11 @@
\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
%% title matters ----------------------------------------------------------------------------------
\newcommand*{\@shorttitle}{\@empty}
\renewcommand{\title}[2][]{
\gdef\@title{#2}
\gdef\@shorttitle{#1}
}
\newcommand*{\@matrikelnr}{}
\newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}}
\newcommand*{\@professor}{}
......@@ -119,12 +124,30 @@
\upsubscripts
%% header and footer
\pagestyle{scrheadings}
\clearpairofpagestyles
\newpagestyle{HsHheadings}{
{
\parbox[b]{\sls@headwidth}{
\LaTeXraggedright
\ifx\@shorttitle\@empty\@title\else\@shorttitle\fi
}%
}
{\parbox[b]{\sls@headwidth}{\LaTeXraggedleft\leftmark}}
{
\parbox[b]{.45\sls@headwidth}{
\LaTeXraggedright
\ifx\@shorttitle\@empty\@title\else\@shorttitle\fi
}%
\hfill
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}%
}
(\textwidth,.1pt)
}{
{\pagemark}
{\hfill\pagemark}
{\hfill\pagemark}
}
\pagestyle{HsHheadings}
\automark{section}
\ohead{\headmark}
\ihead{\@title}
\ofoot*{\pagemark}
%% floats
\renewcommand{\fps@figure}{h!t}
......
......@@ -101,6 +101,11 @@
\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
%% title matters ----------------------------------------------------------------------------------
\newcommand*{\@shorttitle}{\@empty}
\renewcommand{\title}[2][]{
\gdef\@title{#2}
\gdef\@shorttitle{#1}
}
\newcommand*{\@matrikelnr}{}
\newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}}
\newcommand*{\@professor}{}
......@@ -119,13 +124,31 @@
\upsubscripts
%% header and footer
\pagestyle{scrheadings}
\clearpairofpagestyles
\newpagestyle{HsHheadings}{
{
\parbox[b]{\sls@headwidth}{
\LaTeXraggedright
\ifx\@shorttitle\@empty\@title\else\@shorttitle\fi
}%
}
{\parbox[b]{\sls@headwidth}{\LaTeXraggedleft\leftmark}}
{
\parbox[b]{.45\sls@headwidth}{
\LaTeXraggedright
\ifx\@shorttitle\@empty\@title\else\@shorttitle\fi
}%
\hfill
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}%
}
(\textwidth,.1pt)
}{
{\pagemark}
{\hfill\pagemark}
{\hfill\pagemark}
}
\pagestyle{HsHheadings}
\automark{chapter}
\renewcommand*{\chapterpagestyle}{scrheadings}
\ohead{\headmark}
\ihead{\@title}
\ofoot*{\pagemark}
\renewcommand*{\chapterpagestyle}{HsHheadings}
%% floats
\renewcommand{\fps@figure}{h!t}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment