我的桌子好乱啊!
我有三列(从左到右):
- 左边:非常简单,单个单词。
- 中间:五个选项的列表(不会超过五个)。
- 左图:正在发生的事件列表。这些是长句子,我手动插入了分隔符,以使所有内容都位于表格边界内。为了便于阅读,我还插入了 9 毫米缩进。它有效……还行。但我觉得一定有更好、更优雅的解决方案
注意:中间一列的单词列表与右列的事件列表没有链接。
关于如何在右栏插入这些长句子而不需要手动添加换行符,有什么建议吗?
谢谢。
代码如下:
% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,oneside,centered,twocolumn]{book}
\special{papersize=210mm,297mm}
\usepackage[top=3cm, bottom=3.2cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage[english]{babel}
\usepackage{tocloft} % Customization of TOC LOF LOT
\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage{pdfcolmk}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % To write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists
\usepackage{caption} % To change way captions are labelled
\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol
\usepackage[T1]{fontenc}
\usepackage{titlesec,color}
\usepackage{showframe}
\usepackage{blindtext}
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fontspec}
\usepackage{newpxtext} % Font for document instead of obsolete Palatino
% To make TOC in two columns and List of Tables into one column.
\usepackage{multitoc}
\makeatletter
\renewcommand*{\@starttoc}[1]{%
\ifthenelse{\equal{#1}{toc}}{%
\ifnum\multicolumntoc>1
\begin{multicols}{\multicolumntoc}%
\@multitoc@starttoc{#1}%
\end{multicols}%
\else
\@multitoc@starttoc{#1}%
\fi}{}%
\ifthenelse{\equal{#1}{lot}}{%
\ifnum\multicolumnlot>1
\begin{multicols}{\multicolumnlot}%
\@multitoc@starttoc{#1}%
\end{multicols}%
\else
\@multitoc@starttoc{#1}%
\fi}{}%
\ifthenelse{\equal{#1}{lof}}{%
\ifnum\multicolumnlof>1
\begin{multicols}{\multicolumnlof}%
\@multitoc@starttoc{#1}%
\end{multicols}%
\else
\@multitoc@starttoc{#1}%
\fi}{}%
}
\makeatother
\renewcommand{\multicolumnlot}{1}
% Change footnotes from numbers to symbols
\makeatletter
\def\@xfootnote[#1]{%
\protected@xdef\@thefnmark{#1}%
\@footnotemark\@footnotetext}
\makeatother
\begin{document}
\begin{table*}
\small{
\center
\caption{Significant feasts and ceremonies of the five intercalary days.}\label{FeastsIntercalary}
\begin{threeparttable}
\begin{tabular}{cll}
\toprule
Intercalary Day & Names in the five languages & Celebrating group; location; celebration name; notes \\
\midrule
First & French: Bonjour\tnote{*} & Line One; Flower; Entering in the river; rituals and feasts. \\
& German: Hallo & Line Two; Hand; Entering in the river; rituals and feasts \\
& English: Hello & \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
& Spanish: Hola & Line Three; Hand; Entering in the river; rituals and feasts \\
& Portugese: Ola & Line Four ; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
&& Line Five; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
&& Line Six; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. And the sentence \\
&& \hspace{9mm}continues, so I'm going to add another manual break, here!\\
&& Line Seven; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
&& \\
First & French: Bonjour\tnote{*} & Line One; Flower; Entering in the river; rituals and feasts. \\
& German: Hallo & Line Two; Hand; Entering in the river; rituals and feasts \\
& English: Hello & \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
& Spanish: Hola & Line Three; Hand; Entering in the river; rituals and feasts \\
& Portugese: Ola & Line Four ; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
&& Line Five; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
&& Line Six; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. And the sentence \\
&& \hspace{9mm}continues, so I'm going to add another manual break, here!\\
&& Line Seven; Hand; Entering in the river; rituals and feasts \\
&& \hspace{9mm}lovely breakfast here!; Feasts and foods. \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item[*] \blindtext.
\end{tablenotes}
\end{threeparttable}
}
\end{table*}
\end{document}
答案1
tabularx
使用和的两个建议hanging
:
\documentclass[a4paper,oneside,centered,twocolumn]{book}
\special{papersize=210mm,297mm}
\usepackage[top=3cm, bottom=3.2cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage{enumitem}
\usepackage{hanging}
\usepackage{tabularx}
\begin{document}
\begin{table*}
\begin{tabularx}{\textwidth}{clX}
First & \begin{tabular}[t]{l@{:~}l}
French & Bonjour\\
German & Hallo\\
French & Bonjour\\
German & Hallo\\
French & Bonjour\\
\end{tabular} &
\begin{hangparas}{9mm}{1}
\vspace{-0.5\baselineskip}
Line Six; Hand; Entering in the river; rituals and feasts lovely breakfast here!; Feasts and foods. And the sentence continues, so I'm going to add another manual break, here!
Line Six; Hand; Entering in the river; rituals and feasts lovely breakfast here!; Feasts and foods. And the sentence continues, so I'm going to add another manual break, here!
Line Six; Hand; Entering in the river; rituals and feasts lovely breakfast here!; Feasts and foods. And the sentence continues, so I'm going to add another manual break, here!
\end{hangparas}\\
First & \begin{tabular}[t]{l}
French: Bonjour\\
German: Hallo\\
French: Bonjour\\
German: Hallo\\
French: Bonjour\\
\end{tabular} &
\begin{hangparas}{9mm}{1}
\vspace{-\baselineskip}
Line Six; Hand; Entering in the river; rituals and feasts lovely breakfast here!; Feasts and foods. And the sentence continues, so I'm going to add another manual break, here!
Line Six; Hand; Entering in the river; rituals and feasts lovely breakfast here!; Feasts and foods. And the sentence continues, so I'm going to add another manual break, here!
Line Six; Hand; Entering in the river; rituals and feasts lovely breakfast here!; Feasts and foods. And the sentence continues, so I'm going to add another manual break, here!
\end{hangparas}\\
\end{tabularx}
\end{table*}
\end{document}