{"id":14577842,"url":"https://github.com/PKief/latex-thesis-template","last_synced_at":"2025-09-04T12:33:04.407Z","repository":{"id":147276334,"uuid":"82195006","full_name":"PKief/latex-thesis-template","owner":"PKief","description":"LaTeX - Template for a bachelor/master thesis","archived":false,"fork":false,"pushed_at":"2024-08-16T14:03:02.000Z","size":1075,"stargazers_count":29,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-16T15:29:44.603Z","etag":null,"topics":["bachelor-thesis","bachelor-thesis-template","biber","latex","latex-template","master-thesis","master-thesis-template","thesis","thesis-template"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PKief.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-16T15:26:28.000Z","updated_at":"2024-08-16T14:02:53.000Z","dependencies_parsed_at":"2024-08-17T04:15:19.197Z","dependency_job_id":null,"html_url":"https://github.com/PKief/latex-thesis-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKief%2Flatex-thesis-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKief%2Flatex-thesis-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKief%2Flatex-thesis-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKief%2Flatex-thesis-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PKief","download_url":"https://codeload.github.com/PKief/latex-thesis-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":218022240,"owners_count":16266471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bachelor-thesis","bachelor-thesis-template","biber","latex","latex-template","master-thesis","master-thesis-template","thesis","thesis-template"],"created_at":"2024-09-07T17:01:19.398Z","updated_at":"2024-09-07T17:02:22.932Z","avatar_url":"https://github.com/PKief.png","language":"TeX","funding_links":[],"categories":["Popular \u0026 New LaTeX Templates"],"sub_categories":["Thesis/Dissertation"],"readme":"# LaTeX Template for a thesis\n\n\u003c!-- TOC --\u003e\n\n- [LaTeX Template for a thesis](#latex-template-for-a-thesis)\n    - [Getting started](#getting-started)\n        - [TeX Live](#tex-live)\n        - [Editors](#editors)\n        - [Compile the tex-file (in TeXworks)](#compile-the-tex-file-in-texworks)\n        - [Biber (in TeXworks)](#biber-in-texworks)\n    - [Project structure](#project-structure)\n        - [Settings](#settings)\n        - [Images](#images)\n    - [KomaScript](#komascript)\n    - [Literature](#literature)\n        - [JabRef](#jabref)\n        - [Cites and footnotes](#cites-and-footnotes)\n    - [Listings](#listings)\n    - [Colors](#colors)\n\n\u003c!-- /TOC --\u003e\n\n## Getting started\n\n### TeX Live\nDownload the latest version of TeX Live from [here](https://www.tug.org/texlive/).\nThe installation can take a while, so be patient ;)\n\n### Editors\nYou can use the editor of your choice. It's highly recommended for this template to use the [LaTeX-Workshop-Extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) for [VS Code](https://code.visualstudio.com/). There you can compile the tex-files very easily and you get a good support with autocompletion for references or bibliography.\n\nAnother editor can be found in [TeXworks editor](https://www.tug.org/texworks/).\nThe editor should already be included in the TeX Live package. You can find the .exe in the installation folder of your TeX Live distribution (`...\\texlive\\2017\\bin\\win32\\texworks.exe`). Otherwise download the latest version from the [website](https://www.tug.org/texworks/). \n\n*The following descriptions are for TeXworks only. If you use VS Code LaTeX-Workshop you can skip these sections because it does the things automatically.*\n\n### Compile the tex-file (in TeXworks)\nFinally you want to see the template working so you need to open the file `thesis.tex` with the TeXworks editor.\nOn the top left you can press the green button to compile the template. Be sure that you select `pdfLaTeX` in the select box next to the green compile button.\nNow the compiler should run without any errors and the preview of the PDF opens up.\nThe content of the table of contents or the list of figures are not rendered yet. You need to compile the template twice.\n\n### Biber (in TeXworks)\nAs you may have noticed the footnote for the cites are not rendered yet very well. To compile the cites and the bibliography settings you need `biber`. You have to select the `biber`-compiler instead of the `pdfLaTeX` in the selection next to the green compiler button. \n\n**You cannot find `biber` there?**\n\nYou just have to set up the TeXworks editor that it shows the `biber`-compiler.\nGo into the settings of TeXworks (under `Edit \u003e Settings...`) and select the tab `Typesetting`. Under the point `Processing tools` click on the `+` and add `biber`. Name it 'Biber' and select the program under your installation folder of `texlive` (e.g. `C:/texlive/2015/bin/win32/biber.exe`). You have to add the argument `$basename` and uncheck the option to `view pdf after running`.\n\nNow select `biber` in the dropdown list next to the compile button to run `biber`. After that you need to run `pdfLaTeX` again and then you should have the literature correctly in your template.\n\nDid not get the configuration of `biber`? Look [here](http://www.edition-open-sources.org/support/texworks.html) for some screenshots. \n\n## Project structure\nThere's one main file called `thesis.tex` which can be found in the root folder. This file includes all the other files needed for the whole template. The content is splitted up into files which can be found in the folder `chapters`. \n\nThe chapters are included like this:\n\n```tex\n\\input{chapters/chapter1}\n\\input{chapters/chapter2}\n\\input{chapters/chapter3}\n\\input{chapters/chapter4}\n```\n\n### Settings\nAll settings are located under the `settings`-folder. \n\nThe settings will be included with these commands in the `thesis.tex`-file:\n\n```tex\n\\input{settings/bibliography.tex}\n\\input{settings/graphics.tex}\n```\n\n### Images\nAll images are located under the `images`-folder. Because of the settings (`settings/graphics.tex`) we do not need the whole file path when we load an image into the content. You can just write the name of the image. \n\nExample:\n\n```tex\n\\includegraphics{sample}\n```\n\nThe 'real' image is located under `images/` and has the full file name `sample.jpeg`. You can easily change the default images path in the `settings/graphics.tex`-file.\n\n**Add image with caption**\nThe following code shows how to include an image in a `figure` environment. The image has a width of 100% of the page. If you want another width just change it, e.g. 300px. \nThe caption of the image in the `[]` is the text that will be shown in the list of figures after the table of contents. The text in the `{}` is shown as title under the image.\nWith the label-text you can refer the image in the text with: `\\autoref{fig:imageYouCanReferTo} shows that...`.\n\n```\n\\begin{figure}[h]\n    \\includegraphics[width=\\textwidth, height=\\textheight,keepaspectratio]{sample}\n    \\caption[Beispielbild (Abbildungsverzeichnis)]{Beispielbild} \n    \\label{fig:imageYouCanReferTo}\n\\end{figure}\n```\n\nIf you have a smaller image and you want to center it, you can set it up with the `centering`-command:\n\n```\n\\begin{figure}[h]\n    \\centering\n    ... \n```\n\n## KomaScript\nThe template uses the `KomaScript`-bundle. [Need more information?](https://www.ctan.org/pkg/koma-script?lang=de)\n\n## Literature \nBig point for a thesis: how to handle the required literature and how to include cites into the thesis?\n\nAs you can see (`settings/bibliography.tex`) the template uses the package `biblatex`. In the settings file you need to include your resource files.\n\n```tex\n\\bibliography{sources/literature.bib}\n```\n\nAs you can see in the example above we have already a literature file in the `sources`-folder with the following entry:\n\n```\n@Online{jondoe,\n  author  = {Jon Doe},\n  title   = {What do you think about Jon Doe},\n  year    = {2016},\n  url     = {https://de.wikipedia.org/wiki/John_Doe},\n  urldate = {2016-10-02},\n}\n```\n\nThe sources will be divided either in \"Online\"-sources or \"Literature\"-sources.\n\nThis can be configured in the `thesis.tex`-file:\n\n```tex\n\\printbibliography[heading=subbibliography, type=online, title={Online}]\n\\printbibliography[heading=subbibliography, type=book, title={Literatur}]\n```\n\n\u003e [!NOTE]\n\u003e Make sure to run the LaTeX compiler for at least 3 times to see the contents of the literature section properly.\n\n### JabRef\nWait! Do I need to update those entries every time manually? This can be really ugly over time. The solution is [JabRef](https://www.jabref.org/). JabRef is a small but very useful java application to handle our sources and to update the `.bib`-files in our `sources`-folder.\n\nDownload JabRef from the [website](https://www.jabref.org/) and open your `.bib`-files with it. Here you can easily update your sources through a user interface.\n\n### Cites and footnotes\nHow to use the sources in my content?\n\nYou need to know the keyword of your defined source of the `.bib`-file (in the example this is `jondoe`). Then write the following syntax to create a footnote in your thesis:\n\n**Citation as footnote**\n\n```tex\n\\footcite{jondoe}\n``` \n\n**Harvard citation style**\n\nIf you prefer the harvard citation style (Doe, 2016) you should use the following commands:\n\n```tex\n\\textcite{jondoe} % Doe (2016)\n``` \n\n```tex\n\\parencite[vgl.][]{jondoe} % (vgl. Doe 2016)\n\\parencite[vgl.][7]{jondoe} % (vgl. Doe 2016, S. 7)\n``` \n\nYou may notice that if you want to use the same source multiple times in a paragraph you will see something like this:\n\n```\n(vgl. ebd., S. 26)\n```\n\n[Never heard of \"ebd\"?](https://de.wikipedia.org/wiki/Ebenda)\n\n\u003e Remember to compile your thesis with `biber` to render the cites correctly.\n\n**Normal footnote**\nIf you want to add a normal footnote to add some further information:\n\n```tex\n\\footnote{This is some additional information}\n```\n\n## Listings\nThe template provides some listings for `CSS`, `HTML` and `JavaScript`. You will find the definition of the listings under `settings/listings.tex`.\n\nIn the settings you have to define the language with its keywords and other needed options...\n\n```tex\n\\lstdefinelanguage{HTML5}{...}\n```\n\nand then you also need to define a style to style the definition of the language...\n\n```tex\n\\lstdefinestyle{html}{\n    language=HTML5,\n    ...\n}\n```\n\nand use it in the content later...\n\n```tex\n\\begin{lstlisting}[style=html, caption={ein paar Zeilen html}]\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003ctitle\u003eDocument\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \n\u003c/body\u003e\n\u003c/html\u003e\n\\end{lstlisting}\n```\n\n**Minted package**\n\nAnother very good package for listings is [minted](https://www.ctan.org/pkg/minted?lang=de).\n\n**Inline listing**\n\nFor inline listings just use the custom command `\\code{console.log()}`. This command is defined in the `settings/commands.tex`-file.\n\n## Colors\n\nYou can define the colors in the `settings/colors.tex`-file.\n\n```tex\n\\definecolor{vscodegreen}{HTML}{66BB6A}\n```\n\nUse colors in the text:\n\n```tex\n\\textcolor{vscodegreen}{Lorem ipsum dolor}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPKief%2Flatex-thesis-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPKief%2Flatex-thesis-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPKief%2Flatex-thesis-template/lists"}