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 for definition list fails when definition has hyperref #1032

Closed
clord opened this issue Oct 21, 2013 · 0 comments
Closed

Latex for definition list fails when definition has hyperref #1032

clord opened this issue Oct 21, 2013 · 0 comments

Comments

@clord
Copy link

clord commented Oct 21, 2013

A hyperref inside a definition list's definition; such as this:

[testing](#go)
:    this is a body

is represented as:

[DefinitionList
 [([Link [Str "testing"] ("#go","")],
   [[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "body"]]])]]

that produces latex that resembles:

\begin{description}
\itemsep1pt\parskip0pt\parsep0pt
\item[\hyperref[go]{testing}]
this is a body
\end{description}

which produces an error resembling:

! Argument of \Hy@babelnormalise has an extra }.

because of the nested bracket parameters ([] inside []).

The solution would be to group (wrap in {}) the definition text (ideally only when a hyperref or another command with [] occurs). That is, the output should be:

\begin{description}
\itemsep1pt\parskip0pt\parsep0pt
\item[{\hyperref[go]{testing}}]
this is a body
\end{description}
@jgm jgm closed this as completed in e63aafd Oct 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant