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

LaTeX: fix '\raggedright' escaping causing "aggedright" text #9737

Merged
merged 1 commit into from Oct 23, 2021
Merged

LaTeX: fix '\raggedright' escaping causing "aggedright" text #9737

merged 1 commit into from Oct 23, 2021

Conversation

ahippo
Copy link
Contributor

@ahippo ahippo commented Oct 14, 2021

Sphinx version 4.0 introduced a bug in handling hlists in its LaTeX backend.
Due to improper backslash escaping,
LaTeX "\raggedright" command gets written as
Carriage Return character (0x0D) followed by "aggedright".

This results in stray "aggedright" text appearing in the resulting PDF
and lack of effect \raggedright was supposed to achieve.

Fix this by converting the remaining string to a raw string.

This appears to be the only occurrence of such a missing escaping
based on a quick grep.

Fixes #9734.

Fixes: 20884bb: "refactor: LaTeX: Use raw strings for LaTeX macros"

Feature or Bugfix

  • Bugfix

Sphinx version 4.0 introduced a bug in handling hlists in its LaTeX backend.
Due to improper backslash escaping,
LaTeX "\raggedright" command gets written as
Carriage Return character (0x0D) followed by "aggedright".

This results in stray "aggedright" text appearing in the resulting PDF
and lack of effect \raggedright was supposed to achieve.

Fix this by converting the remaining string to a raw string.

This appears to be the only occurrence of such a missing escaping
based on a quick grep.

Fixes #9734.

Fixes: 20884bb: "refactor: LaTeX: Use raw strings for LaTeX macros"
@tk0miya tk0miya added this to the 4.3.0 milestone Oct 23, 2021
@tk0miya tk0miya merged commit b097213 into sphinx-doc:4.x Oct 23, 2021
tk0miya added a commit that referenced this pull request Oct 23, 2021
@tk0miya
Copy link
Member

tk0miya commented Oct 23, 2021

Merged. Thank you for your contribution!

@ahippo
Copy link
Contributor Author

ahippo commented Oct 23, 2021

Merged. Thank you for your contribution!

Awesome, thank you!

@ahippo ahippo deleted the latex-aggedright branch October 23, 2021 21:51
xinetzone pushed a commit to daobook/sphinx that referenced this pull request Oct 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sphinx v4.1.2 emits stray "aggedright" text in LaTeX output
2 participants