TransWikia.com

Replace pagenumber for one page in scrbook

TeX - LaTeX Asked by white_gecko on January 5, 2021

I have a two sided scrbook where I want to replace one single page number with a special char, while the rest of the pages should remain numbered with arabic numbers. How can I achieve this?

So far I have tried it with fancyhdr and with redefining pagemark as you can see in the MWEs, but both did not bring the intended result.

With fancyhdr the pagenumber resp. rfoot is not put in the same place as for the normal scrbook style since I use mpinclude=true:

documentclass[twoside,mpinclude=true]{scrbook}

usepackage[showframe]{geometry}
usepackage{fancyhdr}
usepackage{lipsum}

title{Book}

begin{document}
maketitle

pagestyle{fancy}
renewcommand{headrulewidth}{0pt}
lfoot[{:-)}]{}
rfoot[]{{:-)}}
cfoot{}
section*{Acknowledgements}
I want to thank everyone.

clearpage
pagestyle{plain}
lipsum

end{document}

enter image description here

enter image description here

enter image description here

When I redefined pagemark it is in the right place but I do not know, how to reset it to the previous definition.

documentclass[twoside,mpinclude=true]{scrbook}

usepackage[showframe]{geometry}
usepackage{lipsum}

title{Book}

begin{document}
maketitle

lipsum[3]

clearpage

renewcommand{pagemark}{:-)}
section*{Acknowledgements}
I want to thank everyone.

clearpage
pagestyle{plain}
lipsum

end{document}

enter image description here

enter image description here

enter image description here

One Answer

I fond an answer to the second option by redefining pagemark in this answer: https://tex.stackexchange.com/a/439431/11820

pagemark has to be reset to renewcommandpagemark{usekomafont{pagenumber}thepage}.

documentclass[twoside,mpinclude=true]{scrbook}

usepackage[showframe]{geometry}
usepackage{lipsum}

title{Book}

begin{document}
maketitle

lipsum[3]

clearpage

renewcommand{pagemark}{:-)}
section*{Acknowledgements}
I want to thank everyone.

clearpage
renewcommandpagemark{usekomafont{pagenumber}thepage}
lipsum

end{document}

Note: I would not mind also receiving an answer to correctly place the pagenumber with fancyhdr in conjunction with koma scrbook mpinclude=true.

Correct answer by white_gecko on January 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP