From: imiyazaki Date: Fri, 25 Apr 2003 15:28:26 +0000 (+0000) Subject: add line break macros from omega-japanese. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4841f7a5a570fbc6b050009d2a140440ddc10444;p=chise%2Fomega.git add line break macros from omega-japanese. --- diff --git a/chise.sty b/chise.sty index 90eaa63..7a75781 100644 --- a/chise.sty +++ b/chise.sty @@ -363,6 +363,69 @@ <-> gt11 }{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% line break, from omega-japanese. + +\def\CJKunbreakablekernone{% + \nobreak + \hskip 0sp plus 2sp minus 2sp + \nobreak +} +\def\CJKunbreakablekerntwo{% + \penalty 500 + \hskip 0sp plus 2sp minus 2sp + \penalty 500 +} +\def\CJKunbreakablekernthree{% + \penalty 200 + \hskip 0sp plus 2sp minus 2sp + \penalty 200 +} +\def\CJKbreakablekern{\hskip 0sp plus 2pt minus 2sp} +% BUG: \rlap should preserve the current font +\def\CJKprotrude#1{% + \discretionary{\rlap{#1}}% + {}% + {#1}% +} +%% Hyphenation parameters + % If the badness does not exceed this, no hyphenation is + % attempted + \pretolerance=-1 + + % Maximal badness + \tolerance=200 + + % Penalty added for the first hyphenation + % in the current paragraph + \hyphenpenalty=0 % Was 50 + + % Penalty added for subsequent hyphenations + \exhyphenpenalty=0 % Was 50 + + % TeX tries to minimize the demerit of the lines: + % (\linepenalty^2 + badness^2) + penalty^2 + \linepenalty=10 + + % If a tight line is followed by a loose one + % (or conversely), we add \adjdemerits + % to the demerit + \adjdemerits=0 % Was 10000 % ??? + + % two hyphens on consecutive lines also add + % to the demerit + \doublehyphendemerits=0 % Was 10000 + + % A hyphen on the last line also adds to + % the demerit. + \finalhyphendemerits=0 % Was 5000 + + % Minimum number of characters in the current word + % before or after a hyphenation point + \lefthyphenmin=2 + \righthyphenmin=3 + +% line break definition ends. \ProcessOptions \endinput