# Errors thrown when trying to use the mdframed package

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


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.

-
You need additional packages like etoolbox. All required packages are listed in the documentation. –  Marco Daniel Sep 23 '11 at 11:50
You should install TeXLive 2011. Then you have the update-manager tlmgr to get all new packages. –  Marco Daniel Sep 23 '11 at 11:52
@Marco If mdframed has package dependencies, shouldn't it flag them as errors and not just warnings so that this behaviour doesn't arise? –  Alan Munn Sep 23 '11 at 13:48
@Peter: A tip from a Debian user: Never ever install an additional LaTeX package into /usr/share/texmf-texlive/tex/latex or /usr/share/texmf/tex/latex. Use /usr/local/share/texmf/tex/latex for this purpose. –  mhp Sep 23 '11 at 14:10
@mhp Is this for security reasons or for compile settings? –  Peter Sep 23 '11 at 14:24

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.