* Synctex + Sumatra + TextPad
@ 2018-08-21 19:23 Procházka Lukáš Ing.
2018-08-21 20:56 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Procházka Lukáš Ing. @ 2018-08-21 19:23 UTC (permalink / raw)
To: ConTeXt
Hello,
this question extends the "[NTG-context] future versions - synctex" thread.
I'm using TextPad for editing Ctx source files, PdfXChange Viewer to view PDFs, both on Windows.
After reading some recent posts and after studying some web sources - especially
[a] https://www.sumatrapdfreader.org/docs/DDE-Commands.html for SumatraPDF viever and
[b] https://tex.stackexchange.com/questions/116981/how-to-configure-texniccenter-2-0-with-sumatra-2013-2016-version/116994#116994 for inspiration how to make TXC interoperate with Sumatra,
I would like to provide "click-in-PDF-go-to-source" functionality - be Sumatra the viewer for this case.
Questions are:
1. How to run Sumatra so that it opens a PDF file AND reacts somehow to a mouse click, in order to provide a command to get to the corresponding place in the source file?
(IIUC, Sumatra provides such functionality, as e.g. TeXnic Center use it. [b].)
I guess that I have to configure Sumatra somehow, or to launch Sumatra with some command line parameters, so that when I click a point in the PDF (maybe while also holding CTRL or something - but it is a detail), a command is launched to open the source file in the editor and go to a particular line.
2. What should be the command line parameters passed to Sumatra to provide the linkage "open PDF-source at line"?
I deduce also that such command should call "mtxrun --script synctex" somehow (which will call "...\tex\texmf-context\scripts\context\lua\mtx-synctex.lua") as the "mtx-synctex" is able to read the .synctex produced during compilation of .tex files.
I deduce also that "mtx-synctex" calls the editor (which the user uses to edit source files) in the manner that it tells the editor "open file (...) and go to line (...).
Existing "mtx-synctex" is "aware" of "scite" editor, which is - next to "console" - the only editor pre-configured.
So:
3. What code should be added into "mtx-synctex" in order to make TextPad an editor known to "mtx-synctex"?
I found and tried that command e.g. 'C:\Program Files\TextPad 7\system\ddeopn32.exe" TextPad.dde Test.mkiv(40)' successfully opens "Test.mkiv" (being open before) and scrolls to line #40.
(TextPad location may vary - depending on version installed - can be e.g.:
C:\Program Files\TextPad 7
C:\Program Files (x86)\TextPad 7
C:\Program Files\TextPad 8
...
)
Any idea would be appreciated...
Best regards,
Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Synctex + Sumatra + TextPad
2018-08-21 19:23 Synctex + Sumatra + TextPad Procházka Lukáš Ing.
@ 2018-08-21 20:56 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2018-08-21 20:56 UTC (permalink / raw)
To: mailing list for ConTeXt users, Procházka Lukáš Ing.
On 8/21/2018 9:23 PM, Procházka Lukáš Ing. wrote:
> Hello,
>
> this question extends the "[NTG-context] future versions - synctex" thread.
>
> I'm using TextPad for editing Ctx source files, PdfXChange Viewer to
> view PDFs, both on Windows.
>
> After reading some recent posts and after studying some web sources -
> especially
>
> [a] https://www.sumatrapdfreader.org/docs/DDE-Commands.html for
> SumatraPDF viever and
>
> [b]
> https://tex.stackexchange.com/questions/116981/how-to-configure-texniccenter-2-0-with-sumatra-2013-2016-version/116994#116994
> for inspiration how to make TXC interoperate with Sumatra,
dunno
> I would like to provide "click-in-PDF-go-to-source" functionality - be
> Sumatra the viewer for this case.
>
> Questions are:
>
> 1. How to run Sumatra so that it opens a PDF file AND reacts somehow to
> a mouse click, in order to provide a command to get to the corresponding
> place in the source file?
>
> (IIUC, Sumatra provides such functionality, as e.g. TeXnic Center
> use it. [b].)
>
> I guess that I have to configure Sumatra somehow, or to launch Sumatra
> with some command line parameters, so that when I click a point in the
> PDF (maybe while also holding CTRL or something - but it is a detail), a
> command is launched to open the source file in the editor and go to a
> particular line.
from the workflow manual:
Of course you need to configure the viewer to respond to the request for
editing. In Sumatra combined with SciTE the magic command is:
c:\data\system\scite\wscite\scite.exe "%f" "-goto:%l"
> 2. What should be the command line parameters passed to Sumatra to
> provide the linkage "open PDF-source at line"?
config file
> I deduce also that such command should call "mtxrun --script synctex"
> somehow (which will call
> "...\tex\texmf-context\scripts\context\lua\mtx-synctex.lua") as the
> "mtx-synctex" is able to read the .synctex produced during compilation
> of .tex files.
no, because the lib is hard coded in the sumatra bin so you need to
cross your fingers
> I deduce also that "mtx-synctex" calls the editor (which the user uses
> to edit source files) in the manner that it tells the editor "open file
> (...) and go to line (...).
> Existing "mtx-synctex" is "aware" of "scite" editor, which is - next to
> "console" - the only editor pre-configured.
pdf viewers use the lib .. what we're discussing is hwo to make them
call a program instead
> 3. What code should be added into "mtx-synctex" in order to make TextPad
> an editor known to "mtx-synctex"?
dunno, i never used textpad 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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-21 20:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21 19:23 Synctex + Sumatra + TextPad Procházka Lukáš Ing.
2018-08-21 20:56 ` Hans Hagen
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).