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

Environment option keywords inside square brackets are not ignored (LaTeX) #161

Closed
acarril opened this issue Apr 1, 2022 · 1 comment
Closed
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
Milestone

Comments

@acarril
Copy link

acarril commented Apr 1, 2022

Describe the bug
Environments with options in square brackets (e.g. \begin{frame}[noframenumbering]) are spell checked, but I think any options inside the brackets (i.e. noframenumbering) should be ignored. There doesn't seem to be a way to ignore the command using ltex.latex.commands or ltex.latex.environments.

Steps to reproduce
Steps to reproduce the behavior:

  1. Create a frame environment and pass an option keyword which is not an actual word. For example, \begin{frame}[noframenumbering].
  2. Verify that ltex doesn't ignore the environment option keyword: image

Expected behavior
Option keywords in square brackets should be ignored.

Sample document
Minimal working example:

\documentclass{beamer}
\begin{document}
    \begin{frame}[noframenumbering]
        Foo
    \end{frame}
\end{document}

image

LTeX configuration
Please paste all configuration settings starting with ltex. from your settings.json. You can help us by temporarily removing some irrelevant settings from your settings.json and see if the bug still occurs.

{
    "ltex.latex.commands": {
        // Default commands
        "\\label{}": "ignore",
        "\\documentclass[]{}": "ignore",
        "\\cite{}": "dummy",
        "\\cite[]{}": "dummy",
        // Preamble commands
        "\\author{}": "ignore",
        // Beamer commands
        "\\setbeamertemplate{}{}": "ignore",
        "\\addtobeamertemplate{}{}{}": "ignore",
        "\\beamerbutton{}": "default",
        "\\hyperlink{}": "ignore"
    },
    "ltex.latex.environments": {
        // Default environments
        "lstlisting": "ignore",
        "verbatim": "ignore"
    }
}

LTeX LS log

[Info  - 6:01:59 PM] Starting ltex-ls...
Apr 01, 2022 6:02:04 PM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 15.2.0 - initializing...
Apr 01, 2022 6:02:04 PM org.bsplines.ltexls.tools.I18n setLocale
INFO: Setting locale to 'en'
Apr 01, 2022 6:02:04 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " [noframenumbering] Foo "
Apr 01, 2022 6:02:06 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match

Version information

  • Operating system: macOS 12.3
  • ltex-ls: 15.2.0
  • Java: I don't have Java installed, so ltex is using whatever Java it comes bundled with

Additional context/information
None

@acarril acarril 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 Apr 1, 2022
@acarril acarril changed the title Environment pption keywords inside square brackets are not ignored (LaTeX) Environment option keywords inside square brackets are not ignored (LaTeX) Apr 1, 2022
@valentjn valentjn added 2-confirmed Issue status: Confirmed, reproducible bug in LTeX and removed 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Feb 12, 2023
@valentjn valentjn self-assigned this Feb 12, 2023
@valentjn valentjn added this to the 16.0.0 milestone Feb 12, 2023
valentjn added a commit that referenced this issue Feb 12, 2023
@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Feb 12, 2023
@github-actions
Copy link

This issue is now fixed on develop. The fix will be included in the next release of LTEX.

If you don't want to wait, you can try out the nightly pre-release tomorrow. Nightly pre-releases are published every morning at around 4am UTC.

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