Prevent overhanging of header on included PDFCan I get the page number of included PDF page?PDF Pages Included, but it does't workCreate a document cover using style classPage numbers of included pdfHow can I make pages after the first come out correctly with fancyhdr?How do I prevent pdfpages from either rescaling or cropping the included PDF?Border around included pdfCaption below of included PDFHeader including description and page counter of included PDFHighlighting included PDF

Codimension of non-flat locus

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Is it legal for company to use my work email to pretend I still work there?

Has there ever been an airliner design involving reducing generator load by installing solar panels?

dbcc cleantable batch size explanation

Theorems that impeded progress

What's that red-plus icon near a text?

Modeling an IP Address

Did Shadowfax go to Valinor?

High voltage LED indicator 40-1000 VDC without additional power supply

Alternative to sending password over mail?

How can I make my BBEG immortal short of making them a Lich or Vampire?

Is it possible to do 50 km distance without any previous training?

Find the result of this dual key cipher

Do I have a twin with permutated remainders?

Client team has low performances and low technical skills: we always fix their work and now they stop collaborate with us. How to solve?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

What is the opposite of debt?

How to format long polynomial?

How do I draw and define two right triangles next to each other?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

What does "Puller Prush Person" mean?

Python: return float 1.0 as int 1 but float 1.5 as float 1.5



Prevent overhanging of header on included PDF


Can I get the page number of included PDF page?PDF Pages Included, but it does't workCreate a document cover using style classPage numbers of included pdfHow can I make pages after the first come out correctly with fancyhdr?How do I prevent pdfpages from either rescaling or cropping the included PDF?Border around included pdfCaption below of included PDFHeader including description and page counter of included PDFHighlighting included PDF













0















I have a headrule which overhangs the text, whereas I would like it to be the same length as the text and aligned with the text. The misalignment seems to come when including a PDF rather than having it as part of the same document. Below are left and right page examples.



Left page exampleRight page example



The misalignment seems to occur regardless of what margins/paging I set in the included document. I have been looking at this as a fancyhdr problem, and tried to adjust the header with a combination of setting a shorter headwidth and adding in fancyheadoffset to shift it all to the right/left, but I cannot figure out the syntax for achieving this. If I use just headwidth, the rule is shorter but still misaligned. If I add fancyheadoffset after it, headwidth is ignored. If I put headwidth after fancyheadoffset, it gives a compilation error. My attempts are included with comments in the example.



However, it is also possible that this could be considered a pdfpages problem, and I need to include the PDF differently so that content is not shifted. (NB: In my actual document, the outer file also has content, so margins do need to be set in it.)



This is the minimal example producing the included content (save output as Include.pdf) :



documentclass[twoside,12pt,openany]article
usepackagesetspace
usepackagelipsum

setlengthoddsidemargin1.5cm
setlengthevensidemargin0 cm
setlengthtopmargin1mm
setlengthheadheight1.36cm
setlengthheadsep1.00cm
setlengthtextheight20.84cm
setlengthtextwidth14.5cm
setlengthmarginparsep1mm
setlengthmarginparwidth3cm
setlengthfootskip2.36cm


begindocument
doublespacing
lipsum

enddocument


And here is the code that uses it to generate the example images above:



documentclass[twoside,12pt,openany]book
usepackagepdfpages
usepackagefancyhdr

setlengthoddsidemargin1.5cm
setlengthevensidemargin0 cm
setlengthtopmargin1mm
setlengthheadheight1.36cm
setlengthheadsep1.00cm
setlengthtextheight20.84cm
setlengthtextwidth14.5cm
setlengthmarginparsep1mm
setlengthmarginparwidth3cm
setlengthfootskip2.36cm


fancypagestylepapertwostyle

fancyhf
renewcommandheadrulewidth1pt
fancyhead[RO]bfseriesMakeUppercaseChapter title
fancyhead[LE]bfseriesChapter 3
fancyfoot[C]thepage


% renewcommandheadwidth3in
% fancyheadoffset[ORH]-2.1em
% fancyheadoffset[ELH]-2.1em

begindocument

pagestylepapertwostyle
includepdf[pages=1-3, pagecommand=]Include

enddocument








share


























    0















    I have a headrule which overhangs the text, whereas I would like it to be the same length as the text and aligned with the text. The misalignment seems to come when including a PDF rather than having it as part of the same document. Below are left and right page examples.



    Left page exampleRight page example



    The misalignment seems to occur regardless of what margins/paging I set in the included document. I have been looking at this as a fancyhdr problem, and tried to adjust the header with a combination of setting a shorter headwidth and adding in fancyheadoffset to shift it all to the right/left, but I cannot figure out the syntax for achieving this. If I use just headwidth, the rule is shorter but still misaligned. If I add fancyheadoffset after it, headwidth is ignored. If I put headwidth after fancyheadoffset, it gives a compilation error. My attempts are included with comments in the example.



    However, it is also possible that this could be considered a pdfpages problem, and I need to include the PDF differently so that content is not shifted. (NB: In my actual document, the outer file also has content, so margins do need to be set in it.)



    This is the minimal example producing the included content (save output as Include.pdf) :



    documentclass[twoside,12pt,openany]article
    usepackagesetspace
    usepackagelipsum

    setlengthoddsidemargin1.5cm
    setlengthevensidemargin0 cm
    setlengthtopmargin1mm
    setlengthheadheight1.36cm
    setlengthheadsep1.00cm
    setlengthtextheight20.84cm
    setlengthtextwidth14.5cm
    setlengthmarginparsep1mm
    setlengthmarginparwidth3cm
    setlengthfootskip2.36cm


    begindocument
    doublespacing
    lipsum

    enddocument


    And here is the code that uses it to generate the example images above:



    documentclass[twoside,12pt,openany]book
    usepackagepdfpages
    usepackagefancyhdr

    setlengthoddsidemargin1.5cm
    setlengthevensidemargin0 cm
    setlengthtopmargin1mm
    setlengthheadheight1.36cm
    setlengthheadsep1.00cm
    setlengthtextheight20.84cm
    setlengthtextwidth14.5cm
    setlengthmarginparsep1mm
    setlengthmarginparwidth3cm
    setlengthfootskip2.36cm


    fancypagestylepapertwostyle

    fancyhf
    renewcommandheadrulewidth1pt
    fancyhead[RO]bfseriesMakeUppercaseChapter title
    fancyhead[LE]bfseriesChapter 3
    fancyfoot[C]thepage


    % renewcommandheadwidth3in
    % fancyheadoffset[ORH]-2.1em
    % fancyheadoffset[ELH]-2.1em

    begindocument

    pagestylepapertwostyle
    includepdf[pages=1-3, pagecommand=]Include

    enddocument








    share
























      0












      0








      0








      I have a headrule which overhangs the text, whereas I would like it to be the same length as the text and aligned with the text. The misalignment seems to come when including a PDF rather than having it as part of the same document. Below are left and right page examples.



      Left page exampleRight page example



      The misalignment seems to occur regardless of what margins/paging I set in the included document. I have been looking at this as a fancyhdr problem, and tried to adjust the header with a combination of setting a shorter headwidth and adding in fancyheadoffset to shift it all to the right/left, but I cannot figure out the syntax for achieving this. If I use just headwidth, the rule is shorter but still misaligned. If I add fancyheadoffset after it, headwidth is ignored. If I put headwidth after fancyheadoffset, it gives a compilation error. My attempts are included with comments in the example.



      However, it is also possible that this could be considered a pdfpages problem, and I need to include the PDF differently so that content is not shifted. (NB: In my actual document, the outer file also has content, so margins do need to be set in it.)



      This is the minimal example producing the included content (save output as Include.pdf) :



      documentclass[twoside,12pt,openany]article
      usepackagesetspace
      usepackagelipsum

      setlengthoddsidemargin1.5cm
      setlengthevensidemargin0 cm
      setlengthtopmargin1mm
      setlengthheadheight1.36cm
      setlengthheadsep1.00cm
      setlengthtextheight20.84cm
      setlengthtextwidth14.5cm
      setlengthmarginparsep1mm
      setlengthmarginparwidth3cm
      setlengthfootskip2.36cm


      begindocument
      doublespacing
      lipsum

      enddocument


      And here is the code that uses it to generate the example images above:



      documentclass[twoside,12pt,openany]book
      usepackagepdfpages
      usepackagefancyhdr

      setlengthoddsidemargin1.5cm
      setlengthevensidemargin0 cm
      setlengthtopmargin1mm
      setlengthheadheight1.36cm
      setlengthheadsep1.00cm
      setlengthtextheight20.84cm
      setlengthtextwidth14.5cm
      setlengthmarginparsep1mm
      setlengthmarginparwidth3cm
      setlengthfootskip2.36cm


      fancypagestylepapertwostyle

      fancyhf
      renewcommandheadrulewidth1pt
      fancyhead[RO]bfseriesMakeUppercaseChapter title
      fancyhead[LE]bfseriesChapter 3
      fancyfoot[C]thepage


      % renewcommandheadwidth3in
      % fancyheadoffset[ORH]-2.1em
      % fancyheadoffset[ELH]-2.1em

      begindocument

      pagestylepapertwostyle
      includepdf[pages=1-3, pagecommand=]Include

      enddocument








      share














      I have a headrule which overhangs the text, whereas I would like it to be the same length as the text and aligned with the text. The misalignment seems to come when including a PDF rather than having it as part of the same document. Below are left and right page examples.



      Left page exampleRight page example



      The misalignment seems to occur regardless of what margins/paging I set in the included document. I have been looking at this as a fancyhdr problem, and tried to adjust the header with a combination of setting a shorter headwidth and adding in fancyheadoffset to shift it all to the right/left, but I cannot figure out the syntax for achieving this. If I use just headwidth, the rule is shorter but still misaligned. If I add fancyheadoffset after it, headwidth is ignored. If I put headwidth after fancyheadoffset, it gives a compilation error. My attempts are included with comments in the example.



      However, it is also possible that this could be considered a pdfpages problem, and I need to include the PDF differently so that content is not shifted. (NB: In my actual document, the outer file also has content, so margins do need to be set in it.)



      This is the minimal example producing the included content (save output as Include.pdf) :



      documentclass[twoside,12pt,openany]article
      usepackagesetspace
      usepackagelipsum

      setlengthoddsidemargin1.5cm
      setlengthevensidemargin0 cm
      setlengthtopmargin1mm
      setlengthheadheight1.36cm
      setlengthheadsep1.00cm
      setlengthtextheight20.84cm
      setlengthtextwidth14.5cm
      setlengthmarginparsep1mm
      setlengthmarginparwidth3cm
      setlengthfootskip2.36cm


      begindocument
      doublespacing
      lipsum

      enddocument


      And here is the code that uses it to generate the example images above:



      documentclass[twoside,12pt,openany]book
      usepackagepdfpages
      usepackagefancyhdr

      setlengthoddsidemargin1.5cm
      setlengthevensidemargin0 cm
      setlengthtopmargin1mm
      setlengthheadheight1.36cm
      setlengthheadsep1.00cm
      setlengthtextheight20.84cm
      setlengthtextwidth14.5cm
      setlengthmarginparsep1mm
      setlengthmarginparwidth3cm
      setlengthfootskip2.36cm


      fancypagestylepapertwostyle

      fancyhf
      renewcommandheadrulewidth1pt
      fancyhead[RO]bfseriesMakeUppercaseChapter title
      fancyhead[LE]bfseriesChapter 3
      fancyfoot[C]thepage


      % renewcommandheadwidth3in
      % fancyheadoffset[ORH]-2.1em
      % fancyheadoffset[ELH]-2.1em

      begindocument

      pagestylepapertwostyle
      includepdf[pages=1-3, pagecommand=]Include

      enddocument






      fancyhdr pdfpages





      share












      share










      share



      share










      asked 8 mins ago









      AnnAnn

      1138




      1138




















          0






          active

          oldest

          votes












          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',
          autoActivateHeartbeat: false,
          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%2f483491%2fprevent-overhanging-of-header-on-included-pdf%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483491%2fprevent-overhanging-of-header-on-included-pdf%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 should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

          Tender dossier with centered articlesHow can I get legal style indentation on section, subsection, subsubsec.. using titlesec?missing item with addtocontents before sectionsubsubsubsection, paragraph and subparagraph count not reset when starting a new section, subsection, etcTikZ won't support HSB color model hsb in article document classAdding a vskip1em before each section - won't compile with itHow to implement a customized hierarchical table of content using titletoc with changing number formatsSection title formatGrouped entries in index don't spill over to next columnParagraph spacing in documentclassarticle with Figure and ListingsRagged Right Index Entries

          Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"