
我試圖使用並排放置兩個數字subfigure
,但無法將檔案編譯為 pdf。一旦註解掉該環境的命令(即\begin{subfigure}[t]{0.3\textwidth}
和\end{subfigure}
),錯誤就會消失,但顯然這些數字會被一個接一個地放置。如果程式碼中有錯誤,請指出,或提供替代解決方案。
錯誤訊息:!pdfTeX error: pdflatex (file ecrm1095): Font ecrm1095 at 600 not found ==> Fatal error occurred, no output PDF file produced!
subcaption
另外,請考慮我最近將我使用的軟體包subfigure
單獨安裝到 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}
更新:從問題中得到提示:[字體已安裝,可編譯為 dvi,但無法編譯為 pdf。 “未找到 600 處的字體”,我嘗試直接編譯為 dvi 而不是編譯為 pdf(這是我之前所做的)並且它編譯了!但它仍然無法編譯為 pdf。我嘗試了上述問題中的靈魂,但它也不起作用。
更新2:儘管我還沒有找到任何令人滿意的答案,但我找到了一種解決方法,即不使用fontenc
,而是使用一些像lmodern
.我把這個解決方案歸功於cfr
.請參考以下答案cfr
:https://tex.stackexchange.com/a/205197/99160