3

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.

Werner
  • 603,163
Peter
  • 285
  • You need additional packages like etoolbox. All required packages are listed in the documentation. – Marco Daniel Sep 23 '11 at 11:50
  • 1
    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
  • The current Ubuntu TeXLive is from 2009 so its packages are a couple of years behind the CTAN versions; this can give rise to incompatibilities. Having a full Ubuntu texlive install should resolve many dependencies (e.g. etoolbox is in Synaptic's texlive-latex-extra) but, as suggested by others, installing TeX Live 2011 is likely to be better if you want to use a wider range of packages, or more current ones, than Ubuntu's texlive provides. You can have both the Ubuntu version and the TeX Live versions installed (I do) and use path settings to use the one you want to. – mas Sep 23 '11 at 14:51
  • @Peter: This is particularly for eliminating the risk of confusing the package manager when upgrading the system. Note that /usr/local/share/texmf is searched before /usr/share/texmf and /usr/share/texmf-texlive. So you can put up-to-date versions of any LaTeX packages there. – mhp Sep 23 '11 at 15:27
  • @Marco Can you post what you said as an answer so I could mark this question as answered? – Peter Sep 23 '11 at 15:50
  • @AlanMunn: I will change it. – Marco Daniel Sep 23 '11 at 18:00

1 Answers1

3

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.

Marco Daniel
  • 95,681
  • Sorry - it just occurred to me that you were one of the people who created mdframed. I just wanted to say I appreciate the work you've done - now that I've got it working its a really useful package. – Peter Sep 24 '11 at 06:55
  • @Marco Daniel, I installed TeX Live 2013, but I still get ! LaTeX Error: File `mdframed.sty' not found. when I compile. What could be the problem? – Mencia Feb 01 '14 at 20:03