After cfoot command every page is getting the same footer despite of specifying thispagestyle
I am using fancyhdr package, I want some pages of my document to have a specific footer which I managed to do with the help of cfoot. I'm using font Marathi.
But after that page every page has got the same footer specified as the argument of cfoot. I also added pagenumbering{arabic} after that page, but it is not at work. Please help me out.
(Note - pagestyle of all the pages is fancy.)
As suggested by @Marjin I've made a file. (I've added each and every command from my preamble. Probably few commands are also not related with our interest.) This file does not run. (polyglossia needs XeLaTeX, so I've used XeLaTeX)
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
setdefaultlanguage{Marathi}
setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi\
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{एक}
abcdefghi\
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{दोन}
abcdefghi\
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{तीन}
abcdefghi\
pagebreak
thispagestyle{fancy}
abcdefghi\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
page-numbering fancyhdr footer pagestyle
|
show 2 more comments
I am using fancyhdr package, I want some pages of my document to have a specific footer which I managed to do with the help of cfoot. I'm using font Marathi.
But after that page every page has got the same footer specified as the argument of cfoot. I also added pagenumbering{arabic} after that page, but it is not at work. Please help me out.
(Note - pagestyle of all the pages is fancy.)
As suggested by @Marjin I've made a file. (I've added each and every command from my preamble. Probably few commands are also not related with our interest.) This file does not run. (polyglossia needs XeLaTeX, so I've used XeLaTeX)
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
setdefaultlanguage{Marathi}
setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi\
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{एक}
abcdefghi\
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{दोन}
abcdefghi\
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{तीन}
abcdefghi\
pagebreak
thispagestyle{fancy}
abcdefghi\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
page-numbering fancyhdr footer pagestyle
2
Can you provide a small document (perhaps using lipsum) which demonstrates the problem?
– John Kormylo
Mar 21 at 3:35
Please show us a short compilable tex code resulting in your issue we can test on our own computers
– Kurt
Mar 21 at 3:36
My actual input file is very long and I cannot really paste it here. I tried to make one new input file imitating the commands in the real file, but actually it is working fine in that file. Probably fancyhdr is crashing with the other packages I've used (fontspec xltxtra polyglossia fancyhdr navigator eso-pic color xcolor)
– Niranjan
Mar 21 at 6:54
2
You can try to add those packages to the preamble of your small new input file to see if it makes any difference, if not then you can add contents from your actual file until the problem appears, or the other way around take (a copy of) your actual file and remove content until the problem disappears. Once you know where the problem is you can most likely construct a small example to reproduce the problem, which we can address here - or maybe during your investigation you already find the solution yourself.
– Marijn
Mar 21 at 9:30
@Marjin I've made one file which is not running. Please check it.
– Niranjan
Mar 21 at 11:30
|
show 2 more comments
I am using fancyhdr package, I want some pages of my document to have a specific footer which I managed to do with the help of cfoot. I'm using font Marathi.
But after that page every page has got the same footer specified as the argument of cfoot. I also added pagenumbering{arabic} after that page, but it is not at work. Please help me out.
(Note - pagestyle of all the pages is fancy.)
As suggested by @Marjin I've made a file. (I've added each and every command from my preamble. Probably few commands are also not related with our interest.) This file does not run. (polyglossia needs XeLaTeX, so I've used XeLaTeX)
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
setdefaultlanguage{Marathi}
setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi\
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{एक}
abcdefghi\
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{दोन}
abcdefghi\
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{तीन}
abcdefghi\
pagebreak
thispagestyle{fancy}
abcdefghi\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
page-numbering fancyhdr footer pagestyle
I am using fancyhdr package, I want some pages of my document to have a specific footer which I managed to do with the help of cfoot. I'm using font Marathi.
But after that page every page has got the same footer specified as the argument of cfoot. I also added pagenumbering{arabic} after that page, but it is not at work. Please help me out.
(Note - pagestyle of all the pages is fancy.)
As suggested by @Marjin I've made a file. (I've added each and every command from my preamble. Probably few commands are also not related with our interest.) This file does not run. (polyglossia needs XeLaTeX, so I've used XeLaTeX)
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
setdefaultlanguage{Marathi}
setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi\
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{एक}
abcdefghi\
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{दोन}
abcdefghi\
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{तीन}
abcdefghi\
pagebreak
thispagestyle{fancy}
abcdefghi\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
page-numbering fancyhdr footer pagestyle
page-numbering fancyhdr footer pagestyle
edited Mar 21 at 20:55
Kurt
40.2k850164
40.2k850164
asked Mar 21 at 2:45
NiranjanNiranjan
305
305
2
Can you provide a small document (perhaps using lipsum) which demonstrates the problem?
– John Kormylo
Mar 21 at 3:35
Please show us a short compilable tex code resulting in your issue we can test on our own computers
– Kurt
Mar 21 at 3:36
My actual input file is very long and I cannot really paste it here. I tried to make one new input file imitating the commands in the real file, but actually it is working fine in that file. Probably fancyhdr is crashing with the other packages I've used (fontspec xltxtra polyglossia fancyhdr navigator eso-pic color xcolor)
– Niranjan
Mar 21 at 6:54
2
You can try to add those packages to the preamble of your small new input file to see if it makes any difference, if not then you can add contents from your actual file until the problem appears, or the other way around take (a copy of) your actual file and remove content until the problem disappears. Once you know where the problem is you can most likely construct a small example to reproduce the problem, which we can address here - or maybe during your investigation you already find the solution yourself.
– Marijn
Mar 21 at 9:30
@Marjin I've made one file which is not running. Please check it.
– Niranjan
Mar 21 at 11:30
|
show 2 more comments
2
Can you provide a small document (perhaps using lipsum) which demonstrates the problem?
– John Kormylo
Mar 21 at 3:35
Please show us a short compilable tex code resulting in your issue we can test on our own computers
– Kurt
Mar 21 at 3:36
My actual input file is very long and I cannot really paste it here. I tried to make one new input file imitating the commands in the real file, but actually it is working fine in that file. Probably fancyhdr is crashing with the other packages I've used (fontspec xltxtra polyglossia fancyhdr navigator eso-pic color xcolor)
– Niranjan
Mar 21 at 6:54
2
You can try to add those packages to the preamble of your small new input file to see if it makes any difference, if not then you can add contents from your actual file until the problem appears, or the other way around take (a copy of) your actual file and remove content until the problem disappears. Once you know where the problem is you can most likely construct a small example to reproduce the problem, which we can address here - or maybe during your investigation you already find the solution yourself.
– Marijn
Mar 21 at 9:30
@Marjin I've made one file which is not running. Please check it.
– Niranjan
Mar 21 at 11:30
2
2
Can you provide a small document (perhaps using lipsum) which demonstrates the problem?
– John Kormylo
Mar 21 at 3:35
Can you provide a small document (perhaps using lipsum) which demonstrates the problem?
– John Kormylo
Mar 21 at 3:35
Please show us a short compilable tex code resulting in your issue we can test on our own computers
– Kurt
Mar 21 at 3:36
Please show us a short compilable tex code resulting in your issue we can test on our own computers
– Kurt
Mar 21 at 3:36
My actual input file is very long and I cannot really paste it here. I tried to make one new input file imitating the commands in the real file, but actually it is working fine in that file. Probably fancyhdr is crashing with the other packages I've used (fontspec xltxtra polyglossia fancyhdr navigator eso-pic color xcolor)
– Niranjan
Mar 21 at 6:54
My actual input file is very long and I cannot really paste it here. I tried to make one new input file imitating the commands in the real file, but actually it is working fine in that file. Probably fancyhdr is crashing with the other packages I've used (fontspec xltxtra polyglossia fancyhdr navigator eso-pic color xcolor)
– Niranjan
Mar 21 at 6:54
2
2
You can try to add those packages to the preamble of your small new input file to see if it makes any difference, if not then you can add contents from your actual file until the problem appears, or the other way around take (a copy of) your actual file and remove content until the problem disappears. Once you know where the problem is you can most likely construct a small example to reproduce the problem, which we can address here - or maybe during your investigation you already find the solution yourself.
– Marijn
Mar 21 at 9:30
You can try to add those packages to the preamble of your small new input file to see if it makes any difference, if not then you can add contents from your actual file until the problem appears, or the other way around take (a copy of) your actual file and remove content until the problem disappears. Once you know where the problem is you can most likely construct a small example to reproduce the problem, which we can address here - or maybe during your investigation you already find the solution yourself.
– Marijn
Mar 21 at 9:30
@Marjin I've made one file which is not running. Please check it.
– Niranjan
Mar 21 at 11:30
@Marjin I've made one file which is not running. Please check it.
– Niranjan
Mar 21 at 11:30
|
show 2 more comments
1 Answer
1
active
oldest
votes
Because you are using a font most of us do not have we can not run your given mwe. If the font is not the issue please create in future an mwe without your special font and use a standard font as I did in the following mwe.
If you change cfoot in code this changing is permanent, that means if you want to get the pagenumber later back you have to change cfoot again as I did in the following mwe. Please see that I used the text foot <number> for your changings in cfoot and added at last cfoot{thepage} to get the page number back. I added numbers to your page head like abcdefghi 1 to be better able to identify the current page. I simply commented your font definitions ...
MWE:
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
%setdefaultlanguage{Marathi}
%setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
%newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
%newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi 1\ % <=======================================================
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{foot1}
abcdefghi 2\ % <=======================================================
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{foot2}
abcdefghi 3\ % <=======================================================
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{foot3}
abcdefghi 4\ % <=======================================================
pagebreak
thispagestyle{fancy}
cfoot{thepage} % <====================================================
abcdefghi 5\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
and the result:

and page 5

Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
1
@Niranjan Change the firstthispagestyle{fancy}topagestyle{fancy}, then you can omit/comment the followingthispagestyle{fancy}. You still get the lines you want, because stylefancyis defined and will not change until the pagestyle is redefined. With changingcfootyou get the changed centered foot printed ubtil you change it again.
– Kurt
Mar 22 at 5:00
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
1
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, likeplain,fancyor self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.
– Kurt
Mar 22 at 5:09
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
|
show 2 more comments
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');
});
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%2f480610%2fafter-cfoot-command-every-page-is-getting-the-same-footer-despite-of-specifying%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
Because you are using a font most of us do not have we can not run your given mwe. If the font is not the issue please create in future an mwe without your special font and use a standard font as I did in the following mwe.
If you change cfoot in code this changing is permanent, that means if you want to get the pagenumber later back you have to change cfoot again as I did in the following mwe. Please see that I used the text foot <number> for your changings in cfoot and added at last cfoot{thepage} to get the page number back. I added numbers to your page head like abcdefghi 1 to be better able to identify the current page. I simply commented your font definitions ...
MWE:
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
%setdefaultlanguage{Marathi}
%setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
%newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
%newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi 1\ % <=======================================================
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{foot1}
abcdefghi 2\ % <=======================================================
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{foot2}
abcdefghi 3\ % <=======================================================
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{foot3}
abcdefghi 4\ % <=======================================================
pagebreak
thispagestyle{fancy}
cfoot{thepage} % <====================================================
abcdefghi 5\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
and the result:

and page 5

Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
1
@Niranjan Change the firstthispagestyle{fancy}topagestyle{fancy}, then you can omit/comment the followingthispagestyle{fancy}. You still get the lines you want, because stylefancyis defined and will not change until the pagestyle is redefined. With changingcfootyou get the changed centered foot printed ubtil you change it again.
– Kurt
Mar 22 at 5:00
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
1
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, likeplain,fancyor self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.
– Kurt
Mar 22 at 5:09
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
|
show 2 more comments
Because you are using a font most of us do not have we can not run your given mwe. If the font is not the issue please create in future an mwe without your special font and use a standard font as I did in the following mwe.
If you change cfoot in code this changing is permanent, that means if you want to get the pagenumber later back you have to change cfoot again as I did in the following mwe. Please see that I used the text foot <number> for your changings in cfoot and added at last cfoot{thepage} to get the page number back. I added numbers to your page head like abcdefghi 1 to be better able to identify the current page. I simply commented your font definitions ...
MWE:
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
%setdefaultlanguage{Marathi}
%setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
%newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
%newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi 1\ % <=======================================================
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{foot1}
abcdefghi 2\ % <=======================================================
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{foot2}
abcdefghi 3\ % <=======================================================
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{foot3}
abcdefghi 4\ % <=======================================================
pagebreak
thispagestyle{fancy}
cfoot{thepage} % <====================================================
abcdefghi 5\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
and the result:

and page 5

Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
1
@Niranjan Change the firstthispagestyle{fancy}topagestyle{fancy}, then you can omit/comment the followingthispagestyle{fancy}. You still get the lines you want, because stylefancyis defined and will not change until the pagestyle is redefined. With changingcfootyou get the changed centered foot printed ubtil you change it again.
– Kurt
Mar 22 at 5:00
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
1
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, likeplain,fancyor self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.
– Kurt
Mar 22 at 5:09
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
|
show 2 more comments
Because you are using a font most of us do not have we can not run your given mwe. If the font is not the issue please create in future an mwe without your special font and use a standard font as I did in the following mwe.
If you change cfoot in code this changing is permanent, that means if you want to get the pagenumber later back you have to change cfoot again as I did in the following mwe. Please see that I used the text foot <number> for your changings in cfoot and added at last cfoot{thepage} to get the page number back. I added numbers to your page head like abcdefghi 1 to be better able to identify the current page. I simply commented your font definitions ...
MWE:
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
%setdefaultlanguage{Marathi}
%setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
%newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
%newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi 1\ % <=======================================================
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{foot1}
abcdefghi 2\ % <=======================================================
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{foot2}
abcdefghi 3\ % <=======================================================
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{foot3}
abcdefghi 4\ % <=======================================================
pagebreak
thispagestyle{fancy}
cfoot{thepage} % <====================================================
abcdefghi 5\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
and the result:

and page 5

Because you are using a font most of us do not have we can not run your given mwe. If the font is not the issue please create in future an mwe without your special font and use a standard font as I did in the following mwe.
If you change cfoot in code this changing is permanent, that means if you want to get the pagenumber later back you have to change cfoot again as I did in the following mwe. Please see that I used the text foot <number> for your changings in cfoot and added at last cfoot{thepage} to get the page number back. I added numbers to your page head like abcdefghi 1 to be better able to identify the current page. I simply commented your font definitions ...
MWE:
documentclass{article}
usepackage{fontspec}
usepackage{xltxtra}
usepackage{polyglossia}
usepackage{fancyhdr}
usepackage{navigator}
usepackage{eso-pic,xcolor}
newcommand{HUGE}{fontsize{50pt}{50pt}selectfont}
renewcommand{footrulewidth}{0.4pt}
%setdefaultlanguage{Marathi}
%setmainfont[Mapping=devanagarinumerals,Language=Marathi]{Tillana Medium}
%newfontfamily{Sharad}[Mapping=devanagarinumerals]{Sharad76}
%newfontfamily{Modak}[Mapping=devanagarinumerals,Language=Marathi]{Modak}
renewcommand{baselinestretch}{1.2}
disablehyphenation
setlength{parindent}{0.9cm}
usepackage{color}
color{white}
pagecolor{black}
begin{document}
begin{center}
outline{1}{abcd}
abcdefghi 1\ % <=======================================================
pagebreak
outline{1}{pqrs}
thispagestyle{fancy}
cfoot{foot1}
abcdefghi 2\ % <=======================================================
pagebreak
outline{1}{lmno}
thispagestyle{fancy}
cfoot{foot2}
abcdefghi 3\ % <=======================================================
pagebreak
outline{1}{wxyz}
thispagestyle{fancy}
cfoot{foot3}
abcdefghi 4\ % <=======================================================
pagebreak
thispagestyle{fancy}
cfoot{thepage} % <====================================================
abcdefghi 5\
pagebreak
outline{1}{stuv}
pagenumbering{arabic}
thispagestyle{fancy}
end{center}
end{document}
and the result:

and page 5

answered Mar 21 at 20:49
KurtKurt
40.2k850164
40.2k850164
Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
1
@Niranjan Change the firstthispagestyle{fancy}topagestyle{fancy}, then you can omit/comment the followingthispagestyle{fancy}. You still get the lines you want, because stylefancyis defined and will not change until the pagestyle is redefined. With changingcfootyou get the changed centered foot printed ubtil you change it again.
– Kurt
Mar 22 at 5:00
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
1
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, likeplain,fancyor self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.
– Kurt
Mar 22 at 5:09
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
|
show 2 more comments
Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
1
@Niranjan Change the firstthispagestyle{fancy}topagestyle{fancy}, then you can omit/comment the followingthispagestyle{fancy}. You still get the lines you want, because stylefancyis defined and will not change until the pagestyle is redefined. With changingcfootyou get the changed centered foot printed ubtil you change it again.
– Kurt
Mar 22 at 5:00
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
1
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, likeplain,fancyor self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.
– Kurt
Mar 22 at 5:09
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
Thank you @Kurt Without the font specification it is working fine. Probably my font is creating a problem, but I don't want to compromise with that font. The reason to insist for pagestyle{fancy} is I want those two lines coming in the output file. (Just above the foot and below the head.) Is there any other way to set these two lines for each page in the document? I can probably manage other problems with the help of other commands.
– Niranjan
Mar 22 at 4:25
1
1
@Niranjan Change the first
thispagestyle{fancy} to pagestyle{fancy}, then you can omit/comment the following thispagestyle{fancy}. You still get the lines you want, because style fancy is defined and will not change until the pagestyle is redefined. With changing cfoot you get the changed centered foot printed ubtil you change it again.– Kurt
Mar 22 at 5:00
@Niranjan Change the first
thispagestyle{fancy} to pagestyle{fancy}, then you can omit/comment the following thispagestyle{fancy}. You still get the lines you want, because style fancy is defined and will not change until the pagestyle is redefined. With changing cfoot you get the changed centered foot printed ubtil you change it again.– Kurt
Mar 22 at 5:00
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
So pagestyle{fancy} should be in preamble, right?
– Niranjan
Mar 22 at 5:04
1
1
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, like
plain, fancy or self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.– Kurt
Mar 22 at 5:09
@NiranjanThat is one possibility, if you use only that style. But if you use different styles, like
plain, fancy or self-defined styles write the command at the beginning of the page that has to use the new style. Redo that if you want to change the style.– Kurt
Mar 22 at 5:09
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
This worked for me. One last doubt. After some pages I want to start page numbering (I don't want it to start from the first page.) I've entered pagenumbering{arabic} command where it should start, still I can't see the numbers. How to get them?
– Niranjan
Mar 22 at 5:19
|
show 2 more comments
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');
});
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%2f480610%2fafter-cfoot-command-every-page-is-getting-the-same-footer-despite-of-specifying%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');
});
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');
});
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');
});
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

2
Can you provide a small document (perhaps using lipsum) which demonstrates the problem?
– John Kormylo
Mar 21 at 3:35
Please show us a short compilable tex code resulting in your issue we can test on our own computers
– Kurt
Mar 21 at 3:36
My actual input file is very long and I cannot really paste it here. I tried to make one new input file imitating the commands in the real file, but actually it is working fine in that file. Probably fancyhdr is crashing with the other packages I've used (fontspec xltxtra polyglossia fancyhdr navigator eso-pic color xcolor)
– Niranjan
Mar 21 at 6:54
2
You can try to add those packages to the preamble of your small new input file to see if it makes any difference, if not then you can add contents from your actual file until the problem appears, or the other way around take (a copy of) your actual file and remove content until the problem disappears. Once you know where the problem is you can most likely construct a small example to reproduce the problem, which we can address here - or maybe during your investigation you already find the solution yourself.
– Marijn
Mar 21 at 9:30
@Marjin I've made one file which is not running. Please check it.
– Niranjan
Mar 21 at 11:30