La página pdf no es lo suficientemente grande para todas las columnas.

La página pdf no es lo suficientemente grande para todas las columnas.

Al ejecutar el siguiente código, obtengo una tabla como se muestra en la siguiente figura con el último elemento del título 3 que no cabe en el espacio de la hoja pdf y sus elementos se pierden. ¿Cómo puedo asegurarme de que la última columna también encaje en la hoja pdf?

Este es el código:

\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{geometry}

% Set smaller margins for more space
\geometry{margin=1cm}

\begin{document}

\begin{table}
    \small % Reduce font size
    \begin{tabular}{*{13}{S}}
        \toprule
        & \multicolumn{3}{c}{\textbf{Headline 1}} & \multicolumn{4}{c}{\textbf{Headline 2}} & \multicolumn{5}{c}{\textbf{Headline 3}} \\ \cmidrule(lr){2-5} \cmidrule(lr){6-9} \cmidrule(lr){10-13}
        {$\alpha$} & {$F$} & {$T_n$} & {$B_n$} & {$\bar{B}_n$} &{$F$} & {$T_n$} & {$B_n$} & {$\bar{B}_n$}  & {$F$} & {$T_n$} & {$B_n$} & {$\bar{B}_n$}  \\ % Corrected column entry here
        \midrule
        & 16.128 & +8.872 & 16.128 & 1.402 & 1.373 & -146.6 & -137.6 & -137.6 & 1.373 & -146.6 & -137.6 & -17.6  \\
        0.99 & 3.442 & -2.509 & 3.442 & 0.299 & 0.343 & 133.2 & 152.4 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        & 0. & -0.429 & 0.993 & 0.086 & 0.08 & 25.6 & 90 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        \midrule
        & 0.483 & -0.183 & 0.483 & 0.042 & 0.063 & 22.3 & 122.5 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        0.95 & 0.766 & -0.475 & 0.766 & 0.067 & 0.039 & 141.6 & -122 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        & 0.624 & +0.365 & 0.624 & 0.054 & 0.04 & -35.7 & 90 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        \midrule
        & 0.766 & -0.475 & 0.766 & 0.067 & 0.039 & 141.6 & -122 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        0.90 & 0.45 & +0.421 & 0.45 & 0.039 & 0.034 & -69.4 & 110.9 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        & 0.598 & -0.597 & 0.598 & 0.052 & 0.025 & 92.3 & -109.3 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        \bottomrule
    \end{tabular}
\end{table}

\end{document}

mesa

Respuesta1

Podría ahorrar mucho espacio si definiera un formato de tabla adecuado para cada una de sus Scolumnas:

\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{geometry}

% Set smaller margins for more space
\geometry{margin=1cm}

\begin{document}

\begin{table}
  \centering
    \small % Reduce font size
    \begin{tabular}{
    S[table-format=1.2]
    S[table-format=2.3]
    S[table-format=-1.3]
    S[table-format=2.3]
    S[table-format=1.3]
    S[table-format=1.3]
    S[table-format=-3.1]
    S[table-format=-3.1]
    S[table-format=-3.1]
    S[table-format=1.3]
    S[table-format=-3.1]
    S[table-format=-3.1]
    S[table-format=-3.1]
    }
        \toprule
        & \multicolumn{4}{c}{\textbf{Headline 1}} & \multicolumn{4}{c}{\textbf{Headline 2}} & \multicolumn{4}{c}{\textbf{Headline 3}} \\ \cmidrule(lr){2-5} \cmidrule(lr){6-9} \cmidrule(lr){10-13}
        {$\alpha$} & {$F$} & {$T_n$} & {$B_n$} & {$\bar{B}_n$} &{$F$} & {$T_n$} & {$B_n$} & {$\bar{B}_n$}  & {$F$} & {$T_n$} & {$B_n$} & {$\bar{B}_n$}  \\ % Corrected column entry here
        \midrule
        & 16.128 & +8.872 & 16.128 & 1.402 & 1.373 & -146.6 & -137.6 & -137.6 & 1.373 & -146.6 & -137.6 & -17.6  \\
        0.99 & 3.442 & -2.509 & 3.442 & 0.299 & 0.343 & 133.2 & 152.4 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        & 0. & -0.429 & 0.993 & 0.086 & 0.08 & 25.6 & 90 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        \midrule
        & 0.483 & -0.183 & 0.483 & 0.042 & 0.063 & 22.3 & 122.5 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        0.95 & 0.766 & -0.475 & 0.766 & 0.067 & 0.039 & 141.6 & -122 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        & 0.624 & +0.365 & 0.624 & 0.054 & 0.04 & -35.7 & 90 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        \midrule
        & 0.766 & -0.475 & 0.766 & 0.067 & 0.039 & 141.6 & -122 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        0.90 & 0.45 & +0.421 & 0.45 & 0.039 & 0.034 & -69.4 & 110.9 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6 \\
        & 0.598 & -0.597 & 0.598 & 0.052 & 0.025 & 92.3 & -109.3 & -137.6 & 1.373 & -146.6 & -137.6 & -137.6  \\
        \bottomrule
    \end{tabular}
\end{table}

\end{document}

ingrese la descripción de la imagen aquí

información relacionada