From 64438dda6062347b48ef2c7e23a1dff39e16778b Mon Sep 17 00:00:00 2001 From: Jan Wille <jan.wille@stud.hs-hannover.de> Date: Thu, 18 Apr 2024 15:05:20 +0200 Subject: [PATCH] make first argument of `\todo` and `\missingfigure` optional The dummy commands expected to full arguments, but the real ones accept a optional argument. this cased errors when removing the `todos` option. closes #11 --- CHANGELOG.md | 6 ++++++ HsH-classes.dtx | 8 ++++---- src/HsH-article.cls | 8 ++++---- src/HsH-report.cls | 8 ++++---- src/HsH-standalone.cls | 4 ++-- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5842e8..c625f4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. ## [Current] +## [2.2] + +### Fixed + +- make first argument of `\todo` and `\missingfigure` optional (#11) + ## [2.1] ### Breaking diff --git a/HsH-classes.dtx b/HsH-classes.dtx index d8efe05..5001a6d 100644 --- a/HsH-classes.dtx +++ b/HsH-classes.dtx @@ -16,13 +16,13 @@ % \fi % %<*article|report|standalone> -\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} % %<article>\newcommand{\myClassName}{HsH-article} %<report>\newcommand{\myClassName}{HsH-report} %<standalone>\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} @@ -168,8 +168,8 @@ \setlength{\marginparwidth}{5.2cm} \else \newcommand{\listoftodos}[1]{} - \newcommand{\todo}[2]{} - \newcommand{\missingfigure}[2]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} \fi % % foreach loops diff --git a/src/HsH-article.cls b/src/HsH-article.cls index 433b198..ad988e2 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} @@ -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 b36c9a2..4c4f13e 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} @@ -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 fe7782e..b865a5f 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} -- GitLab