用subfig排版图片报错Illegal unit of measure (pt inserted)

2020-02-16 13:19发布

我参考了lshort-zh-cn P35页的参考代码编写的如下代码, ```tex \documentclass{book} \usepackage{subfig} \begin{document...

我参考了lshort-zh-cn P35页的参考代码编写的如下代码, ```tex \documentclass{book} \usepackage{subfig} \begin{document} \begin{figure}[htbp] \centering \subfloat[(1)]{ \label{C1T12(1)} \begin{minipage} \centering \end{minipage} } \qquad \subfloat[(2)]{ \label{C1T12(2)} \begin{minipage} \centering \end{minipage} } \caption{第12题} \label{C1T12} \end{figure} \end{document} ``` 但是报错 行 12: Missing number, treated as zero. ^^I^^I} 行 12: Illegal unit of measure (pt inserted). ^^I^^I} 行 12: Missing number, treated as zero. ^^I^^I} 行 12: Illegal unit of measure (pt inserted). ^^I^^I} 行 19: Missing number, treated as zero. ^^I^^I} 行 19: Illegal unit of measure (pt inserted). ^^I^^I} 行 19: Missing number, treated as zero. ^^I^^I} 行 19: Illegal unit of measure (pt inserted). ^^I^^I} 请问是什么原因,谢谢。
3条回答
```tex \documentclass{book} \usepackage{subfig} \usepackage{mwe} \begin{document} \begin{figure} \centering \subfloat[subfig one\label{C1T12-1}]{\includegraphics[width=0.4\linewidth]{example-image}} \quad \subfloat[subfig two\label{C1T12-2}]{\includegraphics[width=0.4\linewidth]{example-image}} \caption{number 12}\label{C1T12} \end{figure} \end{document} ``` 运行一下上面的代码看看

一周热门 更多>