metanorma / tex2mn

Write Metanorma documents in LaTeX
https://www.metanorma.com
MIT License
2 stars 0 forks source link

Additional `++` in hyperlinks #108

Closed manuelfuenmayor closed 4 years ago

manuelfuenmayor commented 4 years ago

From https://github.com/metanorma/mn-samples-tex-iso/issues/5

There is a minor minor error when converting \ref and \url to AsciiDoc:

LaTeX sample:

\href{https://www.metanorma.com/}{Metanorma website}

\url{https://www.metanorma.com/}

AsciiDoc output:

link:++https://www.metanorma.com/++[Metanorma website]

link:++https://www.metanorma.com/++[]

There is a double plus sign (++) concatenated in both sides of the link. (This generates a malformed rendering.)

Expected output:

link:https://www.metanorma.com/[Metanorma website]

link:https://www.metanorma.com/[]
paolobrasolin commented 4 years ago

The trailing ++ is actually deliberate; the idea is use the most general form of the link macro to allow any kind of character without need for escaping. That's a documented feature (see last example): https://asciidoctor.org/docs/user-manual/#complex-urls

@manuel489 Does the malformed rendering occur down the metanorma document pipeline or with some other Asciidoc engine?

manuelfuenmayor commented 4 years ago

Hi @paolobrasolin! Yes, you are right here. The markup works in normal AsciiDoc engine but not in Metanorma engine. I have opened a ticket about this in metanorma-standoc: https://github.com/metanorma/metanorma-standoc/issues/315.

Closing, thanks!