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

LaTeX 3 support (expl3) #410

Open
hcsch opened this issue May 10, 2021 · 1 comment
Open

LaTeX 3 support (expl3) #410

hcsch opened this issue May 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@hcsch
Copy link

hcsch commented May 10, 2021

When writing packages LaTeX3 provides many a benefit over LaTeX2e. One of these is a "new" uniform syntax for macros which integrates namespacing and information about the macros parameters (e.g. \fp_sub:Nn). There is also the notion of private macros, which use two underscores before the module name, rather than one (e.g. \g__mylib_some_internal_flag_bool) in case of a variable or none in case of a function.
LaTeX3 provides many convenient interfaces for manipulation of different kinds of data (e.g. comma separated lists, sequences and stacks, key-value options, error / warning / info log messages, templating etc.), so I prefer using that for the few packages I write (mostly for myself, as-needed).

While I don't know exactly how many packages use LaTeX3 syntax today, I do know that a couple really popular ones like siunitx, fontspec, biblatex, polyglossia, microtype and probably some more make use of it.

Currently I already am using TeXLab to write LaTeX3 code, but I feel like at least the syntax highlighting could use some improvements. Currently the module name or gobal/local variable prefix gets highlighted in blue (unlike with normal macros where the whole macro name is highlighted), but information like whether or not a macro is private or public are not considered. In case of a private macro function, the leading \_ gets highlighted and the rest stays the default text color.
I'm honestly unsure of what else is feasible to implement that could be helpful for LaTeX3 development. A thing that would be really nice is documentation for the LaTeX3 interfaces on hover, but I can imagine that being anything but simple to extract and display in a sensible format.

See http://mirrors.ctan.org/macros/latex/contrib/l3kernel/expl3.pdf and other documents from https://ctan.org/pkg/l3kernel and related packages for details on the syntax. The linked PDF gives a (IMO) pretty good introduction to LaTeX 3 and is probably the document to go after.

@pfoerster pfoerster added the enhancement New feature or request label May 14, 2021
@lukeflo
Copy link

lukeflo commented Nov 16, 2023

Are there any news on this resp. is any progress made regarding this enhancement? I want to use a Latex lsp with emacs eglot package. Its working as supposed -- for regualr latex2e syntax. Unfortunatley, latex3 seems not to be supported so far. Since most of my packages rely heavily on latex3 a lsp support would be great! The other Latex lsp usable with eglot, digestif, is missing latex3 support as well...

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

No branches or pull requests

3 participants