在默认设置下,在数学模式下,二元运算符与\binoppenalty
或关系与 之后可以断行\relpenalty
。我想保留此行为,但更改结果,以便运算符或关系在下一行重复,就像捷克语排版一样。仅仅使用\discretionary{\subseteq}{\subseteq}{\subseteq}
而不是\subseteq
会引发错误。
答案1
\documentclass{article}
\setlength\textwidth{4cm}
%\newcommand\dup[1]{\;{#1}\discretionary{}{\hbox{$#1$}}{}\;}
\relpenalty=10000
\newcommand\dup[1]{#1\discretionary{}{\hbox{$#1$}}{}}% improved version from wipet
\begin{document}
\noindent X\dotfill X
$
A \dup\subset
A \dup\subset
A \dup\subset
A \dup\subset
A \dup\subset
A \dup\subset
A \dup\subset
A \dup\subset
A \dup\subset
A
$
\end{document}