Can I use the tabulary package to create a 2-column table, with column1 using 30% of the available width and column2 using 70%? For example:
\begin{tabulary}{|p{30%}|p{70%}|}
...
\end{tabulary}
Can I use the tabulary package to create a 2-column table, with column1 using 30% of the available width and column2 using 70%? For example:
\begin{tabulary}{|p{30%}|p{70%}|}
...
\end{tabulary}
If you know the complete width (which is missing in your code fragment), you can simply calculate the widths:
\documentclass{article}
\usepackage{tabulary}
\begin{document}
\begin{tabulary}{1.0\textwidth}{|p{.3\textwidth}|p{.7\textwidth}|}
a & b\\
\end{tabulary}
\end{document}
As this does not use any of the special features of tabulary, it can be simplified to
\documentclass{article}
\begin{document}
\begin{tabular}{|p{.3\textwidth}|p{.7\textwidth}|}
a & b\\
\end{tabular}
\end{document}
(or even better: make the columns a bit smaller, as currently there is no room for the space around the columns, but the numbers where easier to demonstrate.)
tabulary for two p columns.
– samcarter_is_at_topanswers.xyz
Jul 23 '18 at 15:11
tabulary in the above example 1\textwidth from the requirements that a) the lenghts have to add up to < the total width and b) your desired ratio is 3:7 you can calculate them. For the easier case of a normal table, you can do the same.
– samcarter_is_at_topanswers.xyz
Jul 23 '18 at 15:13
tabulary without an LCR column is (exactly) like using tabularx without an X, there is no way the tabulary code can do anything to make the table the specified width. No error message is given but it is basically user error and can only do anything remotely acceptable if you force the column widths by hand to add up to \textwidth, by which time you may as well use tabular
– David Carlisle
Jul 23 '18 at 15:40
tabularno need fortabulary– David Carlisle Jul 23 '18 at 15:01