{{ message }}

# gettalong / kramdown

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.

# List items starting with brackets broken in LaTeX output #414

Closed
opened this issue Feb 24, 2017 · 2 comments
Closed

# List items starting with brackets broken in LaTeX output#414

opened this issue Feb 24, 2017 · 2 comments
Assignees
Labels

### RyanKoppenhaver-NCC commented Feb 24, 2017

 For the markdown input: * $foo$ bar  ...kramdown generates this LaTeX output: \begin{itemize} \item [foo] bar \end{itemize}  LaTeX then processes [foo] as an optional parameter to \item, specifying the bullet point symbol. (The intervening whitespace is ignored.) This results in output that looks like this:  | Lorem ipsum dolor sit amet | | * asdf foo bar | * blah  The issue also applies to ordered lists, and to input where the brackets are not escaped, but kramdown can't find a corresponding link definition, so it passes the brackets through. It's possible other LaTex output has similar issues, but I haven't looked in depth. Based on some messing around, I think this can be fixed by inserting an empty group {} or a \relax command into the output after \item, or by transforming the leading [ into either {[} or \char91 . I kind of like the first option, but I'm by no means a TeX/LaTeX expert, so I'm not sure if another one might be more technically correct. The text was updated successfully, but these errors were encountered:
self-assigned this Feb 24, 2017
added the label Feb 24, 2017

### gettalong commented Feb 24, 2017

 There are already many places in kramdown's LaTeX converter that use {} because of the way LaTeX is parsed. So this is probably the way to go - I will have a look. Thanks for reporting this bug!

### gettalong commented Sep 3, 2017

 @RyanKoppenhaver-NCC I have looked at this and putting {} after \item would fix it for this case. However, during my experiments I found other problems with brackets and so they will additionally be escaped using {[} and {]}. This is fixed in the next release.
closed this Sep 3, 2017
added a commit that referenced this issue Sep 3, 2017
 Fix problem with brackets in LaTeX output 
 3c9e8df 
Fixes #414
to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet