tabularx で \multicolumn を使用して自動改行を実現するにはどうすればよいでしょうか?

tabularx で \multicolumn を使用して自動改行を実現するにはどうすればよいでしょうか?

現在、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

私が提案するのはクリーンアップソリューションです。例:

  1. テーブルの側面から余分なスペースを削除しました
  2. tabularxX列が使用されていないため削除されました
  3. @{}m{\textwidth}@{}実際に私が使用した新しい列は次のとおりです。

    a.@{}余分なスペースを取り除く

    b.\textwidth必要な幅を与える(最良の効果を得るために調整可能)

    c.m仕様によりセルをハイフンで区切ることができる

  4. 縦の区切り線は見苦しく、読みにくくなるため、すべて削除しました。

  5. booktabsルールの方が凝っているので、そのルールを採用した
  6. 余分な水平線を削除しました(最大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}

関連情報