summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/typo-del.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-01-14 17:29:49 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-01-14 17:29:49 +0100
commita16cd078a5cc00d7c789093b5209b6f8d2dfdb1a (patch)
tree3385cd79be0c9b3b66ed3c465b03eefc92001b21 /tex/context/base/mkiv/typo-del.mkiv
parent52c5102fab837626fe9bb359b3eda6066e1a968e (diff)
downloadcontext-a16cd078a5cc00d7c789093b5209b6f8d2dfdb1a.tar.gz
2018-01-14 16:05:00
Diffstat (limited to 'tex/context/base/mkiv/typo-del.mkiv')
-rw-r--r--tex/context/base/mkiv/typo-del.mkiv24
1 files changed, 19 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv
index 1ef7f74c6..33688b9d3 100644
--- a/tex/context/base/mkiv/typo-del.mkiv
+++ b/tex/context/base/mkiv/typo-del.mkiv
@@ -140,6 +140,18 @@
% \def\beforesubsentence{\removeunwantedspaces}
% \def\aftersubsentence {\ignorespaces}
+\newconditional\c_typo_subsentence_cleanup % \settrue\c_typo_subsentence_cleanup
+
+\def\typo_subsentence_cleanup_start
+ {\ifconditional\c_typo_subsentence_cleanup
+ \expandafter\ignorespaces
+ \fi}
+
+\def\typo_subsentence_cleanup_stop
+ {\ifconditional\c_typo_subsentence_cleanup
+ \removeunwantedspaces
+ \fi}
+
\unexpanded\def\midsentence
{\dostarttagged\t!subsentencesymbol\empty
\dotagsetsubsentencesymbol\s!middle
@@ -162,10 +174,11 @@
\symbol[\ifodd\c_typo_subsentence_nesting\c!leftsentence\else\c!leftsubsentence\fi]%
\dostoptagged
\dostarttagged\t!subsentencecontent\empty
- }% \ignorespaces}
+ \typo_subsentence_cleanup_start}
\unexpanded\def\endofsubsentence % relax prevents space gobbling
- {\dostoptagged
+ {\typo_subsentence_cleanup_stop
+ \dostoptagged
\dostarttagged\t!subsentencesymbol\empty
\dotagsetsubsentencesymbol\s!right
\symbol[\ifodd\c_typo_subsentence_nesting\c!rightsentence\else\c!rightsubsentence\fi]%
@@ -184,7 +197,7 @@
\unskip
\hskip\hspaceamount\currentusedlanguage{intersentence}%
% no good, actually language dependent:
-% \ignorespaces
+ % \ignorespaces
\else
\unskip
\fi}
@@ -199,9 +212,10 @@
%D \typebuffer
%D \getbuffer
-\unexpanded\def\startsubsentence{\beginofsubsentence \prewordbreak\beginofsubsentencespacing}
-\unexpanded\def\stopsubsentence {\endofsubsentencespacing\prewordbreak\endofsubsentence}
+\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]