Skip to content
Snippets Groups Projects
Commit 10e6af8f authored by Jan Wille's avatar Jan Wille
Browse files

fix abstract for article class

the environment was using `chapter` for all classes, but on article it needs to be sections
parent 61f0e650
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file. ...@@ -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)?` Here is a regex to fix existing code: `(?<=\\ifsingleauthor)(\{.*?\})\\else(\{.*?\})\\fi(\\space)?`
which you can replace with `$1$2`. which you can replace with `$1$2`.
### Fixed
- `abstract` not working for `hsh-article`
### Added ### Added
- Using the `\and` command inside `\author` or `\matrikelnr` now works as expected (#21) - Using the `\and` command inside `\author` or `\matrikelnr` now works as expected (#21)
......
...@@ -123,7 +123,9 @@ ...@@ -123,7 +123,9 @@
\headheight=\HsH@opt@headheight% \headheight=\HsH@opt@headheight%
} }
\newif\if@HsH@option@abstract@show@keywords \newif\if@HsH@option@abstract@show@keywords
\def\HsH@abstract@chap{\addchap*} \def\HsH@abstract@heading{%
\addsec*%
}
\DefineFamilyKey{HsH}{abstract}{% \DefineFamilyKey{HsH}{abstract}{%
\begingroup \begingroup
\FamilySetNumerical{HsH}{abstract}{@tempa}{% \FamilySetNumerical{HsH}{abstract}{@tempa}{%
...@@ -142,10 +144,14 @@ ...@@ -142,10 +144,14 @@
\@HsH@option@abstract@show@keywordsfalse \@HsH@option@abstract@show@keywordsfalse
\or% 2 \or% 2
\endgroup \endgroup
\def\HsH@abstract@chap{\addchap} \def\HsH@abstract@heading{%
\addsec%
}
\or% 3 \or% 3
\endgroup \endgroup
\def\HsH@abstract@chap{\addchap*} \def\HsH@abstract@heading{%
\addsec*%
}
\else% should never be \else% should never be
\endgroup \endgroup
\fi \fi
...@@ -410,7 +416,7 @@ ...@@ -410,7 +416,7 @@
\renewenvironment{abstract}{ \renewenvironment{abstract}{
\quotation \quotation
\setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont \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 \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords
\par\bigskip \par\bigskip
......
...@@ -669,7 +669,10 @@ http://www.latex-project.org/lppl.txt ...@@ -669,7 +669,10 @@ http://www.latex-project.org/lppl.txt
% We first define the needed macros: % We first define the needed macros:
% \begin{macrocode} % \begin{macrocode}
\newif\if@HsH@option@abstract@show@keywords \newif\if@HsH@option@abstract@show@keywords
\def\HsH@abstract@chap{\addchap*} \def\HsH@abstract@heading{%
%<article> \addsec*%
%<report> \addchap*%
}
% \end{macrocode} % \end{macrocode}
% Now the actuall option can be defiend to handle all the cases. % Now the actuall option can be defiend to handle all the cases.
% \begin{macrocode} % \begin{macrocode}
...@@ -691,10 +694,16 @@ http://www.latex-project.org/lppl.txt ...@@ -691,10 +694,16 @@ http://www.latex-project.org/lppl.txt
\@HsH@option@abstract@show@keywordsfalse \@HsH@option@abstract@show@keywordsfalse
\or% 2 \or% 2
\endgroup \endgroup
\def\HsH@abstract@chap{\addchap} \def\HsH@abstract@heading{%
%<article> \addsec%
%<report> \addchap%
}
\or% 3 \or% 3
\endgroup \endgroup
\def\HsH@abstract@chap{\addchap*} \def\HsH@abstract@heading{%
%<article> \addsec*%
%<report> \addchap*%
}
\else% should never be \else% should never be
\endgroup \endgroup
\fi \fi
...@@ -1447,10 +1456,11 @@ http://www.latex-project.org/lppl.txt ...@@ -1447,10 +1456,11 @@ http://www.latex-project.org/lppl.txt
% \paragraph{Abstract} % \paragraph{Abstract}
% We define some custom behavior for the abstract. % We define some custom behavior for the abstract.
% \begin{macrocode} % \begin{macrocode}
%<*!standalone>
\renewenvironment{abstract}{ \renewenvironment{abstract}{
\quotation \quotation
\setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont \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 \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords
\par\bigskip \par\bigskip
...@@ -1458,6 +1468,7 @@ http://www.latex-project.org/lppl.txt ...@@ -1458,6 +1468,7 @@ http://www.latex-project.org/lppl.txt
\fi\fi\par \fi\fi\par
\endquotation \endquotation
} }
%</!standalone>
% \end{macrocode} % \end{macrocode}
% %
% \paragraph{Misc} % \paragraph{Misc}
......
No preview for this file type
...@@ -123,7 +123,9 @@ ...@@ -123,7 +123,9 @@
\headheight=\HsH@opt@headheight% \headheight=\HsH@opt@headheight%
} }
\newif\if@HsH@option@abstract@show@keywords \newif\if@HsH@option@abstract@show@keywords
\def\HsH@abstract@chap{\addchap*} \def\HsH@abstract@heading{%
\addchap*%
}
\DefineFamilyKey{HsH}{abstract}{% \DefineFamilyKey{HsH}{abstract}{%
\begingroup \begingroup
\FamilySetNumerical{HsH}{abstract}{@tempa}{% \FamilySetNumerical{HsH}{abstract}{@tempa}{%
...@@ -142,10 +144,14 @@ ...@@ -142,10 +144,14 @@
\@HsH@option@abstract@show@keywordsfalse \@HsH@option@abstract@show@keywordsfalse
\or% 2 \or% 2
\endgroup \endgroup
\def\HsH@abstract@chap{\addchap} \def\HsH@abstract@heading{%
\addchap%
}
\or% 3 \or% 3
\endgroup \endgroup
\def\HsH@abstract@chap{\addchap*} \def\HsH@abstract@heading{%
\addchap*%
}
\else% should never be \else% should never be
\endgroup \endgroup
\fi \fi
...@@ -423,7 +429,7 @@ ...@@ -423,7 +429,7 @@
\renewenvironment{abstract}{ \renewenvironment{abstract}{
\quotation \quotation
\setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont \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 \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords
\par\bigskip \par\bigskip
......
...@@ -221,17 +221,6 @@ ...@@ -221,17 +221,6 @@
\renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} \renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}}
\renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} \renewcommand{\labelitemiii}{\raisebox{.1ex}{-}}
\renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} \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 \upsubscripts
\raggedbottom \raggedbottom
\let\layercontentsmeasure\relax \let\layercontentsmeasure\relax
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment