Hi all, Using TeXShop on a Mac (with Mac OS X 10.2) I noticed that some of my documents typeset with mkiv do not respond correctly regarding SyncTeX: when I do « Command-Click » on a specific part of the resulting PDF there is no reaction at all, that is I do not get to the corresponding part of the source TeX file. Nevertheless when I click in the source TeX file, SyncTeX shows the corresponding highlighted part of the PDF file. So my question is the following: is there some change in mkiv, or in the way TeXShop has to be tuned? The command I use to typeset is: context --synctex=1 --autogenerate "$1" —purgeall and the version of ConTeXt I have is ConTeXt ver: 2015.03.30 23:33 MKIV beta fmt: 2015.3.31 Thanks in advance for any help. OK
Otared Kavian schrieb:
Using TeXShop on a Mac (with Mac OS X 10.2) I noticed that some of my documents typeset with mkiv do not respond correctly regarding SyncTeX: when I do « Command-Click » on a specific part of the resulting PDF there is no reaction at all, that is I do not get to the corresponding part of the source TeX file. Nevertheless when I click in the source TeX file, SyncTeX shows the corresponding highlighted part of the PDF file.
So my question is the following: is there some change in mkiv, or in the way TeXShop has to be tuned?
I noticed something similar since about one or two years. Using SumatraPDF on Windows (together with Sublime or Notepad++) a sync from the editor to SumatraPDF results in the right higlighted section. However a sync the other way 'round is slightly off. It's more off the farther down I'm in the document. Best regards, Andreas
Hi Andreas, Thanks for your reply and your attention. Actually it seems that the way ConTeXt mkiv writes informations to the SyncTeX file has changed and the way it works i snot completely dependable. For instance sometimes the following \starttext \input knuth.tex \stoptex results in a PDF which, when clicked on with a modifier key (Command on Mac OS X) opens the source file knuth.tex. But the following simple example \starttext Hi there, can you show me this sentence in the source file? \stoptex Does nothing at all… So I am puzzled… Best regards: OK
On 06 Apr 2015, at 14:17, Andreas Schneider
wrote: Otared Kavian schrieb:
Using TeXShop on a Mac (with Mac OS X 10.2) I noticed that some of my documents typeset with mkiv do not respond correctly regarding SyncTeX: when I do « Command-Click » on a specific part of the resulting PDF there is no reaction at all, that is I do not get to the corresponding part of the source TeX file. Nevertheless when I click in the source TeX file, SyncTeX shows the corresponding highlighted part of the PDF file.
So my question is the following: is there some change in mkiv, or in the way TeXShop has to be tuned?
I noticed something similar since about one or two years. Using SumatraPDF on Windows (together with Sublime or Notepad++) a sync from the editor to SumatraPDF results in the right higlighted section. However a sync the other way 'round is slightly off. It's more off the farther down I'm in the document.
Best regards, Andreas ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Hi, SyncTeX usually works for me, but I need to use context --synctex ... (I don't know if --synctex=1 is supposed to work in ConTeX. I believe that Hans changed the syntax.) Enabling it inside the document doesn't work for me for some reason. Hans suggested to put the command inside the first line (modeline or however that one is called). But "context --synctex filename.tex" generally works. It is not as precise as it could be (it often knows only paragraphs, not individual lines or characters, but that's ok given how much extra info would be needed to store position of every character) and it doesn't know all the elements (text on metafun figures and other weird elements might not have a sync point), but I never experienced any really strange behaviour or positioning discrepancies. I'm using Skim.app. On Tue, Apr 7, 2015 at 9:20 AM, Otared Kavian wrote:
Hi Andreas,
Thanks for your reply and your attention. Actually it seems that the way ConTeXt mkiv writes informations to the SyncTeX file has changed and the way it works i snot completely dependable. For instance sometimes the following
\starttext \input knuth.tex \stoptex
results in a PDF which, when clicked on with a modifier key (Command on Mac OS X) opens the source file knuth.tex. But the following simple example
\starttext Hi there, can you show me this sentence in the source file? \stoptex
Does nothing at all…
So I am puzzled…
Did you actually forget a "t" at the end or did you just make an error when copy-pasting? Mojca
Hi Mojca, Thanks for your attention. I’ll do some testing with the syntax context —synctex istead of context —synctex=1 and then I’ll report any changes in the behaviour of SyncTeX. Actually if SyncTeX could find in the source a paragraph, or a sctructure like \startformula \stopformula that would be largely enough for most of us (when writing a maths, or physics, book or lecture notes often a formula or an expression is used several times and so finding a specigic one of them through a search in the sourec file is not really convenient). Regarding yoru observation for the missing « t » in \stoptext, I just made an error when copy-pasting… Usually I never forget the right syntax of \starttext\stoptext… Best regards: OK
On 07 Apr 2015, at 10:32, Mojca Miklavec
wrote: Hi,
SyncTeX usually works for me, but I need to use context --synctex ... (I don't know if --synctex=1 is supposed to work in ConTeX. I believe that Hans changed the syntax.)
Enabling it inside the document doesn't work for me for some reason. Hans suggested to put the command inside the first line (modeline or however that one is called).
But "context --synctex filename.tex" generally works. It is not as precise as it could be (it often knows only paragraphs, not individual lines or characters, but that's ok given how much extra info would be needed to store position of every character) and it doesn't know all the elements (text on metafun figures and other weird elements might not have a sync point), but I never experienced any really strange behaviour or positioning discrepancies. I'm using Skim.app.
On Tue, Apr 7, 2015 at 9:20 AM, Otared Kavian wrote:
Hi Andreas,
Thanks for your reply and your attention. Actually it seems that the way ConTeXt mkiv writes informations to the SyncTeX file has changed and the way it works i snot completely dependable. For instance sometimes the following
\starttext \input knuth.tex \stoptex
results in a PDF which, when clicked on with a modifier key (Command on Mac OS X) opens the source file knuth.tex. But the following simple example
\starttext Hi there, can you show me this sentence in the source file? \stoptex
Does nothing at all…
So I am puzzled…
Did you actually forget a "t" at the end or did you just make an error when copy-pasting?
Mojca ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 7 Apr 2015, at 10:32, Mojca Miklavec wrote:
Hi,
SyncTeX usually works for me, but I need to use context --synctex ... (I don't know if --synctex=1 is supposed to work in ConTeX. I believe that Hans changed the syntax.)
Enabling it inside the document doesn't work for me for some reason. Hans suggested to put the command inside the first line (modeline or however that one is called).
But "context --synctex filename.tex" generally works.
Yes, this is strange. `\enabledirectives [system.synctex]` works for me *if* it’s in the product file (no `--synctex` switch needed). It even works if it is not in the first line, for example: Product file: \startproduct pd-test \enabledirectives [system.synctex] \component 01-intro \stopproduct Component: \startcomponent 01-intro Hi there, can you show me this sentence in the source file? \stopcomponent But, indeed, it doesn’t work with single-file documents. -- Thomas
Hi Thomas, Mojca and Andreas, After playing with several options as either of you suggested, I ended up with the following setups which solve partially the misbehaviour of SyncTeX in mkiv. The solution works for with TeXShop on Mac OS X 10.10.2 and the latest standalone beta of ConTeXt. 1) I have in a file named mkiv.engine (which sits in the folder ) the following lines: #!/bin/bash export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH context --autogenerate "$1" —purgeall 2) As one may see I do not use the option —synctex in the above context call, since it doesn’t work correctly (beware the — shown is actually two hyphens {-}{-}…). 3) In the TeXShop Preferences, in the Typesetting pane, I have checked the radio button next to SyncTex (Tex ≥ 2010) as one may see on the attached screen capture. For now the syncing seems to work essentially fine (although it is not as precise as when using Plain TeX, or LaTeX, but probably this might be expected beacuse mkiv is more complex). Thanks to all of you! Best regards: OK
On 07 Apr 2015, at 16:33, Thomas Floeren
wrote: On 7 Apr 2015, at 10:32, Mojca Miklavec wrote:
Hi,
SyncTeX usually works for me, but I need to use context --synctex ... (I don't know if --synctex=1 is supposed to work in ConTeX. I believe that Hans changed the syntax.)
Enabling it inside the document doesn't work for me for some reason. Hans suggested to put the command inside the first line (modeline or however that one is called).
But "context --synctex filename.tex" generally works.
Yes, this is strange. `\enabledirectives [system.synctex]` works for me *if* it’s in the product file (no `--synctex` switch needed). It even works if it is not in the first line, for example:
Product file:
\startproduct pd-test \enabledirectives [system.synctex] \component 01-intro \stopproduct
Component:
\startcomponent 01-intro Hi there, can you show me this sentence in the source file? \stopcomponent
But, indeed, it doesn’t work with single-file documents.
-- Thomas
___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 4/8/2015 10:43 AM, Otared Kavian wrote:
Hi Thomas, Mojca and Andreas,
After playing with several options as either of you suggested, I ended up with the following setups which solve partially the misbehaviour of SyncTeX in mkiv. The solution works for with TeXShop on Mac OS X 10.10.2 and the latest standalone beta of ConTeXt.
1) I have in a file named mkiv.engine (which sits in the folder ) the following lines:
#!/bin/bash
export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH context --autogenerate "$1" —purgeall
2) As one may see I do not use the option —synctex in the above context call, since it doesn’t work correctly (beware the — shown is actually two hyphens {-}{-}…).
3) In the TeXShop Preferences, in the Typesetting pane, I have checked the radio button next to SyncTex (Tex ≥ 2010) as one may see on the attached screen capture. For now the syncing seems to work essentially fine (although it is not as precise as when using Plain TeX, or LaTeX, but probably this might be expected beacuse mkiv is more complex).
I checked the context runner, maybe the next beta works better (i get a zip with --synctex=zipped) but i have no clue if something useful is in there (useability also depends on how the content is placed / generated and there not always a 1-1 relation between this (and i have to time or motivation to cook up a better alternative that suits context better). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Thanks for your attention and the new SyncTeX option: I just made some testing with the beta from today and it seems to work. So for being useful to others, the command I use now in TeXShop and MacOS X is: #!/bin/bash export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH context --synctex=zipped --autogenerate "$1" --purgeall Best regards: OK
On 08 Apr 2015, at 13:27, Hans Hagen
wrote: On 4/8/2015 10:43 AM, Otared Kavian wrote:
Hi Thomas, Mojca and Andreas,
After playing with several options as either of you suggested, I ended up with the following setups which solve partially the misbehaviour of SyncTeX in mkiv. The solution works for with TeXShop on Mac OS X 10.10.2 and the latest standalone beta of ConTeXt.
1) I have in a file named mkiv.engine (which sits in the folder ) the following lines:
#!/bin/bash
export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH context --autogenerate "$1" —purgeall
2) As one may see I do not use the option —synctex in the above context call, since it doesn’t work correctly (beware the — shown is actually two hyphens {-}{-}…).
3) In the TeXShop Preferences, in the Typesetting pane, I have checked the radio button next to SyncTex (Tex ≥ 2010) as one may see on the attached screen capture. For now the syncing seems to work essentially fine (although it is not as precise as when using Plain TeX, or LaTeX, but probably this might be expected beacuse mkiv is more complex).
I checked the context runner, maybe the next beta works better (i get a zip with --synctex=zipped) but i have no clue if something useful is in there (useability also depends on how the content is placed / generated and there not always a 1-1 relation between this (and i have to time or motivation to cook up a better alternative that suits context better).
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (5)
-
Andreas Schneider
-
Hans Hagen
-
Mojca Miklavec
-
Otared Kavian
-
Thomas Floeren