1

How can i change only the page number font color in the following latex code

\documentclass{scrartcl}
\usepackage{pdfpages}
\usepackage{geometry}
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
\begin{document}
CHECK PAGENUMBER FONT
\end{document}

1 Answer 1

1

You can use \addtokomafont{pagenumber}{...} to your advantage. Assuming you want a red page number, you can use it as shown in the following example:

\documentclass{scrartcl}
\usepackage{pdfpages}
\usepackage{geometry}
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
\usepackage{xcolor}
\addtokomafont{pagenumber}{\color{red}}
\begin{document}
CHECK PAGENUMBER FONT
\end{document}
2
  • this is not part of this question. what is the purpose of \usepackage[automark,headsepline,footsepline]{scrlayer-scrpage} I am just using it because without it page number does not work
    – Santhosh
    Aug 7, 2020 at 17:53
  • I can't confirm "without it page number does not work". If I comment out line 4 of the example code in my answer, I still get a red page number.
    – leandriis
    Aug 7, 2020 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .