Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've got problems with my Texmaker on Windows 7... I changed some text in the document and configured the colors for my listings. Suddenly Latex throws an error by the optional parameter of the hyperref usepackage! After deleting this parameters theres an error on each comma on the text! I don't know what happend... The hole file is converted in utf-8, I saved it extra in notepad++ over again, but no success... Pleas help me, I don't know what happened, I'm desperated...

The error:

!Illegal unit of measur (pt inserted. <to be read again> F linkcolor=magenta,

The header of the document:

\documentclass[a4paper,12pt,twoside,ngerman]{article}
\parindent0pt
\parskip6pt
% makeindex -s %.ist -t %.alg -o %.acr %.acn
% makeindex -s %.ist -t %.glg -o %.gls %.glo

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel} % Paket für die neue deutsche Rechtschreibung
\usepackage{bera}
\usepackage{color}
\usepackage{xcolor}
\usepackage{listings} % Packet zum Erstellen von Listinings

\definecolor{lightgray}{HTML}{F3F3F3}

\colorlet{jsonPunct}{red!60!black}
\definecolor{jsonDelim}{RGB}{20,105,176}
\colorlet{jsonNumber}{magenta!60!black}

\definecolor{lightgreen}{HTML}{3F7F5F} % comments
\definecolor{purple}{HTML}{950055} % keywords
\definecolor{lightblue}{HTML}{3F7DE0} % javadoc
\definecolor{turquoise}{RGB}{5FC0C0}
\definecolor{darkblue}{RGB}{2A00FF}
\lstdefinelanguage{json}{
literate=
 *{0}{{{\color{jsonNumber}0}}}{1}
  {1}{{{\color{jsonNumber}1}}}{1}
  {2}{{{\color{jsonNumber}2}}}{1}
  {3}{{{\color{jsonNumber}3}}}{1}
  {4}{{{\color{jsonNumber}4}}}{1}
  {5}{{{\color{jsonNumber}5}}}{1}
  {6}{{{\color{jsonNumber}6}}}{1}
  {7}{{{\color{jsonNumber}7}}}{1}
  {8}{{{\color{jsonNumber}8}}}{1}
  {9}{{{\color{jsonNumber}9}}}{1}
  {:}{{{\color{jsonPunct}{:}}}}{1}
  {,}{{{\color{jsonPunct}{,}}}}{1}
  {\{}{{{\color{jsonDelim}{\{}}}}{1}
  {\}}{{{\color{jsonDelim}{\}}}}}{1}
  {[}{{{\color{jsonDelim}{[}}}}{1}
  {]}{{{\color{jsonDelim}{]}}}}{1},
}
\lstset{
language=Java,
keywordstyle=\color{purple}\bfseries,
commentstyle=\color{lightgreen},
morecomment=[s][\color{lightblue}]{/**}{*/}%,
}
%XML Style
\lstset{
language=XML,
keywordstyle=\color{purple}\bfseries,
commentstyle=\color{lightgreen},
morecomment=[s][\color{lightblue}]{/**}{*/}%,
}
% Allgmeiner Style für Listings
\lstset{
basicstyle=\footnotesize,
tabsize=2,
numbers=left,
numberstyle=\scriptsize,
stepnumber=1,
numbersep=8pt,
showstringspaces=false,
showspaces=false,
backgroundcolor=\color{lightgray},
frame=none,
rulecolor=\color{black},
aboveskip=1em,
belowskip=1.5em,
captionpos=b,
breaklines=true
}
% die folgendenen 3 Pakete sichern, dass Wörter nicht so oft am rechten Rand herausragen
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{graphicx} % Paket zur Verwendung von Bildern. alternatif epsfig
\usepackage[
colorlinks=true,
linkcolor=magenta, % einfache interne Verknüpfungen !!!!HERE'S THE ERROR THROWN!!!!!
anchorcolor=black,% Ankertext
citecolor=green, % Verweise auf Literaturverzeichniseinträge im Text
urlcolor=cyan, % Farbe der URLs
backref % Back-Links zu den Kapiteln
]{hyperref}
\usepackage{floatflt} % Paket Bildpositionierung
\usepackage{marvosym} % Paket zur Verwendung von manchen Sonderzeichen
% Paket zur Verlinkung des Inhaltsverzeichnisses, als (vor-)letztes laden (es muss zweimal compiliert werden), nur glossaries muss danach geladen werden
\usepackage{fancyhdr} % Paket für den Pagestyle fancy
\usepackage{dirtree} % Paket zum Erstellen einer Verzeichnisstruktur
\usepackage[
nonumberlist,   %keine Seitenzahlen anzeigen
acronym         %ein Abkürzungsverzeichnis erstellen
]{glossaries}
% Entfernt den Punkt am Ende der Beschreibung beim Glossar
\renewcommand*{\glspostdescription}{}
%sammelt die Einträge
\makeglossaries

\title{title}
\date{}
\author{}
\pdfinfo{
/Title    (title)
/Author   (me)
/Creator  ()
/Producer ()
/Subject  ()
/Keywords ()
}
\begin{document}
...
\end{document}
share|improve this question
    
Welcome to TeX.sx! Thanks for posting a full document. Please follow my advice at I've just been asked to write a minimal example, what is that? to reduce your code to a so-called Minimal Working Example. As it is now, many things in your code are entirely unrelated to your actual problem. By making problems abstract and minimal, we try to make them maximally relevant and helpful for other users who might have the same problem. –  doncherry Mar 15 '13 at 14:23

1 Answer 1

up vote 6 down vote accepted

You use HTML (actually CSS) syntax not RGB for the colours but specified RGB, these two lines should be

\definecolor{turquoise}{HTML}{5FC0C0}
\definecolor{darkblue}{HTML}{2A00FF}
                       %%%%%
share|improve this answer
    
oh thanks!!! I searched for one hour... So stupid mistake... –  lis Mar 15 '13 at 10:33
2  
@user27434 next time copy your document into a second file and start deleting code until the error disappears (= build a minimal working example (MWE)). You should be able to find such errors then yourself. –  cgnieder Mar 15 '13 at 10:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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