Saturday, January 27, 2007

Configuring LaTeX in Kile

LATEX
texi2dvi --batch '%S.tex' #latex -interaction=nonstopmode '%S.tex'

PDFLATEX
texi2dvi --batch --pdf '%S.tex' #pdflatex -interaction=nonstopmode '%S.tex'

DVI to PS
dvips -Ppdf -G0 '%S.dvi' -o '%S.ps'

PS to PDF
ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCampatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true '%S.ps' '%S.pdf'

Install the package: wmctrl
sudo apt-get install wmctrl
This is useful to transfer the control of the windows when doing forward/inverse search
In kile create the command
BringtoFrontDVI ->>> wmctrl -a "%S.dvi"
And add to the command QuickBuild that command.

In DVI change the option of inverse search from KILE to the customized:
kile %f --line %l && wmctrl -a "Kile"