Hello, In order to use another editor than Emacs and after testing Scite, I installed Textadept and modified the init.lua file as follows : textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge --synctex = -1 "% f"' The compilation works but no automatic output in pdf at the end of the process (as with Scite !) What to do with files in /home /aragorn/context/tex /texmf-context/context/data /textadept/ context/ ? Thank you. Fabrice
Hi there, thanks for your interest in Textadept. It's a great editor and I am sure that you won't regret testing it and using it in the future. Just have some patience. I suggest you take a look at my User talk at the wiki, there I explain a lot about TA and how to use it with ConTeXt. It's more detailed than the Textadept site on the wiki. http://wiki.contextgarden.net/User_talk:Koenich I have to say though that I wrote it with Windows in mind. But TA's config files are all written in Lua so the OS should not be a problem. Am 21/08/2018 um 00:55 schrieb Fabrice Couvreur:
Hello, In order to use another editor than Emacs and after testing Scite, I installed Textadept and modified the init.lua file as follows :
textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge --synctex = -1 "% f"'
First, only edit the init.lua in your USER folder, on Win it's C:\Users\NAME\.textadept\init.lua. Don't edit the init.lua within TA's main folder. In fact, there is no reason to enter TA's main folder after extraction unless you want to read other config files like the ConTeXt lexer (see below). Second, I am using Win10x64 with SumatraPDF as viewer, it's fast and you don't need to close documents to recompile. The biggest disadvantage is, that you can't use scripts with SumatraPDF (for forms etc.). Furthermore the following line I wrote into my init.lua: textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge "%f"' When I compile the PDF like this, Sumatra opens up as expected. On recompile it reloads the PDF. Maybe the spaces within your command are the reason: synctex = -1 -> synctex=-1 Third, is your ConTeXt folder within Search Path (I better ask)? *Fourth, did you bind extensions to the context.lua lexer?* In the init.lua it should look like this: textadept.file_types.extensions.tex = 'context' % If you're using LaTeX too, you should choose another extension. textadept.file_types.extensions.mkii = 'context' textadept.file_types.extensions.mkiv = 'context' *Fifth, is your context lexer loaded when you compile the file?* Check the status bar in the lower right corner. If it doesn't say "context" but "latex" or "text" or anything like that, then choose the context lexer via "Buffer" -> "Select lexer...". Sixth, make sure that you really have compilable content. Try with code which is as minimal as possible. A simple \starttext Hello World \stoptext should do.
The compilation works but no automatic output in pdf at the end of the process (as with Scite !)
What to do with files in /home /aragorn/context/tex /texmf-context/context/data /textadept/ context/ ?
You put them to your user folder, where your personal init.lua is stored. On Win it's C:\Users\NAME\.textadept\ Copy everything from context/ folder to there. Those files come with a init.lua so save yours if you made changes there. Also, and this is important: the TA config files that come with ConTeXt are for TA v9 only (at least until one week ago). They won't work with TA v10 until you update them. And even with TA v9 they change TA's behaviour significantly as they are for SciTE originally. I wrote something about them in my talk as well. I suggest you check it out. I hope that I could help you a little there. Cheers, L.
Thank you. Fabrice
___________________________________________________________________________________ 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 ___________________________________________________________________________________
On 8/21/2018 1:59 AM, Lars wrote:
Hi there, thanks for your interest in Textadept. It's a great editor and I am sure that you won't regret testing it and using it in the future. Just have some patience.
*Fifth, is your context lexer loaded when you compile the file?* Check the status bar in the lower right corner. If it doesn't say "context" but "latex" or "text" or anything like that, then choose the context lexer via "Buffer" -> "Select lexer...".
i played with it a few times but its biggest drawback is the lack of a fast and realtime console pane like scite has so i keep coming back to scite (on the contrary scite has the lpeg lexer extern and its lua is not shared with scites lua which is a drawback there) .. so currently i see ta as a fallback in the context distrubution there are actually files for textadept but because its (still?) a moving target with a changing interface i'm not sure if it works with the latest (it's btw one reason why the files that ship with context basically reset a lot of the fetaures because as usual with editors, they tend to add lots of key bindings and stuff not needed for tex and friends) anyway, ../context/data/textadept/context/textadept-context.cmd ../context/data/textadept/context/textadept-context.sh still work on my machine so ... it's kind of providing the same functionality as we use in scite. the lexer that we use in scite and textadept both use the textadept lexer dll (which plugs into scintilla) but because the lua code that came with it kept changing and i needed way better performance (for large files like char-def) than was possible at that time i also rewrote that code for our purpose (also because i wanted spell checking, utf and such) ... at some point the ta lexing method changed a bit so it became faster ... all such such lexers sort of follow the same approach, mark regions and associate them and we already had similar stuff on board in context so i could combine things a bit i think that the scite/ta lexers that we ship are quite ok (i've now used them for years) and they are probably better than the context lexer that comes with textadept, i.e. the context one supports a mix of tex, mp, lua etc, knows primitives, commands, helpers, and follows up on the way we have had syntax highlighting for decades which in turn closely relates to the way the context user interface evolved notepad++ does use the same scintilla editing framework but cannot load the lexer dll; it does bidi a bit better anyway, with both scite and ta i can gamble on two horses 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 -----------------------------------------------------------------
Thanks a lot!
Am Di., 21. Aug. 2018 um 09:06 Uhr schrieb Hans Hagen
On 8/21/2018 1:59 AM, Lars wrote:
Hi there, thanks for your interest in Textadept. It's a great editor and I am sure that you won't regret testing it and using it in the future. Just have some patience.
i played with it a few times but its biggest drawback is the lack of a fast and realtime console pane like scite has so i keep coming back to scite (on the contrary scite has the lpeg lexer extern and its lua is not shared with scites lua which is a drawback there) .. so currently i see ta as a fallback
in the context distrubution there are actually files for textadept but because its (still?) a moving target with a changing interface i'm not sure if it works with the latest (it's btw one reason why the files that ship with context basically reset a lot of the fetaures because as usual with editors, they tend to add lots of key bindings and stuff not needed for tex and friends)
anyway,
../context/data/textadept/context/textadept-context.cmd ../context/data/textadept/context/textadept-context.sh
still work on my machine so ... it's kind of providing the same functionality as we use in scite.
*Fifth, is your context lexer loaded when you compile the file?* Check the status bar in the lower right corner. If it doesn't say "context" but "latex" or "text" or anything like that, then choose the context lexer via "Buffer" -> "Select lexer...". the lexer that we use in scite and textadept both use the textadept lexer dll (which plugs into scintilla) but because the lua code that came with it kept changing and i needed way better performance (for large files like char-def) than was possible at that time i also rewrote that code for our purpose (also because i wanted spell checking, utf and such) ...
at some point the ta lexing method changed a bit so it became faster ... all such such lexers sort of follow the same approach, mark regions and associate them and we already had similar stuff on board in context so i could combine things a bit
i think that the scite/ta lexers that we ship are quite ok (i've now used them for years) and they are probably better than the context lexer that comes with textadept, i.e. the context one supports a mix of tex, mp, lua etc, knows primitives, commands, helpers, and follows up on the way we have had syntax highlighting for decades which in turn closely relates to the way the context user interface evolved
notepad++ does use the same scintilla editing framework but cannot load the lexer dll; it does bidi a bit better
anyway, with both scite and ta i can gamble on two horses
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 -----------------------------------------------------------------
Hi Hans,
Am Di., 21. Aug. 2018 um 09:36 Uhr schrieb cryo shock
Thanks a lot!
Am Di., 21. Aug. 2018 um 09:06 Uhr schrieb Hans Hagen
: On 8/21/2018 1:59 AM, Lars wrote:
Hi there, thanks for your interest in Textadept. It's a great editor and I am sure that you won't regret testing it and using it in the future. Just have some patience.
i played with it a few times but its biggest drawback is the lack of a fast and realtime console pane like scite has so i keep coming back to scite (on the contrary scite has the lpeg lexer extern and its lua is not shared with scites lua which is a drawback there) .. so currently i see ta as a fallback
You mentioned that before at some point, and I wouldn't argue with that, as you surely know best how to use an editor that helps you with your work. I don't know enough about Lua programming, so it's hard for me to tell whether the realtime console pane is realisable within TA. But I will ask Mitchell on TA mailing list what he thinks about it. I think it would be great if he could make a console pane possible, as I think that there is nothing worse than having to switch between programs because of the lack of features. in the context distrubution there are actually files for textadept but
because its (still?) a moving target with a changing interface i'm not sure if it works with the latest (it's btw one reason why the files that ship with context basically reset a lot of the fetaures because as usual with editors, they tend to add lots of key bindings and stuff not needed for tex and friends)
One month or so ago Mitchell released Textadept 10 which comes with some API changes. He wrote a Migration Guide from TA9 to 10 which can be found in the appendix of the TA online manual: https://foicica.com/textadept/manual.html#Migration.Guides So when using the ConTeXt TA package with TA10, TA pops up with many errors and is unusable until one deletes the files again. The files work with TA v9 without a problem though. Still I'd suggest to users who want to use the package to rename the init.lua that comes with CTX and then bind it within their own init.lua with require('context_init') -- exemplary file name If anything goes wrong then, users simply have to comment the line with Notepad and TA should work again.
anyway,
../context/data/textadept/context/textadept-context.cmd ../context/data/textadept/context/textadept-context.sh
still work on my machine so ... it's kind of providing the same functionality as we use in scite.
*Fifth, is your context lexer loaded when you compile the file?* Check the status bar in the lower right corner. If it doesn't say "context" but "latex" or "text" or anything like that, then choose the context lexer via "Buffer" -> "Select lexer...". the lexer that we use in scite and textadept both use the textadept lexer dll (which plugs into scintilla) but because the lua code that came with it kept changing and i needed way better performance (for large files like char-def) than was possible at that time i also rewrote that code for our purpose (also because i wanted spell checking, utf and such) ...
I am pretty sure that you know that already, but unexperienced readers might want to know that there is a Spell Checking module for TA which can be found under Modules in the TA wiki (it comes with only an english dictionary though): https://foicica.com/wiki/textadept
at some point the ta lexing method changed a bit so it became faster ... all such such lexers sort of follow the same approach, mark regions and associate them and we already had similar stuff on board in context so i could combine things a bit
i think that the scite/ta lexers that we ship are quite ok (i've now used them for years) and they are probably better than the context lexer that comes with textadept, i.e. the context one supports a mix of tex, mp, lua etc, knows primitives, commands, helpers, and follows up on the way we have had syntax highlighting for decades which in turn closely relates to the way the context user interface evolved
True indeed. I like your config settings when it comes to highlighting etc. Also they come with a lot of keywords. That's a big plus as well. But since the settings change a lot in TA, for example tabulation width, they are pretty unfriendly to non-programmers. For example I tried to change the behaviour of TA9 to wrap lines when a CTX file is loaded. I don't remember in which file I changed the setting, but it didn't make a difference. Lines didn't wrap, so I always had to change it manually. In the same file I changed tab width, this change on the other hand worked. And there comes the next tripping stone. The CTX settings come within many files with a strict hierarchy, so that beginners will have a hard time to achieve changes. The changes are overwhelming really, but it's worth getting used to them. So please don't get me wrong. I am thankful that CTX comes with settings for TA at all. It's ofc better than nothing. I just think that Lua makes it worthwhile for users to change settings by themselves, so they know how TA works in it's core. I'd love to add, that right now I am using one skin file, one custom CTX lexer (mod of the original TA lexer), a snippets file and two init.luas of which one I only load on my tablet to add some basic functionality to it's digital keyboard (which wasn't necessary in SciTE btw.) I think it looks great so far, although it surely could use some adjustments. [image: TAlexed.jpg] And I really miss your snippets amongst some other small things, but the longer one tries, the further he comes with adjusting TA to his likings.
notepad++ does use the same scintilla editing framework but cannot load the lexer dll; it does bidi a bit better
anyway, with both scite and ta i can gamble on two horses
Maybe in the future you'll have on horse that you can fully rely on. I wish it'd be TA IMHO. :) Just wanted to add my ideas to yours. Thanks for CTX, the TA settings and for reading this mail. Cheers, Lars.
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 -----------------------------------------------------------------
On 8/21/2018 10:33 AM, cryo shock wrote:
You mentioned that before at some point, and I wouldn't argue with that, as you surely know best how to use an editor that helps you with your work. I don't know enough about Lua programming, so it's hard for me to tell whether the realtime console pane is realisable within TA. But I will ask Mitchell on TA mailing list what he thinks about it. I think it would be great if he could make a console pane possible, as I think that there is nothing worse than having to switch between programs because of the lack of features.
I must admit that I'm not looking at more advanced editing as normally one uses a small subset of what an editor provides anyway. In that sense I have no real reason to switch (apart from cross platform editing).
One month or so ago Mitchell released Textadept 10 which comes with some API changes. He wrote a Migration Guide from TA9 to 10 which can be found in the appendix of the TA online manual:
Hm, I don't look forward to that. Especially because it's kind of hard to intercept error messages (on windows) when tweaking.
https://foicica.com/textadept/manual.html#Migration.Guides
So when using the ConTeXt TA package with TA10, TA pops up with many errors and is unusable until one deletes the files again. The files work with TA v9 without a problem though. Still I'd suggest to users who want to use the package to rename the init.lua that comes with CTX and then bind it within their own init.lua with
require('context_init') -- exemplary file name
If anything goes wrong then, users simply have to comment the line with Notepad and TA should work again.
I am pretty sure that you know that already, but unexperienced readers might want to know that there is a Spell Checking module for TA which can be found under Modules in the TA wiki (it comes with only an english dictionary though):
I don't now as I don't follow discussions (I'm only on a few context related mailing lists). And we need checking for more than english (as well as our own lists) + a bit more subtle indication of issues.
True indeed. I like your config settings when it comes to highlighting etc. Also they come with a lot of keywords. That's a big plus as well. But since the settings change a lot in TA, for example tabulation width, they are pretty unfriendly to non-programmers. For example I tried to change the behaviour of TA9 to wrap lines when a CTX file is loaded. I don't remember in which file I changed the setting, but it didn't make a difference. Lines didn't wrap, so I always had to change it manually. In the same file I changed tab width, this change on the other hand worked. And there comes the next tripping stone. The CTX settings come within many files with a strict hierarchy, so that beginners will have a hard time to achieve changes. The changes are overwhelming really, but it's worth getting used to them. So please don't get me wrong. I am thankful that CTX comes with settings for TA at all. It's ofc better than nothing.
Hm, I never wrap (i.e. I have my sources wrapped already) so I can't comment on that.
I just think that Lua makes it worthwhile for users to change settings by themselves, so they know how TA works in it's core. I'd love to add, that right now I am using one skin file, one custom CTX lexer (mod of the original TA lexer), a snippets file and two init.luas of which one I only load on my tablet to add some basic functionality to it's digital keyboard (which wasn't necessary in SciTE btw.) I think it looks great so far, although it surely could use some adjustments. TAlexed.jpg
All a matter of taste I guess. I mostly ship the lexers because they are sort of a reference for how i expect files to be highlighted. Also, the same highlighting can be used in typeset form. But every user has her/his own preference and "which is the best editor debates" are not something I'm interested in.
And I really miss your snippets amongst some other small things, but the longer one tries, the further he comes with adjusting TA to his likings.
I never use snippets (assuming they are what i think they are) because i can't remember shortcuts and keying in the few commands needed for structure can (in my case) be neglected compared to keying in content
Maybe in the future you'll have on horse that you can fully rely on. I wish it'd be TA IMHO. :)
Too much a moving (upward imcompatible) target I fear. I can't risk that for workflows where authors have to 'just install and run'.
Just wanted to add my ideas to yours. Thanks for CTX, the TA settings and for reading this mail. No problem.
(Maybe you can make a list of relevant differnces between TA 9 and 10 because otherwise I need a new stack of cd's to motivate me get me through the trial and error process (due to lack of lua console output).) 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 -----------------------------------------------------------------
Hello, Thanks for your help ! First, only edit the init.lua in your USER folder, on Win it's
C:\Users\NAME\.textadept\init.lua. Don't edit the init.lua within TA's main folder. In fact, there is no reason to enter TA's main folder after extraction unless you want to read other config files like the ConTeXt lexer (see below).
Of course !
Second, I am using Win10x64 with SumatraPDF as viewer, it's fast and you don't need to close documents to recompile. The biggest disadvantage is, that you can't use scripts with SumatraPDF (for forms etc.). Furthermore the following line I wrote into my init.lua:
textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge "%f"'
When I compile the PDF like this, Sumatra opens up as expected. On recompile it reloads the PDF. Maybe the spaces within your command are the reason: synctex = -1 -> synctex=-1
Here is the content of my init.lua : textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge "%f"' textadept.file_types.extensions.tex = 'context' buffer:set_theme('dark', {font = 'Monospace', fontsize = 14}) When I compile a file test.tex (Maj + Ctrl + R), I get the expected file test.pdf in my home directory; file that I open with Evince. What I would like, if possible, is an automatic opening of this file after compilation. Here's what I get in the messages tab : mtx-context | pdfview methods: auto default okular pdfxcview sumatra, current method: sumatra (directives_pdfview_method) pdfview | command: wine "sumatrapdf.exe" -reuse-instance -bg-color 0xCCCCCC "wolfgang-1.pdf" 1> / dev / null 2> / dev / null & system | total runtime: 1.624 seconds If I compile a second time, still no automatic output from the file test.pdf. On the other hand, if I do Crtl + R test.tex, the file test.pdf opens with xdg-open :
exit status: 0 xdg-open "wolfgang-1.pdf" File name empty! The specified Application package is not valid. / usr / bin / xdg-open: line 881: x-www-browser: command not found exit status: 0
Thanks
Fabrice
Le mar. 21 août 2018 à 02:00, Lars
Hi there, thanks for your interest in Textadept. It's a great editor and I am sure that you won't regret testing it and using it in the future. Just have some patience.
I suggest you take a look at my User talk at the wiki, there I explain a lot about TA and how to use it with ConTeXt. It's more detailed than the Textadept site on the wiki.
http://wiki.contextgarden.net/User_talk:Koenich I have to say though that I wrote it with Windows in mind. But TA's config files are all written in Lua so the OS should not be a problem.
Am 21/08/2018 um 00:55 schrieb Fabrice Couvreur:
Hello, In order to use another editor than Emacs and after testing Scite, I installed Textadept and modified the init.lua file as follows :
textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge --synctex = -1 "% f"'
First, only edit the init.lua in your USER folder, on Win it's C:\Users\NAME\.textadept\init.lua. Don't edit the init.lua within TA's main folder. In fact, there is no reason to enter TA's main folder after extraction unless you want to read other config files like the ConTeXt lexer (see below).
Second, I am using Win10x64 with SumatraPDF as viewer, it's fast and you don't need to close documents to recompile. The biggest disadvantage is, that you can't use scripts with SumatraPDF (for forms etc.). Furthermore the following line I wrote into my init.lua:
textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge "%f"'
When I compile the PDF like this, Sumatra opens up as expected. On recompile it reloads the PDF. Maybe the spaces within your command are the reason: synctex = -1 -> synctex=-1
Third, is your ConTeXt folder within Search Path (I better ask)?
*Fourth, did you bind extensions to the context.lua lexer?* In the init.lua it should look like this:
textadept.file_types.extensions.tex = 'context' % If you're using LaTeX too, you should choose another extension. textadept.file_types.extensions.mkii = 'context' textadept.file_types.extensions.mkiv = 'context'
*Fifth, is your context lexer loaded when you compile the file?* Check the status bar in the lower right corner. If it doesn't say "context" but "latex" or "text" or anything like that, then choose the context lexer via "Buffer" -> "Select lexer...".
Sixth, make sure that you really have compilable content. Try with code which is as minimal as possible. A simple
\starttext Hello World \stoptext
should do.
The compilation works but no automatic output in pdf at the end of the process (as with Scite !)
What to do with files in /home /aragorn/context/tex /texmf-context/context/data /textadept/ context/ ?
You put them to your user folder, where your personal init.lua is stored. On Win it's C:\Users\NAME\.textadept\ Copy everything from context/ folder to there. Those files come with a init.lua so save yours if you made changes there. Also, and this is important: the TA config files that come with ConTeXt are for TA v9 only (at least until one week ago). They won't work with TA v10 until you update them. And even with TA v9 they change TA's behaviour significantly as they are for SciTE originally. I wrote something about them in my talk as well. I suggest you check it out.
I hope that I could help you a little there.
Cheers, L.
Thank you. Fabrice
___________________________________________________________________________________ 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
___________________________________________________________________________________
Hi all! Thank you very much for hinting to Textadept. I'll test the editor. One question: If I source "context/tex/setuptex" and start textadept from the shell, I can build a file with this configuration line in init.lua: textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge "%f"' How can I source the standalone installation setup from Textadepts init.lua? juh
On 8/21/2018 3:55 PM, Jan U. Hasecke wrote:
Hi all!
Thank you very much for hinting to Textadept. I'll test the editor.
One question:
If I source "context/tex/setuptex" and start textadept from the shell, I can build a file with this configuration line in init.lua:
textadept.run.compile_commands.tex = 'mtxrun --autogenerate --script context --autopdf --purge "%f"'
How can I source the standalone installation setup from Textadepts init.lua? if you install the old version (TA 9) then
textadept-context.cmd should just work ok ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
cryo shock
-
Fabrice Couvreur
-
Hans Hagen
-
Jan U. Hasecke
-
Lars