On Sun, 14 May 2017 14:04:41
-0600, Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:
Idris Samawi Hamid
ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
14. Mai 2017 um 20:55
On Sun, 14 May 2017 12:20:43 -0600, Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:
OTOH user-defined
commands can be added to the ConTeXt lexer via the
Style Configurator (Notepad++) and get their own highlight color. I
have found this very useful in writing long documents. See attached
(User-defined Keywords dialog).
You can limit the number of custom commands when you use
\startnamedsection[topic][title=...]
instead of
\starttopic[title=...]
First time encountering these two commands; they're not on the wiki,
need to learn more about them..
Can you explain or give a complete sample test file illustrating how
they apply in the matter under discussion? Thanks.
This is only a example to demonstrate that you can
create new commands
without using new command names (and the need to add them to your
lexer)
in your document.
In the example below I create a new section but I don’t have to use
a new user generated command in the document itself.
\definehead[topic][subject]
\starttext
\startnamedsection[topic][title=This is a topic]
...
\stopnamedsection
\stoptext
I see your point. Will make a note of it for the lexer
documentation.
Adding tags to the commands is planned but the question is
how to
categorize them (internal, api, user level, low level, primitives,
defininitions (\define...), setups etc.).
This is good to know. At the moment we're working on a full-featured
ConTeXt lexer and are experimenting with different ideas of
organizing
commands for user-friendly syntax highlighting. Currently
considering
something like the following:
TeX primitives - Knuth
luaTeX primitives - excluding Knuth
The syntax files contain at the moment only ConTeXt
specific command,
primitives aren’t included.
Sure, we get the TeX and luaTeX commands from the scite*.lua files
macro structure -
e.g., sectioning etc.
micro structure - e.g., itemizations, tables etc.
mode structure - e.g., metapost, xml, markdown
The XML source has a category attribute for this
information.
Could you give a couple of examples?