¿Cómo puedo hacer que una tabla exceda por igual los márgenes izquierdo y derecho sin cambiar el tamaño de fuente?

¿Cómo puedo hacer que una tabla exceda por igual los márgenes izquierdo y derecho sin cambiar el tamaño de fuente?

Cuando suelo adjustboxmodificar el ancho de una tabla, incluso el tamaño de fuente cambia. ¿Cómo puedo aumentar el ancho de la tabla pero dejar que exceda ambos márgenes por igual?

ingrese la descripción de la imagen aquí

Mi MWE

\documentclass{elsarticle}


    \usepackage{ragged2e}


    % ========== Caption packages ==========
    \usepackage{caption}

    % ========== Table packages ==========
    \usepackage{tabularx}
% BEGIN_FOLD

        \newcolumntype{L}{ >{\arraybackslash \RaggedRight}X }       
        \newcolumntype{C}{ >{\arraybackslash \Centering}X }
        \newcolumntype{R}{ >{\arraybackslash \RaggedLeft}X }
        \newcolumntype{J}{ >{\arraybackslash\justifying} X }        
        \renewcommand{\tabularxcolumn}[1]{ >{\centering}m{#1} }

        \newcommand{\scalelinespace}[1]{
            \rule{0pt}{#1\normalbaselineskip}
                                        }

% END_FOLD

    \usepackage{booktabs}
    \usepackage{makecell}
    \usepackage[flushleft]{threeparttable}

    % ========== Figures and tables locations packages ==========
    \usepackage{float}
    \usepackage{adjustbox}

    % ========== Font encoding packages ==========
    \usepackage[T1]{fontenc}
    \usepackage{fontspec}
% BEGIN_FOLD

    \setmainfont{TeX Gyre Pagella}
    \setmonofont{Courier}
    \newcommand{\textffam}[2]{{\fontencoding{T1} \fontfamily{#1} \selectfont#2}}

% END_FOLD

    % ========== Equations and math packages ==========
    \usepackage{amsmath}
    \usepackage{amssymb, amsfonts}
    \usepackage{stackengine}




\begin{document}

\begin{table*}[htp]

\begin{adjustbox}{width=1.5\textwidth, center}  

    \begin{threeparttable}

            % Table options

            % Caption
            \caption{Determination of Critical Lines Among RESs Based on Operational Interaction Operators}
            \label{table:critical_lines_w_ij_hat}


            % Center the table
            \centering

            \newcommand{\setfontsizeTable}{\fontsize{9}{9} \selectfont}

            \begin{tabularx}{1\textwidth}{c ||>{\hsize=0.5\hsize \setfontsizeTable}C >{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C}

                \toprule

                \adjustbox{rotate=90, valign=c}{Quadrant} & \adjustbox{rotate=90, valign=c}{POI $i$} & \adjustbox{rotate=90, valign=c}{POI $j$} & \multicolumn{3}{c|}{Other POIs} &
                Critical Line Based on $\displaystyle \angle \bar{w}_{ij}$ or $\displaystyle \left| \bar{w}_{ij} \right|$ & Actual Critical Line (based on [Eq]) & $\displaystyle \left| S_{eq, \thinspace i} \right|$ & $\displaystyle \mathit{SDSCR}_{i}$ & $\displaystyle \frac{\mathit{Max} \medspace \mathit{SDSCR}_{i}}{\textit{Mean} \medspace \mathit{SDSCR}_{i}}$
                \\
                \Xhline{0.25mm}

                \scalelinespace{1.3} \adjustbox{rotate=90, valign=c}{III} & 101 & 64  & 96 & 106 & 37 & 86-87 & 86-87 & 4.38 & 2.02 & 1.41
                \\

                \scalelinespace{1.3} \adjustbox{rotate=90, valign=c}{IV} & 79 & 96  & 9 & 81 & 33 & 9-10 & 9-10 & 3.40 & 5.13 & 1.28
                \\

                \scalelinespace{1.3} \adjustbox{rotate=90, valign=c}{
                    \Shortstack[c]{{III} {IV \textsuperscript{a}}}
                                                                    }
                & 97 & 60  & 39 & 37 & 86 & 43-44 & 43-44 & 3.98 & 3.18 & 1.07
                \\

                \bottomrule
            \end{tabularx}

            \begin{tablenotes}

                \item[a] angles of $\displaystyle \angle \bar{w}_{ij}$ exist in both quadrants

            \end{tablenotes}

    \end{threeparttable}

\end{adjustbox}

\end{table*}

\end{document}

Respuesta1

Tu escribiste,

Lo uso adjustboxporque quiero extender la tabla más allá de los márgenes predeterminados,

Para la tabla que nos ocupa, no es necesario hacerla más ancha que el bloque de texto. Simplemente emita una directiva \smallo una \footnotesize. Y, por supuesto, no recurras al adjustboxdispositivo.

Una observación aparte: estás usando el fontspecpaquete y usas la TeX Gyre Pagellafuente del texto. Para emplear una fuente matemática compatible, le sugiero que cargue el unicode-mathpaquete (que lo carga automáticamente fontspec) y emita la directiva \setmathfont{TeX Gyre Pagella Math}.

Y no es necesario emplear el Ctipo de columna para las 10 columnas. De hecho, sólo necesitas el Ctipo para dos columnas; para los otros 8, simplemente use el ctipo de columna simple.

ingrese la descripción de la imagen aquí

\documentclass{elsarticle}
\usepackage{ragged2e}

\usepackage{tabularx}
\newcolumntype{C}{ >{\Centering\arraybackslash }X }
\renewcommand{\tabularxcolumn}[1]{>{\centering}m{#1}}

\usepackage[flushleft]{threeparttable}
\usepackage{adjustbox}
\usepackage{amsmath,amssymb}

\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}

\begin{document}

\begin{table*}[htp] 
\setlength\tabcolsep{5pt}
\setlength\extrarowheight{2pt}
\footnotesize
\begin{threeparttable}
\caption{Determination of critical lines among RESs based on operational interaction operators}
\label{table:critical_lines_w_ij_hat}

\begin{tabularx}{\textwidth}{@{} c | ccccc | *{2}{C} ccc @{}}
\hline
\adjustbox{rotate=90, valign=c}{Quadrant} & 
\adjustbox{rotate=90, valign=c}{POI $i$} & 
\adjustbox{rotate=90, valign=c}{POI $j$} & 
\multicolumn{3}{c|}{Other POIs} 
& Critical line based on $\angle\bar{w}_{\!ij}$ or $| \bar{w}_{\!ij}|$ 
& Actual Critical Line (based on [Eq]) 
& $| S_{\mathit{eq},i}|$ 
& $\mathit{SDSCR}_{i}$ 
& $\frac{\max \mathit{SDSCR}_{i}}{\mathrm{mean}\,\mathit{SDSCR}_{i}}$
\\
\hline
III & 101 & 64  & 96 & 106 & 37 & 86-87 & 86-87 & 4.38 & 2.02 & 1.41
\\
IV & 79 & 96  & 9 & 81 & 33 & 9-10 & 9-10 & 3.40 & 5.13 & 1.28
\\
III, IV\tnote{a} & 97 & 60  & 39 & 37 & 86 & 43-44 & 43-44 & 3.98 & 3.18 & 1.07
\\
\hline
\end{tabularx}

\begin{tablenotes}
\item[a] Angles of $\angle \bar{w}_{\!ij}$ exist in both quadrants.
\end{tablenotes}
\end{threeparttable}
\end{table*}

\end{document}

Respuesta2

ingrese la descripción de la imagen aquí

Antes de comenzar a utilizar su mesa \begin{adjustwidth}{-0.5<text width increase>}{0em}. En el preámbulo de la tabla, utilice 1.<textwidth increase factor>. Por ejemplo. Si desea aumentar el ancho de la tabla en 0,3 del ancho del texto, utilice \begin{adjustwidth}{-0.15\textwidth}{0em}y {1.3\textwidth}en tabularxel preámbulo. El objetivo principal del uso \begin{adjustwidth}{0.5<text width increase>}{0em}es mover la tabla hacia la izquierda en una cantidad igual a la mitad del aumento en el ancho de la tabla, asegurando así que la tabla exceda ambos márgenes por igual.

Aquí está el MWE completo.

\documentclass{elsarticle}


    \usepackage{ragged2e}


    % ========== Caption packages ==========
    \usepackage{caption}

    % ========== Table packages ==========
    \usepackage{tabularx}
% BEGIN_FOLD

        \newcolumntype{L}{ >{\arraybackslash \RaggedRight}X }       
        \newcolumntype{C}{ >{\arraybackslash \Centering}X }
        \newcolumntype{R}{ >{\arraybackslash \RaggedLeft}X }
        \newcolumntype{J}{ >{\arraybackslash\justifying} X }        
        \renewcommand{\tabularxcolumn}[1]{ >{\centering}m{#1} }

        \newcommand{\scalelinespace}[1]{
            \rule{0pt}{#1\normalbaselineskip}
                                        }

% END_FOLD

    \usepackage{booktabs}
    \usepackage{makecell}
    \usepackage[flushleft]{threeparttable}

    % ========== Figures and tables locations packages ==========
    \usepackage{float}
    \usepackage{adjustbox}

    % ========== Font encoding packages ==========
    \usepackage[T1]{fontenc}
    \usepackage{fontspec}
% BEGIN_FOLD

    \setmainfont{TeX Gyre Pagella}
    \setmonofont{Courier}
    \newcommand{\textffam}[2]{{\fontencoding{T1} \fontfamily{#1} \selectfont#2}}

% END_FOLD

    % ========== Equations and math packages ==========
    \usepackage{amsmath}
    \usepackage{amssymb, amsfonts}
    \usepackage{stackengine}


    \usepackage{changepage}


\begin{document}

\begin{table*}[htp]

\begin{adjustwidth}{-0.25\textwidth}{0em}

    \begin{threeparttable}

            % Table options

            % Caption
            \caption{Determination of Critical Lines Among RESs Based on Operational Interaction Operators}
            \label{table:critical_lines_w_ij_hat}


            % Center the table
            \centering

            \begin{tabularx}{1.5\textwidth}{c ||>{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C >{\hsize=0.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C |>{\hsize=1.5\hsize}C}

                \toprule

                \adjustbox{rotate=90, valign=c}{Quadrant} & \adjustbox{rotate=90, valign=c}{POI $i$} & \adjustbox{rotate=90, valign=c}{POI $j$} & \multicolumn{3}{c|}{Other POIs} &
                Critical Line Based on $\displaystyle \angle \bar{w}_{ij}$ or $\displaystyle \left| \bar{w}_{ij} \right|$ & Actual Critical Line (based on [Eq]) & $\displaystyle \left| S_{eq, \thinspace i} \right|$ & $\displaystyle \mathit{SDSCR}_{i}$ & \maxsizebox{\hsize}{!}{$\displaystyle \frac{\mathit{Max} \medspace \mathit{SDSCR}_{i}}{\textit{Mean} \medspace \mathit{SDSCR}_{i}}$}
                \\
                \Xhline{0.25mm}

                \scalelinespace{1.3} \adjustbox{rotate=90, valign=c}{III} & 101 & 64  & 96 & 106 & 37 & 86-87 & 86-87 & 4.38 & 2.02 & 1.41
                \\

                \scalelinespace{1.3} \adjustbox{rotate=90, valign=c}{IV} & 79 & 96  & 9 & 81 & 33 & 9-10 & 9-10 & 3.40 & 5.13 & 1.28
                \\

                \scalelinespace{1.3} \adjustbox{rotate=90, valign=c}{
                    \Shortstack[c]{{III} {IV \textsuperscript{a}}}
                                                                    }
                & 97 & 60  & 39 & 37 & 86 & 43-44 & 43-44 & 3.98 & 3.18 & 1.07
                \\

                \bottomrule
            \end{tabularx}

            \begin{tablenotes}

                \item[a] angles of $\displaystyle \angle \bar{w}_{ij}$ exist in both quadrants

            \end{tablenotes}

    \end{threeparttable}

\end{adjustwidth}

\end{table*}



\end{document}

información relacionada