leo simon wrote:I have a pretty strong preference for colordvi because \Red{text}
it's a bit less cumbersome than \textcolor{red}{text}
Well, given that one should use
semantic markup in a LaTeX document and such color declarations usually only are part of custom commands I don't think that this is much of a trouble. Anyway, it's easy to define:
Code: Select all
\newcommand*\Red[1]{\textcolor{red}{#1}}
leo simon wrote:colordvi gives me a whole range of colors pre-made, like \BrickRed
, \BurntOrange
xcolor has those, too, via the
dvipsnames
option. Did you have a look at its manual
xcolor?
Code: Select all
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\begin{document}
\textcolor{BrickRed}{BrickRed}\par
\textcolor{BurntOrange}{BurntOrange}\par
\textcolor{OliveGreen}{OliveGreen}
\end{document}
You can even automate the defining of commands having the names of the colors:
Code: Select all
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{trimspaces}
\makeatletter
% the command \DefineColorCommands will take a comma-separated list of color names
% and will build commands from them using the corresponding color on their
% arguments:
\newcommand*\DefineColorCommands[1]{\@define@color@commands{#1}}
\def\@define@color@commands#1{%
\@define@color@commands@aux#1,\relax\q@stop
}
\def\@define@color@commands@aux#1,#2\q@stop{%
\@ifundefined{#1}{%
\expandafter\edef\csname\trim@spaces{#1}\endcsname##1{%
\noexpand\textcolor{\trim@spaces{#1}}{##1}%
}%
\ifx\relax#2\else
\@define@color@commands@aux#2\q@stop
\fi
}{}%
}
\makeatother
\DefineColorCommands{
BrickRed,
BurntOrange,
OliveGreen
}
\begin{document}
\BrickRed{BrickRed}\par
\BurntOrange{BurntOrange}\par
\OliveGreen{OliveGreen}
\end{document}
Regards