Skip to content

Commit

Permalink
fix for issue/39
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Apr 20, 2018
1 parent dd0aa3a commit b087fd3
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 3 deletions.
6 changes: 6 additions & 0 deletions required/tools/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================

2018-04-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* multicol.dtx: restoring column status when leaving a boxed
multicols so that any further \docolaction will know the
currect column (issue/39)

2018-04-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* array.dtx: Renamed internal \mcell@box to
Expand Down
12 changes: 9 additions & 3 deletions required/tools/multicol.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
[2018/04/01 v1.8r multicolumn formatting (FMi)]
[2018/04/20 v1.8s multicolumn formatting (FMi)]
%
%
%%
Expand Down Expand Up @@ -1845,9 +1845,15 @@
\global\c@unbalance\z@
% \end{macrocode}
% Now it's time to return any footnotes if we are in unrestricted
% mode:
% mode. In boxed mode footnotes are kept inside, but in that case
% we have to write another column status into the \texttt{.aux}
% file to support \cs{docolaction} in case we have nested
% environments.
% \changes{v1.8s}{2018/04/20}{Support for \cs{docolaction} (issue/39)}
% \begin{macrocode}
\if@boxedmulticols\else
\if@boxedmulticols
\mc@col@status@write
\else
\reinsert@footnotes
% \end{macrocode}
% We also take a look at the amount of free space on the current
Expand Down
44 changes: 44 additions & 0 deletions required/tools/testfiles/github-0039.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
% https://github.com/latex3/latex2e/issues/39

\documentclass[a4paper]{article}
\usepackage[colaction]{multicol}

\input{test2e}

\makeatletter
\def\printNumberColumn{%
\typeout{Status: \the\mc@col@check@num\space = \csname mc@col@type\endcsname}%
\docolaction{\textbf{col 1}\typeout{col 1}}{}{\textbf{col 2}\typeout{col 2}}
}
\makeatother

\setlength\columnseprule{0.4pt}

\def\xxxxx{%
Test Test Test Test Test Test Test Test
}

\begin{document}

\START

\begin{multicols}{2}
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\begin{multicols}{2}
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx
\end{multicols}
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\printNumberColumn\par\xxxxx\xxxxx\xxxxx\xxxxx\xxxxx
\end{multicols}

\end{document}

Loading

0 comments on commit b087fd3

Please sign in to comment.