LaTeX: Undefined control sequence \definecolor in latex sample files

Oliver's Avatar


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
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 78 languages loaded.
! Undefined control sequence.
l.9     \definecolor

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


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

    fletcher's Avatar

    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?


    Fletcher T. Penney
    [email blocked]

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

    Oliver's Avatar

    Hi Fletcher,

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

    \lorem ipsum

    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:

    1. mmd-letterhead-header
    2. mmd-letterhead-begin-doc
    3. sample.txt (the actual letter)
    4. mmd-letterhead-footer

    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 3 Posted by fletcher on 05 Jan, 2014 08:34 PM

    fletcher's Avatar

    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.


    Fletcher T. Penney
    [email blocked]

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

    Oliver's Avatar

    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 5 Posted by fletcher on 05 Jan, 2014 09:04 PM

    fletcher's Avatar

    Glad it's working!


    Fletcher T. Penney
    [email blocked]

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

Keyboard shortcuts


? Show this help
ESC 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

06 Jun, 2019 10:37 PM
07 May, 2019 03:53 PM
02 Apr, 2019 07:28 PM
04 Mar, 2019 11:16 AM
21 Feb, 2019 03:18 PM

Recent Articles