ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mikael Sundqvist <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Most recent context doesn't like synctex?
Date: Sat, 13 Apr 2024 22:28:30 +0200	[thread overview]
Message-ID: <CAHy-LL8Mer5D6c6NKcZugq5UiT7jxH7sR2r+MGR-YfzrqPRe1w@mail.gmail.com> (raw)
In-Reply-To: <ZhrF7I0Q9Sd5vgaf@x360.localdomain>

Hi,

On Sat, Apr 13, 2024 at 7:54 PM Jim <zlists+context@jdvb.ca> wrote:
>
> Thanks for the quick reply.
>
> On Sat, Apr 13, 2024 at 09:18 (+0200), Hans Hagen wrote:
>
> > On 4/13/2024 12:39 AM, Jim wrote:
> >> Hi,
>
> >> I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
> >> system.
>
> >> Recently, the stand-alone ConTeXt distribution seems to not create a
> >> synctex file any more.  Specifically,
>
> >>      /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil --synctex=1 --nonstop file.tex
>
> >> does not create a .synctex file (and deletes it, if it is there), whereas
> >> the TeXlive version
>
> >>      /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil --synctex=1 --nonstop nwg_newsletter_2024_04.tex
>
> >> does create the .synctex file.
>
>
> >> The ConTeXt distribution version *does* create the file if --nonstop is
> >> *not* used.  Knowing that, I can work around this for now, although
> >> emacs+auctex probably won't be happy without --nonstop.
>
> >> I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
> >> that.
>
> >> Is this a bug introduced by some recent change?
>
> > it's more a feature
>
> I guess one person's bug is another person's feature.  :-)
>
> > - Mikael S and i spend some time with editor/viewer combinations on linux in
> > order to find ways around the different synctex libs that they use
>
> > - as a result we could make most work ok
>
> Are these recent changes?  And should emacs+auctex+PDFview work now?

What will work will depend on the viewers. We noticed a few weeks ago
that synctex (pdf -> editor) was not working in a few viewers (okular)
while it was working in others. After some debugging, our conclusion
was that different versions of the library/application were used, or
different approaches. We found a way to generate the stuff in the pdf
to make it work for the failing viewers we had. Hans did then not
replace this with the old approach, since then the previously working
viewers might break. He therefore added repeat as a key, so
\setupsynctex[state=repeat] will use the new approach.

>
> > - we assume that synctex is set up in the document with
>
> >     \setupsynctex[state=start]
> >     \setupsynctex[state=repeat] % less efficient but gets around issue
>
> I haven't been using either of those, since auctex does The Right Thing for
> me.  Or, at least, it used to.
>
> > - when context is run 'headless' (on a server) it's often done in
> > batchmode because one knows that the style works and in that case synctex
> > makes no sense so we disable it; this avoids the need to patch the style
>
> I (think I) see what you are saying, but if one explicitly uses --synctex
> on the command line, should that not over-ride the over-ride?  Or, put
> another way, would the following not make sense:
>     if --synctex is used on the command line
>         create synctex file
>     else if --nonstop is used on the command line
>         do not create the synctex file
>     else if \setupsynctex[...] is used in the source file
>         create the synctex file
>     else
>         do not create the synctex file
>
> > - the manual has been updates

workflows-synctex.tex now suggests:

"When your viewer doesn't return to the editor, you can try

\starttyping
\setupsynctex[state=repeat]
\stoptyping

or

\starttyping
context --synctex=repeat somefile.tex
\stoptyping

This will give a bit larger file that tries to fool the areas resolver in the
library that the viewer uses."

/Mikael
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-04-13 20:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 22:39 [NTG-context] " Jim
2024-04-13  7:18 ` [NTG-context] " Hans Hagen
2024-04-13 17:50   ` Jim
2024-04-13 20:28     ` Mikael Sundqvist [this message]
2024-04-14  9:56       ` Henning Hraban Ramm
2024-04-15 14:15         ` Jim
2024-04-15 15:38         ` Mikael Sundqvist
2024-04-15 20:31           ` Henning Hraban Ramm
2024-04-15 14:08       ` Jim

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=CAHy-LL8Mer5D6c6NKcZugq5UiT7jxH7sR2r+MGR-YfzrqPRe1w@mail.gmail.com \
    --to=mickep@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).