I want page 13 to show up as 12+1
Clash Royale CLAN TAG#URR8PPP
up vote
30
down vote
favorite
I am writing an important document which has ended up being 13 pages.
For superstitious reasons, I want the page number on the last page to show up as "12+1". In other words, I want the page numbers to be:
1, 2, â¦, 11, 12, 12+1.
How do I do this?
numbering triskaidekaphobia
New contributor
 |Â
show 1 more comment
up vote
30
down vote
favorite
I am writing an important document which has ended up being 13 pages.
For superstitious reasons, I want the page number on the last page to show up as "12+1". In other words, I want the page numbers to be:
1, 2, â¦, 11, 12, 12+1.
How do I do this?
numbering triskaidekaphobia
New contributor
1
Welcome to TeX.SX! Please help us help you by providing a minimal compilable code example (MWE).
â TeXnician
yesterday
10
But you wrote »13« here yourself! Beware!
â Keks Dose
yesterday
12
And the question is currently at 13 upvotes, I like to imagine this isn't a coincidence.
â LiefdeWen
yesterday
Depressing that this got 3K views in 21hours... besides I am sure it is a duplicate which adds to the distress as other questions about this got their share of views surely too.
â jfbu
23 hours ago
1
@jfbu Update from a multi-stack user: This is on the HNQ.
â FoxElemental
9 hours ago
 |Â
show 1 more comment
up vote
30
down vote
favorite
up vote
30
down vote
favorite
I am writing an important document which has ended up being 13 pages.
For superstitious reasons, I want the page number on the last page to show up as "12+1". In other words, I want the page numbers to be:
1, 2, â¦, 11, 12, 12+1.
How do I do this?
numbering triskaidekaphobia
New contributor
I am writing an important document which has ended up being 13 pages.
For superstitious reasons, I want the page number on the last page to show up as "12+1". In other words, I want the page numbers to be:
1, 2, â¦, 11, 12, 12+1.
How do I do this?
numbering triskaidekaphobia
numbering triskaidekaphobia
New contributor
New contributor
edited 22 hours ago
Communityâ¦
1
1
New contributor
asked yesterday
Amir Ali Ahmadi
15326
15326
New contributor
New contributor
1
Welcome to TeX.SX! Please help us help you by providing a minimal compilable code example (MWE).
â TeXnician
yesterday
10
But you wrote »13« here yourself! Beware!
â Keks Dose
yesterday
12
And the question is currently at 13 upvotes, I like to imagine this isn't a coincidence.
â LiefdeWen
yesterday
Depressing that this got 3K views in 21hours... besides I am sure it is a duplicate which adds to the distress as other questions about this got their share of views surely too.
â jfbu
23 hours ago
1
@jfbu Update from a multi-stack user: This is on the HNQ.
â FoxElemental
9 hours ago
 |Â
show 1 more comment
1
Welcome to TeX.SX! Please help us help you by providing a minimal compilable code example (MWE).
â TeXnician
yesterday
10
But you wrote »13« here yourself! Beware!
â Keks Dose
yesterday
12
And the question is currently at 13 upvotes, I like to imagine this isn't a coincidence.
â LiefdeWen
yesterday
Depressing that this got 3K views in 21hours... besides I am sure it is a duplicate which adds to the distress as other questions about this got their share of views surely too.
â jfbu
23 hours ago
1
@jfbu Update from a multi-stack user: This is on the HNQ.
â FoxElemental
9 hours ago
1
1
Welcome to TeX.SX! Please help us help you by providing a minimal compilable code example (MWE).
â TeXnician
yesterday
Welcome to TeX.SX! Please help us help you by providing a minimal compilable code example (MWE).
â TeXnician
yesterday
10
10
But you wrote »13« here yourself! Beware!
â Keks Dose
yesterday
But you wrote »13« here yourself! Beware!
â Keks Dose
yesterday
12
12
And the question is currently at 13 upvotes, I like to imagine this isn't a coincidence.
â LiefdeWen
yesterday
And the question is currently at 13 upvotes, I like to imagine this isn't a coincidence.
â LiefdeWen
yesterday
Depressing that this got 3K views in 21hours... besides I am sure it is a duplicate which adds to the distress as other questions about this got their share of views surely too.
â jfbu
23 hours ago
Depressing that this got 3K views in 21hours... besides I am sure it is a duplicate which adds to the distress as other questions about this got their share of views surely too.
â jfbu
23 hours ago
1
1
@jfbu Update from a multi-stack user: This is on the HNQ.
â FoxElemental
9 hours ago
@jfbu Update from a multi-stack user: This is on the HNQ.
â FoxElemental
9 hours ago
 |Â
show 1 more comment
3 Answers
3
active
oldest
votes
up vote
48
down vote
accepted
Define a new counter format:
documentclassarticle
usepackagekantlipsum % for mock text
makeatletter
newcommandfixedarabic[1]%
expandafter@fixedarabiccsname c@#1endcsname
newcommand@fixedarabic[1]%
ifnum#1=13 12$+$1elsenumber#1fi
makeatother
pagenumberingfixedarabic
begindocument
kant[1-50]
enddocument
19
12+1 is much to obvious. I suggest$sum_i=1^5 i -3$
.
â Ulrike Fischer
yesterday
2
For my own understanding, could you comment on the differences between defining a new counter format and only redefiningthepage
as follows:renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)
â Max
yesterday
1
@Max More general.
â egreg
yesterday
6
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
1
@NieDzejkob No, to 12, which is different from 13 anyhow.;-)
â egreg
yesterday
 |Â
show 9 more comments
up vote
17
down vote
It could be a complex solution to convert the counter page to "12+1" if the value reach 13, but if only matter when 13 is the last page, why not simply change the footer just before enddocument
to "12+1"?.
documentclassarticle
usepackagefancyhdr
pagestylefancy
begindocument
aaa
setcounterpage12 % this is the 12th page
newpage
bbb
cfoot12+1 % this is the 12+1th page
enddocument
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
1
@AmirAliAhmadi thefancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.
â Fran
yesterday
add a comment |Â
up vote
1
down vote
The following solution sets page 13 as 12+1 in whichever format your page numbering is set to. It uses fancyhdr
to set the page number in the C
entre of the footer.
documentclassarticle
usepackagelipsum,fancyhdr
pagestylefancy
fancyhf% Clear header/footer
renewcommandheadrulewidth0pt% Remove header rule
fancyfoot[C]%
ifnumvaluepage=13
$mboxsetcounterpage12thepage + mboxsetcounterpage1thepage$%
setcounterpage13%
else
thepage
fi
pagenumberingroman % Just as an example
begindocument
sloppylipsum[1-50]lipsum[1-50]
enddocument
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
48
down vote
accepted
Define a new counter format:
documentclassarticle
usepackagekantlipsum % for mock text
makeatletter
newcommandfixedarabic[1]%
expandafter@fixedarabiccsname c@#1endcsname
newcommand@fixedarabic[1]%
ifnum#1=13 12$+$1elsenumber#1fi
makeatother
pagenumberingfixedarabic
begindocument
kant[1-50]
enddocument
19
12+1 is much to obvious. I suggest$sum_i=1^5 i -3$
.
â Ulrike Fischer
yesterday
2
For my own understanding, could you comment on the differences between defining a new counter format and only redefiningthepage
as follows:renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)
â Max
yesterday
1
@Max More general.
â egreg
yesterday
6
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
1
@NieDzejkob No, to 12, which is different from 13 anyhow.;-)
â egreg
yesterday
 |Â
show 9 more comments
up vote
48
down vote
accepted
Define a new counter format:
documentclassarticle
usepackagekantlipsum % for mock text
makeatletter
newcommandfixedarabic[1]%
expandafter@fixedarabiccsname c@#1endcsname
newcommand@fixedarabic[1]%
ifnum#1=13 12$+$1elsenumber#1fi
makeatother
pagenumberingfixedarabic
begindocument
kant[1-50]
enddocument
19
12+1 is much to obvious. I suggest$sum_i=1^5 i -3$
.
â Ulrike Fischer
yesterday
2
For my own understanding, could you comment on the differences between defining a new counter format and only redefiningthepage
as follows:renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)
â Max
yesterday
1
@Max More general.
â egreg
yesterday
6
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
1
@NieDzejkob No, to 12, which is different from 13 anyhow.;-)
â egreg
yesterday
 |Â
show 9 more comments
up vote
48
down vote
accepted
up vote
48
down vote
accepted
Define a new counter format:
documentclassarticle
usepackagekantlipsum % for mock text
makeatletter
newcommandfixedarabic[1]%
expandafter@fixedarabiccsname c@#1endcsname
newcommand@fixedarabic[1]%
ifnum#1=13 12$+$1elsenumber#1fi
makeatother
pagenumberingfixedarabic
begindocument
kant[1-50]
enddocument
Define a new counter format:
documentclassarticle
usepackagekantlipsum % for mock text
makeatletter
newcommandfixedarabic[1]%
expandafter@fixedarabiccsname c@#1endcsname
newcommand@fixedarabic[1]%
ifnum#1=13 12$+$1elsenumber#1fi
makeatother
pagenumberingfixedarabic
begindocument
kant[1-50]
enddocument
edited yesterday
answered yesterday
egreg
681k8318123060
681k8318123060
19
12+1 is much to obvious. I suggest$sum_i=1^5 i -3$
.
â Ulrike Fischer
yesterday
2
For my own understanding, could you comment on the differences between defining a new counter format and only redefiningthepage
as follows:renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)
â Max
yesterday
1
@Max More general.
â egreg
yesterday
6
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
1
@NieDzejkob No, to 12, which is different from 13 anyhow.;-)
â egreg
yesterday
 |Â
show 9 more comments
19
12+1 is much to obvious. I suggest$sum_i=1^5 i -3$
.
â Ulrike Fischer
yesterday
2
For my own understanding, could you comment on the differences between defining a new counter format and only redefiningthepage
as follows:renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)
â Max
yesterday
1
@Max More general.
â egreg
yesterday
6
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
1
@NieDzejkob No, to 12, which is different from 13 anyhow.;-)
â egreg
yesterday
19
19
12+1 is much to obvious. I suggest
$sum_i=1^5 i -3$
.â Ulrike Fischer
yesterday
12+1 is much to obvious. I suggest
$sum_i=1^5 i -3$
.â Ulrike Fischer
yesterday
2
2
For my own understanding, could you comment on the differences between defining a new counter format and only redefining
thepage
as follows: renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)â Max
yesterday
For my own understanding, could you comment on the differences between defining a new counter format and only redefining
thepage
as follows: renewcommandthepageifnum13=valuepage12+1elsethevaluepagefi
? (The latter also works.)â Max
yesterday
1
1
@Max More general.
â egreg
yesterday
@Max More general.
â egreg
yesterday
6
6
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
Many thanks! This worked. It was my first time posting a question here and I am amazed how quickly help came. Thank you all!
â Amir Ali Ahmadi
yesterday
1
1
@NieDzejkob No, to 12, which is different from 13 anyhow.
;-)
â egreg
yesterday
@NieDzejkob No, to 12, which is different from 13 anyhow.
;-)
â egreg
yesterday
 |Â
show 9 more comments
up vote
17
down vote
It could be a complex solution to convert the counter page to "12+1" if the value reach 13, but if only matter when 13 is the last page, why not simply change the footer just before enddocument
to "12+1"?.
documentclassarticle
usepackagefancyhdr
pagestylefancy
begindocument
aaa
setcounterpage12 % this is the 12th page
newpage
bbb
cfoot12+1 % this is the 12+1th page
enddocument
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
1
@AmirAliAhmadi thefancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.
â Fran
yesterday
add a comment |Â
up vote
17
down vote
It could be a complex solution to convert the counter page to "12+1" if the value reach 13, but if only matter when 13 is the last page, why not simply change the footer just before enddocument
to "12+1"?.
documentclassarticle
usepackagefancyhdr
pagestylefancy
begindocument
aaa
setcounterpage12 % this is the 12th page
newpage
bbb
cfoot12+1 % this is the 12+1th page
enddocument
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
1
@AmirAliAhmadi thefancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.
â Fran
yesterday
add a comment |Â
up vote
17
down vote
up vote
17
down vote
It could be a complex solution to convert the counter page to "12+1" if the value reach 13, but if only matter when 13 is the last page, why not simply change the footer just before enddocument
to "12+1"?.
documentclassarticle
usepackagefancyhdr
pagestylefancy
begindocument
aaa
setcounterpage12 % this is the 12th page
newpage
bbb
cfoot12+1 % this is the 12+1th page
enddocument
It could be a complex solution to convert the counter page to "12+1" if the value reach 13, but if only matter when 13 is the last page, why not simply change the footer just before enddocument
to "12+1"?.
documentclassarticle
usepackagefancyhdr
pagestylefancy
begindocument
aaa
setcounterpage12 % this is the 12th page
newpage
bbb
cfoot12+1 % this is the 12+1th page
enddocument
edited yesterday
answered yesterday
Fran
48.2k6108168
48.2k6108168
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
1
@AmirAliAhmadi thefancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.
â Fran
yesterday
add a comment |Â
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
1
@AmirAliAhmadi thefancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.
â Fran
yesterday
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
Thank you very much -- this is a quick solution too. The fancy page style created issues for me elsewhere, so I decided to go with the other proposed solution. Many thanks everyone.
â Amir Ali Ahmadi
yesterday
1
1
@AmirAliAhmadi the
fancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.â Fran
yesterday
@AmirAliAhmadi the
fancyhdr
package allow a exÂtenÂsive conÂtrol of page headÂers and footÂers so that issues probably can be solved with no effort, or maybe the footer can be fixed by another method without that package, but without a minimal working example showing these issues is not possible go further.â Fran
yesterday
add a comment |Â
up vote
1
down vote
The following solution sets page 13 as 12+1 in whichever format your page numbering is set to. It uses fancyhdr
to set the page number in the C
entre of the footer.
documentclassarticle
usepackagelipsum,fancyhdr
pagestylefancy
fancyhf% Clear header/footer
renewcommandheadrulewidth0pt% Remove header rule
fancyfoot[C]%
ifnumvaluepage=13
$mboxsetcounterpage12thepage + mboxsetcounterpage1thepage$%
setcounterpage13%
else
thepage
fi
pagenumberingroman % Just as an example
begindocument
sloppylipsum[1-50]lipsum[1-50]
enddocument
add a comment |Â
up vote
1
down vote
The following solution sets page 13 as 12+1 in whichever format your page numbering is set to. It uses fancyhdr
to set the page number in the C
entre of the footer.
documentclassarticle
usepackagelipsum,fancyhdr
pagestylefancy
fancyhf% Clear header/footer
renewcommandheadrulewidth0pt% Remove header rule
fancyfoot[C]%
ifnumvaluepage=13
$mboxsetcounterpage12thepage + mboxsetcounterpage1thepage$%
setcounterpage13%
else
thepage
fi
pagenumberingroman % Just as an example
begindocument
sloppylipsum[1-50]lipsum[1-50]
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The following solution sets page 13 as 12+1 in whichever format your page numbering is set to. It uses fancyhdr
to set the page number in the C
entre of the footer.
documentclassarticle
usepackagelipsum,fancyhdr
pagestylefancy
fancyhf% Clear header/footer
renewcommandheadrulewidth0pt% Remove header rule
fancyfoot[C]%
ifnumvaluepage=13
$mboxsetcounterpage12thepage + mboxsetcounterpage1thepage$%
setcounterpage13%
else
thepage
fi
pagenumberingroman % Just as an example
begindocument
sloppylipsum[1-50]lipsum[1-50]
enddocument
The following solution sets page 13 as 12+1 in whichever format your page numbering is set to. It uses fancyhdr
to set the page number in the C
entre of the footer.
documentclassarticle
usepackagelipsum,fancyhdr
pagestylefancy
fancyhf% Clear header/footer
renewcommandheadrulewidth0pt% Remove header rule
fancyfoot[C]%
ifnumvaluepage=13
$mboxsetcounterpage12thepage + mboxsetcounterpage1thepage$%
setcounterpage13%
else
thepage
fi
pagenumberingroman % Just as an example
begindocument
sloppylipsum[1-50]lipsum[1-50]
enddocument
answered yesterday
Werner
420k589131581
420k589131581
add a comment |Â
add a comment |Â
Amir Ali Ahmadi is a new contributor. Be nice, and check out our Code of Conduct.
Amir Ali Ahmadi is a new contributor. Be nice, and check out our Code of Conduct.
Amir Ali Ahmadi is a new contributor. Be nice, and check out our Code of Conduct.
Amir Ali Ahmadi is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450370%2fi-want-page-13-to-show-up-as-121%23new-answer', 'question_page');
);
Post as a guest
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
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
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
1
Welcome to TeX.SX! Please help us help you by providing a minimal compilable code example (MWE).
â TeXnician
yesterday
10
But you wrote »13« here yourself! Beware!
â Keks Dose
yesterday
12
And the question is currently at 13 upvotes, I like to imagine this isn't a coincidence.
â LiefdeWen
yesterday
Depressing that this got 3K views in 21hours... besides I am sure it is a duplicate which adds to the distress as other questions about this got their share of views surely too.
â jfbu
23 hours ago
1
@jfbu Update from a multi-stack user: This is on the HNQ.
â FoxElemental
9 hours ago