summaryrefslogtreecommitdiff
path: root/tex/context/base/typo-drp.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/typo-drp.mkiv')
-rw-r--r--tex/context/base/typo-drp.mkiv56
1 files changed, 17 insertions, 39 deletions
diff --git a/tex/context/base/typo-drp.mkiv b/tex/context/base/typo-drp.mkiv
index 3ac47466f..78f6df0a2 100644
--- a/tex/context/base/typo-drp.mkiv
+++ b/tex/context/base/typo-drp.mkiv
@@ -57,8 +57,6 @@
\setupinitial
[\c!location=\v!text,
\c!n=3,
- \c!m=1,
- \c!method=\v!none,
% \s!font=Bold sa 4,
% \s!font=Bold ht \measure{initial:n},
\s!font=Bold cp \measure{initial:n},
@@ -69,25 +67,24 @@
\c!color=,
\c!before=\blank]
-\unexpanded\def\placeinitial % we cannot group so no settings
+\unexpanded\def\placeinitial
{\dosingleempty\typo_initials_place}
\def\typo_initials_place[#1]% old command
{\par
\namedinitialparameter{#1}\c!before
- \setinitial[#1]\relax}
+ \setinitial[#1]}
\unexpanded\def\setinitial
- {\dodoubleempty\typo_initials_set}
+ {\dosingleempty\typo_initials_set}
-\unexpanded\def\typo_initials_set[#1][#2]%
- {\edef\typo_initial_handle{\typo_initial_handle_indeed{#1}{#2}}}
+\unexpanded\def\typo_initials_set[#1]%
+ {\edef\typo_initial_handle{\typo_initial_handle_indeed{#1}}}
-\unexpanded\def\typo_initial_handle_indeed#1#2%
+\unexpanded\def\typo_initial_handle_indeed#1%
{\dontleavehmode
\begingroup
\edef\currentinitial{#1}%
- \setupcurrentinitial[#2]%
\scratchcounter \initialparameter\c!n\relax
\scratchdistance\initialparameter\c!distance\relax
\scratchhoffset \initialparameter\c!hoffset \relax
@@ -98,43 +95,24 @@
{\definedfont[\initialparameter\s!font]}
{\useinitialstyleparameter\c!style}%
\useinitialcolorparameter\c!color
- \edef\p_text{\initialparameter\c!text}% optional
\ctxcommand{setinitial{
- location = "\initialparameter\c!location",
- enabled = true,
- n = \number\scratchcounter,
- m = \number\initialparameter\c!m,
- method = "\initialparameter\c!method",
- distance = \number\scratchdistance,
- hoffset = \number\scratchhoffset,
- voffset = \number\scratchvoffset,
- ma = \the\attribute\colormodelattribute,
- ca = \the\attribute\colorattribute,
- ta = \the\attribute\transparencyattribute,
- font = \fontid\font,
- dynamic = \number\attribute\zerocount, % it's a bit over the top to support this here
+ location = "\initialparameter\c!location",
+ enabled = true,
+ n = \number\scratchcounter,
+ distance = \number\scratchdistance,
+ hoffset = \number\scratchhoffset,
+ voffset = \number\scratchvoffset,
+ ma = \the\attribute\colormodelattribute ,
+ ca = \the\attribute\colorattribute ,
+ ta = \the\attribute\transparencyattribute,
+ font = \fontid\font,
+ dynamic = \number\attribute\zerocount, % it's a bit over the top to support this here
}}%
\stopluacode
\kern\zeropoint % we need a node
- \p_text
\endgroup
\globallet\typo_initial_handle\relax}
\let\typo_initial_handle\relax
-% \setupbodyfont[dejavu,9pt]
-%
-% \startbuffer
-% \setinitial[two] D. E. Knuth \ignorespaces\input knuth \par
-% \setinitial[two] Knuth \ignorespaces\input knuth \par
-% \setinitial[two] \quotation{D. E. Knuth} \ignorespaces\input knuth \par
-% \setinitial[two] \quotation {Knuth} \ignorespaces\input knuth \par
-% \setinitial[two] [text={D.E. Knuth}] \ignorespaces\input knuth \par
-% \setinitial[two] [m=4] D. E. Knuth \ignorespaces\input knuth \par
-% \stopbuffer
-%
-% \type{m=2} \start \defineinitial[two][m=2,method=none] \getbuffer \page \stop
-% \type{m=1,method=auto} \start \defineinitial[two][m=1,method=auto] \getbuffer \page \stop
-% \type{m=1,method={auto,first,last}} \start \defineinitial[two][m=1,method={first,auto,last}] \getbuffer \page \stop
-
\protect \endinput