考虑以下 MWE:
\documentclass{toptesi}
\usepackage{lipsum} % just for dummy text
\begin{document}
\sommario
\lipsum[1-3]
\end{document}
通常,“sommario”(或英文“abstract”)不应超过半页。如何创建当 sommario 超出此限制时出现的警告消息?
感谢您的帮助!
答案1
此日志:
Warning:abstract too long!
418.0pt/607.50787pt
\documentclass{toptesi}
\usepackage{lipsum} % just for dummy text
\begin{document}
\sommario
% \lipsum[1-2]% OK
\lipsum[1-3]% warning
\ifdim\pagetotal>0.6\pagegoal % a bit spare adjust as needed
\typeout{^^JWarning:abstract too long!}
\fi
\typeout{\the\pagetotal/\the\pagegoal^^J}
\end{document}