
現在、1 行の 3 つのセルすべてを 1 つに結合したいのですtabularx
が、テキストが非常に長く、この環境でテキストに自動改行を挿入する方法がわかりません。どうすればいいか知っている人はいませんか?
\documentclass[10pt,a4paper,final,twoside]{book}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{multicol}
\setlength{\columnsep}{1.5cm}
\setlength{\columnseprule}{0.2pt}
\usepackage{polyglossia}
\setmainlanguage{french}
\begin{document}
\begin{center}
\begin{tabularx}{1.\linewidth}{|p{.31\linewidth} | p{.31\linewidth} | p{.31\linewidth} |}
\hline
\textbf{Ernout/Meillet\textsubscript{4}} & \textbf{REW\textsubscript{3}} & \textbf{DÉRom} \\
\hline
apert\={u}ra & ap\u{e}rt\={u}ra & \makecell[l]{*/aper\textquotesingle t-ur-a/\\\hspace{4pt} $\longrightarrow$ I. */aper\textquotesingle t-ur-a/ \\ \hspace{4pt} $\longrightarrow$ II. */oper\textquotesingle t-ur-a/} \\
\hline
\multicolumn{3}{|c|}{Les issues romanes ont été subdivisées selon les deux types dont elles relèvent : */aper't-ur-a/ (I.) et */oper't-ur-a/ (II.). I. représente une évolution phonétique régulière de protorom. */aper't-ur-a/ et il existe en italien, romanche, espagnol, asturien, galicien et portugais.... } \\
\hline
\end{tabularx}
\end{center}
答え1
最後の部分にはX
列と列を使用します。p
\documentclass[10pt,a4paper,final,twoside]{book}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{polyglossia}
\setmainlanguage{french}
\begin{document}
\begin{center}
\begin{tabularx}{\linewidth}{|X|X|X|}
\hline
\textbf{Ernout/Meillet\textsubscript{4}} & \textbf{REW\textsubscript{3}} & \textbf{DÉRom} \\
\hline
apert\={u}ra & ap\u{e}rt\={u}ra &
\makecell[l]{%
*/aper\textquotesingle t-ur-a/\\
\hspace{4pt} $\longrightarrow$ I. */aper\textquotesingle t-ur-a/ \\
\hspace{4pt} $\longrightarrow$ II. */oper\textquotesingle t-ur-a/
} \\
\hline
\multicolumn{3}{|p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth}|}{%
Les issues romanes ont été subdivisées selon les deux types dont elles
relèvent: */aper't-ur-a/ (I.) et */oper't-ur-a/ (II.). I. représente
une évolution phonétique régulière de protorom. */aper't-ur-a/ et il
existe en italien, romanche, espagnol, asturien, galicien et portugais.... } \\
\hline
\end{tabularx}
\end{center}
\end{document}
答え2
私が提案するのはクリーンアップソリューションです。例:
- テーブルの側面から余分なスペースを削除しました
tabularx
X列が使用されていないため削除されました@{}m{\textwidth}@{}
実際に私が使用した新しい列は次のとおりです。a.
@{}
余分なスペースを取り除くb.
\textwidth
必要な幅を与える(最良の効果を得るために調整可能)c.
m
仕様によりセルをハイフンで区切ることができる縦の区切り線は見苦しく、読みにくくなるため、すべて削除しました。
booktabs
ルールの方が凝っているので、そのルールを採用した- 余分な水平線を削除しました(最大1本まで)考慮する
midrule
長いセルの前
これがコードです
\documentclass[10pt,a4paper,final,twoside]{book}
\usepackage{amsmath}
\usepackage{tabularx, booktabs}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{multicol}
\setlength{\columnsep}{1.5cm}
\setlength{\columnseprule}{0.2pt}
\usepackage{polyglossia}
\setmainlanguage{french}
\begin{document}
\begin{center}
\begin{tabular}{@{}p{.31\linewidth} p{.31\linewidth} p{.31\linewidth}@{}}
\toprule
\textbf{Ernout/Meillet\textsubscript{4}} & \textbf{REW\textsubscript{3}} & \textbf{DÉRom} \\
\midrule
apert\={u}ra & ap\u{e}rt\={u}ra & \makecell[l]{*/aper\textquotesingle t-ur-a/\\\hspace{4pt} $\longrightarrow$ I. */aper\textquotesingle t-ur-a/ \\ \hspace{4pt} $\longrightarrow$ II. */oper\textquotesingle t-ur-a/} \\
\multicolumn{3}{@{}m{\textwidth}@{}}{Les issues romanes ont été subdivisées selon les deux types dont elles relèvent : */aper't-ur-a/ (I.) et */oper't-ur-a/ (II.). I. représente une évolution phonétique régulière de protorom. */aper't-ur-a/ et il existe en italien, romanche, espagnol, asturien, galicien et portugais.... } \\
\bottomrule
\end{tabular}
\end{center}
\end{document}
そしてサンプル
答え3
幅に使用しますp{\dimexpr0.93\linewidth+4\tabcolsep}
。もちろん、いいえtabularx
:
\documentclass[10pt,a4paper,final,twoside]{book}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{multicol}
\setlength{\columnsep}{1.5cm}
\setlength{\columnseprule}{0.2pt}
\usepackage{polyglossia}
\setmainlanguage{french}
\begin{document}
\begin{center}
\begin{tabular}{|*3{p{.31\linewidth} |}}\hline
\textbf{Ernout/Meillet\textsubscript{4}} & \textbf{REW\textsubscript{3}} &
\textbf{DÉRom} \\ \hline
apert\={u}ra & ap\u{e}rt\={u}ra & \makecell[l]{*/aper\textquotesingle
t-ur-a/\\\hspace{4pt} $\longrightarrow$ I. */aper\textquotesingle t-ur-a/ \\
\hspace{4pt} $\longrightarrow$ II. */oper\textquotesingle t-ur-a/} \\ \hline
\multicolumn{3}{|p{\dimexpr0.93\linewidth+4\tabcolsep}|}{Les issues romanes ont été
subdivisées selon les deux
types dont elles relèvent : */aper't-ur-a/ (I.) et */oper't-ur-a/ (II.). I.
représente une évolution phonétique régulière de protorom. */aper't-ur-a/ et
il existe en italien, romanche, espagnol, asturien, galicien et portugais....
} \\\hline
\end{tabular}
\end{center}
\end{document}
それに伴いtabularx
、次のようになります。
\begin{tabularx}{\linewidth}{|X|X|X|}\hline
...
\multicolumn{3}{|p{\dimexpr\linewidth-2\tabcolsep}|}{...}
...
\end{tabularx}