summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/cont-new.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/cont-new.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkiv57
1 files changed, 56 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/cont-new.mkiv
index af32e8f35c9..2b7028e336b 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2014.05.21 22:04}
+\newcontextversion{2015.04.18 14:41}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
@@ -32,6 +32,61 @@
% \inheritmaintextcolor
% \to \everymargindatacontent
+% This is experimental; if this changes we need to adapt the mb-mp style too. It's
+% not in the core yet.
+%
+% \def\ActionY{\blank\inleftmargin{\shownofparlines}}
+% \def\ActionN{\inleftmargin{\shownofparlines}}
+%
+% \saveparnumber
+% ...
+% \checknofparlines
+% \ifnum\nofparlines<2
+% \ActionY
+% \else
+% \ActionN
+% \fi
+% ...
+
+\newcount\c_typo_par_current
+\newcount\c_typo_par_saved
+\newcount\c_typo_par_lines
+\newcount\c_typo_par_temp
+
+\appendtoks
+ \advance\c_typo_par_current\plusone % local
+ %\llap{\infofont[\the\c_typo_par_saved:\the\c_typo_par_current]\quad}%
+\to \everypar
+
+\unexpanded\def\saveparnumber % the upcoming number
+ {\c_typo_par_saved\c_typo_par_current} % local
+
+\def\savedparnumber {\number\c_typo_par_saved}
+\def\currentparnumber{\number\c_typo_par_current}
+\def\nofparlines {\number\c_typo_par_lines}
+\let\savedparstate \empty
+
+\unexpanded\def\shownofparlines
+ {\dontleavehmode\hbox\bgroup
+ \infofont[\savedparstate]%
+ \egroup}
+
+\unexpanded\def\checknofparlines
+ {\c_typo_par_temp\numexpr\c_typo_par_saved+\plusone\relax
+ \ifhmode
+ \c_typo_par_lines\zerocount
+ \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space-}%
+ \else\ifnum\c_typo_par_current=\c_typo_par_temp
+ \c_typo_par_lines\prevgraf
+ \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space\number\prevgraf}%
+ \else\ifnum\c_typo_par_temp>\c_typo_par_current
+ \c_typo_par_lines\zerocount
+ \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space-}%
+ \else
+ \c_typo_par_lines\maxdimen
+ \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space+}%
+ \fi\fi\fi}
+
%D Maybe:
\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}