[OS X TeX] Synchronicity with Alpha?
Jérôme Laurens
jerome.laurens at u-bourgogne.fr
Fri Apr 16 10:47:15 EDT 2004
Le 16 avr. 04, à 14:46, Joachim Kock a écrit :
> In order to synchronise from the source to a pdf file diplayed in
> iTeXMac, In principle, Alpha should just issue something like
>
> tell application "iTeXMac"
> activate
> display "/path/to/myfile.pdf" at line 45 column 1 \
> file "/path/to/myfile.tex"
> end tell
>
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 cannot get this to work, though. (In fact I cannot get pdfsync to
> work at all...)
>
> You can make experiments with something like this little AlphaTcl
> script
>
> 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 kfil [tclAE::build::TEXT $source] \
> ---- [tclAE::build::TEXT $pdf]
> switchTo iTeXMac
> }
> Bind F1 <co> syncWithItexmac TeX
>
> which is supposed to open the pdf in iTeXMac corresponding to frontmost
> tex window in Alpha and go to the pdfsync point corresponding to the
> cursor position. (Here bound to Cmd-Opt-F1.)
>
> To use it, place it in an Alpha file, select it and load it with Cmd-L.
>
I paste this into an alpha window, select it and pressed cmd-L, nothing
special happens.
unbound
What was wrong?
-----------------------------------------------------
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