diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-06-11 08:16:26 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-06-11 08:16:26 +0200 |
commit | ea08ac63b52bdb4356921efcc145582bc412ad9f (patch) | |
tree | f4e3d75145dc8cf60ccad43c30fee95cf0ca64a7 /templates/latex | |
parent | fix(common/scripts/renew_copyright_header.sh): Add further file extensions (diff) | |
download | flake-templates-ea08ac63b52bdb4356921efcc145582bc412ad9f.tar.gz flake-templates-ea08ac63b52bdb4356921efcc145582bc412ad9f.zip |
feat(templates/latex): Name the `main.tex` file after the project
This results in a reasonable name for the resulting PDF, instead of the generic `main.pdf`.
Diffstat (limited to '')
-rw-r--r-- | templates/latex/%INIT_APPLICATION_NAME.tex | 44 | ||||
-rwxr-xr-x | templates/latex/build.sh | 2 | ||||
-rw-r--r-- | templates/latex/lpm.toml | 4 |
3 files changed, 47 insertions, 3 deletions
diff --git a/templates/latex/%INIT_APPLICATION_NAME.tex b/templates/latex/%INIT_APPLICATION_NAME.tex new file mode 100644 index 0000000..e7934fe --- /dev/null +++ b/templates/latex/%INIT_APPLICATION_NAME.tex @@ -0,0 +1,44 @@ +% LTeX: language=en-GB +%\documentclass[a4paper, 12pt, nosolutions]{report} +% \documentclass[a4paper, 12pt, onecolumn]{report} +\documentclass[a4paper, 12pt, twocolumn]{scrartcl} + +\input{headers/preamble.tex} +\input{headers/preamble_local.tex} + +\title{\textbf{%INIT_APPLICATION_NAME_STYLIZED}} +\author{%INIT_AUTHOR_NAME \\ +\href{mailto:%INIT_AUTHOR_EMAIL}{%INIT_AUTHOR_EMAIL}\\[1cm] +{\small Supervisor: TODO}} +\date{\DTMToday} + +% For the copyright section +\years{%INIT_YEAR} +\authors{%INIT_AUTHOR_NAME} + +\makeatletter +\hypersetup{ + pdftitle={\@title}, + pdfsubject={}, + pdfauthor={\@authors}, + pdfkeywords={TODO}, + colorlinks, + linkcolor={black}, + citecolor={black}, + urlcolor={blue!80!black} +} +\makeatother + + +\includeonly{} + +\begin{document} + \onecolumn + \input{content/static/title} + \twocolumn + + % NEXT_CHAPTER + + \clearpage{} + \printbibliography\relax +\end{document} diff --git a/templates/latex/build.sh b/templates/latex/build.sh index 55dae94..1206ee7 100755 --- a/templates/latex/build.sh +++ b/templates/latex/build.sh @@ -11,4 +11,4 @@ fi find . -type d -not -name "$dst" -not -path "./$dst/*" -printf '%P\n' | while IFS= read -r dir; do mkdir --parents "$dst/$dir" done -latexmk -outdir="$dst" -file-line-error -pdflatex -recorder ./main.tex +latexmk -outdir="$dst" -file-line-error -pdflatex -recorder "./%INIT_APPLICATION_NAME.tex" diff --git a/templates/latex/lpm.toml b/templates/latex/lpm.toml index 5a3565d..636eae9 100644 --- a/templates/latex/lpm.toml +++ b/templates/latex/lpm.toml @@ -4,7 +4,7 @@ number = 0 [templates] section = ''' -%! TEX root = ../../../main.tex +%! TEX root = ../../../%INIT_APPLICATION_NAME % LTeX: language=en-GB \section{REPLACMENT_SECTION_TITLE} % DATE @@ -12,7 +12,7 @@ This is some text ''' chapter = ''' -%! TEX root = ../../main.tex +%! TEX root = ../../%INIT_APPLICATION_NAME % LTeX: language=en-GB \chapter{REPLACEMENT_CHAPTER} |