Text FormattingColors package not working

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Colors package not working

Post by thorpn »

I am using the color package but i cannot get the following macro working right ?

Code: Select all

\newcommand{\yellow}[1]{\textcolor{YellowOrange}{#1}}
Does any one know of this problem ?

Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Colors package not working

Post by cgnieder »

There is nothing wrong with the command. This works for me:

Code: Select all

\documentclass{article}

\usepackage[dvipsnames]{xcolor}
\newcommand{\yellow}[1]{\textcolor{YellowOrange}{#1}}
    
\begin{document}

black \yellow{yellow}

\end{document}
Regards
site moderator & package author
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Colors package not working

Post by thorpn »

Thank you, guess i was using package wrong when i had

Code: Select all

\usepackage{color}
changing it worked :)
Post Reply