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

feat: add LaTeX3 matchup support. #317

Merged
merged 2 commits into from
Sep 2, 2023
Merged

Conversation

RadioNoiseE
Copy link
Contributor

@RadioNoiseE RadioNoiseE commented Aug 18, 2023

Added matchup support for a bunch of LaTeX3 macros. (They are documented in source3.pdf and are the stable ones. In l3candidates I didn’t find any experimental macros which need matchup support anyway.)
matchup-sc

And here’s a test file which may be helpful: test-expl3-matchup.txt (maybe :setf tex is needed). And there’s something wrong with it: \if_true|false: has no signature w. (just aware of that

N.B., the only changed line is:

" let l:match_words .= ',\\if\%(\w\|@\)*\>:\\else\>:\\fi\>'
let l:match_words .= ',\\if\%(\:w\|\%(\w\|@\)*\)\>:\\else\:\?\>:\\fi\:\?\>'

since the LaTeX3 version (\if:w\else:\fi:) overlaps with the TeX version, and therefore the \: is placed before the \>. Thus a set iskeyword+=\: is needed for correct rendering. And that’s the reason why I didn’t use \> for the other \else:\fi:s.
Is it better for me to append \> after or not?

Add support to a bunch of LaTeX3 macros. See file `tex_matchup.vim` for detail.
Changed `*` to `\?`.
@RadioNoiseE RadioNoiseE closed this Sep 2, 2023
@andymass andymass reopened this Sep 2, 2023
@andymass andymass merged commit f45877c into andymass:master Sep 2, 2023
8 of 10 checks passed
@andymass
Copy link
Owner

andymass commented Sep 2, 2023

Hi, I see it was closed but it looks good to me, so merging.

Is it better for me to append > after or not?

If I understand right, it makes sense the way you have changed it.

Thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants