Skip to content
Snippets Groups Projects
Verified Commit 4410259c authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

bibliography for KOMA-Script auto-sizing itself by largest entry

parent 570dfc8e
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
% of said person’s immediate fault when using the work as intended. % of said person’s immediate fault when using the work as intended.
\NeedsTeXFormat{LaTeX2e}% \NeedsTeXFormat{LaTeX2e}%
\ProvidesClass{teckids2jahresbericht}[2019/05/14 1.2 Teckids Jahresbericht class]% \ProvidesClass{teckids2jahresbericht}[2019/05/15 1.2 Teckids Jahresbericht class]%
\PassOptionsToPackage{paper=a4}{typearea}% \PassOptionsToPackage{paper=a4}{typearea}%
\RequirePackage{fancyhdr}% \RequirePackage{fancyhdr}%
\LoadClass[toc=sectionentrywithdots]{scrartcl}% \LoadClass[bibliography=totocnumbered,bibliography=leveldown,toc=sectionentrywithdots]{scrartcl}%
\RequirePackage{teckids2style}% \RequirePackage{teckids2style}%
\RequirePackage{tikz}% \RequirePackage{tikz}%
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
% of said person’s immediate fault when using the work as intended. % of said person’s immediate fault when using the work as intended.
\NeedsTeXFormat{LaTeX2e}% \NeedsTeXFormat{LaTeX2e}%
\ProvidesClass{teckids2proto}[2019/05/14 0.2 Teckids Protokoll TeX/LaTeX class, second epoch]% \ProvidesClass{teckids2proto}[2019/05/15 0.2 Teckids Protokoll TeX/LaTeX class, second epoch]%
\PassOptionsToPackage{paper=a4}{typearea}% \PassOptionsToPackage{paper=a4}{typearea}%
\RequirePackage{fancyhdr}% \RequirePackage{fancyhdr}%
\LoadClass[toc=sectionentrywithdots]{scrartcl}% \LoadClass[bibliography=totocnumbered,bibliography=leveldown,toc=sectionentrywithdots]{scrartcl}%
\RequirePackage{teckids2style}% \RequirePackage{teckids2style}%
\newcommand{\teckidsprotohdr}[1]{% \newcommand{\teckidsprotohdr}[1]{%
......
% Dokumentklasse „Unterrichtsmaterial 2.0“ für den Teckids e.V. % Dokumentklasse „Unterrichtsmaterial 2.0“ für den Teckids e.V.
% %
% Copyright © 2015, 2017, 2018 % Copyright © 2015, 2017, 2018, 2019
% Thorsten Glaser <thorsten.glaser@teckids.org> % Thorsten Glaser <thorsten.glaser@teckids.org>
% Copyright © 2013 % Copyright © 2013
% Dominik George <nik@naturalnet.de> % Dominik George <nik@naturalnet.de>
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
% of said person’s immediate fault when using the work as intended. % of said person’s immediate fault when using the work as intended.
\NeedsTeXFormat{LaTeX2e}% \NeedsTeXFormat{LaTeX2e}%
\ProvidesClass{teckids2pubmat}[2019/05/14 1.4 Teckids OER TeX/LaTeX class, second epoch]% \ProvidesClass{teckids2pubmat}[2019/05/15 1.4 Teckids OER TeX/LaTeX class, second epoch]%
\PassOptionsToPackage{paper=a4}{typearea}% \PassOptionsToPackage{paper=a4}{typearea}%
\RequirePackage{fancyhdr}% \RequirePackage{fancyhdr}%
\LoadClass[toc=sectionentrywithdots]{scrartcl}% \LoadClass[bibliography=totocnumbered,bibliography=leveldown,toc=sectionentrywithdots]{scrartcl}%
\RequirePackage{teckids2style}% \RequirePackage{teckids2style}%
\newcommand{\teckidspubmatnamegroup}{% \newcommand{\teckidspubmatnamegroup}{%
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
% • (em dash) → \dash % • (em dash) → \dash
\NeedsTeXFormat{LaTeX2e}% \NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{teckids2style}[2019/05/14 1.12 Teckids TeX/LaTeX style, second epoch]% for Tₑχ/LᴬTᴇΧ \ProvidesPackage{teckids2style}[2019/05/15 1.14 Teckids TeX/LaTeX style, second epoch]% for Tₑχ/LᴬTᴇΧ
\RequirePackage{accsupp}% \RequirePackage{accsupp}%
\RequirePackage[utf8]{inputenc}% \RequirePackage[utf8]{inputenc}%
...@@ -468,5 +468,26 @@ ...@@ -468,5 +468,26 @@
\begin{minipage}[c]{.4\linewidth}\teckidslogo[\linewidth]\end{minipage} \begin{minipage}[c]{.4\linewidth}\teckidslogo[\linewidth]\end{minipage}
}% }%
% use \begin{autosizedbibliography}
% to auto-detect the widest reference label
\gdef\bibitem@longest{1}%
\AtEndDocument{\immediate\write\@auxout{\gdef\noexpand\bibitem@longest{\bibitem@longest}}}%
\newenvironment{autosizedbibliography}{%
\begin{thebibliography}{\bibitem@longest}%
}{%
\end{thebibliography}%
}%
\let\bibitem@stock\bibitem%
\newcommand{\bibitem@sizer}[2][]{%
\settowidth\@tempdimb{\@biblabel{#1}}%
\settowidth\@tempdima{\@biblabel{\bibitem@longest}}%
\ifdim\@tempdima<\@tempdimb%
\gdef\bibitem@longest{#1}%
\fi%
\bibitem@stock[#1]{#2}%
}%
% now \bibitem{foo} = \bibitem[foo]{foo}
\renewcommand{\bibitem}{\@dblarg\bibitem@sizer}%
% uncomment to figure out overfull hbox % uncomment to figure out overfull hbox
%\overfullrule=2cm %\overfullrule=2cm
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
% of said person’s immediate fault when using the work as intended. % of said person’s immediate fault when using the work as intended.
\NeedsTeXFormat{LaTeX2e}% \NeedsTeXFormat{LaTeX2e}%
\ProvidesClass{teckids2jahresbericht}[2019/05/14 1.1 Teckids Urkunde class]% \ProvidesClass{teckids2jahresbericht}[2019/05/15 1.1 Teckids Urkunde class]%
\PassOptionsToPackage{paper=a4}{typearea}% \PassOptionsToPackage{paper=a4}{typearea}%
\RequirePackage{fancyhdr}% \RequirePackage{fancyhdr}%
\LoadClass[toc=sectionentrywithdots]{scrartcl}% \LoadClass[bibliography=totocnumbered,bibliography=leveldown,toc=sectionentrywithdots]{scrartcl}%
\RequirePackage{teckids2style}% \RequirePackage{teckids2style}%
\teckidsgeometry[hmargin=2cm,top=0.5cm]% \teckidsgeometry[hmargin=2cm,top=0.5cm]%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment