Skip to content

myst to Latex: bad space management with hyphen-minus character (U+002D) #2166

Open
@honnorat

Description

@honnorat

With myst v1.5.1, code blocks are badly rendered by myst-to-tex when a '-' character is present.

Description

See: https://mystmd.org/sandbox?tab=latex&myst=YQAtAGIAIABhABEgYgAKAAoAYABhAC0AYgAgAGEAESBiAGAACgAKAGAAYABgAAoAYQAtAGIAIAAKAGEAESBiAAoAYABgAGAACgAKAA%3D%3D

The first a-b (with a U+002D character) is badly rendered in the Latex code block export (rendered as a verbatim environment) with a space: a -b. All other exports are ok (inline code, paragraph).

The bug can be avoided by using a non-breaking hyphen (U+2011, second word in the example) but you must admit it its not convenient.

Proposed solution

No idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions