Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LTG #4

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion .github/workflows/update-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
uses: EndBug/add-and-commit@v9
with:
message: 'Update files based on generated files by template generator'
committer_email: [email protected]
author_name: 'github-actions[bot]'
author_email: 'github-actions[bot]@users.noreply.github.com'
push: false
- name: Push changes
run: |
Expand Down
105 changes: 89 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In case you need other configurations, please adapt `paper-conference.tex` or ru

## Usage

- `thesis-example.tex` is the main document
- `paper.tex` is the main document
- Use "lualatex + bibtex" in your TeX editor or `latexmk paper` / `make` in the command line

### Using `latexmk`
Expand Down Expand Up @@ -41,6 +41,9 @@ On the command line, there are additional features:
- `latexmk -C` or `make clean` for cleaning up
- `make format` to reformat the `.tex` files (one sentence per line and indent)
- `make aspell` for interactive spell checking
- `make stand`: Creates a new PDF with the current status of the thesis.
- `make view`: Opens the configured viewer
- `make mrproper`: Cleans up and removes also editor backup files.

## Benefits

Expand Down Expand Up @@ -95,7 +98,7 @@ Currently, following extensionsa re recommended:
Then, change the setting of LaTeX Workshop to use biber:
Update the following lines in the VSCode `settings.json` to contain:

```json
```javascript
"latex-workshop.latex.recipes": [
{
"name": "lualatex ➞ bibtex ➞ lualatex × 2 🔃",
Expand All @@ -108,7 +111,7 @@ Update the following lines in the VSCode `settings.json` to contain:
},
],
"latex-workshop.latex.tools": [
...
// ...
{
"name": "bibtex",
"command": "bibtex",
Expand All @@ -117,19 +120,19 @@ Update the following lines in the VSCode `settings.json` to contain:
],
"env": {}
},
...
// ...
],
```

The following settings are additionally recommended:

```json
```javascript
{
"editor.wordWrap": "on", # enable soft line breaks
"latex-workshop.view.pdf.viewer": "tab", # display the generaded PDF in a separate tab
"latex-workshop.view.pdf.backgroundColor": "#cccccc", # use a darker background in de PDF viewer to lift of the pages from it
"latex-workshop.latex.autoBuild.run": "onSave", # automatically build on saving .tex files
"editor.renderWhitespace": "all", # display all whitespaces
"editor.wordWrap": "on", // enable soft line breaks
"latex-workshop.view.pdf.viewer": "tab", // display the generaded PDF in a separate tab
"latex-workshop.view.pdf.backgroundColor": "#cccccc", // use a darker background in de PDF viewer to lift of the pages from it
"latex-workshop.latex.autoBuild.run": "onSave", // automatically build on saving .tex files
"editor.renderWhitespace": "all", // display all whitespaces
}
```

Expand Down Expand Up @@ -175,6 +178,29 @@ Following one-time setup is required:
docker build -t ltg .
```


## Contained Directories and Files

### Directories

- [figures](graphics/) Directory containing the figures.
By using LuaLaTex/PDFLaTeX it is possible to use PDFs, JPGs, PNGs, ... We recommend to use PDFs to enable smooth scaling.

### Files

- `paper.tex` - The main `.tex` file loading all LaTeX packages and their configurations.
- Add text here
- Adjust title etc. here
- [bibliography.bib](bibliography.bib) - Bibliography. [biblatex] format. Manage it with [JabRef].
- [abbreviations.tex](abbreviations.tex) - Acronyms and abbreviations.
- [commands.tex](commands.tex) - Example LaTeX macros.

Following additional files are included, which do not need to be adapted:

- [localSettings.yaml](localSettings.yaml) - Settings for [latexindent](https://ctan.org/pkg/latexindent)
- [Makefile](Makefile) - The Makefile. Builds on latexmk.
- [Texlivefile](Texlivefile) - List of packages required for a minimal TeXLive installation.

## FAQs

### Q: How can I synchronize updates from the template to my repository?
Expand Down Expand Up @@ -204,17 +230,21 @@ The most simple solution to get more space is to exchange the font.

### Q: How can I reformat my `.tex` files?

Execute following command:
Execute `latexindent -l -s -sl -w paper.tex`

Alternatively, execute `make format`.

latexindent -l -s -sl -w paper.tex
### Q: How I want to obey the one-sentence-per-line rule. How to do?

### Q: I want to obey the one-sentence-per-line rule. How can I do that?
See "How can I reformat my `.tex` files?"

Execute following command:
### Q: I want to use minted, because I think its syntax highlighting seems to be better.

latexindent -m -l -s -sl -w paper.tex
You can re-generate the template and choose `minted` as listings environment.
Moreover, ensure that python and [pygments](https://pygments.org/) are installed properly:

Attention! This is work in progress and does not always produce best results.
- `choco install python`
- `pip install pygments`

### Q: Can I also write in German?

Expand All @@ -230,9 +260,52 @@ You seem to use `latexmk` locally.
Please move `_latexmkrc` to `latexmkrc` to get `latexmk` working.
If you don't do this, `latexmk` tries to execute `latex`, which tries to produce a DVI file (and not a PDF file).

### Q: I get `Font "LatinModernMath-Regular" not found.`. What can I do?

Error message:

```text
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "LatinModernMath-Regular" not found.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.

! Package fontspec Error: The font "LatinModernMath-Regular" cannot be found.
```

Install the package `lm-math` manually.

### Q: I get `! Package fontspec Error: The font "TeXGyreTermes" cannot be found.`. What can I do?

Install the package `tex-gyre` and `tex-gyre-math` manually.

### Q: I get `! error: (type 1): cannot find encoding file 'ntx-ot1-tlf.enc' for reading`. What can I do?

See <https://tex.stackexchange.com/a/240850/9075>: Install the packages `newpx` and `newtxsf` manually.

### Q: I get `! TeX capacity exceeded, sorry [main memory size=3000000].`. What can I do?

Follow the steps at <https://tex.stackexchange.com/a/548335/9075>

Try with following command

```bash
lualatex -shell-escape --extra-mem-top=10000000 --synctex=1 paper.tex
```

See <https://tex.stackexchange.com/a/124206/9075> for details.

## Further information

- Other templates: <https://latextemplates.github.io/>
- For German users, go to <https://texfragen.de/>.
- Frank Mittelbach with Ulrike Fischer: [The LaTeX Companion](https://www.latex-project.org/news/2023/03/17/TLC3/) is the ultimate guide for LaTeX: The authors went through all packages offered by [CTAN](https://ctan.org/), selected the most promising ones, described them, and provide minimal working example for each of it.
- Lutz Hering, Heike Hering: [How to Write Technial Reports](https://doi.org/10.1007/978-3-540-69929-3), Springer, 2010; also available in German [Technische Berichte - verständlich gliedern, gut gestalten, überzeugend vortragen](https://doi.org/10.1007/978-3-8348-8317-9). - Highly recommended, because it guides through all aspects of a report (such as a Master Thesis).
- Marcus Deininger et al.: [Studienarbeiten - Ein Leitfaden zur Erstellung, Durchführung und Präsentation wissenschaftlicher Abschlussarbeiten am Beispiel Informatik](https://vdf.ch/studienarbeiten.html?author_id=2877), vdf. - Recommended as guideline for planning and working on the whole thesis.
- Charles Lipson, [Cite Right, Second Edition: A Quick Guide to Citation Styles--MLA, APA, Chicago, the Sciences, Professions, and More](http://www.press.uchicago.edu/ucp/books/book/chicago/C/bo10702043.html), Chicago Guides to Writing, Editing, and Publishing, 2011. - Recommended in case you are unsure about how to correctly cite something.

## License

The license of this work is [0BSD](https://spdx.org/licenses/0BSD.html) which corresponds to "public domain".
Any derived work can freely be relicensed and can omit original copyright and license information.

[biber]: https://www.ctan.org/pkg/biber
[biblatex]: http://tex.stackexchange.com/tags/biblatex/info
Expand Down
30 changes: 30 additions & 0 deletions commands.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
% 🇩🇪 wird fuer Tabellen benötigt (z.B. >{centering\RBS}p{2.5cm} erzeugt einen zentrierten 2,5cm breiten Absatz in einer Tabelle
\newcommand{\RBS}{\let\\=\tabularnewline}

% 🇺🇸 To avoid issues with Springer's \mathplus. See also http://tex.stackexchange.com/q/212644/9075
\providecommand\mathplus{+}

% 🇺🇸 from hmks makros.tex - \indexify
\newcommand{\toindex}[1]{\index{#1}#1}

% 🇩🇪 Tipp aus "The Comprehensive LaTeX Symbol List"
\newcommand{\dotcup}{\ensuremath{\,\mathaccent\cdot\cup\,}}

% 🇩🇪 Anstatt $|x|$ $\abs{x}$ verwenden. Die Betragsstriche skalieren automatisch, falls "x" etwas größer sein sollte...
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}

% 🇺🇸 For the algorithmic package
\newcommand{\commentchar}{\ensuremath{/\mkern-4mu/}}
\algrenewcommand{\algorithmiccomment}[1]{\hfill $\commentchar$ #1}

% 🇩🇪 Seitengrößen - Gegen Schusterjungen und Hurenkinder...
\newcommand{\largepage}{\enlargethispage{\baselineskip}}
\newcommand{\shortpage}{\enlargethispage{-\baselineskip}}

\newcommand{\initialism}[1]{%
\textlcc{#1}\xspace%
}
\newcommand{\OMG}{\initialism{OMG}}
\newcommand{\BPEL}{\initialism{BPEL}}
\newcommand{\BPMN}{\initialism{BPMN}}
\newcommand{\UML}{\initialism{UML}}
2 changes: 1 addition & 1 deletion generator-latex-template
Submodule generator-latex-template updated 42 files
+0 −1,375 .github/workflows/check-acmart-both-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-acmart-both-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-acmart-pdflatex-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-acmart-pdflatex-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-ieee-conference-both-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-ieee-conference-both-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-ieee-conference-pdflatex-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-ieee-conference-pdflatex-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-ieee-journal-both-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-ieee-journal-both-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-ieee-journal-pdflatex-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-ieee-journal-pdflatex-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-ieee-peerreview-both-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-ieee-peerreview-both-bibtex-2024-true.yml
+0 −1,375 .github/workflows/check-ieee-peerreview-pdflatex-bibtex-2024-false.yml
+0 −1,375 .github/workflows/check-ieee-peerreview-pdflatex-bibtex-2024-true.yml
+0 −2,655 .github/workflows/check-lncs-both-bibtex-2024-false.yml
+0 −2,655 .github/workflows/check-lncs-both-bibtex-2024-true.yml
+0 −2,655 .github/workflows/check-lncs-pdflatex-bibtex-2024-false.yml
+0 −2,655 .github/workflows/check-ustutt-both-biblatex-2024-false.yml
+0 −2,655 .github/workflows/check-ustutt-both-biblatex-2024-true.yml
+0 −2,655 .github/workflows/check-ustutt-both-bibtex-2024-false.yml
+0 −2,655 .github/workflows/check-ustutt-both-bibtex-2024-true.yml
+0 −2,655 .github/workflows/check-ustutt-pdflatex-biblatex-2024-false.yml
+0 −2,655 .github/workflows/check-ustutt-pdflatex-biblatex-2024-true.yml
+0 −2,655 .github/workflows/check-ustutt-pdflatex-bibtex-2024-false.yml
+0 −2,655 .github/workflows/check-ustutt-pdflatex-bibtex-2024-true.yml
+11 −0 CHANGELOG.md
+1 −1 LICENSE
+1 −1 README.md
+20 −9 generators/app/index.js
+141 −29 generators/app/templates/README.en.md
+1 −1 generators/app/templates/bibliography.bib
+52 −0 generators/app/templates/commands.tex
+1 −1 generators/app/templates/main.de.tex
+1 −1 generators/app/templates/main.en.tex
+31 −28 package-lock.json
+29 −0 scripts/begin-new-cycle.sh
+0 −0 scripts/generate-texlivefile.sh
+0 −0 scripts/setup-do.sh
+23 −0 scripts/spread-updates.sh
+0 −0 scripts/user-data.sh