diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/marginfit/marginfit.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/marginfit/marginfit.dtx | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/marginfit/marginfit.dtx b/Master/texmf-dist/source/latex/marginfit/marginfit.dtx index 1d5c1eafe15..9ed9e85798b 100644 --- a/Master/texmf-dist/source/latex/marginfit/marginfit.dtx +++ b/Master/texmf-dist/source/latex/marginfit/marginfit.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 2017 Maurice Leclaire <leclaire@in.tum.de> +% Copyright 2017, 2018 Maurice Leclaire <leclaire@in.tum.de> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -21,7 +21,7 @@ % % \iffalse %<package>\NeedsTeXFormat{LaTeX2e} -%<package>\ProvidesPackage{marginfit}[2017/07/07 v1.0 Fit Margin Paragraphs] +%<package>\ProvidesPackage{marginfit}[2018/06/08 v1.1 Fit Margin Paragraphs] % %<*driver> \documentclass{ltxdoc} @@ -516,13 +516,19 @@ % % \begin{macro}{\@makecol} % We redefine \verb|\@makecol| and add the procedure to append a margin to the -% current column. First, the original \verb|\@makecol| is executed. If we have -% margin material, we decide on which side the margin column will be and add it -% to that side. +% current column. First, the original \verb|\@makecol| is executed. Then, the +% width of \verb|\@outputbox| is set to \verb|\columnwidth| (added in v1.1). +% \changes{v1.1}{2018/06/07}{Fix width of \texttt{\symbol{`\\}@outputbox}} +% This is necessary as a \verb|\parshape| that overflows on the right will +% enlarge \verb|\@outputbox|. If we have margin material, we decide on which +% side the margin column will be and add it to that side. A check for onesided +% documents was added in v1.1. +% \changes{v1.1}{2018/06/08}{Margin placement in onesided documents} % \begin{macrocode} \let\marginfit@makecol\@makecol \def\@makecol{% \marginfit@makecol% + \wd\@outputbox\columnwidth% \ifvoid\marginfit@insert\else% \setbox\@outputbox\vbox to\@colht {% \hbox to\columnwidth {% @@ -533,10 +539,14 @@ \marginfit@rightmargin% \fi% \else% - \ifodd\c@page% - \marginfit@rightmargin% + \if@twoside% + \ifodd\c@page% + \marginfit@rightmargin% + \else% + \marginfit@leftmargin% + \fi% \else% - \marginfit@leftmargin% + \marginfit@rightmargin% \fi% \fi% }% |