diff --git a/CHANGELOG.md b/CHANGELOG.md index baef11bcadf65cb6e751b7d265622c68c414cb8a..d82968431d5afc1996179b7b0599f391b6dec982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Current] +### Added +- defined `\fronmatter`, `\mainmatter` and `\backmatter` for HsH-report class + ## [1.3] - 2022-03-07 diff --git a/HsH-classes.dtx b/HsH-classes.dtx index f97a009f742066704e3794d5bba2112e0ae25855..0aaad61a17b91b6e5dc6f3820ac878a059fab1f9 100644 --- a/HsH-classes.dtx +++ b/HsH-classes.dtx @@ -210,6 +210,23 @@ % rulers when using draft disabled \renewcommand{\layercontentsmeasure}{\@empty} +%<*report> +% these commands are only defined for the book class, but they also make sens for the report class: +%% define easy shorthands to switch pagenumbering +\newif\if@mainmatter\@mainmattertrue +\newcommand*\frontmatter{% + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{Roman}% +} +\newcommand*\mainmatter{% + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmattertrue\pagenumbering{arabic}% +} +\newcommand*\backmatter{% + \if@openright\cleardoubleoddpage\else\clearpage\fi\@mainmatterfalse +} + +%</report> %% custom commands % these two comand can convert decimal number into roman numerrals in etheir upper- or lowercase \newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 8403cce080878d90e9ef76f4a248eb74a1a73364..d26c094bc1304f2d4f155966f7a264605c116652 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -152,6 +152,20 @@ \raggedbottom \renewcommand{\layercontentsmeasure}{\@empty} +%% define easy shorthands to switch pagenumbering +\newif\if@mainmatter\@mainmattertrue +\newcommand*\frontmatter{% + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{Roman}% +} +\newcommand*\mainmatter{% + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmattertrue\pagenumbering{arabic}% +} +\newcommand*\backmatter{% + \if@openright\cleardoubleoddpage\else\clearpage\fi\@mainmatterfalse +} + %% custom commands \newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} \newcommand{\lowroman}[1]{\romannumeral#1\relax}