From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101670 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Textadept with ConTeXt Date: Tue, 21 Aug 2018 11:32:44 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2548682729007161944==" X-Trace: blaine.gmane.org 1534843884 2223 195.159.176.226 (21 Aug 2018 09:31:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Aug 2018 09:31:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 21 11:31:20 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs30R-0000Qw-5t for gctc-ntg-context-518@m.gmane.org; Tue, 21 Aug 2018 11:31:19 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3A71E53E51; Tue, 21 Aug 2018 11:33:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jmjkSGoK7fSB; Tue, 21 Aug 2018 11:33:09 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5613353E4B; Tue, 21 Aug 2018 11:33:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8C0CA53E4B for ; Tue, 21 Aug 2018 11:33:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t7n2b6Kqot2h for ; Tue, 21 Aug 2018 11:33:07 +0200 (CEST) Original-Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id A8A5853E48 for ; Tue, 21 Aug 2018 11:32:57 +0200 (CEST) Original-Received: by mail-wr1-f45.google.com with SMTP id a108-v6so12602560wrc.13 for ; Tue, 21 Aug 2018 02:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=RG9zk5sT2iw8oYnVM+ybwOuwr1apeSdN+rSz764NujY=; b=mnUbRbCXuINXVdCjfF7RXuhBJmXhkVByextKMOPO/UkD2BJff38n6jiyJorf6L6Ta9 v0XW4e81PGIf2EOuTf3qhkuZYWVzXJyca2c3Sb5JBXzo9ph8fKEkyHHY+324KKE5R1yv 6O7BAslE+S1EyifI1i1gFKtAgJ20NeZM+aQgr1xziW3bIqj2MtUJVEoc8xA93nwQlCbw K64aFwZUKa5V8dKsei03rRTk+S3jsUcyd3oUBSSQ1Nf7FqaqOADCKeUxD7n/BwyUtj3n Up1UqHdhGSWvYhSwUSe7DXNP7DrDzngyngAqbH04j50bANt6J7Lvg78WEpm1o7oXERGK SosQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=RG9zk5sT2iw8oYnVM+ybwOuwr1apeSdN+rSz764NujY=; b=CC6HWuvwKLUrSv5HV7k4idG2EslqQCvx+j8VeEuPKRosX7hCQcAMYQU+Q2F1rO6vOe h8ssiyyvi4/0d0GZkQ3UIqeSg8OHC6DbLq/AuScCO0cXylGpkfwhduu9E5Ms73J6NgeW z9d7B7jjDr/PxYxQ6/SC7HCIgPO6OINrFgRCX8pLjUGTz1AFhFS2BF2raWhIZtYBJqlF rDc2ewmcHstSf3IpGmsL//mOaCa5bX/0AtKkBOln+Lf8kmdwv9zUOQrAfFefO0fJ2GeW WFm8whYAyb/LHbqvC60IXs6Jt8d/Ff9Ckgt6G11w+hmti8PoCi4NXSlNN3WsUA1eHm0i zPXg== X-Gm-Message-State: APzg51BO+g0NAHUcV5yNv7+qkYexnFpLVSzFYQ++Ptlbu3yJz/hBoH2X AYzwrhCUu2E8H/7o3V5iQZAik7nyKDK6EuHQKwzqt79H X-Google-Smtp-Source: ANB0VdaT8inxCE50N3jKmIIvaa9b7PV2Ax8bQ/8X9eMh71hVIxkiZx/eMPtT0qmJ/6uiCwkQCDCwDXZqPZG1DQlfws8= X-Received: by 2002:a5d:4452:: with SMTP id x18-v6mr8083975wrr.227.1534843977002; Tue, 21 Aug 2018 02:32:57 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:101670 Archived-At: --===============2548682729007161944== Content-Type: multipart/alternative; boundary="00000000000008f47f0573eeb64d" --00000000000008f47f0573eeb64d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 ma= in > 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 =3D '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 th= e > reason: > synctex =3D -1 -> synctex=3D-1 > Here is the content of my init.lua : textadept.run.compile_commands.tex =3D 'mtxrun --autogenerate --script context --autopdf --purge "%f"' textadept.file_types.extensions.tex =3D 'context' buffer:set_theme('dark', {font =3D 'Monospace', fontsize =3D 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=C3=BBt 2018 =C3=A0 02:00, Lars a =C3=A9= 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 confi= g > 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 =3D 'mtxrun --autogenerate --script > context --autopdf --purge --synctex =3D -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 ma= in > 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 =3D '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 th= e > reason: > synctex =3D -1 -> synctex=3D-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 =3D 'context' > % If you're using LaTeX too, you should choose another extension. > textadept.file_types.extensions.mkii =3D 'context' > textadept.file_types.extensions.mkiv =3D '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 vi= a > "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-co= ntext > 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 > > _________________________________________________________________________= __________ --00000000000008f47f0573eeb64d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 mai= n folder after extraction unless you want to read other config files like the ConTeXt lexer (see below).
=C2=A0
=
Of course !
=C2=A0


Second, I am using Win10x64 with SumatraPDF as viewer, it's fast an= d 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 =3D 'mtx= run --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:
s= ynctex =3D -1=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 ->=C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 synctex=3D-1

=C2=A0Here is the content of my init.lua :


textadept= .run.compile_commands.tex =3D 'mtxrun --autogenerate --script context -= -autopdf --purge "%f"'

textadept.file_types.exte= nsions.tex =3D 'context'


buffer:set_theme('dark'= , {font =3D 'Monospace', fontsize =3D 14})



When I compile a f= ile 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 openi= ng of this file after compilation. Here's what I get in the mes= sages tab :

mtx-conte= xt | pdfview method= s: auto default okular pdfxcview sumatra, current method: sumatra (directiv= es_pdfview_method)
pdfview | command: wine "sumatrapdf.exe" -reuse-instance -bg-colo= r 0xCCCCCC "wolfgang-1.pdf" 1> / dev / null 2> / dev / null= &
system | total runtime: 1.624 seconds

If I compile a second time, still no auto= matic output from the file test.pdf.
=C2=A0On the oth= er hand, if I do Crtl + R test.tex, the file test.pdf opens with xdg-open :=

> exit status: 0
<= /span>> xdg-ope= n "wolfgang-1.pdf"
Fil= e name empty!
The specified Application package is not valid.
/ usr / bin / xdg-open: line 881: x-www-browser: command not found
<= /span>> exit status: 0
=


Thanks
Fabrice


Le=C2=A0mar. 21 ao=C3=BBt 2018 =C3=A0=C2=A002:00, Lars &= lt;axteffekt@gmail.com> a =C3= =A9crit=C2=A0:
=20 =20 =20

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 i= t 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 0= 0:55 schrieb Fabrice Couvreur:
=20
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 =3D 'mtxrun --autogenerate --script context --autopdf --purge --synctex =3D -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 mai= n 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 an= d 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 =3D 'mtx= run --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 =3D -= 1=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 ->=C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 synctex=3D-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 =3D 'context'
% If you're using LaTeX too, you should choose another extension.

textadept.file_types.extensions.mkii =3D 'context'
textadept.file_types.extensions.mkiv =3D '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 &qu= ot;text" or anything like that, then choose the context lexer via "Buffer" -> &q= uot;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 t=
he Wiki!

maillist : ntg-context@ntg.nl / <=
a class=3D"m_-1177862309176508154moz-txt-link-freetext" href=3D"http://www.=
ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank">http://www.ntg.nl/ma=
ilman/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 t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--00000000000008f47f0573eeb64d-- --===============2548682729007161944== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============2548682729007161944==--