I'm trying to place two figures side by side using subfigure and I'm getting not being able to compile the file to pdf. The error goes away once the commands for this environment are commented out (i.e. \begin{subfigure}[t]{0.3\textwidth} and \end{subfigure}) but then obviously the figures get placed one after the other. Please point out the mistakes in the code, if there are any, or an alternative solution to this.
The error message: !pdfTeX error: pdflatex (file ecrm1095): Font ecrm1095 at 600 not found ==> Fatal error occurred, no output PDF file produced!
Also, consider the fact that the subcaption package that I use for the subfigure was recently separately installed by me to the TexLive.
\documentclass[a4paper,12pt,twoside]{report}
\usepackage{amssymb,amstext,amsmath,hyperref,graphics}
\usepackage[T1]{fontenc}
\usepackage{epstopdf}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
pdfborder={0 0 0},
citecolor= blue,
linkcolor= black,
}
\ifx\pdfoutput\undefined
\usepackage{graphicx}
\else
\usepackage[pdftex]{graphicx}
\fi
\setlength{\parskip}{0.8em}
\begin{document}
Hello World and the \it Master of Dreams!
\begin{figure}
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{energyplot_dt_compare}
\caption{enrgy}
\label{fig:E_deltat}
\end{subfigure}
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{energy_typical_lj}
\caption{Energy plot of the system at T=1}
\label{fig:typicalE}
\end{subfigure}
\end{figure}
\end{document}
Update: Taking cue from the question: [Font installed, compiles to dvi, but fails compiling to pdf. "font at 600 not found", i tried to compile directly to dvi instead of compiling to pdf (which is what I was doing before) and it compiled! But it still wouldn't compile to pdf. I tried the soultion in the question mentioned but it is not working either.
Update 2: Even though I have not found any satisfactory answer yet I found a way around, which is to not use the fontenc, instead use some package like lmodern. I owe this solution to cfr. Please refer to the answer by cfr: https://tex.stackexchange.com/a/205197/99160
\usepackage{subfig}in header? – Masroor Mar 23 '16 at 13:45\usepackage{subcaption}I believe, that defines asubfigureenvironment used as in the code above. – Torbjørn T. Mar 23 '16 at 13:48!pdfTeX error: pdflatex (file ecrm1095): Font ecrm1095 at 600 not found ==> Fatal error occurred, no output PDF file produced!– lordnuuk Mar 23 '16 at 20:27\ifx\pdfoutputup to\fiis obsolete and doesn't really distinguish betweenpdflatexandlatex. Just\usepackage{graphicx}is sufficient. The error aboutecrm1095not found means that you have a faulty installation of the TeX distribution. – egreg Mar 23 '16 at 22:50cm-superor use an alternative font. (Or not use T1, but that's not recommended.) – cfr Mar 23 '16 at 22:50to TeX Liveand what does that mean?subcaptionis already included in TeX Live, as iscm-super. You should not need to install anything extra. And it is a Bad Idea to install packages like this manually, especially if you don't do it correctly, but even if you do. – cfr Mar 23 '16 at 22:52subcaptionsince I didn't do a completeTeXLiveinstallation, due to hard drive memory constraints. I just didkpsewhich cm-super.styand it seems it is also missing. Any how, for time being I have usedlmodern. Thanks anyway! – lordnuuk Mar 23 '16 at 23:05[T1]{fontend}for a while? Has it got something to do with thesubcaptiontrying to access something fromfontenc, font forcaptionfor example? – lordnuuk Mar 23 '16 at 23:10tlmgrto install additions. I agree with @egreg. Something is broken in your TeX installation.cm-superdoesn't providecm-super.sty. It is an extended set of Computer Modern fonts. I'm guessing, though I'm not certain, that the differencesubcaptionmakes is in the size of font used. If so, however, something is badly broken somewhere. – cfr Mar 23 '16 at 23:43