2

The Problem is '!Package xcolor Error: Undefined Color 'Black'. See the xcolor package documentation....' Perhaps is a simple mistake due to the fact that I'm a newby. Using MiKteX, xcolour package was manually installed through the manager.

    \documentclass[twoside,a4paper,11pt]{scrartcl}

    \usepackage{structuralanalysis}
    \usepackage{xcolor}
    \usepackage{pgf}

    \begin{document}

    \begin{tikzpicture}
        \point{x}{3}{0};
        \point{y}{3}{3};

        \draw[line width=1.5pt, fill=Black]
        (x) rectangle (y);
    \end{tikzpicture}
  • 1
    Welcome, try black instead of Black. – Johannes_B Feb 29 '16 at 7:43
  • 1
    @Johannes_B thanx, working for black. But what is with other colors like RubineRed or mixtures like RubineRed!25!White – Miri Feb 29 '16 at 7:47
  • 1
    The xcolor manual has an overview of what colors are defined with which option. – Johannes_B Feb 29 '16 at 7:58
5

LaTeX is case sensitive, therefore black is different from Black. If you want to use Black, you need to load xcolor with options svgnames or dvipsnames, both define this color with capital B.

But if you try \usepackage[svgnames]{xcolor} an error for clashing options will appear beacuse pgf (TiKZ) load xcolor with different options. In this case it's better to pass xcolor options through documentclass command.

\documentclass[twoside,a4paper,11pt,svgnames]{scrartcl}

\usepackage{structuralanalysis}
%\usepackage{xcolor} % pgf already loads it
\usepackage{pgf}

\begin{document}

\begin{tikzpicture}
    \point{x}{3}{0};
    \point{y}{3}{3};

    \draw[line width=1.5pt, fill=Black]
    (x) rectangle (y);
\end{tikzpicture}
\end{document}
  • 1
    thanx! for Black and simple colors it worked, but not for RubineRed or RubineRed!25!White, which cofuses me. – Miri Feb 29 '16 at 7:57
  • 1
    @Miri Does en.wikibooks.org/wiki/LaTeX/Colors help you? – Johannes_B Feb 29 '16 at 8:02
  • 1
    @Miri RubineRed is defined with dvipsnames option, if you add it, you could use all named colors. Take a look a page 38 in xcolor. – Ignasi Feb 29 '16 at 8:03
  • @Miri, if the answer solved your problem, please accept it --- marking the ticks you have under the answer's score. This is the way of saying "thanks" here... ;-) – Rmano Feb 29 '16 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.