How do I set the Rotate attribute for a landscape page of a pdf produced by xelatex?











up vote
2
down vote

favorite












I've adopted this answer to rotate a table and its caption. I do not want to rotate the header, the footer, the section title not the paragraph on the same page.



Now I want to change the Rotate attribute as described here so that the page is turned to landscape by the viewer application. I know the same question has been asked in this duplicate, but I need to use xelatex and the compiler complains about pdfpageattr to be an undefined control sequence.



Am I right to assume that pdflscape has no option to prevent changes to the layout in the landscape environment?



mwe:



documentclass[a4paper]{scrartcl}
usepackage{%
,adjustbox%
,tabularx%
,ragged2e%
,blindtext%
,placeins%
% ,pdflscape% <- I only want the pdf viewer to rotate the page
}
begin{document}

section{Portrait page}

Blindtext[3][1]
pagebreak[4]
% globalpdfpageattrexpandafter{thepdfpageattr/Rotate 90}
% --> Undefined control sequence. <--

% I can't use pdflscape's landscape environment as it changes the layout.

section{Landscape page}

This running text should be ``portrait''--readable.

% (leave 10ex room for the title and the paragraph.)
begin{table}[ht]
begin{adjustbox}{minipage=textwidth-10ex,%
addcode={begin{minipage}{width}}{%
caption{%
Here is a caption of the table which is so long that
it has to be wrapped over multiple lines, but should
not exceed the width (height after the rotation) of the table.
}%
end{minipage}},rotate=90,center}
begin{tabularx}{linewidth}{|r|XXXXX|}
multicolumn{6}{c}{{Largeslshape rotated table}}\
& 1 & 2 & 3 & 4 & 5 \hline
a & b & c & d & e & f \
a & b & c & d & e & f \
a & b & c & d & e & f \
a & b & c & d & e & f \
a & b & c & d & e & f \hline
end{tabularx}
end{adjustbox}
end{table}
FloatBarrier
pagebreak[4]
% globalpdfpageattrexpandafter{thepdfpageattr/Rotate 0}
Blindtext[2][1]
end{document}









share|improve this question


























    up vote
    2
    down vote

    favorite












    I've adopted this answer to rotate a table and its caption. I do not want to rotate the header, the footer, the section title not the paragraph on the same page.



    Now I want to change the Rotate attribute as described here so that the page is turned to landscape by the viewer application. I know the same question has been asked in this duplicate, but I need to use xelatex and the compiler complains about pdfpageattr to be an undefined control sequence.



    Am I right to assume that pdflscape has no option to prevent changes to the layout in the landscape environment?



    mwe:



    documentclass[a4paper]{scrartcl}
    usepackage{%
    ,adjustbox%
    ,tabularx%
    ,ragged2e%
    ,blindtext%
    ,placeins%
    % ,pdflscape% <- I only want the pdf viewer to rotate the page
    }
    begin{document}

    section{Portrait page}

    Blindtext[3][1]
    pagebreak[4]
    % globalpdfpageattrexpandafter{thepdfpageattr/Rotate 90}
    % --> Undefined control sequence. <--

    % I can't use pdflscape's landscape environment as it changes the layout.

    section{Landscape page}

    This running text should be ``portrait''--readable.

    % (leave 10ex room for the title and the paragraph.)
    begin{table}[ht]
    begin{adjustbox}{minipage=textwidth-10ex,%
    addcode={begin{minipage}{width}}{%
    caption{%
    Here is a caption of the table which is so long that
    it has to be wrapped over multiple lines, but should
    not exceed the width (height after the rotation) of the table.
    }%
    end{minipage}},rotate=90,center}
    begin{tabularx}{linewidth}{|r|XXXXX|}
    multicolumn{6}{c}{{Largeslshape rotated table}}\
    & 1 & 2 & 3 & 4 & 5 \hline
    a & b & c & d & e & f \
    a & b & c & d & e & f \
    a & b & c & d & e & f \
    a & b & c & d & e & f \
    a & b & c & d & e & f \hline
    end{tabularx}
    end{adjustbox}
    end{table}
    FloatBarrier
    pagebreak[4]
    % globalpdfpageattrexpandafter{thepdfpageattr/Rotate 0}
    Blindtext[2][1]
    end{document}









    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I've adopted this answer to rotate a table and its caption. I do not want to rotate the header, the footer, the section title not the paragraph on the same page.



      Now I want to change the Rotate attribute as described here so that the page is turned to landscape by the viewer application. I know the same question has been asked in this duplicate, but I need to use xelatex and the compiler complains about pdfpageattr to be an undefined control sequence.



      Am I right to assume that pdflscape has no option to prevent changes to the layout in the landscape environment?



      mwe:



      documentclass[a4paper]{scrartcl}
      usepackage{%
      ,adjustbox%
      ,tabularx%
      ,ragged2e%
      ,blindtext%
      ,placeins%
      % ,pdflscape% <- I only want the pdf viewer to rotate the page
      }
      begin{document}

      section{Portrait page}

      Blindtext[3][1]
      pagebreak[4]
      % globalpdfpageattrexpandafter{thepdfpageattr/Rotate 90}
      % --> Undefined control sequence. <--

      % I can't use pdflscape's landscape environment as it changes the layout.

      section{Landscape page}

      This running text should be ``portrait''--readable.

      % (leave 10ex room for the title and the paragraph.)
      begin{table}[ht]
      begin{adjustbox}{minipage=textwidth-10ex,%
      addcode={begin{minipage}{width}}{%
      caption{%
      Here is a caption of the table which is so long that
      it has to be wrapped over multiple lines, but should
      not exceed the width (height after the rotation) of the table.
      }%
      end{minipage}},rotate=90,center}
      begin{tabularx}{linewidth}{|r|XXXXX|}
      multicolumn{6}{c}{{Largeslshape rotated table}}\
      & 1 & 2 & 3 & 4 & 5 \hline
      a & b & c & d & e & f \
      a & b & c & d & e & f \
      a & b & c & d & e & f \
      a & b & c & d & e & f \
      a & b & c & d & e & f \hline
      end{tabularx}
      end{adjustbox}
      end{table}
      FloatBarrier
      pagebreak[4]
      % globalpdfpageattrexpandafter{thepdfpageattr/Rotate 0}
      Blindtext[2][1]
      end{document}









      share|improve this question













      I've adopted this answer to rotate a table and its caption. I do not want to rotate the header, the footer, the section title not the paragraph on the same page.



      Now I want to change the Rotate attribute as described here so that the page is turned to landscape by the viewer application. I know the same question has been asked in this duplicate, but I need to use xelatex and the compiler complains about pdfpageattr to be an undefined control sequence.



      Am I right to assume that pdflscape has no option to prevent changes to the layout in the landscape environment?



      mwe:



      documentclass[a4paper]{scrartcl}
      usepackage{%
      ,adjustbox%
      ,tabularx%
      ,ragged2e%
      ,blindtext%
      ,placeins%
      % ,pdflscape% <- I only want the pdf viewer to rotate the page
      }
      begin{document}

      section{Portrait page}

      Blindtext[3][1]
      pagebreak[4]
      % globalpdfpageattrexpandafter{thepdfpageattr/Rotate 90}
      % --> Undefined control sequence. <--

      % I can't use pdflscape's landscape environment as it changes the layout.

      section{Landscape page}

      This running text should be ``portrait''--readable.

      % (leave 10ex room for the title and the paragraph.)
      begin{table}[ht]
      begin{adjustbox}{minipage=textwidth-10ex,%
      addcode={begin{minipage}{width}}{%
      caption{%
      Here is a caption of the table which is so long that
      it has to be wrapped over multiple lines, but should
      not exceed the width (height after the rotation) of the table.
      }%
      end{minipage}},rotate=90,center}
      begin{tabularx}{linewidth}{|r|XXXXX|}
      multicolumn{6}{c}{{Largeslshape rotated table}}\
      & 1 & 2 & 3 & 4 & 5 \hline
      a & b & c & d & e & f \
      a & b & c & d & e & f \
      a & b & c & d & e & f \
      a & b & c & d & e & f \
      a & b & c & d & e & f \hline
      end{tabularx}
      end{adjustbox}
      end{table}
      FloatBarrier
      pagebreak[4]
      % globalpdfpageattrexpandafter{thepdfpageattr/Rotate 0}
      Blindtext[2][1]
      end{document}






      landscape adjustbox pdflscape






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 at 17:04









      Bart

      1527




      1527






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          xetex doesn't know pdfpageattr, you need to use a special with it



            special{pdf: put @thispage <</Rotate #1>>}%


          (#1 is the angle).



          You can use e.g. this internal commands of pdflscape to get the right effect:



          documentclass{article}
          usepackage{pdflscape}
          begin{document}
          blblb

          makeatletterPLS@AddRotate{90}makeatletter

          newpage

          makeatletterPLS@RemoveRotatemakeatother
          blblb

          end{document}





          share|improve this answer





















          • thanks. I knew about special and I looked through the source but I could not figure it out.
            – Bart
            Nov 14 at 17:53











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459981%2fhow-do-i-set-the-rotate-attribute-for-a-landscape-page-of-a-pdf-produced-by-xela%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          xetex doesn't know pdfpageattr, you need to use a special with it



            special{pdf: put @thispage <</Rotate #1>>}%


          (#1 is the angle).



          You can use e.g. this internal commands of pdflscape to get the right effect:



          documentclass{article}
          usepackage{pdflscape}
          begin{document}
          blblb

          makeatletterPLS@AddRotate{90}makeatletter

          newpage

          makeatletterPLS@RemoveRotatemakeatother
          blblb

          end{document}





          share|improve this answer





















          • thanks. I knew about special and I looked through the source but I could not figure it out.
            – Bart
            Nov 14 at 17:53















          up vote
          2
          down vote



          accepted










          xetex doesn't know pdfpageattr, you need to use a special with it



            special{pdf: put @thispage <</Rotate #1>>}%


          (#1 is the angle).



          You can use e.g. this internal commands of pdflscape to get the right effect:



          documentclass{article}
          usepackage{pdflscape}
          begin{document}
          blblb

          makeatletterPLS@AddRotate{90}makeatletter

          newpage

          makeatletterPLS@RemoveRotatemakeatother
          blblb

          end{document}





          share|improve this answer





















          • thanks. I knew about special and I looked through the source but I could not figure it out.
            – Bart
            Nov 14 at 17:53













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          xetex doesn't know pdfpageattr, you need to use a special with it



            special{pdf: put @thispage <</Rotate #1>>}%


          (#1 is the angle).



          You can use e.g. this internal commands of pdflscape to get the right effect:



          documentclass{article}
          usepackage{pdflscape}
          begin{document}
          blblb

          makeatletterPLS@AddRotate{90}makeatletter

          newpage

          makeatletterPLS@RemoveRotatemakeatother
          blblb

          end{document}





          share|improve this answer












          xetex doesn't know pdfpageattr, you need to use a special with it



            special{pdf: put @thispage <</Rotate #1>>}%


          (#1 is the angle).



          You can use e.g. this internal commands of pdflscape to get the right effect:



          documentclass{article}
          usepackage{pdflscape}
          begin{document}
          blblb

          makeatletterPLS@AddRotate{90}makeatletter

          newpage

          makeatletterPLS@RemoveRotatemakeatother
          blblb

          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 at 17:14









          Ulrike Fischer

          182k7288661




          182k7288661












          • thanks. I knew about special and I looked through the source but I could not figure it out.
            – Bart
            Nov 14 at 17:53


















          • thanks. I knew about special and I looked through the source but I could not figure it out.
            – Bart
            Nov 14 at 17:53
















          thanks. I knew about special and I looked through the source but I could not figure it out.
          – Bart
          Nov 14 at 17:53




          thanks. I knew about special and I looked through the source but I could not figure it out.
          – Bart
          Nov 14 at 17:53


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459981%2fhow-do-i-set-the-rotate-attribute-for-a-landscape-page-of-a-pdf-produced-by-xela%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?