[TxMt] Re: latex bundle: handling pstricks and pst-pdf together

Denilson Barbosa denilson.barbosa at gmail.com
Fri Nov 14 05:06:59 UTC 2008


Thanks for the reply. As a quickfix this would alleviate the immediate
problem, but create another, much worse: By bypassing the actual latex
bundle (I mean, the compilation routines in texMate.py) one loses all
of its functionality, including the compilation window that  shows the
nice summary of what happened during the execution of (pdf)latex.
Among other things, you'd have to look into the .log file yourself to
find any errors in your source files, defeating the purpose of using
textmate instead of the command line to run (pdf)latex.

Handling pst-pdf could be easily implemented in a nice and elegant way
inside the bundle. This would be a simple addition to run_latex (if I
recall correctly the function name) in texMate.py to check if pst-pdf
is included in the master file. Similar checks are made there for many
packages already (including pstricks), so that different settings can
be used when calling (pdf)latex. I can't see pst-pdf being any
different.

If implemented in this way, one would get back the nice results shown
in the compilation window, which is produced by the procedure that
parses the output produced by (pdf)latex. The parsing step could be
done just on the final call to pdflatex on the main file.

This seems easy enough to do for those who maintain the bundle. Not so
for the majority of people who use it, including me. Being python
illiterate I could only roughly understand what the bundle does, but
not make this change.

Denilson.

On Thu, Nov 13, 2008 at 2:23 PM, Brad Miller <millbr02 at luther.edu> wrote:
>
>
> I am curious to know how many people such an extension would benefit.  I
> think one of the nice things about the Bundle as it stands now is that it
> does the things that the majority of people want pretty well.  And... it is
> extensible enough for cases like this to be handled elegantly by the user.
> For example:  These lines could be  re-written placed in a script file in
> your home directory somewhere:
>    latex <file.tex>
>    dvips -Ppdf -o <file-pics.ps> <file.dvi>
>    ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
>    pdflatex <file.tex>
>
> The lines above would need to be re-written to use the TM_FILENAME
> environment variable as follows:
> #!/bin/bash
> filebase=`basename -s .tex ${TM_FILENAME}
> latex ${TM_FILENAME}
> dvips- -Ppdf -o $filebase-pics.ps $filebase.dvi
> ps2pdf -dAutoRotatePages=/None $filebase-pics.ps $filebase-pics.pdf
> pdflatex ${TM_FILENAME}
> rm $filebase-pics.ps
>
> Now, at the top of your latex file you can put the line:
> %!TEX TS-program = /path/to/my/script
> From now on the LaTeX bundle will use your script to typeset your file.
>  Because the script is written using TM_FILENAME it will work for any files
> you want to do this with.
> If this is a common case, then I think it would be good to add to the Bundle
> directly but if this is something only used by 1 or 2 people then I think
> the solution above is the way to go.
> Brad
>
>
>
>
>>
>> Thanks
>>
>> Denilson
>>
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate
>
>
>
> --
> Brad Miller
> Assistant Professor, Computer Science
> Luther College
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
>



-- 
Denilson Barbosa



More information about the textmate mailing list