diff --git a/latexmkrc b/.latexmkrc similarity index 51% rename from latexmkrc rename to .latexmkrc index e566f7c0deb3f81215fcf2046348c8c9f551b57f..2264563650e406c66d95a468d6664638e5175a5a 100644 --- a/latexmkrc +++ b/.latexmkrc @@ -1,12 +1,13 @@ -# use pdflatex -$pdf_mode = 1; +# list of files in this project +# @default_files = ('file.tex', 'file.tex'); -# use bibtex -$bibtex_use = 2; -$clean_ext .= " run.xml"; +# generall settings: +$aux_dir = '.aux/'; # use and auxilary folder for temp files +$pdf_mode = 1; # use pdflatex +$bibtex_use = 2; # use biber -# use and auxilary folder for temp files -$aux_dir = './.aux/'; +push @generated_exts, "run.xml"; # biber creates this file +push @generated_exts, "lol"; # the listings package creates this file # put the ./src subfolder on searchpath ensure_path( 'TEXINPUTS', './src//' ); @@ -17,7 +18,9 @@ set_tex_cmds( '-synctex=1 -interaction=nonstopmode %O %S' ); # create glossaries: add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); -$clean_ext .= " acr acn alg glo gls glg ist"; +push @generated_exts, 'glo', 'gls', 'glg'; +push @generated_exts, 'acn', 'acr', 'alg'; +$clean_ext .= ' %R.ist %R.xdy'; sub makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); my @args = ( "-q", "-d", $path, $base_name ); @@ -25,14 +28,9 @@ sub makeglossaries { return system "makeglossaries", "-d", $path, $base_name; } -# Listings files -$clean_ext .= " lol"; # clean tempfile for List of Listings - # simple svg dependencies via InkScape add_cus_dep( 'svg', 'pdf', 0, 'runInkscape' ); sub runInkscape { - my ($base_name, $path) = fileparse( $_[0] ); - $svg = "$path$base_name.svg"; - $pdf = "$path$base_name.pdf"; - return system "inkscape", "-C", $svg, "-o", $pdf; + my @args = ( "--export-type=pdf", "--export-area-page" ); + return system "inkscape", @args, "$_[0].svg"; } diff --git a/CHANGELOG.md b/CHANGELOG.md index c9d9219a147a1266b73e4574b90e520209281c69..76fc094deaee9981f1e3c8171550f0d04fa0f14d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [2.2] + +### Fixed + +- make first argument of `\todo` and `\missingfigure` optional (#11) + ## [2.1] ### Breaking diff --git a/README.md b/README.md index f331915b7d0448d958a1f95f89c69fead9b18ebd..0f15851af0c2ee9be68baefe4fbcedead8173a2c 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,10 @@ The provided Makefile demonstrates how to run a successful build, you might want The Project comes with `latexmk` setting, so you should be able to instantly compile using it. +```shell +latexmk project.tex +``` + # Documentation @@ -123,7 +127,7 @@ used in pretty much every project anyway. - `fontenc` for output encoding, set to T1, if you use non-Latin characters (like Cyrillic, etc.) you need to add that - `lmodern` is a font - `babel` for German typesetting -- `geometry` for margins and stuff, (will probably be removed at some point) +- `geometry` for pagelayout and margins - `scrlayer-scrpage` KOMA package for headers and footers - `scrhack` KOMA package for compatibility with listings - `pgffor` allows for the use of for-loops (internal) @@ -227,7 +231,7 @@ You need to do this if you get errors like this: > ! LaTeX Error: File `HsH-report.cls' not found. -Usually the `latexmkrc` files handles setting this up, but if you have problem or just want more controll, +Usually the `latexmkrc` files handles setting this up, but if you have problems or just want more controll, [here](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets/121) are more details. ## Using an _.aux_ directory diff --git a/src/HsH-article.cls b/src/HsH-article.cls index d9d4d5e435d3f5209e4076e9230c1ff923a273d0..ad988e28667df08161660359cae830517ca61530 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -20,10 +20,10 @@ %% and version 1.3 or later is part of all distributions of LaTeX version %% 2021/01/01 or later. %% -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2023-08-12> Jan Wille} +\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} \NeedsTeXFormat{LaTeX2e} \newcommand{\myClassName}{HsH-article} -\ProvidesClass{\myClassName}[2023/08/12 v2.1 HsH-Class based on KOMA] +\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] %% commands for HsH-logo \newcommand{\HsHlogoPath}{HSH-Logo.pdf} @@ -89,7 +89,7 @@ \RequirePackage{lmodern} \RequirePackage{graphicx} \RequirePackage{amsmath} -\PassOptionsToPackage{vmargin=5\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} +\PassOptionsToPackage{vmargin=6\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} \if@todos \setlength{\marginparwidth}{6cm} \PassOptionsToPackage{paperwidth=\dimexpr +0.915\paperwidth+\marginparsep+\marginparwidth+0.25cm, right=\dimexpr +\marginparsep+\marginparwidth+0.25cm}{geometry} @@ -126,8 +126,8 @@ \setlength{\marginparwidth}{5.2cm} \else \newcommand{\listoftodos}[1]{} - \newcommand{\todo}[2]{} - \newcommand{\missingfigure}[2]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} \fi \RequirePackage{pgffor} %% options for not loaded packages ---------------------------------------------------------------- diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 147c1b0f8bf25eeeb01667ec985895c49c2c7056..4c4f13e37cc7ee79fe2c977f9ad2caa96be6076b 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -20,10 +20,10 @@ %% and version 1.3 or later is part of all distributions of LaTeX version %% 2021/01/01 or later. %% -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2023-08-12> Jan Wille} +\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} \NeedsTeXFormat{LaTeX2e} \newcommand{\myClassName}{HsH-report} -\ProvidesClass{\myClassName}[2023/08/12 v2.1 HsH-Class based on KOMA] +\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] %% commands for HsH-logo \newcommand{\HsHlogoPath}{HSH-Logo.pdf} @@ -89,7 +89,7 @@ \RequirePackage{lmodern} \RequirePackage{graphicx} \RequirePackage{amsmath} -\PassOptionsToPackage{vmargin=5\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} +\PassOptionsToPackage{vmargin=6\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} \if@todos \setlength{\marginparwidth}{6cm} \PassOptionsToPackage{paperwidth=\dimexpr +0.915\paperwidth+\marginparsep+\marginparwidth+0.25cm, right=\dimexpr +\marginparsep+\marginparwidth+0.25cm}{geometry} @@ -126,8 +126,8 @@ \setlength{\marginparwidth}{5.2cm} \else \newcommand{\listoftodos}[1]{} - \newcommand{\todo}[2]{} - \newcommand{\missingfigure}[2]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} \fi \RequirePackage{pgffor} %% options for not loaded packages ---------------------------------------------------------------- diff --git a/src/HsH-standalone.cls b/src/HsH-standalone.cls index fe7782eb62ffcba27ae6f3fd87b0e2c83b9bb23b..b865a5f11fe6a576d6eb36f273ef5b31460f53e5 100644 --- a/src/HsH-standalone.cls +++ b/src/HsH-standalone.cls @@ -20,10 +20,10 @@ %% and version 1.3 or later is part of all distributions of LaTeX version %% 2021/01/01 or later. %% -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2023-08-12> Jan Wille} +\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} \NeedsTeXFormat{LaTeX2e} \newcommand{\myClassName}{HsH-standalone} -\ProvidesClass{\myClassName}[2023/08/12 v2.1 HsH-Class based on KOMA] +\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] %% commands for HsH-logo \newcommand{\HsHlogoPath}{HSH-Logo.pdf}