# LaTeX: Undefined control sequence \definecolor in latex sample files

#### Oliver

05 Jan, 2014 07:22 PM

Hi everybody,

I'm trying to compile the sample letter from github into a PDF using markdown and pdflatex.

Converting the .txt into a .tex works perfectly, but turning the .tex into a .pdf fails with pdflatex producing the following error message:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 78 languages loaded.
! Undefined control sequence.
l.9     \definecolor
{accent}{HTML}{000000}


I'm using multimarkdown 4.4.2 and just installed a fresh MacTex Distribution today.
Any ideas on how to resolve this error?

Cheers,
Oliver

1. Support Staff Posted by fletcher on 05 Jan, 2014 07:50 PM

This should be handled by one of the default color packages (xcolor?) in latex.

It should be handled properly by recent MacTeX install (I just installed on a new computer last week and it works fine for me).

It's not a MMD problem, it seems to be an issue with your LaTeX install and perhaps missing packages?

F-

--
Fletcher T. Penney
[email blocked]

2. Posted by Oliver on 05 Jan, 2014 08:30 PM

Hi Fletcher,

thanks for you answer. I've tried to this minimal working example to verify xcolor is installed:

\documentclass{article}
\usepackage{xcolor}
\definecolor{accent}{HTML}{000000}
\begin{document}
\lorem ipsum
\end{document}


This compiles fine.

I've been trying to reconstruct exactly what files are being processed in what order. From what I've gathered, the order should be:

3. sample.txt (the actual letter)

I've noticed one thing that seems strange to me: the latex command \definecolor{accent}{HTML}{000000} is also present in the first file. But pdflatex complains about the \definecolor in the second file. Does that perhaps indicate a bug or something?

Oh, also I don't have the .xslt-file that is referenced in the letter's metadata. I've removed the line from the sample and the results are the same, so I don't think this is relevant?

3. Support Staff Posted by fletcher on 05 Jan, 2014 08:34 PM

The attached flowsheet is fairly complex, but shows what is going on.

;)

The XSLT file is not relevant unless you're using the older approach to convert MMD->LaTeX.

F-

--
Fletcher T. Penney
[email blocked]

4. Posted by Oliver on 05 Jan, 2014 08:58 PM

Problem solved.

I'm a bit ashamed to admit that this was a case of user vs. vim :)

Vim truncated the first line of latex input mmd-letterhead-header to tex input mmd-letterhead-header and caused multimarkdown screw up (well, alright, I realize this was my fault)

In any case, thanks for the support!

5. Support Staff Posted by fletcher on 05 Jan, 2014 09:04 PM

F-

--
Fletcher T. Penney
[email blocked]

Comments are currently closed for this discussion. You can start a new one.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 22 Apr, 2018 11:04 PM Top to bottom file representation order is not the same as Left to Right 13 Apr, 2018 10:58 PM citations 09 Apr, 2018 09:47 PM Metadata interpreted as text 09 Apr, 2018 04:28 PM MMD FOOTER wrong position - possibly 19 Feb, 2018 10:29 PM mmd tags as variables