ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Textadept with ConTeXt
Date: Tue, 21 Aug 2018 11:32:44 +0200	[thread overview]
Message-ID: <CACyK-eoX+v_6f2e4rfyzzAH_93ec4x1B1bW69OSqXoYTrXifWw@mail.gmail.com> (raw)
In-Reply-To: <e152be80-4afd-f497-2ee1-aa1182437e1f@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 6939 bytes --]

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 <axteffekt@gmail.com> a écrit :

> 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
>
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 15606 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2018-08-21  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 22:55 Fabrice Couvreur
2018-08-20 23:59 ` Lars
2018-08-21  7:06   ` Hans Hagen
2018-08-21  7:36     ` cryo shock
2018-08-21  8:33       ` cryo shock
2018-08-21  8:58         ` Hans Hagen
2018-08-21  9:32   ` Fabrice Couvreur [this message]
2018-08-21 13:55   ` Jan U. Hasecke
2018-08-21 14:14     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACyK-eoX+v_6f2e4rfyzzAH_93ec4x1B1bW69OSqXoYTrXifWw@mail.gmail.com \
    --to=fabrice1.couvreur@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).