Skip to content

How to limit the table to page width? #115

Answered by Witiko
vincent7f asked this question in Q&A
Discussion options

You must be logged in to vote

@vincent7f

It found that tabularx could support line wrapping inside the cell.

There is a number of readability issues with this solution. For one, the justified text creates large spaces between words. We can easily fix this by replacing justified alignment with ragged-right alignment:

\usepackage{ragged2e}
% ...
\begin{tabularx}{\linewidth}{|l|X<{\RaggedRight}|X<{\RaggedRight}|X<{\RaggedRight}|}
% ...

Another potential issue is that the horizontal space is divided uniformly between the X columns, whereas you may want to make some of the columns wider and others more narrow. That is where the p{2.75cm} columns may be more useful than the X columns in LaTeX. In the Markdown package, the…

Replies: 9 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@vincent7f
Comment options

@Witiko
Comment options

Answer selected by Witiko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question latex Related to the LaTeX interface and implementation
2 participants
Converted from issue

This discussion was converted from issue #113 on December 29, 2021 23:40.