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}
Best Answer
Your TeX distribution is outdated. Compare please my version
with your version
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 packagescaption
andsubcaption
. Check the resulting PDF file.