summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/typo-wrp.mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/typo-wrp.mkxl')
-rw-r--r--tex/context/base/mkxl/typo-wrp.mkxl20
1 files changed, 12 insertions, 8 deletions
diff --git a/tex/context/base/mkxl/typo-wrp.mkxl b/tex/context/base/mkxl/typo-wrp.mkxl
index 92af2058e..850d42e78 100644
--- a/tex/context/base/mkxl/typo-wrp.mkxl
+++ b/tex/context/base/mkxl/typo-wrp.mkxl
@@ -15,7 +15,9 @@
\unprotect
-\registerctxluafile{typo-wrp}{}
+\registerctxluafile{typo-wrp}{autosuffix}
+
+\definesystemattribute[crlf]
\permanent\protected\def\crlf
{\ifhmode
@@ -25,27 +27,29 @@
\protected\def\spac_crlf
{\clf_enablecrlf % once
\unskip
- \spac_crlf_placeholder
+ \wordboundary
+ \spac_crlf_placeholder % box
\ifcase\raggedstatus\hfil\or\or\or\hfil\fi
- % in bad usage this can lead to: [break -10000] [wordboundary] [line(break)penalty] [parfillskip]
+ % in bad usage this can lead to: [break -10000] [wordboundary] [line(break)penalty] [glue (filler)]
\break
+ \begingroup
+ \c_attr_crlf\plusone
\wordboundary
+ \endgroup
% which we then remove (maybe we should flag the wordboundary with an attribute but not now
\ignorespaces}
\protected\def\spac_crlf_placeholder
- {\wordboundary\strut} % or \endstrut
+ {\strut} % or \endstrut
\protected\def\spac_crlf_placeholder_show
- {\wordboundary
- %\nobreak
- \hpack to \zeropoint{\strut{\infofont\kern.25\emwidth}\lohi{\infofont CR}{\infofont LF}\hss}}
+ {\hpack to \zeropoint{\strut{\infofont\kern.25\emwidth}\lohi{\infofont CR}{\infofont LF}\hss}}
\permanent\protected\def\settestcrlf
{\let\spac_crlf_placeholder\spac_crlf_placeholder_show}
\permanent\protected\def\crlfplaceholder % for old times sake
- {\spac_crlf_placeholder}
+ {\wordboundary\strut}
\appendtoks
\let\spac_crlf_placeholder\empty