TeX - LaTeX Asked by Anthony Kung on April 7, 2021
I am trying to make a dark theme LaTex PDF because it would look awesome but I came across a problem: the color of page numbering for List of Figures is not changing no matter how hard I try. Here’s the screenshot:
Everything worked perfectly even the dotted lines, but the page numbering on the right just won’t budge. The page numbering for Table of Contents is working great and so I have no idea what’s wrong.
I am using article
class and I don’t have any toc or tof package except for fancyhdr
and caption
.
I tried putting textcolor
in every single place where I can put inside/outside the listoffigures
and I tried using tocloft
package but I’m not quite sure how to do that… I have also tried using addtocontents
and captionsteup
but it just won’t change the color.
I’m not very good at LaTeX so I might be doing something wrong here if anyone could show me how that will be awesome.
You have to change the color for the text in the preamble. Then the color of normalcolor
(used by eg. page numbers in ToC, LoT etc.) is changed too.
Example:
documentclass{article}
usepackage{xcolor}
pagecolor{black}
color{white}
usepackage[colorlinks,linkcolor=blue]{hyperref}
renewcommandfamilydefault{sfdefault}
usepackage{blindtext}% only for dummy text
begin{document}
tableofcontents
blinddocument
end{document}
If you want to change the color of the text inside the document and normalcolor
should be changed to the same color, then load package normalcolor
and use resetnormalcolor
.
Example:
documentclass{article}
usepackage{xcolor}
usepackage{normalcolor}
usepackage[colorlinks,linkcolor=blue]{hyperref}
renewcommandfamilydefault{sfdefault}
usepackage{blindtext}% only for dummy text
begin{document}
pagecolor{black}
color{white}
resetnormalcolor
tableofcontents
blinddocument
end{document}
The result is the same as above.
Correct answer by esdd on April 7, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP