Re: [NTG-context] Ctx: list of commands
Hello, @Philipp: 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g. Hi Lukáš, if you interpret “current Context commands” as “macros known to TeX”, you may try dumping the hashtable with these lines: ··· \starttext \startluacode table.print(tex.hashtokens()) \stopluacode \stoptext ··· thanks for the idea. Unfortunately, current Context commands don't need to be necessarily macros known to TeX, as ConTeXt may have defined many macros that are not for public use. It seems that my question is not so straightforward - I didn't think it would it could be problem to separate public macros (= public ConTeXt commands = these that are cited in manuals, on wiki or simply - which you can use). Maybe - if I know ALL macros - it would be easy to distinguish between public ones and protected ones - supposing the latter have always at least one of the special chars - _@?! (or other?) in it. I tried your idea, but in this part of the output: ... [startJScode]={ 127, 290597, 60096 }, [startJSpreamble]={ 127, 290644, 49920 }, [startLUA]={ 127, 245948, 28541 }, [startLuaSnippet]={ 127, 244345, 530 }, [startLuaSnippetBoundary]={ 127, 246417, 46341 }, [startLuaSnippetComment]={ 127, 247113, 23071 }, [startLuaSnippetName]={ 127, 246301, 9781 }, [startLuaSnippetNameBase]={ 127, 244439, 46291 }, [startLuaSnippetNameCore]={ 127, 245803, 61132 }, [startLuaSnippetNameLibraries]={ 127, 246257, 38877 }, [startLuaSnippetQuote]={ 127, 246898, 19907 }, [startLuaSnippetSpecial]={ 127, 247006, 23901 }, [startLuaSnippetString]={ 127, 246646, 61126 }, [startMP]={ 127, 245820, 14236 }, ... - the command/macro \startluacode is missing (why?) and - e.g. the macro \startLuaSnippetNameBase is not mentioned for public use I guess, but also is not detectable by presence of any special char (@_!?). So I'm not sure this way is usable. @Hans: How exactly did you mean to use: \starttext \startluacode table.print(tex.hashtokens()) \stopluacode \stoptext ··· or \enabledirectives[system.dumphash] \enabledirectives[system.dumpdelta] This: \starttext \enabledirectives[system.dumphash] \enabledirectives[system.dumpdelta] \stoptext gives nothing useful. How exactly to use the command/switch --textpad or --text with context.exe? Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On Tue, Sep 18 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote: - the command/macro \startluacode is missing (why?) and Are you sure? I can see it... -- Peter ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On Tue, 18 Sep 2012 09:36:54 +0200, Peter Münster pmli...@free.fr wrote: - the command/macro \startluacode is missing (why?) and Are you sure? I can see it... ... You're right, I see it, too... Lukas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On 18-9-2012 08:44, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, @Philipp: 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g. Hi Lukáš, if you interpret “current Context commands” as “macros known to TeX”, you may try dumping the hashtable with these lines: ··· \starttext \startluacode table.print(tex.hashtokens()) \stopluacode \stoptext ··· thanks for the idea. Unfortunately, current Context commands don't need to be necessarily macros known to TeX, as ConTeXt may have defined many macros that are not for public use. It seems that my question is not so straightforward - I didn't think it would it could be problem to separate public macros (= public ConTeXt commands = these that are cited in manuals, on wiki or simply - which you can use). mult-def.lua has some information (and could be extended) as does mult-low.lua Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On Sep 18, 2012, at 2:44 AM, Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.czmailto:l...@pontex.cz wrote: It seems that my question is not so straightforward - I didn't think it would it could be problem to separate public macros (= public ConTeXt commands = these that are cited in manuals, on wiki or simply - which you can use). I haven't been following the answers closely as they seemed to focus on getting ALL commands. So excuse me if this is too naive, but have you looked at the quick reference?: http://pragma-ade.com/general/qrcs/setup-en.pdf I think it does not contain all commands, however, not even all the public ones. But maybe it's a good starting place. It is based on … tex/texmf-context/tex/context/interface/cont-en.xml (There are ones for the other languages, too.) The xml database contains the source file name, too, which helps me sometimes. One could probably develop a quicker reference based on it in the format you asked for. Michael This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
http://pragma-ade.com/general/qrcs/setup-en.pdf … tex/texmf-context/tex/context/interface/cont-en.xml Thanks for the idea. Maybe both sources would be useful somehow but - they don't look up-to-date as e.g. the command \startluacode is not involved in any of both. Persisting question: c:\ConTeXt\tex\texmf-context\scripts\context\lua\mtx-interface.lua And: ... local helpinfo = [[ ... --textpad generate textpad interface files --textcreate text files for commands and environments ... ]] How exactly to use the command/switch --textpad or --text with context.exe? Neither context --text nor context --textpad seems to give anything useful. Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On 18-9-2012 15:49, Rogers, Michael K wrote: … tex/texmf-context/tex/context/interface/cont-en.xml indeed it needs updating (some time ago wolfgang started with it but it's a tedious job) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On 18-9-2012 16:00, Procházka Lukáš Ing. - Pontex s. r. o. wrote: http://pragma-ade.com/general/qrcs/setup-en.pdf … tex/texmf-context/tex/context/interface/cont-en.xml Thanks for the idea. Maybe both sources would be useful somehow but - they don't look up-to-date as e.g. the command \startluacode is not involved in any of both. Persisting question: c:\ConTeXt\tex\texmf-context\scripts\context\lua\mtx-interface.lua And: ... local helpinfo = [[ ... --textpad generate textpad interface files --textcreate text files for commands and environments ... ]] How exactly to use the command/switch --textpad or --text with context.exe? Neither context --text nor context --textpad seems to give anything useful. you run mtx script with: mtxrun --script interface -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
Michael K Rogers wrote: … tex/texmf-context/tex/context/interface/cont-en.xml Hans wrote: indeed it needs updating (some time ago wolfgang started with it but it's a tedious job) Hans, have you ever thought about creating a command \defpublic[#commandname]{...} that works pretty much like \def\commandname{...}, but also registers the name of the command it defines to a table somewhere? You might already have something like it because the tables in setup-en.pdf look automatically-created, but there is some hint in the sources that they are based on some (Wolfgang's?) XML file, too. http://pragma-ade.com/general/qrcs/setup-en.pdf x-set-*.mkii, .mkiv Cheers, Sietse On Tue, Sep 18, 2012 at 4:59 PM, Hans Hagen pra...@wxs.nl wrote: On 18-9-2012 16:00, Procházka Lukáš Ing. - Pontex s. r. o. wrote: http://pragma-ade.com/general/qrcs/setup-en.pdf … tex/texmf-context/tex/context/interface/cont-en.xml Thanks for the idea. Maybe both sources would be useful somehow but - they don't look up-to-date as e.g. the command \startluacode is not involved in any of both. Persisting question: c:\ConTeXt\tex\texmf-context\scripts\context\lua\mtx-interface.lua And: ... local helpinfo = [[ ... --textpad generate textpad interface files --textcreate text files for commands and environments ... ]] How exactly to use the command/switch --textpad or --text with context.exe? Neither context --text nor context --textpad seems to give anything useful. you run mtx script with: mtxrun --script interface -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On 18-9-2012 18:44, Sietse Brouwer wrote: Michael K Rogers wrote: … tex/texmf-context/tex/context/interface/cont-en.xml Hans wrote: indeed it needs updating (some time ago wolfgang started with it but it's a tedious job) Hans, have you ever thought about creating a command \defpublic[#commandname]{...} that works pretty much like \def\commandname{...}, but also registers the name of the command it defines to a table somewhere? yes but it does not help much unless the whole argument spec is included; also, quite some commands are generated so we would still miss a lot Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Ctx: list of commands
Hello, 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g. context --list-of-commands Cmds.txt to produce Cmds.txt \startCAP \stopCAP \startCap \stopCap ... \writetoregister 2) The directory c:\Ctx-Beta\tex\texmf-context\context\data\textpad is empty (by default?). Its content: - is filled when context.exe is launched with a command/switch (if so, which command?), or - is filled when a newer version of ConTeXt is downloaded (if so, which extras - like first-setup.bat --extras=all --modules=all - should be specified to fill the directory)? TIA. Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
2012-09-17 Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz: Hi Lukáš 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g. Not that I'm aware of. Wolfgang started to maintain a list of ConTeXt commands, but I'm not sure if he's still on it: https://bitbucket.org/wolfs/commands During the last few months the wiki got plenty of new commands added that you could use. But I don't think there's an interface to retrieve information from the wiki in an automated fashion. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
During the last few months the wiki got plenty of new commands added that you could use. The wiki's list of commands is nowhere near complete, alas. There are a few (not many) commands *documented* on there that are not documented elsewhere, but if it's *existence* of commands you want to know about, the wiki is not a good source, so don't bother. But I don't think there's an interface to retrieve information from the wiki in an automated fashion. The API is, in fact, enabled: http://wiki.contextgarden.net/api.php But that is more for automated editing than automated retrieval: there are simply not enough microformats/templates in use to make automated processing worthwhile. As for what I myself do when I want to know about the existence or implementation of commands: I grep the source. This is NOT the same as producing a list of all commands, of course; just something that is also very useful, and may often solve the problem. I've defined a command 'crep' that will automatically search the source files in the main ConTeXt directory, so if I need something figure- or footnote-related I'll type crep '\\def.*figure' or crep 'footnote', for example That will usually at least give me an idea on which file I should look at. Once inside the file, there are often documenation comments that start with %D. It's not ideal. But it helps. ## start crep command in my .bashrc and .zshrc function condir { cd /opt/context/tex/texmf-context/tex/context/base/ } # Easy grepping of ConTeXt functions function crep { condir; grep -R $* * } ## end crep command Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
... Maybe I found something useful (initially I could not remember where and what to look for, but - ) c:\ConTeXt\tex\texmf-context\scripts\context\lua\mtx-interface.lua There is: ... local helpinfo = [[ ... --textpad generate textpad interface files --textcreate text files for commands and environments ... ]] So I'll check it. I'd like to renew my TextPad syntax highlighting file for ConTeXt; or better to try to renew it as there were some Ctx commands missing in the (last) Ctx-generated syntax file and I had to add commands manually in it. So if the list of commands is more complete or really complete, I'd like to use it. Best regards, Lukas On Mon, 17 Sep 2012 16:20:44 +0200, Sietse Brouwer sbbrou...@gmail.com wrote: During the last few months the wiki got plenty of new commands added that you could use. The wiki's list of commands is nowhere near complete, alas. There are a few (not many) commands *documented* on there that are not documented elsewhere, but if it's *existence* of commands you want to know about, the wiki is not a good source, so don't bother. But I don't think there's an interface to retrieve information from the wiki in an automated fashion. The API is, in fact, enabled: http://wiki.contextgarden.net/api.php But that is more for automated editing than automated retrieval: there are simply not enough microformats/templates in use to make automated processing worthwhile. As for what I myself do when I want to know about the existence or implementation of commands: I grep the source. This is NOT the same as producing a list of all commands, of course; just something that is also very useful, and may often solve the problem. I've defined a command 'crep' that will automatically search the source files in the main ConTeXt directory, so if I need something figure- or footnote-related I'll type crep '\\def.*figure' or crep 'footnote', for example That will usually at least give me an idea on which file I should look at. Once inside the file, there are often documenation comments that start with %D. It's not ideal. But it helps. ## start crep command in my .bashrc and .zshrc function condir { cd /opt/context/tex/texmf-context/tex/context/base/ } # Easy grepping of ConTeXt functions function crep { condir; grep -R $* * } ## end crep command Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
···date: 2012-09-17, Monday···from: Procházka Lukáš Ing. - Pontex s. r. o.··· Hello, 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g. Hi Lukáš, if you interpret “current Context commands” as “macros known to TeX”, you may try dumping the hashtable with these lines: ··· \starttext \startluacode table.print(tex.hashtokens()) \stopluacode \stoptext ··· It’s already sorted, too! Hth, Philipp context --list-of-commands Cmds.txt to produce Cmds.txt \startCAP \stopCAP \startCap \stopCap ... \writetoregister 2) The directory c:\Ctx-Beta\tex\texmf-context\context\data\textpad is empty (by default?). Its content: - is filled when context.exe is launched with a command/switch (if so, which command?), or - is filled when a newer version of ConTeXt is downloaded (if so, which extras - like first-setup.bat --extras=all --modules=all - should be specified to fill the directory)? TIA. Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgphCa0Ve1Rby.pgp Description: PGP signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Ctx: list of commands
On 17-9-2012 21:29, Philipp Gesang wrote: ···date: 2012-09-17, Monday···from: Procházka Lukáš Ing. - Pontex s. r. o.··· Hello, 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g. Hi Lukáš, if you interpret “current Context commands” as “macros known to TeX”, you may try dumping the hashtable with these lines: ··· \starttext \startluacode table.print(tex.hashtokens()) \stopluacode \stoptext ··· or \enabledirectives[system.dumphash] \enabledirectives[system.dumpdelta] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___