diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv | 118 |
1 files changed, 43 insertions, 75 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv index 2ce98841e19..d12be6bcfda 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv @@ -71,48 +71,35 @@ \setnewconstant\boundarycharactermode\plusone -% old: skip symbol skip -% new: bound skip symbol skip bound - \unexpanded\def\midboundarycharacter#1#2% {\ifcase\boundarycharactermode \or - \removeunwantedspaces - \wordboundary + %\nobreak \hskip\hspaceamount\currentusedlanguage{#2}% \usedlanguageparameter#1% + %\nobreak \hskip\hspaceamount\currentusedlanguage{#2}% - \wordboundary - \ignorespaces \or \usedlanguageparameter#1% \fi \boundarycharactermode\plusone} -% old: symbol nobreak skip -% new: symbol nobreak skip wordboundary - \unexpanded\def\leftboundarycharacter#1#2% {\ifcase\boundarycharactermode \or \usedlanguageparameter#1% \nobreak - \hskip\hspaceamount\currentusedlanguage{#2}% why not a kern - \wordboundary + \hskip\hspaceamount\currentusedlanguage{#2}% \or \usedlanguageparameter#1% \fi \boundarycharactermode\plusone} -% old: preword skip symbol -% new: bound nobreak skip symbol - \unexpanded\def\rightboundarycharacter#1#2% {\ifcase\boundarycharactermode \or - \wordboundary - \nobreak - \hskip\hspaceamount\currentusedlanguage{#2}% why not a kern + \prewordbreak %\nobreak + \hskip\hspaceamount\currentusedlanguage{#2}% \usedlanguageparameter#1% \or \usedlanguageparameter#1% @@ -225,15 +212,10 @@ %D \typebuffer %D \getbuffer -%unexpanded\def\startsubsentence{\beginofsubsentence\prewordbreak\beginofsubsentencespacing\typo_subsentence_cleanup_start} -%unexpanded\def\stopsubsentence {\typo_subsentence_cleanup_stop\endofsubsentencespacing\prewordbreak\endofsubsentence} -%unexpanded\def\subsentence {\groupedcommandcs\startsubsentence\stopsubsentence} -%unexpanded\def\midsubsentence {\typo_subsentence_cleanup_start\prewordbreak\midsentence\prewordbreak\typo_subsentence_cleanup_stop} - -\unexpanded\def\startsubsentence{\beginofsubsentence\wordboundary\beginofsubsentencespacing\wordboundary\typo_subsentence_cleanup_start} -\unexpanded\def\stopsubsentence {\typo_subsentence_cleanup_stop\wordboundary\endofsubsentencespacing\wordboundary\endofsubsentence} -\unexpanded\def\subsentence {\groupedcommandcs\startsubsentence\stopsubsentence} -\unexpanded\def\midsubsentence {\typo_subsentence_cleanup_start\wordboundary\midsentence\wordboundary\typo_subsentence_cleanup_stop} +\unexpanded\def\startsubsentence{\beginofsubsentence\prewordbreak\beginofsubsentencespacing\typo_subsentence_cleanup_start} +\unexpanded\def\stopsubsentence {\typo_subsentence_cleanup_stop\endofsubsentencespacing\prewordbreak\endofsubsentence} +\unexpanded\def\subsentence {\groupedcommand\startsubsentence\stopsubsentence} +\unexpanded\def\midsubsentence {\typo_subsentence_cleanup_start\prewordbreak\midsentence\prewordbreak\typo_subsentence_cleanup_stop} \definehspace [quotation] [\zeropoint] \definehspace [interquotation] [.125em] @@ -295,8 +277,6 @@ \let\currentdelimitedtext\s!unknown -\installglobalmacrostack\currentdelimitedtext - \let\delimitedtextlevel\!!zerocount \def\c_typo_delimited_nesting{\csname\??delimitedtextlevel\currentparentdelimitedtext\endcsname} @@ -321,8 +301,6 @@ \let\currentdelimitedlanguage\empty -\installglobalmacrostack\currentdelimitedlanguage - \def\typo_delimited_set_language_nop {\setusedlanguage{\delimitedtextparameter\c!language}} @@ -355,8 +333,8 @@ \let\m_delimited_argument\empty} \def\typo_delimited_push#1#2% - {\push_macro_currentdelimitedtext % can we combine these two - \push_macro_currentdelimitedlanguage % the language used for hyphenation + {\globalpushmacro\currentdelimitedtext % can we combine these two + \globalpushmacro\currentdelimitedlanguage % the language used for hyphenation \edef\currentdelimitedtext{#1}% \edef\m_delimited_argument{#2}% \ifx\m_delimited_argument\empty @@ -372,8 +350,8 @@ \def\typo_delimited_pop {\global\advance\c_typo_delimited_nesting\minusone - \pop_macro_currentdelimitedlanguage - \pop_macro_currentdelimitedtext} + \globalpopmacro\currentdelimitedlanguage + \globalpopmacro\currentdelimitedtext} \installcorenamespace{delimitedtext} \installcorenamespace{delimitedtextlevel} @@ -436,8 +414,6 @@ \dostoptagged \ignorespaces} -\newconditional\c_typo_delimited_repeating - \def\typo_delimited_start_other {\edef\p_delimited_repeat{\delimitedtextparameter\c!repeat}% \ifx\p_delimited_repeat\v!yes @@ -445,7 +421,6 @@ \else \let\typo_delimited_repeat\relax \fi - \setfalse\c_typo_delimited_repeating \edef\p_delimited_location{\delimitedtextparameter\c!location}% \ifx\p_delimited_location\v!paragraph \singleexpandafter\typo_delimited_start_par @@ -518,7 +493,7 @@ \let\typo_delimited_stop_par_indeed\stopnarrower \fi % so far - \push_macro_checkindentation + \pushmacro\checkindentation \useindentingparameter\delimitedtextparameter % \begingroup @@ -540,7 +515,7 @@ {\typo_delimited_stop_content \rightdelimitedtextmark \carryoverpar\endgroup % new per 2013-01-21 ... please left floats - \pop_macro_checkindentation + \popmacro\checkindentation \typo_delimited_stop_par_indeed \delimitedtextparameter\c!after \edef\p_delimited_spaceafter{\delimitedtextparameter\c!spaceafter}% @@ -705,37 +680,30 @@ % test test test % \stoptext -% We have no real test case for this and it's broken already for a while, -% even in \MKII. Maybe we should to this in \LUA. Only Italian has the -% middlespeech parameter set. - -\def\typo_delimited_handle_middle#1% special case - {\ifconditional\c_typo_delimited_repeating - \begingroup - \usedelimitedtextstyleandcolor\c!symstyle\c!symcolor - \setbox\scratchbox\hbox{\delimitedtextparameter#1}% - \ifdim\wd\scratchbox>\zeropoint - \ifdim\lastkern=\d_typo_delimited_signal - \unkern - \hskip\hspaceamount\currentusedlanguage{interquotation}% - \else % maybe an option: - %\edef\p_delimited_margin{\delimitedtextparameter\c!location}% - %\ifx\p_delimited_margin\v!margin - % \hskip-\wd\scratchbox - %\fi - \fi - \strut % new, needed below - \dostarttagged\t!delimitedsymbol\empty - \dotagsetdelimitedsymbol\s!middle - \delimitedtextparameter#1% unhbox\scratchbox - \dostoptagged - % \penalty\plustenthousand % else overfull boxes, but that's better than dangling periods - \kern\d_typo_delimited_signal % +- \prewordbreak +\def\typo_delimited_handle_middle#1% + {\typo_delimited_stop_content + \begingroup + \usedelimitedtextstyleandcolor\c!symstyle\c!symcolor + \setbox\scratchbox\hbox{\delimitedtextparameter#1}% + \ifdim\wd\scratchbox>\zeropoint + \ifdim\lastkern=\d_typo_delimited_signal + \unkern + \hskip\hspaceamount\currentusedlanguage{interquotation}% \fi - \endgroup - \else - \settrue\c_typo_delimited_repeating - \fi} + \ifhmode % else funny pagebeaks + \penalty\plustenthousand + \hskip\zeropoint % == \prewordbreak + \fi + \strut % new, needed below + \dostarttagged\t!delimitedsymbol\empty + \dotagsetdelimitedsymbol\s!middle + \delimitedtextparameter#1% unhbox\scratchbox + \dostoptagged + % \penalty\plustenthousand % else overfull boxes, but that's better than dangling periods + \kern\d_typo_delimited_signal % +- \prewordbreak + \fi + \endgroup + \typo_delimited_start_content} \def\typo_delimited_handle_left#1% {\begingroup @@ -749,11 +717,11 @@ \unskip \hskip\hspaceamount\currentusedlanguage{interquotation}% \fi\fi - % \strut % new, needed below - % \ifhmode % else funny pagebeaks - % \penalty\plustenthousand - % \hskip\zeropoint % == \prewordbreak - % \fi + \strut % new, needed below + \ifhmode % else funny pagebeaks + \penalty\plustenthousand + \hskip\zeropoint % == \prewordbreak + \fi \strut % new, needed below \dostarttagged\t!delimitedsymbol\empty \dotagsetdelimitedsymbol\s!left |