diff options
Diffstat (limited to 'macros/latex/base/ltboxes.dtx')
-rw-r--r-- | macros/latex/base/ltboxes.dtx | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/macros/latex/base/ltboxes.dtx b/macros/latex/base/ltboxes.dtx index 43db541b98..b82f5bdb8e 100644 --- a/macros/latex/base/ltboxes.dtx +++ b/macros/latex/base/ltboxes.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltboxes.dtx} - [2022/01/31 v1.4c LaTeX Kernel (Box Commands)] + [2022/09/07 v1.4d LaTeX Kernel (Box Commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltboxes.dtx} @@ -1004,6 +1004,16 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\if@in@minipage@env} +% +% \changes{v1.4d}{2022/09/07} +% {Check for nested minipages and warn (gh/168)} +% \begin{macrocode} +\newif\if@in@minipage@env +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\minipage} % \changes{v0.1a}{1993/12/03} % {Redefined to support extra optional arguments} @@ -1060,6 +1070,28 @@ \color@begingroup \hsize\@tempdima \textwidth\hsize \columnwidth\hsize +% \end{macrocode} +% We check for nested minipages inside the box so that there is +% always a group resetting the switch even if the code does not use +% \cs{begin} to start the minipage. +% \changes{v1.4d}{2022/09/07} +% {Check for nested minipages and warn (gh/168)} +% \begin{macrocode} + \if@in@minipage@env +% \end{macrocode} +% We only issue a warning if the outer minipage contained footnotes +% because that is the problematical case. +% \begin{macrocode} + \ifvoid\@mpfootins\else + \@latex@warning{Nested minipage: + footnotes may be misplaced}% + \fi + \else + \@in@minipage@envtrue + \fi +% \end{macrocode} +% +% \begin{macrocode} \@parboxrestore \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ \let\@footnotetext\@mpfootnotetext |