Skip to content

Improve error message for LaTeX document by adding line number #1404

Open
@aaamini

Description

@aaamini

Having a space at the beginning or at the end of an inline math (enclosed in $$) sometimes causes hard to trace errors.

For example, $ y = (y_1,\dots,y_n) \in \mathbb R^n$ causes the following

! LaTeX Error: \symbballowed only in math mode.

Error: LaTeX failed to compile _main.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See _main.log for more info.
Execution halted

Exited with status 1.

I have noticed it with space before the ending $ sign as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementhelp wanted ❤️we'd love your help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions