[OS X TeX] latexdb & texshop
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Thu Oct 13 17:43:10 CEST 2005
The additional files created by latexdb are not the cause of the
trouble with saving the original, but as Ingo has already hinted
latexdb must change the name of original to .backup.
The only remedy I can think of, except of course rewriting latexdb,
is the following Applescript
Claus
--Applescript
tell application "TeXShop"
get path of document of window 1
set fileName to result
end tell
set scriptPath to (do shell script "dirname " & "~/Library/
TeXShop/Scripts/ex")
set scriptPath to scriptPath & "/setnamets.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 setnamets(fileName)
end tell
set theFile to POSIX file fileName as string
tell application "TeXShop"
close document texName
end tell
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "~/Library/TeXShop/bin/latexdbi " &
texName
do shell script shellScript
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "~/Library/TeXShop/bin/dvipdfc " &
baseName
do shell script shellScript
(*
set pdfName to quotedform of pdfName
set thePDF to POSIX file pdfName as alias
*)
tell application "TeXShop"
open theFile
end tell
tell document texName of application "TeXShop"
activate
refreshpdf
end tell
On Oct 13, 2005, at 15:04, Ingo Reich wrote:
> it cleans up my folder, but doesn't help with the original problem :-(
> Sorry to have already stolen so much of your time.
> Ingo
>
>
> Am 13.10.2005 um 14:30 schrieb Claus Gerhardt:
>
>
>
>> Latexdb creates two additional files ending in ....tex.pre
>> and ....tex.debug, which probably are causing the trouble. Let me
>> suggest as possible solution:
>>
>> Change your latexdbi shell script to
>>
>> #!/bin/tcsh
>> # latexdbi
>>
>> set path= ($path /usr/local/bin /usr/local/teTeX/bin/powerpc-
>> apple-darwin-current)
>>
>> latexdb "$1"
>> rm -f "$1.pre"
>> rm -f "$1.debug"
>>
>> Claus
>>
>> On Oct 13, 2005, at 14:04, Ingo Reich wrote:
>>
>>
>>
>>
>>> Claus, thanks for your kind help. The script works great, but
>>> texshop still complains when I try to save the file after running
>>> latexdb. The problem however seems not to relate to texshop since
>>> I got a similar warning message when I tried to edit the source
>>> file in alphax. It rather seems that latexdb changes some
>>> property of the tex-file such that either the editor can't locate
>>> the file (texshop) or it states that the file has been changed
>>> (alphax). The only way to deal with that problem at the moment
>>> is: 1. edit file, 2. save file, 3. run your script, 4. close
>>> file, 5. open file, 6. edit file, 7. save file etc. pp. -- not
>>> very concenient; probably a bug in latexdb.
>>> Ingo
>>>
>>> ------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/
>>>
>>>
>>>
>>>
>>>
>>
>> ------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/
>>
>>
>>
>>
>
> ------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/
>
>
>
------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list