TeX - LaTeX Asked on December 4, 2020
Here I load xcolor options (dvipsnames) at the very top, so all the xcolor friends don’t have to sweat it, but options are like politics at Thanksgiving: s*** hits the fan no matter what:
documentclass[10pt,usenames,dvipsnames]{beamer}
usepackage[dvipsnames]{xcolor}
usepackage{pgfpages}
Apologies, I tried to select the text in overleaf but when I let go of the mouse the selection disappears (it’s that been kind of day):
The document class beamer
load (among others also) package xcolor
, so you not need to load it again. If you do, as you show in your question, you get clash between xcolor
options. So, in your case just remove second line (with xcolor
) in the code:
documentclass[10pt,dvipsnames]{beamer}
usepackage{pgfpages}
usepackage{tikz}
begin{document}
begin{frame}
begin{tikzpicture}
node[font=Huge, text=Cyan] {Hello!};
end{tikzpicture}
end{frame}
end{document}
Please note, that the usenames
option is obsolete according to documentation of the xcolor
, so I omit this option in above MWE.
As stated in the @Skillmon comment: "If you don't want to specify global options (that's what options to the verb+documentclass+ are), you can also use
PassOptionsToPackage{usenames,dvipsnames}{xcolor}
before xcolor
gets loaded, i.e.:"
PassOptionsToPackage{dvipsnames}{xcolor}
documentclass[10pt]{beamer}
usepackage{xcolor} % now option(s) doesn't clash,
% however you not need to load it again!
usepackage{tikz}
usepackage{pgfpages}
begin{document}
begin{frame}
begin{tikzpicture}
node[font=Huge, text=Cyan] {Hello!};
end{tikzpicture}
end{frame}
end{document}
In both cases, the result is the same:
Correct answer by Zarko on December 4, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP