File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 660
660
\setlength {\BnfInc }{\BnfIndent }
661
661
\newlength {\BnfRest }
662
662
\setlength {\BnfRest }{2\BnfIndent }
663
- \newcommand {\BnfNontermshape }{\small\color {grammar-gray}\sffamily\itshape }
663
+ \newcommand {\BnfNontermshape }{%
664
+ \small %
665
+ \color {grammar-gray}%
666
+ % The color setting inserts a \pdfcolorstack entry into the vertical list,
667
+ % breaking the connection of the \penalty entry from a preceding heading
668
+ % with the \glue entries that precede the grammar snippet.
669
+ % Add a penalty here that prevents making those \glue entries page-breaking
670
+ % opportunities.
671
+ \penalty 10000%
672
+ \sffamily %
673
+ \itshape }
664
674
\newcommand {\BnfReNontermshape }{\small\rmfamily\itshape }
665
675
\newcommand {\BnfTermshape }{\small\ttfamily\upshape }
666
676
You can’t perform that action at this time.
0 commit comments