You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe it.
I've found that vimtex does not parse labels from the subequations environment of the asmath package if they contain non-Latin characters in them for the omnifunc completions.
Describe the solution you'd like
It would be great if the subequations environment got a better support. This is probably due to the fact that Unicode characters need special handling.
On this screenshot you can see that omnifunc (C-xC-o) does not show the number of the subequation if it contains a Cyrillic character, while the equation with Latin letters works as expected.
Here is a minimal .tex file with examples. The first one has Cyrillic letters, the former has Latin characters.
Minimal tex file
%! TeX program = lualatex\documentclass[12pt]{article}
\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true, forceheadingpunctuation=false]{russian}
\setotherlanguages{english}
\usepackage{fontspec}
\setmainfont{FreeSerif}
\setsansfont{FreeSans}
\setmonofont{FreeMono}
\usepackage{amsmath}
\begin{document}
% subequations with cyrillic letters\begin{subequations}
\renewcommand{\theequation}{\theparentequation\asbuk{equation}}
\begin{align}
test 1 1\label{eq:test_1_1}\\ test 1 2 \label{eq:test_1_2}\end{align}
\end{subequations}
% subequations with latin letters\begin{subequations}
\begin{align}
test 2 1\label{eq:test_2_1}\\ test 2 2 \label{eq:test_2_2}\end{align}
\end{subequations}
\eqref{eq:test_1_2} % Does not show the number \eqref{eq:test_2_2} % Does show the number\end{document}
`main.aux` has all labels and they seem to look the same way.
main.aux
There was a regex that explicitly looked for simple lowercase latin characters. I've generalized it in a manner that looks safe and I believe this should resolve your issue.
Is your feature request related to a problem? Please describe it.
I've found that vimtex does not parse labels from the subequations environment of the asmath package if they contain non-Latin characters in them for the omnifunc completions.
Describe the solution you'd like
It would be great if the subequations environment got a better support. This is probably due to the fact that Unicode characters need special handling.
On this screenshot you can see that omnifunc (C-xC-o) does not show the number of the subequation if it contains a Cyrillic character, while the equation with Latin letters works as expected.
![20241026_15h28m01s_grim](https://private-user-images.githubusercontent.com/95208998/380422641-41551fb6-6f5c-4e2a-8169-380e7698f6cc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODQxMTIsIm5iZiI6MTczOTU4MzgxMiwicGF0aCI6Ii85NTIwODk5OC8zODA0MjI2NDEtNDE1NTFmYjYtNmY1Yy00ZTJhLTgxNjktMzgwZTc2OThmNmNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAxNDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwYTk4NmJmYjEwZTI2OGE1NzliNmJjZmM2Mjg2MjJlMjM5Zjc3ZWM5NmE3NjRkZmE0ODY5M2ViM2YwZWI2NDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZrsYo2ZQOQsqnjY7GMhGZFntswcKL6A39DmLcR5kS_g)
Here is a minimal
.tex
file with examples. The first one has Cyrillic letters, the former has Latin characters.Minimal tex file
main.aux
The text was updated successfully, but these errors were encountered: