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

Missing accent and special character support #56

Closed
ed359 opened this issue Mar 31, 2021 · 3 comments · Fixed by #57
Closed

Missing accent and special character support #56

ed359 opened this issue Mar 31, 2021 · 3 comments · Fixed by #57
Assignees
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Milestone

Comments

@ed359
Copy link
Contributor

ed359 commented Mar 31, 2021

Describe the bug
Several accents and special characters are missing support. I am particularly interested in proper handling of \H{o} -> ő. See the details below.

Steps to reproduce
Steps to reproduce the behavior:

  1. Save the latex code given below as a .tex file
  2. Open it in VSCode with the LTeX plugin enabled
  3. Observe the poor handling of some accents. One can add Erdős to the dictionary but still get a spelling error on Erd\H{o}s, and the Polish words are marked as errors when the latex command is used to insert the accent (rather than using the correct unicode letter).

Expected behavior
The accent commands \H, \k and similar should be correctly parsed and interpreted by LTeX

Sample document

\documentclass{article}

\usepackage[utf8]{inputenc} % not necessary with newer versions of latex
\usepackage[T1]{fontenc} % necessary to allow the various accents
\usepackage{lmodern} % (optional) load a modern font
\usepackage{hyperref} % for hyperlinks

\begin{document}

\section{Information on diacritics in latex}

\url{https://tex.stackexchange.com/tags/accents/info}\\
\url{https://en.wikibooks.org/wiki/LaTeX/Special_Characters}

\section{Missing support in LTeX}


\begin{enumerate}
    \item Erd\H{o}s should be recognised as Erdős
% LTeX: SETTINGS language=pl-PL
    \item miesi\k{a}c should be recognised as miesiąc 
    \item miesi\k{e}cznie should be recognised as miesięcznie
    \item b\l\k{a}d should be recognised as błąd
\end{enumerate}

% LTeX: SETTINGS language=en-GB

\subsection{Further unsupported diacritics (without examples)}
\begin{enumerate}
    \item o with a bar under the letter: \b{o}
    \item u with a dot under the letter: \d{u}
    \item o with a breve over the letter: \u{o}
    \item s, c with a caron/h\'{a}\v{c}ek over the letter: \v{s}, \v{c}
    \item tie accents \t{oo} or \t{o}o
    \item dotless i, j: \i, \j
\end{enumerate}

\section{Diacritics with support}

\begin{enumerate}
    \item \AA, \O, \aa, \ss, \o: see \href{https://github.com/valentjn/ltex-ls/blob/1b6d0e8fb4753d43ffd968f4ac87b38d6a61eb36/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/latex/LatexAnnotatedTextBuilder.java#L563}{this url}.
    \item Grave accent on AEIOUaeiou, acute accent on AEIOUYaeiouy, circumflex on AEIOUYaeiouy, tilde on AEINOUaeinou, umlaut on AEIOUYaeiouy, macron on AEIOUYaeiouy, dot on AEIOaeo, cedilla on Cc, ring on AUau,
see \href{https://github.com/valentjn/ltex-ls/blob/1b6d0e8fb4753d43ffd968f4ac87b38d6a61eb36/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/latex/LatexAnnotatedTextBuilder.java#L290}{this url}.
\end{enumerate}

\end{document}

LTeX configuration
N/A, no configuration necessary to observe bug

LTeX LS log
N/A, the bug produces no log output

Version information
List here the version information of the relevant software.

  • Operating system: Windows 10
  • ltex-ls: 10.0.0
  • Java: unknown (this is irrelevant to the bug)

Additional context/information
None

@ed359 ed359 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 Mar 31, 2021
@ed359
Copy link
Contributor Author

ed359 commented Apr 1, 2021

This PR should fix the issues I've been having: #57

@valentjn valentjn added 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature and removed 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 4, 2021
@valentjn valentjn self-assigned this Apr 4, 2021
@valentjn
Copy link
Owner

valentjn commented Apr 4, 2021

Changing this to feature request as there is no way LTEX can cover all of Unicode, so these accents were previously out of feature scope.

@valentjn valentjn added this to the 11.0.0 milestone Apr 4, 2021
@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Apr 4, 2021
@valentjn
Copy link
Owner

valentjn commented Apr 5, 2021

Fix released in 11.0.0 (corresponds to vscode-ltex 10.0.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants