MiKTeX and proTeXtxcolor - Undefined control sequence.

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
F6F
Posts: 8
Joined: Thu Aug 05, 2010 9:38 am

xcolor - Undefined control sequence.

Post by F6F »

(Hilfe auf deutsch: Undefined control sequence - wie finde ich heraus, was fehlt? - LC editor remark)

Hi @ all
Im trying to compile the Latex template i got from a friend.
It uses the Xcolor package to define some Colors. I was told the he compiled the file successfully but I get Errors about Undefined control sequences.

The error output

Code: Select all

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Undefined control sequences
\set@color ...\@pdfcolorstack push{\current@color 
                                                  }\aftergroup \reset@color 
l.1 \begin{thenomenclature}
That error message is repeated about 40 times ...
can someone help to solve the problem?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

xcolor - Undefined control sequence.

Post by localghost »

The error message alone is almost useless [1]. So it requires a complete and minimal example that exactly reproduces the error (emphasize is on minimal).

[1] View topic: Avoidable mistakes


Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
F6F
Posts: 8
Joined: Thu Aug 05, 2010 9:38 am

Re: xcolor - Undefined control sequence.

Post by F6F »

Im Using MikTex 2.8 (I updated all latex Packages yesterday)
and the TeXnic Center ...
Attachments
1einleitung.tex
first Chapter
(554 Bytes) Downloaded 540 times
header.tex
settings
(10.25 KiB) Downloaded 573 times
Diplomarbeit.tex
main file
(2.09 KiB) Downloaded 586 times
F6F
Posts: 8
Joined: Thu Aug 05, 2010 9:38 am

Re: xcolor - Undefined control sequence.

Post by F6F »

logfile
Attachments
Diplomarbeit.log
Log file
(61.05 KiB) Downloaded 663 times
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

xcolor - Undefined control sequence.

Post by Montag »

About your logfile, I discovered something along

Code: Select all

! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color 
I know it's pretty vague, but I used xcolor's own definitions of setting new colors once.

(Also, I've never understood what these

Code: Select all

\set@
are for.)

Just an advice, maybe you could set up your own preamble so you know what's in it and what not.
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
F6F
Posts: 8
Joined: Thu Aug 05, 2010 9:38 am

xcolor - Undefined control sequence.

Post by F6F »

uncommenting this section:

Code: Select all

%\normalcolor



\listfiles


%\usepackage{xcolor}%colortbl
%\definecolor{darkgreen}{named}{green}
%\definecolor{darkblue}{named}{blue}
%\definecolor{darkred}{named}{red}
%\definecolor{grau}{named}{gray}
in the header avoids the error Messages ...
commands like \set@ are not used in the Projekt ...
so it looks (for me)like they are called from another command or funktion ...(sry for my worse English)

Are there help dokuments for Debugging such things?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: xcolor - Undefined control sequence.

Post by Stefan Kottwitz »

Perhaps pdfpages together with xcolor causes a problem. In such cases load xcolor before pdfpages.

Stefan
LaTeX.org admin
F6F
Posts: 8
Joined: Thu Aug 05, 2010 9:38 am

Re: xcolor - Undefined control sequence.

Post by F6F »

I moved \usepackage{xcolor}

bevor the \usepackage{pdfpages} but the Problem is still the same...
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

xcolor - Undefined control sequence.

Post by Montag »

Maybe you need to add an option, like x11names?

Code: Select all

\usepackage[x11names]{xcolor]
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

xcolor - Undefined control sequence.

Post by Stefan Kottwitz »

I'm sure it could easily be solved at least by a small fix/workaround if a small minimal working example would be posted, showing the problem. I just don't like to debug a complete document with included files etc - no time. Though I know \normalcolor defines \current@color and xcolor defines \default@color to be \current@color after \begin{document} etc.

Stefan
LaTeX.org admin
Post Reply