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
___________________________________________________________________________________