Open ousia opened 7 years ago
I'm planning to look at some of the highlighting patterns shortly (will log an issue): perhaps I could 'take' this?
I think it's worth noting here that the scheme TeXworks uses for ConTeXt is similar to that for plain or LaTeX. That's what I think I'd expect: the general 'style' is a choice of the editor. One might add square brackets to the 'known' characters (possibly also for LaTeX). Not sure I see the 'boldness' you mention, and I think at least as-standard I'd avoid that: might mess up monospacing and that will annoy a reasonable number of users.
@josephwright, many thanks for your replies.
The bold font is used:
$ pdffonts context-code.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
CZEXLI+LMMonoLt10-Bold CID Type 0C Identity-H yes yes yes 10 0
ELMVVJ+LMMono12-Regular CID Type 0C Identity-H yes yes yes 11 0
But it might be clearer with Cousine:
Or even with Inconsolata:
If the fixed with of a monospace bold font is different from its regular counterpart, the font is poorly designed.
Could you test whether the possibility you mention happens with a font family? (It doesn’t happen with the typewriter typefaces I use.)
Many thanks for your help.
With an editor/IDE you can't be sure of the font the user will pick: somewhat different from producing code listings for documentation.
Of course, one can never know what a single user will do 😄.
How about implementing the conventions that ConTeXt itself proposes for its own code, see what happens with the bold font, and then decide whether it should be removed (or kept)?
@ousia I'll take a look (I've got a few other minor suggestions in this area, as I said). One thing I'd rather retain is the idea that \start...
/\stop...
really should be highlighted differently from other control sequences. (Hans might not agree, but they have a particular structural role.)
BTW, I notice that WinEdt (my other favoured editor on Windows) does use bold for some LaTeX syntax so this is perhaps a better idea than I thought :) I wonder if we might want something similar, but it relies on having a list of all keywords: not much fun in a regex.
From the following source:
TeXworks displays the following:
But ConTeXt itself displays:
The two differences are:
Just in case it helps, the complete ConTeXt source was: