Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to install the subcaption package on TexLive installed on Ubuntu 11.10. When trying to build subcaption.sty, I found that I needed to first download or build several dependencies:

diagbox.sty
epic.sty
footmisc.sty
overpic.sty
pict2e.sty

After putting these files in the same directory as subcaption.dtx, I try to build subcaption.sty and here is the result:

$ latex subcaption.dtx 
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./subcaption.dtx
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/base/ltxdoc.cls
Document Class: ltxdoc 2007/11/11 v2.0u Standard LaTeX documentation class
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/base/doc.sty
(/usr/share/texmf-texlive/tex/latex/tools/multicol.sty)))
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty) (./footmisc.sty)
(/usr/share/texmf-texlive/tex/latex/tools/array.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf-texlive/tex/latex/graphics/dvips.def))) (./overpic.sty
Package: overpic v0.53 <2010/09/13> (RN)
(./epic.sty
Enhancements to Picture Environment. Version 1.2 - Released June 1, 1986
)
overpic: relative positioning in percent
) (./pict2e.sty (./p2e-dvips.def)) (./diagbox.sty
(/usr/share/texmf-texlive/tex/latex/fp/fp.sty
`Fixed Point Package', Version 0.8, April 2, 1995 (C) Michael Mehlich
(/usr/share/texmf-texlive/tex/latex/fp/defpattern.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-basic.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-addons.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-snap.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-exp.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-trigo.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-pas.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-random.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-eqn.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-upn.sty)
(/usr/share/texmf-texlive/tex/latex/fp/fp-eval.sty)))
(/usr/share/texmf-texlive/tex/latex/oberdiek/hypdoc.sty
(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty))
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty))
(/etc/texmf/tex/latex/config/hyperref.cfg)
(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty))
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty))))
(/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty))
*hyperref using default driver hdvips*
(/usr/share/texmf-texlive/tex/latex/hyperref/hdvips.def
(/usr/share/texmf-texlive/tex/latex/hyperref/pdfmark.def

Package hyperref Warning: You have enabled option `breaklinks'.
(hyperref)                But driver `hdvips.def' does not suppport this.
(hyperref)                Expect trouble with the link areas of broken links.

)) (/usr/share/texmf-texlive/tex/generic/thumbpdf/thumbpdf.sty

Package thumbpdf Warning: Missing driver name.

)) (/usr/share/texmf-texlive/tex/latex/caption/subcaption.sty

! Package subcaption Error: `caption' package not loaded
(subcaption)                (which is needed by this package)

See the subcaption package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.38   \endinput}{}

? 

What am I doing wrong? How can I fix this?

(I'm a novice... I don't know what dtx, ins, or sty files are. All I know is that I can usually run latex file.ins to produce file.sty and then put file.sty in an appropriate directory and use that package.)

[After installing the latest version of TexLive, I had problems... see link below]

Problems with TexLive 2012 on Ubuntu after network installation

share|improve this question

closed as too localized by Joseph Wright Feb 6 '13 at 16:24

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Have a look at How to install "vanilla" TeXLive on Debian or Ubuntu? you shouldn't need to do any 'manual' installation for subcaption –  cmhughes Feb 5 '13 at 19:02
1  
The subcaption package needs caption so you have to install also that one. But trying to update a very old distribution like yours (more than three years) is quite hopeless. Do as cmhughes recommends, you won't regret it. –  egreg Feb 5 '13 at 19:08
    
Which answer at the page that cmhughes links to should I follow? –  synaptik Feb 5 '13 at 20:42
1  
@synaptik I would recommend removing your old distribution completely as in How to remove everything related to TeX Live for fresh install on Ubuntu? and then follow the instructions in the first answer to How to install "vanilla" TeXLive on Debian or Ubuntu? –  cmhughes Feb 5 '13 at 21:57
1  
Why don't you just download mirrors.ctan.org/install/macros/latex/contrib/caption.tds.zip ? There is no need to build the sty files (or documentation) by yourself. (BTW: latex subcaption.dtx will not build subcaption.sty but subcaption.pdf instead. latex caption.ins will build subcaption.sty) –  Axel Sommerfeldt Feb 6 '13 at 7:00

1 Answer 1

latex subcaption.dtx will not build subcaption.sty but the documentation subcaption.dvi resp. subcaption.pdf instead. The subcaption package itself does not have dependencies to diagbox.sty, epic.sty, footmisc.sty, overpic.sty, or pict2e.sty, you only need them to build the documentation for yourself. (This step is not necessary since the documentation already comes pre-build as subcaption.pdf.)

You are getting the error message "caption package not loaded" when building the subcaption package documentation for yourself since building the documentation requires the actual version of the subcaption package installed. So you need to update the caption package bundle (which includes subcaption.sty) first.

latex caption.ins or tex caption.ins will build the required package files, i.e. caption.sty, ..., and subcaption.sty. But the easiest way to get a LaTeX package from CTAN is to look for a TDS structured archive first, they are located at

http://mirrors.ctan.org/install/macros/latex/contrib/

As you see there is a caption.tds.zip, so getting this file, unzipping it, and putting its contents to the right location is all you need to do to install/update the whole caption package bundle including sty files and docs.

share|improve this answer
    
Thanks, this is very helpful. How can I find out what the right location is? –  synaptik Feb 6 '13 at 19:29
    
@synaptik Unpack the zip file within a texmf directory of your choice, e.g. $HOME/texmf. See also: tex.stackexchange.com/questions/1137/… –  Axel Sommerfeldt Feb 6 '13 at 20:44
    
@synaptik ...and tex.stackexchange.com/questions/73016/… –  Axel Sommerfeldt Feb 6 '13 at 20:50
    
Thanks very much. –  synaptik Feb 6 '13 at 22:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.