-
Notifications
You must be signed in to change notification settings - Fork 786
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
document开启twoside时,listoffigures与listoftables出现显示错误 #944
Comments
可能是没有清理临时文件所致? |
应该不是,刚刚尝试了一下清理缓存文件重新编译,在开启twoside的时候还是会出现这个显示bug |
从日志文件来看,仍然引入了
|
谢谢你对这个问题的关注!是的,后来也尝试了一下只使用subcaption,log如下,问题似乎还是存在,我附上了一个最小可复现环境,应该导入sjtu latex,用xelatex编译就能复现,不知道是不是我哪里搞bug了 |
复现了这个 bug,触发条件:
\documentclass{sjtuthesis}
\begin{document}
\frontmatter
\listoffigures*
\mainmatter
\chapter{Test}
\ExplSyntaxOn
\int_step_inline:nn{10}{
\begin{figure}
% \caption{This~is~a~super~long~caption~that~needs~attention~in~the~list~of~figures~to~see~if~there~is~some~vertical~overflow.}
\caption{这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题}
\end{figure}
}
\ExplSyntaxOff
\end{document} cc @AlexaraWu |
当然最好的实践应该是每个图标题设定一个简短的标题放在插图索引中。 \caption[简短的标题]{这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题} |
试了一下用 |
有道理 |
|
更正:此问题与页面纵向对齐方式有关,标准文档类中 建议修改模板 \documentclass[oneside]{sjtuthesis}
\flushbottom
\begin{document}
\frontmatter
\listoffigures
\mainmatter
\chapter{测试}
\ExplSyntaxOn
\int_step_inline:nn { 10 }
{
\begin{figure}
\caption{这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题}
\end{figure}
}
\ExplSyntaxOff
\end{document} |
跟 |
展开\documentclass{sjtuthesis}
\makeatletter
\def\l@figure#1#2{
\ifnum \c@lofdepth >\z@
\vskip \cftbeforefigskip
{
\leftskip \cftfigindent \relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent \cftfigindent \relax \@afterindenttrue
\interlinepenalty \@M % <-- 注释这一行变为正常
\leavevmode \@tempdima \cftfignumwidth \relax \let \@cftbsnum \cftfigpresnum
\let \@cftasnum \cftfigaftersnum \let \@cftasnumb \cftfigaftersnumb \advance
\leftskip \@tempdima \null \nobreak \hskip -\leftskip {\cftfigfont #1}\nobreak
\cftfigfillnum {#2}
}
\fi
}
\begin{document}
\frontmatter
\listoffigures
\mainmatter
\makeatletter
\SJTU@head*{测试}
\makeatother
\begin{itemize}
\ExplSyntaxOn
\int_step_inline:nn { 10 }
{
\item[图1-1]
这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题\par\vskip1ex plus 5pt minus 5pt
}
\ExplSyntaxOff
\end{itemize}
\chapter{测试2}
\ExplSyntaxOn
\int_step_inline:nn{10}{
\begin{figure}
% \caption{This~is~a~super~long~caption~that~needs~attention~in~the~list~of~figures~to~see~if~there~is~some~vertical~overflow.}
\caption{这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题这是一个超级长的标题}
\end{figure}
}
\ExplSyntaxOff
\end{document} |
|
这是为了阻止每个项目内部的断页,应该跟这个问题没关 |
fixed in v2.0.3 |
问题描述:
在document默认开启twoside时,英文版listoffigures与listoftables会出现如图所示的错位显示:
刚开始以为是subfigure与tocloft冲突导致,切换回subcaption发现还是有此问题,最后开启oneside后该问题消失
系统信息:
日志信息:
日志信息附于附件中
output.log
-->
The text was updated successfully, but these errors were encountered: