我知道有这样的问题。但是,我无法解决我的问题!我无法将表格左对齐。在这种情况下,我的表格标题左对齐,表格居中。此外,我想在表格底部添加注释
我有一张长桌子
\begin{longtable}{ll}
\caption{\label{Income_level_tabel}Countries by income level.}\\
\toprule
Countries & Income \\
\midrule
\endfirsthead
\caption{\label{Income_level_tabel}Countries by income level. - continued form previous page}\\
\toprule
Countries & Income \\
\midrule
\endhead
\bottomrule
\endfoot
Albania & Upper-middle income \\
Algeria & Upper-middle income \\
Argentina & Upper-middle income \\
Armenia & Lower-middle income \\
Austria & High income \\ \addlinespace
Bangladesh & Lower-middle income \\
Belarus & Upper-middle income \\
Belgium & High income \\
Benin & Low income \\
Bulgaria & Upper-middle income \\ \addlinespace
Burkina Faso & Low income \\
Burundi & Low income \\
Cambodia & Lower-middle income \\
Cameroon & Lower-middle income \\
Chile & High income \\ \addlinespace
China & Upper-middle income \\
Colombia & Upper-middle income \\
Croatia & Upper-middle income \\
Czech Republic & High income \\
Denmark & High income \\ \addlinespace
Egypt, Arab Rep. & Lower-middle income \\
El Salvador & Lower-middle income \\
Estonia & High income \\
Ethiopia & Low income \\
Finland & High income \\ \addlinespace
France & High income \\
Greece & High income \\
Guinea & Low income \\
Honduras & Lower-middle income \\
Hungary & High income \\ \addlinespace
India & Lower-middle income \\
Indonesia & Lower-middle income \\
Ireland & High income \\
Israel & High income \\
Italy & High income \\ \addlinespace
Jordan & Lower-middle income \\
Korea, Rep. & High income \\
Kyrgyz Republic & Lower-middle income \\
Lao PDR & Lower-middle income \\
Latvia & High income \\ \addlinespace
Lesotho & Lower-middle income \\
Lithuania & High income \\
Madagascar & Low income \\
Malawi & Low income \\
Malaysia & Upper-middle income \\ \addlinespace
Mali & Low income \\
Mauritania & Lower-middle income \\
Mexico & Upper-middle income \\
Moldova & Lower-middle income \\
Mongolia & Lower-middle income \\ \addlinespace
Morocco & Lower-middle income \\
Mozambique & Low income \\
Nepal & Low income \\
Netherlands & High income \\
North Macedonia & Upper-middle income \\ \addlinespace
Norway & High income \\
Panama & Upper-middle income \\
Peru & Upper-middle income \\
Philippines & Lower-middle income \\
Poland & High income \\ \addlinespace
Portugal & High income \\
Romania & Upper-middle income \\
Russian Federation & Upper-middle income \\
Slovenia & High income \\
Spain & High income \\ \addlinespace
Sweden & High income \\
Switzerland & High income \\
Syrian Arab Republic & Lower-middle income \\
Tajikistan & Lower-middle income \\
Tanzania & Low income \\ \addlinespace
Thailand & Upper-middle income \\
Togo & Low income \\
Tunisia & Lower-middle income \\
Uganda & Low income \\
Ukraine & Lower-middle income \\ \addlinespace
United Kingdom & High income \\
United States & High income \\
Uruguay & High income \\
Uzbekistan & Lower-middle income \\
Vietnam & Lower-middle income \\
\end{longtable}
答案1
Alongtable
默认水平居中。要左对齐 a longtable
,请使用其可选参数,如下所示:
\begin{longtable}[l]{ll}
完整且可编译的示例:
\documentclass{article}
\usepackage{longtable}
\usepackage{booktabs}
\begin{document}
\begin{longtable}[l]{ll}
\caption{\label{Income_level_tabel}Countries by income level.}\\
\toprule
Countries & Income \\
\midrule
\endfirsthead
\caption{\label{Income_level_tabel}Countries by income level. - continued form previous page}\\
\toprule
Countries & Income \\
\midrule
\endhead
\bottomrule
\endfoot
Albania & Upper-middle income \\
Algeria & Upper-middle income \\
Argentina & Upper-middle income \\
Armenia & Lower-middle income \\
Austria & High income \\
\addlinespace
Bangladesh & Lower-middle income \\
Belarus & Upper-middle income \\
Belgium & High income \\
Benin & Low income \\
Bulgaria & Upper-middle income \\
\addlinespace
Burkina Faso & Low income \\
Burundi & Low income \\
Cambodia & Lower-middle income \\
Cameroon & Lower-middle income \\
Chile & High income \\
\addlinespace
China & Upper-middle income \\
Colombia & Upper-middle income \\
Croatia & Upper-middle income \\
Czech Republic & High income \\
Denmark & High income \\
\addlinespace
Egypt, Arab Rep. & Lower-middle income \\
El Salvador & Lower-middle income \\
Estonia & High income \\
Ethiopia & Low income \\
Finland & High income \\
\addlinespace
France & High income \\
Greece & High income \\
Guinea & Low income \\
Honduras & Lower-middle income \\
Hungary & High income \\
\addlinespace
India & Lower-middle income \\
Indonesia & Lower-middle income \\
Ireland & High income \\
Israel & High income \\
Italy & High income \\
\addlinespace
Jordan & Lower-middle income \\
Korea, Rep. & High income \\
Kyrgyz Republic & Lower-middle income \\
Lao PDR & Lower-middle income \\
Latvia & High income \\
\addlinespace
Lesotho & Lower-middle income \\
Lithuania & High income \\
Madagascar & Low income \\
Malawi & Low income \\
Malaysia & Upper-middle income \\
\addlinespace
Mali & Low income \\
Mauritania & Lower-middle income \\
Mexico & Upper-middle income \\
Moldova & Lower-middle income \\
Mongolia & Lower-middle income \\
\addlinespace
Morocco & Lower-middle income \\
Mozambique & Low income \\
Nepal & Low income \\
Netherlands & High income \\
North Macedonia & Upper-middle income \\
\addlinespace
Norway & High income \\
Panama & Upper-middle income \\
Peru & Upper-middle income \\
Philippines & Lower-middle income \\
Poland & High income \\
\addlinespace
Portugal & High income \\
Romania & Upper-middle income \\
Russian Federation & Upper-middle income \\
Slovenia & High income \\
Spain & High income \\
\addlinespace
Sweden & High income \\
Switzerland & High income \\
Syrian Arab Republic & Lower-middle income \\
Tajikistan & Lower-middle income \\
Tanzania & Low income \\
\addlinespace
Thailand & Upper-middle income \\
Togo & Low income \\
Tunisia & Lower-middle income \\
Uganda & Low income \\
Ukraine & Lower-middle income \\
\addlinespace
United Kingdom & High income \\
United States & High income \\
Uruguay & High income \\
Uzbekistan & Lower-middle income \\
Vietnam & Lower-middle income \\
\end{longtable}
\end{document}
作为替代方案,我建议采用以下布局,您可以将整个表格放在一页上:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}
\setlength{\defaultaddspace}{3.75pt}
\caption{\label{Income_level_tabel}Countries by income level.}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lllll@{}}
\toprule
Countries & Income && Countries & Income \\
\cmidrule(r){1-2} \cmidrule(l){4-5}
Albania & Upper-middle && Lesotho & Lower-middle \\
Algeria & Upper-middle && Lithuania & High \\
Argentina & Upper-middle && Madagascar & Low \\
Armenia & Lower-middle && Malawi & Low \\
Austria & High && Malaysia & Upper-middle \\
\addlinespace
Bangladesh & Lower-middle && Mali & Low \\
Belarus & Upper-middle && Mauritania & Lower-middle \\
Belgium & High && Mexico & Upper-middle \\
Benin & Low && Moldova & Lower-middle \\
Bulgaria & Upper-middle && Mongolia & Lower-middle \\
\addlinespace
Burkina Faso & Low && Morocco & Lower-middle \\
Burundi & Low && Mozambique & Low \\
Cambodia & Lower-middle && Nepal & Low \\
Cameroon & Lower-middle && Netherlands & High \\
Chile & High && North Macedonia & Upper-middle \\
\addlinespace
China & Upper-middle && Norway & High \\
Colombia & Upper-middle && Panama & Upper-middle \\
Croatia & Upper-middle && Peru & Upper-middle \\
Czech Republic & High && Philippines & Lower-middle \\
Denmark & High && Poland & High \\
\addlinespace
Egypt, Arab Rep. & Lower-middle && Portugal & High \\
El Salvador & Lower-middle && Romania & Upper-middle \\
Estonia & High && Russian Federation & Upper-middle \\
Ethiopia & Low && Slovenia & High \\
Finland & High && Spain & High \\
\addlinespace
France & High && Sweden & High \\
Greece & High && Switzerland & High \\
Guinea & Low && Syrian Arab Republic & Lower-middle \\
Honduras & Lower-middle && Tajikistan & Lower-middle \\
Hungary & High && Tanzania & Low \\
\addlinespace
India & Lower-middle && Thailand & Upper-middle \\
Indonesia & Lower-middle && Togo & Low \\
Ireland & High && Tunisia & Lower-middle \\
Israel & High && Uganda & Low \\
Italy & High && Ukraine & Lower-middle \\
\addlinespace
Jordan & Lower-middle && United Kingdom & High \\
Korea, Rep. & High && United States & High \\
Kyrgyz Republic & Lower-middle && Uruguay & High \\
Lao PDR & Lower-middle && Uzbekistan & Lower-middle \\
Latvia & High && Vietnam & Lower-middle \\
\bottomrule
\end{tabular*}
\end{table}
\end{document}