ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Cezary Drożak via ntg-context" <ntg-context@ntg.nl>
To: Hans Hagen <j.hagen@xs4all.nl>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Cezary Drożak" <czarek@drozak.net>
Subject: Re: SyncTeX does not work with Zathura
Date: Mon, 11 Oct 2021 10:32:57 +0000	[thread overview]
Message-ID: <1633945275436.3247345724.4277370039@drozak.net> (raw)
In-Reply-To: <74d5af80-ab94-7555-b440-0118eea66460@xs4all.nl>

 > I can't say ... what is missing? Can you figure out what makes Zathura 
unhappy?

I run gdb with breakpoint set on zathura/synctex.c:86 and while
`synctex_get_input_line_column` returns true, `input_file` is `NULL` so the
"else" branch is executed. That is all I managed to debug, I don't know how 
I
could step into the SyncTeX function.

 > here with
 >
 > \starttext
 > Hello, world!
 > \stoptext
 >
 > i get
 >
 > SyncTeX Version:1
 > Input:1:oeps.tex
 > Output:pdf
 > Magnification:1000
 > Unit:1
 > X Offset:0
 > Y Offset:0
 > Content:
 > !103
 > {1
 > [0,0:0,0:0,0,0
 > v0,0:0,55380990:39158276,55380990,0
 > h1,6:4661756,9176901:4275840,655360,327680
 > ]
 > !104
 > }1
 > !8
 > Postamble:
 > Count:3
 > !22
 > Post scriptum:
 >
 > (also with context --synctex oeps)

For me it generated a slightly smaller file:

 > SyncTeX Version:1
 > Input:1:/home/nawordar/projects/zathura/build/oeps.tex
 > Output:pdf
 > Magnification:1000
 > Unit:1
 > X Offset:0
 > Y Offset:0
 > Content:
 > !141
 > {1
 > [0,0:0,0:0,0,0
 > v0,0:0,55380990:39158276,55380990,0
 > ]
 > !61
 > }1
 > !7
 > Postamble:
 > Count:2
 > !22
 > Post scriptum:

Similarly to previous examples, `mtxrun --script synctex --list 
oeps.synctex`
only showed me that much:

```
mtx-synctex     | begin page: 1
mtx-synctex     | end page: 1
```

When I executed it on your SyncTeX file, it showed one line more:

```
mtx-synctex     | begin page: 1
mtx-synctex     |   [  71  135  136  149] :     6 : oeps.tex
mtx-synctex     | end page: 1
```

Still, with both files Zathura gave me the same error :/. It is really 
weird
though, that ConTeXt generated a different SyncTeX file for me for the same
exact file and command.

The versions of ConTeXt and SyncTeX:

```
$ synctex help
This is SyncTeX command line utility, version 1.5
usage: synctex <subcommand> [options] [args]
Synchronize TeXnology command-line client, version 1.21

$ context --version
mtx-context     | ConTeXt Process Management 1.04
```

 > btw, the script approach permits two way sync, so in texshop one can go 
from pdf to source and source to pdf

Could you send me the exact commands for that? I can't get any meaningful
output from `mtxrun --script synctex` either. It always prints me just an
empty line. All the options described in usage look like they are for going 
to
source code.

[1]: 
https://github.com/pwmt/zathura/blob/9bc3e9bfafc11a526b6f94d62b8da5ac209f6da0/zathura/synctex.c#L86
___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2021-10-11 10:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <546d4350-5561-57a3-c963-584fc65e1a9c@drozak.net>
2021-10-10 16:11 ` Cezary Drożak via ntg-context
2021-10-10 16:59   ` Hans Hagen via ntg-context
2021-10-10 17:20     ` Cezary Drożak via ntg-context
2021-10-10 20:54       ` Hans Hagen via ntg-context
2021-10-11 10:32         ` Cezary Drożak via ntg-context [this message]

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=1633945275436.3247345724.4277370039@drozak.net \
    --to=ntg-context@ntg.nl \
    --cc=czarek@drozak.net \
    --cc=j.hagen@xs4all.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).