1

I'm using texstudio on linux for writing paper.

the version is: TeXstudio 2.3 (SVN ??) Using Qt Version 4.8.4, compiled with Qt 4.8.0 Copyright (c) (original TexMaker) 2004-2010 by Pascal Brachet TeXstudio: Benito van der Zander, Jan Sundermeyer, Daniel Braun

I want to compile the following source code(the source codes are with a IEEEtran.cls ), but it shows : File `subcaption.sty' not found. in texstudio. then I downloaded subcaption.sty and put it in the same folder as the .tex file, there are even more errors. how to deal with this?

My OS is fedora 16, my used version is This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2012.2.27) 12 SEP 2013 13:25.

\documentclass[conference]{IEEEtran}

\usepackage[demo]{graphicx} % demo is just for this example, remove it
\usepackage{subcaption}

\begin{document}

\title{0000}

\author{\IEEEauthorblockN{00000}}

\maketitle
\begin{abstract}
X
\end{abstract}

\IEEEpeerreviewmaketitle

\section{0000}

\begin{figure}[!htbp]
\centering
\begin{subfigure}[b]{0.5\columnwidth}
\includegraphics[width=\linewidth]{pic/loop.png}
\caption{First}
\label{subfig-1:dummy}
\end{subfigure}\hfill
\begin{subfigure}[b]{0.3\columnwidth}
  \includegraphics[width=\linewidth]{pic/twopath.png}
  \caption{Second}
  \label{subfig-2:dummy}
\end{subfigure}
\caption{Dummy figure}
\label{fig:dummy}
\end{figure}

\end{document}
0

3 Answers 3

3

Your TeX distribution is outdated. Compare please my version

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)

with your version

This is pdfTeXk, Version 3.141592-1.40.3

and check the bold parts.

Please look which of these questions helps you to update your system:

After updating your MWE will compile, but take a look to the resulting warning: the document class IEEEtran is not supported by the packages caption and subcaption. Check the resulting PDF file.

3
  • thanks! if IEEEtran is not supported by the packages caption and subcaption, what can I do? Commented Sep 12, 2013 at 16:31
  • Besides, I still don't know what is my TeX distribution, is it TexLive? how to check? Commented Sep 12, 2013 at 16:33
  • I'm user1944267. what do you mean by saying "have you to use this documentclass? " I want to use IEEEtran for a IEEE paper. I want to use caption because of this tex.stackexchange.com/questions/132857/…
    – misteryes
    Commented Sep 12, 2013 at 20:01
1

I had this issue an old version on a shared user system where I couldn't install new packages.

I downloaded the subcaption package from CTAN and followed the wiki's manual installation instructions.

1

subcaption.sty is contained in the caption package, so this worked for me:

tlmgr install caption

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .