Image for a LaTeX environment with Unix surrounded by a common toolchain.
4.8K
Ostfalia University of Applied Sciences
Computer Science & Business Informatics
ArchiveTemplate Thesis
from github.com/Ostfalia-ComputerScience-Archive
from github.com/janrother/template-thesis-ostfaliaJan Rother
[email protected]
Important:
This template repository is configured for the use of Git LFS to store large binary files.
If encountering any VCS related issues, have a look at the Repository section for further assistance.
The Ostfalia Computer Science Archive strives to provide a collection of useful resources for students of computer science and business informatics at the Ostfalia University of Applied Sciences. Documents, such as exam protocols, lecture notes, templates and other materials, created and provided by students will make up a collaborative collection of resources to help others succeed in their studies.
This repository ostfalia-computerscience-templatethesis is part of the archive and dedicated to providing a template for theses written by students of computer science and business informatics at the Ostfalia University of Applied Sciences. The template is intended to provide a starting point for students to structure and format their thesis according to the guidelines of the university and the department.
The template only provides a basic structure and formatting for the thesis. It does not include any content or specific requirements for the thesis. Students are expected to fill in the content of their thesis according to the guidelines of their university and department. The template is provided as a LaTeX document, which is a common format for scientific papers and theses. Students are expected to have a basic understanding of LaTeX and the tools required to compile the document.
If you want to use this template, make sure to have Git LFS installed on your system by running git lfs install. If you want to use this template without Git LFS, adjust the .gitattributes file accordingly.
Due to a post-checkout hook configured by Git LFS, security settings might prevent git clone or git checkout from working properly. Setting GIT_CLONE_PROTECTION_ACTIVE=false could prevent this issues. To access contents from Git LFS properly, run
git lfs fetch --all && \
git lfs pull
Further information can be found in the Git LFS Documentation.
The following tools form one possible way to compile the LaTeX document and are tested to work on Microsoft Windows 10 and higher.
winget install --id=MiKTeX.MiKTeX -ewinget install -e --id StrawberryPerl.StrawberryPerlwinget install -e --id Python.Python.3.10winget install --id=MiKTeX.MiKTeX -e.winget install -e --id StrawberryPerl.StrawberryPerl.winget install -e --id Python.Python.3.10.minted for code highlighting, install pygments and latexminted via pip install pygments latexminted.git clone.Note:
The above steps are a guideline for setting up the LaTeX environment on Microsoft Windows.
For help with other operating systems, please refer to the documentation of the respective tools or look for help in other resources. For unix based systems, you can try the Baeldung Tutorial.
TEMPLATE-THESIS-OSTFALIA
.
│ .gitattributes
│ .gitignore
│ .latexmkrc
│ cleanup-files
│ cleanup.bat
│ cleanup.sh
│ LICENSE
│ literature.bib
│ main.pdf
│ main.tex
│ README.md
│ README.pdf
│
├───.devcontainer
│ │ devcontainer.json
│ │ Dockerfile
│ │
│ └───resources
│ .zshrc
│ starship.toml
│ welcome.txt
│
├───.github
│ └───workflows
│ docker-image.yml
│ document.yml
│
├───chapters
│ ├───00
│ │ 00_introduction-and-motivation.tex
│ │
│ ├───01
│ │ 00_chapter.tex
│ │
│ ├───99
│ │ 00_ending-and-conclusion.tex
│ │
│ ├───AA
│ │ 00_attachment.tex
│ │
│ ├───example
│ │ example.tex
│ │
│ └───template
│ template.tex
│
├───images
│ └───logos
│ logo_ostfalia.jpg
│ sublogo_sz-sud-wob.jpg
│ sublogo_wf.jpg
│
├───main
│ abstract.tex
│ affidavit.tex
│ cover.tex
│ glossaries.tex
│ preface.tex
│
├───meta
│ commands.tex
│ header.tex
│ hyphenation.tex
│ packages.tex
│ parameters.tex
│
└───out
main.pdf
...
The document is structured into several files and directories, that fulfill different purposes:
main.tex. It includes all other files and sets the general structure of the document../chapters. Each chapter is a separate file and is included in the main file. It is recommended to copy the ./chapters/template/ directory to a new directory to create a new chapter. Note, that new chapters have to be included in the main file, otherwise they will not be compiled. The ./chapters/example/ directory provides an example chapter with a simple structure and some content. For chapters dedicated to the appendix, the ./chapters/AA/ directory is provided as template and can, if needed, be copied and expended to new chapters ./chapters/BB/, ./chapters/CC/, and so on../meta. The files are included in the main file and provide the general settings and definitions for the document.
commands.tex provides custom commands and environments.header.tex provides settings for the document layout and appearance.hyphenation.tex provides custom hyphenation rules.packages.tex list all required packages and their settings.parameters.tex provides the general parameters and configuration for the document../main. Those files contain text for pages outside the main matter.
abstract.tex contains the abstract of the work in German and English. (only visible in thesis-mode, see Configuring the Document)affidavit.tex contains the affidavit that the work was created independently including placeholders for signatures.cover.tex contains the cover page of the document.glossaries.tex contains the glossaries and acronyms used in the document and controlled by the glossaries package.preface.tex contains the preface of the document. (only visible in thesis-mode, see Configuring the Document)literature.bib, by using the BibTeX format. Data having the BibTeX format can be obtained from various sources and most of the literature databases provide the possibility to export the data in the BibTeX format../images/ directory. The directory ./images/logos/ is intended to store logos and other images used in the cover and the affidavit.The following files are provided to support the toolchain and the usage of the document:
README.md file, all necessary information about the document and the template is provided..gitignore file is used to exclude files and directories from the version control system GIT..gitattributes file is used to define attributes like line endings or GIT LFS settings for the repository.LICENSE file provides the license of the document and the template.cleanup.bat (for Microsoft Windows) and cleanup.sh (for Unix based systems) files are provided. Their usage is explained under Cleaning Up..devcontainer directory contains the configuration for the development container, which is used to provide a consistent development environment for the document..github directory contains the configuration for the GitHub Actions workflows, including the one which is used to build and push the Docker image for the development container and the one which is used to compile the document. Note, that the docker-image.yml workflow is only used by the template repository to provide the ready-to-use development container image on Docker Hub. Therefore, it is recommended to remove this workflow from the repository, as it would most likely fail in a forked repository.The document can be configured by adjusting the settings in the files located in the ./meta/ directory. Every file is dedicated to a specific purpose and provides the possibility to adjust the settings and definitions for the document. Content and context related settings such as title and author can be adjusted in the parameters.tex file. Settings regarding the layout and formatting of the document can be adjusted in the header.tex and the commands.tex files.
Note:
Some of the documents content is only enabled inthesis-mode.
This mode can be enabled by setting thethesis-flag in theparameters.texfile totrue.
Every document has comments and explanations in the files to help the user to understand the purpose and the usage of the settings and definitions.
The thesis can be built by extending the directory structure explained under Structure and by adding content to the files. For the most basic layout functions, have a look at the ./chapters/example/ directory. The example.tex file provides a simple example including use cases like sub- and subsubsections, lists, tables, figures, references, citations and more.
The document can be compiled using the LaTeX distribution MiKTeX and the Perl distribution Strawberry Perl. The compilation can be done using the command line or by using an integrated development environment (IDE) like Microsoft Visual Studio Code with the recommended extensions for LaTeX support.
To start the compilation execute
latexmk
This compiles the document as configured in the ./.latexmkrc file. This file is used to define the compilation process and the output directory. By default, the output directory is set to ./out/. Other settings configured in this file are
glossaries package.As an alternative, use the integrated compilation feature of your preferred LaTeX editor or IDE.
The compiled document can be found under ./main.pdf respectively ./out/main.pdf, depending on the configuration.
To remove files associated to or created by the compilation, use the provided batch or shell script.
.\cleanup.bat for Microsoft Windows./cleanup.sh for Unix based systemsBy default, the script assumes the project root directory as output folder and removes any files listed in ./cleanup-files. Furthermore, it moves the artifacts matching *.pdf pattern to the project root directory. This behavior can be adjusted by applying the following options:
cleanup.* --no-move prevents the artifacts from being movedcleanup.* [DIRECTORY] specifies the output directory to be cleaned up (relative to the project root directory)As an alternative, latexmk can be used to clean up the project directory by executing
latexmk -c
to remove build files or
latexmk -C
to remove all files created by the compilation process, including the output PDF file.
Nothing.
A DevContainer allows developers to define a development environment in a container. This leads to a consistent development environment across different machines and therefore simplifies the setup process while also reducing dependencies on the host system. Some of the most relevant Integrated Development Environments (IDEs) already support the use of DevContainers:
Any configuration regarding the development container is stored in the ./.devcontainer/ directory. It must not be removed.
To use the DevContainer feature, the following software has to be installed on the host system:
winget install -e --id Docker.DockerDesktop.winget install -e --id Microsoft.VisualStudioCode.As of now, it is recommended to use either Visual Studio Code or GitHub Codespaces to access the development container. Other IDEs are currently adopting this technology, but still have to catch up.
A Docker Image is up-to-date and available at Docker Hub under janrother/latex-environment. It can be used to start a development environment right away or to include it as base image in a custom Dockerfile. The image is build from the Dockerfile located in the .devcontainer directory.
To use the Docker Image, run
docker pull janrother/latex-environment:latest
or
docker run -it janrother/latex-environment:latest
To add the environment as base image in a custom Dockerfile, use
FROM janrother/latex-environment:latest as base
git clone <your-fork-url>.To use the DevContainer remotely, no software has to be installed on the host system. Other requirements have to be met:
.devcontainer directory, has to be created.Code button.Codespaces from the dropdown menu.Create Codespace on Main to create a new code space.Note:
Visual Studio Code provides an option to connect to a DevContainer in the cloud.
Therefore, the GitHub Codespaces extension has to be installed in the editor.
The DevContainer can be adjusted to every need. The Dockerfile defines the base image and the tools installed in the container. The devcontainer.json file defines the settings for the development container, thus shaping the development environment.
It is recommended to leave the Dockerfile as-is. It uses the texlive/texlive image from hub.docker.com as base image and configures it for the LaTeX environment. In its current state, the latest tag is used, to ensure that everything is up to date. This and other specifiers can easily be modified using ARG variables.
If changes to the development environment are necessary, the devcontainer.json file can be adjusted. It uses the image created by the Dockerfile and defines the settings for the development container. Besides its behavior, precise settings for the editor vscode or the IDEs jetbrains can be defined. The extensions array can be used to install additional extensions in the development container.
The DevContainer provides a pre-configured ZSH shell. It can be further customized by adjusting the .zshrc file. The starship.toml file can be used to configure the prompt of the shell.
If after initial creation of a project, a higher compatibility should be achieved, the base images and packages used should be pinned to a specific version.
I hope this template helped you to get started with your thesis. However, it is possible that it contains errors or is not up to date with the latest guidelines or requirements. If you face any issues or have any suggestions, feel free to contact me.
Best of luck with your work!
Jan
Content type
Image
Digest
sha256:1c3951a3e…
Size
2.8 GB
Last updated
about 8 hours ago
docker pull janrother/latex-environment