我正在尝试获取\flushleft
表格的内容,但目前还没有成功。几个来源说明应该如何使用\raggedright
它来做到这一点,但是我没有找到完整的例子来了解如何将它结合起来而不会出现错误。
这是我的(简化的)代码:
\documentclass[12pt]{article}
\usepackage{setspace,amsmath,graphicx,float}
\usepackage[english]{babel}
\usepackage{boldline}
\usepackage{array}
\usepackage[left=3cm,top=3.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage{times}
\usepackage{threeparttable}
\usepackage[margin=1cm]{caption}
\newcommand\Tstrut{\rule{0pt}{2.6ex}} % top strut
\newcommand\Bstrut{\rule[-1.1ex]{0pt}{0pt}} % bottom strut
\begin{document}
\begin{table}[H]
\begin{flushleft}
\centering
\small
\caption[Steps in a hypothetical monopolist test]{Steps in a hypothetical monopolist test.}
\begin{threeparttable}
\begin{tabular}{ p{3em} p{11em} p{11em} p{12em} }
\hlineB{3}
\bf &
\bf Step 1 &
\bf Step 2 &
\bf Step 3 \Tstrut\Bstrut \\ \hline
PMD\tnote{*} & (1) & (1, 2) & (1, 2, 3) \Tstrut\Bstrut \\
Q & Does monopolization of product 1 give pricing power? & Does a hypothetical monopolist of products 1 and 2 have pricing power? & Does a hypothetical monopolist of products 1, 2 and 3 have pricing power? \Tstrut\Bstrut \\
A & No, because there are two perfect substitutes omitted from the proposed market. No ability to raise price of good 1. & No, because there is still a perfect substitute omitted from the proposed market (product 3) that constrains the ability of the hypothetical monopolist of goods 1 and 2 to raise their prices. & Yes, if products 4 and 5 are not good enough substitutes. If so, then the market definition of (1, 2, 3) is accepted. No, if either product 4 or 5 is a good enough substitute to constrain profitability of a price increase. In that case, continue the test. \Tstrut\Bstrut \\
\hlineB{3}
\end{tabular}
\begin{tablenotes}
\item[*] Proposed market definition.
\end{tablenotes}
\end{threeparttable}
\label{HMTStepByStep}
\end{flushleft}
\end{table}
\end{document}
我对原始资料做了一些更改,我个人认为这些更改更吸引人,但我的主要目标实际上是\flushleft
消除所有Underfull \hbox
错误。
有人可以帮忙实现这个吗?
(间距是另一个主题,我将在稍后解决这个问题)
答案1
欢迎:)用这个替换{ p{3em} p{11em} p{11em} p{12em} }
它{>{\RaggedRight\arraybackslash}p{3em}>{\RaggedRight\arraybackslash}p{11em} p{11em}>{\RaggedRight\arraybackslash}p{12em}}
随附包装\usepackage{array,ragged2e}