[OS X TeX] TeXShop syntax highlighting for expl3

Murray Eisenberg murrayeisenberg at gmail.com
Sun Jan 28 21:10:02 CET 2024


One snag with expl3 code handling in TeXShop is the editor's handling of the underscore, that character being pervasive in expl3code: When I type _ in the editor it assumes the input is a subscript and automatically inserts a pair of braces {} after the _ and positions the cursor within the braces. That is, it replaces the underscore with _{#SEL##INS#}.

I find that replacement in both the list of keybindings and in TeXShop's autocompletion.plist file.

I realize that one can toggle keybindings off from the Source menu, but then that toggles off all the other keybindings too.

Given, on the one hand, the implausibility of the LaTeX3 team replacing the underscore with some other, innocuous, character at this late date, and on the other hand the utter convenience of the keybinding for _ when typing math, I wonder whether there might be some other approach to the underscore issue within TeXShop.

P.S. Is the autocompletion.plist file the source of the key bindings? (I don't find any file having a name "keybindings" within either the TeXShop.app contents or the ~/Library/TeXShop tree.)

> On Jan 28, 2024, at 11:58 AM, Richard Koch <koch at uoregon.edu> wrote:
> 
> 
> On a completely different topic, now that I realize that TeXShop has primitive expl3SyntaxColoring, I'd be happy to try to extend that coloring. Can you write a short, but fairly complete, explanation of the exact phrases that need to be colored, and appropriate colors if different colors are used? Recall that we create TeX Live 2023 next month, so there could be some delay.
> 
> (PS: Just once, I worked in the real world for a year as a programmer at Tektronix. Marketing people would sometimes talk to the regular engineer in our team, asking for a feature.  He always answered "it can't be done." After hearing this several times, I asked him about it. He said "if they really need it, they'll keep 
> asking.")
> 

---
Murray Eisenberg		murrayeisenberg at gmail.com
Mobile (413)-427-5334
503 King Farm Blvd #101		
Rockville, MD 20850-6667	



----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://www.tug.org/mactex/faq/index.html
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex



More information about the macostex-archives mailing list.