2

It could be so useful to have a full grammar supporting all the built-in macros of LaTeX3.

This would simplify the reading of codes by proposing special formattings for each of these built-in macros.

My question: how can I suggest this to the guys working on TeXShop?

Torbjørn T.
  • 206,688
projetmbc
  • 13,315

1 Answers1

3

Note These comments are my own and don't reflect the opinion of the TeXShop development team (although I have in the past contributed a some code to TeXShop).

There are two separate cases to consider here: command completion and syntax highlighting. In both cases I think that the impetus of the work initially has to come from LaTeX3 users rather than from the TeXShop developers. If you do want to contact them you should contact Dick Koch directly at the email published on the TeXShop website.

Command completion

If by 'grammar' you mean command completion file for LaTeX3, then I think this is not something that the TeXShop developers should necessarily develop themselves. However, if LaTeX3 users want to contribute such a command completion file, it would indeed be a welcome addition to TeXShop.

You can find the existing command completion file for TeXShop in the CommandCompletion folder of ~/Library/TeXShop along with some documentation. This file was largely created by Herb Schulz. It can be accessed directly from within TeXShop by the menu item Source -> Command Completion -> Edit Command Completion File.

If I were you I would set up a github repository with a draft LaTeX3 command completion file for TeXShop and try to get people to help build it. Once it is in a usable form, then contact the TeXShop developers and ask them to make it available with the editor. This they would happily do, although it may not be able to co-exist with the existing LaTeX2e one, and I don't know if there's a way to choose the file on a per-document basis. But asking them to do all the work is in my opinion inappropriate, and likely out of their range of knowledge, since at least for the moment the range of skilled LaTeX3 users is quite small.

Syntax Highlighting

Syntax highlighting is built into the code of TeXShop, and unfortunately is not customizable by users, so in principle this is something that the developers might be willing to work on if they could be convinced that there were sufficient user demand. If you or a group of LaTeX3 users were willing to work on this you'd need to have some knowledge of Objective C development on the Mac to contribute code. There is no public repository for the code, but the sources are available as an XCode package that can be downloaded from the TeXShop website.

One thing that would probably help with this would be to produce written schema for how LaTeX3 code should ideally be highlighted. With such a schema, the developers might be more inclined to take on the task.

Alan Munn
  • 218,180
  • My idea would be to highlight built-ins which have fixed names. I could try to do the job but how grammars are defined in TeXShop? PS: my message start with "could be" and not "must"... ;-) – projetmbc Apr 16 '21 at 17:54
  • @projetmbc Yes, I know you weren't demanding they do it. I just wanted to add some context about why I think the beginning work needs to be done by LaTeX3 users rather than the TeXShop developers. I've added some more detail to my answer. – Alan Munn Apr 16 '21 at 18:40
  • There is a new package Codehigh that shows a pretty good highlighting: here is an example (take a look at the first image). – projetmbc May 17 '21 at 13:00