Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix gh1641 #1642

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================

#########################
# 2024-11-01 PL2 Release
#########################

2025-01-26 Frank Mittelbach <[email protected]>

* ltlists.dtx:
Only migrate \cs{@doendpe} out of simple and semi-simple groups (gh/1641)

#########################
# 2024-11-01 PL1 Release
#########################
Expand Down
25 changes: 20 additions & 5 deletions base/ltlists.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
%<*driver>
% \fi
\ProvidesFile{ltlists.dtx}
[2024/06/23 v1.0u LaTeX Kernel (List Environments)]
[2025/01/26 v1.0v LaTeX Kernel (List Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltlists.dtx}
Expand Down Expand Up @@ -851,11 +851,26 @@
\def\@endpetrue {%
\global\let\if@endpe\iftrue
% \end{macrocode}
% If we are inside a group then propagate to the outside:
% If we are inside a simple or a semi-simple group then propagate
% to the outside, for all other group types do nothing. Normally, we
% would start out in the group opened by \cs{begin} (type 14). When we
% migrate out of that we are either on top-level (type 0) or in
% another semi-simple group (type 14) or
% in some other group. Thus, the best order of tests is to first
% test for 14, then for 0 and finally for 1 (simple group).
% \changes{v1.0v}{2025/01/26}{Only migrate \cs{@doendpe} out of simple
% and semi-simple groups (gh1641)}
% \begin{macrocode}
\ifnum\currentgrouplevel>\z@
\aftergroup\propagate@doendpe
\fi
\ifnum\currentgrouptype =14 % semi-simple group
\aftergroup\propagate@doendpe
\else
\ifnum\currentgrouptype =\z@ % no group: top-level
\else
\ifnum\currentgrouptype =\@ne % simple group
\aftergroup\propagate@doendpe
\fi
\fi
\fi
}
% \end{macrocode}
% If \cs{if@endpe} is still true after the group ends, we run \cs{@doendpe}
Expand Down
37 changes: 37 additions & 0 deletions base/testfiles/github-1641.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
\documentclass{article}

\input{test2e}

\newcommand\sample{A text of more than a single line to see the paragraph indentation. Is this enough?}

% show the group type we are dealing with

\AddToHook{cmd/@endpetrue/before}{\showthe\currentgrouptype}

\showoutput

\begin{document}

\START

\sample

\vbox{\hsize=3cm\noindent X}
\sample \space Should be indented.

\bigskip

\vbox{\hsize=3cm\noindent
\begin{itemize}\item X\end{itemize}}
\sample Should be indented!

\sample

\vbox{%
\begin{itemize}
\item blub
\end{itemize}
}
some text

\end{document}
Loading