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
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.
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
add a comment |
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.
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
add a comment |
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.
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
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.
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
fancyhdr pdfpages
asked 8 mins ago
AnnAnn
1138
1138
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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