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

False positive with Euro Symbol #25

Closed
n2o opened this issue Feb 11, 2020 · 4 comments
Closed

False positive with Euro Symbol #25

n2o opened this issue Feb 11, 2020 · 4 comments
Assignees
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX 3-fixed Issue resolution: Issue has been fixed on the develop branch

Comments

@n2o
Copy link

n2o commented Feb 11, 2020

Describe the bug
When a sentence is ending with \euro{}, LTeX somehow interprets it as a whitespace.

Sample:

\usepackage{eurosym}
Let's talk about 10 \euro{}.

image

Expected behavior
This is no error and should not be linted.

LTeX configuration
Default.

Log files
First, set the ltex.trace.server setting in your settings.json to "verbose". Then, reload the VS Code window and reproduce the bug. Go to ViewOutput and select LTeX Language Server and LTeX Language Client in the drop-down list. Paste or attach the relevant parts of these logs here in the GitHub issue.

LTeX Language Server

INFORMATION: Checking the following text in language en-US via LanguageTool: "Let's talk about 10 . "
Feb 11, 2020 2:22:00 PM org.bsplines.languagetool_languageserver.LanguageToolLanguageServer lambda$validateDocument$3
INFORMATION: Obtained 1 rule match

LTeX Language Client

[Trace - 2:22:38 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///path/to/my.tex",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 0,
                    "character": 20
                },
                "end": {
                    "line": 0,
                    "character": 28
                }
            },
            "severity": 3,
            "source": "LTeX - COMMA_PARENTHESIS_WHITESPACE",
            "message": "Don't put a space before the full stop"
        }
    ]
}

Version information

  • macOS 10.15.3
  • VSCode 1.42.0
  • LTeX: 4.77
  • LTeX language extensions: English
  • Java: 1.8.0_152-release
@n2o n2o added 1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Feb 11, 2020
@n2o
Copy link
Author

n2o commented Feb 11, 2020

Usually I'd write it more like this:

10~\euro{}

but this results in the same error. Maybe the combination of ~ and a latex command \euro{} together should get removed instead of the symbol \euro{} alone.

@valentjn valentjn self-assigned this Feb 14, 2020
@valentjn valentjn added 3-fixed Issue resolution: Issue has been fixed on the develop branch and removed 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Feb 14, 2020
@n2o
Copy link
Author

n2o commented Feb 14, 2020

Thank you!

@valentjn
Copy link
Owner

@n2o No worries, thank you for the detailed bug report 😃

As you probably guessed, all unknown LATEX commands (like \euro was) are removed by default.

\euro shouldn't be removed at all, but rather replaced with , as LanguageTool is perfectly capable of dealing with currency symbols. For example, LT warns for German texts if something like 10€ is found, because there should be a space between the number and the currency symbol.

The fix will be in the upcoming release of LTEX.

@valentjn valentjn added the 2-confirmed Issue status: Confirmed, reproducible bug in LTeX label Feb 14, 2020
@valentjn
Copy link
Owner

Fixed in 4.7.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants