Skip to content

Commit

Permalink
jiazhu: 设置 \interlinepenalties 避免分离错误
Browse files Browse the repository at this point in the history
fixed #616
  • Loading branch information
qinglee committed Jul 22, 2022
1 parent 13a2256 commit e254c61
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions jiazhu/jiazhu.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Copyright and Licence
%</driver>
% \fi
%
% \CheckSum{977}
% \CheckSum{988}
% \GetFileId{jiazhu.sty}
%
% \title{\bfseries\pkg{jiazhu} 宏包}
Expand Down Expand Up @@ -699,6 +699,9 @@ Copyright and Licence
\int_zero:N \tex_linepenalty:D
\int_zero:N \tex_clubpenalty:D
\int_zero:N \tex_widowpenalty:D
\int_zero:N \tex_interlinepenalty:D
\int_zero:N \tex_clubpenalties:D
\int_zero:N \tex_widowpenalties:D
}
% \end{macrocode}
% \end{macro}
Expand Down Expand Up @@ -996,8 +999,15 @@ Copyright and Licence
\tex_parshape:D
\int_eval:n { #1 + 1 } ~
\prg_replicate:nn
{#1} { \c_zero_dim \l_@@_remaining_width_dim }
\c_zero_dim \c_max_dim \scan_stop:
{#1}
{ \c_zero_dim \l_@@_remaining_width_dim }
\c_zero_dim \c_max_dim
\tex_interlinepenalties:D
\int_eval:n {#1} ~
\prg_replicate:nn
{ #1 - 1 }
{ \c_@@_nobreak_int }
\c_@@_break_int
}
}
\int_new:N \l_@@_lines_int
Expand Down Expand Up @@ -1125,6 +1135,7 @@ Copyright and Licence
{ \@@_dim_normalize:N \l_@@_remaining_width_dim }
\@@_parshape:
\hbox_unpack_drop:N \l_@@_text_box
\para_raw_end:
}
\vbox_set_split_to_ht:NNn \l_@@_typeset_box
\l_@@_text_box { \l_@@_lines_int \tex_baselineskip:D }
Expand Down Expand Up @@ -1218,7 +1229,8 @@ Copyright and Licence
{
\@@_halign:
\dim_set_eq:NN \tex_hsize:D \l_@@_width_dim
\hbox_unpack:N \l_@@_text_box \par
\hbox_unpack:N \l_@@_text_box
\para_raw_end:
\int_gset_eq:NN \g_@@_lines_int \tex_prevgraf:D
}
\int_compare:nNnTF \g_@@_lines_int > \l_@@_lines_int
Expand Down

0 comments on commit e254c61

Please sign in to comment.