我有一张表格,概述了一些理论。它包含很多单词或单词组合。
布局很糟糕,而且不符合 LaTeX 质量。
欢迎提供一些关于如何改进的指导。
我的 MWE 表如下
\documentclass[11pt,pdftex]{report}
\usepackage{booktabs}
\usepackage[a4paper]{geometry}
\usepackage{tabularx}
\usepackage{microtype}
\geometry{
includeheadfoot,
margin=2.5cm,
hdivide={ ,19cm, }
}
\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}
\begin{document}
\begin{table}[htp]
\caption{Pillar of Institutions}\label{tab:Pillars}
\centering
\begin{tabularx}{0.99\textwidth}{lXXX}
\toprule
& Regulative & Normative& Cultural-cognitive \\
\midrule
Basis of \linebreak
compliance &Expedience& Social obligation & Take-for-grantedness \linebreak
Shared understanding\\
Basis of order & Regulative rules& Binding Expectations &Constitutive Schema\\
Mechanisms & Coercive &Normative & Mimetic\\
Logic &instrumentally & Appropriateness & Orthodoxy\\
Indicators & Rules \linebreak
Laws \linebreak
Sanctions & Certifications \linebreak
Accreditation & Common beliefs \linebreak
Shared logic of action\\
Basis of legitimacy &Legally sanctioned & Morally governed & Comprehensible \linebreak
Recognisable \linebreak
Culturally supported\\
Supported by & Economists & Early Sociologist & Late Sociologist\\
Primary Propagandists & North & Selznick & DiMaggio and Powell, Scott\\
Degree of formality & Formal institutions &Informal institutions&Informal institutions\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
答案1
您的表格设计中已经有一些不错的改进,例如使用包booktabs
及其相关的水平线绘制宏以及避免使用任何垂直线。我建议在您已经完成的工作的基础上执行以下操作:
- 在列中使用不规则的右侧视图(没有难看的巨大单词间空格)
- 通过 (i) 省略第一列之前和最后一列之后的垂直空格,(ii) 相对于 LaTeX 默认值稍微减少列间空格,以及 (iii) 改变三列的默认相对宽度
X
,你可以摆脱几乎所有令人不快的换行符 - 如果您将
tabularx
组设置为文本块的整个宽度,则不需要该\centering
指令。不过,我会插入一个\smallskip
,以便在标题和表格的之间插入一点空间\toprule
。
\documentclass[11pt]{report}
\usepackage{booktabs,microtype}
\usepackage[a4paper]{geometry}
\geometry{
includeheadfoot,
margin=2.5cm,
hdivide={ ,19cm, }
}
\usepackage{tabularx,ragged2e}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X} % modified "X" column
\begin{document}
\begin{table}[htp]
\setlength{\tabcolsep}{4pt} % slight reduction from default value
\caption{Pillar of Institutions}\label{tab:Pillars}
\smallskip
\begin{tabularx}{\textwidth}{@{} l
>{\hsize=0.92\hsize}Y % One can vary widths of "X" column types,
>{\hsize=1.04\hsize}Y % as long as the factors add up to number of
>{\hsize=1.04\hsize}Y @{}} % columns of type "X"
\toprule
& Regulative & Normative& Cultural-cognitive \\
\midrule
Basis of compliance &Expedience& Social obligation & Take-for-grantedness \linebreak Shared understanding\\
Basis of order & Regulative rules& Binding Expectations &Constitutive Schema\\
Mechanisms & Coercive &Normative & Mimetic\\
Logic &instrumentally & Appropriateness& Orthodoxy\\
Indicators & Rules \linebreak Laws \linebreak Sanctions &Certifications \linebreak Accreditation & Common beliefs\linebreak Shared logic of action\\
Basis of legitimacy &Legally sanctioned & Morally governed & Comprehensible \linebreak Recognisable \linebreak Culturally supported\\
Supported by &Economists & Early Sociologist & Late Sociologist\\
Primary Propagandists & North & Selznick & DiMaggio and Powell, Scott\\
Degree of formality &Formal institutions &Informal institutions&Informal institutions\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
答案2
手册booktabs
包提供了作者提到的有用的建议正式餐桌的布局(例如,见第 3 页)。巧合的是,他所提倡的视觉上整洁的布局也是我所查阅的许多工程教科书和期刊中所用的布局。
对于排版表格,我几乎总是使用极其灵活的ctable
包。这是一个简单的例子:
\documentclass[11pt]{report}
\usepackage{ctable} % loads array, booktabs, and tabularx packages
\usepackage{etoolbox} % eTeX toolbox for class and package authors
\usepackage{microtype}
\usepackage[a4paper]{geometry}
\geometry{
includeheadfoot,
margin=2.5cm,
hdivide={ ,19cm, }
}
\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}
% change definition of horizontal or vertical text alignment
% for the X column specifier of the tabularx (or ctable) package
% (p = top align, m = middle align, b = bottom align)
% e.g., \tabXcol{\small\raggedright}, \tabXcol[m]{\raggedright}
\newrobustcmd*{\tabXcol}[2][p]{\renewcommand{\tabularxcolumn}[1]{>{#2\arraybackslash}#1{##1}}}
\begin{document}
{\tabXcol{\raggedright}%
\ctable[
table,
pos=h!,
%
maxwidth=1.0\textwidth,
%
caption = {Pillar of Institutions.},
%
label=tab:Pillars,
%
doinside={\small},
]{@{}llXX@{}}{}{
\toprule
& Regulative & Normative & Cultural-cognitive \\
\midrule
Basis of compliance & Expedience & Social obligation & Take-for-grantedness \\
& & & Shared understanding \\
\addlinespace
Basis of order & Regulative rules & Binding Expectations & Constitutive Schema \\
\addlinespace
Mechanisms & Coercive & Normative & Mimetic \\
\addlinespace
Logic & instrumentally & Appropriateness & Orthodoxy \\
\addlinespace
Indicators & Rules & Certifications & Common beliefs \\
& Laws & Accreditation & Shared logic of action \\
& Sanctions & & \\
\addlinespace
Basis of legitimacy & Legally sanctioned & Morally governed & Comprehensible \\
& & & Recognisable \\
& & & Culturally supported \\ \addlinespace
Supported by & Economists & Early Sociologist & Late Sociologist \\
\addlinespace
Primary Propagandists & North & Selznick & DiMaggio and Powell, Scott \\
\addlinespace
Degree of formality & Formal institutions & Informal institutions & Informal institutions \\
\addlinespace
\bottomrule
}}%
\end{document}
答案3
我快速的看法是:
\documentclass[11pt,pdftex]{report}
\usepackage{booktabs}
\usepackage[a4paper]{geometry}
\usepackage{tabularx}
\usepackage{microtype}
\geometry{
includeheadfoot,
margin=2.5cm,
hdivide={ ,19cm, }
}
\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}
\begin{document}
\begin{table}[htbp]
\caption{Pillar of Institutions}\label{tab:Pillars}
\centering
\begin{tabularx}{0.99\textwidth}{lXXX}
\toprule
& Regulative & Normative& Cultural-cognitive \\
\midrule \midrule
\textit{Basis of compliance} & Expedience & Social obligation & Take-for-grantedness \linebreak Shared understanding\\
\midrule
\textit{Basis of order} & Regulative rules& Binding Expectations &Constitutive Schema\\
\midrule
\textit{Mechanisms} & Coercive & Normative & Mimetic\\
\midrule
\textit{Logic} & instrumentally & Appropriateness& Orthodoxy\\
\midrule
\textit{Indicators} & Rules \linebreak Laws \linebreak Sanctions &Certifications \linebreak Accreditation & Common beliefs\linebreak Shared logic of action\\
\midrule
\textit{Basis of legitimacy} & Legally sanctioned & Morally governed & Comprehensible \linebreak Recognisable \linebreak Culturally supported\\ \midrule
\textit{Supported by} & Economists & Early Sociologist & Late Sociologist\\
\midrule
\textit{Primary Propagandists} & \textsc{North} & \textsc{Selznick} & \textsc{DiMaggio} and \textsc{Powell, Scott}\\
\midrule
\textit{Degree of formality} & Formal institutions & Informal institutions&Informal institutions\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
仍有待优化的地方:
- 最后一栏的文本对齐(我不知道该怎么做)
- 使用阴影代替线条来更好地分隔行