Re: [NTG-context] Official file ending?

2020-02-04 Thread Philipp A.
Thank you all! What is lmtx? Is there any link with infos?

Am Di., 4. Feb. 2020 um 00:53 Uhr schrieb Floris van Manen :

>
>
> On 04-02-2020 00:31, Exp wrote:
> >
> > Mkiv is a good choice for the moment. If there would be no Mkvi and so
> > on, it is good forever.
>
> .tex is used for both tex (as well as latex as well as other wrappers).
>
> how about for the new context era:
> .lmtx
>
>
> .F
>
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Official file ending?

2020-02-04 Thread Pablo Rodriguez
On 2/4/20 4:15 PM, Philipp A. wrote:
> Thank you all! What is lmtx? Is there any link with infos?

Dear Philipp,

LuaMetaTeX is LuaTeX developed only for ConTeXt.

More infos:

  https://mailman.ntg.nl/pipermail/ntg-context/2019/094476.html
  https://mailman.ntg.nl/pipermail/ntg-context/2019/094488.html

I hope it helps,

Pablo
--
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] How to approach a ConTeXt language server?

2020-02-04 Thread Philipp A.
Language servers are the new big deal in editor and IDE development:
https://langserver.org/

It would be cool to have a ConTeXt one for autocompletion (for ConTeXt:
command names, \cite IDs, labels, named parameters, …), go-to-definition,
hover information (docs about a command) and so on.
The way it works is that you have a server process that is the source of
truth for all this information, and the editor passes requests to it.
The editor tells the server when it opens/closes files and when the user
requests something of the above.

The way I’d implement it in ConTeXt is to keep a list of open ConTeXt
projects in the server (obtained by following \include, \component,
\product, \environment, \project).
Now my questions begin:

   1. Then I’d make context load the project without compiling it to a PDF
   but make it execute some Lua (how do I do this?)
   2. I’d need a way to get all available commands with their signatures
   into Lua. I assume this is done here, but how?
   http://www.pragma-ade.nl/general/qrcs/setup-en.pdf
   3. Optimally, for hover information and completion, I’d want some
   help/doc text for each command that has some. Is there a way to get it?
   4. Optimally, for label autocompletion, I’d also like a list of defined
   labels. Since I played around with bibliographies I already know how to
   query the bibliography DB from Lua.
   5. Optimally I’d also want some parse tree of each document, but I
   assume the way macros work, this doesn’t exist? This would make things
   easier that I’d otherwise have to (imperfectly) parse out of the document
   (due to things like catcode changes, but I guess I can pretend they don’t
   exist and \unprotect is always on)
   6. Optimally, for go-to-definition, I’d also want a list of files
   ConTeXt loaded so I can find definitions in it.

Can anyone help me, especially with 1-2? To get me started, it would be
great to have an example script and a command line to invoke it, which
makes ConTeXt load a main tex file, execute some Lua, and exit without
creating a document or writing anything else to the channel Lua writes to
(stdout?).

Best, Philipp
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Official file ending?

2020-02-04 Thread Pablo Rodriguez
On 2/3/20 3:28 PM, Hans Hagen wrote:
> On 2/3/2020 3:07 PM, Philipp A. wrote:
>> Hi!
>>
>> Most text editors have LaTeX specific syntax highlighting, so it makes
>> sense to give your ConTeXt file a ending it can be distinguished with.
>> Is there a blessed one?
>>
>>   * .ctx: Would mirror the semi-common .ltx, but is used for XML files
>> inside of ConTeXt itself
>
> context ctx files are xml files indeed
>
>>   * .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would it make
>> sense to give text documents that extension?
>
> you can do that (or mkvi or lmtx or ...)

Since there are already *.mkxl files in the ConTeXt distribution, I
think it may make sense to name the LMTX version MkXL.

In any case, MkXL is simpler and clearer that MkIV with LMTX.

Pablo
--
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to approach a ConTeXt language server?

2020-02-04 Thread Henning Hraban Ramm

> Am 2020-02-04 um 16:45 schrieb Philipp A. :
> 
> Language servers are the new big deal in editor and IDE development: 
> https://langserver.org/
> 
> It would be cool to have a ConTeXt one for autocompletion (for ConTeXt: 
> command names, \cite IDs, labels, named parameters, …), go-to-definition, 
> hover information (docs about a command) and so on.
> The way it works is that you have a server process that is the source of 
> truth for all this information, and the editor passes requests to it.
> The editor tells the server when it opens/closes files and when the user 
> requests something of the above.
> 
> The way I’d implement it in ConTeXt is to keep a list of open ConTeXt 
> projects in the server (obtained by following \include, \component, \product, 
> \environment, \project).
> Now my questions begin:
>   • Then I’d make context load the project without compiling it to a PDF 
> but make it execute some Lua (how do I do this?)
>   • I’d need a way to get all available commands with their signatures 
> into Lua. I assume this is done here, but how? 
> http://www.pragma-ade.nl/general/qrcs/setup-en.pdf

Look for the interface files i-*.xml

>   • Optimally, for hover information and completion, I’d want some 
> help/doc text for each command that has some. Is there a way to get it?

No, there isn’t. It could be in the interface files if someone would put in the 
work.

>   • Optimally, for label autocompletion, I’d also like a list of defined 
> labels. Since I played around with bibliographies I already know how to query 
> the bibliography DB from Lua.
>   • Optimally I’d also want some parse tree of each document, but I 
> assume the way macros work, this doesn’t exist? This would make things easier 
> that I’d otherwise have to (imperfectly) parse out of the document (due to 
> things like catcode changes, but I guess I can pretend they don’t exist and 
> \unprotect is always on)

You could run ConTeXt and use the export XML.

>   • Optimally, for go-to-definition, I’d also want a list of files 
> ConTeXt loaded so I can find definitions in it.
> Can anyone help me, especially with 1-2? To get me started, it would be great 
> to have an example script and a command line to invoke it, which makes 
> ConTeXt load a main tex file, execute some Lua, and exit without creating a 
> document or writing anything else to the channel Lua writes to (stdout?).

Look at the .tuc file that’s created in a ConTeXt run, it’s a Lua table and 
contains “all“ the information about the project.


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Official file ending?

2020-02-04 Thread kaddour kardio
Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate to
got the "dot tex" than latex :)

Le mar. 4 févr. 2020 à 17:57, Pablo Rodriguez  a écrit :

> On 2/3/20 3:28 PM, Hans Hagen wrote:
> > On 2/3/2020 3:07 PM, Philipp A. wrote:
> >> Hi!
> >>
> >> Most text editors have LaTeX specific syntax highlighting, so it makes
> >> sense to give your ConTeXt file a ending it can be distinguished with.
> >> Is there a blessed one?
> >>
> >>   * .ctx: Would mirror the semi-common .ltx, but is used for XML files
> >> inside of ConTeXt itself
> >
> > context ctx files are xml files indeed
> >
> >>   * .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would it make
> >> sense to give text documents that extension?
> >
> > you can do that (or mkvi or lmtx or ...)
>
> Since there are already *.mkxl files in the ConTeXt distribution, I
> think it may make sense to name the LMTX version MkXL.
>
> In any case, MkXL is simpler and clearer that MkIV with LMTX.
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Official file ending?

2020-02-04 Thread Henning Hraban Ramm

> Am 2020-02-04 um 20:27 schrieb kaddour kardio :
> 
> Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate to got 
> the "dot tex" than latex :) 

I’d suggest to start a war to claim it…

HR
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Official file ending?

2020-02-04 Thread Floris van Manen


On 04-02-2020 20:39, Henning Hraban Ramm wrote:
> I’d suggest to start a war to claim it…

we already have it ;-)

.F


pEpkey.asc
Description: application/pgp-keys
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___