I'd like to change my LaTeX table formatting slightly, but due to the way the documents are generated, I can't do so by changing the actual LaTeX code, but can change what will appear in the preamble.
The change I'd like to make is to have the 1st column width fitted to the text. I know this can be achieved from the LaTeX code from changing first the |L| to |l| (i.e making the l lower case)
\begin{tabulary}{\linewidth}{|L|L|}
table stuff
\end{tabulary}
But is there any way that this can be made the default case by changing something in the preamble?
Also, a second question, though less important, is about if it's possible to have a very long string (longer than column width) wrapped around to the next line. Because at the moment I have a hyperlink in a column which ignores the column boundary and just juts out.
If anyone can help with wither or both of these I'd be grateful.
tabulary, you can issue\newcolumntype{L}{l}to redefine theL-column type to be the same asl. In order to allow wrapping of column content, you need to use ap{<len>}column type (which will be left-aligned for non-wrapping text). Here<len>is a known length (like5cm, for example). So, perhaps using a straightL->p{<len>}replacement would suffice. – Werner Jul 13 '12 at 19:37tabularyenvironments of that form? – egreg Jul 14 '12 at 21:25newcolumntype{L}{l}command, which does the trick on the second column of one of the two column tables in my document. However, I want the first column to be formatted like this. But using\newcolumntype{l}{L}throws up a bunch of! Missing # inserted in alignment preamble.errors. I also have a 3-column table in the same document - the first two columns of which I'd like to be fitted to the text. Do you know of any way of making it so that all but the last column of any table (with any no. of columns) has text fitted to the column width? – user1488804 Jul 16 '12 at 10:02