Utilize special column types to distribute the width of different column types

Dependency LaTeX.table

Table body in resources/children-list.tex

% Child & Mother & Father
Alysha  & Lyra   & Hans \\
Klaus   & Rosy   & Dieter \\

Table columns, design in table/auto-stretch.tex

\CatchFileDef{\input⟨data title⟩}{src/⟨data title⟩}{}
\begin{table}  % or \begin{table}[⟨placement specifiers⟩]
    
    \centering
    \caption{⟨caption⟩} % title displayed below the table and in the index
    \label{tab:table name⟩} % handle to cross reference the table
    \begin{tabularx}{\columnwidth} % total table width
    {   
        p{1.75cm} % fixed-width column
        X         % justify text, sketching column
        C         % centering text, sketching column
        X         % justify text, sketching column
    }
        \toprule     
        & \multicolumn{2}{c}{⟨multicolumn header⟩} 
        \\ \cmidrule(lr){2-3}   
        {Child} &
        {Mother} &
        {Father}
        \\ \midrule     
        \input⟨data title⟩ % body file defined in first line
        \bottomrule     
    \end{tabularx}
\end{table}
  • ⟨data title⟩: File where the table’s body is stored
  • ⟨placement specifiers⟩ := see Positioning
  • ⟨caption⟩: Title displayed below the table and in the index
  • ⟨table name⟩: Filename and handle to cross reference the table
  • ⟨multicolumn header⟩ := column title that spans multiple columns

Sources:

Related:

Tags:
Graphical elements - Standardize tables, images, plots