CheckBoxStudio / BUAAThesis

北航研究生学位论文模板(Word+LaTeX).
MIT License
525 stars 110 forks source link

子图索引会加入章节编号,如何去除? #17

Closed hahakid closed 4 years ago

hahakid commented 4 years ago

微信图片_20191010225033

\begin{figure}%[!htbp] \setlength{\abovecaptionskip}{-0.cm} \setlength{\belowcaptionskip}{-0.cm} \centering \subfigure[sub1]{ \label{1} \begin{minipage}{1\textwidth} \centering \includegraphics[width=0.5\textwidth]{tex/2.jpg} \end{minipage}} \subfigure[sub2]{ \label{2} \begin{minipage}{1\textwidth} \centering \includegraphics[width=0.5\textwidth]{tex/2.jpg} \end{minipage}} \caption{title} \label{fig} \end{figure}

图~\ref{1},图~\ref{2},图~\ref{fig},

当上述代码插入某一章节,最后一个引用会给出顺序编号。但是前两个对子图的索引会自动加上章节编号。类似加入了\numberwithin{figure}{section} 的宏。

weiquanmao commented 4 years ago

*.clc文件中(350行左右)

\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable}{\arabic{table}}

加成

\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thesubfigure}{\arabic{figure}(\alph{subfigure})}
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\thesubtable}{\arabic{table}(\alph{subfigure}))}

然后子图或字表引用都用\subref命令。 治标不治本,但应该可以决绝使用问题。

说明:直接采用子图计数进行编号,通过\renwcommand修改格式

weiquanmao commented 4 years ago

正式解决了,请参见最新提交7899273

hahakid commented 4 years ago

@weiquanmao tested on local machine.