Friday, February 2, 2007

\\ and \vspace{\baselineskip}

If you use \\ in the middle of a paragraph, that means that the paragraph ends with an empty line. However, this empty line will make part of the paragraph, and is not broken at the start of a new page.

To break and get the space of an empty line, type
\vspace{\baselineskip}
\vspace does not add lines, but space, and you don't want a line but space.

Remember that if you tell LaTeX to place an empty line, an empty line it will place. Even if that is at the beginning or at the end of a page.

And adding vertical space between paragraphs by using \\ is also not accepted by LaTeX ("Latex error. There's no line here to end.").

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"