Girar un longtblr sin girar la página

Girar un longtblr sin girar la página

He leído varias discusiones sobre formas de producir tablas largas rotadas.

Me interesa especialmente el hecho de quepdflscape pueda producir una solución que funcione, como en: Paisaje de mesa larga

Sin embargo, me gustaría la página.noestar en modo horizontal al final, ya que no es compatible con la generación de PDF/A.

¿Habría alguna manera de rotar específicamente esas páginas apaisadas?

Me imagino que la numeración de las páginas estaría mal colocada, pero si este es el único problema, por mí está bien.

Estoy usando el MWE desde el enlace indicado:

\documentclass[11pt]{article}
\usepackage[a4paper,margin=1.5cm]{geometry}

\usepackage[labelfont=bf, textfont=it,
            labelsep=newline,
            justification=centering]{caption}
\captionsetup[table]{ skip=1.4pt, labelfont=sc}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}  % <---
  \ExplSyntaxOn
\NewChildSelector{eachtwo}
  {
    \int_step_inline:nnnn {3}{2}{\l_tblr_childs_total_tl}
      { \clist_put_right:Nn \l_tblr_childs_clist {##1} }
  }
\ExplSyntaxOff

\usepackage{pdflscape}
\sisetup{group-separator={,},
         table-format={(}1.3{***},
         input-open-uncertainty =,
         input-close-uncertainty=,
         }

\begin{document}

%%% <- HERE ADD A COMMAND TO START ROTATING THE LANDSCAPE PAGES %%%

    \begin{landscape}
%
    \begin{longtblr}[
caption = {OLS estimation - Dependent variable std\_gpa},
  label = {OLSstd},
  remark{Note} = {TBW\\ 
                  $^*p<0.1;~^{**}p<0.05;~^{***}p<0.01$.},
                    ]{%colsep = 4pt,
                      colspec = {@{} X *{5}{S} @{}},
                     row{2-Z} = {rowsep=0pt},
                     row{eachtwo} = {abovesep=1ex},
                      rowhead = 1,
                     }
    \toprule
% column headers
            & {{{(1)}}} & {{{(2)}}} & {{{(3)}}} & {{{(4)}}} & {{{(5)}}} \\
    \midrule
% table body
autonuni    &  0.020    &  0.019    &  0.013    &   0.011   &   0.011           \\
            & (0.013)   & (0.013)   & (0.013)   &  (0.013)  &  (0.013)          \\

female      &           &  0.168\TblrNote{***}
                                    &   0.129\TblrNote{***}
                                                &  0.127\TblrNote{***}
                                                            &   0.138\TblrNote{***}  \\
            &           & (0.046)   &  (0.042)  & (0.044)   &  (0.041)          \\

z\_age      &           & -1.142\TblrNote{**}
                                    & -1.070\TblrNote{**}
                                                & -1.122\TblrNote{**}
                                                            & -0.977\TblrNote{*}     \\
            &           & (0.564)   & (0.518)   & (0.519)   & (0.521)           \\

z\_age2     &           &  1.113\TblrNote{*}
                                    &  1.044\TblrNote{*}
                                                &  1.098\TblrNote{**}
                                                            &  0.957\TblrNote{*}     \\
            &           & (0.570)   & (0.523)   & (0.523)   & (0.525)           \\

school\_scientlic
            &           & -0.083    & -0.081    & -0.089    & -0.091\TblrNote{*}     \\
            &           & (0.057)   & (0.056)   & (0.056)   & (0.053)           \\

school\_otherlic    &   & -0.179\TblrNote{***}
                                    & -0.173\TblrNote{***}
                                                & -0.178\TblrNote{***}
                                                            & -0.169\TblrNote{***}   \\
            &           & (0.039)   & (0.039)   & (0.037)   & (0.040)           \\

school\_techvoc
            &           & -0.332\TblrNote{***}
                                    & -0.338\TblrNote{***}
                                                & -0.338\TblrNote{***}
                                                            & -0.345\TblrNote{***}   \\
            &           & (0.066)   & (0.065)   & (0.060)   & (0.059)           \\

z\_e        &           &           & -0.026    & -0.024    & -0.023            \\
            &           &           & (0.019)   & (0.019)   & (0.019)           \\

z\_a        &           &           & -0.040\TblrNote{*}
                                                & -0.042\TblrNote{*}
                                                            & -0.038            \\
            &           &           & (0.023)   & (0.023)   & (0.023)           \\

z\_c        &           &           & 0.094\TblrNote{***}
                                                & 0.093\TblrNote{***}
                                                            & 0.091\TblrNote{***}    \\
            &           &           & (0.017)   & (0.017)   & (0.017)           \\

z\_n        &           &           & -0.034    & -0.029    & -0.028            \\
            &           &           & (0.024)   & (0.023)   & (0.022)           \\

z\_o        &           &           &  0.037\TblrNote{**}
                                                &  0.036\TblrNote{**}
                                                            &  0.037\TblrNote{**}    \\
            &           &           & (0.018)   & (0.017)   & (0.017)           \\

edufat\_high    &       &           &           &  0.037    &  0.026            \\
            &           &           &           & (0.040)   & (0.039)           \\

edufat\_l   &           &           &           & -0.042    & -0.048            \\
            &           &           &           & (0.053)   & (0.055)           \\

edumot\_high    &       &           &           & -0.039    & -0.048            \\
            &           &           &           & (0.050)   & (0.050)           \\
edumot\_l   &           &           &           & 0.099     &  0.085            \\
            &           &           &           & (0.062)   & (0.059)           \\

occupfat\_d2    &       &           &           & -0.059    & -0.055            \\
            &           &           &           & (0.054)   & (0.055)           \\

occupfat\_d3    &       &           &           & -0.164\TblrNote{***}
                                                            & -0.159\TblrNote{**}    \\
            &           &           &           & (0.059)   & (0.059)           \\

occupfat\_d4    &       &           &           &  0.084    &  0.087            \\
            &           &           &           & (0.157)   & (0.155)           \\

occupfat\_d5    &       &           &           & -0.282\TblrNote{***}
                                                            & -0.288\TblrNote{***}   \\
            &           &           &           & (0.070)   & (0.073)           \\

occupmot\_d2    &       &           &           & -0.062    & -0.051            \\
            &           &           &           & (0.038)   & (0.038)           \\

occupmot\_d3    &       &           &           & -0.150\TblrNote{**}
                                                            & -0.135\TblrNote{*}     \\
            &           &           &           & (0.068)   & (0.069)           \\

occupmot\_d4    &       &           &           &  0.063    &  0.061            \\
            &           &           &           & (0.054)   & (0.054)           \\

occupmot\_d5    &       &           &           &  0.024    &  0.027            \\
            &           &           &           & (0.181)   & (0.178)           \\

jobsectfat\_d2  &       &           &           & -0.011    & -0.015            \\
            &           &           &           & (0.060)   & (0.061)           \\

jobsectfat\_d3  &       &           &           & -0.035    & -0.041            \\
            &           &           &           & (0.077)   & (0.076)           \\

jobsectfat\_d4  &       &           &           & -0.037    & -0.034            \\
            &           &           &           & (0.044)   & (0.045)           \\

jobsectmot\_d2  &       &           &           &  0.063    &  0.072            \\
            &           &           &           & (0.119)   & (0.117)           \\

jobsectmot\_d3  &       &           &           &  0.211    &  0.184            \\
            &           &           &           & (0.155)   & (0.155)           \\

jobsectmot\_d4  &       &           &           & -0.029    & -0.018            \\
            &           &           &           & (0.043)   & (0.044)           \\

resid\_provme   &       &           &           &           &  0.002            \\
            &           &           &           &           & (0.033)           \\

resid\_othersicily  &   &           &           &           & -0.084            \\
            &           &           &           &           & (0.062)           \\

resid\_rc   &           &           &           &           &  0.004            \\
            &           &           &           &           & (0.079)           \\

resid\_provrc   &       &           &           &           & -0.175\TblrNote{***}   \\
            &           &           &           &           & (0.062)           \\

resid\_othercalabria
            &           &           &           &           & -0.374\TblrNote{***}   \\
            &           &           &           &           & (0.093)           \\
    
resid\_otheritaly   &   &           &           &           & 0.035             \\
            &           &           &           &           & (0.227)           \\
    \midrule
\(N\)       &{{{3242}}} &{{{3242}}} &{{{3242}}} &{{{3242}}} &{{{3242}}}         \\
    \bottomrule
    \end{longtblr}
    \end{landscape}

%%% <- HERE ADD A COMMAND TO STOP ROTATING THE LANDSCAPE PAGES %%%

\end{document}

Actualizaciones

He añadido una imagen para explicar mejor el resultado deseado: Orientación de página deseada

Respuesta1

Mucho anhelo por el comentario...

  • Como ya mencioné en mi comentario, se desconoce el fondo de la tabla deseada:
    • ¿Realmente necesita una primera columna tan ancha? (Su ancho es casi el ancho de la tabla, pero el texto mostrado es muy estrecho (aproximadamente 8 em).
    • Como lo proporciona MWE, el código de tabla usado puede caber perfectamente en una página vertical.
    • ¿Qué quieres decir con rotar una tabla pero no una página? Esta demanda no está clara. Parece que le gusta que la página con la tabla no se gire (para facilitar la lectura) sino que se mantenga en la forma tal como aparece en la versión impresa del documento.
    • Si lo anterior es el caso, entonces su problema no es el código de la tabla sino el paquete usado para páginas horizontales: en lugar de, pdflscapedebería usar lscape!
  • A continuación se muestran dos ejemplos. En el primero, se proporciona el código MWE completo para la configuración de tablas en páginas orientadas verticalmente; en el segundo, solo se muestran los cambios necesarios si persiste en rotar la tabla en la página:
\RequirePackage{etex}
\documentclass[11pt]{article}
\usepackage[a4paper,margin=1.5cm]{geometry}

%\usepackage[labelfont=bf, textfont=it,             % not used in this MWE
%            labelsep=newline,
%            justification=centering]{caption}
%\captionsetup[table]{ skip=1.4pt, labelfont=sc}
\usepackage{tabularray}
    \SetTblrStyle{caption-text}{font=\small}
    \SetTblrStyle{caption-tag}{font=\small\bfseries}
    \SetTblrStyle{conthead-text}{font=\small}
    \SetTblrStyle{contfoot}{font=\footnotesize\itshape}
%----------------
    \UseTblrLibrary{booktabs, siunitx}
\usepackage{linegoal}

\begin{document}
\begingroup
\sisetup{group-separator={,},
         table-format={(}-1.3{$^{***}$},
         input-open-uncertainty =,
         input-close-uncertainty=,
         table-align-text-before = false
         }

    \begin{longtblr}[
caption = {OLS estimation - Dependent variable std\_gpa},
  label = {OLSstd},
remark{Note} = {\parbox[t]{\linegoal}{
                TBW
                $^*:\ p<0.1;\quad ^{**}:\ p<0.05;\quad ^{***}:\ p<0.01$.}
                },
                    ]{colspec  = {@{} X[2.5,l] *{5}{X[c, h, si]} @{}},
                      row{2-Z} = {rowsep=0pt},
                        row{1} = {guard},
                  row{even[3]} = {abovesep=1ex},
                      rowhead  = 1,
                     }
    \toprule
% column headers
            &   (1)     &   (2)     &   (3)     &   (4)     &   (5)             \\
    \midrule
% table body
autonuni    &  0.020    &  0.019    &  0.013    &   0.011   &   0.011           \\
            & (0.013)   & (0.013)   & (0.013)   &  (0.013)  &  (0.013)          \\

female      &           &  0.168\TblrNote{***}
                                    &   0.129\TblrNote{***}
                                                &  0.127\TblrNote{***}
                                                            &   0.138\TblrNote{***}  \\
            &           & (0.046)   &  (0.042)  & (0.044)   &  (0.041)          \\

z\_age      &           & -1.142\TblrNote{**}
                                    & -1.070\TblrNote{**}
                                                & -1.122\TblrNote{**}
                                                            & -0.977\TblrNote{*}     \\
            &           & (0.564)   & (0.518)   & (0.519)   & (0.521)           \\

z\_age2     &           &  1.113\TblrNote{*}
                                    &  1.044\TblrNote{*}
                                                &  1.098\TblrNote{**}
                                                            &  0.957\TblrNote{*}     \\
            &           & (0.570)   & (0.523)   & (0.523)   & (0.525)           \\

school\_scientlic
            &           & -0.083    & -0.081    & -0.089    & -0.091\TblrNote{*}     \\
            &           & (0.057)   & (0.056)   & (0.056)   & (0.053)           \\

school\_otherlic    &   & -0.179\TblrNote{***}
                                    & -0.173\TblrNote{***}
                                                & -0.178\TblrNote{***}
                                                            & -0.169\TblrNote{***}   \\
            &           & (0.039)   & (0.039)   & (0.037)   & (0.040)           \\

school\_techvoc
            &           & -0.332\TblrNote{***}
                                    & -0.338\TblrNote{***}
                                                & -0.338\TblrNote{***}
                                                            & -0.345\TblrNote{***}   \\
            &           & (0.066)   & (0.065)   & (0.060)   & (0.059)           \\

z\_e        &           &           & -0.026    & -0.024    & -0.023            \\
            &           &           & (0.019)   & (0.019)   & (0.019)           \\

z\_a        &           &           & -0.040\TblrNote{*}
                                                & -0.042\TblrNote{*}
                                                            & -0.038            \\
            &           &           & (0.023)   & (0.023)   & (0.023)           \\

z\_c        &           &           & 0.094\TblrNote{***}
                                                & 0.093\TblrNote{***}
                                                            & 0.091\TblrNote{***}    \\
            &           &           & (0.017)   & (0.017)   & (0.017)           \\

z\_n        &           &           & -0.034    & -0.029    & -0.028            \\
            &           &           & (0.024)   & (0.023)   & (0.022)           \\

z\_o        &           &           &  0.037\TblrNote{**}
                                                &  0.036\TblrNote{**}
                                                            &  0.037\TblrNote{**}    \\
            &           &           & (0.018)   & (0.017)   & (0.017)           \\

edufat\_high    &       &           &           &  0.037    &  0.026            \\
            &           &           &           & (0.040)   & (0.039)           \\

edufat\_l   &           &           &           & -0.042    & -0.048            \\
            &           &           &           & (0.053)   & (0.055)           \\

edumot\_high    &       &           &           & -0.039    & -0.048            \\
            &           &           &           & (0.050)   & (0.050)           \\
edumot\_l   &           &           &           & 0.099     &  0.085            \\
            &           &           &           & (0.062)   & (0.059)           \\

occupfat\_d2    &       &           &           & -0.059    & -0.055            \\
            &           &           &           & (0.054)   & (0.055)           \\

occupfat\_d3    &       &           &           & -0.164\TblrNote{***}
                                                            & -0.159\TblrNote{**}    \\
            &           &           &           & (0.059)   & (0.059)           \\

occupfat\_d4    &       &           &           &  0.084    &  0.087            \\
            &           &           &           & (0.157)   & (0.155)           \\

occupfat\_d5    &       &           &           & -0.282\TblrNote{***}
                                                            & -0.288\TblrNote{***}   \\
            &           &           &           & (0.070)   & (0.073)           \\

occupmot\_d2    &       &           &           & -0.062    & -0.051            \\
            &           &           &           & (0.038)   & (0.038)           \\

occupmot\_d3    &       &           &           & -0.150\TblrNote{**}
                                                            & -0.135\TblrNote{*}     \\
            &           &           &           & (0.068)   & (0.069)           \\

occupmot\_d4    &       &           &           &  0.063    &  0.061            \\
            &           &           &           & (0.054)   & (0.054)           \\

occupmot\_d5    &       &           &           &  0.024    &  0.027            \\
            &           &           &           & (0.181)   & (0.178)           \\

jobsectfat\_d2  &       &           &           & -0.011    & -0.015            \\
            &           &           &           & (0.060)   & (0.061)           \\

jobsectfat\_d3  &       &           &           & -0.035    & -0.041            \\
            &           &           &           & (0.077)   & (0.076)           \\

jobsectfat\_d4  &       &           &           & -0.037    & -0.034            \\
            &           &           &           & (0.044)   & (0.045)           \\

jobsectmot\_d2  &       &           &           &  0.063    &  0.072            \\
            &           &           &           & (0.119)   & (0.117)           \\

jobsectmot\_d3  &       &           &           &  0.211    &  0.184            \\
            &           &           &           & (0.155)   & (0.155)           \\

jobsectmot\_d4  &       &           &           & -0.029    & -0.018            \\
            &           &           &           & (0.043)   & (0.044)           \\

resid\_provme   &       &           &           &           &  0.002            \\
            &           &           &           &           & (0.033)           \\

resid\_othersicily  &   &           &           &           & -0.084            \\
            &           &           &           &           & (0.062)           \\

resid\_rc   &           &           &           &           &  0.004            \\
            &           &           &           &           & (0.079)           \\

resid\_provrc   &       &           &           &           & -0.175\TblrNote{***}   \\
            &           &           &           &           & (0.062)           \\

resid\_othercalabria
            &           &           &           &           & -0.374\TblrNote{***}   \\
            &           &           &           &           & (0.093)           \\

resid\_otheritaly   &   &           &           &           & 0.035             \\
            &           &           &           &           & (0.227)           \\
    \midrule
\(N\)       &{{{3242}}} &{{{3242}}} &{{{3242}}} &{{{3242}}} &{{{3242}}}         \\
    \bottomrule
    \end{longtblr}
\endgroup

\end{document}

ingrese la descripción de la imagen aquí

En el segundo ejemplo, donde se gira la tabla en la página, es necesario insertar lscapeel paquete en el preámbulo del documento y adoptar un poco la inserción de la tabla en el documento:



\RequirePackage{etex}
\documentclass[11pt]{article}
\usepackage[a4paper,margin=1.5cm]{geometry}

%\usepackage[labelfont=bf, textfont=it,             % not used in this MWE
%            labelsep=newline,
%            justification=centering]{caption}
%\captionsetup[table]{ skip=1.4pt, labelfont=sc}
\usepackage{tabularray}
    \SetTblrStyle{caption-text}{font=\small}
    \SetTblrStyle{caption-tag}{font=\small\bfseries}
    \SetTblrStyle{conthead-text}{font=\small}    
    \SetTblrStyle{contfoot}{font=\footnotesize\itshape}
%---------------- 
    \UseTblrLibrary{booktabs, siunitx}  
\usepackage[inline]{enumitem}
\usepackage{linegoal}
\usepackage{lscape}         % <---- added

\begin{document}
\begin{landscape}   % <--- added
\sisetup{group-separator={,},
         table-format={(}-1.3{$^{***}$},
         input-open-uncertainty =,
         input-close-uncertainty=,
         table-align-text-before = false
         }

    \begin{longtblr}[
caption = {OLS estimation - Dependent variable std\_gpa},
  label = {OLSstd},
remark{Note} = {\parbox[t]{\linegoal}{
                TBW\\
                $^*:\ p<0.1;\quad ^{**}:\ p<0.05;\quad ^{***}:\ p<0.01$.}
                },
                    ]{colspec  = {@{} X[5,l] *{5}{X[c, h, si]} @{}},  %  changed width of the first column
                      row{2-Z} = {rowsep=0pt},
                        row{1} = {guard},
                  row{even[3]} = {abovesep=1ex},
                      rowhead  = 1,
                     }
    \toprule
% column headers
            &   (1)     &   (2)     &   (3)     &   (4)     &   (5)             \\
    \midrule
% table body is the same ase in the first example
% ...
    \bottomrule
    \end{longtblr}
\end{landscape}     % added

\end{document}

ingrese la descripción de la imagen aquí

Por favor, avíseme si mi suposición de cuál es realmente su problema es correcta. Si no, por favor aclare su pregunta.

En ambos entornos, el código de la tabla mínima ha cambiado un poco (mejorado), por lo que ahora el código es un poquito más corto y más simple, y, en mi opinión, la tabla resultó más atractiva.

Por cierto, me quedaría con el primer ejemplo.

información relacionada