Skip to content

Commit

Permalink
exppl2e.sty: Fix for \nolinebreak for xkanjiskip (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Aug 23, 2017
1 parent 556520f commit 56497af
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
69 changes: 69 additions & 0 deletions exppl2e.sty
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,75 @@
% $B9TF,6XB'J8;z$NA0$G$N(B|\linebreak|$B$N5sF0$N=$@5$O!"(B
% p\LaTeXe{}$B%+!<%M%k(B(2017/05/05)$B$KF3F~$7$?$?$a:o=|!#(B
%
% \begin{macro}{\@no@lnbk}
% \emph{$BF|K\8l(B\TeX{}$B3+H/%3%_%e%K%F%#$K$h$kDI2C(B}$B!'(B
% $B$5$i$K!"(B|\\|$B$@$1$G$J$/(B|\linebreak|$B$K$D$$$F$bF1MM$NBP=h$r$7$^$9!#(B
% \LaTeX{}$B$NDj5A$N$^$^$G$O%^%/%m$K$h$k%Z%J%k%F%#(B$-10000$$B$H(B
% $B9TF,J8;z$N%Z%J%k%F%#(B$10000$$B$,2C;;$5$l$F$7$^$&$?$a!"(B
% |\hskip\z@\relax|$B$rF~$l$F$*$-$^$9!#$J$*!"(B|\linebreak|$B$rH/9T$7$F(B
% $B9TJ,3d$,5/$-$?>l9g!"?7$7$$9TF,$N(BJFM$B%0%k!=$O>C$($k$H$$$&=>Mh$N(B
% p\LaTeX{}$B$N5sF0$b0];}$7$F$$$^$9!#(B
% \changes{v1.2o}{2017/05/03}{$B9TF,6XB'J8;z$ND>A0$G$b2~9T$9$k$h$&$K$7$?(B}
%
% $BA02s$N(B|\hskip\z@\relax|$B$NDI2C$G$O!"(B|\nolinebreak|$B$N>l9g$K(B|\kanjiskip|$B$d(B
% |\xkanjiskip|$B$,F~$i$J$$LdBj$,5/$-$F$7$^$$$^$7$?!#$=$3$G!"(B
% |\penalty\z@\relax|$B$KJQ99$7$^$7$?!#$3$l$O!"L@<(E*$J(B|\penalty|$B%W%j%_%F%#%V(B
% $BF1;N$N9g;;$O9T$o$l$J$$$3$H$rMxMQ$7$F$$$^$9!#(B
% \changes{v????}{????/??/??}{\cs{nolinebreak}$B$N>l9g$K(B\cs{(x)kanjiskip}$B$,(B
% $BF~$i$J$/$J$C$F$$$?$N$r=$@5(B}
% \begin{macrocode}
%<platexrelease>\plIncludeInRelease{????/??/??}{\@no@lnbk}
%<platexrelease> {Break before prebreakpenalty}%
%<*plcore|platexrelease>
\def\@no@lnbk #1[#2]{%
\ifvmode
\@nolnerr
\else
\@tempskipa\lastskip
\unskip
\penalty #1\@getpen{#2}%
\penalty\z@\relax %% added (????/??/??)
\ifdim\@tempskipa>\z@
\hskip\@tempskipa
\ignorespaces
\fi
\fi}
%</plcore|platexrelease>
%<platexrelease>\plEndIncludeInRelease
%<platexrelease>\plIncludeInRelease{2017/05/05}{\@no@lnbk}
%<platexrelease> {Break before prebreakpenalty}%
%<platexrelease>\def\@no@lnbk #1[#2]{%
%<platexrelease> \ifvmode
%<platexrelease> \@nolnerr
%<platexrelease> \else
%<platexrelease> \@tempskipa\lastskip
%<platexrelease> \unskip
%<platexrelease> \penalty #1\@getpen{#2}%
%<platexrelease> \hskip\z@\relax %% added (2017/05/03)
%<platexrelease> \ifdim\@tempskipa>\z@
%<platexrelease> \hskip\@tempskipa
%<platexrelease> \ignorespaces
%<platexrelease> \fi
%<platexrelease> \fi}
%<platexrelease>\plEndIncludeInRelease
%<platexrelease>\plIncludeInRelease{0000/00/00}{\@no@lnbk}
%<platexrelease> {Break before prebreakpenalty}%
%<platexrelease>\def\@no@lnbk #1[#2]{%
%<platexrelease> \ifvmode
%<platexrelease> \@nolnerr
%<platexrelease> \else
%<platexrelease> \@tempskipa\lastskip
%<platexrelease> \unskip
%<platexrelease> \penalty #1\@getpen{#2}%
%<platexrelease> \ifdim\@tempskipa>\z@
%<platexrelease> \hskip\@tempskipa
%<platexrelease> \ignorespaces
%<platexrelease> \fi
%<platexrelease> \fi}
%<platexrelease>\plEndIncludeInRelease
% \end{macrocode}
% \end{macro}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{$BAj8_;2>H(B}
Expand Down
4 changes: 4 additions & 0 deletions tests/linebreak.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
テスト\nolinebreak[2]!テスト\par
テスト\nolinebreak[1]!テスト\par
テスト\nolinebreak[0]!テスト\par
%% 改行が起きない場合に \xkanjiskip と \kanjiskip が入るべき
\xkanjiskip10pt\kanjiskip10pt
テスト\nolinebreak abc\nolinebreak テスト
テスト\nolinebreak 漢字\nolinebreak テスト
\newpage
%% 従来と同じでなければならない
This is\linebreak a test.\par % 強制改行
Expand Down

0 comments on commit 56497af

Please sign in to comment.