# Tag Info

18

\linewidth can be used instead: \begin{tabulary}{\linewidth}{RJL} Package lscape does rotate \textheight, but does not change \textwidth. Probably a bug. Update: It is a design compromise, see David Carlisle's comment.

16

Updated to support setting longtable \LTleft and \LTright margins. \documentclass{article} \usepackage{longtable,tabulary} \setlength\textheight{10\baselineskip} \topmargin-4\baselineskip \headheight0pt \pdfpageheight18\baselineskip \def\a{Red green blue yellow green. } \def\b{One two three four five six. } \makeatletter \def\ltabulary{% \def\endfirsthead{...

12


10

Tables are best done with the booktabs package: Code: \documentclass{article} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \begin{tabular}{cccccc}\toprule Configuration & Flow rate & \multicolumn{2}{c}{Water Temperatures (\si{\degree}C)} & \multicolumn{2}{c}{Pipe Surface Temperatures (\si{\degree}C)} \\ & (L/...

9

tabulary detects colortbl and inserts modified definitions for that case, but \cellcolor was "recently" added to colortbl in 2001: and tabulary wasn't updated to match. % \changes{v0.1j}{2001/02/13}{\cs{cellcolor} (Donald Arseneau)} \documentclass[a4paper]{article} \usepackage{colortbl} \usepackage{tabulary} \usepackage{etoolbox} \begin{document} \...

8

Just make the footnote on the final typesetting run, not while tabulary is measuring things. \documentclass{memoir} \usepackage{tabulary,lipsum} \begin{document} Why are footnotes duplicated when a tabulary is placed inside a minipage? It happens in memoir class and the standard \LaTeX classes. See table~\ref{table:mwe} for an example. \begin{table} \...

7

The patch in the other answer probably ought to have worked but it turns out the division algorithm used isn't really that accurate in the case that it is scaling up, and as Stephen noticed if you simply let it scale, rounding errors make the table wider than the line and you get overfull box warnings. This is basically the same but corrects the division ...

7

a p column is more or less just a column with a \parbox and fortunately \parbox works as expected. (The behaviour of the p columns seems slightly unexpected) \documentclass{article} \usepackage{tabulary} \setlength\extrarowheight{2pt} \begin{document} \begin{table}[hbtp] \footnotesize \centering \begin{tabulary}{1.0\textwidth}{C||L|L|L|l} \hline & ...

7

Yes, it does. The difference between \small and \normalfont is just not very large, so you maybe just didn't notice it. There are in general two ways to go (and your example contains both): set a fontsize (\small, \tiny, etc.) before the \begin{tabular}, then all cells will have this fontsize use the fontsize only within a cell, then only this cell will ...

6

I could have sworn that I stole the code from tabularx that resets LaTeX counters after a trial run but apparently not so.... (Note you should probably use \jobname.foo as the temporary file name, it is a bit scary that it overwrites any file of that name when run. \documentclass[a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage{tabulary} \...

6

Please always post complete documents showing all packages used. Your code had several commands not defined by the packages I guessed so I deleted them here. The main problem was that you over-rode the L specifier with c which does not allow line breaking so forced all the entries to be too wide. \documentclass[a4paper]{article} \usepackage{tabulary} \...

6

\documentclass{article} \usepackage{tabulary} \begin{document} \begin{table}[hbtp] \footnotesize \centering \settowidth\tymin{\textbf{Activities}} \setlength\extrarowheight{2pt} \begin{tabulary}{1.0\textwidth}{L|L|L|L|L|L} \hline \textbf{Level} & \textbf{Technology} & \textbf{People} & \textbf{Activities} & \textbf{...

6

I'm afraid I can't parse your tabulary code. Here's a solution that makes use of tabularx as well as of the siunitx package to align the numbers in the four numeric columns on the decimal markers. \documentclass{article} \usepackage[polish]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[inner=4cm,outer=2cm]{geometry} \usepackage{...

6

I would never use tabularx or tabulary for data tables such as this (even though I wrote both those packages). They are designed to affect the total table width by controlling line breaking within the cells and (apart from the heading row) you never want line breaking in such a table. You could use tabular* but forcing the table to be wider than its natural ...

6

If you use \multicolumn{2}{l}{\textit{iii}} with a standard l not L in the multicolumn then it works. In this case there isn't really any sane way to debug it (other than reading the package source), you just need to complain to the package author that (a) it probably shouldn't be an error to use L there and (b) if it is an error the error reporting ...

6


5

tabu seems to do what you want given one specifies negative coefficients to the X columns. Quoting the manual: negativ width coefficients can be given to X columns: ex. X[-2.5]X[1] or X[-2.5]X or X[-5]X[2] In this case, the first X column will be at most two and a half wider than the second one, and if the natural width of the first X column ...

5

Ok, I now made the following patch: \usepackage{etoolbox} \makeatletter \patchcmd\TY@checkmin {\def\TY@ratio{1}} {% \@tempdima\dimexpr\p@*\TY@linewidth/\TY@tablewidth\relax \edef\TY@ratio{\strip@pt\@tempdima}% }{}{} \let\TY@@checkmin\TY@checkmin \makeatother which seems to do what I want: Still, the calculation doesn't seem to be as exact as it could ...

5

But the text is aligned; the boxes from the hyperlinks extend downwards, but the vertical position of the text remains unaltered, as can be seen with some auxiliary lines: \documentclass{article} \usepackage{tabulary} \usepackage{booktabs} \usepackage{hyperref} \usepackage{tikz} \begin{document} \begin{tabulary}{6in}{rCJ} \toprule \textbf{Thing}...

5

I'd just use tabular here; \documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage{tabulary} \setlength{\tymin}{0.08\textwidth} \setlength\extrarowheight{2pt} \setlength\tabcolsep{2pt} \newcommand\hd[1]{\begin{tabular}[t]{@{}c@{}}#1\end{tabular}} \begin{document} \noindent \begin{tabular}{@{}>{\raggedright}p{9em}rrrrrrr@{}} \hline &...

5

Your current table is quite hard to read so I would like to propose a completely different approach: % arara: pdflatex \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage{booktabs} \usepackage{chngcntr} \counterwithin{table}{section} \usepackage{etoolbox} \begin{document} \setcounter{section}{1} \setcounter{table}{1} \...

5

\savebox can be really useful in many examples, although sometimes they might be a bit hacky. This works in the way that it is saving a parbox set to the specified width into a box. We can then calculate the height of that box using \totalheightof{} from calc-package. Then we distribute this length for every row, 4 rows would equal 25% of the height of the ...

5

You can solve your problem in two ways: With multirow, count the number of lines required ((not rows!) and add to the 2nd column a supplementary cell with invisible rule of the required depth (found by trial and errors) without multirow, make, from the 2nd row, the 2nd to 4th columns a nested tabular inserted in a\multicolumn`. In both cases I based the ...

5

Use tabularx and the X column type. This should be fine: \begin{tabularx}{\linewidth}{c>{\arraybackslash}X} Year 2023-2024 & Very long very long text Very long very long text Very long very long text \\ Year 2022-2023 & Very long very long text Very long very long text Very long very long text \\ Year 2021-2022 & Very long very long text ...

5

I can see no reason for employing a 4-column tabulary environment; an equation environment is all you need. I would, though, replace all instances of \overline with \bar. And it should be \sum_{p\in P} rather than \sum_{P\in P}, and \bar{r}_a and \bar{r}_b rather than \bar{r}a and \bar{r}b, right? If you have several equations which need to be aligned on ...

5

Here is another possible solution, after fine tuning and tweeking. All columns are set in relation of the \columnwidth, so it will survive a change from letter to A4. The text with in the cells relate to the width of individual table column. I have set all tables in relation to each other, i.e. base width is 1/15-column width, and the other columns are 2/15 ...

4

The column is narrower that \tymin which is 10pt by default. Set \tymin to a smaller value to avoid the warning: \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage{tabulary} \begin{document} \setlength{\tymin}{5pt} \begin{tabulary}{\textwidth}{C}aa\end{tabulary} \end{document}

Only top voted, non community-wiki answers of a minimum length are eligible