[Tex/LaTex] Errors thrown when trying to use the mdframed package

errorsinstallingmdframed

I am running Ubuntu, so unfortunately I don't get the nice Console way of installing new LaTeX packages, I have to install them manually.

From CTAN, I found the mdframed package, downloaded and extracted the zip, and placed the files so that I now have:

usr/share/texmf-texlive/tex/latex/mdframed/

With a load of files in:

md-frame-#.mdf (where # is 0 through 3)
md-framepre-#.mdf (where # is 0 through 3)
mdframed.sty
mdframedpre.sty
mdframed-doc-en.pdf and *.tex
README

At which point I ran mktexlsr, which outputted a few lines, and seemed happy.

Now when I try to \usepackage{mdframed}, and compile it (I know compile isn't the right word, I just can't remember the correct term atm), my console fills with errors, with the variety of "Undefined Control Sequence"/ "Missing Number, treated as zero"/ "Illegal unit of measurement"/ "Illegal Parameter", and probably a few that I've missed.

Here are the first 4 errors:

2011-09-23 12:27:59,596 DEBUG ToolView - Issue{' Undefined control sequence \newrobustcmd.', 91, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}
2011-09-23 12:27:59,597 DEBUG ToolView - Issue{' Missing \begin{document}.', 91, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}
2011-09-23 12:27:59,598 DEBUG ToolView - Issue{' Undefined control sequence \mdf@option@length.', 91, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}
2011-09-23 12:27:59,598 DEBUG ToolView - Issue{' Missing number, treated as zero.', 93, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}

After searching for \newrobustcmd, I couldn't find any documentation on LaTeX for it.

Also, after opening mdframed.sty, I found that the lines were 1 off (eg, The debugger gave \newrobustcmd to be on line 91 whereas gedit says its on line 92).

The mdframed.sty I am using can be found here (same link as above): http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.sty.

Best Answer

mdframed requires additional packages like etoolbox. To prevent such errors you should install TeXLive 2011. Then you can use the update manager tlmgr to install and update all your packages.