diff options
Diffstat (limited to 'Master/texmf-dist/tex')
10 files changed, 222 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgb.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgb.sty index 41af43020dd..0522897796f 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgb.sty +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgb.sty @@ -5,7 +5,7 @@ %% File encoding: ASCII \NeedsTeXFormat{LaTeX2e} -\newcommand{\hgbDate}{2017/10/28} % version string +\newcommand{\hgbDate}{2018/11/24} % version string \ProvidesPackage{hgb}[\hgbDate] % Create a default/fallback main language so it is set no matter what @@ -141,10 +141,20 @@ % Captions with font size "small" and additional margin spacing \RequirePackage[small,bf]{caption} +\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=colon} \setlength{\captionmargin}{5mm} \setlength{\abovecaptionskip}{10pt} \setlength{\belowcaptionskip}{10pt} +%% Disable \footnote in captions: +\newcommand{\@WarnFootnoteInCaption}{% +\GenericError{}{Package hgb Error: footnotes in captions are disabled}% +{How to fix: do not place footnotes in captions!}{}}% +\DeclareCaptionTextFormat{nofootnotes}{% + \renewcommand{\footnote}[1]{\@WarnFootnoteInCaption\relax}#1} +\captionsetup{textformat=nofootnotes} + + % Make float placement easier \renewcommand{\floatpagefraction}{.9} % previously: .5 \renewcommand{\textfraction}{.1} % previously: .2 @@ -173,23 +183,15 @@ % \end{nowidows} -%% Definitions for Algorithms ------------------------------------------------- - -% 'algorithm' creates a floating environment for algorithms (\begin{algorithm}...) -\@ifundefined{chapter}% - {\RequirePackage[ruled]{algorithm}}% - {\RequirePackage[ruled,chapter]{algorithm}} - -\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=colon} +% Setup for Table of Contents (ToC) -% 'algorithmicx' returns the inner content of algorithms (\begin{algorithmic}[1]...) -\RequirePackage{algorithmicx} -\RequirePackage{algpseudocode} -\algsetlanguage{pseudocode} -\renewcommand{\algorithmicprocedure}{} % use no 'Procedure' keyword +%\RequirePackage[tocgraduated,tocbreaksstrict]{tocstyle}% %% Note: tocstyle is unsupported! +%\usetocstyle{classic}% +\RequirePackage{tocbasic}% %% tocbasic is part of koma script +\DeclareTOCStyleEntry[entryformat=\bfseries\textsf]{tocline}{chapter}% -%% Program and Algorithm Environments ---------------------------------------- +%% Program environments ---------------------------------------- % Define the program float environment: \@ifundefined{chapter}% @@ -200,14 +202,10 @@ \restylefloat*{program} \ifthenelse{\equal{\bbl@main@language}{german} \or \equal{\bbl@main@language}{ngerman}}% -{ \floatname{program}{Programm} - \floatname{algorithm}{Algorithmus} -}{} + {\floatname{program}{Programm}}{}% \ifthenelse{\equal{\bbl@main@language}{english}}% -{ \floatname{program}{Program} - \floatname{algorithm}{Algorithm} -}{} + {\floatname{program}{Program}}{}% %% Date-related commands ------------------------------------------------------ @@ -277,6 +275,16 @@ \RequirePackage{pdfpages} +%% Prevent subfigure package from being loaded ------------------------------- + +% The subfigure package is DEPRECATED (see https://ctan.org/pkg/subfigure)! +% We strongly advise against its use since it creates poor output which is not +% compatible with our quality standards. Loading this package is therefore blocked +% by default. We recommend to use the 'tabular' environment instead. + +\newcommand{\subfigure}{% +\PackageError{hgb}{Use of the 'subfigure' package is not supported in this setup, because it is obsolete}{}} + %% ---------------------------------------------------------------------------- \setlength{\fboxsep}{0mm} %globally zero fbox separator diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbabbrev.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbabbrev.sty index 01e7f6f9838..89215160845 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbabbrev.sty +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbabbrev.sty @@ -4,7 +4,7 @@ %% GitHub: https://github.com/Digital-Media/HagenbergThesis %% File encoding: ASCII -\ProvidesPackage{hgbabbrev}[2017/10/28] +\ProvidesPackage{hgbabbrev}[2018/11/24] \newcommand{\latex}{La\-TeX\xspace} % no ornamental LaTeX anymore \newcommand{\tex}{TeX\xspace} % no ornamental LaTeX anymore diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbalgo.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbalgo.sty new file mode 100644 index 00000000000..f7f0f8c2e50 --- /dev/null +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbalgo.sty @@ -0,0 +1,109 @@ +%% hgbalgo.sty + +%% Toward better looking algorithms ... +%% This package imports and pre-configures the 'algorithmicx'/'algorithmicpseudocode' packages +%% (see https://ctan.org/pkg/algorithmicx), fixes some problems and adds new functionality +%% and colors. It relies on the 'algorithm' package for typesetting float-type algorithms +%% with captions. + +%% This file is part of the Hagenberg Thesis package for creating bachelors's and masters's theses +%% Author: Wilhelm Burger (wilhelm.burger@fh-hagenberg.at) +%% GitHub: https://github.com/Digital-Media/HagenbergThesis +%% File encoding: ASCII + +\ProvidesPackage{hgbalgo}[2018/11/24] + +\RequirePackage[]{algpseudocode} % imports algpseudocode + algorithmicx (use 'noend' to turn off 'end') +\RequirePackage{calc} % for numeric calculations +\RequirePackage{xcolor} + +% Colors to be used in algorithms (can be redefined locally if desired) +%\definecolor{AlgKeywordColor}{named}{black} +%\definecolor{AlgProcedureColor}{named}{black} +%\definecolor{AlgCommentColor}{named}{black} + +\definecolor{AlgKeywordColor}{rgb}{0.00, 0.00, 0.666} % = Dark Blue +\definecolor{AlgProcedureColor}{rgb}{0.00, 0.5, 0.20} % = Dark Green +\definecolor{AlgCommentColor}{gray}{0.40} % = Gray (40% black) + +\algrenewcommand\algorithmicend{\textbf{\color{AlgKeywordColor}end}} +\algrenewcommand\algorithmicdo{\textbf{\color{AlgKeywordColor}do}} +\algrenewcommand\algorithmicwhile{\textbf{\color{AlgKeywordColor}while}} +\algrenewcommand\algorithmicfor{\textbf{\color{AlgKeywordColor}for}} +\algrenewcommand\algorithmicforall{\textbf{\color{AlgKeywordColor}for all}} +\algrenewcommand\algorithmicloop{\textbf{\color{AlgKeywordColor}loop}} +\algrenewcommand\algorithmicrepeat{\textbf{\color{AlgKeywordColor}repeat}} +\algrenewcommand\algorithmicuntil{\textbf{\color{AlgKeywordColor}until}} +\algrenewcommand\algorithmicprocedure{\textbf{\color{AlgKeywordColor}procedure}} +\algrenewcommand\algorithmicfunction{\textbf{\color{AlgKeywordColor}function}} +\algrenewcommand\algorithmicif{\textbf{\color{AlgKeywordColor}if}} +\algrenewcommand\algorithmicthen{\textbf{\color{AlgKeywordColor}then}} +\algrenewcommand\algorithmicelse{\textbf{\color{AlgKeywordColor}else}} +\algrenewcommand\algorithmicrequire{\textbf{\color{AlgKeywordColor}Require:}} +\algrenewcommand\algorithmicensure{\textbf{\color{AlgKeywordColor}Ensure:}} +\algrenewcommand\algorithmicreturn{\textbf{\color{AlgKeywordColor}return}} + +\algrenewcommand\algorithmiccomment[1]{\hfill{\color{AlgCommentColor}\(\triangleright\) #1}}% + +%% algpseudocode assumes that these keywords are non-empty: +%\algrenewcommand\algorithmicprocedure{} % no 'procedure' keyword +%\algrenewcommand\algorithmicfunction{} % no 'function' keyword + +% Use SF font and color for procedure and function names: +\newcommand{\@AlgTextProc}[1]{\textcolor{AlgProcedureColor}{\textsf{#1}}} +\algrenewcommand\textproc{\@AlgTextProc} + +% Redefinitions to remove wrong space when \algorithmicprocedure is empty. +% Inserts an empty () parameter list when no parameters are supplied: +\algdef{SE}[PROCEDURE]{Procedure}{EndProcedure}[2]{% + \ifthenelse{\equal{\algorithmicprocedure}{}}% + {}{\algorithmicprocedure\ }% + \textproc{#1}\hskip0.75pt(#2)}% + {\algorithmicend\ \algorithmicprocedure}% + +\algdef{SE}[FUNCTION]{Function}{EndFunction}[2]{% + \ifthenelse{\equal{\algorithmicfunction}{}}% + {}{\algorithmicfunction\ }% + \textproc{#1}\hskip0.75pt(#2)}% + {\algorithmicend\ \algorithmicfunction}% + +%\algrenewcommand\Call[2]{\textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}% +\algrenewcommand\Call[2]{\textproc{#1}\hskip0.75pt(#2)}% + +%% ----------------------------------------------------------------- + +\newlength{\@AlgTmpIndent} + +%% New public macros: + +% \StateLong{<text>} creates numbered statements like algorithmicx's \State command but +% provides consistent indentation on multi-line statements. +% Note that the statement text must be passed as an argument in {...} brackets +\newcommand*{\StateL}[1]{\State \parbox[t]{\linewidth-\ALG@thistlm}{#1\strut}}% + +% \StateNN[<nesting>]{<text>} creates non-numbered statements like algorithmicx's \Statex +% command but provides consistent indentation inside nested constructs and over multiple lines. +% The optional integer argument [<nesting>] can be used to specify the nesting depth +% to counteract a bug in algorithmicx (nesting level is not set properly before the first \State +% command inside a nested construct. +\newcommand{\StateNN}[2][\numexpr\theALG@nested-1]{% default indentation = nesting - 1 + \setlength\@AlgTmpIndent{\algorithmicindent*#1}% requires calc package + \Statex\hskip\@AlgTmpIndent\parbox[t]{\linewidth-\@AlgTmpIndent}{#2\strut}% +}% + +% Macros for describing input and output of procedures and functions: +\algnewcommand\Input[1]{\StateNN[1]{\textbf{Input:} #1}}% use to describe input parameters: \Input{<description>} +\algnewcommand\Output[1]{\StateNN[1]{\textbf{Output:} #1}}% use to describe output values: \Output{<description>} +\algnewcommand\Returns[1]{\StateNN[1]{\textbf{Returns} #1}}% use to describe what a procedure/function returns: \Returns{<description} + + +% 'algorithm' creates a floating environment for algorithms: \begin{algorithm}...\end{algorithm} +\@ifundefined{chapter}% + {\RequirePackage[ruled]{algorithm}}% + {\RequirePackage[ruled,chapter]{algorithm}} + +\ifthenelse{\equal{\bbl@main@language}{german} \or \equal{\bbl@main@language}{ngerman}}% + {\floatname{algorithm}{Algorithmus}}{}% + +\ifthenelse{\equal{\bbl@main@language}{english}}% + {\floatname{algorithm}{Algorithm}}{}% diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbarticle.cls b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbarticle.cls index fc861b52c73..e135f741035 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbarticle.cls +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbarticle.cls @@ -8,7 +8,7 @@ %% Package Information -------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{hgbarticle}[2017/10/28] +\ProvidesClass{hgbarticle}[2018/11/24] \RequirePackage{xifthen} @@ -57,6 +57,17 @@ \RequirePackage{hgb} % load associated style file hgb.sty +%% Set title font to SF +\RequirePackage{titling} +\renewcommand{\maketitlehooka}{\sffamily} + +%% Set abstract name to bold (single column format only) +\if@twocolumn% +\else% +\RequirePackage{abstract} +\renewcommand{\abstractnamefont}{\sffamily\small\bfseries} +\fi% + % Add PDF meta data \AtBeginDocument{% @@ -74,6 +85,7 @@ %% Additional Hagenberg packages ---------------------------------------------- \RequirePackage{hgbmath} +\RequirePackage{hgbalgo} \RequirePackage{hgbheadings} \RequirePackage{hgbabbrev} \RequirePackage{hgblistings} diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbbib.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbbib.sty index 4903e98de15..4427cde4804 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbbib.sty +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbbib.sty @@ -5,14 +5,20 @@ %% GitHub: https://github.com/Digital-Media/HagenbergThesis %% File encoding: ASCII -\ProvidesPackage{hgbbib}[2017/10/28] +\ProvidesPackage{hgbbib}[2018/11/24] \usepackage{csquotes} % recommended for biblatex %Note: biblatex with bibtex backend is frozen at version 1.7. \usepackage[style=numeric-comp,backend=biber,bibencoding=auto]{biblatex} - -\ExecuteBibliographyOptions{bibwarn=true,sortcites=true,defernumbers=true,isbn=false,doi=false,backref=true} +\ExecuteBibliographyOptions{ + bibwarn=true, + sortcites=true, + defernumbers=true, + isbn=false, + doi=false, + backref=true, + backrefstyle=three} %% titles of reference section + 3 categories of references: \newcommand{\@bibtitle}{Quellenverzeichnis} @@ -144,3 +150,28 @@ \DeclareBibliographyAlias{electronic}{misc} \DeclareBibliographyAlias{image}{misc} \DeclareBibliographyAlias{standard}{misc} + + +% Use a semicolon between multiple entries in \cites +%\renewcommand*{\multicitedelim}{\addsemicolon\space} %% abandoned, affects regular \cite{a,b,c,..} entries too + +% New command for multiple citations with supplementary texts +% usage: \mcite[text1]{key1}[text2]{key2}...[textN]{keyN} +% see https://tex.stackexchange.com/a/132981 +\DeclareMultiCiteCommand{\mcite}[\mkbibbrackets]{\cite}{\addsemicolon\space} + + +% Macro to produce cites with no backref entries +% Modified from http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.cbx +% See also https://tex.stackexchange.com/questions/344861/biblatex-backref-option-per-entry +\DeclareCiteCommand{\citenobr}% + {\usebibmacro{cite:init}% + \bibopenbracket + \backtrackerfalse\usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}% + \usebibmacro{postnote}% + \bibclosebracket + } diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbheadings.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbheadings.sty index b55a3fc561d..d17c94438a9 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbheadings.sty +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbheadings.sty @@ -5,7 +5,7 @@ %% GitHub: https://github.com/Digital-Media/HagenbergThesis %% File encoding: ASCII -\ProvidesPackage{hgbheadings}[2017/10/28] +\ProvidesPackage{hgbheadings}[2018/11/24] \RequirePackage{fancyhdr} \pagestyle{fancy} @@ -34,28 +34,3 @@ \renewcommand{\footrulewidth}{0pt} } -%% Setup for headings (title, toc, abstract) for hgb* classes only ------------ - -\makeatletter% -\@ifclassloaded{hgbthesis}{% - \RequirePackage[titles]{tocloft}% - \renewcommand{\cftchapfont}{\bfseries\sffamily} -}{}% -\@ifclassloaded{hgbreport}{% - \RequirePackage{titling} - \renewcommand{\maketitlehooka}{\sffamily} - \RequirePackage[titles]{tocloft}% - \renewcommand{\cftchapfont}{\bfseries\sffamily} - \RequirePackage{abstract}% - \renewcommand{\abstractnamefont}{\sffamily\small\bfseries} -}{}% -\@ifclassloaded{hgbarticle}{% - \RequirePackage{titling} - \renewcommand{\maketitlehooka}{\sffamily} - \if@twocolumn% - \else% - \RequirePackage{abstract} - \renewcommand{\abstractnamefont}{\sffamily\small\bfseries} - \fi% -}{}% -\makeatother% diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgblistings.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgblistings.sty index 32511342267..b15b87b74ac 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgblistings.sty +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgblistings.sty @@ -4,9 +4,10 @@ %% GitHub: https://github.com/Digital-Media/HagenbergThesis %% File encoding: UTF-8 -\ProvidesPackage{hgblistings}[2017/10/28] +\ProvidesPackage{hgblistings}[2018/11/24] \RequirePackage{ifthen} +\RequirePackage{textcomp} %% required for upquote option \RequirePackage{xcolor} \definecolor{ListingsBackgroundColor}{gray}{0.95} @@ -201,3 +202,19 @@ keepspaces=true,% escapeinside={/+}{+/}, % makes "/+" and "+/" available for Latex escapes (labels etc.) #1}}% {} + + +% Disable the lstlisting environment (due to popular abuse) +\newcommand{\@WarnLstlisting}{ +\GenericError{}{Package hgblistings Error: The 'lstlisting' environment is disabled}% +{See the error note inserted in the document output for details.}{}% +\begin{quote} +\color{red}\textbf{NOTE:} The \texttt{lstlisting} environment has been deliberately disabled in this setup. +Use \emph{inline code} (breakable and \emph{without} a caption) or create a \emph{float container} with +\texttt{{\textbackslash}begin\{program\} \ldots {\textbackslash}end\{program\}} instead! +See the \texttt{hgbthesis} tutorial for examples. +\end{quote}% +} +\renewenvironment{lstlisting}[0]% +{\@WarnLstlisting\expandafter\comment}% +{\expandafter\endcomment}% diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbmath.sty b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbmath.sty index c73aa717231..33604df889d 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbmath.sty +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbmath.sty @@ -5,7 +5,7 @@ %% File encoding: ASCII \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{hgbmath}[2017/10/28] +\ProvidesPackage{hgbmath}[2018/11/24] \RequirePackage{amsmath,amsfonts,amssymb,amsbsy} \RequirePackage{subdepth} % for positioning of sub and super scripts diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbreport.cls b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbreport.cls index 6dff1a37e61..6d7a923e7bf 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbreport.cls +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbreport.cls @@ -8,7 +8,7 @@ %% Package Information -------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{hgbreport}[2017/10/28] +\ProvidesClass{hgbreport}[2018/11/24] \RequirePackage{xifthen} @@ -52,6 +52,15 @@ \RequirePackage{hgb} % load associated style file hgb.sty +%% Set title font to SF +\RequirePackage{titling} +\renewcommand{\maketitlehooka}{\sffamily} + +%% Set abstract name to bold +\RequirePackage{abstract}% +\renewcommand{\abstractnamefont}{\sffamily\small\bfseries} + + % Add PDF meta data \AtBeginDocument{% @@ -69,6 +78,7 @@ %% Additional Hagenberg packages ---------------------------------------------- \RequirePackage{hgbmath} +\RequirePackage{hgbalgo} \RequirePackage{hgbheadings} \RequirePackage{hgbabbrev} \RequirePackage{hgblistings} diff --git a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbthesis.cls b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbthesis.cls index fbe1a6b2998..ba16c467923 100644 --- a/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbthesis.cls +++ b/Master/texmf-dist/tex/latex/hagenberg-thesis/hgbthesis.cls @@ -8,7 +8,7 @@ %% Package Information -------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{hgbthesis}[2017/10/28] +\ProvidesClass{hgbthesis}[2018/11/24] \RequirePackage{xifthen} @@ -587,7 +587,6 @@ This work is published under the conditions of the \@declarationpage } - % Add PDF meta data and create title pages \renewcommand{\maketitle}{ %replace standard LaTeX-command @@ -597,15 +596,17 @@ This work is published under the conditions of the pdfsubject={\@programname, \@placeofstudy}, pdfcreator={LaTeX using class hgbthesis [\hgbDate]}, pdfproducer={pdflatex}, - pdfkeywords={} + pdfkeywords={}, + pageanchor=false % disable hyperref page anchors in frontmatter pages }% - \@maketitlepages + \hypersetup{pageanchor=true} % enable hyperref page anchors in the main document } %% Additional Hagenberg packages ---------------------------------------------- \RequirePackage{hgbmath} +\RequirePackage{hgbalgo} \RequirePackage{hgbheadings} \RequirePackage{hgbabbrev} \RequirePackage{hgblistings} |