From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112930 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jbf via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Getting Textadept to open pdf? Date: Mon, 27 Sep 2021 16:05:13 +1000 Message-ID: References: <54f726ca-05e3-83fa-12fd-161f9b64e0b1@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1794978303993518784==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33314"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: jbf , mailing list for ConTeXt users To: "Jairo A. del Rio" Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 27 08:06:00 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUjm3-0008KX-P9 for gctc-ntg-context-518@m.gmane-mx.org; Mon, 27 Sep 2021 08:05:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5F66E2877DB; Mon, 27 Sep 2021 08:05:25 +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 HpX4ECM5cIrJ; Mon, 27 Sep 2021 08:05:23 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4C3FD287A73; Mon, 27 Sep 2021 08:05:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1AF08280455 for ; Mon, 27 Sep 2021 08:05:21 +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 oHLwsL9mMeUn for ; Mon, 27 Sep 2021 08:05:19 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.216.49; helo=mail-pj1-f49.google.com; envelope-from=roma83537@gmail.com; receiver= Original-Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9509F73B for ; Mon, 27 Sep 2021 08:05:19 +0200 (CEST) Original-Received: by mail-pj1-f49.google.com with SMTP id me1so11650621pjb.4 for ; Sun, 26 Sep 2021 23:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=xE4HGK8rYbx9CxSZDh8IqrHDr7XCSVfKiEkWZRxKHT0=; b=pR8rhCjiAD0yfhxfL+4YC6G7kf3J1+LU1UCV4IfUMqt3VTnbP+VpPT0DgX2PIgFgSs +eoGEfgh0zwnv5Q1ME8dta1JqJkDX7VH367s/mQ1a9uPeGI7PMUp8A0cf4GhplMsEFey GssZZRcaCjq89oZFKUJtXUui1qIzElzEXsb5vZ7yFtXhC3MzX/T6RT191p4eM2xHrO7+ coK9kmeRYidfbN5OK2vqeEtmGOKnin5JERJgDahitRF0qaqqLMyv2LSoU9ayQnApB3y2 LLkZDnslgqpn6MhL3qJMir69tyFS4iC5/nL5YaBV3AVoFyG0nqAAB8p3hbDNa9X23fzg Kxlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=xE4HGK8rYbx9CxSZDh8IqrHDr7XCSVfKiEkWZRxKHT0=; b=o2rtLM4g/m+tJ2UdWBYCUoJOmkXEuBEI+Rd/culK7vpkjDZw2IuMOumcvDwPXLkRi6 Tx4JvxbDxeY6LhZJitPmve8AWroPFxwCh371cn/2ZauDqM3L0wSypI8UEcVHwd+oxQea L/E2zU0D9eu3eo2T9t1JID1FNnGxw+v4J9LE9WB6DYyXhCBKpLIdFP5TbxMW7orM/o8g l068VYjVkEkM1GIbYOs27JPNM+qRQ4desZx6QMcEDY8z7b04sWYDFwjNaghzSbF12M8w 0WVDvQIU0gz4O9cvVGxMA/gbeGogE6hUFXEoy/wsULLEPnB9ujGv/fZJ9pY/GEpiedKj gT+Q== X-Gm-Message-State: AOAM533ktzVqbBhwk2gL/reS9RjVPIvv+WHCKA2jxXP2PPYrKrXeyn3s 9hjvdcgrHsaQZ2rWXk3s1cBzwKZwbJE= X-Google-Smtp-Source: ABdhPJxg+mKVPjXgvZlQ9nY8IAKzAh9gTveDoyIdzw7nAD7IlswCmSQzwpbhiv8orYFCMM8tOlf7ag== X-Received: by 2002:a17:90a:1904:: with SMTP id 4mr17808157pjg.190.1632722717353; Sun, 26 Sep 2021 23:05:17 -0700 (PDT) Original-Received: from [192.168.0.100] ([120.21.102.112]) by smtp.gmail.com with ESMTPSA id n22sm17505471pgc.55.2021.09.26.23.05.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Sep 2021 23:05:17 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:112930 Archived-At: This is a multi-part message in MIME format. --===============1794978303993518784== Content-Type: multipart/alternative; boundary="------------9637BEDA27E346EEA0F5976A" Content-Language: en-US This is a multi-part message in MIME format. --------------9637BEDA27E346EEA0F5976A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Thanks, I reinstalled a later version of Textadept. I notice that it now opens the pdf product but in Xreader, the default on my machine, and that's no real problem, but now that I have got it working I can experiment a bit. Interesting, though, that the changes I made at your suggestion in l-pdfview.lua are not effective (I would have expected it to be okular). But I guess there is no harm done. Julian On 27/9/21 1:41 pm, Jairo A. del Rio wrote: > > > El dom, 26 de sep. de 2021 a la(s) 22:29, jbf (roma83537@gmail.com > ) escribió: > > Hmm. I'm not using evince (could, I suppose) but I see that in the > file you mention there is already: > > ['okular']    = [[okular --unique "%filename%"]], and I have > already adapted the init.lua file in /.texadept to use okular > rather than sumatra, with textadept.run.compile_commands.tex = > '/home/me/bin/context/tex/texmf-linux-64/bin/mtxrun --autogenerate > --script context --autopdf=okular "%f"' > > So, following your logic, I should then only need to add, further > on, pdfview.method = "okular", which I have done, but still no joy. > > In such a case, you only need to comment on the second option, i. e. > Sumatra: > >     --The last one wins >     pdfview.method = "okular" >     --pdfview.method = "sumatra" -- faster and more complete > > I haven't edited textadept settings btw, so it works for me with > --autopdf alone. > > Julian > > > On 27/9/21 1:06 pm, Jairo A. del Rio wrote: >> Hi. Maybe there's an easier way to do it without changing any >> file or via mtxrun's command line, but the following is what I do: >> >> In l-pdfview.lua (mkiv folder, lines from 38) PDF view options >> are available. I've added >> >> ['evince']    = [[evince "%filename%"]] -- My favorite viewer >> >> And then, after pdfview.method assignments, >> >> pdfview.method = "evince" >> >> Now textadept opens the .tex file once compiled. I don't know if >> making the format again is mandatory, but it doesn't hurt, >> anyways. I hope this helps. >> Best regards, >> >> Jairo >> >> >> >> El dom, 26 de sep. de 2021 a la(s) 20:54, jbf via ntg-context >> (ntg-context@ntg.nl ) escribió: >> >> The occasional response to a similar question can be found, >> e.g. on >> stackexchange, but none of the responses work for me. >> >> Textadept is very fast at compiling (and does compile >> correctly). I can >> certainly open the pdf independently in various pdf viewers, >> but I >> cannot get Textadept to automatically open, say, Okular >> (installed on >> Linux Mint), at the end of the process. >> >> The last part of the log reads: >> >> mkiv lua stats  > runtime: 0.640 seconds, 8 processed pages, >> 8 shipped >> pages, 12.492 pages/second >> mtx-context     | pdfview methods: auto default okular pdfxcview >> sumatra, current method: okular (directives_pdfview_method) >> pdfview         | command: okular --unique "test1.pdf" >> 1>/dev/null >> 2>/dev/null & >> mtx-context     | pdfview overhead: 0.001 seconds >> system          | total runtime: 0.649 seconds of 0.701 seconds >> >>  > exit status: 0 >> >> Have tried setting up a custom text editor on okular with: >> /home/me/.textadept "%f" -e >> textadept.editing.goto_line(%l-1), as >> suggested by one response, but to no avail. Current version >> of ConTeXt >> is 2021.09.17 10:01 >> >> Anyone tried Textadept successfully and might have a suggestion? >> >> Julian >> >> ___________________________________________________________________________________ >> 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 >> ___________________________________________________________________________________ >> --------------9637BEDA27E346EEA0F5976A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Thanks, I reinstalled a later version of Textadept. I notice that it now opens the pdf product but in Xreader, the default on my machine, and that's no real problem, but now that I have got it working I can experiment a bit. Interesting, though, that the changes I made at your suggestion in l-pdfview.lua are not effective (I would have expected it to be okular). But I guess there is no harm done.

Julian

On 27/9/21 1:41 pm, Jairo A. del Rio wrote:


El dom, 26 de sep. de 2021 a la(s) 22:29, jbf (roma83537@gmail.com) escribió:

Hmm. I'm not using evince (could, I suppose) but I see that in the file you mention there is already:

['okular']    = [[okular --unique "%filename%"]], and I have already adapted the init.lua file in /.texadept to use okular rather than sumatra, with textadept.run.compile_commands.tex = '/home/me/bin/context/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context --autopdf=okular "%f"'

So, following your logic, I should then only need to add, further on, pdfview.method = "okular", which I have done, but still no joy.

In such a case, you only need to comment on the second option, i. e. Sumatra:
   
    --The last one wins
    pdfview.method = "okular"
    --pdfview.method = "sumatra" -- faster and more complete

I haven't edited textadept settings btw, so it works for me with --autopdf alone.

Julian


On 27/9/21 1:06 pm, Jairo A. del Rio wrote:
Hi. Maybe there's an easier way to do it without changing any file or via mtxrun's command line, but the following is what I do:

In l-pdfview.lua (mkiv folder, lines from 38) PDF view options are available. I've added

['evince']    = [[evince "%filename%"]] -- My favorite viewer

And then, after pdfview.method assignments,

pdfview.method = "evince"

Now textadept opens the .tex file once compiled. I don't know if making the format again is mandatory, but it doesn't hurt, anyways. I hope this helps.
Best regards,

Jairo



El dom, 26 de sep. de 2021 a la(s) 20:54, jbf via ntg-context (ntg-context@ntg.nl) escribió:
The occasional response to a similar question can be found, e.g. on
stackexchange, but none of the responses work for me.

Textadept is very fast at compiling (and does compile correctly). I can
certainly open the pdf independently in various pdf viewers, but I
cannot get Textadept to automatically open, say, Okular (installed on
Linux Mint), at the end of the process.

The last part of the log reads:

mkiv lua stats  > runtime: 0.640 seconds, 8 processed pages, 8 shipped
pages, 12.492 pages/second
mtx-context     | pdfview methods: auto default okular pdfxcview
sumatra, current method: okular (directives_pdfview_method)
pdfview         | command: okular --unique "test1.pdf" 1>/dev/null
2>/dev/null &
mtx-context     | pdfview overhead: 0.001 seconds
system          | total runtime: 0.649 seconds of 0.701 seconds

 > exit status: 0

Have tried setting up a custom text editor on okular with:
/home/me/.textadept "%f" -e textadept.editing.goto_line(%l-1), as
suggested by one response, but to no avail. Current version of ConTeXt
is 2021.09.17 10:01

Anyone tried Textadept successfully and might have a suggestion?

Julian

___________________________________________________________________________________
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
___________________________________________________________________________________
--------------9637BEDA27E346EEA0F5976A-- --===============1794978303993518784== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1794978303993518784==--