[TxMt] compiling *plain* tex documents with postscript figures (correction)
agl
artemio at eresmas.net
Tue Jan 15 13:38:22 UTC 2008
agl wrote:
>
>
> agl wrote:
>>
>>
>> Brad Miller-6 wrote:
>>>
>>>
>>> My suggestion is that you you write yourself a little script call it
>>> mytex that calls plain tex and then dvips / ps2pdf If mytex is on
>>> your PATH then you can use mytex as the typesetting engine in the %!
>>> TEX directive.
>>>
>>> Brad
>>>
>>>
>>
>> Thanks a lot for your help! Although I am a total newbie with TextMate,
>> after some experiment I came up with the following script called
>> "alttex", which works like a charm (I'm posting it in case it may be of
>> help to someone else):
>>
>> FILE="${TM_LATEX_MASTER:-$TM_FILEPATH}"
>> etex "$FILE" && dvips -t a4 "${FILE%.tex}.dvi" && ps2pdf "${FILE.tex}.ps"
>>
>
> Unfortunately, my previous message was wrong. What happens is that
> TextMate's "Typeset & View PDF" correctly runs the first command of my
> script (etex "$FILE") and generates the dvi file, but does NOT go on
> running the next commands. So if there is already an old pdf file it shows
> it (that's what confused me), but otherwise fails. What did am I missing
> here?
>
I just figured out that 99% of the problem was caused by a typo in the last
command (ps2pdf "${FILE.tex}.ps"), which should have been ps2pdf
"${FILE%.tex}.ps". After I corrected the typo, everything works EXCEPT for
one thing. Namely, when I run my script for the first time (i.e., when there
is no pdf file), the pdf is created but NOT opened, and I get the following
error:
Document '/Users/.../xxx.pdf' not open in application The file
/Users/.../xxx.pdf does not exist.
error number 256 opening viewer
even if the file exists. The second and further times (as long as I don't
delete the pdf file), everything works as expected.
Artemio
--
View this message in context: http://www.nabble.com/compiling-*plain*-tex-documents-with-postscript-figures-tp14175996p14839844.html
Sent from the textmate users mailing list archive at Nabble.com.
More information about the textmate
mailing list