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

Incorrect escaping of curly braces in index entries #4979

Closed
cpitclaudel opened this issue May 16, 2018 · 2 comments
Closed

Incorrect escaping of curly braces in index entries #4979

cpitclaudel opened this issue May 16, 2018 · 2 comments

Comments

@cpitclaudel
Copy link
Contributor

cpitclaudel commented May 16, 2018

Problem

As explained in https://tex.stackexchange.com/questions/153291/index-unmatched-braces-in-latex, the LaTeX \index command requires matched braces: it's not correct to write this: \index{main \{}.

Unfortunately, that's the code that Sphinx generates for the following example:

.. index::
   single: main {
\index{main \{}\ignorespaces 

This problem happens in real life, ironically, when trying to index a collection of error messages from a compiler. One of the error messages is something like Unmatched delimiter: {, which trips Sphinx.

Error logs / results

Runaway argument?
{main \{}\ignorespaces 
! Paragraph ended before \@wrindex was complete.
<to be read again> 
                   \par 
l.71 

Expected results

As mentioned in the StackOverflow post above, the solution would be to escape backslashes more aggressively — using a separate macro definition, for example.

Environment info

  • OS: GNU/Linux
  • Python version: 3.5.2
  • Sphinx version: 1.7.4
@tk0miya tk0miya added this to the 1.7.5 milestone May 17, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue May 18, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue May 18, 2018
tk0miya added a commit to tk0miya/sphinx that referenced this issue May 19, 2018
tk0miya added a commit that referenced this issue May 21, 2018
Fix #4979: latex: Incorrect escaping of curly braces in index entries
@tk0miya
Copy link
Member

tk0miya commented May 21, 2018

Fixed by #4987.
Thank you for reporting.

@tk0miya tk0miya closed this as completed May 21, 2018
@cpitclaudel
Copy link
Contributor Author

Thanks!

cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Aug 7, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Aug 7, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Aug 13, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Sep 4, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Sep 4, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Sep 5, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Sep 6, 2018
cpitclaudel added a commit to cpitclaudel/coq that referenced this issue Sep 6, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 12, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 18, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 19, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 19, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 19, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 20, 2018
Zimmi48 pushed a commit to coq/coq that referenced this issue Sep 21, 2018
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Sep 28, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants