[OS X TeX] Synchronicity with Alpha?

Jérôme Laurens jerome.laurens at u-bourgogne.fr
Sat Apr 17 05:51:45 EDT 2004


Le 16 avr. 04, à 17:37, Joachim Kock a écrit :

>> The correct syntax is
>>
>>  tell application "iTeXMac"
>>     activate
>>     display "/path/to/myfile.pdf" at line 45 column 1 in source 
>> "/path/to/myfile.tex"
>>  end tell
>
> I tried this too, with no difference.  I am sure there is something
> fundamental I haven't understood about pdfsync.  As I said I can't
> get it to work inside iTeXMac either...  Aren't there supposed to
> be small red dots in the display window?  Cmd-= doesn't change 
> anything.

did you check the appropriate menu items of the view menu

View/Options/Synchronize
View/Options/Show all

or something like that

>
> [...]

Ok, I got it working with AlphaX 8.0b14, here is the contents of my 
prefs.tcl

proc syncWithItexmac {} {
     # determine position:
     foreach {line col} [pos::toRowChar [getPos]] {}
     # determine tex file:
     set source [win::Current]
     # corresponding pdf file:
     set pdf [regsub {\.tex$} $source ".pdf"]
     # Ask iTeXMac to display that pdf file at the point
     # corresponding to the position in the source file:
     tclAE::send -r 'iTMx' iTMx Dspl \
       LINE $line COLU $col SRCE [tclAE::build::TEXT $source] \
       ---- [tclAE::build::TEXT $pdf]
     switchTo iTeXMac
}
Bind '=' <c> syncWithItexmac TeX

I could not bind with the other key combinations

Here is a small test files

testpage.tex (3 lines)

line 1
line 2
line 3

testpage.pdfsync: (9 lines)

testpage
version 0
l 0 1
l 1 2
l 2 3
s 1
p 0 12385798 46515942
p* 1 19561644 45729510
p* 2 10840238 44549862

And chose any 1 page pdf file as testpage.pdf

open testpage.tex in alphaX, select a line then press cmd=, this opens 
iTeXMac at the right location

This does not work with document splitted in many files.
-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list