[OS X TeX] Synchronization BBEdit<--> TeXniscope
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Thu Nov 25 10:50:36 EST 2004
Synchronization BBEdit <--> TeXniscope is possible
In TeXniscope's preferences set
Edit command: /usr/bin/bbedit (also check in the Terminal: which bbedit)
Editor arguments : +%d "%s"
Then synchronization T-->B should be possible.
For the other way around use the script below.
A new script pdflatex_special and a new subroutine preview_bbedit can
be downloaded from my tex page. The TeX-Scripts-BBEdit will be updated
over the weekend.
Claus
-- Applescript
-- To be used in BBEdit
-- synchronize
-- Claus Gerhardt, Nov. 2004
tell application "BBEdit"
get file of window 1
set filepath to result
set fileName to POSIX path of filepath as string
set scriptPath to (do shell script "dirname " &
"~/Library/TeXShop/Scripts/ex")
set scriptPath to scriptPath & "/setnamebbedit.scpt"
set scriptName to POSIX file scriptPath as alias
set scriptLiB to (load script scriptName)
tell scriptLiB
set {baseName, texName, pdfName, namePath, dirName, dirNameunquoted,
logName, logPath, rtfName} to setnamebbedit(fileName)
end tell
select document texName
set sourceLine to startDisplayLine of selection as number
set texPath to namePath & ".tex"
set texFile to texPath as POSIX file
set thePDF to pdfName as POSIX file
end tell
tell application "TeXniscope"
activate
open thePDF
refresh of the front document
the front document goto line sourceLine of source texPath
end tell
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list