Re: [NTG-context] synctex problem

2022-10-15 Thread Gavin via ntg-context
Hi Alan,

I have an almost identical set-up (M1, MacOS12.6, TexShop, useAlternatePath, 
useConTeXtSyncParser). One important difference, I use

sync method: SyncTeX (TeX ≥ 2010)

I’d recommend trying that. There are some other differences in my setup that 
probably are not important. At the beginning of my files (products and 
components)I only use the two lines

% !TEX useAlternatePath
% !TEX useConTeXtSyncParser

not the root and TS-program lines, but I don’t think that matters for your 
SynchTeX issue. Here is the engine I use for LMTX, just in case it has 
something helpful for you.

#!/bin/zsh
#
# This engine uses TeXShop's "Alternate Path", which is the variable "$3" below.
# Set the TeXShop's alternate path to your ConTeXt installation in
#  TeXShop's Preferences -> Engine -> Alternate Path
# Start ConTeXt source files with the lines:
#  % !TEX useAlternatePath
#  % !TEX useConTeXtSyncParser

export OSFONTDIR=/Library/Fonts/:/System/Library/Fonts:$HOME/Library/Fonts
export PATH="$3":$PATH
mtxrun --autogenerate --script context --synctex "$1”

I put that long comment in the engine because I share it with collaborators.

Hope that helps!

Gavin



> On Oct 15, 2022, at 12:00 PM, Alan Bowen via ntg-context  
> wrote:
> 
> At the top of a single source file, I have the lines:
> % !TEX root = prd_Aestimatio-0301.tex % the root file
>   % !TEX TS-program = ConTeXt2021
>   % !TEX useAlternatePath
>   % !TEX useConTeXtSyncParser
>\setupsynctex[state=start, method=max]
> 
> Syncing works well enough—though I can see no difference between method =min 
> and method=max, both highlight only a few words and not the entire text to be 
> synced, but perhaps my expectations are out of line.
> 
> When I have these lines at the top of a component file and typeset the 
> product file, I get a rootfile.synctex file, but syncing itself goes awry. 
> Nothing happens when I sync from the PDf file to the component file, and when 
> I sync from the component file to the product PDF, I get the correct page but 
> no highlighting.
> 
> I am using TeXShop ver. 5.03— 
>   sync method: Both Pdf Sync and Search
>   Alternative Path: 
> /Users/bowen1/Applications/LuaMetaTeX/tex/texmf-osx-arm64/bin
> 
> and  also the latest ConteXt (ver.  2022.10.15 10:37 LMTX)  under macOS 12.6 
> (Apple M1 Pro chip)
> 
> Note: the product file has only one  component file for now.
> 
> I suspect that I am missing something but am not sure where to look or what 
> to do now. Any guidance will be much appreciated.
> 
> Alan
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] synctex problem

2022-10-15 Thread Alan Bowen via ntg-context
At the top of a single source file, I have the lines:
% !TEX root = prd_Aestimatio-0301.tex  % the root file
% !TEX TS-program = ConTeXt2021
% !TEX useAlternatePath
% !TEX useConTeXtSyncParser
   \setupsynctex[state=start, method=max]

Syncing works well enough—though I can see no difference between method
=min and method=max, both highlight only a few words and not the entire
text to be synced, but perhaps my expectations are out of line.

When I have these lines at the top of a component file and typeset the
product file, I get a rootfile.synctex file, but syncing itself goes awry.
Nothing happens when I sync from the PDf file to the component file, and
when I sync from the component file to the product PDF, I get the correct
page but no highlighting.

I am using TeXShop ver. 5.03—
sync method: Both Pdf Sync and Search
Alternative
Path: /Users/bowen1/Applications/LuaMetaTeX/tex/texmf-osx-arm64/bin

and  also the latest ConteXt (ver.  2022.10.15 10:37 LMTX)  under macOS
12.6 (Apple M1 Pro chip)

Note: the product file has only one  component file for now.

I suspect that I am missing something but am not sure where to look or what
to do now. Any guidance will be much appreciated.

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] SyncTeX setup

2021-11-01 Thread Hans Hagen via ntg-context

On 10/31/2021 11:31 AM, Henning Hraban Ramm via ntg-context wrote:

Hi,
has anyone a working SyncTeX setup with ConTeXt LMTX for anything else than 
TeXshop?

With LaTeX, it works for me with Skim (+ Atom/Textadept/TeXworks) and 
TeXstudio. And in TeXshop we got our own parser. But can we expect others to 
adapt to our “superior” SyncTeX format? (I don’t understand the format yet and 
can’t tell what’s the difference.)
There are two synctex formats, we support the second one (for as far as 
i can tell). There is no context synctex format (it's just less bloated 
and redundant than what an engine outputs). So, if an editor uses the 
old synctex format you're toast.


The nice thing about texshop is that it delegates interperting the 
synctex file to an external script (in this can mtx-synctex) which 
removed the dependency on a specific version of the library. After all, 
the editor (and viewer iif one goes two ways) only needs to know a 
position in the document of pdf. It's the macro package that needs to be 
in sync and this is one way to guarantee it. Another advantage is that 
we avoid the somewhat latex specific syntac parsing (probably making 
some assumptions about the way pages are constructed).


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
___


[NTG-context] SyncTeX setup

2021-10-31 Thread Henning Hraban Ramm via ntg-context
Hi,
has anyone a working SyncTeX setup with ConTeXt LMTX for anything else than 
TeXshop?

With LaTeX, it works for me with Skim (+ Atom/Textadept/TeXworks) and 
TeXstudio. And in TeXshop we got our own parser. But can we expect others to 
adapt to our “superior” SyncTeX format? (I don’t understand the format yet and 
can’t tell what’s the difference.)

Hraban
___
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
___


Re: [NTG-context] SyncTeX does not work with Zathura

2021-10-11 Thread Cezary Drożak via ntg-context
> 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  [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
___


Re: [NTG-context] SyncTeX does not work with Zathura

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 7:20 PM, Cezary Drożak wrote:

 > you can play with
 >
 > mtxrun --script synctex
 >
 > and the synctex file to see if it makes sense
I wrote two almost identical files in plain tex and context. When I 
generated the synctex file and ran `mtxrun --script synctex --list 
x.synctex` I got this:


```
$ mtxrun --script synctex --list context.synctex
mtx-synctex | begin page: 1
mtx-synctex | end page: 1

$ mtxrun --script synctex --list tex.synctex
mtx-synctex | begin page: 1
mtx-synctex |   [  72   82   92   82] : 1 : 
/home/nawordar/tests/tex/hello/./tex.tex

mtx-synctex | end page: 1
```

It looks like context generates an incomplete synctext file.


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


The context synctex files are definitely less verbose because (1) we 
avoid clutter, (2) omit auto-generated content like pagenumbers and so, 
(3) collapse ranges (which we can do because we know what we're dealing 
with), (4) don't compress (because it makes no sense), (5) ignore 
styles, (6) also handle xml, etc. There have been some changes between 
synctex 1 and 2 but I don['t keep track of that. Actually, if a 'call 
some command' approach would have been chosen we could have better 
readable files (in our case lua or so).


 > one problem with synctex is that the editors depend on a library and 
there has been changes

 >
 > texshop now uses the more independent method for context i.e. just 
calling "mtxrun --script synctex ..." which not only removes the 
dependency of a library (the dependency on mtxrun is ok as one has 
context anyway) but also permits room for improvement (apart from not 
being tricked by latex specific heuristics in the library)


But that would need a change in Zathura wouldn't it?


sure, so unlikely to happen soon (i have no influence on that)

(but it would have been a better approach anyway, not being dependent on 
libraries that that depend on specific synctex versions in tex as well 
as heuristics; basically now one needs a version of the editor/viewer 
that matches a tex engine); one doesn't hard code a pdf viewer in an 
editor either (btw, the script approach permits two way sync, so in 
texshop one can go from pdf to source and source to pdf)


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)

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
___


Re: [NTG-context] SyncTeX does not work with Zathura

2021-10-10 Thread Cezary Drożak via ntg-context

> you can play with
>
> mtxrun --script synctex
>
> and the synctex file to see if it makes sense
I wrote two almost identical files in plain tex and context. When I 
generated the synctex file and ran `mtxrun --script synctex --list 
x.synctex` I got this:


```
$ mtxrun --script synctex --list context.synctex
mtx-synctex | begin page: 1
mtx-synctex | end page: 1

$ mtxrun --script synctex --list tex.synctex
mtx-synctex | begin page: 1
mtx-synctex |   [  72   82   92   82] : 1 : 
/home/nawordar/tests/tex/hello/./tex.tex

mtx-synctex | end page: 1
```

It looks like context generates an incomplete synctext file.

> one problem with synctex is that the editors depend on a library and 
there has been changes

>
> texshop now uses the more independent method for context i.e. just 
calling "mtxrun --script synctex ..." which not only removes the dependency 
of a library (the dependency on mtxrun is ok as one has context anyway) but 
also permits room for improvement (apart from not being tricked by latex 
specific heuristics in the library)


But that would need a change in Zathura wouldn't it?
___
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
___


Re: [NTG-context] SyncTeX does not work with Zathura

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 6:11 PM, Cezary Drożak via ntg-context wrote:

Hello,
I have been trying to get SyncTeX to work with ConTeXt and Zathura, but 
nothing

seems to work.

I created a simple `hello.mklx` file and ran `context --synctex=-1 
hello.mklx`.
Then I launched Zathura with `zathura -x "nvr -cc \"call 
vimtex#view#reverse_goto(%{line}, '%{input}')\" --nostart" hello.pdf`.

When I clicked "Hello, world!" while holding a control key it printed the
following error to console:

```
(org.pwmt.zathura:80241): GLib-CRITICAL **: 15:49:12.359: 
g_variant_new_string: assertion 'string != NULL' failed

warning: Failed to obtain data via SyncTeX or data is incomplete.
```

I am attaching the `hello.mklx`, `hello.pdf` files and the generated 
`hello.synctex` file. I am getting the same result with `--synctex=1`.

you can play with

mtxrun --script synctex

and the synctex file to see if it makes sense

one problem with synctex is that the editors depend on a library and 
there has been changes


texshop now uses the more independent method for context i.e. just 
calling "mtxrun --script synctex ..." which not only removes the 
dependency of a library (the dependency on mtxrun is ok as one has 
context anyway) but also permits room for improvement (apart from not 
being tricked by latex specific heuristics in the library)


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
___


[NTG-context] SyncTeX does not work with Zathura

2021-10-10 Thread Cezary Drożak via ntg-context

Hello,
I have been trying to get SyncTeX to work with ConTeXt and Zathura, but 
nothing

seems to work.

I created a simple `hello.mklx` file and ran `context --synctex=-1 
hello.mklx`.
Then I launched Zathura with `zathura -x "nvr -cc \"call 
vimtex#view#reverse_goto(%{line}, '%{input}')\" --nostart" hello.pdf`.

When I clicked "Hello, world!" while holding a control key it printed the
following error to console:

```
(org.pwmt.zathura:80241): GLib-CRITICAL **: 15:49:12.359: 
g_variant_new_string: assertion 'string != NULL' failed

warning: Failed to obtain data via SyncTeX or data is incomplete.
```

I am attaching the `hello.mklx`, `hello.pdf` files and the generated 
`hello.synctex` file. I am getting the same result with `--synctex=1`.


Regards,
Cezary Drożak

hello.pdf
Description: Adobe PDF document
SyncTeX Version:1
Output:pdf
Magnification:1000
Unit:1
X Offset:0
Y Offset:0
Content:
!86
{1
[0,0:0,0:0,0,0
v0,0:0,55380990:39158276,55380990,0
]
!60
}1
!7
Postamble:
Count:2
!22
Post scriptum:
\starttext
Hello, world!
\stoptext
___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-29 Thread Nicola
On 2021-05-16, Hans Hagen  wrote:
> now, here is something to think about:
>
> >mtxrun --script synctex --list
> mtx-synctex | invalid synctex log file %a

I've got a positive feedback, and an agenda, from Richard Koch for
supporting ConTeXt's syncing mechanism (including the PDF->TeX
direction, which hopefully will land soon in beta, if it hasn't
already).

Just one clarification: does this work only for ConTeXt, or is it based
on LuaTeX regardless of what is being typeset?

Nicola


___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-21 Thread Nicola
On 2021-05-21, Hans Hagen  wrote:
> On 5/21/2021 10:50 AM, Nicola wrote:
>> On 2021-05-20, Hans Hagen  wrote:
>>
 One thing he asked is what I was asking you: it
 would be useful if there were a way to sync in the other direction as
 well.
>>> You mean sort of trying to deduce from the synctex file where to go in
>>> the pdf?
>>
>> Yes. You provide a .tex file and a line number, and maybe also an
>> optional column number, and mtxrun outputs a .pdf file, a page number
>> and a coordinate pair or bounding box (I don't know what the best output
>> is).
>
> define 'tex file' ... is that the master file? in that case we're
> talking about the 'foo.synctex file' because how does a tex file knows
> what pdf is related?

Good point. I don't know how/if searching from source to PDF works in
TeXShop when the source is split into several files.

Nicola

___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-21 Thread Hans Hagen

On 5/21/2021 10:50 AM, Nicola wrote:

On 2021-05-20, Hans Hagen  wrote:


One thing he asked is what I was asking you: it
would be useful if there were a way to sync in the other direction as
well.

You mean sort of trying to deduce from the synctex file where to go in
the pdf?


Yes. You provide a .tex file and a line number, and maybe also an
optional column number, and mtxrun outputs a .pdf file, a page number
and a coordinate pair or bounding box (I don't know what the best output
is).


define 'tex file' ... is that the master file? in that case we're 
talking about the 'foo.synctex file' because how does a tex file knows 
what pdf is related?



When the 'call external program' approach is used I can have an
alternative (lua) output that is easier and might do that (less work).
Lets first go one direction.


Dick prefers to tackle both directions at once: maybe you can coordinate
with each other.


I only have a very old macbook and an old imac i once got so no real
equipment to test anythign modern.


I'd be happy to help, and I am sure other users are interested, too.

Nicola

___
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
___




--

-
  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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-21 Thread Nicola
On 2021-05-20, Hans Hagen  wrote:

>> One thing he asked is what I was asking you: it
>> would be useful if there were a way to sync in the other direction as
>> well.
> You mean sort of trying to deduce from the synctex file where to go in
> the pdf?

Yes. You provide a .tex file and a line number, and maybe also an
optional column number, and mtxrun outputs a .pdf file, a page number
and a coordinate pair or bounding box (I don't know what the best output
is).

> When the 'call external program' approach is used I can have an
> alternative (lua) output that is easier and might do that (less work).
> Lets first go one direction.

Dick prefers to tackle both directions at once: maybe you can coordinate
with each other.

> I only have a very old macbook and an old imac i once got so no real
> equipment to test anythign modern.

I'd be happy to help, and I am sure other users are interested, too.

Nicola

___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-20 Thread Hans Hagen

On 5/20/2021 9:38 PM, Nicola wrote:

On 2021-05-16, Hans Hagen  wrote:

On 5/16/2021 5:30 PM, Nicola wrote:


Anyway, I am positive that he is willing to support ConTeXt in the best
possible way...


Sure. I met him a few times. Definitely an asset for the tex community.


see? the info is just there, so you can try to convince the texshop
creator to support this:

 -- call an external program with these arrguments (the texhop editor
knows the positions as it has the viewer built in)
 -- go to reported file and line


...which could be as well this.

Feel free to ask him,


I've got a positive feedback, and the summer as an estimated time to
start working on it. One thing he asked is what I was asking you: it
would be useful if there were a way to sync in the other direction as
well.
You mean sort of trying to deduce from the synctex file where to go in 
the pdf? When the 'call external program' approach is used I can have an 
alternative (lua) output that is easier and might do that (less work). 
Lets first go one direction.


I only have a very old macbook and an old imac i once got so no real 
equipment to test anythign modern.


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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-20 Thread Nicola
On 2021-05-16, Hans Hagen  wrote:
> On 5/16/2021 5:30 PM, Nicola wrote:
>
>> Anyway, I am positive that he is willing to support ConTeXt in the best
>> possible way...
>
> Sure. I met him a few times. Definitely an asset for the tex community.
>
>>> see? the info is just there, so you can try to convince the texshop
>>> creator to support this:
>>>
>>> -- call an external program with these arrguments (the texhop editor
>>> knows the positions as it has the viewer built in)
>>> -- go to reported file and line
>>
>> ...which could be as well this.
> Feel free to ask him,

I've got a positive feedback, and the summer as an estimated time to
start working on it. One thing he asked is what I was asking you: it
would be useful if there were a way to sync in the other direction as
well.

Nicola

___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-17 Thread Nicola
On 2021-05-16, Hans Hagen  wrote:
> On 5/16/2021 5:30 PM, Nicola wrote:
>
>>> see? the info is just there, so you can try to convince the texshop
>>> creator to support this:
>>>
>>> -- call an external program with these arrguments (the texhop editor
>>> knows the positions as it has the viewer built in)
>>> -- go to reported file and line
>>
>> ...which could be as well this.
> Feel free to ask him,

I will. Two things:

1. can you also go the other way with mtxrun (determine position in the
   PDF from a line in the source file)?

2. It seems that --editor has no effect:

$ mtxrun --script synctex --edit --line=6 --editor=/usr/local/bin/vim 
WriteUp.tex
sh: SciTE: command not found

$ mtxrun --script synctex --goto --page=2 --x=150 --y=200 --editor=gvim 
WriteUp.synctex
sh: SciTE: command not found

Am I doing anything wrong?

Nicola

___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Hans Hagen

On 5/16/2021 5:30 PM, Nicola wrote:


It works just fine. Add this line at the top of your document:

  % !TEX useOldSyncParser

I also have:

\setupsynctex[state=start,method=min]

I am not sure whether method=min is necessary.


normally not ...


Richard Koch, however, has been incredible, IMO, in supporting the macOS
community (already before Mac OS X 10.0!) with TeXShop. In particular,
he went to great lengths to make syncing work in TeXShop for both
ConTeXt and LaTeX. The current problem is only with external editors,
and it is because the directive above is not read by TeXShop when using
an external editor.


Indeed, and he also had to adapt to changing apple policies and so.


Anyway, I am positive that he is willing to support ConTeXt in the best
possible way...


Sure. I met him a few times. Definitely an asset for the tex community.


see? the info is just there, so you can try to convince the texshop
creator to support this:

-- call an external program with these arrguments (the texhop editor
knows the positions as it has the viewer built in)
-- go to reported file and line


...which could be as well this.

Feel free to ask him,

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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Otared Kavian
Hi Hans and Nicola,

Thank you for your attention and your answers.

As a matter of fact I am aware that when using ConTeXt with TeXShop one has to 
add on the first line

% !TEX useOldSyncParser

and then setup synctex with

\setupsynctex[state=start,method=min]

(or method=max, or just ignoring that part). In the test file I sent this 
morning, I left out that « % !TEX useOldSyncParser » line, but on my machine, 
with or without it the situation does not change.

In fact a few years ago I was in touch with Richard Koch about the issue and we 
exchanged a few emails and testings, after which he added a Special Comment 
menu item for « % !TEX useOldSyncParser ». 
The ConTeXt code for synctex used to work fine, but beginning last year (if I 
remember well) the behaviour became somewhat unstable (again on my machine). It 
seems that the content which goes on the first page of the PDF file remains out 
of synctex when the file is typeset with LMTX. The same TeX file produces the 
correct synctex result when typeset with mkiv from TeXLive 2020 (version 
2020.03.10 14:44).

Indeed, one can compare the « filename.synctex » files obtained with LMTX and 
mkiv, to observe the differences, but I am unable to interpret why those 
differences are there. 
I am sending those files as well as the TeX and PDF files with this message. 
The PDF file I am sending is the one obtained with LMTX, and of course the 
syncing works fine when one uses the synctex file obtained with mkiv (upon 
renaming adequately that file)…

Best regards: Otared



test-synctex-1-lmtx.synctex
Description: Binary data



test-synctex-1-mkiv.synctex
Description: Binary data



test-synctex-1.pdf
Description: Adobe PDF document




test-synctex-1.synctex
Description: Binary data


> On 16 May 2021, at 16:53, Hans Hagen  wrote:
> 
> On 5/16/2021 2:52 PM, Otared Kavian wrote:
>> Hi Hans,
>> I have been noticing for some time that \setupsynctex does not work 
>> properly, at least in TeXShop on MacOS.
>> A « filename.synctex » file is created but on most occasions it does not 
>> contain many lines, and one cannot go from the PDF file to the right 
>> location in the source file.
>> Has something changed in the way synctex used to work ?
>> Below I am sending you a test file with its PDF and .synctex files, for you 
>> to see for yourself. Sorry for the disturbance…
> irr texshoip has soem setting for it (you need to check with Dick) which 
> relates to a change in synctex
> 
> anyway, this whole synctex thing is a mess ... it's rather bound to the way 
> latex does things and way to complex due to these heuristics so it could 
> never work well for context
> 
> the reason you see little in the .synctex file is that context doesn't use 
> the synctec library at all: i produce just what is needed directly, so we 
> have a way more compact output (and also better 'real file'
> tracking, plus avoiding generated stuff in the otr that makes no sense to 
> sync to because it has no file; we also protect styles from being accessed 
> that way)
> 
> now, in my opinion, the biggest drawback of synctex is that one needs to 
> compile it into the editor/viewer. Far better would have been to let the 
> viewer call out to an external program (configurable) that reports back the 
> file and line ... more flexible, better upward compatibility, no need to have 
> the synctex code on board, hardly any code and no fuzzy heuristics to fight
> 
> but I gave up communicating that because i cannot reason with the guy 
> (different wavelengths .. years ago already)
> 
> now, here is something to think about:
> 
> >mtxrun --script synctex --list
> mtx-synctex | invalid synctex log file %a
> 
> >mtxrun --script synctex --list synctex-broken.synctex
> mtx-synctex | begin page: 1
> mtx-synctex | end page: 1
> mtx-synctex | begin page: 2
> mtx-synctex |   [  71  135  177  149] : 9 : ./synctex-broken.tex
> mtx-synctex |   [ 181  135  224  149] : 2 : ./synctex-broken.tex
> mtx-synctex |   [  71  163  290  178] :14 : ./synctex-broken.tex
> mtx-synctex |   [  71  178  290  193] :17 : ./synctex-broken.tex
> mtx-synctex | end page: 2
> mtx-synctex | begin page: 3
> mtx-synctex |   [  71  135  496  149] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  149  496  164] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  163  496  178] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  178  496  193] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  192  496  207] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  207  496  222] :21 : ./synctex-broken.tex
> mtx-synctex |   [  71  221  462  236] :21 : ./synctex-broken.tex
> mtx-synctex | end page: 3
> 
> >mtxrun --script synctex --report --page=3 --x=76 --y=140 
> >synctex-broken.synctex --console
> "./synctex-broken.tex" 21
> 
> see? the info is just there, so you can try to convince the texshop creator 
> to support thi

Re: [NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Nicola
On 2021-05-16, Hans Hagen  wrote:
> On 5/16/2021 2:52 PM, Otared Kavian wrote:
>> Hi Hans,
>>
>> I have been noticing for some time that \setupsynctex does not work
>> properly, at least in TeXShop on MacOS. A « filename.synctex » file
>> is created but on most occasions it does not contain many lines, and
>> one cannot go from the PDF file to the right location in the source
>> file. Has something changed in the way synctex used to work ?
>>
>> Below I am sending you a test file with its PDF and .synctex files,
>> for you to see for yourself. Sorry for the disturbance…
> irr texshoip has soem setting for it (you need to check with Dick)
> which relates to a change in synctex

It works just fine. Add this line at the top of your document:

 % !TEX useOldSyncParser

I also have:

\setupsynctex[state=start,method=min]

I am not sure whether method=min is necessary.

Anyway, search for useOldSyncParser in Help > Changes for the details.

> now, in my opinion, the biggest drawback of synctex is that one needs to
> compile it into the editor/viewer. Far better would have been to let the
> viewer call out to an external program (configurable) that reports back
> the file and line ... more flexible, better upward compatibility, no
> need to have the synctex code on board, hardly any code and no fuzzy
> heuristics to fight

+1. I use TeXShop only as a previewer (I edit documents in Vim), but,
unfortunately, syncing with an external editor works only for LaTeX.

> but I gave up communicating that because i cannot reason with the guy
> (different wavelengths .. years ago already)

Richard Koch, however, has been incredible, IMO, in supporting the macOS
community (already before Mac OS X 10.0!) with TeXShop. In particular,
he went to great lengths to make syncing work in TeXShop for both
ConTeXt and LaTeX. The current problem is only with external editors,
and it is because the directive above is not read by TeXShop when using
an external editor.

Anyway, I am positive that he is willing to support ConTeXt in the best
possible way...

> see? the info is just there, so you can try to convince the texshop
> creator to support this:
>
>-- call an external program with these arrguments (the texhop editor
> knows the positions as it has the viewer built in)
>-- go to reported file and line

...which could be as well this.

Nicola

___
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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Hans Hagen

On 5/16/2021 2:52 PM, Otared Kavian wrote:

Hi Hans,

I have been noticing for some time that \setupsynctex does not work properly, 
at least in TeXShop on MacOS.
A « filename.synctex » file is created but on most occasions it does not 
contain many lines, and one cannot go from the PDF file to the right location 
in the source file.
Has something changed in the way synctex used to work ?

Below I am sending you a test file with its PDF and .synctex files, for you to 
see for yourself. Sorry for the disturbance…
btw, maybe you can check with texshop for the version ... there was at 
some point a change in the synctex output format and texshop was adapted 
to handle both variants; the texshop author is quite responsive and i 
know he made sure context could be done but maybe there's also something 
mentioned in the documentation (i could probably look it up old mails if 
needed) .. in that case wikifyable


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
___


Re: [NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Hans Hagen

On 5/16/2021 2:52 PM, Otared Kavian wrote:

Hi Hans,

I have been noticing for some time that \setupsynctex does not work properly, 
at least in TeXShop on MacOS.
A « filename.synctex » file is created but on most occasions it does not 
contain many lines, and one cannot go from the PDF file to the right location 
in the source file.
Has something changed in the way synctex used to work ?

Below I am sending you a test file with its PDF and .synctex files, for you to 
see for yourself. Sorry for the disturbance…
irr texshoip has soem setting for it (you need to check with Dick) which 
relates to a change in synctex


anyway, this whole synctex thing is a mess ... it's rather bound to the 
way latex does things and way to complex due to these heuristics so it 
could never work well for context


the reason you see little in the .synctex file is that context doesn't 
use the synctec library at all: i produce just what is needed directly, 
so we have a way more compact output (and also better 'real file'
tracking, plus avoiding generated stuff in the otr that makes no sense 
to sync to because it has no file; we also protect styles from being 
accessed that way)


now, in my opinion, the biggest drawback of synctex is that one needs to 
compile it into the editor/viewer. Far better would have been to let the 
viewer call out to an external program (configurable) that reports back 
the file and line ... more flexible, better upward compatibility, no 
need to have the synctex code on board, hardly any code and no fuzzy 
heuristics to fight


but I gave up communicating that because i cannot reason with the guy 
(different wavelengths .. years ago already)


now, here is something to think about:

>mtxrun --script synctex --list
mtx-synctex | invalid synctex log file %a

>mtxrun --script synctex --list synctex-broken.synctex
mtx-synctex | begin page: 1
mtx-synctex | end page: 1
mtx-synctex | begin page: 2
mtx-synctex |   [  71  135  177  149] : 9 : ./synctex-broken.tex
mtx-synctex |   [ 181  135  224  149] : 2 : ./synctex-broken.tex
mtx-synctex |   [  71  163  290  178] :14 : ./synctex-broken.tex
mtx-synctex |   [  71  178  290  193] :17 : ./synctex-broken.tex
mtx-synctex | end page: 2
mtx-synctex | begin page: 3
mtx-synctex |   [  71  135  496  149] :21 : ./synctex-broken.tex
mtx-synctex |   [  71  149  496  164] :21 : ./synctex-broken.tex
mtx-synctex |   [  71  163  496  178] :21 : ./synctex-broken.tex
mtx-synctex |   [  71  178  496  193] :21 : ./synctex-broken.tex
mtx-synctex |   [  71  192  496  207] :21 : ./synctex-broken.tex
mtx-synctex |   [  71  207  496  222] :21 : ./synctex-broken.tex
mtx-synctex |   [  71  221  462  236] :21 : ./synctex-broken.tex
mtx-synctex | end page: 3

>mtxrun --script synctex --report --page=3 --x=76 --y=140 
synctex-broken.synctex --console

"./synctex-broken.tex" 21

see? the info is just there, so you can try to convince the texshop 
creator to support this:


  -- call an external program with these arrguments (the texhop editor 
knows the positions as it has the viewer built in)

  -- go to reported file and line

afaik synctex works for my collegue and scite/sumatra and actually he 
uses the fact that in context it also goes to positions in xml files 
because it tracks files and lines in xml nodes too (it's the reason why 
i support synctex at all, personally I never use(d) it)


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
___


[NTG-context] Synctex broken in LMTX ?

2021-05-16 Thread Otared Kavian
Hi Hans,

I have been noticing for some time that \setupsynctex does not work properly, 
at least in TeXShop on MacOS. 
A « filename.synctex » file is created but on most occasions it does not 
contain many lines, and one cannot go from the PDF file to the right location 
in the source file.
Has something changed in the way synctex used to work ?

Below I am sending you a test file with its PDF and .synctex files, for you to 
see for yourself. Sorry for the disturbance…

Best regards: Otared




synctex-broken.synctex
Description: Binary data



synctex-broken.pdf
Description: Adobe PDF document



synctex-broken.tex
Description: Binary data
___
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
___


Re: [NTG-context] SyncTeX and Skim/TeXShop

2019-04-10 Thread Otared Kavian
Hi Nicola,

I do use ConTeXt with TeXShop on MacOS, and I use extensively synctex. 

Indeed there has been a big change in synctex a few years ago, since the « 
classic » synctex code by Jérôme Laurens was changed, and more or less at the 
same time Hans introduced independently a new synctex setup (and code) for 
ConTeXt. 
Richard Koch added a special syntex code in TeXShop in order to use the changes 
introduced by Hans. Richard added also a special menu item in the Macros menu 
of TeXShop which adds the line
% !TEX useOldSyncParser
in your source file.

Now, that being said, in order to use synctex in TeXShop and ConTeXt, you have 
to add the following two lines at the top of your source file:

% !TEX useOldSyncParser
\setupsynctex[state=start,method=min] % or method=max

Then you typeset your file and you can get the usual synctex behaviour 
(however, for some unknown reason it may happen that the first time you typeset 
your file with the above two lines, you don't get the synctex working: you have 
to quit TeXShop and open again your file and then synctex works fine…).

Best regards: OK

> On 9 Apr 2019, at 19:23, Nicola Vitacolonna  wrote:
> 
> Hi,
> is anyone using ConTeXt with Skim, or TeXShop, on macOS?
> 
> SyncTeX used to work fine with ConTeXt in both apps. Now, it seems that 
> ConTeXt has started to generate a .synctex file rather than a .synctex.gz, 
> and the format seems to have changed (?). As I haven’t followed recent (or 
> perhaps not so recent) developments in this area, do you have any suggestions 
> to make SyncTeX work again?
> 
> I am using Skim, but any PDF viewer would be fine if Skim cannot be used for 
> the purpose any longer.
> 
> Thanks in advance,
> Nicola
> ___
> 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
> ___

___
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
___


Re: [NTG-context] SyncTeX and Skim/TeXShop

2019-04-10 Thread Hans Hagen

On 4/9/2019 7:23 PM, Nicola Vitacolonna wrote:

Hi,
is anyone using ConTeXt with Skim, or TeXShop, on macOS?

SyncTeX used to work fine with ConTeXt in both apps. Now, it seems that ConTeXt 
has started to generate a .synctex file rather than a .synctex.gz, and the 
format seems to have changed (?). As I haven’t followed recent (or perhaps not 
so recent) developments in this area, do you have any suggestions to make 
SyncTeX work again?


- there is no benefit in a foo.synctex.gz file over a foo.synctex file; 
context generates relative efficient synctex files


- context generates synctex code that is suits the way it works (for tex 
as well as xml input); in context lmtx i still need to add some lines to 
the context code (not done yet as i don't use synctex myself)


- the synctex file format has changes recently so mayb that is your 
problem; unfortunately syntex support in viewers is via a library anod 
not via a "call to a command that returns file and position in file" 
which would have made that feature future proof (mtxrun --script synctex 
could provide that)



I am using Skim, but any PDF viewer would be fine if Skim cannot be used for 
the purpose any longer.

Thanks in advance,
Nicola
___
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
___




--

-
  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
___


[NTG-context] SyncTeX and Skim/TeXShop

2019-04-09 Thread Nicola Vitacolonna
Hi,
is anyone using ConTeXt with Skim, or TeXShop, on macOS?

SyncTeX used to work fine with ConTeXt in both apps. Now, it seems that ConTeXt 
has started to generate a .synctex file rather than a .synctex.gz, and the 
format seems to have changed (?). As I haven’t followed recent (or perhaps not 
so recent) developments in this area, do you have any suggestions to make 
SyncTeX work again?

I am using Skim, but any PDF viewer would be fine if Skim cannot be used for 
the purpose any longer.

Thanks in advance,
Nicola
___
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
___


Re: [NTG-context] Synctex + Sumatra + TextPad

2018-08-21 Thread Hans Hagen

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
___

[NTG-context] Synctex + Sumatra + TextPad

2018-08-21 Thread Procházka Lukáš Ing .

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:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@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
___

Re: [NTG-context] synctex file is not compressed

2018-02-28 Thread Ulrike Fischer
Am Tue, 27 Feb 2018 09:02:57 +0100 schrieb Hans Hagen:

>> I seem to be not able to get a synctex.gz instead of a synctex file.

>> I tried
>>   context --synctex=1 file
>> and
>>   context --synctex=-1 file
>> but in both cases a simple synctex-file is created.
>> 
>> Is this normal?

> Sure,
...

> but anyway, i can only test with summatra pdf and it works ok here (last 
> time i checked)

The synctex file works, that is not my problem. But arara creates by
default synctex.gz files and my editor gets confused if both
variants are used. So I was trying to unify the synctex file types
and wondered why it (no longer?) worked with context.

I can find a way around the problem. 

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex file is not compressed

2018-02-27 Thread Hans Hagen

On 2/26/2018 4:53 PM, Ulrike Fischer wrote:

I seem to be not able to get a synctex.gz instead of a synctex file.

I tried
  context --synctex=1 file
and
  context --synctex=-1 file
but in both cases a simple synctex-file is created.

Is this normal?

Sure, because

- context doesn't use syntex's internal code but uses its own logic
- there is no gain in zipping
- we have relative small synctex files because we use a different logic

the way to enable synctex is in the document (see workflows.pdf):

\setupsynctex[state=start]

it's a bit pitty that pdf viewers have hard coded syntex file parsing 
instead of calling a program with coordinates as arguments that starts 
the editor because that would make a more powerful combo and give room 
for additional functionality:


> mtxrun --script synctex

but anyway, i can only test with summatra pdf and it works ok here (last 
time i checked)


a collegue uses synctex with documents that are constructed runtime of 
thousands of small xml files deeply nested and filesize of the synctex 
file is neglectable by the size fo the pdf


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
___

[NTG-context] synctex file is not compressed

2018-02-26 Thread Ulrike Fischer
I seem to be not able to get a synctex.gz instead of a synctex file. 

I tried 
 context --synctex=1 file
and 
 context --synctex=-1 file
but in both cases a simple synctex-file is created. 

Is this normal? 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread Hans Hagen

On 11/22/2017 9:25 AM, Ulrike Fischer wrote:

Am Tue, 21 Nov 2017 16:43:53 +0100 schrieb Hans Hagen:


ok, we have a fix for that (but it doesn't explain why context generated
files make texshop unhappy)


Well I don't have a mac and texshop. And I don't have a viewer with
the newest synctex parser (sumatra is from 2016).

But the synctex output of context is wrong in certain places. E.g.
when I compile this:

\starttext

\input knuth

\stoptext

then the synctex file contains no reference to knuth.tex:

SyncTeX Version:1
Input:1:G:/Z-Test/test-utf8.tex
Output:pdf

and synchronization fails in sumatra for me too. \ReadFile doesn't
work either.
actually that is correct: in context we protect files that are in the 
official tex tree as it's generally a bad idea if someone patches these 
(there is no distinction here between a style and a sample file); also, 
content that originates from styles and/or is generated on the fly makes 
no sense for editing anyway so page ornaments are also not synced


\enabletrackers[system.synctex.visualize]

will show you what is synced

on the other hand, we do support (for as far as possible) xml nodes 
which can be flushed in arbitrary order (it's why i added support: 
editing xml files that are runtime assembled from upto thousands of 
smaller xml files organized in 5 level deep directory structures so 
there locating and editing a file is easier with synctex clicks)


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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread Ulrike Fischer
Am Wed, 22 Nov 2017 10:34:53 +0100 schrieb Hans Hagen:

> indeed, the context variant outputs all relevant file references

Well not for me. 

As I wrote: 

\starttext

\input knuth

\stoptext

doesn't add a reference to knuth.tex on my system. The full synctex
file looks like this:

SyncTeX Version:1
Input:1:G:/Z-Test/test-utf8.tex
Output:pdf
Magnification:1000
Unit:1
X Offset:0
Y Offset:0
Content:
!118
{1
[0,0:0,0:0,0,0
v0,0:0,55380990:39158276,55380990,0
)
]
!63
}1
!7
Postamble:
Count:2
!22
Post scriptum:

and the log-file says:

system  > synctex functionality is enabled, expect 5-10 pct
runtime overhead!
open source > level 2, order 3, name 'G:/Z-Test/test-utf8.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
open source > level 3, order 4, name
'D:/context-minimals/context/tex/texmf-context/tex/context/sample/common/knuth.tex'



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread Hans Hagen

On 11/22/2017 9:39 AM, Ulrike Fischer wrote:

Am Wed, 22 Nov 2017 09:30:47 +0100 schrieb luigi scarso:


the fix is already applied to the experimental-lua53 branch,
it will be soon in trunk .


Oh. Is the context problem due to the luatex bug I reported?


no, we don't use any of the built-in synctex code so this is not 
related; i have no clue what the issue with texshop and context synctex 
files is



It looked different to me ;-) In the luatex bug the main file was
missing but here inputs are ignored.

indeed, the context variant outputs all relevant file references

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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread luigi scarso
On Wed, Nov 22, 2017 at 9:39 AM, Ulrike Fischer  wrote:
> Am Wed, 22 Nov 2017 09:30:47 +0100 schrieb luigi scarso:
>
>> the fix is already applied to the experimental-lua53 branch,
>> it will be soon in trunk .
>
> Oh. Is the context problem due to the luatex bug I reported?
>
> It looked different to me ;-) In the luatex bug the main file was
> missing but here inputs are ignored.
for sure there was bug in luatex  that  skipped the very first entry
(the main file);
the patch fixed it, so that luatex works with evince & gedit under Ubuntu 16.04.






-- 
luigi
___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread Ulrike Fischer
Am Wed, 22 Nov 2017 09:30:47 +0100 schrieb luigi scarso:

> the fix is already applied to the experimental-lua53 branch,
> it will be soon in trunk .

Oh. Is the context problem due to the luatex bug I reported? 

It looked different to me ;-) In the luatex bug the main file was
missing but here inputs are ignored. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread luigi scarso
On Wed, Nov 22, 2017 at 9:25 AM, Ulrike Fischer  wrote:
> Am Tue, 21 Nov 2017 16:43:53 +0100 schrieb Hans Hagen:
>
>> ok, we have a fix for that (but it doesn't explain why context generated
>> files make texshop unhappy)
>
> Well I don't have a mac and texshop. And I don't have a viewer with
> the newest synctex parser (sumatra is from 2016).
>
> But the synctex output of context is wrong in certain places. E.g.
> when I compile this:
>
> \starttext
>
> \input knuth
>
> \stoptext
>
> then the synctex file contains no reference to knuth.tex:
>
> SyncTeX Version:1
> Input:1:G:/Z-Test/test-utf8.tex
> Output:pdf
>
> and synchronization fails in sumatra for me too. \ReadFile doesn't
> work either.
>
> (I made this test with a context updated today).
the fix is already applied to the experimental-lua53 branch,
it will be soon in trunk .

-- 
luigi
___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-22 Thread Ulrike Fischer
Am Tue, 21 Nov 2017 16:43:53 +0100 schrieb Hans Hagen:

> ok, we have a fix for that (but it doesn't explain why context generated 
> files make texshop unhappy)

Well I don't have a mac and texshop. And I don't have a viewer with
the newest synctex parser (sumatra is from 2016). 

But the synctex output of context is wrong in certain places. E.g.
when I compile this:

\starttext

\input knuth

\stoptext

then the synctex file contains no reference to knuth.tex:

SyncTeX Version:1
Input:1:G:/Z-Test/test-utf8.tex
Output:pdf

and synchronization fails in sumatra for me too. \ReadFile doesn't
work either. 

(I made this test with a context updated today).


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-21 Thread Hans Hagen

On 11/21/2017 2:21 PM, Ulrike Fischer wrote:

Am Tue, 21 Nov 2017 14:15:02 +0100 schrieb Hans Hagen:



synctex fails with lualatex on windows too. And it fails with with
the luatex version 1.06 (which is now in miktex) but not with 1.04
(texlive).

I compared the synctex files of both and the problem is that the
link to the main tex file is missing at the start.

The synctex files refers to a lot positions in input 0 but the file
list starts with

Input:1:D:/MiKTeX2.9/tex/latex/base/article.cls


I added before this line

Input:0:G:/Z-Test/./test-utf8.tex

and then synchronization worked again. Imho this is a luatex bug.

(the texlive synctex starts with number 1 and not 0
   Input:1:G:/Z-Test/./test-utf8.tex)



i noticed this 0 /1 iusue too but it was ok in old viewers so mayeb that
changed .. fwiw, nothing changed in luatex where we just take the syntex
code as-is ... actually in sumatra starting at 1 is the only thing that
works


I don't think that the 0/1 issue is a problem in itself -- but I
think that the change of the numbering system introduced the real
bug: That the line

 Input:0:G:/Z-Test/./test-utf8.tex

is missing in the synctex file.
ok, we have a fix for that (but it doesn't explain why context generated 
files make texshop unhappy)



-
  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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-21 Thread Ulrike Fischer
Am Tue, 21 Nov 2017 14:15:02 +0100 schrieb Hans Hagen:


>> synctex fails with lualatex on windows too. And it fails with with
>> the luatex version 1.06 (which is now in miktex) but not with 1.04
>> (texlive).
>> 
>> I compared the synctex files of both and the problem is that the
>> link to the main tex file is missing at the start.
>> 
>> The synctex files refers to a lot positions in input 0 but the file
>> list starts with
>> 
>> Input:1:D:/MiKTeX2.9/tex/latex/base/article.cls
>> 
>> 
>> I added before this line
>> 
>> Input:0:G:/Z-Test/./test-utf8.tex
>> 
>> and then synchronization worked again. Imho this is a luatex bug.
>> 
>> (the texlive synctex starts with number 1 and not 0
>>   Input:1:G:/Z-Test/./test-utf8.tex)

> i noticed this 0 /1 iusue too but it was ok in old viewers so mayeb that 
> changed .. fwiw, nothing changed in luatex where we just take the syntex 
> code as-is ... actually in sumatra starting at 1 is the only thing that 
> works

I don't think that the 0/1 issue is a problem in itself -- but I
think that the change of the numbering system introduced the real
bug: That the line 

Input:0:G:/Z-Test/./test-utf8.tex

is missing in the synctex file. 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-21 Thread Hans Hagen

On 11/21/2017 1:18 PM, Ulrike Fischer wrote:

Am Fri, 17 Nov 2017 15:13:56 +0100 schrieb Hans Hagen:


it's not clear to me why a newer parser lib would fail on an older
synctex format (whatever the change is) .. sumatra pdf works (last
updates ayear ago) works ok


synctex fails with lualatex on windows too. And it fails with with
the luatex version 1.06 (which is now in miktex) but not with 1.04
(texlive).

I compared the synctex files of both and the problem is that the
link to the main tex file is missing at the start.

The synctex files refers to a lot positions in input 0 but the file
list starts with

Input:1:D:/MiKTeX2.9/tex/latex/base/article.cls


I added before this line

Input:0:G:/Z-Test/./test-utf8.tex

and then synchronization worked again. Imho this is a luatex bug.

(the texlive synctex starts with number 1 and not 0
  Input:1:G:/Z-Test/./test-utf8.tex)
i noticed this 0 /1 iusue too but it was ok in old viewers so mayeb that 
changed .. fwiw, nothing changed in luatex where we just take the syntex 
code as-is ... actually in sumatra starting at 1 is the only thing that 
works


what i did notice (quick test on linux) is that the error that pops up 
reports a missing source file and shows only the path part which looks 
like a biug in the parser to me


there is not much documentation about the synctex file; actually, if an 
editor would call out to an external program to resolve the location in 
the file that would be more robust and easier to maintain, given the 
one-call-per-document there is not that much gain in using a library in 
the viewer; it would be easier to update and keep in sync with tex too 
as now one depends on updating a viewer


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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-21 Thread Ulrike Fischer
Am Fri, 17 Nov 2017 15:13:56 +0100 schrieb Hans Hagen:

> it's not clear to me why a newer parser lib would fail on an older 
> synctex format (whatever the change is) .. sumatra pdf works (last 
> updates ayear ago) works ok

synctex fails with lualatex on windows too. And it fails with with
the luatex version 1.06 (which is now in miktex) but not with 1.04
(texlive). 

I compared the synctex files of both and the problem is that the
link to the main tex file is missing at the start. 

The synctex files refers to a lot positions in input 0 but the file
list starts with

Input:1:D:/MiKTeX2.9/tex/latex/base/article.cls


I added before this line 

Input:0:G:/Z-Test/./test-utf8.tex

and then synchronization worked again. Imho this is a luatex bug.

(the texlive synctex starts with number 1 and not 0
 Input:1:G:/Z-Test/./test-utf8.tex)




-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-17 Thread Otared Kavian
Thanks Luigi for the link, but unfortunately the version 3.89 of TeXShop does 
not work for me (even with the magic line 
%!TEX useOldSyncParser
put at the begining of the source file), while version 3.77 does the sync stuff 
as expected, even by opening an \input source file.

I have put here


https://www.dropbox.com/sh/68gfmzci1g67y5d/AABxdQ9sZsCiR9k6se_4zX0ga?dl=0

example files which can be tested with various versions of TeXShop. I don’t 
have versions between 3.78 and 3.87, but my experience shows that the syncing 
works between the resulting PDF file of a source file typeset with ConTeXt 
version 2017.11.15 22:08 and TeXShop version 3.77, while the syncing does not 
work with versions 3.88 and 3.89.

Best regards: OK

> On 17 Nov 2017, at 14:31, luigi scarso  wrote:
> 
> On Fri, Nov 17, 2017 at 2:27 PM, Otared Kavian  wrote:
>> Hi Alan,
>> 
>> A few weeks ago Steffen Wolfrum and myself reported the issue to Richard
>> Koch who did some research and discovered the origin of the problem. He has
>> written again the part of the code related to synctex and ConTeXt and will
>> issue a new version where the problem is fixed.
>> 
>> In the meanwhile you can use a previous version of TeXShop (I use version 77
>> and I can send you a Dropbox link to download it, of you wish) where the
>> syncing between the PDF result and the ConTeXt source works fine.
>> 
>> Best regards: OK
>> 
> 
> 
> http://pages.uoregon.edu/koch/texshop/changes_3.html
> 
> 
> -- 
> luigi
> ___
> 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
> ___

___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-17 Thread Hans Hagen

On 11/17/2017 2:31 PM, luigi scarso wrote:

On Fri, Nov 17, 2017 at 2:27 PM, Otared Kavian  wrote:

Hi Alan,

A few weeks ago Steffen Wolfrum and myself reported the issue to Richard
Koch who did some research and discovered the origin of the problem. He has
written again the part of the code related to synctex and ConTeXt and will
issue a new version where the problem is fixed.

In the meanwhile you can use a previous version of TeXShop (I use version 77
and I can send you a Dropbox link to download it, of you wish) where the
syncing between the PDF result and the ConTeXt source works fine.

Best regards: OK




http://pages.uoregon.edu/koch/texshop/changes_3.html
it's not clear to me why a newer parser lib would fail on an older 
synctex format (whatever the change is) .. sumatra pdf works (last 
updates ayear ago) works ok


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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-17 Thread Alan Bowen
Otared, Luigi—many thanks for your help. I read the changes file—I
neglected to do this when I downloaded TeXShop 3.89— and have added the
line
% !TEX useOldSyncParser
into my source file.  Synctex is now working as it should (with the latest
ConTeXt and TeXShop).

All best, Alan

On Fri, Nov 17, 2017 at 8:31 AM, luigi scarso 
wrote:

> On Fri, Nov 17, 2017 at 2:27 PM, Otared Kavian  wrote:
> > Hi Alan,
> >
> > A few weeks ago Steffen Wolfrum and myself reported the issue to Richard
> > Koch who did some research and discovered the origin of the problem. He
> has
> > written again the part of the code related to synctex and ConTeXt and
> will
> > issue a new version where the problem is fixed.
> >
> > In the meanwhile you can use a previous version of TeXShop (I use
> version 77
> > and I can send you a Dropbox link to download it, of you wish) where the
> > syncing between the PDF result and the ConTeXt source works fine.
> >
> > Best regards: OK
> >
>
>
> http://pages.uoregon.edu/koch/texshop/changes_3.html
>
>
> --
> luigi
> 
> ___
> 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
> 
> ___
>
___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-17 Thread luigi scarso
On Fri, Nov 17, 2017 at 2:27 PM, Otared Kavian  wrote:
> Hi Alan,
>
> A few weeks ago Steffen Wolfrum and myself reported the issue to Richard
> Koch who did some research and discovered the origin of the problem. He has
> written again the part of the code related to synctex and ConTeXt and will
> issue a new version where the problem is fixed.
>
> In the meanwhile you can use a previous version of TeXShop (I use version 77
> and I can send you a Dropbox link to download it, of you wish) where the
> syncing between the PDF result and the ConTeXt source works fine.
>
> Best regards: OK
>


http://pages.uoregon.edu/koch/texshop/changes_3.html


-- 
luigi
___
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
___

Re: [NTG-context] synctex and TeXShop problem

2017-11-17 Thread Otared Kavian
Hi Alan,

A few weeks ago Steffen Wolfrum and myself reported the issue to Richard Koch 
who did some research and discovered the origin of the problem. He has written 
again the part of the code related to synctex and ConTeXt and will issue a new 
version where the problem is fixed.

In the meanwhile you can use a previous version of TeXShop (I use version 77 
and I can send you a Dropbox link to download it, of you wish) where the 
syncing between the PDF result and the ConTeXt source works fine.

Best regards: OK

> On 17 Nov 2017, at 14:19, Alan Bowen  wrote:
> 
> With the latest betas, I see that with the TeXShop Engine
> 
> #!/bin/tcsh
> 
> # Before using this engine, you must run the following command once in 
> Terminal: luatools --generate
> 
> set path= ($path /usr/texbin 
> /Users/bowen1/Dropbox/ConTeXt/tex/texmf-osx-64/bin)
> mtxrun --script context --autogenerate --file-line-error "$1”
> 
> and
> \setupsynctex[state=start, method=max]
> in the source file, the requisite filename.synctex auxiliary file is produced 
> on processing.
> 
> But I am still not getting any linkage between the source file and the 
> preview file, that is, clicking on one does not have any effect on the other. 
> Is there something else that I need?
> 
> I am running ConTeXt  ver: 2017.11.15 with macOS 10.13.1.
> 
> Alan
> ___
> 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
> ___

___
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
___

[NTG-context] synctex and TeXShop problem

2017-11-17 Thread Alan Bowen
With the latest betas, I see that with the TeXShop Engine

#!/bin/tcsh

# Before using this engine, you must run the following command once in
Terminal: luatools --generate

set path= ($path /usr/texbin
/Users/bowen1/Dropbox/ConTeXt/tex/texmf-osx-64/bin)
mtxrun --script context --autogenerate --file-line-error "$1”

and
\setupsynctex[state=start, method=max]
in the source file, the requisite *filename*.synctex auxiliary file is
produced on processing.

But I am still not getting any linkage between the source file and the
preview file, that is, clicking on one does not have any effect on the
other. Is there something else that I need?

I am running ConTeXt  ver: 2017.11.15 with macOS 10.13.1.

Alan
___
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
___

Re: [NTG-context] synctex, TeXShop and \input files

2017-09-28 Thread Otared Kavian
Hi Hans,

Thanks for the hint. Indeed every input file has got a reference in synctex 
file produced by ConTeXt. 
(I noticed also that during the typesetting ConTeXt creates another file with a 
suffix syncctx which is wiped out at the end of the processinng).

On the other hand after reading your hint I tried the same files with another 
application, TeXWorks, and there the syncing works perfectly. 
Therefore it seems that this is a problem with TeXShop and I am going to report 
a bug with Richard Koch.

Best regards: OK



> On 28 Sep 2017, at 22:44, Hans Hagen  wrote:
> 
> On 9/28/2017 9:30 PM, Otared Kavian wrote:
>>> On 28 Sep 2017, at 19:12, Hans Hagen mailto:pra...@wxs.nl>> 
>>> wrote:
 […]
>>> files in the tex tree (styles and such) are not accessible (protected) as 
>>> you don't want them to get messed up
>> Sure, but my problem is that I have a document with five or six chapters. 
>> Each chapter is included in files which are named for instance
>> chapter-1.tex
>> chapter-2.tex
>> and so on.  Then my file main.tex contains the lines
>> \input chapter-1.tex
>> \input chapter-2.tex
>> and so on, in order to typeset the whole document. But now I don’t know how 
>> to sync the PDF file with the source files chapter-1.tex, chapter-2.tex, 
>> etc., in order to correct mistakes or mistypings when I discover them in the 
>> PDF file.
>> Clearly, the main file and these files are residing in the same directory.
>> Is there a way to tell context to look into the directory where the main 
>> file and my chapter files are?
> 
> it works here .. you can look in the synctex file to see if the files get 
> references
> 
> 
> -
>  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
> ___

___
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
___

Re: [NTG-context] synctex, TeXShop and \input files

2017-09-28 Thread Hans Hagen

On 9/28/2017 9:30 PM, Otared Kavian wrote:



On 28 Sep 2017, at 19:12, Hans Hagen > wrote:

[…]
files in the tex tree (styles and such) are not accessible (protected) 
as you don't want them to get messed up


Sure, but my problem is that I have a document with five or six 
chapters. Each chapter is included in files which are named for instance

chapter-1.tex
chapter-2.tex
and so on.  Then my file main.tex contains the lines
\input chapter-1.tex
\input chapter-2.tex
and so on, in order to typeset the whole document. But now I don’t know 
how to sync the PDF file with the source files chapter-1.tex, 
chapter-2.tex, etc., in order to correct mistakes or mistypings when I 
discover them in the PDF file.

Clearly, the main file and these files are residing in the same directory.

Is there a way to tell context to look into the directory where the main 
file and my chapter files are?


it works here .. you can look in the synctex file to see if the files 
get references



-
  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
___

Re: [NTG-context] synctex, TeXShop and \input files

2017-09-28 Thread Otared Kavian


> On 28 Sep 2017, at 19:12, Hans Hagen  wrote:
>> […]
> files in the tex tree (styles and such) are not accessible (protected) as you 
> don't want them to get messed up

Sure, but my problem is that I have a document with five or six chapters. Each 
chapter is included in files which are named for instance
chapter-1.tex
chapter-2.tex
and so on.  Then my file main.tex contains the lines 
\input chapter-1.tex
\input chapter-2.tex
and so on, in order to typeset the whole document. But now I don’t know how to 
sync the PDF file with the source files chapter-1.tex, chapter-2.tex, etc., in 
order to correct mistakes or mistypings when I discover them in the PDF file.
Clearly, the main file and these files are residing in the same directory.

Is there a way to tell context to look into the directory where the main file 
and my chapter files are?

Thanks a lot for your attention.
Best regards: OK___
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
___

Re: [NTG-context] synctex, TeXShop and \input files

2017-09-28 Thread Hans Hagen

On 9/28/2017 4:44 PM, Otared Kavian wrote:

Hi all,

Some time ago Hans added a new synctex command which seemed to work quite well: 
on a Mac running MacOS and TeXShop I could for instance click on a sentence in 
the PDF file produced by ConTeXt and the sentence was highlighted in the source 
file, even it were part of an \input file. For instance after typesetting the 
file:

%%% begin synctex-example.tex
\setupsynctex[state=start,method=max]
\starttext
\input knuth.tex
\hairline
\input ward.tex
\stoptext
%%% end synctex-example.tex

I could click on the sentence « The separation of any of these » in the PDF 
file and the file knuth.tex was opened and those words highlighted.

In the recent versions of ConTeXt (the latest being ConTeXt  version 2017.09.25 
19:19 MKIV) this does not seem to work anymore. As a matter of fact even when 
the source file is not an \input file, the syncing between the PDF and the 
source does not work anymore.

So my questions are the following (the « or » below is a mathematical one…):

1) Has the \setupsynctex command changed recently?
2) Or am I having troubles with the latest version of TeXShop (version 3.88).
3) Or is there an issue with the MacOS I am using (version 10.13 Beta).

Thanks in advance for any kind of help.
files in the tex tree (styles and such) are not accessible (protected) 
as you don't want them to get messed up


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
___

[NTG-context] synctex, TeXShop and \input files

2017-09-28 Thread Otared Kavian
Hi all,

Some time ago Hans added a new synctex command which seemed to work quite well: 
on a Mac running MacOS and TeXShop I could for instance click on a sentence in 
the PDF file produced by ConTeXt and the sentence was highlighted in the source 
file, even it were part of an \input file. For instance after typesetting the 
file:

%%% begin synctex-example.tex
\setupsynctex[state=start,method=max]
\starttext
\input knuth.tex
\hairline
\input ward.tex
\stoptext
%%% end synctex-example.tex

I could click on the sentence « The separation of any of these » in the PDF 
file and the file knuth.tex was opened and those words highlighted.

In the recent versions of ConTeXt (the latest being ConTeXt  version 2017.09.25 
19:19 MKIV) this does not seem to work anymore. As a matter of fact even when 
the source file is not an \input file, the syncing between the PDF and the 
source does not work anymore.

So my questions are the following (the « or » below is a mathematical one…): 

1) Has the \setupsynctex command changed recently? 
2) Or am I having troubles with the latest version of TeXShop (version 3.88).
3) Or is there an issue with the MacOS I am using (version 10.13 Beta).

Thanks in advance for any kind of help.

Best regards: OK
___
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
___

Re: [NTG-context] synctex

2017-07-19 Thread Thomas Floeren

> On 11. Jul 2017, at 23:06, Thomas Floeren  wrote:
> 
>> 
>> On 11. Jul 2017, at 17:09, Hans Hagen mailto:pra...@wxs.nl>> 
>> wrote:
>> 
>> On 7/11/2017 4:36 PM, Thomas Floeren wrote:
 On 4. Jun 2017, at 18:55, Hans Hagen >>> > wrote:
 
 Hi,
 
 For those using synctex, an alternative method is:
 
 \setupsynctex[state=start]
 
 It is tuned for use in a more complex setup where one wants access to 
 source files (with content) and not to e.g. styles in a tex tree. It also 
 works reasonable well with (also included) xml files. Personally I never 
 use synctex but for some projects it came in handy for authors (think of 
 proofing xml files with hundreds of nested inclusions and files in a 
 rather branched tree.) Of course you can expect a similar performance hit 
 as normal synctex but commenting the above line in production results in 
 zero overhead. Using the syntex flag on the command line 
 (--synctex=context will work) can be messy.
 
 This currently only works with the windows binaries version on the garden 
 (as we need luatex 1.0.5).
>>> Hans, thanks for that info.
>>> \setupsynctex[state=start] seems to work fine with Beta 2017.07.05 23:01 - 
>>> LuaTeX 1.05.0 on the Mac.
>>> Whereas I noticed that -the switches -synctex=context or --synctex=zipped 
>>> have completely stopped working with that Beta (or that luatex version).
>> 
>> i'll have to upload a new beta ... last week i optimized the code a bit so 
>> performance is now a bit better too; there are some options you can play 
>> with to see what happens deep down
>> 
>> % \setupsynctex[state=start,method=min]
>> % \setupsynctex[state=start,method=max]
>> % \enabletrackers[system.synctex.visualize]
>> % \enabletrackers[system.synctex.visualize=real]
>> 
>> indeed, we now have a context specific variant only (you can still force the 
>> original synctex by setting \normalsynctex but it can interfere with the 
>> context variant when set)
> 
> 
> I think I have found a problem with the new synctex:
> 
> Synctex works perfectly fine – until the first occurence of a \readfile. From 
> that point on it always takes me to the imported file, no matter whether the 
> text actually is in the imported file or in the main file.
> 
> Here is a MWE:
> 
> \setupsynctex[state=start,method=max]
> \starttext
> This line is found by the new synctex.\crlf
> This line is found by the new synctex.\crlf
> This line is found by the new synctex.\crlf
> This line is found by the new synctex.\crlf
> \readfile{myInputfile}{}{}
> This line is {\em not} found by the new synctex.\crlf
> Instead, synctex takes me to myInputfile.tex.\crlf
> This line is {\em not} found by the new synctex.\crlf
> Instead, synctex takes me to myInputfile.tex.\crlf
> \stoptext
> 
> ['myInputfile.tex' can contain any text, it doesn't matter.]
> 
> If I click one of the first four lines in the PDF synctex works fine. The 
> lines after the \readfile don't work: Synctex takes me to the end of 
> myInputfile.tex. (You can also import 'ward' or 'knuth', in that case synctex 
> takes me to the last line _before_ the \readfile.)

With 2017.07.17 00:20 the issue seems to persist.

Tom


> 
> I tested the sample with an older Ctx and with --synctex=zipped, and it 
> doesn't show the problem.
> 
> -- 
> Tom
> ___
> 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 
> ___

___
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
___

Re: [NTG-context] synctex

2017-07-11 Thread Thomas Floeren

> On 11. Jul 2017, at 17:09, Hans Hagen  wrote:
> 
> On 7/11/2017 4:36 PM, Thomas Floeren wrote:
>>> On 4. Jun 2017, at 18:55, Hans Hagen  wrote:
>>> 
>>> Hi,
>>> 
>>> For those using synctex, an alternative method is:
>>> 
>>> \setupsynctex[state=start]
>>> 
>>> It is tuned for use in a more complex setup where one wants access to 
>>> source files (with content) and not to e.g. styles in a tex tree. It also 
>>> works reasonable well with (also included) xml files. Personally I never 
>>> use synctex but for some projects it came in handy for authors (think of 
>>> proofing xml files with hundreds of nested inclusions and files in a rather 
>>> branched tree.) Of course you can expect a similar performance hit as 
>>> normal synctex but commenting the above line in production results in zero 
>>> overhead. Using the syntex flag on the command line (--synctex=context will 
>>> work) can be messy.
>>> 
>>> This currently only works with the windows binaries version on the garden 
>>> (as we need luatex 1.0.5).
>> Hans, thanks for that info.
>> \setupsynctex[state=start] seems to work fine with Beta 2017.07.05 23:01 - 
>> LuaTeX 1.05.0 on the Mac.
>> Whereas I noticed that -the switches -synctex=context or --synctex=zipped 
>> have completely stopped working with that Beta (or that luatex version).
> 
> i'll have to upload a new beta ... last week i optimized the code a bit so 
> performance is now a bit better too; there are some options you can play with 
> to see what happens deep down
> 
> % \setupsynctex[state=start,method=min]
> % \setupsynctex[state=start,method=max]
> % \enabletrackers[system.synctex.visualize]
> % \enabletrackers[system.synctex.visualize=real]
> 
> indeed, we now have a context specific variant only (you can still force the 
> original synctex by setting \normalsynctex but it can interfere with the 
> context variant when set)


I think I have found a problem with the new synctex:

Synctex works perfectly fine – until the first occurence of a \readfile. From 
that point on it always takes me to the imported file, no matter whether the 
text actually is in the imported file or in the main file.

Here is a MWE:

\setupsynctex[state=start,method=max]
\starttext
This line is found by the new synctex.\crlf
This line is found by the new synctex.\crlf
This line is found by the new synctex.\crlf
This line is found by the new synctex.\crlf
\readfile{myInputfile}{}{}
This line is {\em not} found by the new synctex.\crlf
Instead, synctex takes me to myInputfile.tex.\crlf
This line is {\em not} found by the new synctex.\crlf
Instead, synctex takes me to myInputfile.tex.\crlf
\stoptext

['myInputfile.tex' can contain any text, it doesn't matter.]

If I click one of the first four lines in the PDF synctex works fine. The lines 
after the \readfile don't work: Synctex takes me to the end of myInputfile.tex. 
(You can also import 'ward' or 'knuth', in that case synctex takes me to the 
last line _before_ the \readfile.)

I tested the sample with an older Ctx and with --synctex=zipped, and it doesn't 
show the problem.

-- 
Tom___
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
___

Re: [NTG-context] synctex

2017-07-11 Thread Hans Hagen

On 7/11/2017 4:36 PM, Thomas Floeren wrote:



On 4. Jun 2017, at 18:55, Hans Hagen  wrote:

Hi,

For those using synctex, an alternative method is:

\setupsynctex[state=start]

It is tuned for use in a more complex setup where one wants access to source 
files (with content) and not to e.g. styles in a tex tree. It also works 
reasonable well with (also included) xml files. Personally I never use synctex 
but for some projects it came in handy for authors (think of proofing xml files 
with hundreds of nested inclusions and files in a rather branched tree.) Of 
course you can expect a similar performance hit as normal synctex but 
commenting the above line in production results in zero overhead. Using the 
syntex flag on the command line (--synctex=context will work) can be messy.

This currently only works with the windows binaries version on the garden (as 
we need luatex 1.0.5).


Hans, thanks for that info.

\setupsynctex[state=start] seems to work fine with Beta 2017.07.05 23:01 - 
LuaTeX 1.05.0 on the Mac.

Whereas I noticed that -the switches -synctex=context or --synctex=zipped have 
completely stopped working with that Beta (or that luatex version).


i'll have to upload a new beta ... last week i optimized the code a bit 
so performance is now a bit better too; there are some options you can 
play with to see what happens deep down


% \setupsynctex[state=start,method=min]
% \setupsynctex[state=start,method=max]
% \enabletrackers[system.synctex.visualize]
% \enabletrackers[system.synctex.visualize=real]

indeed, we now have a context specific variant only (you can still force 
the original synctex by setting \normalsynctex but it can interfere with 
the context variant when set)


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
___

Re: [NTG-context] synctex

2017-07-11 Thread Thomas Floeren

> On 4. Jun 2017, at 18:55, Hans Hagen  wrote:
> 
> Hi,
> 
> For those using synctex, an alternative method is:
> 
> \setupsynctex[state=start]
> 
> It is tuned for use in a more complex setup where one wants access to source 
> files (with content) and not to e.g. styles in a tex tree. It also works 
> reasonable well with (also included) xml files. Personally I never use 
> synctex but for some projects it came in handy for authors (think of proofing 
> xml files with hundreds of nested inclusions and files in a rather branched 
> tree.) Of course you can expect a similar performance hit as normal synctex 
> but commenting the above line in production results in zero overhead. Using 
> the syntex flag on the command line (--synctex=context will work) can be 
> messy.
> 
> This currently only works with the windows binaries version on the garden (as 
> we need luatex 1.0.5).

Hans, thanks for that info.

\setupsynctex[state=start] seems to work fine with Beta 2017.07.05 23:01 - 
LuaTeX 1.05.0 on the Mac.

Whereas I noticed that -the switches -synctex=context or --synctex=zipped have 
completely stopped working with that Beta (or that luatex version).

It throws errors like this on every file I've tested:

lua error   > lua error on line 33 in file ../c-000-s3-e6-front-de.tex:

...eta/tex/texmf-context/tex/context/base/mkiv/node-syn.lua:490: attempt to 
call upvalue 'collect' (a nil value)
stack traceback:
...eta/tex/texmf-context/tex/context/base/mkiv/node-syn.lua:490: in 
function 'luatex_synctex_collect'
[string "local nodes_references_handler = nodes.refere..."]:14: in 
function <[string "local nodes_references_handler = nodes.refere..."]:7>
(...tail calls...)
...eta/tex/texmf-context/tex/context/base/mkiv/pack-obj.lua:129: in 
function <...eta/tex/texmf-context/tex/context/base/mkiv/pack-obj.lua:127>
(...tail calls...)


So, I guess it is safe to assume that the synctex command line switch is 
finally deprecated?

-- 
Tom
___
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
___

[NTG-context] synctex

2017-06-04 Thread Hans Hagen

Hi,

For those using synctex, an alternative method is:

\setupsynctex[state=start]

It is tuned for use in a more complex setup where one wants access to 
source files (with content) and not to e.g. styles in a tex tree. It 
also works reasonable well with (also included) xml files. Personally I 
never use synctex but for some projects it came in handy for authors 
(think of proofing xml files with hundreds of nested inclusions and 
files in a rather branched tree.) Of course you can expect a similar 
performance hit as normal synctex but commenting the above line in 
production results in zero overhead. Using the syntex flag on the 
command line (--synctex=context will work) can be messy.


This currently only works with the windows binaries version on the 
garden (as we need luatex 1.0.5).


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
___

Re: [NTG-context] SyncTeX (TeXworks) - \enabledirectives[system.synctex] (now with attachments)

2015-07-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

any answer to "\enabledirectives[system.synctex]" functionality or 
deprecateness?

Best regards,

Lukas


On Sat, 18 Jul 2015 09:43:29 +0200, Procházka Lukáš Ing. - Pontex s. r. o. 
 wrote:


Hello,

two questions related to SyncTeX (and maybe on TeXworks):

1. The following code:


\enabledirectives[system.synctex]

\starttext
Hello!
\startluacode % line 6
  context("Something")
\stopluacode
\stoptext


doesn't produce SyncTeX file (SyncTeX.synctex.gz).

When I compile the file with "context.exe --synctex" option, the file is 
produced.

Does it mean that "\enabledirectives[system.synctex]" is deprecated?


2. In the code above, text "Hello!" is generated in "normal TeX scope" whilst 
"Something" is generated from within Lua.

When I click "Jump to source" from TeXworks editor and previewer, jumping from 
"Something" works well and goes to the source "SyncTeX.mkiv" correctly.

"Jumping to source" from "Something" yields "Cannot read file 
" error (see attached picture).

I don't know whether this relates to ConTeXt or rather TeXworks;
for the case it should relate to ConTeXt, would it be possible generate an anchor (e.g.) to the nearest 
encapsulating \startluacode (if present; or \ctxlua, \cldcontext and so), so that "Jump to source" 
over "Something" would jump to \startluacode on "line 6"?

Best regards,

Lukas





--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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
___

[NTG-context] SyncTeX (TeXworks) - \enabledirectives[system.synctex] (now with attachments)

2015-07-18 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

two questions related to SyncTeX (and maybe on TeXworks):

1. The following code:


\enabledirectives[system.synctex]

\starttext
   Hello!
   \startluacode % line 6
 context("Something")
   \stopluacode
\stoptext


doesn't produce SyncTeX file (SyncTeX.synctex.gz).

When I compile the file with "context.exe --synctex" option, the file is 
produced.

Does it mean that "\enabledirectives[system.synctex]" is deprecated?


2. In the code above, text "Hello!" is generated in "normal TeX scope" whilst 
"Something" is generated from within Lua.

When I click "Jump to source" from TeXworks editor and previewer, jumping from 
"Something" works well and goes to the source "SyncTeX.mkiv" correctly.

"Jumping to source" from "Something" yields "Cannot read file 
" error (see attached picture).

I don't know whether this relates to ConTeXt or rather TeXworks;
for the case it should relate to ConTeXt, would it be possible generate an anchor (e.g.) to the nearest 
encapsulating \startluacode (if present; or \ctxlua, \cldcontext and so), so that "Jump to source" 
over "Something" would jump to \startluacode on "line 6"?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

SyncTeX.mkiv
Description: Binary data
___
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
___

[NTG-context] SyncTeX (TeXworks) - \enabledirectives[system.synctex]

2015-07-18 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

two questions related to SyncTeX (and maybe on TeXworks):

1. The following code:


\enabledirectives[system.synctex]

\starttext
  Hello!
  \startluacode % line 6
context("Something")
  \stopluacode
\stoptext


doesn't produce SyncTeX file (SyncTeX.synctex.gz).

When I compile the file with "context.exe --synctex" option, the file is 
produced.

Does it mean that "\enabledirectives[system.synctex]" is deprecated?


2. In the code above, text "Hello!" is generated in "normal TeX scope" whilst 
"Something" is generated from within Lua.

When I click "Jump to source" from TeXworks editor and previewer, jumping from 
"Something" works well and goes to the source "SyncTeX.mkiv" correctly.

"Jumping to source" from "Something" yields "Cannot read file 
" error (see attached picture).

I don't know whether this relates to ConTeXt or rather TeXworks;
for the case it should relate to ConTeXt, would it be possible generate an anchor (e.g.) to the nearest 
encapsulating \startluacode (if present; or \ctxlua, \cldcontext and so), so that "Jump to source" 
over "Something" would jump to \startluacode on "line 6"?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-08 Thread Otared Kavian
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
> ___

___
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-08 Thread Hans Hagen

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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-08 Thread Otared Kavian
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



pref-texshop.pdf
Description: Adobe PDF document


> 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
> ___

___
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-07 Thread Thomas Floeren

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
___

[NTG-context] SyncTeX and mkiv

2015-04-07 Thread Akira Kakuto

Dear Mojca,

Here
(1) context --synctex filename
(2) context --synctex=1 filename
(3) context --synctex=-1 filename
all work.  (1) and (2) are equivalent.

\enabledirectives[system.synctex]
\starttext
... ...
\stoptext

in a source does not work correctly.
(Input files are not recorded in a data correctly.)

Best,
Akira

___
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-07 Thread Otared Kavian
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
> ___

___
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-07 Thread Mojca Miklavec
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-07 Thread Otared Kavian
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
> ___

___
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
___

Re: [NTG-context] SyncTeX and mkiv

2015-04-06 Thread Andreas Schneider
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
___

[NTG-context] SyncTeX and mkiv

2015-03-31 Thread Otared Kavian
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
___
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
___

Re: [NTG-context] SyncTeX

2014-06-03 Thread Trond Thorbjørnsen
Hei Mojca,

Mojca Miklavec skrev 03.06.2014:
> On Tue, Jun 3, 2014 at 11:44 AM, Trond Thorbjørnsen wrote: 
> > Is MKIV still not working with SyncTeX? 
> > 
> > http://wiki.contextgarden.net/SyncTeX 
> 
> Using: 
> context --synctex filename.tex 
> works for me. 

Thank you for the reply, that was what I thought. Then it is probably
only my view settings in emacs that is wrong.

(And the sentence "SyncTeX currently does not work with MKIV." should
probably be removed from wiki.contextgarden :) )

-Trond

> 
> Mojca 
> ___
>  
> If your question is of interest to others as well, please add an entry to the 
> Wiki! 
> 
> maillist : ntg-context@ntg.nl / 
> https://heim.ifi.uio.no/trondth/.t/pm06Gceaq3.php (..)ntg.nl(..) 
> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net 
> archive : https://heim.ifi.uio.no/trondth/.t/Xo1s69g0pG.php 
> (..)foundry.supelec.fr(..) 
> wiki : http://contextgarden.net 
> ___
>  
___
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
___


Re: [NTG-context] SyncTeX

2014-06-03 Thread Mojca Miklavec
On Tue, Jun 3, 2014 at 11:44 AM, Trond Thorbjørnsen wrote:
> Is MKIV still not working with SyncTeX?
>
> http://wiki.contextgarden.net/SyncTeX

Using:
context --synctex filename.tex
works for me.

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
___

[NTG-context] SyncTeX

2014-06-03 Thread Trond Thorbjørnsen
Is MKIV still not working with SyncTeX?

http://wiki.contextgarden.net/SyncTeX

--
Trond Thorbjørnsen
___
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
___


Re: [NTG-context] synctex problem

2013-03-23 Thread Ulrike Fischer
Am Wed, 20 Mar 2013 23:08:24 +0100 schrieb Hans Hagen:


>> Is it possible to tell context to create a .synctex file instead of
>> a .synctex.gz?
 
> I've added --synctex=unzipped (or zipped or 1 or -1 or anything 
> boolean). No upload yet.

Thanks!

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___


Re: [NTG-context] synctex problem

2013-03-20 Thread Hans Hagen

On 3/20/2013 6:24 PM, Ulrike Fischer wrote:

Is it possible to tell context to create a .synctex file instead of
a .synctex.gz?


I've added --synctex=unzipped (or zipped or 1 or -1 or anything 
boolean). No upload yet.



(Or alternativly does someone know how to get sumatra (on windows)
to handle a synctex.gz?)


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
___


[NTG-context] synctex problem

2013-03-20 Thread Ulrike Fischer
Is it possible to tell context to create a .synctex file instead of
a .synctex.gz? 

(Or alternativly does someone know how to get sumatra (on windows)
to handle a synctex.gz?)

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___


Re: [NTG-context] Synctex problems with context and texworks

2012-11-12 Thread Vladimir Lomov
Hello,

** "H. Özoguz" [2012-11-12 08:53:46 +0100]:

> Hello there,

> sind yesterday the pdf-view with synctex had no problems. But today,
> without any change (afaik), it does not work anymore. The arguments
> for compiling with context.exe are

> --synctex
> $fullname

> That is default. I deleted the .synctex.gz files manually, but it
> did not help. What could be the problem?

Wild guess:

http://tug.org/pipermail/texworks/2012q1/005238.html

---
WBR, Vladimir Lomov

-- 
There is a certain impertinence in allowing oneself to be burned for an opinion.
-- Anatole France
___
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
___


Re: [NTG-context] Synctex problems with context and texworks

2012-11-12 Thread Taco Hoekwater

On 11/12/2012 09:31 AM, Hans Hagen wrote:

On 11/12/2012 8:53 AM, "H. Özoguz" wrote:

Hello there,

sind yesterday the pdf-view with synctex had no problems. But today,
without any change (afaik), it does not work anymore. The arguments for
compiling with context.exe are

--synctex
$fullname

That is default. I deleted the .synctex.gz files manually, but it did
not help. What could be the problem?


if you get a synctex.gz file then the problem is with texworks


The are no changes in the way context produces the filename paths?
Synctex is a bit fragile when it comes to filenames within the
.synctex[.gz] file.

Best wishes,
Taco

___
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
___


Re: [NTG-context] Synctex problems with context and texworks

2012-11-12 Thread Hans Hagen

On 11/12/2012 8:53 AM, "H. Özoguz" wrote:

Hello there,

sind yesterday the pdf-view with synctex had no problems. But today,
without any change (afaik), it does not work anymore. The arguments for
compiling with context.exe are

--synctex
$fullname

That is default. I deleted the .synctex.gz files manually, but it did
not help. What could be the problem?


if you get a synctex.gz file then the problem is with texworks

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
___


[NTG-context] Synctex problems with context and texworks

2012-11-11 Thread H. Özoguz

Hello there,

sind yesterday the pdf-view with synctex had no problems. But today, 
without any change (afaik), it does not work anymore. The arguments for 
compiling with context.exe are


--synctex
$fullname

That is default. I deleted the .synctex.gz files manually, but it did 
not help. What could be the problem?


Thanks
Huseyin


___
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
___


Re: [NTG-context] \synctex=1 ignored in mkiv

2011-03-11 Thread Hans Hagen

On 11-3-2011 7:12, Mojca Miklavec wrote:


Thank you. What exactly was the reason to disable the old syntax? Why
not maybe defining it to give at least a warning (or even error)
printing out a message saying what to do. It is a bit weird to see the
code compile fine without ever noticing that something went wrong.


there are a few more primitives disabled (and an overload with message 
is no option as there is no way to intercept the parser)


reasons: more consistency, less error prone, better tracing etc


Is there any chance that a single command would be provided that would
work both in mkii and mkiv (in mkii it would call \synctex=1 and in
mkiv it would call \enabledirectives[system,synctex])?


 ^ period !

i'm not going to bother about mkii in this respect, in mkiv we move away 
from variables in favor of directives, trackers and experiments


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
___


Re: [NTG-context] \synctex=1 ignored in mkiv

2011-03-11 Thread Mojca Miklavec
On Fri, Mar 11, 2011 at 18:31, Hans Hagen wrote:
> On 11-3-2011 3:38, Mojca Miklavec wrote:
>>
>> Dear Hans,
>>
>> subject says it all: when I use \synctex=1 in mkiv, I don't get any
>> ..synctex.gz file. The --synctex switch works however (which is exactly
>> the opposite of what used to be the case a while ago :).
>
> \synctex is a nop in mkiv, use a proper directive instead:
>
> \enabledirectives[system.synctex]

Thank you. What exactly was the reason to disable the old syntax? Why
not maybe defining it to give at least a warning (or even error)
printing out a message saying what to do. It is a bit weird to see the
code compile fine without ever noticing that something went wrong.

Is there any chance that a single command would be provided that would
work both in mkii and mkiv (in mkii it would call \synctex=1 and in
mkiv it would call \enabledirectives[system,synctex])?

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
___


Re: [NTG-context] \synctex=1 ignored in mkiv

2011-03-11 Thread Hans Hagen

On 11-3-2011 3:38, Mojca Miklavec wrote:

Dear Hans,

subject says it all: when I use \synctex=1 in mkiv, I don't get any
..synctex.gz file. The --synctex switch works however (which is exactly
the opposite of what used to be the case a while ago :).


\synctex is a nop in mkiv, use a proper directive instead:

\enabledirectives[system.synctex]

-
  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
___


Re: [NTG-context] \synctex=1 ignored in mkiv

2011-03-11 Thread 李延瑞
2011/3/11 Mojca Miklavec :
> Dear Hans,
>
> subject says it all: when I use \synctex=1 in mkiv, I don't get any
> .synctex.gz file. The --synctex switch works however (which is exactly
> the opposite of what used to be the case a while ago :).
>

Hi Mojca,

\enabledirectives[system.synctex] is instead of \synctex=1 in mkiv.


-- 
Best regards,

Li Yanrui (李延瑞)
___
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
___


[NTG-context] \synctex=1 ignored in mkiv

2011-03-11 Thread Mojca Miklavec
Dear Hans,

subject says it all: when I use \synctex=1 in mkiv, I don't get any
.synctex.gz file. The --synctex switch works however (which is exactly
the opposite of what used to be the case a while ago :).

In MKII both works.

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
___


Re: [NTG-context] synctex and --result

2010-06-19 Thread Yury G. Kudryashov
Hans Hagen wrote:

> On 19-6-2010 3:58, Yury G. Kudryashov wrote:
>> Hi!
>>
>> I try to use ConTeXt with synctex. I generate two versions of my paper,
>> so I use --result option. Context renames the .pdf file, but not
>> .synctex.gz, hence inverse search doesn't work. As a workaround, I
>> renamed the "draft for me" version to the default output name.
> 
> indeed only the pdf,log,tuc files are renamed .. handling more is
> possible but i wonder where we will end then as there can be more such
> files
> 
> i never use synctex but i suppose it's meant for a edit/preview cycle so
> normally one then deals with one file anyway
Yes. I had name-screen.pdf, name-print.pdf, name-draft.pdf and no name.pdf. 
I'll add "you shouldn't use synctex with --result" to wiki tomorrow.

___
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
___


Re: [NTG-context] synctex and --result

2010-06-19 Thread Hans Hagen

On 19-6-2010 3:58, Yury G. Kudryashov wrote:

Hi!

I try to use ConTeXt with synctex. I generate two versions of my paper, so I
use --result option. Context renames the .pdf file, but not .synctex.gz,
hence inverse search doesn't work. As a workaround, I renamed the "draft for
me" version to the default output name.


indeed only the pdf,log,tuc files are renamed .. handling more is 
possible but i wonder where we will end then as there can be more such 
files


i never use synctex but i suppose it's meant for a edit/preview cycle so 
normally one then deals with one file anyway


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
___


[NTG-context] synctex and --result

2010-06-19 Thread Yury G. Kudryashov
Hi!

I try to use ConTeXt with synctex. I generate two versions of my paper, so I 
use --result option. Context renames the .pdf file, but not .synctex.gz, 
hence inverse search doesn't work. As a workaround, I renamed the "draft for 
me" version to the default output name.

___
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
___


Re: [NTG-context] synctex broken

2010-03-23 Thread Akira Kakuto
Hi Taco,

> Synctex support should be fixed in the latest revision (3536).

Thanks very much.
I have confirmed that synctex works as before in revision 3536.

Thanks,
Akira

___
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
___


Re: [NTG-context] synctex broken

2010-03-22 Thread Taco Hoekwater
Hi,

For those of you willing to build and test the TRUNK of luatex:

Synctex support should be fixed in the latest revision (3536).

Best wishes,
Taco

Taco Hoekwater wrote:
> Steffen Wolfrum wrote:
>> Am 21.03.2010 um 12:19 schrieb Hans Hagen:
>>
>>> On 21-3-2010 10:53, Steffen Wolfrum wrote:
 Hi,

 with yesterdays beta (ConTeXt  ver: 2010.03.20 22:59 MKIV) synctex
 seems to be broken:
 no response in none direction (source<->pdf).
>>> unrelated to context as synctex is an engine feature
>>
>>
>> please have a look at this:
>>
>> If I run a example with the same minimal-context-distro twice,
>> one with "texexec", another with "context" the result is...
>>
>> ... here synctex is working:
>> source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
>> texexec "$1"
>>
>> (and from einleitung.tex.synctex.gz:
>> SyncTeX Version:1
>> Input:1:einleitung.tex
>> Input:28:./einleitung-info.tmp
>> Input:29:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-def.mkii
>>
>> Input:30:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-lan.mkii
>>
>> Output:pdf)
>>
>>
>> ... here synctex is NOT working:
>> source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
>> context "$1"
>>
>> (and from einleitung.tex.synctex.gz:
>> SyncTeX Version:1
>> Input:1:/Users/steffen/Desktop/synctextest/Kapitel/einleitung.tex
>> Output:dvi)
>>
>> So synctex does not work with MkIV in general?
> 
> Synctex support in luatex appears broken at the moment, Akira reported
> a problem as well.
> 
> Best wishes,
> Taco
> ___
> 
> 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
> ___
> 
___
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
___


Re: [NTG-context] synctex broken

2010-03-21 Thread Mojca Miklavec
On Sun, Mar 21, 2010 at 16:37, Steffen Wolfrum wrote:
>
> Am 21.03.2010 um 12:19 schrieb Hans Hagen:
>
>> On 21-3-2010 10:53, Steffen Wolfrum wrote:
>>> Hi,
>>>
>>> with yesterdays beta (ConTeXt  ver: 2010.03.20 22:59 MKIV) synctex seems to 
>>> be broken:
>>> no response in none direction (source<->pdf).
>>
>> unrelated to context as synctex is an engine feature
>
>
> please have a look at this:
>
> If I run a example with the same minimal-context-distro twice,
> one with "texexec", another with "context" the result is...
>
> ... here synctex is working:
> source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
> texexec "$1"
>
> (and from einleitung.tex.synctex.gz:
> SyncTeX Version:1
> Input:1:einleitung.tex
> Input:28:./einleitung-info.tmp
> Input:29:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-def.mkii
> Input:30:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-lan.mkii
> Output:pdf)
>
>
> ... here synctex is NOT working:
> source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
> context "$1"
>
> (and from einleitung.tex.synctex.gz:
> SyncTeX Version:1
> Input:1:/Users/steffen/Desktop/synctextest/Kapitel/einleitung.tex
> Output:dvi)

Weird. It seems to work here (though I forgot how to go from source to
pdf, it works ok from pdf to source at least). I'm using luatex-0.52,
but I can confirm that LuaTeX outputs dvi instead of pdf.

SyncTeX Version:1
Input:1:/private/tmp/a.tex
Input:2:/Users/mojca/context/tex/texmf-context/tex/context/base/cont-new.tex
Input:3:/Users/mojca/context/tex/texmf-context/tex/context/base/cont-new.mkiv
Input:4:/Users/mojca/context/tex/texmf-context/tex/context/base/cont-fil.tex
Input:5:/Users/mojca/context/tex/texmf-context/tex/context/user/cont-sys.rme
Input:6:/Users/mojca/context/tex/texmf-context/tex/context/base/type-def.mkiv
Input:7:/Users/mojca/context/tex/texmf-context/tex/context/base/type-lua.tex
Input:8:/Users/mojca/context/tex/texmf-context/tex/context/base/type-siz.tex
Input:9:/Users/mojca/context/tex/texmf-context/tex/context/base/type-siz.mkiv
Input:10:/Users/mojca/context/tex/texmf-context/tex/context/base/type-otf.tex
Input:11:/Users/mojca/context/tex/texmf-context/tex/context/base/type-otf.mkiv
Input:12:a.top
Output:dvi
Magnification:1000
Unit:1
X Offset:4736287
Y Offset:4736287
Content:
!916
{1
[1,4:4736286,50644704:27969941,50644704,0
(1,4:4736286,0:27969941,55380990,0
h1,4:4736286,0:0,0,0
g1,4:0,0
(1,4:0,0:39158276,55380990,0
(1,4:0,0:0,0,0
v1,4:0,0:0,0,0
)
etc.
___
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
___


Re: [NTG-context] synctex broken

2010-03-21 Thread Taco Hoekwater

Steffen Wolfrum wrote:

Am 21.03.2010 um 12:19 schrieb Hans Hagen:


On 21-3-2010 10:53, Steffen Wolfrum wrote:

Hi,

with yesterdays beta (ConTeXt  ver: 2010.03.20 22:59 MKIV) synctex seems to be 
broken:
no response in none direction (source<->pdf).

unrelated to context as synctex is an engine feature



please have a look at this:

If I run a example with the same minimal-context-distro twice,
one with "texexec", another with "context" the result is...

... here synctex is working:
source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
texexec "$1"

(and from einleitung.tex.synctex.gz:
SyncTeX Version:1
Input:1:einleitung.tex
Input:28:./einleitung-info.tmp
Input:29:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-def.mkii
Input:30:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-lan.mkii
Output:pdf)


... here synctex is NOT working:
source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
context "$1"

(and from einleitung.tex.synctex.gz:
SyncTeX Version:1
Input:1:/Users/steffen/Desktop/synctextest/Kapitel/einleitung.tex
Output:dvi)

So synctex does not work with MkIV in general?


Synctex support in luatex appears broken at the moment, Akira reported
a problem as well.

Best wishes,
Taco
___
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
___


Re: [NTG-context] synctex broken

2010-03-21 Thread Steffen Wolfrum

Am 21.03.2010 um 12:19 schrieb Hans Hagen:

> On 21-3-2010 10:53, Steffen Wolfrum wrote:
>> Hi,
>> 
>> with yesterdays beta (ConTeXt  ver: 2010.03.20 22:59 MKIV) synctex seems to 
>> be broken:
>> no response in none direction (source<->pdf).
> 
> unrelated to context as synctex is an engine feature


please have a look at this:

If I run a example with the same minimal-context-distro twice,
one with "texexec", another with "context" the result is...

... here synctex is working:
source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
texexec "$1"

(and from einleitung.tex.synctex.gz:
SyncTeX Version:1
Input:1:einleitung.tex
Input:28:./einleitung-info.tmp
Input:29:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-def.mkii
Input:30:/Users/steffen/context/tex/texmf-context/tex/context/base/sort-lan.mkii
Output:pdf)


... here synctex is NOT working:
source /Users/steffen/context/tex/setuptex /Users/steffen/context/tex
context "$1"

(and from einleitung.tex.synctex.gz:
SyncTeX Version:1
Input:1:/Users/steffen/Desktop/synctextest/Kapitel/einleitung.tex
Output:dvi)



So synctex does not work with MkIV in general?

Steffen
___
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
___


Re: [NTG-context] synctex broken

2010-03-21 Thread Hans Hagen

On 21-3-2010 10:53, Steffen Wolfrum wrote:

Hi,

with yesterdays beta (ConTeXt  ver: 2010.03.20 22:59 MKIV) synctex seems to be 
broken:
no response in none direction (source<->pdf).


unrelated to context as synctex is an engine feature

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___


[NTG-context] synctex broken

2010-03-21 Thread Steffen Wolfrum
Hi,

with yesterdays beta (ConTeXt  ver: 2010.03.20 22:59 MKIV) synctex seems to be 
broken: 
no response in none direction (source<->pdf).


Steffen
___
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
___


Re: [NTG-context] synctex

2009-09-13 Thread Hans Hagen

Hartmut Henkel wrote:

On Sat, 12 Sep 2009, Hans Hagen wrote:

Vyatcheslav Yatskovsky wrote:

I have a discussion with Jonathan Kew about mark IV option in
TeXWorks.

We need to to pass the argument "-synctex=1" to the actual *tex
invocation, so that the engine creates a .synctex.gz file alongside
the ..pdf output; this enables texworks to jump back and forth
between source and preview locations.

How this can be done?

\synctex=1

as it's not something that you want to have on by default


and afaics it doesn't work multidir, as synctex doesn't know about
directions (yet). So currently there is not much practical use for
synctex in luatex.


also, in order to make it useful (in my cases) it has to be hooked into 
the error report mechanism (esp as we often deal with typeset content 
not originating in the line reported).


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] synctex

2009-09-13 Thread Hans Hagen

Wolfgang Schuster wrote:


Am 12.09.2009 um 13:22 schrieb Hans Hagen:


Vyatcheslav Yatskovsky wrote:

Hi,
I have a discussion with Jonathan Kew  about mark IV option in TeXWorks.
We need to to pass the argument "-synctex=1" to the actual *tex 
invocation, so that the engine creates a .synctex.gz file alongside 
the ..pdf output; this enables texworks to jump back and forth 
between source and preview locations.

How this can be done?


\synctex=1

as it's not something that you want to have on by default


is a parameter for the context command (context --synctex filename) not 
a option?


this had been considered but i then fear that editors will be set up by 
default to use that switch which is not what i've in mind; in that case 
the editor should have a config option either of not to enable that flag


so .. i haven't made up my mind yet

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] synctex

2009-09-13 Thread Mojca Miklavec
On Sun, Sep 13, 2009 at 02:18, Hartmut Henkel wrote:
>
> ...and afaics it doesn't work multidir, as synctex doesn't know about
> directions (yet). So currently there is not much practical use for
> synctex in luatex.

Unless one uses left-to-right/top-to-bottom text direction :)

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] synctex

2009-09-12 Thread Hartmut Henkel
On Sat, 12 Sep 2009, Hans Hagen wrote:
> Vyatcheslav Yatskovsky wrote:
> >
> > I have a discussion with Jonathan Kew about mark IV option in
> > TeXWorks.
> >
> > We need to to pass the argument "-synctex=1" to the actual *tex
> > invocation, so that the engine creates a .synctex.gz file alongside
> > the ..pdf output; this enables texworks to jump back and forth
> > between source and preview locations.
> >
> > How this can be done?
>
> \synctex=1
>
> as it's not something that you want to have on by default

...and afaics it doesn't work multidir, as synctex doesn't know about
directions (yet). So currently there is not much practical use for
synctex in luatex.

Regards, Hartmut
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] synctex

2009-09-12 Thread Wolfgang Schuster


Am 12.09.2009 um 13:22 schrieb Hans Hagen:


Vyatcheslav Yatskovsky wrote:

Hi,
I have a discussion with Jonathan Kew  about mark IV option in  
TeXWorks.
We need to to pass the argument "-synctex=1" to the actual *tex  
invocation, so that the engine creates a .synctex.gz file alongside  
the ..pdf output; this enables texworks to jump back and forth  
between source and preview locations.

How this can be done?


\synctex=1

as it's not something that you want to have on by default


is a parameter for the context command (context --synctex filename)  
not a option?


Wolfgang

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


  1   2   >