diff --git a/CHANGELOG.md b/CHANGELOG.md index e237fff25f41b44edc52562e3c139215abb98e99..dd933c2475f8bf8b7459d01bee2f7bcca07375fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file. Here is a regex to fix existing code: `(?<=\\ifsingleauthor)(\{.*?\})\\else(\{.*?\})\\fi(\\space)?` which you can replace with `$1$2`. +### Fixed + +- `abstract` not working for `hsh-article` + ### Added - Using the `\and` command inside `\author` or `\matrikelnr` now works as expected (#21) diff --git a/src/HsH-article.cls b/src/HsH-article.cls index ebecc3432e9fbc2f4ac1bc4f61ad5d0e550728cb..feca31427640013c66fe5f4fc311cb650199c0c5 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -123,7 +123,9 @@ \headheight=\HsH@opt@headheight% } \newif\if@HsH@option@abstract@show@keywords -\def\HsH@abstract@chap{\addchap*} +\def\HsH@abstract@heading{% + \addsec*% +} \DefineFamilyKey{HsH}{abstract}{% \begingroup \FamilySetNumerical{HsH}{abstract}{@tempa}{% @@ -142,10 +144,14 @@ \@HsH@option@abstract@show@keywordsfalse \or% 2 \endgroup - \def\HsH@abstract@chap{\addchap} + \def\HsH@abstract@heading{% + \addsec% + } \or% 3 \endgroup - \def\HsH@abstract@chap{\addchap*} + \def\HsH@abstract@heading{% + \addsec*% + } \else% should never be \endgroup \fi @@ -410,7 +416,7 @@ \renewenvironment{abstract}{ \quotation \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} + \HsH@abstract@heading{\abstractname} }{% \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords \par\bigskip diff --git a/src/HsH-classes.dtx b/src/HsH-classes.dtx index d2abd13b037b3f7365582ccd0ffd31d8923b6484..c79c9ec835e9963ee3b8ca5f1ef5f098888175f0 100644 --- a/src/HsH-classes.dtx +++ b/src/HsH-classes.dtx @@ -669,7 +669,10 @@ http://www.latex-project.org/lppl.txt % We first define the needed macros: % \begin{macrocode} \newif\if@HsH@option@abstract@show@keywords -\def\HsH@abstract@chap{\addchap*} +\def\HsH@abstract@heading{% +%<article> \addsec*% +%<report> \addchap*% +} % \end{macrocode} % Now the actuall option can be defiend to handle all the cases. % \begin{macrocode} @@ -691,10 +694,16 @@ http://www.latex-project.org/lppl.txt \@HsH@option@abstract@show@keywordsfalse \or% 2 \endgroup - \def\HsH@abstract@chap{\addchap} + \def\HsH@abstract@heading{% +%<article> \addsec% +%<report> \addchap% + } \or% 3 \endgroup - \def\HsH@abstract@chap{\addchap*} + \def\HsH@abstract@heading{% +%<article> \addsec*% +%<report> \addchap*% + } \else% should never be \endgroup \fi @@ -1447,10 +1456,11 @@ http://www.latex-project.org/lppl.txt % \paragraph{Abstract} % We define some custom behavior for the abstract. % \begin{macrocode} +%<*!standalone> \renewenvironment{abstract}{ \quotation \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} + \HsH@abstract@heading{\abstractname} }{% \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords \par\bigskip @@ -1458,6 +1468,7 @@ http://www.latex-project.org/lppl.txt \fi\fi\par \endquotation } +%</!standalone> % \end{macrocode} % % \paragraph{Misc} diff --git a/src/HsH-classes.pdf b/src/HsH-classes.pdf index 2b97c7de5ed48c542e087a3a2b27b5c1ea0c0e20..ba48d160c2b67a4182948090947913990b7ae82b 100644 --- a/src/HsH-classes.pdf +++ b/src/HsH-classes.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab7947ef728c9fd89c76a603fc30eb8a1166bd88a46472ab29f6d6e65cd46793 -size 314708 +oid sha256:7849fd44b916d0c09a9a8001f12f4453db42e21b833ba9a6addc2ec55b6c6dd5 +size 314950 diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 49664ac310bab25c15ed9a656aa3ec73ff6af0b1..3c74cd980968953abab3c015dd866d2b6f42fc3d 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -123,7 +123,9 @@ \headheight=\HsH@opt@headheight% } \newif\if@HsH@option@abstract@show@keywords -\def\HsH@abstract@chap{\addchap*} +\def\HsH@abstract@heading{% + \addchap*% +} \DefineFamilyKey{HsH}{abstract}{% \begingroup \FamilySetNumerical{HsH}{abstract}{@tempa}{% @@ -142,10 +144,14 @@ \@HsH@option@abstract@show@keywordsfalse \or% 2 \endgroup - \def\HsH@abstract@chap{\addchap} + \def\HsH@abstract@heading{% + \addchap% + } \or% 3 \endgroup - \def\HsH@abstract@chap{\addchap*} + \def\HsH@abstract@heading{% + \addchap*% + } \else% should never be \endgroup \fi @@ -423,7 +429,7 @@ \renewenvironment{abstract}{ \quotation \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} + \HsH@abstract@heading{\abstractname} }{% \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords \par\bigskip diff --git a/src/HsH-standalone.cls b/src/HsH-standalone.cls index b2a001913dddd0d67b8fd981d522a4964a02b948..29b263027c8d7e9b3d38647faca498fdaad2644d 100644 --- a/src/HsH-standalone.cls +++ b/src/HsH-standalone.cls @@ -221,17 +221,6 @@ \renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} \renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} \renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} -\renewenvironment{abstract}{ - \quotation - \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} -}{% - \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords - \par\bigskip - \noindent\textbf{\keywordsname}\hskip 2em\@keywords - \fi\fi\par - \endquotation -} \upsubscripts \raggedbottom \let\layercontentsmeasure\relax