summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-con.mkvi
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-07-19 10:31:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-07-19 10:31:00 +0200
commitbd21f2a318c1b27ae370975ec7640b14c79209c5 (patch)
tree8f4aecb2ae0ed2d54a4e5202a42bafad87aa6793 /tex/context/base/strc-con.mkvi
parentfd5fde0e9d561ad8e96fa2dfdc14b59af57f8f9d (diff)
downloadcontext-bd21f2a318c1b27ae370975ec7640b14c79209c5.tar.gz
beta 2013.07.19 10:31
Diffstat (limited to 'tex/context/base/strc-con.mkvi')
-rw-r--r--tex/context/base/strc-con.mkvi61
1 files changed, 46 insertions, 15 deletions
diff --git a/tex/context/base/strc-con.mkvi b/tex/context/base/strc-con.mkvi
index 2d49a60db..75519b8ce 100644
--- a/tex/context/base/strc-con.mkvi
+++ b/tex/context/base/strc-con.mkvi
@@ -246,6 +246,24 @@
\newconditional\c_strc_constructions_distance_none
+\def\strc_constructions_set_width_and_distance
+ {\assignwidth
+ \p_strc_constructions_width
+ \constructionsheadwidth
+ {\unhcopy\constructionheadbox}
+ \constructionsheaddistance}
+
+\def\strc_constructions_preroll_head#content%
+ {\setbox\constructionheadbox\hbox
+ {\forgetall
+ \dontcomplain
+ \settrialtypesetting
+ \csname\??constructionmainhandler\currentconstructionhandler\endcsname#content}}
+
+\def\strc_constructions_ignore_head
+ {\constructionsheaddistance\zeropoint
+ \constructionsheadwidth \zeropoint}
+
\unexpanded\setvalue{\??constructionstarthandler\v!construction}% this will be redone (reorganized) .. too much boxing
{\dostarttagged\t!construction\currentconstruction
\dotagsetconstruction
@@ -283,21 +301,34 @@
\fi
% inefficient and not always needed, for instance not with margins so we will make checkers
% per alternative some day (especially in labels this is unwanted overhead)
- \setbox\constructionheadbox\hbox
- {\forgetall
- \dontcomplain
- \settrialtypesetting
- \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
- \ifx\p_strc_constructions_sample\empty
- \csname\??constructionmainhandler\currentconstructionhandler\endcsname\currentconstructiontext
- \else
- \csname\??constructionmainhandler\currentconstructionhandler\endcsname\currentconstructionsample
- \fi}%
- \assignwidth
- \p_strc_constructions_width
- \constructionsheadwidth
- {\unhcopy\constructionheadbox}
- \constructionsheaddistance
+ %
+ % maybe we should have an option as i cannot oversee the consequences now
+ %
+ % \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
+ % \ifx\p_strc_constructions_sample\empty
+ % \strc_constructions_preroll_head\currentconstructiontext
+ % \else
+ % \strc_constructions_preroll_head\currentconstructiontextsample
+ % \fi
+ % \strc_constructions_set_width_and_distance
+ %
+ \strc_constructions_preroll_head\currentconstructiontext
+ \ifzeropt\wd\constructionheadbox
+ \strc_constructions_ignore_head
+ \else
+ \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
+ \ifx\p_strc_constructions_sample\empty
+ \strc_constructions_set_width_and_distance
+ \else
+ \strc_constructions_preroll_head\currentconstructionsample
+ \ifzeropt\wd\constructionheadbox
+ \strc_constructions_ignore_head
+ \else
+ \strc_constructions_set_width_and_distance
+ \fi
+ \fi
+ \fi
+ %
\dostarttagged\t!constructiontag\empty % todo
\setbox\constructionheadbox\hbox
{\forgetall