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

Only migrate \@doendpe out of suitable groups #1641

Closed
FrankMittelbach opened this issue Jan 26, 2025 · 1 comment
Closed

Only migrate \@doendpe out of suitable groups #1641

FrankMittelbach opened this issue Jan 26, 2025 · 1 comment

Comments

@FrankMittelbach
Copy link
Member

Brief outline of the bug

The end \par handling after display environments done with \@doendpe has been changed recently to survive if the environment was placed in a group by checking the group level and using \aftergroup and retry after leaving the group. This was done always, but should have been done only in some groups. These are simple and semi-simple groups but not any of the 14 others.

In some groups, e.g., a \hbox group, there shouldn't be any display environments (but that should be tested upon starting the display environment not by the \@doendpe handling) in others, e.g., \vbox groups, it shouldn't happen at all, because the content of such boxes should not influence what happens after it. In normal LaTeX processing this isn't a problem, because on the document level things like minipage always start a paragraph and thus the paragraph continues after it, but in code that involves primitives like \vtop it can have undesirable side effects.

Minimal example showing the bug

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\documentclass{article}

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

\begin{document}

\sample

\vbox{\hsize=3cm\noindent \underline{Box content}}
\sample \space Should be indented.

\bigskip

\vbox{\hsize=3cm\noindent 
      \begin{itemize}\item \underline{Box content}\end{itemize}}
\sample Should be indented but isn't!

\sample

\end{document}
@FrankMittelbach FrankMittelbach self-assigned this Jan 26, 2025
@github-project-automation github-project-automation bot moved this to Pool (unscheduled issues) in upcoming LaTeX2e releases Jan 26, 2025
FrankMittelbach added a commit that referenced this issue Jan 26, 2025
josephwright pushed a commit that referenced this issue Jan 29, 2025
* hotfix for #1641

* Add missing \par in abstract of ams classes
josephwright added a commit that referenced this issue Jan 29, 2025
* hotfix for #1641

* Add missing \par in abstract of ams classes
@FrankMittelbach
Copy link
Member Author

hot fix has been distributed

@github-project-automation github-project-automation bot moved this from Pool (unscheduled issues) to Done in upcoming LaTeX2e releases Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant