![Выровнять по левому краю с шириной столбца {p{cm}}](https://rvso.com/image/266397/%D0%92%D1%8B%D1%80%D0%BE%D0%B2%D0%BD%D1%8F%D1%82%D1%8C%20%D0%BF%D0%BE%20%D0%BB%D0%B5%D0%B2%D0%BE%D0%BC%D1%83%20%D0%BA%D1%80%D0%B0%D1%8E%20%D1%81%20%D1%88%D0%B8%D1%80%D0%B8%D0%BD%D0%BE%D0%B9%20%D1%81%D1%82%D0%BE%D0%BB%D0%B1%D1%86%D0%B0%20%7Bp%7Bcm%7D%7D%20.png)
Я пытаюсь создать таблицу вроде:
Idioms Definition
A dime Anything that is common, inexpensive,
a dozen and easy to get or available any where.
Beat around To treat a topic, but omit its main points,
the bush often intentionally or To delay or avoid
talking about something difficult or unpleasant.
Bite off more To take on more responsibility than you can manage.
than one can chew
...
Что я сделал, так это
\documentclass{book}
\begin{document}
\thispagestyle{empty}
\noindent
\begin{tabular}{p{6cm} p{12cm}}
Idioms & Definitions
{The Remaining portions of work goes here.}
\end{tabular}
\end{document}
Но я получаю
Идиомы Определение
A dime Anything that is common, inexpensive,
a dozen and easy to get or available any where.
Beat around To treat a topic, but omit its main points,
the bush often intentionally or To delay or avoid
talking about something difficult or unpleasant.
Bite off more To take on more responsibility than you can manage.
than one can chew
...
Я думаю, это связано с выравниванием. Приведенный выше пример не совсем то, что я получил в Latex. Но он отражает мои проблемы. С l вместо p я могу получить желаемое выравнивание по левому краю. но без размера таблицы. Но с размером fized выравнивание идет не так.
Некоторые элементы в преамбуле могут отсутствовать, поскольку я использовал такие пакеты, как setspace и anysize.
Источник: Таблица выше взята из Википедии для описания моей ситуации.
решение1
использовать tabularx
и также\RaggedRight
\documentclass{book}
\usepackage{tabularx,ragged2e}
\begin{document}
\noindent
\begin{tabularx}{\textwidth}{
@{} % no \tabcolsep on the left side
>{\RaggedRight}p{6cm}% let the p column typeset ragged right
X % dynamical column width
@{} % no \tabcolsep on the right side
}
Idioms & Definitions
{The Remaining portions of work goes here.}
\end{tabularx}
\end{document}