From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- .../contrib/tudscr/source/tudscr-twocolfix.dtx | 258 +++++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx (limited to 'macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx') diff --git a/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx b/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx new file mode 100644 index 0000000000..ff86b18493 --- /dev/null +++ b/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx @@ -0,0 +1,258 @@ +% \CheckSum{214} +% \iffalse meta-comment +% +% TUD-Script -- Corporate Design of Technische Universität Dresden +% ---------------------------------------------------------------------------- +% +% Copyright (C) Falk Hanisch , 2012-2019 +% +% ---------------------------------------------------------------------------- +% +% This work may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, version 1.3c of the license. The latest +% version of this license is in http://www.latex-project.org/lppl.txt and +% version 1.3c or later is part of all distributions of LaTeX 2005/12/01 +% or later and of this work. This work has the LPPL maintenance status +% "author-maintained". The current maintainer and author of this work +% is Falk Hanisch. +% +% ---------------------------------------------------------------------------- +% +% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz +% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle +% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und +% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01 +% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status +% "author-maintained", wird somit allein durch den Autor verwaltet. Der +% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch. +% +% ---------------------------------------------------------------------------- +% +% \fi +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \iffalse +%%% From File: tudscr-twocolfix.dtx +%<*dtx> +% \fi +% +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\ProvidesFile{tudscr-twocolfix.dtx}[2019/06/28 v2.06 TUD-Script\space% +% +% \iffalse +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{twocolfix}[% +%<*package> +%!TUD@Version +% +% package +%<*dtx|package> +% \fi + (twocolumn layout bugfix)% +] +% \iffalse +% +%<*dtx> +\documentclass[english,ngerman,xindy]{tudscrdoc} +\ifpdftex{ + \usepackage[T1]{fontenc} + \usepackage[ngerman=ngerman-x-latest]{hyphsubst} +}{ + \usepackage{fontspec} +} +\usepackage{babel} +\usepackage{tudscrfonts} +\KOMAoptions{parskip=half-} +\usepackage{bookmark} +\usepackage[babel]{microtype} + +\CodelineIndex +\RecordChanges +\GetFileInfo{tudscr-twocolfix.dtx} +\title{\file{\filename}} +\author{Falk Hanisch\qquad\expandafter\mailto\expandafter{\tudscrmail}} +\date{\fileversion\nobreakspace(\filedate)} + +\begin{document} + \maketitle + \tableofcontents + \DocInput{\filename} +\end{document} +% +% \fi +% +% \selectlanguage{ngerman} +% +% \changes{v2.05}{2016/04/25}{Überprüfen der Definition von \cs{@topnewpage} +% des \LaTeXe-Kernels}^^A +% +% \section{Das Paket \pkg{twocolfix} -- Bugfix für den zweispaltigen Satz} +% +% Der \LaTeXe-Kernel enthält einen Fehler, der Kapitelüberschriften im +% zweispaltigen Layout höher setzt, als im einspaltigen. Zwar ist der +% \hrfn{http://latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3126}{Fehler} +% schon länger bekannt, allerdings noch nicht in den \LaTeXe-Kernel übernommen +% worden. Das Paket \pkg{twocolfix} soll das Problem beheben. Eine Integration +% des Bugfixes in \KOMAScript{} wurde bereits bei Markus Kohm angefragt, jedoch +% \hrfn{http://www.komascript.de/node/1681}{von ihm nicht weiter verfolgt}. +% +% \ToDo{Als eingenständiges Paket herauslösen}[v2.??] +% \ToDo{CheckCommand verwenden}[v2.??] +% +% \StopEventually{\PrintIndex\PrintChanges\PrintToDos} +% +% \iffalse +%<*package> +% \fi +% +% Es wird der fehlerhafte Befehl aus dem \LaTeXe-Kernel neu definiert. +% Allerdings definieren die \KOMAScript-Klassen das Makro \cs{@topnewpage} +% um und sichern vorher das Original in \cs{scr@topnewpage}. Daher wird der +% neue Befehl erst temporär definiert. +% \begin{macrocode} +\long\def \@tempa [#1]{% + \@nodocument% + \@next\@currbox\@freelist{}{}% + \global \setbox\@currbox% + \vbox {% + \break% + \prevdepth\z@% + \begingroup% + \normalcolor% + \hsize\textwidth% +% \end{macrocode} +% Damit der Inhalt des optionale Argumentes mit den gleichen Absatzeinstellungen +% gesetzt wird, werden diese nach \cs{@parboxrestore} für \KOMAScript-Klassen +% wiederhergestellt. +% \begin{macrocode} + \@parboxrestore% + \ifcsname KOMAClassName\endcsname% + \KOMAoptionOf[\KOMAoption{parskip}]{\KOMAClassFileName}{parskip}% + \fi% + \col@number \@ne% + \ignorespaces #1\par% + \ifdim\parskip>\z@\null\fi% + \vskip -\dbltextfloatsep% + \endgroup% + \ifdim\parskip>\z@\vskip\parskip\else\null\fi% + \vskip -\topskip% + }% + \begingroup% + \splitmaxdepth\maxdepth \splittopskip\topskip% + \setbox\@tempboxa \vsplit\@currbox to\z@% + \endgroup% + \ifdim \ht\@currbox>\textheight% + \ht\@currbox \textheight% + \fi% + \global \count\@currbox \tw@% + \@tempdima -\ht\@currbox% + \advance \@tempdima -\dbltextfloatsep% + \global \advance \@colht \@tempdima% + \ifx \@dbltoplist \@empty% + \else% + \@latexerr{Float(s) lost}\@ehb% + \let \@dbltoplist \@empty% + \fi% + \@cons \@dbltoplist \@currbox% + \global \@dbltopnum \m@ne% + \ifdim \@colht<2.5\baselineskip% + \@latex@warning@no@line {Optional argument of \noexpand\twocolumn + too tall on page \thepage}% + \@emptycol% + \if@firstcolumn% + \else% + \@emptycol% + \fi% + \else% + \global \vsize \@colht% + \global \@colroom \@colht% + \@floatplacement% + \fi% +} +% \end{macrocode} +% Um eine Änderung am \LaTeXe-Kernel feststellen zu können, wird auf die zum +% Zeitpunkt des Paketes aktuelle Definition von \cs{@topnewpage} geprüft. +% \begin{macrocode} +\long\def\@tempb[#1]{% + \@nodocument + \@next\@currbox\@freelist{}{}% + \global \setbox\@currbox + \color@vbox + \normalcolor + \vbox {% + \hsize\textwidth + \@parboxrestore + \col@number \@ne + #1% + \vskip -\dbltextfloatsep + }% + \color@endbox + \ifdim \ht\@currbox>\textheight + \ht\@currbox \textheight + \fi + \global \count\@currbox \tw@ + \@tempdima -\ht\@currbox + \advance \@tempdima -\dbltextfloatsep + \global \advance \@colht \@tempdima + \ifx \@dbltoplist \@empty + \else + \@latexerr{Float(s) lost}\@ehb + \let \@dbltoplist \@empty + \fi + \@cons \@dbltoplist \@currbox + \global \@dbltopnum \m@ne + \ifdim \@colht<2.5\baselineskip + \@latex@warning@no@line {Optional argument of \noexpand\twocolumn + too tall on page \thepage}% + \@emptycol + \if@firstcolumn + \else + \@emptycol + \fi + \else + \global \vsize \@colht + \global \@colroom \@colht + \@floatplacement + \fi +} +% \end{macrocode} +% \begin{macro}{\@topnewpage} +% \begin{macro}{\scr@topnewpage} +% Nachdem der neue Befehl sowie die Definition aus dem \LaTeXe-Kernel zuerst +% temporär definiert wurden, wird nun abhängig von der aktiven Klasse der +% notwendige Befehl mit der neuen Definition überschrieben. +% \begin{macrocode} +\ifx\scr@topnewpage\@undefined + \@check@eq\@topnewpage\@tempb% + \let\@topnewpage\@tempa% +\else + \@check@eq\scr@topnewpage\@tempb% + \let\scr@topnewpage\@tempa% +\fi +% \end{macrocode} +% \end{macro}^^A \scr@topnewpage +% \end{macro}^^A \@topnewpage +% +% \iffalse +% +% \fi +% +% \Finale +% +\endinput -- cgit v1.2.3