Micky Messer
Micky Messer

Reputation: 83

LaTeX Error: `xcolor.sty' not found when including tikz

my preamble is currently looking like this:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage{subfigure} 
\usepackage[pdftex]{graphicx}
\usepackage{latexsym}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{listings}
\usepackage{geometry}

When I include

\usepackage{tikz}

I get the error message ! LaTeX Error: File `xcolor.sty' not found.

I have tried to \include{xcolor} before and after tikz which didn't work. Also from another post I have seen that I should \PassOptionsToPackage{table}{xcolor} before declaring the document class. Whatever I do I still get the same error. What am I doing wrong?

Upvotes: 7

Views: 16057

Answers (2)

Eneko
Eneko

Reputation: 2117

In Ubuntu 22.04 I solved installing texlive-latex-recommended:

sudo apt install texlive-latex-recommended

Upvotes: 21

user5659169
user5659169

Reputation:

In MikTeX this package may be located here: \MiKTeX 2.9\tex\latex\xcolor\xcolor.sty. If not, please download xcolor.sty and put it into your working directory or, better, the whole package xcolor.

Also try to to use the package xcolor:

\usepackage{xcolor}

Upvotes: -1

Related Questions