General ⇒ tabulary and textwidth
tabulary and textwidth
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
tabulary and textwidth
Code: Select all
\documentclass{article}
\usepackage{tabulary}
\begin{document}
\begin{table}[!ht]
\centering
\begin{tabulary}{5cm}{JJ}
\hline
test text test text test text test text test text test text &
test text test text test text test text test text test text \\ \hline
\end{tabulary}
\end{table}
\vspace{1cm}
\begin{table}[!ht]
\centering
\begin{tabulary}{\textwidth}{JJ}
\hline
test text test text test text test text test text test text &
test text test text test text test text test text test text \\ \hline
\end{tabulary}
\end{table}
\end{document}
However, posting a minimal working example showing this undesired behaviour could help us to give more effective advise.
tabulary and textwidth
Code: Select all
\documentclass{article}
\usepackage{tabulary}
\begin{document}
\begin{table}[!ht]
\centering
\begin{tabulary}{5cm}{JJ}
\hline
test text test text test text test text test text test text & test text test text test text test text test text test text \\ \hline
\end{tabulary}
\end{table}
\begin{table}[!ht]
\centering
\begin{tabulary}{5cm}{JJ}
\hline
test text test text test text test text test & test text test text test text test text test \\ \hline
\end{tabulary}
\end{table}
\end{document}