Wednesday, February 25, 2009

First gloss line in italics (gb4e)

The solution is in the gb4e manual on page 7:

% first gloss line in italics:
\let\eachwordone=\it

Table lines starting with square bracket

this one does not compile:

\documentclass{article}
\begin{document}
\begin{tabular}{ll}
a & b \\
[c] & d \\
\end{tabular}
\end{document}

if required, one can specify the vertical gap between lines in a table using
\\[len]

LaTeX removed the newline and whitespace to interpret the table as having a \\[c] entry, and there exists no length "c".

So the solution is to write the initial square bracket into curly braces. This way it is not interpreted as the beginning of the optional argument of the newline command.

\documentclass{article}
\begin{document}
\begin{tabular}{ll}
a & b \\
{[}c] & d \\
\end{tabular}
\end{document}

Thanks to Werner Grundlingh for showing me the problem source.

Thursday, April 10, 2008

Filetype recognition in Vim

If your LaTeX suite does not want to load when you create a new.tex file, it is probably due to the following line missing in the _vimrc file:

" Prevents Vim 7.0 from setting filetype to 'plaintex'
let g:tex_flavor='latex'

Thanks to Phase Portrait.

Vim for XeTeX/LaTeX

If you want to use the LaTeX suite in Vim and you get a an error message like this:

::call histdel("/", -1)|let @/=g:Tex_LastSearchPattern

here is the solution.

Sunday, March 16, 2008

First word of a paragraph

Today, with all the troubles around tables, I learned that the first word of a paragraph never gets hyphenated. (Thanks, Ulrike) Just in case you wonder why your table header does not get automatically hyphenated, you know …

Tables

Everything I learned about tables in an introductory LaTeX is ok but not sufficient.

Very nice and up-to-date Table guide has been written by Lapo Filippo Mori and I warmly recommend it to everybody.

Friday, March 7, 2008

Block comment

If you need to comment out a block of text, use the verbatim package. That provides the comment environment:


\begin{comment}

\end{comment}