Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-17 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
17. Mai 2017 um 20:21
On Wed, 17 May 2017 08:15:11 -0600, Wolfgang Schuster 
 wrote:



This is what I get from running

context x-setups-generate.mkiv

variant="instance">




























This is different from what I get from the latest ConTeXt - 2017.05.15 
21:48.


Notably, \part is missing from the official context version; it's also 
missing in the generated x-setups-generate.pdf and the published 
setup-en.pdf. So there are bugs in the official version -)


Wolfgang: When will your latest sources be ready for distribution or 
sharing? Thanks in advance.

I can send them in a few days.

Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-17 Thread Wolfgang Schuster



Yu,Jason 
17. Mai 2017 um 20:27

I suppose not all abstract commands has  tag. For 
example, \ORNAMENT does not have , but it is still 
recognized as an abstract keyword (slanted). In my python script, I 
recognized every abstract keyword by determining if it has a 
 tag, which seems to be right.


Not all commands which let you create instances have predefined ones, 
e.g. there are no predefined descriptions.


Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-17 Thread Hans Hagen

On 5/17/2017 8:27 PM, Yu,Jason wrote:

I suppose not all abstract commands has   tag. For


not yet ... it's work in progress, so you can assume tyhat over time the 
xml file gets more complete



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-17 Thread Yu,Jason
Hi all,


I wrote a python script to auto-generate keyword lists from the full xml file. 
All the "abstract" keywords (those with a   tag) are 
simply ignored. The full list is in the KEYWORDS.txt file.


Thanks,

Jason


From: Hamid,Idris
Sent: Tuesday, May 16, 2017 8:09:28 AM
To: Wolfgang Schuster
Cc: Hans Hagen; dev-context@ntg.nl; Yu,Jason
Subject: Re: setup-en.pdf and mkiv command list

On Tue, 16 May 2017 07:38:33 -0600, Wolfgang Schuster
 wrote:

 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?
> Below is a example for \m{…}.
>
> 
> 
> 
> 
> 
> 

Wonderful. So the task is two-fold:

i)  categorization of context commands via the category attribute
ii) adding tex and luatex primitive classes

For editors, the abstract commands (\ATTACHMENT, \CHARACTERKERNING etc.)
do not need to be generated.

Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512


command_gen.py
Description: command_gen.py


---Start-



---Keywords starting a 
session---

\autostarttext  \bTABLE \bTABLEbody \bTABLEfoot \bTABLEhead 
\bTABLEnext \bTC\bTD\bTDs   \bTH\bTN\bTR\bTRs   \bTX
\bTY\beginhbox  \beginofshapebox\beginvbox  \beginvtop  
\begstrut   \bpar   \dostarttagged  \globalpushreferenceprefix  
\pushMPdrawing  \pusharrangedpages  \pushbackground \pushbar
\pushcatcodetable   \pushcolor  \pushendofline  \pushindentation
\pushmathstyle  \pushpath   \pushpunctuation\pushrandomseed 
\pushreferenceprefix\savecolor  \setbuffer  \startJScode
\startJSpreamble\startMPclip\startMPcode\startMPdefinitions 
\startMPdrawing \startMPenvironment \startMPextensions  
\startMPinclusions  \startMPinitializations \startMPpage
\startMPpositiongraphic \startMPpositionmethod  \startMPrun \startTABLE 
\startTABLEbody \startTABLEfoot \startTABLEhead \startTABLEnext \startTEXpage   
\startalignment \startallmodes  \startaside \startattachment
\startbackground\startbar   \startbitmapimage   
\startblockquote\startbtxrenderingdefinitions   \startbuffer
\startcatcodetable  \startcenteraligned \startcharacteralign
\startcheckedfences \startchemical  \startcollect   \startcollecting
\startcolor \startcolorintent   \startcoloronly \startcolorset  
\startcolumns   \startcolumnspan\startcombination   \startcomment   
\startcomponent \startcontextcode   \startcontextdefinitioncode 
\startctxfunction   \startctxfunctiondefinition \startcurrentcolor  
\startcurrentlistentrywrapper   \startdelimited \startdelimitedtext 
\startdisplaymath   \startdmath \startdocument  \starteffect
\startelement   \startembeddedxtable\startenvironment   
\startexceptions\startexpanded  \startexpandedcollect   
\startextendedcatcodetable  \startexternalfigurecollection  \startfigure
\startfittingpage   \startfloatcombination  \startfont  \startfontclass 
\startfontsolution  \startformula   \startformulas  \startframed
\startframedcontent \startframedtext\startgoto  
\startgridsnapping  \starthboxestohbox  \starthboxregister  
\starthead  \starthelptext  \starthiding\starthighlight 
\starthyphenation   \startimath \startindentedtext  
\startinteraction   \startinteractionmenu   \startinterface \startintertext 
\startitem  \startitemgroup \startknockout  \startlayout
\startleftaligned   \startlinealignment \startlinecorrection
\startlinefiller\startlinenumbering \startlinetable 
\startlinetablebody \startlinetablecell \startlinetablehead 
\startlocalfootnotes\startlocalheadsetup\startlocallinecorrection   
\startlocalnotes\startlocalsetups   \startlua   \startluacode   
\startluaparameterset   \startluasetups \startmakeup\startmarginblock   
\startmarginrule\startmarkedcontent \startmathmode  \startmathstyle 
\startmatrices  \startmaxaligned\startmdformula \startmidaligned
\startmiddlealigned \startmixedcolumns  \startmode  \startmodeset   
\startmodule

Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-16 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
16. Mai 2017 um 14:27
Hi Wolfgang,

On Mon, 15 May 2017 13:00:37 -0600, Wolfgang Schuster 
 wrote:





Hans Hagen 



low level is fuzzy anyway: \xmlfirst (more low level?) vs \xmlfilter
(more generic)

I can add class="system|primitive" (or level="...") to the XML files,
commands without attribute are user-level.


It would be great to include this system-primitive class in the lexer, 
but if that's too much of a burden short-term then perhaps we should 
not wait... Do you have an approximate time-frame for when this can be 
done? I presume it will take a long time to put that class together...
Marking internal/system command is simple but it will take a few days 
(boring stuff you won’t do for a few hours).


Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-16 Thread Wolfgang Schuster



Hans Hagen 
16. Mai 2017 um 10:23


aha, so all these have to be entered then

Yes but it won’t be finished in the next time.

Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-16 Thread Hans Hagen

On 5/16/2017 2:35 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Tue, 16 May 2017 06:27:49 -0600, Idris Samawi Hamid ادريس سماوي حامد
 wrote:


Hi Wolfgang,

On Mon, 15 May 2017 13:00:37 -0600, Wolfgang Schuster
 wrote:




Hans Hagen 



low level is fuzzy anyway: \xmlfirst (more low level?) vs \xmlfilter
(more generic)

I can add class="system|primitive" (or level="...") to the XML files,
commands without attribute are user-level.


It would be great to include this system-primitive class in the lexer,
but if that's too much of a burden short-term then perhaps we should
not wait... Do you have an approximate time-frame for when this can be
done? I presume it will take a long time to put that class together...


Apologies, got confused, assumed we were talking about low-level context
commands, not TeX/luaTeX primitives.


sure, but a categorization has to cover all aspects of tex

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-16 Thread Hans Hagen

On 5/16/2017 2:27 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Hi Wolfgang,

On Mon, 15 May 2017 13:00:37 -0600, Wolfgang Schuster
 wrote:




Hans Hagen 



low level is fuzzy anyway: \xmlfirst (more low level?) vs \xmlfilter
(more generic)

I can add class="system|primitive" (or level="...") to the XML files,
commands without attribute are user-level.


It would be great to include this system-primitive class in the lexer,
but if that's too much of a burden short-term then perhaps we should not
wait... Do you have an approximate time-frame for when this can be done?
I presume it will take a long time to put that class together...


everything setups is long term and normally ctx group meetings are 
moments when something is/gets done


(if you'd seen Wolfgangs awesome ledgers at the last meeting you'd 
probably understand better what i mean)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-15 Thread Wolfgang Schuster



Hans Hagen 
15. Mai 2017 um 21:45
On 5/15/2017 9:00 PM, Wolfgang Schuster wrote:


i assume that with primitive you mean primitive context

No, TeX primitives.









Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-15 Thread Hans Hagen

On 5/15/2017 9:00 PM, Wolfgang Schuster wrote:


is there a need to separate them? after all, most users will not use
low level code and when they do it doesn't matter much to them if
they're more or less low level

low level is fuzzy anyway: \xmlfirst (more low level?) vs \xmlfilter
(more generic)

I can add class="system|primitive" (or level="...") to the XML files,
commands without attribute are user-level.


i assume that with primitive you mean primitive context

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-15 Thread Idris Samawi Hamid ادريس سماوي حامد

the command reference is quite complete (and user defined instances
will never be part of syntax highlight anyway)


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).


See attached (experimental ConTeXt lexer in development..)___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-15 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 14 May 2017 11:38:19 -0600, Wolfgang Schuster  
 wrote:


The lua tables in the scite distribution are incomplete. For example,  
in

scite-context-data-interfaces.lua there is no mention of the commands
for natural tables - \bTABLE etc. This is the reason for taking the
auto-generation approach, to get a comprehensive and complete list.


could be but wolfgang did a huge effort in making them pretty complete
(even low level commands) so ic something is not in there (the i-*.xml
files), it's with good reason


Sure, I was referring to scite-context-data-interfaces.lua, not the  
i-*.xml files..



Fortunately setup-en.pdf makes all of these concrete commands explicit:  
setup-en.pdf is as complete as one could ask for. But for editors the  
abstract commands are superfluous, as you pointed out:



the command reference is quite complete (and user defined instances
will never be part of syntax highlight anyway)


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).



Environments with custom begin/end-strings (e.g. \bTR)









get the default start/stop string in the scite files.


Ah, "setupTABLE" is listed in scite-context-data-interfaces.lua.

Wolfgang: In that case, is there a way to generate an explicit list of all  
concrete commands that derive from the ["en"] class in  
scite-context-data-interfaces? If the results are sufficiently complete,  
we could distinguish high-level mkiv commands from the low-level ones.  
Such a list might be more beneficial for most users. Put another way, we  
could have


mkiv-list-high - one syntax highlighting (say, bold)
mkiv-list-low - second syntax highlighting (say, regular)

OTOH, much of this is a matter of taste: I would argue that \unprotect and  
\protect are high-level (as part of the meta-language used to mark off  
low-level code) and should therefore go into scite-context-data-interfaces  
(not there at present).


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-15 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 14 May 2017 09:33:04 -0600, Hans Hagen  wrote:


1. Clarification: Does setup-en.pdf includes both mkii and mkiv
commands? If so, then can a version of the auto-generation script be
made that will generate a version setup-mkiv-en.pdf that is complete but
restricted to mkiv commands?


this is mkiv (there is an cont-en.xml file describing mkii mostly) ...  
remmeber: mkii is frozen and phased out


Thanks, that's what I expected, just wanted to be certain..

--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-15 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 14 May 2017 09:33:04 -0600, Hans Hagen  wrote:


2. Modification: It appears that all command names that appear in
slanted text are used to mention user-defined commands of a particular
class, e.g.,

/\BACKGROUND/ - slanted text

which obviously names each of a class of commands defined by

\definebackground - regular text

Can a version of the auto-generation script be made that will generate a
version setup-mkiv-strict-en.pdf that is restricted to mkiv commands
explicitly defined in mkiv, excluding class commands or anything else
represented in slanted text?


it's xml so one can benerate anything from the file (i was in the  
process of generating instances in the lua files for scintilla but (1)  
had to prepare for bachotex, (2) got back and ill, (3) need some  
motivation to pick up that thread)


Let's call commands like \BACKGROUND etc abstract commands; the rest are  
concrete. An abstract command constitutes the form of a concrete instance  
that is, e.g., defined by the user via a corresponding \define.


[Are there other kinds of abstract command not involving some  
\define?]


For text editors a generic list of all concrete mkiv commands is needed.


3. Although it is intuitive, a legend precisely explaining the semantics
of the command list in setup.pdf would be useful. If there is already
one available, could you point it out to me?


dunno, maybe somewhere on the wiki


The closest I could find is here:

http://wiki.contextgarden.net/Command_Syntax

but it does not contain a complete or precise legend. Such a thing would  
obviously be useful for users..



4. Would it be possible for the auto-generation to export the command
list to a semi-formatted text file? Copying the text of setup-en.pdf to
a text file gives usable results but a text file with some regular
structure might be better.


one can (1) use some xml transformation or (2) use the lua tables to get  
strings


The lua tables in the scite distribution are incomplete. For example, in  
scite-context-data-interfaces.lua there is no mention of the commands for  
natural tables - \bTABLE etc. This is the reason for taking the  
auto-generation approach, to get a comprehensive and complete list.


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Hans Hagen

On 5/14/2017 10:04 PM, Wolfgang Schuster wrote:

Idris Samawi Hamid ادريس سماوي حامد 
14. Mai 2017 um 20:55
On Sun, 14 May 2017 12:20:43 -0600, Wolfgang Schuster
 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


indeed, and we stimmulate this over using hard coded generated names 
(some define commands have the option not to define instance commands)


idris: don't overdo syntax highlighting, better concentrate on 
supporting structure


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Hans Hagen

On 5/14/2017 8:06 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Sun, 14 May 2017 11:38:19 -0600, Wolfgang Schuster
 wrote:


The lua tables in the scite distribution are incomplete. For
example, in
scite-context-data-interfaces.lua there is no mention of the commands
for natural tables - \bTABLE etc. This is the reason for taking the
auto-generation approach, to get a comprehensive and complete list.


could be but wolfgang did a huge effort in making them pretty complete
(even low level commands) so ic something is not in there (the i-*.xml
files), it's with good reason


Sure, I was referring to scite-context-data-interfaces.lua, not the
i-*.xml files..


Fortunately setup-en.pdf makes all of these concrete commands explicit:
setup-en.pdf is as complete as one could ask for. But for editors the
abstract commands are superfluous, as you pointed out:


the command reference is quite complete (and user defined instances
will never be part of syntax highlight anyway)


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).


sure, but it's not something that we will suport out of the box in a 
context distribution; one can have additional i-* files too (technically 
a user instance should be defined in an xml files like any other 
instance as xml is the starting point, not the generated lua table)



Environments with custom begin/end-strings (e.g. \bTR)









get the default start/stop string in the scite files.


Ah, "setupTABLE" is listed in scite-context-data-interfaces.lua.

Wolfgang: In that case, is there a way to generate an explicit list of
all concrete commands that derive from the ["en"] class in
scite-context-data-interfaces? If the results are sufficiently complete,
we could distinguish high-level mkiv commands from the low-level ones.
Such a list might be more beneficial for most users. Put another way, we
could have

mkiv-list-high - one syntax highlighting (say, bold)
mkiv-list-low - second syntax highlighting (say, regular)



OTOH, much of this is a matter of taste: I would argue that \unprotect
and \protect are high-level (as part of the meta-language used to mark
off low-level code) and should therefore go into
scite-context-data-interfaces (not there at present).


mult-low.lua does that (accordomg to what i considere low level or helper)

btw, users who need \unprotect are already expewrts

(fwiw, i've been trying to make the server/html based help subsystem 
instance aware because that is what i offer in scite/ta)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Wolfgang Schuster

Idris Samawi Hamid ادريس سماوي حامد 
14. Mai 2017 um 20:55
On Sun, 14 May 2017 12:20:43 -0600, Wolfgang Schuster 
 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

Environments with custom begin/end-strings (e.g. \bTR)









get the default start/stop string in the scite files.


Ah, "setupTABLE" is listed in scite-context-data-interfaces.lua.

\bTABLE is also listed but Hans script includes it as \startTABLE
(because it ignores the begin/end attributes).

Wolfgang: In that case, is there a way to generate an explicit list of
all concrete commands that derive from the ["en"] class in
scite-context-data-interfaces? If the results are sufficiently
complete, we could distinguish high-level mkiv commands from the
low-level ones. Such a list might be more beneficial for most users.
Put another way, we could have

mkiv-list-high - one syntax highlighting (say, bold)
mkiv-list-low - second syntax highlighting (say, regular)

OTOH, much of this is a matter of taste: I would argue that \unprotect
and \protect are high-level (as part of the meta-language used to mark
off low-level code) and should therefore go into
scite-context-data-interfaces (not there at present).

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.

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.

MkiV - remaining high level
MkIV - low-level [but how to separate them out?]
user-defined
Internal commands can be grouped in official helpers (which should be 
documented) and internal helpers (which can be hidden).
Perhaps collapse macro and micro structure into one set... Again, just 
ideas for now, will work this week to work them into a concrete 
organization for the lexer - once we generate a complete list of 
concrete mkiv commands.


If we can generate a complete version of the list in 
scite-context-data-interfaces (including \bTR etc.) then we can 
subtract that from the complete list of concrete mkiv commands, giving 
us mutually exclusive and jointly exhaustive high/low-level lists.
The source for the command list are the XML files (search for i-*.xml) 
and specific lists can be generated by adding metadata to the definitions.


Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Wolfgang Schuster

Idris Samawi Hamid ادريس سماوي حامد 
14. Mai 2017 um 20:06
On Sun, 14 May 2017 11:38:19 -0600, Wolfgang Schuster 
 wrote:


The lua tables in the scite distribution are incomplete. For 
example, in

scite-context-data-interfaces.lua there is no mention of the commands
for natural tables - \bTABLE etc. This is the reason for taking the
auto-generation approach, to get a comprehensive and complete list.


could be but wolfgang did a huge effort in making them pretty complete
(even low level commands) so ic something is not in there (the i-*.xml
files), it's with good reason


Sure, I was referring to scite-context-data-interfaces.lua, not the 
i-*.xml files..



Fortunately setup-en.pdf makes all of these concrete commands 
explicit: setup-en.pdf is as complete as one could ask for. But for 
editors the abstract commands are superfluous, as you pointed out:



the command reference is quite complete (and user defined instances
will never be part of syntax highlight anyway)


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=...]


Environments with custom begin/end-strings (e.g. \bTR)









get the default start/stop string in the scite files.


Ah, "setupTABLE" is listed in scite-context-data-interfaces.lua.
\bTABLE is also listed but Hans script includes it as \startTABLE 
(because it ignores the begin/end attributes).
Wolfgang: In that case, is there a way to generate an explicit list of 
all concrete commands that derive from the ["en"] class in 
scite-context-data-interfaces? If the results are sufficiently 
complete, we could distinguish high-level mkiv commands from the 
low-level ones. Such a list might be more beneficial for most users. 
Put another way, we could have


mkiv-list-high - one syntax highlighting (say, bold)
mkiv-list-low - second syntax highlighting (say, regular)

OTOH, much of this is a matter of taste: I would argue that \unprotect 
and \protect are high-level (as part of the meta-language used to mark 
off low-level code) and should therefore go into 
scite-context-data-interfaces (not there at present).
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.).


Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Wolfgang Schuster



Hans Hagen 
14. Mai 2017 um 19:15
On 5/14/2017 6:43 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Sun, 14 May 2017 09:33:04 -0600, Hans Hagen  wrote:


2. Modification: It appears that all command names that appear in
slanted text are used to mention user-defined commands of a particular
class, e.g.,

/\BACKGROUND/ - slanted text

which obviously names each of a class of commands defined by

\definebackground - regular text

Can a version of the auto-generation script be made that will 
generate a

version setup-mkiv-strict-en.pdf that is restricted to mkiv commands
explicitly defined in mkiv, excluding class commands or anything else
represented in slanted text?


it's xml so one can benerate anything from the file (i was in the
process of generating instances in the lua files for scintilla but (1)
had to prepare for bachotex, (2) got back and ill, (3) need some
motivation to pick up that thread)


Let's call commands like \BACKGROUND etc abstract commands; the rest are
concrete. An abstract command constitutes the form of a concrete
instance that is, e.g., defined by the user via a corresponding
\define.


that's what i meant with "i'm working on getting these instances in 
the lua lists too" but it takes time (and motivation) so it will 
happen stepwise


(normally i prioritize such things by need in projects but in the 
projects that we have the authors code in xml)



[Are there other kinds of abstract command not involving some
\define?]


dunno




For text editors a generic list of all concrete mkiv commands is needed.

3. Although it is intuitive, a legend precisely explaining the 
semantics

of the command list in setup.pdf would be useful. If there is already
one available, could you point it out to me?


dunno, maybe somewhere on the wiki


The closest I could find is here:

http://wiki.contextgarden.net/Command_Syntax

but it does not contain a complete or precise legend. Such a thing would
obviously be useful for users..


the command reference is quite complete (and user defined instances 
will never be part of syntax highlight anyway)



4. Would it be possible for the auto-generation to export the command
list to a semi-formatted text file? Copying the text of 
setup-en.pdf to

a text file gives usable results but a text file with some regular
structure might be better.


one can (1) use some xml transformation or (2) use the lua tables to
get strings


The lua tables in the scite distribution are incomplete. For example, in
scite-context-data-interfaces.lua there is no mention of the commands
for natural tables - \bTABLE etc. This is the reason for taking the
auto-generation approach, to get a comprehensive and complete list.


could be but wolfgang did a huge effort in making them pretty complete 
(even low level commands) so ic something is not in there (the i-*.xml 
files), it's with good reason

Environments with custom begin/end-strings (e.g. \bTR)

file="tabl-ntb.mkiv">








get the default start/stop string in the scite files.

Wolfgang
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Hans Hagen

On 5/14/2017 6:43 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Sun, 14 May 2017 09:33:04 -0600, Hans Hagen  wrote:


2. Modification: It appears that all command names that appear in
slanted text are used to mention user-defined commands of a particular
class, e.g.,

/\BACKGROUND/ - slanted text

which obviously names each of a class of commands defined by

\definebackground - regular text

Can a version of the auto-generation script be made that will generate a
version setup-mkiv-strict-en.pdf that is restricted to mkiv commands
explicitly defined in mkiv, excluding class commands or anything else
represented in slanted text?


it's xml so one can benerate anything from the file (i was in the
process of generating instances in the lua files for scintilla but (1)
had to prepare for bachotex, (2) got back and ill, (3) need some
motivation to pick up that thread)


Let's call commands like \BACKGROUND etc abstract commands; the rest are
concrete. An abstract command constitutes the form of a concrete
instance that is, e.g., defined by the user via a corresponding
\define.


that's what i meant with "i'm working on getting these instances in the 
lua lists too" but it takes time (and motivation) so it will happen 
stepwise


(normally i prioritize such things by need in projects but in the 
projects that we have the authors code in xml)



[Are there other kinds of abstract command not involving some
\define?]


dunno


For text editors a generic list of all concrete mkiv commands is needed.


3. Although it is intuitive, a legend precisely explaining the semantics
of the command list in setup.pdf would be useful. If there is already
one available, could you point it out to me?


dunno, maybe somewhere on the wiki


The closest I could find is here:

http://wiki.contextgarden.net/Command_Syntax

but it does not contain a complete or precise legend. Such a thing would
obviously be useful for users..


the command reference is quite complete (and user defined instances will 
never be part of syntax highlight anyway)



4. Would it be possible for the auto-generation to export the command
list to a semi-formatted text file? Copying the text of setup-en.pdf to
a text file gives usable results but a text file with some regular
structure might be better.


one can (1) use some xml transformation or (2) use the lua tables to
get strings


The lua tables in the scite distribution are incomplete. For example, in
scite-context-data-interfaces.lua there is no mention of the commands
for natural tables - \bTABLE etc. This is the reason for taking the
auto-generation approach, to get a comprehensive and complete list.


could be but wolfgang did a huge effort in making them pretty complete 
(even low level commands) so ic something is not in there (the i-*.xml 
files), it's with good reason


keep in mind that all this happens in spare time

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Hans Hagen

On 5/14/2017 6:43 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Sun, 14 May 2017 09:33:04 -0600, Hans Hagen  wrote:


2. Modification: It appears that all command names that appear in
slanted text are used to mention user-defined commands of a particular
class, e.g.,

/\BACKGROUND/ - slanted text

which obviously names each of a class of commands defined by

\definebackground - regular text

Can a version of the auto-generation script be made that will generate a
version setup-mkiv-strict-en.pdf that is restricted to mkiv commands
explicitly defined in mkiv, excluding class commands or anything else
represented in slanted text?


it's xml so one can benerate anything from the file (i was in the
process of generating instances in the lua files for scintilla but (1)
had to prepare for bachotex, (2) got back and ill, (3) need some
motivation to pick up that thread)


Let's call commands like \BACKGROUND etc abstract commands; the rest are
concrete. An abstract command constitutes the form of a concrete
instance that is, e.g., defined by the user via a corresponding
\define.

[Are there other kinds of abstract command not involving some
\define?]

For text editors a generic list of all concrete mkiv commands is needed.


3. Although it is intuitive, a legend precisely explaining the semantics
of the command list in setup.pdf would be useful. If there is already
one available, could you point it out to me?


dunno, maybe somewhere on the wiki


The closest I could find is here:

http://wiki.contextgarden.net/Command_Syntax

but it does not contain a complete or precise legend. Such a thing would
obviously be useful for users..


4. Would it be possible for the auto-generation to export the command
list to a semi-formatted text file? Copying the text of setup-en.pdf to
a text file gives usable results but a text file with some regular
structure might be better.


one can (1) use some xml transformation or (2) use the lua tables to
get strings


The lua tables in the scite distribution are incomplete. For example, in
scite-context-data-interfaces.lua there is no mention of the commands
for natural tables - \bTABLE etc. This is the reason for taking the
auto-generation approach, to get a comprehensive and complete list.

Idris



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Hans Hagen

On 5/13/2017 9:41 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

We need to generate a complete list of mkiv commands. setup-en.pdf has
everything but some clarification and modification is needed:

1. Clarification: Does setup-en.pdf includes both mkii and mkiv
commands? If so, then can a version of the auto-generation script be
made that will generate a version setup-mkiv-en.pdf that is complete but
restricted to mkiv commands?


this is mkiv (there is an cont-en.xml file describing mkii mostly) ... 
remmeber: mkii is frozen and phased out



[Is the auto-generation script publicly available?]


all scripts are in the distribution


2. Modification: It appears that all command names that appear in
slanted text are used to mention user-defined commands of a particular
class, e.g.,

/\BACKGROUND/ - slanted text

which obviously names each of a class of commands defined by

\definebackground - regular text

Can a version of the auto-generation script be made that will generate a
version setup-mkiv-strict-en.pdf that is restricted to mkiv commands
explicitly defined in mkiv, excluding class commands or anything else
represented in slanted text?


it's xml so one can benerate anything from the file (i was in the 
process of generating instances in the lua files for scintilla but (1) 
had to prepare for bachotex, (2) got back and ill, (3) need some 
motivation to pick up that thread)



3. Although it is intuitive, a legend precisely explaining the semantics
of the command list in setup.pdf would be useful. If there is already
one available, could you point it out to me?


dunno, maybe somewhere on the wiki


4. Would it be possible for the auto-generation to export the command
list to a semi-formatted text file? Copying the text of setup-en.pdf to
a text file gives usable results but a text file with some regular
structure might be better.


one can (1) use some xml transformation or (2) use the lua tables to get 
strings



In sum: we need - urgently - a comprehensive ConTeXt command list
restricted to mkiv that excludes class names for user definitions and
the like. Any help is greatly appreciated, and thanks in advance!

Best wishes
Idris




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sat, 13 May 2017 13:41:04 -0600, Idris Samawi Hamid ادريس سماوي حامد
 wrote:

CHANGE

Copying the text of setup-en.pdf to a text file gives usable results but  
a text file with some regular structure might be better.


TO

Copying the text of setup-en.pdf to a text file gives usable results but a
text file with some regular structure, auto-generated via the script,
might be better.

--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


[dev-context] setup-en.pdf and mkiv command list

2017-05-14 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

We need to generate a complete list of mkiv commands. setup-en.pdf has
everything but some clarification and modification is needed:

1. Clarification: Does setup-en.pdf includes both mkii and mkiv commands?
If so, then can a version of the auto-generation script be made that will
generate a version setup-mkiv-en.pdf that is complete but restricted to
mkiv commands?

[Is the auto-generation script publicly available?]

2. Modification: It appears that all command names that appear in slanted
text are used to mention user-defined commands of a particular class, e.g.,

/\BACKGROUND/ - slanted text

which obviously names each of a class of commands defined by

\definebackground - regular text

Can a version of the auto-generation script be made that will generate a
version setup-mkiv-strict-en.pdf that is restricted to mkiv commands
explicitly defined in mkiv, excluding class commands or anything else
represented in slanted text?

3. Although it is intuitive, a legend precisely explaining the semantics
of the command list in setup.pdf would be useful. If there is already one
available, could you point it out to me?

4. Would it be possible for the auto-generation to export the command list
to a semi-formatted text file? Copying the text of setup-en.pdf to a text
file gives usable results but a text file with some regular structure
might be better.


In sum: we need - urgently - a comprehensive ConTeXt command list
restricted to mkiv that excludes class names for user definitions and the
like. Any help is greatly appreciated, and thanks in advance!

Best wishes
Idris

--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context