diff options
Diffstat (limited to 'macros/latex-dev/base/ltboxes.dtx')
-rw-r--r-- | macros/latex-dev/base/ltboxes.dtx | 95 |
1 files changed, 91 insertions, 4 deletions
diff --git a/macros/latex-dev/base/ltboxes.dtx b/macros/latex-dev/base/ltboxes.dtx index ff1717caa9..d84158c161 100644 --- a/macros/latex-dev/base/ltboxes.dtx +++ b/macros/latex-dev/base/ltboxes.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltboxes.dtx} - [2022/09/07 v1.4d LaTeX Kernel (Box Commands)] + [2023/10/26 v1.4e LaTeX Kernel (Box Commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltboxes.dtx} @@ -342,13 +342,36 @@ % \begin{macro}{\@imakebox} % \changes{v0.1a}{1993/12/03} % {macro modified} +% \changes{v1.4e}{2023/10/26} +% {Guard against unknown alignment gh/1072} % Internal form of |\makebox|. % \begin{macrocode} +%</2ekernel> +%<latexrelease>\IncludeInRelease{2023/11/01}% +%<latexrelease> {\@imakebox}{Unknown alignment warning}% +%<*2ekernel|latexrelease> \long\def\@imakebox[#1][#2]#3{% \@begin@tempboxa\hbox{#3}% \setlength\@tempdima{#1}% support calc - \hb@xt@\@tempdima{\csname bm@#2\endcsname}% + \hb@xt@\@tempdima{% + \expandafter\ifx\csname bm@#2\endcsname\relax + \bm@c + \@latex@warning{Unexpected alignment #2}% + \else + \csname bm@#2\endcsname + \fi}% \@end@tempboxa} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@imakebox}{Unknown alignment warning}% +%<latexrelease>\long\def\@imakebox[#1][#2]#3{% +%<latexrelease> \@begin@tempboxa\hbox{#3}% +%<latexrelease> \setlength\@tempdima{#1}% support calc +%<latexrelease> \hb@xt@\@tempdima{\csname bm@#2\endcsname}% +%<latexrelease> \@end@tempboxa} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} % \end{macro} % @@ -748,19 +771,46 @@ % {\cs{leavevmode} moved to \cs{@frameb@x}} % \changes{v1.0s}{1995/04/27} % {Move \cs{leavevmode} for graphics/1512} +% \changes{v1.4e}{2023/10/26} +% {Guard against unknown alignment gh/1072} % In order to set the whole box, including the frame to the % specified dimension, we first determine that dimension % from the natural size of the text, |#3|. % calculated width. % \begin{macrocode} +%</2ekernel> +%<latexrelease>\IncludeInRelease{2023/11/01}% +%<latexrelease> {\@iframebox}{Unknown alignment warning}% +%<*2ekernel|latexrelease> \long\def\@iframebox[#1][#2]#3{% \leavevmode \@begin@tempboxa\hbox{#3}% \setlength\@tempdima{#1}% \setbox\@tempboxa\hb@xt@\@tempdima - {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}% + {\kern\fboxsep + \expandafter\ifx\csname bm@#2\endcsname\relax + \bm@c + \@latex@warning{Unexpected alignment #2}% + \else + \csname bm@#2\endcsname + \fi + \kern\fboxsep}% \@frameb@x{\kern-\fboxrule}% \@end@tempboxa} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@iframebox}{Unknown alignment warning}% +%<latexrelease>\long\def\@iframebox[#1][#2]#3{% +%<latexrelease> \leavevmode +%<latexrelease> \@begin@tempboxa\hbox{#3}% +%<latexrelease> \setlength\@tempdima{#1}% +%<latexrelease> \setbox\@tempboxa\hb@xt@\@tempdima +%<latexrelease> {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}% +%<latexrelease> \@frameb@x{\kern-\fboxrule}% +%<latexrelease> \@end@tempboxa} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} % \end{macro} % @@ -881,9 +931,17 @@ % \changes{v1.1g}{2006/05/18} % {Ensure \cs{@parboxto} holds the value of \cs{@tempdimb} not the % register itself (pr/3867)} +% \changes{v1.4e}{2023/10/26} +% {Guard against unknown alignment gh/1072} % The internal version of |\parbox|. % \begin{macrocode} \let\@parboxto\@empty +% \end{macrocode} +% \begin{macrocode} +%</2ekernel> +%<latexrelease>\IncludeInRelease{2023/11/01}% +%<latexrelease> {\@iiiparbox}{Unknown alignment warning}% +%<*2ekernel|latexrelease> \long\def\@iiiparbox#1#2[#3]#4#5{% \leavevmode \@pboxswfalse @@ -899,9 +957,38 @@ \else\@pboxswtrue $\vcenter \fi\fi\fi \@parboxto{\let\hss\vss\let\unhbox\unvbox - \csname bm@#3\endcsname}% + \expandafter\ifx\csname bm@#3\endcsname\relax + \bm@c + \@latex@warning{Unexpected alignment #3}% + \else + \csname bm@#3\endcsname + \fi}% \if@pboxsw \m@th$\fi \@end@tempboxa} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@iiiparbox}{Unknown alignment warning}% +%<latexrelease>\long\def\@iiiparbox#1#2[#3]#4#5{% +%<latexrelease> \leavevmode +%<latexrelease> \@pboxswfalse +%<latexrelease> \setlength\@tempdima{#4}% +%<latexrelease> \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}% +%<latexrelease> \ifx\relax#2\else +%<latexrelease> \setlength\@tempdimb{#2}% +%<latexrelease> \edef\@parboxto{to\the\@tempdimb}% +%<latexrelease> \fi +%<latexrelease> \if#1b\vbox +%<latexrelease> \else\if #1t\vtop +%<latexrelease> \else\ifmmode\vcenter +%<latexrelease> \else\@pboxswtrue $\vcenter +%<latexrelease> \fi\fi\fi +%<latexrelease> \@parboxto{\let\hss\vss\let\unhbox\unvbox +%<latexrelease> \csname bm@#3\endcsname}% +%<latexrelease> \if@pboxsw \m@th$\fi +%<latexrelease> \@end@tempboxa} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} % \end{macro} % \end{macro} |