Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用subfloat命令编译出错 #13

Open
Xiaojun-Zhu opened this issue Feb 19, 2014 · 5 comments
Open

使用subfloat命令编译出错 #13

Xiaojun-Zhu opened this issue Feb 19, 2014 · 5 comments

Comments

@Xiaojun-Zhu
Copy link

comments的窗口实在太小,就简单写一下报的错误:
!Undefined Control Sequence.
\in@ #1#2->begingroup \def in@@

1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...

1.17 \subfloat
[xx]{

Starfish给出的临时解决方法是,将cls文件中的\RequirePackage{subfig}替换为
\RequirePackage{caption}
\RequirePackage{subcaption}
然后在文中使用下面的代码来画子图
\begin{figure}[h]
\centering
\subcaptionbox{First subfigure\label{subfloat:first}}
{\includegraphics[width=0.3\textwidth]{figure/childs2003_graph.pdf}}
\qquad
\subcaptionbox{Second subfigure\label{subfloat:second}}
{\includegraphics[width=0.3\textwidth]{figure/childs2003_graph.pdf}}

经测试,可以解决问题

@Haixing-Hu
Copy link
Owner

惭愧,我自己都忘了这是啥时候解决的问题了,先放着吧 ⊙﹏⊙b汗

@wpande
Copy link

wpande commented Sep 9, 2015

并注释掉\renewcommand*{\thesubfigure}{(\alph{subfigure})},否则两个括号在子标题中。

@meldonization
Copy link

meldonization commented Feb 12, 2017

或者修改 cls 文件中 \renewcommand*{\thesubfigure}{(\alph{subfigure})} 成为 \renewcommand*{\thesubfigure}{\alph{subfigure}},下一行的 subtable 也需要修改(即去掉圆括号)。如果需要在 listoffigures 中列出 subfigure,需要将 \subcaptionbox 变成 \subfigure[b]{\label{...}}{\includegraphics{...}} 而其中 [b] 选项是对齐底端的 subcaption。 > 祝大家毕业顺利吧 <

@LillianEom
Copy link

然后在导言区加入以下代码实现引用子图时候显示成"1.1(a)"而不是"1.1a"
\usepackage{subcaption}
\usepackage{varioref}
\captionsetup{subrefformat=parens}
\labelformat{subfigure}{\thefigure(#1)}

@FujiZ
Copy link

FujiZ commented Apr 13, 2020

或者可以使用 \RequirePackage[labelformat=simple]{subcaption} 来替代 \RequirePackage{subfig},模板的其他部分不用改。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants