diff options
Diffstat (limited to 'tex')
137 files changed, 5889 insertions, 4737 deletions
diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua index fd3d4eb1b..4e2bab1f9 100644 --- a/tex/context/base/back-exp.lua +++ b/tex/context/base/back-exp.lua @@ -860,11 +860,11 @@ local function checkmath(root) -- we can provide utf.toentities as an option else local tg = di.tg if tg == "mleft" then - attributes.left = tostring(di.data[1].data[1]) + attributes.left = tostring(di.data[1].data[1].content) elseif tg == "mmiddle" then - attributes.middle = tostring(di.data[1].data[1]) + attributes.middle = tostring(di.data[1].data[1].content) elseif tg == "mright" then - attributes.right = tostring(di.data[1].data[1]) + attributes.right = tostring(di.data[1].data[1].content) else n = n + 1 di.__i__ = n diff --git a/tex/context/base/back-exp.mkiv b/tex/context/base/back-exp.mkiv index b70533e02..311ffe5d2 100644 --- a/tex/context/base/back-exp.mkiv +++ b/tex/context/base/back-exp.mkiv @@ -102,7 +102,7 @@ \to \everyenableelements \appendtoks - \unexpanded\def\dotagsetitemgroup{\taggedctxcommand{settagitemgroup("\currentitemgroup",\ifconditional\c_itemgroups_pack true\else false\fi,"\currentitemgroupsymbol")}}% + \unexpanded\def\dotagsetitemgroup{\taggedctxcommand{settagitemgroup("\currentitemgroup",\ifconditional\c_strc_itemgroups_pack true\else false\fi,"\currentitemgroupsymbol")}}% \to \everyenableelements \appendtoks @@ -156,7 +156,7 @@ \appendtoks \doifsomething{\backendparameter\c!export} - {\setupstructure + {\setuptagging [\c!state=\v!start]% \enabledirectives [backend.export=\backendparameter\c!export]}% diff --git a/tex/context/base/back-ini.mkiv b/tex/context/base/back-ini.mkiv index df6a76fcd..8ece8f6e1 100644 --- a/tex/context/base/back-ini.mkiv +++ b/tex/context/base/back-ini.mkiv @@ -142,7 +142,7 @@ \installcorenamespace{backend} -\installdirectcommandhandler \??backend {backend} +\installsetuponlycommandhandler \??backend {backend} \let\jobsuffix\empty diff --git a/tex/context/base/bibl-bib.mkiv b/tex/context/base/bibl-bib.mkiv index 5aaf45825..56007d21c 100644 --- a/tex/context/base/bibl-bib.mkiv +++ b/tex/context/base/bibl-bib.mkiv @@ -619,7 +619,8 @@ \to \everysetupbibtexlistplacement \def\typesetbibtexlist - {\dobeginoflist + {\begingroup + \startpacked[\v!blank]% \doif{\namedlistparameter\currentbibtexsession\c!criterium}\v!cite {\setuplist[\currentbibtexsession][\c!criterium=\v!here]}% \doifelse{\bibtexpublicationsparameter\c!method}\v!local @@ -632,7 +633,8 @@ {\namedlistparameter\currentbibtexsession\c!extras}% {\namedlistparameter\currentbibtexsession\c!order}% \ctxlua{bibtex.hacks.flush("\bibtexpublicationsparameter\c!sorttype")}% - \doendoflist} + \stoppacked + \endgroup} \unexpanded\def\typesetbibtexpublication#1% {\edef\currentbibtexsessiontag{#1}% @@ -650,7 +652,11 @@ {\doifbibreferencefoundelse\currentbibtexsessiontag {\global\advance\bibtexcounter\plusone \ctxlua{bibtex.hacks.registerplaced("\currentbibtexsessiontag")}% - \dodolistelement{\currentbibtexsession}{}{\number\bibtexcounter}{\thebibtexpublicationlistelement}{}{}} + \let\currentlist\currentbibtexsession + \let\currentlistentrynumber \bibtexcounter + \let\currentlistentrytitle \thebibtexpublicationlistelement + \let\currentlistentrypagenumber\empty + \strc_lists_apply_renderingsetup} {}} % invalid \def\thebibtexpublicationlistelement diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv index 0e26d8ed0..44afd83b8 100644 --- a/tex/context/base/bibl-tra.mkiv +++ b/tex/context/base/bibl-tra.mkiv @@ -743,8 +743,9 @@ \def\doprocessbibtexentry#1{\typesetapublication{#1}} \def\typesetpubslist - {\preloadbiblist - \dobeginoflist + {\begingroup + \startpacked[\v!blank]% + \preloadbiblist % \the\initializebibdefinitions % COMMENTED \edef\currentlist{pubs}% \ctxlua{bibtex.hacks.reset(\number\bibtexoncemode)}% @@ -760,11 +761,11 @@ {\listparameter\c!extras}% {\listparameter\c!order}}% \ctxlua{bibtex.hacks.flush("\@@pbsorttype")}% - \doendoflist} + \stoppacked + \endgroup} \newif\ifinpublist - \def\initializepubslist {\def\currentlist{pubs}% \edef\@@pbnumbering{\@@pbnumbering}% @@ -873,16 +874,17 @@ {\global\advance\bibtexcounter\plusone \def\currentpublicationkey{#1}% \ctxlua{bibtex.hacks.registerplaced("#1")}% - \dodolistelement - {pubs}% - {}% - {\number\bibtexcounter}% - {\expanded{\reference[\bibrefprefix#1]{\number\bibtexcounter}}% - \strut\dotypesetapublication{#1}\strut}% - {}% - {}} + \def\currentlist {pubs}% + \let\currentlistentrynumber \bibtexcounter + \let\currentlistentrytitle \bibtexpubtext + \let\currentlistentrypagenumber\empty + \strc_lists_apply_renderingsetup} {}} % invalid +\def\bibtexpubtext + {\expanded{\reference[\bibrefprefix\currentpublicationkey]{\number\bibtexcounter}}% + \strut\dotypesetapublication\currentpublicationkey\strut} + \def\dotypesetapublication#1% {\bgroup \the\initializebibdefinitions % NEW diff --git a/tex/context/base/buff-imp-tex.mkiv b/tex/context/base/buff-imp-tex.mkiv index 6f5ba6b10..c582523d5 100644 --- a/tex/context/base/buff-imp-tex.mkiv +++ b/tex/context/base/buff-imp-tex.mkiv @@ -49,3 +49,34 @@ [\c!option=tex] \protect \endinput + +% needs thinking ... (esp outer start/stop) +% +% \definestartstop +% [TexSnippet] +% [DefaultSnippet] +% +% \definevisualizer +% [TexSnippetName] +% [\c!color=darkgreen, +% \c!style=boldface] +% +% \definevisualizer +% [TexSnippetGroup] +% [\c!color=darkred, +% \c!style=boldface] +% +% \definevisualizer +% [TexSnippetBoundary] +% [\c!color=darkblue, +% \c!style=boldface] +% +% \definevisualizer +% [TexSnippetSpecial] +% [\c!color=darkyellow, +% \c!style=boldface] +% +% \definevisualizer +% [TexSnippetComment] +% [\c!color=darkyellow, +% \c!style=boldface] diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua index 9961a73f6..004d89858 100644 --- a/tex/context/base/buff-ver.lua +++ b/tex/context/base/buff-ver.lua @@ -38,7 +38,7 @@ local addsuffix = file.addsuffix local v_auto = variables.auto local v_yes = variables.yes --- beware, these all get an argument (like newline) +-- beware, all macros have an argument: local doinlineverbatimnewline = context.doinlineverbatimnewline local doinlineverbatimbeginline = context.doinlineverbatimbeginline @@ -343,34 +343,6 @@ end local split_processor = typesetters.processors.split local apply_processor = typesetters.processors.apply --- function visualizers.registerescapepattern(name,before,after,normalmethod,escapemethod,processor) --- local escapepattern = escapepatterns[name] --- if not escapepattern then --- before = type(before) == "table" and before [1] or before --- after = type(after) == "table" and after [1] or after --- processor = type(processor) == "table" and processor[1] or processor --- if trace_visualize then --- report_visualizers("registering escape pattern, name: '%s', before: '%s', after: '%s'",name,before,after) --- end --- before = P(before) * space_pattern --- after = space_pattern * P(after) --- local action --- if processor then --- action = function(s) apply_processor(processor,s) end --- else --- action = escapemethod or texmethod --- end --- escapepattern = ( --- (before / "") --- * ((1 - after)^0 / action) --- * (after / "") --- + hack((1 - before)^1) / (normalmethod or defaultmethod) --- )^0 --- escapepatterns[name] = escapepattern --- end --- return escapepattern --- end - -- todo: { before = b, after = a, processor = p }, ... function visualizers.registerescapepattern(name,befores,afters,normalmethod,escapemethod,processors) diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv index a9dab57f3..366210af7 100644 --- a/tex/context/base/buff-ver.mkiv +++ b/tex/context/base/buff-ver.mkiv @@ -19,7 +19,9 @@ \definesystemattribute[verbatimline][public] -\appendtoksonce \attribute\verbatimlineattribute \attributeunsetvalue \to \everyforgetall +\appendtoksonce + \attribute\verbatimlineattribute\attributeunsetvalue +\to \everyforgetall %D Initializations. @@ -57,55 +59,51 @@ \setvalue{\??typingblank\v!line }{\baselineskip} \setvalue{\??typingblank\v!none }{\zeropoint} -\def\secondstageinitializetype - {\let\obeyedspace\specialobeyedspace - \csname\??typingspace\typeparameter\c!space\endcsname - \relax\the\everyinitializeverbatim\relax} - -\def\secondstageinitializetyping - {\let\obeyedspace\specialobeyedspace - \csname\??typingspace\typingparameter\c!space\endcsname - \csname\??typinglines\typingparameter\c!lines\endcsname - \relax\the\everyinitializeverbatim\relax} - -\def\firststageinitializetype +\def\buff_verbatim_initialize_type_one {\let\obeylines\ignorelines \ignorehyphens % default \usetypestyleandcolor\c!style\c!color \setcatcodetable\vrbcatcodes} -\let\doverbatimsetlinemargin\relax +\def\buff_verbatim_initialize_type_two + {\let\obeyedspace\specialobeyedspace + \csname\??typingspace\typeparameter\c!space\endcsname + \relax\the\everyinitializeverbatim\relax} + +\let\buff_verbatim_set_line_margin\relax -\def\dodoverbatimsetlinemargin +\def\buff_verbatim_set_line_margin_indeed {\getpagestatus - \ifrightpage - \hskip\typingparameter\c!oddmargin\relax - \else - \hskip\typingparameter\c!evenmargin\relax - \fi} + \hskip\ifrightpage\typingparameter\c!oddmargin\else\typingparameter\c!evenmargin\fi\relax} -\def\docheckverbatimmargins +\def\buff_verbatim_check_margins {\scratchskip\typingparameter\c!oddmargin\relax \ifzeropt\scratchskip \else - \let\doverbatimsetlinemargin\dodoverbatimsetlinemargin + \let\buff_verbatim_set_line_margin\buff_verbatim_set_line_margin_indeed \fi \scratchskip\typingparameter\c!evenmargin\relax \ifzeropt\scratchskip \else - \let\doverbatimsetlinemargin\dodoverbatimsetlinemargin + \let\buff_verbatim_set_line_margin\buff_verbatim_set_line_margin_indeed \fi - \ifx\doverbatimsetlinemargin\relax + \ifx\buff_verbatim_set_line_margin\relax \doadaptleftskip{\typingparameter\c!margin}% \fi} -\def\firststageinitializetyping - {\switchtobodyfont[\typingparameter\c!bodyfont]% - \docheckverbatimmargins +\def\buff_verbatim_initialize_typing_one + {\switchtobodyfont[\typingparameter\c!bodyfont]% can be low level call + \buff_verbatim_check_margins \usetypingstyleandcolor\c!style\c!color \doifsomething{\typingparameter\c!align}{\setupalign[\typingparameter\c!align]}% \ignorehyphens} % default +\def\buff_verbatim_initialize_typing_two + {\let\obeyedspace\specialobeyedspace + \csname\??typingspace\typingparameter\c!space\endcsname + \csname\??typinglines\typingparameter\c!lines\endcsname + \relax\the\everyinitializeverbatim\relax} + %D \macros %D {definetype,setuptype} %D @@ -117,14 +115,11 @@ \installcommandhandler \??type {type} \??type \appendtoks - \normalexpanded{\dodefinetype{\currenttype}}% + \setuevalue{\currenttype}{\buff_verbatim_type{\currenttype}}% \to \everydefinetype -\unexpanded\def\dodefinetype#1% - {\setuvalue{#1}{\dotype{#1}}} - \appendtoks - \doinitializevisualizer{\typeparameter\c!option}% + \buff_verbatim_initialize_visualizer{\typeparameter\c!option}% \to \everysetuptype %D \macros @@ -149,16 +144,16 @@ \installcommandhandler \??typing {typing} \??typing \appendtoks - \setuevalue{\e!start\currenttyping}{\dostarttyping{\currenttyping}}% - \setuevalue{\e!stop \currenttyping}{\dostoptyping {\currenttyping}}% + \setuevalue{\e!start\currenttyping}{\buff_verbatim_typing_start{\currenttyping}}% + \setuevalue{\e!stop \currenttyping}{\buff_verbatim_typing_stop {\currenttyping}}% \normalexpanded{\definelinenumbering[\currenttyping]}% \to \everydefinetyping \appendtoks - \doinitializevisualizer{\typingparameter\c!option}% we can check at the tex end + \buff_verbatim_initialize_visualizer{\typingparameter\c!option}% we can check at the tex end \to \everysetuptyping -\def\doinitializevisualizer#1% +\def\buff_verbatim_initialize_visualizer#1% {\ifproductionrun\ctxcommand{loadvisualizer("#1")}\fi} %D Verbatim command are very sensitive to argument processing, @@ -180,12 +175,6 @@ %D \type{<<} and \type{>>} as delimiters. This alternative can %D be used in situations where slanted typeseting is needed. -\def\lesscharacter {<} -\def\morecharacter {>} -\let\texescape \textbackslash -\let\leftargument \textbraceleft -\let\rightargument \textbraceright - %D \macros %D {type} %D @@ -230,97 +219,95 @@ %D %D \typebuffer -% beware, the command is supposed to do something like -% \framed and not manipulate content i.e. it gets no -% argument but something b/egrouped instead -% -% so, if we only had left and right it woul dbe: -% -% \def\doleftoftype {\typeparameter\c!left\bgroup} % we need the grouping in order -% \def\dorightoftype{\egroup\typeparameter\c!right} % to get the normal font -% -% but with command: +% Beware, the command is supposed to do something like \framed and not +% manipulate content i.e. it gets no argument but something b/egrouped +% instead: + +\def\buff_verbatim_left_of_type + {\typeparameter\c!left + \typeparameter\c!command\bgroup} -\def\doleftoftype {\typeparameter\c!left\typeparameter\c!command\bgroup} -\def\dorightoftype{\egroup\typeparameter\c!right} +\def\buff_verbatim_right_of_type + {\egroup + \typeparameter\c!right} -\unexpanded\def\type{\dotype\empty} -\unexpanded\def\typ {\dotyp \empty} +\unexpanded\def\type{\buff_verbatim_type\empty} +\unexpanded\def\typ {\buff_verbatim_typ \empty} -\def\dotype#1% +\unexpanded\def\buff_verbatim_type#1% {\dontleavehmode \bgroup \edef\currenttype{#1}% - \doifnextoptionalelse\redotype\dodotype} + \doifnextoptionalelse\buff_verbatim_type_yes\buff_verbatim_type_nop} -\def\redotype[#1]% +\def\buff_verbatim_type_yes[#1]% {\setupcurrenttype[#1]% - \dodotype} + \buff_verbatim_type_nop} -\def\dodotype - {\doleftoftype - \futurelet\next\dodotypeone} +\def\buff_verbatim_type_nop + {\buff_verbatim_left_of_type + \futurelet\next\buff_verbatim_type_one} -\def\dotyp#1% +\def\buff_verbatim_typ#1% {\dontleavehmode \bgroup \edef\currenttype{#1}% \lettypeparameter\v!lines\v!hyphenated \let\specialobeyedspace\specialstretchedspace - \doifnextoptionalelse\redotype\dodotype} + \doifnextoptionalelse\buff_verbatim_type_yes\buff_verbatim_type_nop} -\def\dodotypeone +\def\buff_verbatim_type_one {\ifx\next\bgroup - \expandafter\dodotypeA + \expandafter\buff_verbatim_type_a \else - \expandafter\dodotypetwo + \expandafter\buff_verbatim_type_two \fi} -\def\dodotypetwo +\def\buff_verbatim_type_two {\catcode`<=\othercatcode % old precaution \catcode`>=\othercatcode % old precaution - \futurelet\next\dodotypethree} + \futurelet\next\buff_verbatim_type_three} -\def\dodotypethree +\def\buff_verbatim_type_three {\if\next<% - \expandafter\dodotypeB + \expandafter\buff_verbatim_type_b \else - \expandafter\dodotypeC + \expandafter\buff_verbatim_type_c \fi} -\def\dodotypeA - {\firststageinitializetype +\def\buff_verbatim_type_a + {\buff_verbatim_initialize_type_one \setcatcodetable\tpacatcodes - \dodotypenormal} + \buff_verbatim_type_normal} -\def\dodotypeB#1% - {\firststageinitializetype +\def\buff_verbatim_type_b#1% + {\buff_verbatim_initialize_type_one \setcatcodetable\tpbcatcodes - \dodotypenested} + \buff_verbatim_type_nested} -\def\dodotypeC#1% - {\firststageinitializetype +\def\buff_verbatim_type_c#1% + {\buff_verbatim_initialize_type_one \setcatcodetable\vrbcatcodes - \def\next##1#1{\dodotypenormal{##1}}% + \def\next##1#1{\buff_verbatim_type_normal{##1}}% \next} -\def\dodotypenormal#1% - {\secondstageinitializetype +\def\buff_verbatim_type_normal#1% + {\buff_verbatim_initialize_type_two \dostarttagged\t!verbatim\currenttype - \ctxcommand{typestring { + \ctxcommand{typestring{ data = \!!bs\detokenize{#1}\!!es, tab = "\typeparameter\c!tab", method = "\typeparameter\c!option", nature = "inline", }}% \dostoptagged - \dorightoftype + \buff_verbatim_right_of_type \egroup} -\def\dodotypenested#1% - {\secondstageinitializetype +\def\buff_verbatim_type_nested#1% + {\buff_verbatim_initialize_type_two \dostarttagged\t!verbatim\currenttype - \ctxcommand{typestring { + \ctxcommand{typestring{ data = \!!bs\detokenize{#1}\!!es, tab = "\typeparameter\c!tab", method = "nested", % we force a special visualizer @@ -328,7 +315,7 @@ nature = "inline", }}% \dostoptagged - \dorightoftype + \buff_verbatim_right_of_type \egroup \gobbleoneargument} % grab last > @@ -342,28 +329,28 @@ %D works all right, but a decent hyphenation support of %D \type{\tt} text will be implemented soon. -\def\specialfixedspace {\kern\interwordspace\relax} -\def\specialobeyedspace {\hskip\interwordspace\relax} % better than spaceskip -\def\specialstretchedspace{\hskip.5\interwordspace\!!plus.125\interwordstretch\relax} % more but not less -\def\specialcontrolspace {\hskip\zeropoint\hbox{\normalcontrolspace}\hskip\zeropoint\relax} +\unexpanded\def\specialfixedspace {\kern\interwordspace\relax} +\unexpanded\def\specialobeyedspace {\hskip\interwordspace\relax} % better than spaceskip +\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\!!plus.125\interwordstretch\relax} % more but not less +\unexpanded\def\specialcontrolspace {\hskip\zeropoint\hbox{\normalcontrolspace}\hskip\zeropoint\relax} -\def\obeyhyphens +\unexpanded\def\obeyhyphens {\let\obeyedspace \specialobeyedspace % maybe \specialstretchedspace \let\controlspace\specialcontrolspace \spaceskip.25em\relax} % hm a bit of stretch ! -\def\obeybreakpoints +\unexpanded\def\obeybreakpoints {\ignorehyphens \veryraggedright} -\def\ignorehyphens +\unexpanded\def\ignorehyphens {\language\minusone % extra bonus, the \null should do the job too \let\obeyedspace \specialobeyedspace \let\controlspace\specialcontrolspace \spaceskip.5em\relax} %D \macros -%D {tex,arg,mat,dis} +%D {tex,arg,mat,dis,astype} %D %D Sometimes, for instance when we pass verbatim text as an %D argument, the fixed \CATCODES\ interfere with our wishes. An @@ -373,65 +360,77 @@ %D troublesome solution. Instead we stick to some 'old' %D \CONTEXT\ macros for typesetting typical \TEX\ characters. -\def\setgroupedtype - {\firststageinitializetype +\def\lesscharacter {<} % obsolete +\def\morecharacter {>} % obsolete + +\let\texescape \textbackslash +\let\leftargument \textbraceleft +\let\rightargument \textbraceright +\let\inlinemathmarker \textdollar +\def\displaymathmarker{\textdollar\textdollar} + +\def\buff_verbatim_special_type#1#2% + {\dontleavehmode\bgroup + \buff_verbatim_initialize_type_one \catcode\leftbraceasciicode \begingroupcatcode - \catcode\rightbraceasciicode\endgroupcatcode} + \catcode\rightbraceasciicode\endgroupcatcode + #1% + \aftergroup#2% + \let\nexttoken} -\unexpanded\def\tex{\groupedcommand{\setgroupedtype\texescape}{\relax}} -\unexpanded\def\arg{\groupedcommand{\setgroupedtype\leftargument}{\rightargument}} -\unexpanded\def\mat{\groupedcommand{\setgroupedtype\$}{\$}} -\unexpanded\def\dis{\groupedcommand{\setgroupedtype\$\$}{\$\$}} +\unexpanded\def\tex{\buff_verbatim_special_type\texescape \relax} +\unexpanded\def\arg{\buff_verbatim_special_type\leftargument \rightargument} +\unexpanded\def\mat{\buff_verbatim_special_type\inlinemathmarker \inlinemathmarker} +\unexpanded\def\dis{\buff_verbatim_special_type\displaymathmarker\displaymathmarker} \let\normaltexttex\tex \let\normaltextarg\arg \let\normaltextmat\mat \let\normaltextdis\dis -\def\astype{\groupedcommand{\usetypestyleandcolor\c!style\c!color}{}} +\unexpanded\def\astype{\bgroup\usetypestyleandcolor\c!style\c!color\let\nexttoken} -%D The basic display verbatim commands are defined in an -%D indirect way. As we will see, they are a specific case of a -%D more general mechanism. +%D The basic display verbatim commands are defined in an indirect way. As we +%D will see, they are a specific case of a more general mechanism. -\let\beginofverbatimlines\relax -\let\endofverbatimlines \relax +\let\beginofverbatimlines\relax % hooks +\let\endofverbatimlines \relax % hooks -\unexpanded\def\dostarttyping#1% tricky non standard lookahead - {\bgroup +\unexpanded\def\buff_verbatim_typing_start#1% tricky non standard lookahead + {\begingroup \edef\currenttyping{#1}% \obeylines - \futurelet\nexttoken\dodostarttyping} + \futurelet\nexttoken\buff_verbatim_typing_start_indeed} -\def\dodostarttyping +\def\buff_verbatim_typing_start_indeed {\ifx\nexttoken[% - \expandafter\dododostarttyping + \expandafter\buff_verbatim_typing_start_yes \else - \expandafter\nododostarttyping + \expandafter\buff_verbatim_typing_start_nop \fi} -\def\nododostarttyping +\def\buff_verbatim_typing_start_nop {\typingparameter\c!before \startpacked[\v!blank] - \dosetuptypelinenumbering - \firststageinitializetyping - \normalexpanded{\dotypeblockverbatim{\e!start\currenttyping}{\e!stop\currenttyping}}} + \buff_verbatim_setup_line_numbering + \buff_verbatim_initialize_typing_one + \normalexpanded{\buff_verbatim_type_block{\e!start\currenttyping}{\e!stop\currenttyping}}} -\def\dododostarttyping[#1]% +\def\buff_verbatim_typing_start_yes[#1]% {\typingparameter\c!before \startpacked[\v!blank] \doifassignmentelse{#1} {\setuptyping[\currenttyping][#1]} {\doifinset\v!continue{#1}{\setuptyping[\currenttyping][\c!continue=\v!yes]}}% - \dosetuptypelinenumbering - \firststageinitializetyping - \normalexpanded{\dotypeblockverbatim{\e!start\currenttyping}{\e!stop\currenttyping}}} + \buff_verbatim_setup_line_numbering + \buff_verbatim_initialize_typing_one + \normalexpanded{\buff_verbatim_type_block{\e!start\currenttyping}{\e!stop\currenttyping}}} -\unexpanded\def\dotypeblockverbatim#1#2% - {\buff_pickup{_typing_}{#1}{#2}{}{\dodotypeblockverbatim{#1}{#2}}} % was dowithbuffer +\unexpanded\def\buff_verbatim_type_block#1#2% + {\buff_pickup{_typing_}{#1}{#2}{}{\buff_verbatim_type_block_verbatim_indeed{#1}{#2}}} % was dowithbuffer -\def\dodotypeblockverbatim#1#2% - {\secondstageinitializetyping +\def\buff_verbatim_type_block_verbatim_indeed#1#2% + {\buff_verbatim_initialize_typing_two \dostarttagged\t!verbatimblock\currenttyping \beginofverbatimlines \dostarttagged\t!verbatimlines\empty @@ -449,11 +448,11 @@ \dostoptagged \csname#2\endcsname} -\unexpanded\def\dostoptyping#1% hm, currenttyping +\unexpanded\def\buff_verbatim_typing_stop#1% hm, currenttyping {\stoppacked \typingparameter\c!after \useindentnextparameter\typingparameter - \egroup + \endgroup \dorechecknextindentation} %D Line numbering for files is combined with filtering, while @@ -510,30 +509,30 @@ % [category] [settings] {name} % for historic reasons, all filenames are {} -\def\typefile - {\dodoubleempty\dotypefile} +\unexpanded\def\typefile + {\dodoubleempty\buff_verbatim_type_file} -\def\dotypefile[#1][#2]#3% - {\bgroup +\def\buff_verbatim_type_file[#1][#2]#3% + {\begingroup \ifsecondargument \setuptyping[#1][#2]% - \dododotypefile{#1}{#3}% + \buff_verbatim_type_file_checked{#1}{#3}% \else\iffirstargument \doifassignmentelse{#1} {\setuptyping[\v!file][#1] - \dododotypefile\v!file{#3}} - {\dododotypefile{#1}{#3}}% + \buff_verbatim_type_file_checked\v!file{#3}} + {\buff_verbatim_type_file_checked{#1}{#3}}% \else - \dododotypefile\v!file{#3}% + \buff_verbatim_type_file_checked\v!file{#3}% \fi\fi - \egroup} + \endgroup} -\def\dododotypefile#1#2% +\def\buff_verbatim_type_file_checked#1#2% {\doifelsetypingfile{#2} - {\dodododotypefile{#1}\askedtypingfile} + {\buff_verbatim_type_file_indeed{#1}\askedtypingfile} {\showmessage\m!verbatims1{#2}}} -\def\doifelsetypingfile#1% +\unexpanded\def\doifelsetypingfile#1% {\edef\askedtypingfile{\locfilename{#1}}% \ifx\askedtypingfile\empty \edef\askedtypingfile{\locfilename{#1.tex}}% downward compatible @@ -544,13 +543,13 @@ \expandafter\firstoftwoarguments \fi} -\def\dodododotypefile#1#2% category name +\def\buff_verbatim_type_file_indeed#1#2% category name {\edef\currenttyping{#1}% \typingparameter\c!before \startpacked[\v!blank] - \dosetuptypelinenumbering - \firststageinitializetyping - \secondstageinitializetyping + \buff_verbatim_setup_line_numbering + \buff_verbatim_initialize_typing_one + \buff_verbatim_initialize_typing_two \dostarttagged\t!verbatimblock\currenttyping \beginofverbatimlines \dostarttagged\t!verbatimlines\empty @@ -585,7 +584,7 @@ \def\endofverbatimlinenumbering {\stoplinenumbering} -\def\dosetuptypelinenumbering +\def\buff_verbatim_setup_line_numbering {\ifdefined\startlinenumbering \edef\currenttypingnumbering{\typingparameter\c!numbering}% \ifx\currenttypingnumbering\v!file @@ -676,45 +675,45 @@ % [name] [settings] | [name] | [settings] \unexpanded\def\typebuffer - {\dodoubleempty\dotypebuffer} + {\dodoubleempty\buff_verbatim_type_buffer} -\unexpanded\def\dotypedefinedbuffer - {\dotripleempty\dodotypedefinedbuffer} +\unexpanded\def\buff_verbatim_type_defined_buffer + {\dotripleempty\buff_verbatim_type_defined_buffer_indeed} \appendtoks - \setuevalue{\e!type\currentbuffer}{\dotypedefinedbuffer[\v!buffer][\currentdefinedbuffer]}% + \setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}% \to \everydefinebuffer -\unexpanded\def\dotypebuffer[#1][#2]% - {\bgroup +\unexpanded\def\buff_verbatim_type_buffer[#1][#2]% + {\begingroup \ifsecondargument \setuptyping[\v!buffer][#2]% - \processcommalist[#1]{\dododotypebuffer\v!buffer}% [name] [settings] + \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\v!buffer}% [name] [settings] \else\iffirstargument \doifassignmentelse{#1} {\setuptyping[\v!buffer][#1]% - \dododotypebuffer\v!buffer\empty}% [settings] - {\processcommalist[#1]{\dododotypebuffer\v!buffer}}% [name] + \buff_verbatim_type_buffer_indeed\v!buffer\empty}% [settings] + {\processcommalist[#1]{\buff_verbatim_type_buffer_indeed\v!buffer}}% [name] \else - \dododotypebuffer\v!buffer\empty% [] + \buff_verbatim_type_buffer_indeed\v!buffer\empty% [] \fi\fi - \egroup} + \endgroup} -\def\dodotypedefinedbuffer[#1][#2][#3]% category name settings - {\bgroup +\def\buff_verbatim_type_defined_buffer_indeed[#1][#2][#3]% category name settings + {\begingroup \ifthirdargument \setuptyping[#1][#3]% \fi - \dododotypebuffer{#1}{#2}% - \egroup} + \buff_verbatim_type_buffer_indeed{#1}{#2}% + \endgroup} -\def\dododotypebuffer#1#2% category name +\def\buff_verbatim_type_buffer_indeed#1#2% category name {\edef\currenttyping{#1}% \typingparameter\c!before \startpacked[\v!blank] - \dosetuptypelinenumbering - \firststageinitializetyping - \secondstageinitializetyping + \buff_verbatim_setup_line_numbering + \buff_verbatim_initialize_typing_one + \buff_verbatim_initialize_typing_two \beginofverbatimlines \dostarttagged\t!verbatimblock{#1}% \ctxcommand{typebuffer { @@ -732,31 +731,33 @@ \stoppacked \typingparameter\c!after} -% process buffers .. settings +% get : before/after of buffer +% typing : before/after of typing +% process : no before/after (special case anyway) + +% the next one is obsolete (bad name and used nowhere) so if it stays +% the name will change \unexpanded\def\processbuffer - {\dodoubleempty\doprocessbuffer} + {\writestatus{nota bene}{\string\processbuffer\space is obsolete}% + \dodoubleempty\buff_verbatim_process} -\def\doprocessbuffer[#1][#2]% - {\bgroup +\def\buff_verbatim_process[#1][#2]% + {\begingroup \ifsecondargument \setuptyping[\v!buffer][#2]% - \processcommalist[#1]{\dodoprocessbuffer\v!buffer}% [name] [settings] + \processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}% [name] [settings] \else\iffirstargument \doifassignmentelse{#1} {\setuptyping[\v!buffer][#1]% - \dodoprocessbuffer\v!buffer\empty}% [settings] - {\processcommalist[#1]{\dodoprocessbuffer\v!buffer}}% [name] + \buff_verbatim_process_indeed\v!buffer\empty}% [settings] + {\processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}}% [name] \else - \dodoprocessbuffer\v!buffer\empty% [] + \buff_verbatim_process_indeed\v!buffer\empty% [] \fi\fi - \egroup} - -% get : before/after of buffer -% typing : before/after of typing -% process : no before/after (special case anyway) + \endgroup} -\def\dodoprocessbuffer#1#2% +\def\buff_verbatim_process_indeed#1#2% {\edef\currenttyping{#1}% \ctxcommand{processbuffer { name = "#2", @@ -766,21 +767,23 @@ nature = "direct", }}} +% so far for obsolete + % line numbering, keep broken lines together \newcount\nofverbatimlines -\def\doverbatimbeginofline +\unexpanded\def\buff_verbatim_begin_of_line {\ifconditional\verbatimnumberinglines \global\advance\nofverbatimlines\plusone \attribute\verbatimlineattribute\nofverbatimlines \fi \noindent - \doverbatimsetlinemargin + \buff_verbatim_set_line_margin \the\everyline\strut \dostarttagged\t!verbatimline\empty} -\def\doverbatimendofline +\unexpanded\def\buff_verbatim_end_of_line {\dostoptagged \obeyedline % still needed? \par @@ -788,7 +791,7 @@ \attribute\verbatimlineattribute\attributeunsetvalue \fi} -\def\doverbatimemptyline +\unexpanded\def\buff_verbatim_empty_line {\dostoptagged \ifconditional\verbatimnumberinglines \par\strut\par % this will be an option where we use a signal instead of a strut @@ -805,11 +808,11 @@ \def\doinlineverbatimnewline {\obeyedspace} \def\doinlineverbatimemptyline {\obeyedspace} -\def\dodisplayverbatimstart {\doverbatimbeginofline} -\def\dodisplayverbatimstop {\doverbatimendofline} -\def\dodisplayverbatimbeginline {\doverbatimbeginofline} -\def\dodisplayverbatimnewline {\doverbatimendofline\par} -\def\dodisplayverbatimemptyline {\doverbatimemptyline} +\def\dodisplayverbatimstart {\buff_verbatim_begin_of_line} +\def\dodisplayverbatimstop {\buff_verbatim_end_of_line} +\def\dodisplayverbatimbeginline {\buff_verbatim_begin_of_line} +\def\dodisplayverbatimnewline {\buff_verbatim_end_of_line\par} +\def\dodisplayverbatimemptyline {\buff_verbatim_empty_line} \def\doverbatimspace {\obeyedspace} @@ -817,4 +820,21 @@ \loadmarkfile{buff-imp-nested} % preloaded as otherwise spurious spaces inline due to loading \loadmarkfile{buff-imp-escaped} % for completeness +%D To be considered: + +% \installcorenamespace{visualizer} +% +% \installcommandhandler \??visualizer {visualizer} \??visualizer +% +% \appendtoks +% \setuevalue{\currentvisualizer}{\buff_verbatim_visualize{\currentvisualizer}}% +% \to \everydefinevisualizer +% +% \unexpanded\def\buff_verbatim_visualize#1% +% {\bgroup +% \def\currentvisualizer{#1}% +% \usevisualizerstyleandcolor\c!style\c!color +% \let\next} + + \protect \endinput diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index 29930744e..08f1a303f 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -752,11 +752,13 @@ local function action(name,foundname) end local function failure(name) - context.showmessage("colors",5,name) + -- context.showmessage("colors",5,name) + report_colors("unknown: library '%s'",name) end function colors.usecolors(name) commands.uselibrary { + category = "color definition", name = name, patterns = patterns, action = action, diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv index 44016bcc2..522f3fd62 100644 --- a/tex/context/base/colo-ini.mkiv +++ b/tex/context/base/colo-ini.mkiv @@ -194,7 +194,7 @@ \let\setupcolor\usecolors -\installdirectcommandhandler \??color {colors} +\installsetuponlycommandhandler \??color {colors} \let\colo_helpers_show_message\gobblethreearguments diff --git a/tex/context/base/cont-fil.mkiv b/tex/context/base/cont-fil.mkiv index 02288a701..e6d69b939 100644 --- a/tex/context/base/cont-fil.mkiv +++ b/tex/context/base/cont-fil.mkiv @@ -11,6 +11,9 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% todo: use full names and remove calls at the tex end (now integrated in +% lua library code + \writestatus{loading}{ConTeXt File Synonyms} \definefilesynonym [chemics] [chemic] diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index aefba48d3..044be158c 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.01.16 18:33} +\newcontextversion{2012.01.24 11:11} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index cc0142fc7..374cd7393 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.01.16 18:33} +\newcontextversion{2012.01.24 11:11} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new @@ -33,6 +33,8 @@ \definecomplexorsimple\widened +\let\active\activecatcode % for a while (tikz) + % todo % % \def\definelocation{\dodoubleargument\dodefinelocation} diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex dff3babb1..d5684a232 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 67ef67ed4..a796fcf1a 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index ad8f7242b..b4404249b 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.01.16 18:33} +\edef\contextversion{2012.01.24 11:11} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 595d057d6..e441cc3d4 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.01.16 18:33} +\edef\contextversion{2012.01.24 11:11} %D For those who want to use this: @@ -215,7 +215,7 @@ \loadmarkfile{strc-num} \loadmarkfile{strc-mar} \loadmarkfile{strc-sbe} -\loadmarkfile{strc-lst} +\loadmkvifile{strc-lst} \loadmarkfile{strc-sec} \loadmarkfile{strc-pag} % hm, depends on core-num \loadmarkfile{strc-ren} @@ -230,7 +230,6 @@ \loadmarkfile{spac-ver} \loadmarkfile{spac-lin} \loadmarkfile{spac-pag} -\loadmarkfile{spac-fnt} \loadmarkfile{spac-par} %loadmarkfile{spac-adj} % no longer needed \loadmarkfile{spac-def} @@ -407,6 +406,8 @@ \loadmarkfile{chem-ini} \loadmarkfile{chem-str} +\loadmarkfile{typo-scr} + \loadmarkfile{core-fnt} \loadmarkfile{node-rul} \loadmarkfile{node-spl} diff --git a/tex/context/base/core-def.mkiv b/tex/context/base/core-def.mkiv index 03d0ffa74..4f856f996 100644 --- a/tex/context/base/core-def.mkiv +++ b/tex/context/base/core-def.mkiv @@ -49,7 +49,6 @@ \appendtoks \initializepagecounters \to \everyjob \appendtoks \directsetup{*runtime:options} \to \everyjob % we could erase them afterwards % order can change \appendtoks \directsetup{*runtime:modules} \to \everyjob % we could erase them afterwards % order can change -\appendtoks \checkpreprocessor \to \everyjob %appendtoks \page[\v!last] \page \to \everybye % moved to core-job, we need to do this cleaner \appendtoks \ifarrangingpages\poparrangedpages\fi \to \everybye diff --git a/tex/context/base/core-env.mkiv b/tex/context/base/core-env.mkiv index a6e9415a6..cc30cb8e5 100644 --- a/tex/context/base/core-env.mkiv +++ b/tex/context/base/core-env.mkiv @@ -219,6 +219,82 @@ \csname\s!mode\systemmodeprefix#1\endcsname\csname\??modestack\systemmodeprefix#1\endcsname\relax \fi} +%D Here is a relatively new variant of mode checking: +%D +%D \starttyping +%D \enablemode[two] +%D +%D \startmodes +%D [one] {1} +%D [two] {2} +%D [two] {2} +%D [three] {3} +%D [default] {?} +%D \stopmodes +%D +%D \startmodes +%D [one] {1} +%D [three] {3} +%D [default] {?} +%D \stopmodes +%D +%D \startmodes +%D [one] { +%D \input tufte +%D } +%D [two] { +%D \startmodes +%D [one] {1} +%D [two] {2} +%D [two] {2} +%D [three] {3} +%D [default] {?} +%D \stopmodes +%D } +%D [three] { +%D \input zapf +%D } +%D [default] { +%D \input ward +%D } +%D \stopmodes +%D \stoptyping + +\newconditional\c_syst_modes_set_done % conditionals can be pushed/popped + +\unexpanded\def\startmodeset + {\pushmacro\c_syst_modes_set_done + \setfalse\conditionalfalse + \doifnextoptionalelse\syst_modes_set_start\syst_modes_set_quit} + +\def\syst_modes_set_start[#1]% + {\edef\m_mode_case{#1}% + \ifx\m_mode_case\s!default + \ifconditional\c_syst_modes_set_done + \doubleexpandafter\syst_modes_set_quit + \else + \doubleexpandafter\syst_modes_set_yes + \fi + \else + \singleexpandafter\syst_modes_set_check + \fi} + +\def\syst_modes_set_check + {\syst_modes_check\syst_modes_set_yes\syst_modes_set_nop\m_mode_case} + +\def\syst_modes_set_yes#1% + {\settrue\c_syst_modes_set_done + #1% + \doifnextoptionalelse\syst_modes_set_start\syst_modes_set_quit} + +\def\syst_modes_set_nop#1% + {\doifnextoptionalelse\syst_modes_set_start\syst_modes_set_quit} + +\def\syst_modes_set_quit#1\stopmodeset + {\popmacro\c_syst_modes_set_done} + +\let\stopmodeset\relax + %D Lets now set a mode: \enablemode[mkiv] \newsystemmode{mkiv} \setsystemmode{mkiv} diff --git a/tex/context/base/core-fnt.mkiv b/tex/context/base/core-fnt.mkiv index 5f08cf75b..980f1a85c 100644 --- a/tex/context/base/core-fnt.mkiv +++ b/tex/context/base/core-fnt.mkiv @@ -60,7 +60,7 @@ %D %D \showsetup{stretched} -\def\stretched#1% +\unexpanded\def\stretched#1% {\ifvmode\hbox to \hsize\else\ifinner\else\hbox\fi\fi \bgroup\processtokens\relax\hss\relax{\hss\hss}{#1}\egroup} @@ -155,98 +155,4 @@ \fi}% \fi} -%D \macros -%D {low, high, lohi, hilo} -%D -%D Although \TEX\ is pretty well aware of super- and -%D subscripts, its mechanism is mainly tuned for math mode. -%D The next few commands take care of script texts both modes. -%D -%D \startbuffer -%D The higher\high{one goes} the lower\low{one drops}, or\lohi{yes}{no}? -%D \stopbuffer -%D -%D \typebuffer -%D -%D \getbuffer -%D -%D Note the different placement of \type {\lohi}, where we -%D need a bit more space. The implementation looks a bit -%D fuzzy, since some \type {\fontdimen}'s are involved to -%D determine the optimal placement. - -\def\highvfraction {0} -\def\lowvfraction {0} -\def\highlowvfraction{.1} -\def\highlowhfraction{.1} - -\def\dodohighlow - {\ifx\fontsize\empty - \ifmmode - \mr - \else - \tx - \fi - \else - \tx - \fi} - -\def\dohighlow#1#2#3#4#5#6% todo, named fontdimens tag - {\dontleavehmode - \bgroup - \scratchdimen\dimexpr#3ex+#4ex\relax - \kern\highlowhfraction ex - \setbox\scratchbox\hbox{#1\scratchdimen\hbox{\dodohighlow\dostarttagged#5\empty#6\dostoptagged}}% - \ht\scratchbox\strutheight - \dp\scratchbox\strutdepth - \box\scratchbox - \egroup} - -\unexpanded\def\high{\dohighlow\raise\mathsupnormal{.86}\highvfraction\t!sup} -\unexpanded\def\low {\dohighlow\lower\mathsubnormal{.48}\lowvfraction \t!sub} - -\unexpanded\def\lohi - {\dosingleempty\dolohi} - -\unexpanded\def\hilo - {\dosingleempty\dohilo} - -\def\dolohi[#1]#2#3% - {\dontleavehmode - \hbox - {\dostarttagged\t!subsup\empty - \setbox4\hbox{\dohighlow\lower\mathsubnormal{.48}\highlowvfraction\t!sub{#2}}% - \setbox6\hbox{\dohighlow\raise\mathsupnormal{.86}\highlowvfraction\t!sup{#3}}% - \doif{#1}{\v!left} - {\ifdim\wd4<\wd6 - \setbox4\hbox to \wd6{\hss\box4}% - \else - \setbox6\hbox to \wd4{\hss\box6}% - \fi}% - \ifdim\wd4<\wd6 - \wd4=\zeropoint\box4\box6 - \else - \wd6=\zeropoint\box6\box4 - \fi - \dostoptagged}} - -\def\dohilo[#1]#2#3% - {\dolohi[#1]{#3}{#2}} - -%D You can provide an optional keyword \type {left}, in which -%D case the super and subscripts will be aligned in a way that -%D permits placement at the left of a word (which means that -%D it will be right aligned). -%D -%D \startbuffer -%D \lohi{aha}{ah} test \lohi{aha}{ah} test -%D \lohi[left]{aha}{ah} test \lohi[left]{aha}{ah} test -%D \lohi{aha}{ah} test\lohi{aha}{ah} test -%D \lohi[left]{aha}{ah}test \lohi[left]{aha}{ah}test -%D \stopbuffer -%D -%D \typebuffer -%D -%D \getbuffer - \protect \endinput diff --git a/tex/context/base/core-mis.mkiv b/tex/context/base/core-mis.mkiv index 63e91143d..06939ac89 100644 --- a/tex/context/base/core-mis.mkiv +++ b/tex/context/base/core-mis.mkiv @@ -155,10 +155,7 @@ \setlocalhsize \hsize\localhsize \dontcomplain - %\doifundefined{doitems\@@islocation}% - % {\let\@@islocation\v!left}% - %\getvalue{doitems\@@islocation}} - \executeifdefined{doitems\@@islocation}{\let\@@islocation\v!left}} + \executeifdefined{doitems\@@islocation}{\getvalue{doitems\v!left}}} \definecomplexorsimpleempty\items diff --git a/tex/context/base/file-lib.lua b/tex/context/base/file-lib.lua index 03ae0dfb7..92dacbf5c 100644 --- a/tex/context/base/file-lib.lua +++ b/tex/context/base/file-lib.lua @@ -6,6 +6,9 @@ if not modules then modules = { } end modules ['file-lib'] = { license = "see context related readme files" } +-- todo: check all usage of truefilename at the tex end and remove +-- files there (and replace definitions by full names) + local format = string.format local trace_files = false trackers.register("resolvers.readfile", function(v) trace_files = v end) @@ -39,6 +42,9 @@ function commands.uselibrary(specification) -- todo; reporter end for i=1,#patterns do local somename = format(patterns[i],filename) +if environment.truefilename then + somename = environment.truefilename(somename) +end local foundname = resolvers.getreadfilename("any",".",somename) or "" if foundname ~= "" then action(name,foundname) diff --git a/tex/context/base/file-mod.lua b/tex/context/base/file-mod.lua index 2dce38bad..75e898f4b 100644 --- a/tex/context/base/file-mod.lua +++ b/tex/context/base/file-mod.lua @@ -68,7 +68,7 @@ local function usemodule(name,hasscheme) end context.startreadingfile() resolvers.jobs.usefile(foundname,true) -- once, notext ---~ context.input(foundname) + -- context.input(foundname) context.stopreadingfile() return true else @@ -77,6 +77,7 @@ local function usemodule(name,hasscheme) end function commands.usemodules(prefix,askedname,truename) + local truename = truename or environment.truefilename(askedname) local hasprefix = prefix and prefix ~= "" local hashname = ((hasprefix and prefix) or "*") .. "-" .. truename local status = modstatus[hashname] diff --git a/tex/context/base/file-mod.mkvi b/tex/context/base/file-mod.mkvi index a3a2194d7..e740a5631 100644 --- a/tex/context/base/file-mod.mkvi +++ b/tex/context/base/file-mod.mkvi @@ -31,74 +31,130 @@ %D their dedicated manuals. We use \type {\next} so that we %D can \type {\end} in modules. -\def\dodousemodules#category#name% - {\ctxcommand{usemodules("#category","#name","\truefilename{#name}")}} - \def\usemodules - {\dotripleempty\dousemodules} + {\dotripleempty\strc_modules_use} \let\usemodule\usemodules -\def\dousemodules[#category][#name][#parameters]% +% \def\strc_modules_use[#category][#name][#parameters]% +% {\pushmacro\currentmodule +% \pushmacro\currentmoduleparameters +% \let\currentmoduleparameters\empty +% \ifthirdargument +% \singleexpandafter\strc_modules_use_a +% \else\ifsecondargument +% \doubleexpandafter\strc_modules_use_b +% \else +% \doubleexpandafter\strc_modules_use_c +% \fi\fi +% % here we load +% \popmacro\currentmoduleparameters +% \popmacro\currentmodule} +% +% \def\strc_modules_use_a[#category][#name][#parameters]% +% {\doifsomething{#name} +% {\def\currentmoduleparameters{#parameters}% +% \processcommalist[#name]{\strc_modules_use_indeed{#category}}}} +% +% \def\strc_modules_use_b[#category][#name][#parameters]% +% {\doifsomething{#name} +% {\doifassignmentelse{#name} +% {\def\currentmoduleparameters{#name}% +% \processcommalist[#category]{\strc_modules_use_indeed\empty}} +% {\processcommalist[#name]{\strc_modules_use_indeed{#category}}}}} +% +% \def\strc_modules_use_c[#category][#name][#parameters]% +% {\processcommalist[#category]{\strc_modules_use_indeed\empty}} +% +% \def\strc_modules_use_indeed#category#name% +% {\ctxcommand{usemodules("#category","#name","\truefilename{#name}")}} + +\def\strc_modules_use[#category][#name][#parameters]% category=t|m|x|p|... {\pushmacro\currentmodule + \pushmacro\currentmodulecategory \pushmacro\currentmoduleparameters - \let\currentmoduleparameters\empty \ifthirdargument - \doifelsenothing{#name} - {\let\next\relax} - {\def\currentmoduleparameters{#parameters}% - \def\next{\processcommalist[#name]{\dodousemodules{#category}}}}% + \def\currentmodulecategory {#category}% + \def\currentmodule {#name}% + \def\currentmoduleparameters{#parameters}% \else\ifsecondargument - \doifelsenothing{#name} - {\let\next\relax} - {\doifassignmentelse{#name} - {\def\currentmoduleparameters{#name}% - \def\next{\processcommalist[#category]{\dodousemodules{}}}} - {\def\next{\processcommalist[#name]{\dodousemodules{#category}}}}}% + \doifassignmentelse{#name} + {\let\currentmodulecategory \empty + \def\currentmodule {#category}% + \def\currentmoduleparameters{#name}} + {\def\currentmodulecategory {#category}% + \def\currentmodule {#name}% + \let\currentmoduleparameters\empty}% \else - \def\next{\processcommalist[#category]{\dodousemodules{}}}% + \let\currentmodulecategory \empty + \def\currentmodule {#category}% + \let\currentmoduleparameters\empty \fi\fi - \next + \processcommacommand[\currentmodule]{\strc_modules_use_indeed\currentmodulecategory}% \popmacro\currentmoduleparameters + \popmacro\currentmodulecategory \popmacro\currentmodule} +\def\strc_modules_use_indeed#category#name% truefilename moved to lua end + {\ctxcommand{usemodules("#category","#name")}} % ,"\truefilename{#name}")}} + +\installcorenamespace{module} + \let\currentmoduleparameters\empty \let\currentmodule \s!unknown \unexpanded\def\startmodule - {\doifnextoptionalelse\dostartmodule\nostartmodule} + {\doifnextoptionalelse\syst_modules_start_yes\syst_modules_start_nop} -\def\nostartmodule #name % - {\dostartmodule[#name]} - -\def\dostartmodule[#name]% +\def\syst_modules_start_yes[#name]% {\pushmacro\currentmodule \pushmacro\currentmoduleparameters \def\currentmodule{#name}} +\def\syst_modules_start_nop#name % + {\syst_modules_start_yes[#name]} + \unexpanded\def\stopmodule {\popmacro\currentmoduleparameters \popmacro\currentmodule} \unexpanded\def\setupmodule - {\dodoubleempty\dosetupmodule} + {\dodoubleempty\syst_modules_setup} -\def\dosetupmodule[#name][#parameters]% +\def\syst_modules_setup[#name][#parameters]% {\scratchtoks\expandafter{\currentmoduleparameters}% \ifsecondargument - \getparameters[\??md:#name:][#parameters]% - \expanded{\getparameters[\??md:#name:][\the\scratchtoks]}% + \getparameters[\??module#name:][#parameters]% internal (defaults) + \normalexpanded{\getparameters[\??module#name:][\the\scratchtoks]}% loadtime (user) \else - \getparameters[\??md:\currentmodule:][#name]% - \expanded{\getparameters[\??md:\currentmodule:][\the\scratchtoks]}% + \getparameters[\??module\currentmodule:][#name]% internal (defaults) + \normalexpanded{\getparameters[\??module\currentmodule:][\the\scratchtoks]}% loadtime (user) \fi \let\currentmoduleparameters\empty} -\def\moduleparameter #name#parameter{\executeifdefined{\??md:#name:#parameter}{}} -\def\currentmoduleparameter #parameter{\executeifdefined{\??md:\currentmodule:#parameter}{}} +% to be tested: +% +% \def\syst_modules_setup[#name][#parameters]% +% {\ifsecondargument +% \getparameters[\??module#name:][#parameters]% internal (defaults) +% \normalexpanded{\getparameters[\??module#name:][\normalunexpanded\expandafter{\currentmoduleparameters}]}% loadtime (user) +% \else +% \getparameters[\??module\currentmodule:][#name]% internal (defaults) +% \normalexpanded{\getparameters[\??module\currentmodule:][\normalunexpanded\expandafter{\currentmoduleparameters}]}% loadtime (user) +% \fi +% \let\currentmoduleparameters\empty} + +\def\moduleparameter#name#parameter% + {\csname\??module + \ifcsname\??module#name:#parameter\endcsname#name:#parameter\fi + \endcsname} -\def\useluamodule [#name]{\ctxlua{dofile(resolvers.findctxfile("#name"))}} -\def\luaenvironment #name {\ctxlua{dofile(resolvers.findctxfile("#name"))}} +\letvalue\??module\empty % so we default to empty as with all parameters + +\def\currentmoduleparameter{\moduleparameter\currentmodule} % no need for inlining + +\unexpanded\def\useluamodule [#name]{\ctxlua{dofile(resolvers.findctxfile("#name"))}} +\unexpanded\def\luaenvironment #name {\ctxlua{dofile(resolvers.findctxfile("#name"))}} % \usemodule[newmml] % \usemodule[newmml][a=b] @@ -119,44 +175,48 @@ % % however, a better way is: -\let\stopmoduletestsection\donothing - \unexpanded\def\startmoduletestsection - {\bgroup + {\begingroup \setupmodule % we need to make sure that the vars are set \doifelse{\currentmoduleparameter\v!test}\v!yes - {\egroup - \writestatus{\currentmodule}{loading experimental code}} - {\egroup - \writestatus{\currentmodule}{skipping experimental code}% + {\endgroup + \writestatus\currentmodule{loading experimental code}} + {\endgroup + \writestatus\currentmodule{skipping experimental code}% \gobbleuntil\stopmoduletestsection}} +\let\stopmoduletestsection\donothing + % will become file-run -%D To save memory, we implement some seldomly used commands -%D in a lazy way. Nota bene: such runtime definitions are -%D global. +%D To save memory, we implement some seldomly used commands in a lazy way. Nota +%D bene: such runtime definitions are to be defined global. %D %D \starttyping %D \fetchruntimecommand\showaccents{\f!colorprefix ...} %D \stoptyping -\def\fetchruntimecommand#1#2% - {\def#1{\dofetchruntimecommand#1{#2}}} - -\def\dofetchruntimecommand#1#2% - {\doifnotflagged{#2} - {\let#1\undefined - \startreadingfile - \startnointerference % \bgroup - \cleanupfeatures % better \setnormalcatcodes / test first - \readfile{#2.\mksuffix}\donothing\donothing - \stopnointerference % \egroup - \stopreadingfile - \doglobal\setflag{#2}}% +\installcorenamespace{runtimeloaded} + +\unexpanded\def\fetchruntimecommand#1#2% + {\unexpanded\def#1{\dofetchruntimecommand#1{#2}}} + +\def\dofetchruntimecommand#1#2% actually a test on #1 being define would be ok as well + {\ifcsname\??runtimeloaded#2\endcsname + % already loaded + \else + \global\let#1\undefined + \startreadingfile + \startnointerference % \bgroup + \cleanupfeatures % better \setnormalcatcodes / test first + \readfile{#2.\mksuffix}\donothing\donothing + \stopnointerference % \egroup + \stopreadingfile + \setgvalue{\??runtimeloaded#2}\empty + \fi \ifx#1\undefined \writestatus\m!system{command \string#1 not found in file #2}% - \gdef#1{{\infofont[unknown command \string#1]}}% + \unexpanded\gdef#1{{\infofont[unknown command \string#1]}}% \fi #1} @@ -174,21 +234,17 @@ %D %D The version pattern is \type {yyyy.mm.dd} (with mm and dd being optional). -\def\doifolderversionelse#parent#child{\ctxcommand{doifolderversionelse("#parent","#child")}} -\def\doifoldercontextelse #child{\ctxcommand{doifolderversionelse("#child")}} - -%D Experimental: +\unexpanded\def\doifolderversionelse#parent#child{\ctxcommand{doifolderversionelse("#parent","#child")}} +\unexpanded\def\doifoldercontextelse #child{\ctxcommand{doifolderversionelse("#child")}} -\let\checkpreprocessor\relax - -%D To be documented and probably moved - -\def\documentresources{\@@erurl} - -\unexpanded\def\setupexternalresources - {\dodoubleargument\getparameters[\??er]} - -\setupexternalresources - [url=] +% obsolete +% +% \def\documentresources{\@@erurl} +% +% \unexpanded\def\setupexternalresources +% {\dodoubleargument\getparameters[\??er]} +% +% \setupexternalresources +% [url=] \protect \endinput diff --git a/tex/context/base/file-syn.lua b/tex/context/base/file-syn.lua index df431f49b..bf7ef1dbd 100644 --- a/tex/context/base/file-syn.lua +++ b/tex/context/base/file-syn.lua @@ -22,6 +22,8 @@ local function truefilename(name) end end +environment.truefilename = truefilename + function commands.truefilename(name) context(truefilename(name)) end diff --git a/tex/context/base/font-con.lua b/tex/context/base/font-con.lua index 42ac8c298..9329fbb83 100644 --- a/tex/context/base/font-con.lua +++ b/tex/context/base/font-con.lua @@ -89,7 +89,7 @@ constructors.keys = { finalized = "boolean", }, parameters = { - mathsize = "scaledpoints", + mathsize = "number", scriptpercentage = "float", scriptscriptpercentage = "float", units = "cardinal", diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 2684c4851..8031299f4 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -22,11 +22,12 @@ local round = math.round local P, S, C, Cc, Cf, Cg, Ct, lpegmatch = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Ct, lpeg.match -local trace_features = false trackers.register("fonts.features", function(v) trace_features = v end) -local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local trace_usage = false trackers.register("fonts.usage", function(v) trace_usage = v end) -local trace_mapfiles = false trackers.register("fonts.mapfiles", function(v) trace_mapfiles = v end) -local trace_automode = false trackers.register("fonts.automode", function(v) trace_automode = v end) +local trace_features = false trackers.register("fonts.features", function(v) trace_features = v end) +local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) +local trace_designsize = false trackers.register("fonts.designsize", function(v) trace_designsize = v end) +local trace_usage = false trackers.register("fonts.usage", function(v) trace_usage = v end) +local trace_mapfiles = false trackers.register("fonts.mapfiles", function(v) trace_mapfiles = v end) +local trace_automode = false trackers.register("fonts.automode", function(v) trace_automode = v end) local report_features = logs.reporter("fonts","features") local report_defining = logs.reporter("fonts","defining") @@ -43,12 +44,15 @@ local definers = fonts.definers local specifiers = fonts.specifiers local constructors = fonts.constructors local loggers = fonts.loggers +local fontgoodies = fonts.goodies local helpers = fonts.helpers local hashes = fonts.hashes local fontdata = hashes.identifiers local currentfont = font.current local texattribute = tex.attribute +local designsizefilename = fontgoodies.designsizes.filename + local otffeatures = fonts.constructors.newfeatures("otf") local registerotffeature = otffeatures.register local baseprocessors = otffeatures.processors.base @@ -119,7 +123,7 @@ local descriptions = allocate() local parameters = allocate() local properties = allocate() local resources = allocate() -local quaddata = allocate() +local quaddata = allocate() -- maybe also spacedata local markdata = allocate() local xheightdata = allocate() local csnames = allocate() -- namedata @@ -826,14 +830,34 @@ local n = 0 -- we can also move rscale to here (more consistent) -- the argument list will become a table +local function nice_cs(cs) + return (gsub(cs,".->", "")) +end + function commands.definefont_two(global,cs,str,size,inheritancemode,classfeatures,fontfeatures,classfallbacks,fontfallbacks, - mathsize,textsize,relativeid,classgoodies,goodies) + mathsize,textsize,relativeid,classgoodies,goodies,classdesignsize,fontdesignsize) if trace_defining then report_defining("start stage two: %s (%s)",str,size) end -- name is now resolved and size is scaled cf sa/mo local lookup, name, sub, method, detail = getspecification(str or "") - -- asome settings can be overloaded + -- new (todo: inheritancemode) + local designsize = fontdesignsize ~= "" and fontdesignsize or classdesignsize or "" + if designsize == "auto" or designsize == "default" then -- or any value + local okay = designsizefilename(name,size) + -- we don't catch detail here + if trace_defining or trace_designsize then + report_defining("remapping name: %s + size: %s => designsize: %s",name,size,okay) + end + local o_lookup, o_name, o_sub, o_method, o_detail = getspecification(okay) + if o_lookup and o_lookup ~= "" then lookup = o_lookup end + if o_method and o_method ~= "" then method = o_method end + if o_detail and o_detail ~= "" then detail = o_detail end + name = o_name + sub = o_sub + end + -- so far + -- some settings can have been overloaded if lookup and lookup ~= "" then specification.lookup = lookup end @@ -841,14 +865,14 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature local id = tonumber(relativeid) or 0 specification.relativeid = id > 0 and id end - specification.name = name - specification.size = size - specification.sub = (sub and sub ~= "" and sub) or specification.sub - specification.mathsize = mathsize - specification.textsize = textsize - specification.goodies = goodies - specification.cs = cs - specification.global = global + specification.name = name + specification.size = size + specification.sub = (sub and sub ~= "" and sub) or specification.sub + specification.mathsize = mathsize + specification.textsize = textsize + specification.goodies = goodies + specification.cs = cs + specification.global = global if detail and detail ~= "" then specification.method = method or "*" specification.detail = detail @@ -903,17 +927,15 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature specification.fallbacks = fontfallbacks end end ---~ report_defining("SIZE %s %s",size,specification.size) local tfmdata = definers.read(specification,size) -- id not yet known (size in spec?) ---~ report_defining("HASH AFTER %s",specification.size) if not tfmdata then - report_defining("unable to define %s as \\%s",name,cs) + report_defining("unable to define %s as [%s]",name,nice_cs(cs)) texsetcount("global","lastfontid",-1) context.letvaluerelax(cs) -- otherwise the current definition takes the previous one elseif type(tfmdata) == "number" then if trace_defining then - report_defining("reusing %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s, goodies: %s/%s)", - name,tfmdata,cs,classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies) + report_defining("reusing %s with id %s as [%s] (features: %s/%s, fallbacks: %s/%s, goodies: %s/%s, designsize: %s/%s)", + name,tfmdata,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies,classdesignsize,fontdesignsize) end csnames[tfmdata] = specification.cs tex.definefont(global,cs,tfmdata) @@ -939,7 +961,8 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature constructors.cleanuptable(tfmdata) constructors.finalize(tfmdata) if trace_defining then - report_defining("defining %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s)",name,id,cs,classfeatures,fontfeatures,classfallbacks,fontfallbacks) + report_defining("defining %s with id %s as [%s] (features: %s/%s, fallbacks: %s/%s)", + name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks) end -- resolved (when designsize is used): setsomefontsize((tfmdata.parameters.size or 655360) .. "sp") diff --git a/tex/context/base/font-fil.mkvi b/tex/context/base/font-fil.mkvi index 8a9fb53cf..6548c87d8 100644 --- a/tex/context/base/font-fil.mkvi +++ b/tex/context/base/font-fil.mkvi @@ -96,15 +96,17 @@ \doifnextoptionalelse\font_basics_define_font_synonym_yes_opt\font_basics_define_font_synonym_yes_nil} \def\font_basics_define_font_synonym_nop_opt[#specification]% - {\let\p_features \undefined - \let\p_fallbacks\undefined - \let\p_goodies \undefined + {\let\p_features \undefined + \let\p_fallbacks \undefined + \let\p_goodies \undefined + \let\p_designsize\undefined \expandafter\font_basics_get_font_parameter_nop#specification,]=,} \def\font_basics_define_font_synonym_yes_opt[#specification]% - {\let\p_features \undefined - \let\p_fallbacks\undefined - \let\p_goodies \undefined + {\let\p_features \undefined + \let\p_fallbacks \undefined + \let\p_goodies \undefined + \let\p_designsize\undefined \expandafter\font_basics_get_font_parameter_yes#specification,]=,} \def\font_basics_get_font_parameter_nop#key=#value,% @@ -137,24 +139,28 @@ % we could collect them in one macro (but no expansion) \def\font_basics_define_font_synonym_nop_nil - {\expandafter\let\csname\??fontfile\m_font_name\s!features \endcsname\undefined - \expandafter\let\csname\??fontfile\m_font_name\s!fallbacks\endcsname\undefined - \expandafter\let\csname\??fontfile\m_font_name\s!goodies \endcsname\undefined} + {\expandafter\let\csname\??fontfile\m_font_name\s!features \endcsname\undefined + \expandafter\let\csname\??fontfile\m_font_name\s!fallbacks \endcsname\undefined + \expandafter\let\csname\??fontfile\m_font_name\s!goodies \endcsname\undefined + \expandafter\let\csname\??fontfile\m_font_name\s!designsize\endcsname\undefined} \def\font_basics_define_font_synonym_yes_nil - {\global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!features \endcsname\undefined - \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!fallbacks\endcsname\undefined - \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\undefined} + {\global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!features \endcsname\undefined + \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!fallbacks \endcsname\undefined + \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\undefined + \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!designsize\endcsname\undefined} \def\font_basics_get_font_parameter_nop_finish - {\expandafter\let\csname\??fontfile\m_font_name\s!features \endcsname\p_features - \expandafter\let\csname\??fontfile\m_font_name\s!fallbacks\endcsname\p_fallbacks - \expandafter\let\csname\??fontfile\m_font_name\s!goodies \endcsname\p_goodies} + {\expandafter\let\csname\??fontfile\m_font_name\s!features \endcsname\p_features + \expandafter\let\csname\??fontfile\m_font_name\s!fallbacks \endcsname\p_fallbacks + \expandafter\let\csname\??fontfile\m_font_name\s!goodies \endcsname\p_goodies + \expandafter\let\csname\??fontfile\m_font_name\s!designsize\endcsname\p_designsize} \def\font_basics_get_font_parameter_yes_finish - {\global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!features \endcsname\p_features - \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!fallbacks\endcsname\p_fallbacks - \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\p_goodies} + {\global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!features \endcsname\p_features + \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!fallbacks \endcsname\p_fallbacks + \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\p_goodies + \global\expandafter\let\csname\??fontfile\fontclass\m_font_name\s!designsize\endcsname\p_designsize} %\definefontsynonym [KopFont] [\fontclassname{officina}{SerifBold}] % @@ -275,10 +281,11 @@ % without pre-expansion. \def\font_helpers_update_font_class_parameters - {\edef\m_font_class_direction{\ifcsname\??fontclass\fontclass\fontstyle\s!direction\endcsname\csname\??fontclass\fontclass\fontstyle\s!direction\endcsname\fi}% - \edef\m_font_class_features {\ifcsname\??fontclass\fontclass\fontstyle\s!features \endcsname\csname\??fontclass\fontclass\fontstyle\s!features \endcsname\fi}% - \edef\m_font_class_fallbacks{\ifcsname\??fontclass\fontclass\fontstyle\s!fallbacks\endcsname\csname\??fontclass\fontclass\fontstyle\s!fallbacks\endcsname\fi}% - \edef\m_font_class_goodies {\ifcsname\??fontclass\fontclass\fontstyle\s!goodies \endcsname\csname\??fontclass\fontclass\fontstyle\s!goodies \endcsname\fi}} + {\edef\m_font_class_direction {\ifcsname\??fontclass\fontclass\fontstyle\s!direction \endcsname\csname\??fontclass\fontclass\fontstyle\s!direction \endcsname\fi}% + \edef\m_font_class_features {\ifcsname\??fontclass\fontclass\fontstyle\s!features \endcsname\csname\??fontclass\fontclass\fontstyle\s!features \endcsname\fi}% + \edef\m_font_class_fallbacks {\ifcsname\??fontclass\fontclass\fontstyle\s!fallbacks \endcsname\csname\??fontclass\fontclass\fontstyle\s!fallbacks \endcsname\fi}% + \edef\m_font_class_goodies {\ifcsname\??fontclass\fontclass\fontstyle\s!goodies \endcsname\csname\??fontclass\fontclass\fontstyle\s!goodies \endcsname\fi}% + \edef\m_font_class_designsize{\ifcsname\??fontclass\fontclass\fontstyle\s!designsize\endcsname\csname\??fontclass\fontclass\fontstyle\s!designsize\endcsname\fi}} % resolve @@ -315,6 +322,17 @@ \csname\??fontfile #name\endcsname\else \let\m_font_goodies\empty\fi\fi\fi\fi} +\def\font_helpers_set_designsize_yes#name% + {\ifcsname\??fontfile\fontclass#name\s!designsize\endcsname\expandafter\let\expandafter\m_font_designsize + \csname\??fontfile\fontclass#name\s!designsize\endcsname\else + \ifcsname\??fontfile #name\s!designsize\endcsname\expandafter\let\expandafter\m_font_designsize + \csname\??fontfile #name\s!designsize\endcsname\else + \ifcsname\??fontfile\fontclass #name\endcsname\expandafter\font_helpers_set_designsize_yes + \csname\??fontfile\fontclass #name\endcsname\else + \ifcsname\??fontfile #name\endcsname\expandafter\font_helpers_set_designsize_yes + \csname\??fontfile #name\endcsname\else + \let\m_font_designsize\empty\fi\fi\fi\fi} + \def\font_helpers_set_features_nop#name% {\ifcsname\??fontfile#name\s!features \endcsname\expandafter\let\expandafter\m_font_features \csname\??fontfile#name\s!features \endcsname\else @@ -336,27 +354,38 @@ \csname\??fontfile #name\endcsname\else \let\m_font_goodies\empty\fi\fi} +\def\font_helpers_set_designsize_nop#name% + {\ifcsname\??fontfile#name\s!designsize\endcsname\expandafter\let\expandafter\m_font_designsize + \csname\??fontfile#name\s!designsize\endcsname\else + \ifcsname\??fontfile #name\endcsname\expandafter\font_helpers_set_designsize_nop + \csname\??fontfile #name\endcsname\else + \let\m_font_designsize\empty\fi\fi} + \def\font_helpers_update_font_parameters_yes - {\font_helpers_set_features_yes \somefontname - \font_helpers_set_fallbacks_yes\somefontname - \font_helpers_set_goodies_yes \somefontname} + {\font_helpers_set_features_yes \somefontname + \font_helpers_set_fallbacks_yes \somefontname + \font_helpers_set_goodies_yes \somefontname + \font_helpers_set_designsize_yes\somefontname} \def\font_helpers_update_font_parameters_nop - {\font_helpers_set_features_nop \somefontname - \font_helpers_set_fallbacks_nop\somefontname - \font_helpers_set_goodies_nop \somefontname} + {\font_helpers_set_features_nop \somefontname + \font_helpers_set_fallbacks_nop \somefontname + \font_helpers_set_goodies_nop \somefontname + \font_helpers_set_designsize_nop\somefontname} \def\font_helpers_update_font_parameters {\ifx\fontclass\empty\font_helpers_update_font_parameters_nop\else\font_helpers_update_font_parameters_yes\fi} \installcorenamespace{fontclass} -\unexpanded\def\savefontclassparameters#style#rscale#features#fallbacks#goodies#direction% - {\setxvalue{\??fontclass\fontclass#style\s!rscale }{#rscale}% - \setxvalue{\??fontclass\fontclass#style\s!features }{#features}% - \setxvalue{\??fontclass\fontclass#style\s!fallbacks}{#fallbacks}% - \setxvalue{\??fontclass\fontclass#style\s!goodies }{#goodies}% - \setxvalue{\??fontclass\fontclass#style\s!direction}{#direction}} +% we can pack them +\unexpanded\def\savefontclassparameters#style#rscale#features#fallbacks#goodies#designsize#direction% + {\setxvalue{\??fontclass\fontclass#style\s!rscale }{#rscale}% + \setxvalue{\??fontclass\fontclass#style\s!features }{#features}% + \setxvalue{\??fontclass\fontclass#style\s!fallbacks }{#fallbacks}% + \setxvalue{\??fontclass\fontclass#style\s!goodies }{#goodies}% + \setxvalue{\??fontclass\fontclass#style\s!designsize}{#designsize}% + \setxvalue{\??fontclass\fontclass#style\s!direction }{#direction}} \protect \endinput diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua index e87be1850..03eb20705 100644 --- a/tex/context/base/font-gds.lua +++ b/tex/context/base/font-gds.lua @@ -9,7 +9,8 @@ if not modules then modules = { } end modules ['font-gds'] = { -- depends on ctx local type, next = type, next -local gmatch, format = string.gmatch, string.format +local gmatch, format, lower = string.gmatch, string.format, string.lower +local texsp = tex.sp local fonts, nodes, attributes, node = fonts, nodes, attributes, node @@ -575,6 +576,69 @@ end fontgoodies.register("compositions", initialize) +local designsizes = { } +fontgoodies.designsizes = designsizes +local designdata = allocate() +designsizes.data = designdata + +local function initialize(goodies) + local gd = goodies.designsizes + if gd then + for name, data in next, gd do + local ranges = { } + for size, file in next, data do + if size ~= "default" then + ranges[#ranges+1] = { texsp(size), file } -- also lower(file) + end + end + table.sort(ranges,function(a,b) return a[1] < b[1] end) + designdata[lower(name)] = { -- overloads, doesn't merge! + default = data.default, + ranges = ranges, + } + end + end +end + +fontgoodies.register("designsizes", initialize) + +function fontgoodies.designsizes.register(name,size,specification) + local d = designdata[name] + if not d then + d = { + ranges = { }, + default = nil, -- so we have no default set + } + designdata[name] = d + end + if size == "default" then + d.default = specification + else + if type(size) == "string" then + size = texsp(size) + end + local ranges = d.ranges + ranges[#ranges+1] = { size, specification } + end +end + +function fontgoodies.designsizes.filename(name,size) + local data = designdata[lower(name)] + if data then + local ranges = data.ranges + if ranges and size ~= "default" then + for i=1,#ranges do + local r = ranges[i] + if r[1] >= size then -- todo: rounding so maybe size - 100 + return r[2] + end + end + end + return data.default or (ranges and ranges[#ranges][2]) or name + end + return name +end + -- The following file (husayni.lfg) is the experimental setup that we used -- for Idris font. For the moment we don't store this in the cache and quite -- probably these files sit in one of the paths: diff --git a/tex/context/base/font-ini.mkvi b/tex/context/base/font-ini.mkvi index aea095823..7351e7134 100644 --- a/tex/context/base/font-ini.mkvi +++ b/tex/context/base/font-ini.mkvi @@ -16,6 +16,8 @@ % todo: check where more class usage % todo: split font-nam (style/alternative/size) % todo: split font-dim (scales etc) +% todo: reconsider defaultfontclass +% %D Watch out: as we define inside macros in sometimes special ways, %D an occasional \type {\normaldef} is used in order to please the @@ -376,22 +378,8 @@ %D \macros{startfont} -\unexpanded\def\startfont - {\begingroup\definedfont} - -\unexpanded\def\stopfont - {\endgroup} - -%D \macros{doiffontcharelse} - -\unexpanded\def\doiffontcharelse#specification#unicode% this could be a direct lua call - {\begingroup - \font_basics_define_font_without_parameters{thedefinedfont}{#specification}% - \iffontchar\font#unicode\relax - \endgroup\expandafter\firstoftwoarguments - \else - \endgroup\expandafter\secondoftwoarguments - \fi} +\unexpanded\def\startfont{\begingroup\definedfont} +\unexpanded\def\stopfont {\endgroup} %D \macros %D {everybodyfont,Everybodyfont,everyglobalbodyfont} @@ -519,33 +507,29 @@ \installcorenamespace{fontclassnop} % nofontclass \def\font_helpers_process_relative_size_list#command% could be a toks - {#command\s!text - #command\s!script - #command\s!scriptscript - #command\s!x - #command\s!xx - #command\v!big + {#command\v!big #command\v!small} \let\v_font_size_relative \plusone \def\v_font_size_absolute {\fontbody} -\let\v_font_rscale_default\plusone +\let\v_font_rscale_default\!!plusone \let\p_font_rscale \v_font_rscale_default \def\font_helpers_check_relative_font_id % can be plugged in later {\let\p_font_rscale\minusone \let\p_font_rscale\v_font_rscale_default} -\def\font_helpers_check_relative_font_size#scale% +\def\font_helpers_check_relative_font_size#style% {\edef\p_font_rscale - {\ifcsname\??fontclass\fontclass#scale\s!rscale\endcsname - \csname\??fontclass\fontclass#scale\s!rscale\endcsname - \else\ifcsname\??fontclass\defaultfontclass#scale\s!rscale\endcsname - \csname\??fontclass\defaultfontclass#scale\s!rscale\endcsname + {\ifcsname\??fontclass\fontclass#style\s!rscale\endcsname + \csname\??fontclass\fontclass#style\s!rscale\endcsname + \else\ifcsname\??fontclass\defaultfontclass#style\s!rscale\endcsname % brr + \csname\??fontclass\defaultfontclass#style\s!rscale\endcsname \else \v_font_rscale_default \fi\fi}% + % move elsewhere \ifx\p_font_rscale\v!auto \let\p_font_rscale\plusone \font_helpers_check_relative_font_id @@ -553,6 +537,20 @@ \let\relativefontid\minusone \fi} +\def\font_rscale_xx#style% + {\ifcsname\??fontclass\fontclass#style\s!rscale\endcsname + \csname\??fontclass\fontclass#style\s!rscale\endcsname + \else + \v_font_rscale_default + \fi} + +\def\font_rscale_mm + {\ifcsname\??fontclass\fontclass\s!mm\s!rscale\endcsname + \csname\??fontclass\fontclass\s!mm\s!rscale\endcsname + \else + \v_font_rscale_default + \fi} + \def\font_helpers_register_fontbody#body% {\expandafter\let\csname\??fontbodyknown#body\endcsname\empty} @@ -580,9 +578,9 @@ \newtoks\t_font_size_commands \newtoks\t_font_alternative_commands -\let\m_font_style_command \gobbleoneargument -\let\m_font_size_command \gobbleoneargument -\let\m_font_alternative_command\gobbleoneargument +\setnewmacro\m_font_style_command \gobbleoneargument +\setnewmacro\m_font_size_command \gobbleoneargument +\setnewmacro\m_font_alternative_command\gobbleoneargument \def\font_helpers_process_style_list #command{\def\m_font_style_command {#command}\the\t_font_style_commands} \def\font_helpers_process_size_list #command{\def\m_font_size_command {#command}\the\t_font_size_commands} @@ -632,11 +630,19 @@ \def\font_helpers_check_fontname_combinations_indeed_s_a#style#alternative% {\font_helpers_process_size_list{\font_basics_check_fontname_combination{#style}{#alternative}}} +\definefontstyle [\s!mm] [\s!mm] +\definefontstyle [\s!rm] [\s!rm] +\definefontstyle [\s!ss] [\s!ss] +\definefontstyle [\s!tt] [\s!tt] + %D We define all the font switching commands globally. After all they are part %D of the formal font interface once defined. The size can be empty (so %D checking is needed as \type {\bf} is already defined) -\let\m_font_mm\empty +%D The \type {\normal..} variants are available as extras for cases where +%D the \type {..} is overloaded. + +\newmacro\m_font_mm \def\font_basics_check_fontname_combination#style% alternative size {\edef\m_font_mm{#style}% @@ -646,9 +652,12 @@ \expandafter\font_basics_check_text_bodyfont \fi{#style}} % no \m_font_mm, not expanded later on +% \def\font_basics_check_math_bodyfont#style#alternative#size% +% {%setugvalue{#alternative}{\font_helpers_set_current_font_alternative{#alternative}}% \mr \mb +% \setugvalue{#style}{\font_helpers_set_current_font_style{#style}}}% \mm + \def\font_basics_check_math_bodyfont#style#alternative#size% - {%setugvalue{#alternative}{\font_helpers_set_current_font_alternative{#alternative}}% \mr \mb - \setugvalue{#style}{\font_helpers_set_current_font_style{#style}}}% \mm + {} \def\font_basics_check_text_bodyfont#style#alternative#size% size can be empty (checking needed as \bf is already defined) {\setugvalue{#style#size}{\font_helpers_set_current_font_style_size{#style}{#size}}% \rma @@ -713,7 +722,7 @@ \newcount\lastfontid % also used at the lua end / tex end \newtoks \everydefinefont -\let\relativefontid\empty +\let\relativefontid\minusone % todo, not yet used \let\c_font_feature_inheritance_fontnone \zerocount % none \let\c_font_feature_inheritance_fontonly \plusone % fontonly @@ -725,13 +734,28 @@ \setnewconstant\c_font_feature_inheritance_mode \c_font_feature_inheritance_default -\newdimen\d_font_scaled_text_face -\newdimen\d_font_scaled_font_size +\newdimen \d_font_scaled_text_face +\newdimen \d_font_scaled_font_size +\newconditional\c_font_body_scale +\newfraction \f_font_body_scale \unexpanded\def\font_helpers_low_level_define#specification#csname% {% we can now set more at the lua end \ctxcommand{definefont_one(\!!bs\luaescapestring{#specification}\!!es)}% the escapestring catches at \somedimen % sets \scaledfontmode and \somefontname and \somefontsize + % MAYBE MOVE THIS TO THE CALLER + \ifx\currentmathsize\empty % CAN BE ZERO + \else + \ifcase\currentmathsize + \or + \let\v_font_size_absolute\textface + \or + \let\v_font_size_absolute\scriptface + \or + \let\v_font_size_absolute\scriptscriptface + \fi + \fi + % \ifcase\scaledfontmode\relax % none, avoid the designsize if possible \d_font_scaled_font_size-\plusthousand\scaledpoint @@ -741,7 +765,7 @@ \or % sa \d_font_scaled_font_size\v_font_size_absolute\relax - \d_font_scaled_font_size\currentfontbodysize\d_font_scaled_font_size + \d_font_scaled_font_size\currentfontbodysize\d_font_scaled_font_size % uses \somefontsize set by lua \or % mo \d_font_scaled_font_size\font_basics_set_mapped_fontsize\v_font_size_absolute @@ -752,9 +776,15 @@ \fi \relax \d_font_scaled_font_size\v_font_size_relative\d_font_scaled_font_size - \ifconditional\font_auto_font_size - \d_font_scaled_font_size\currentfontbodyscale\d_font_scaled_font_size - \d_font_scaled_text_face\currentfontbodyscale\dimexpr\textface\relax + \ifconditional\c_font_auto_size + \font_helpers_check_body_scale\fontsize + \ifconditional\c_font_body_scale + \d_font_scaled_font_size\f_font_body_scale\d_font_scaled_font_size + \d_font_scaled_text_face\f_font_body_scale\dimexpr\textface\relax + \else + \d_font_scaled_font_size\f_font_body_scale + \d_font_scaled_text_face\textface + \fi \else \d_font_scaled_text_face\textface \fi @@ -768,6 +798,7 @@ \fi \font_helpers_update_font_parameters \font_helpers_update_font_class_parameters + % \writestatus{fonts}{low level define: #csname/\somefontfile/\number\d_font_scaled_font_size/\currentmathsize/\number\d_font_scaled_text_face}% \ctxcommand{definefont_two( \ifx\fontclass\empty false\else true\fi, "#csname", @@ -780,21 +811,41 @@ "\m_font_fallbacks", 0\currentmathsize, \number\d_font_scaled_text_face, - "\relativefontid", % experiment - "\m_font_class_goodies", % experiment (not yet used) - "\m_font_goodies" % experiment + "\number\relativefontid", % experiment + "\m_font_class_goodies", % experiment (not yet used) + "\m_font_goodies", + "\m_font_class_designsize", + "\m_font_designsize" )}% \edef\somefontspec{at \number\d_font_scaled_font_size sp}% we need the resolved designsize (for fallbacks) \expandafter\let\expandafter\lastrawfontcall\csname#csname\endcsname \the\everydefinefont \c_font_feature_inheritance_mode\c_font_feature_inheritance_default} +\def\font_helpers_check_body_scale#fontsize% gets character (x xx a etc) + {\ifcsname\??fontenvironments\fontclass\fontbody #fontsize\endcsname \setfalse\c_font_body_scale \expandafter\let\expandafter\f_font_body_scale + \csname\??fontenvironments\fontclass\fontbody #fontsize\endcsname \else + \ifcsname\??fontenvironments\fontclass\s!default#fontsize\endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale + \csname\??fontenvironments\fontclass\s!default#fontsize\endcsname \else + \ifcsname\??fontenvironments \fontbody #fontsize\endcsname \setfalse\c_font_body_scale \expandafter\let\expandafter\f_font_body_scale + \csname\??fontenvironments \fontbody #fontsize\endcsname \else + \ifcsname\??fontenvironments \s!default#fontsize\endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale + \csname\??fontenvironments \s!default#fontsize\endcsname \else + \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale + \csname\??fontenvironments\fontclass\s!default\s!text \endcsname \else + \ifcsname\??fontenvironments \s!default\s!text \endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale + \csname\??fontenvironments \s!default\s!text \endcsname + \else + \settrue \c_font_body_scale + \let\f_font_body_scale\plusone + \fi\fi\fi\fi\fi\fi} + %D The following macros are used at the \LUA\ end. Watch the \type {\normal} %D hackery: this makes the mkvi parser happy. -\normaldef\fntsetdefname {\global\let\somefontname\defaultfontfile} +\normaldef\fntsetdefname {\global\let\somefontname\defaultfontfile} % do before calling \normaldef\fntsetsomename{\normalgdef\somefontname} % takes argument -\normaldef\fntsetnopsize {\let\somefontsize\empty} +\normaldef\fntsetnopsize {\let\somefontsize\empty} % do before calling \normaldef\fntsetsomesize{\normaldef\somefontsize} % takes argument \newif\ifskipfontcharacteristics \skipfontcharacteristicstrue @@ -874,20 +925,21 @@ % todo: now mathsize twice in name (so it can go here) % todo: check when mathsize is needed +\ifdefined\??fontinstanceready \else \installcorenamespace{fontinstanceready} \fi \ifdefined\??fontinstancebasic \else \installcorenamespace{fontinstancebasic} \fi \ifdefined\??fontinstanceclass \else \installcorenamespace{fontinstanceclass} \fi -\newconditional\font_auto_font_size \settrue\font_auto_font_size +\newconditional\c_font_auto_size \settrue\c_font_auto_size \let\lastfontidentifier\empty -\def\v_font_identifier_basic{\??fontinstancebasic \lastfontidentifier\fontsize\currentmathsize} -\def\v_font_identifier_class{\??fontinstanceclass\fontclass\lastfontidentifier\fontsize\currentmathsize} +\def\v_font_identifier_basic{\??fontinstancebasic \lastfontidentifier-\fontsize-\currentmathsize} +\def\v_font_identifier_class{\??fontinstanceclass\fontclass-\lastfontidentifier-\fontsize-\currentmathsize} \let\v_font_identifier_basic_saved\v_font_identifier_basic \let\v_font_identifier_class_saved\v_font_identifier_class -% \def\v_font_identifier_class{\??fontinstanceclass\fontclass\lastfontidentifier\fontstyle\fontsize} % no \currentmathsize +% \def\v_font_identifier_class{\??fontinstanceclass\fontclass-\lastfontidentifier-\fontstyle-\fontsize} % no \currentmathsize \def\font_basics_define_font_without_parameters#identifier#2% {\c_font_feature_inheritance_mode\c_font_feature_inheritance_fontonly @@ -896,16 +948,18 @@ \let\v_font_size_absolute\fontbody \font_helpers_low_level_define{#2}\v_font_identifier_basic \csname\v_font_identifier_basic\endcsname - \setfalse\font_auto_font_size + \setfalse\c_font_auto_size \setfontcharacteristics \the\everyfontswitch \let\v_font_identifier_basic\v_font_identifier_basic_saved} -\unexpanded\def\font_helpers_trigger#identifier% +\unexpanded\def\font_helpers_trigger#identifier% make a traced variant {\edef\lastfontidentifier{#identifier}% \ifcsname\v_font_identifier_class\endcsname + % \writestatus{fonts}{trigger: reusing \v_font_identifier_class}% \expandafter\font_helpers_trigger_reuse \else + % \writestatus{fonts}{trigger: defining \v_font_identifier_class}% \expandafter\font_helpers_trigger_define \fi} @@ -914,7 +968,7 @@ \def\v_font_size_absolute{#absolute}% \font_helpers_low_level_define{#specification}\v_font_identifier_class \csname\v_font_identifier_class\endcsname - \setfalse\font_auto_font_size + \setfalse\c_font_auto_size \ifskipfontcharacteristics \else \setfontcharacteristics \the\everyfontswitch @@ -923,7 +977,7 @@ \def\font_helpers_trigger_reuse#relative#absolute#specification% {\csname\v_font_identifier_class\endcsname - \setfalse\font_auto_font_size + \setfalse\c_font_auto_size \ifskipfontcharacteristics \else \setfontcharacteristics \the\everyfontswitch @@ -931,7 +985,7 @@ \let\v_font_identifier_class\v_font_identifier_class_saved} %D \macros -%D {currentfontscale,currentfontbodyscale} +%D {currentfontbodyscale} %D %D Sometimes we need to have access to the font scale %D including the \type{a}||\type{d} sizes. The next macro @@ -940,31 +994,48 @@ \installcorenamespace{fontenvironments} -\def\currentfontbodysize - {\ifcsname\??fontenvironments\s!default\somefontsize\endcsname +% \def\currentfontbodysize +% {\ifcsname\??fontenvironments\s!default\somefontsize\endcsname +% \csname\??fontenvironments\s!default\somefontsize\endcsname +% \else +% \somefontsize +% \fi} +% +% \def\currentfontbodyscale +% {\csname\??fontenvironments\s!default +% \ifcsname\??fontenvironments\s!default\fontsize\endcsname \fontsize \else +% \ifcsname\??fontenvironments\s!default\s!text \endcsname \s!text \fi\fi +% \endcsname} + +\def\currentfontbodysize % gets number (the normal sa 1 etc) + {\ifcsname\??fontenvironments\fontclass\s!default\somefontsize\endcsname + \csname\??fontenvironments\fontclass\s!default\somefontsize\endcsname + \else\ifcsname\??fontenvironments\s!default\somefontsize\endcsname \csname\??fontenvironments\s!default\somefontsize\endcsname \else \somefontsize - \fi} + \fi\fi} -\def\currentfontscale % always default ? - {\csname\??fontenvironments\s!default - \ifcsname\??fontenvironments\s!default\xfontsize\endcsname \xfontsize \else - \ifcsname\??fontenvironments\s!default\s!text \endcsname \s!text \fi\fi +\def\currentfontbodyscale % gets character (x xx a etc) + {\csname\??fontenvironments + \ifcsname\??fontenvironments\fontclass\s!default\fontsize\endcsname\fontclass\s!default\fontsize\else + \ifcsname\??fontenvironments \s!default\fontsize\endcsname \s!default\fontsize\else + \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname\fontclass\s!default\s!text \else + \ifcsname\??fontenvironments \s!default\s!text \endcsname \s!default\s!text \else + \s!default \fi\fi\fi\fi \endcsname} -\def\currentfontbodyscale - {\csname\??fontenvironments\s!default - \ifcsname\??fontenvironments\s!default\fontsize\endcsname \fontsize \else - \ifcsname\??fontenvironments\s!default\s!text \endcsname \s!text \fi\fi +\def\currentfontscale % used in default definition + {\csname\??fontenvironments + \ifcsname\??fontenvironments\fontclass\s!default\xfontsize\endcsname\fontclass\s!default\fontsize\else + \ifcsname\??fontenvironments \s!default\xfontsize\endcsname \s!default\fontsize\else + \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname\fontclass\s!default\s!text \else + \ifcsname\??fontenvironments \s!default\s!text \endcsname \s!default\s!text \else + \s!default \fi\fi\fi\fi \endcsname} \setvalue{\??fontenvironments\s!default}{1} -%D Both alternatives use \type {\xfontsize}, a macro that -%D expands to the current size in terms of \type {a} \unknown -%D \type {d}, nothing, or \type {x} \unknown \type {xx}. - %D In the following macros we use \type{\currentxfontsize} to %D hold the current x||size of the font. This enables us to %D support for instance \type{\sl} inside a \type{\tx} switch. @@ -973,13 +1044,6 @@ \def\xfontsize{\ifcase\currentxfontsize\fontsize\or\s!x\else\s!xx\fi} -%D A typical use of this command is in commands that switch -%D to another font bypassing the font mechanism: -%D -%D \starttyping -%D \font\myfont=\truefontname{MyFont} at \the\dimexpr\currentfontscale\bodyfontsize\relax -%D \stoptyping - %D Now we enter the area of font switching. The switching %D mechanism has to take care of several situations, like: %D @@ -1051,6 +1115,12 @@ %D So, apart from an occasional switch, one should define an %D environment at the outer level. +% \definebodyfontenvironment[33pt] +% \definebodyfontenvironment[dejavu][default][1=.5] +% \definebodyfontenvironment[dejavu][default][x=1.2] +% \definebodyfontenvironment[dejavu][default][a=5] +% \definebodyfontenvironment[dejavu][33pt][x=100pt] + % the lookup order is: % % [class] [dimension] [parameters] @@ -1085,13 +1155,13 @@ \def\bodyfontdimension#class#size#parameter#body% {\the\dimexpr - \ifcsname\??fontenvironments#class #size#parameter\endcsname - \csname\??fontenvironments#class #size#parameter\endcsname \else + \ifcsname\??fontenvironments #class#size#parameter\endcsname + \csname\??fontenvironments #class#size#parameter\endcsname \else \ifcsname\??fontenvironments#class\s!default#parameter\endcsname - \csname\??fontenvironments#class\s!default#parameter\endcsname\dimexpr#body\relax \else % factor + \csname\??fontenvironments#class\s!default#parameter\endcsname\dimexpr#body\relax\else % factor \ifcsname\??fontenvironments #size#parameter\endcsname - \csname\??fontenvironments #size#parameter\endcsname \else - \csname\??fontenvironments \s!default#parameter\endcsname\dimexpr#body\relax \fi\fi\fi % factor + \csname\??fontenvironments #size#parameter\endcsname \else + \csname\??fontenvironments \s!default#parameter\endcsname\dimexpr#body\relax\fi\fi\fi % factor \relax} \unexpanded\def\definebodyfontenvironment @@ -1099,7 +1169,6 @@ \let\setupbodyfontenvironment\definebodyfontenvironment -\installcorenamespace{fontsteps} % fast cache \installcorenamespace{fontenvironmentknown} \let\bodyfontenvironmentlist\empty % used in font-run (might change) @@ -1107,8 +1176,8 @@ \def\font_helpers_register_environment#class#body% {\expandafter\let\csname\??fontenvironmentknown#class#body\endcsname\empty} -\let\m_font_body \empty -\let\m_font_body_normalized\empty +\newmacro\m_font_body +\newmacro\m_font_body_normalized \def\font_basics_define_body_font_environment {\ifthirdargument @@ -1168,23 +1237,7 @@ \fi\fi \font_helpers_register_fontbody{#normalizedbody}} -\def\font_basics_define_body_font_environment_size_step_normal#class#size#body#step% - {\expandafter\normalizebodyfontsize\csname\??fontsteps#class#size#step\endcsname - {\bodyfontdimension{#class}{#size}{#step}{#body}}} - -\def\font_basics_define_body_font_environment_size_step_traced#class#size#body#step% - {\font_basics_define_body_font_environment_size_step_normal{#class}{#size}{#body}{#step}% - \writestatus\m!fonts{#class #size #step => \csname\??fontsteps#class#size#step\endcsname}} - -\let\font_basics_define_body_font_environment_size_step\font_basics_define_body_font_environment_size_step_normal - -\appendtoks - \let\font_basics_define_body_font_environment_size_step\font_basics_define_body_font_environment_size_step_traced -\to \t_font_tracers_definitions - -% \tracefontsizemapping - -%DChecking +%D Checking \def\font_helpers_check_bodyfont_environment#normalizedbody#body% {\ifcsname\??fontenvironmentknown\fontclass#normalizedbody\endcsname @@ -1195,9 +1248,7 @@ \def\font_helpers_check_bodyfont_environment_indeed#normalizedbody#body% {\font_helpers_register_environment\fontclass{#normalizedbody}% - %\writestatus\m!fonts{checking bodyfont environment [#normalizedbody] within [#body]}% - \font_helpers_process_relative_size_list{\font_basics_define_body_font_environment_size_step\fontclass{#normalizedbody}{#body}}% - \ifcsname\??fontbodyknown\m_font_body_normalized\endcsname + \ifcsname\??fontbodyknown#normalizedbody\endcsname \else \font_helpers_define_unknown_font{#normalizedbody}% \fi} @@ -1404,35 +1455,52 @@ \let\font_basics_define_body_font_defs_nop\font_basics_define_body_font_defs_nop_traced \to \t_font_tracers_definitions -% we split into two characters (first part of spec) and the rest .. do we need the ifcsname tests ? +% We split into two characters (first part of spec) and the rest: the first two are the style and +% the rest is a size, although in practice one will seldom define the size directly. We might even +% drop that as it gives faster code. -\unexpanded\def\font_basics_define_body_font_nop_xx[#one#two#rest=#value]% +\unexpanded\def\font_basics_define_body_font_nop_xx[#one#two#rest=#value]% local {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi - \expandafter\let\csname\??fontinstanceclass\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname\undefined - \unexpanded\expandafter\normaledef\csname\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}} + \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname\undefined + \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname + {\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\noexpand\font_rscale_xx{\m_font_asked_style}}{\m_font_asked_body}{\normalunexpanded{#value}}}% + } -\unexpanded\def\font_basics_define_body_font_yes_xx[#one#two#rest=#value]% - {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi - \global\expandafter\let\csname\??fontinstanceclass\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname\undefined - \unexpanded\expandafter\normalxdef\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}} +% \writestatus{fonts}{define \m_asked_style\space nop: \expandafter\meaning\csname\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname}% -\unexpanded\def\font_basics_define_body_font_nop_mm[#one#two#rest=#value]% - {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi - \expandafter\let\csname\??fontinstanceclass\m_font_asked_body\m_font_asked_style#one#two#rest1\endcsname\undefined - \expandafter\let\csname\??fontinstanceclass\m_font_asked_body\m_font_asked_style#one#two#rest2\endcsname\undefined - \expandafter\let\csname\??fontinstanceclass\m_font_asked_body\m_font_asked_style#one#two#rest3\endcsname\undefined - \unexpanded\expandafter\normaledef\csname\m_font_asked_body\m_font_asked_style#one#two#rest1\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest1}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% - \unexpanded\expandafter\normaledef\csname\m_font_asked_body\m_font_asked_style#one#two#rest2\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest2}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% - \unexpanded\expandafter\normaledef\csname\m_font_asked_body\m_font_asked_style#one#two#rest3\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest3}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}} - -\unexpanded\def\font_basics_define_body_font_yes_mm[#one#two#rest=#value]% +\unexpanded\def\font_basics_define_body_font_yes_xx[#one#two#rest=#value]% global {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi - \global\expandafter\let\csname\??fontinstanceclass\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest1\endcsname\undefined - \global\expandafter\let\csname\??fontinstanceclass\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest2\endcsname\undefined - \global\expandafter\let\csname\??fontinstanceclass\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest3\endcsname\undefined - \unexpanded\expandafter\normalxdef\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest1\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest1}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% - \unexpanded\expandafter\normalxdef\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest2\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest2}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% - \unexpanded\expandafter\normalxdef\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest3\endcsname{\font_helpers_trigger{\m_font_asked_body\m_font_asked_style#one#two#rest3}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}} + \global\expandafter\let\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname\undefined + \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname + {\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% + } + +% \writestatus{fonts}{define \m_asked_style\space yes: {\expandafter\meaning\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname} + +%D Here the rest concerns rl or lr so in this case it is not a size specifier but +%D a directional one. + +\unexpanded\def\font_basics_define_body_font_nop_mm[#one#two#rest=#value]% local + {%\ifcsname\s!mm\endcsname\else\font_basics_check_fontname_combination\s!mm{#one#two}{#rest}\fi + \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-1\endcsname\undefined + % \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-2\endcsname\undefined + % \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-3\endcsname\undefined + \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\s!mm-#one#two#rest\endcsname + {\font_helpers_trigger{\m_font_asked_body-\s!mm-#one#two#rest}{\noexpand\font_rscale_mm}{\m_font_asked_body}{\normalunexpanded{#value}}}% + } + +% \writestatus{fonts}{define \m_asked_style\space nop: \expandafter\meaning\csname\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname}% + +\unexpanded\def\font_basics_define_body_font_yes_mm[#one#two#rest=#value]% global + {%\ifcsname\s!mm\endcsname\else\font_basics_check_fontname_combination\s!mm{#one#two}{#rest}\fi + \global\expandafter\let\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-1\endcsname\undefined + % \global\expandafter\let\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-2\endcsname\undefined + % \global\expandafter\let\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-3\endcsname\undefined + \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\s!mm-#one#two#rest\endcsname + {\font_helpers_trigger{\m_font_asked_body-\s!mm-#one#two#rest}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% + } + +% \writestatus{fonts}{define \m_asked_style\space yes: \expandafter\meaning\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname}% \unexpanded\def\font_basics_define_body_font_body_identifier[#bodylist][#stylelist][#name]% {\processcommalist[#bodylist]{\font_basics_define_body_font_body_identifier_a{#stylelist}{#name}}} @@ -1473,11 +1541,9 @@ \unexpanded\def\font_helpers_define_unknown_font#body% one level only {\font_helpers_register_fontbody{#body}% prevents loop, can go \setfalse\c_font_defining_state - %\writestatus\m!fonts{checking relative sizes of body size #body}% \font_helpers_process_relative_size_list{\font_helpers_define_unknown_check_sizes{#body}}% \ifconditional\c_font_defining_state \setfalse\c_font_defining_state - %\writestatus\m!fonts{checking definitions of body size #body}% \font_helpers_process_style_list{\font_helpers_define_unknown_check_definitions{#body}}% \ifconditional\c_font_defining_state \ifconditional\c_font_defining_environment_state\else @@ -1487,25 +1553,17 @@ \font_helpers_register_fontbody{#body}% % needed ? \ifconditional\c_font_defining_unknown - %\writestatus\m!fonts{skipping relatives of body size #body}% \else - %\writestatus\m!fonts{checking relatives of body size #body}% \settrue\c_font_defining_unknown \font_helpers_process_relative_size_list{\font_helpers_define_unknown_check_relatives{#body}}% \setfalse\c_font_defining_unknown \fi \fi - \ifconditional\c_font_defining_environment_state\else - \ifconditional\c_font_defining_state \else % not yet ok - \showmessage\m!fonts{14}{#body}% relative - \fi - \fi \fi} \def\font_helpers_define_unknown_check_sizes#body#relativesize% {\ifcsname\??fontenvironments\s!default#relativesize\endcsname % fontclass ? \expandafter\normalizebodyfontsize\csname\??fontenvironments#body#relativesize\endcsname{\csname\??fontenvironments\s!default#relativesize\endcsname\dimexpr#body\relax}% - %\writestatus\m!fonts{#body #relativesize => \csname\??fontenvironments#body#relativesize\endcsname}% \settrue\c_font_defining_state \fi} @@ -1524,15 +1582,11 @@ \fi} \unexpanded\def\font_basics_define_body_font_default#assignments% - {% to be checked: - \font_helpers_check_relative_font_size\m_font_asked_style % still needed here? - % to be checked + {\font_helpers_check_relative_font_size\m_font_asked_style % still needed here? \ifcsname\m_font_asked_style\endcsname\else \normalexpanded{\definefontstyle[\m_font_asked_style][\m_font_asked_style]}% \fi - % \processcommalist[#assignments]\font_basics_define_body_font_defs - % to be checked \let\p_font_rscale\v_font_rscale_default} %D These macros show that quite some definitions take place. Fonts are not loaded @@ -1541,7 +1595,6 @@ \unexpanded\def\font_basics_switch_points#body% {\ifcsname\??fontbodyknown#body\endcsname \else % we need to check the relative sizes for this body - %\writestatus\m!fonts{checking switch points [#body]}% \font_helpers_define_unknown_font{#body}% \fi% \ifcsname\??fontbodyknown#body\endcsname % always true now @@ -1601,7 +1654,7 @@ \font_helpers_set_font_set_font_option_keyword {#method}{#option}{#option}} -\let\m_font_keyword\empty +\newmacro\m_font_keyword \unexpanded\def\font_helpers_set_font_set_font_option_keyword#method#keyword#message% {\edef\m_font_keyword{#keyword}% @@ -1623,28 +1676,6 @@ \font_helpers_set_fontstyle_of_fontclass \fi\fi\fi} -% \unexpanded\def\font_helpers_set_font_set_font_option_keyword#method#keyword#message% -% {\edef\m_font_keyword{#keyword}% -% \ifx\m_font_keyword\v!reset -% \let\fontstyle\empty % new 31/7/2006 -% \let\fontsize \empty -% \else\ifcsname\??fontstyle\m_font_keyword\endcsname -% \let\fontstyle\m_font_keyword -% \else -% \edef\m_font_step{\bodyfontvariable\m_font_keyword}% -% \ifx\m_font_step\empty -% \setcurrentfontclass\m_font_keyword -% \ifcase#method\relax -% \let\globalfontclass\globalfontclass -% \else -% \let\globalfontclass\fontclass -% \fi -% \font_helpers_set_fontstyle_of_fontclass -% \else -% \normalexpanded{\font_helpers_set_font_set_font_option_body{#method}{\m_font_step}{#message}}% we can have a simple one for this -% \fi -% \fi\fi} - \def\font_helpers_set_fontstyle_of_fontclass % will be overloaded later {\let\fontstyle\s!rm} @@ -1690,27 +1721,12 @@ \trycurrentfontclass{#class}% \fi\fi} % \fi} -\settrue\autotypescripts +\ifdefined\trycurrentfontclass \else -\unexpanded\def\trycurrentfontclass#typeface% - {\ifconditional\autotypescripts - \usetypescript[#typeface]% - \ifcsname\??fontclassyes#typeface\endcsname - \edef\fontclass{#typeface}% - \else - \usetypescriptfile[\f!typeprefix#typeface]% - \usetypescript[#typeface]% - \ifcsname\??fontclassyes#typeface\endcsname - \edef\fontclass{#typeface}% - \else - % todo: message - \letvalueempty{\??fontclassnop#typeface}% - \fi - \fi - \else - % todo: message - \letvalueempty{\??fontclassnop#typeface}% - \fi} + \unexpanded\def\trycurrentfontclass#typeface% + {\letvalueempty{\??fontclassnop#typeface}} + +\fi \let\defaultfontstyle \s!rm \let\defaultfontalternative\s!tf @@ -1742,8 +1758,9 @@ \ifmmode\mr\fi % otherwise \rm not downward compatible ... not adapted yet \font_helpers_synchronize_font} -\unexpanded\def\font_helpers_set_current_fontbody_alternative#body#alternative% - {\edef\fontbody {#body}% +\unexpanded\def\font_helpers_set_current_xsize_alternative#xsize#alternative% + {% if we want to go smaller then we can always consider a local bodyswitch + \edef\fontsize {#xsize}% \edef\fontalternative{#alternative}% \font_helpers_synchronize_font} @@ -1786,57 +1803,60 @@ \else \applyfontclassstrategies \fi - \setfalse\font_auto_font_size + \setfalse\c_font_auto_size \ifskipfontcharacteristics \setfontcharacteristics \the\everyfontswitch \fi} +%D This is the resolver for special cases (sizes) and in practice it is not called that often +%D so further optimization makes no sense. + \def\font_helpers_check_strategy_class_a % --- --- --- --- % pt tt bf a - {\ifcsname\fontclass\fontbody \fontstyle \fontalternative \fontsize\endcsname - \setfalse\font_auto_font_size - \csname\fontclass\fontbody \fontstyle \fontalternative \fontsize\endcsname + {\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\fontsize\endcsname + \setfalse\c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\fontsize\endcsname \else \expandafter\font_helpers_check_strategy_class_b \fi} \def\font_helpers_check_strategy_class_b % --- --- --- def % pt tt bf - {\ifcsname\fontclass\fontbody \fontstyle \fontalternative \defaultfontsize\endcsname - \settrue\font_auto_font_size - \csname\fontclass\fontbody \fontstyle \fontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\defaultfontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_class_c \fi} \def\font_helpers_check_strategy_class_c % --- --- def --- % pt tt tf a - {\ifcsname\fontclass\fontbody \fontstyle \defaultfontalternative \fontsize\endcsname - \settrue\font_auto_font_size - \csname\fontclass\fontbody \fontstyle \defaultfontalternative \fontsize\endcsname + {\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\fontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\fontsize\endcsname \else \expandafter\font_helpers_check_strategy_class_d \fi} \def\font_helpers_check_strategy_class_d % --- --- def def % pt tt tf - {\ifcsname\fontclass\fontbody \fontstyle \defaultfontalternative \defaultfontsize\endcsname - \settrue\font_auto_font_size - \csname\fontclass\fontbody \fontstyle \defaultfontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_class_e \fi} \def\font_helpers_check_strategy_class_e % --- def def def % pt rm tf - {\ifcsname\fontclass\fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname - \setfalse\font_auto_font_size - \csname\fontclass\fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontclass-\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname + \setfalse\c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_class_f -% \expandafter\font_helpers_check_strategy_a + % \expandafter\font_helpers_check_strategy_a \fi} \def\font_helpers_check_strategy_class_f % def def def def % rm tf - {\ifcsname\fontclass\defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname - \settrue\font_auto_font_size - \csname\fontclass\defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontclass-\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontclass-\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_a \fi} @@ -1844,49 +1864,49 @@ % no class \def\font_helpers_check_strategy_a % --- --- --- --- % pt tt bf a - {\ifcsname\fontbody \fontstyle \fontalternative \fontsize\endcsname - \setfalse\font_auto_font_size - \csname\fontbody \fontstyle \fontalternative \fontsize\endcsname + {\ifcsname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\fontsize\endcsname + \setfalse\c_font_auto_size + \csname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\fontsize\endcsname \else \expandafter\font_helpers_check_strategy_b \fi} \def\font_helpers_check_strategy_b % --- --- --- --- % pt tt bf a - {\ifcsname\fontbody \fontstyle \fontalternative \defaultfontsize\endcsname - \settrue\font_auto_font_size - \csname\fontbody \fontstyle \fontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\defaultfontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_c \fi} \def\font_helpers_check_strategy_c % --- --- --- --- % pt tt bf a - {\ifcsname\fontbody \fontstyle \defaultfontalternative \fontsize\endcsname - \settrue\font_auto_font_size - \csname\fontbody \fontstyle \defaultfontalternative \fontsize\endcsname + {\ifcsname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\fontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\fontsize\endcsname \else \expandafter\font_helpers_check_strategy_d \fi} \def\font_helpers_check_strategy_d % --- --- --- --- % pt tt bf a - {\ifcsname\fontbody \fontstyle \defaultfontalternative \defaultfontsize\endcsname - \settrue\font_auto_font_size - \csname\fontbody \fontstyle \defaultfontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_e \fi} \def\font_helpers_check_strategy_e % --- --- --- --- % pt tt bf a - {\ifcsname\fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname - \setfalse\font_auto_font_size - \csname\fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname + \setfalse\c_font_auto_size + \csname\??fontinstanceready\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname \else \expandafter\font_helpers_check_strategy_f \fi} \def\font_helpers_check_strategy_f % --- --- --- --- % pt tt bf a - {\ifcsname\defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname - \settrue\font_auto_font_size - \csname\defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize\endcsname + {\ifcsname\??fontinstanceready\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname + \settrue\c_font_auto_size + \csname\??fontinstanceready\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize\endcsname \fi} \let\applyfontstrategies \font_helpers_check_strategy_a @@ -1913,11 +1933,9 @@ \def\font_helpers_set_current_font_xxx_alternative#alternative#xsize#scriptstyle% {\ifmmode #scriptstyle% - \else\ifcsname\??fontsteps\fontclass\fontbody#xsize\endcsname - \expandafter\font_helpers_set_current_fontbody_alternative\csname\??fontsteps\fontclass\fontbody#xsize\endcsname{#alternative}% \else - % some error: check is not done correctly - \fi\fi} + \font_helpers_set_current_xsize_alternative{#xsize}{#alternative}% + \fi} \def\font_helpers_set_current_font_x_alternative#alternative% {\font_helpers_set_current_font_xxx_alternative{#alternative}\s!x\scriptstyle @@ -1994,16 +2012,29 @@ %D default typeface and also set the font specific parameters %D assigned to \type{\everybodyfont} -\def\textface {\bodyfontvariable\s!text } -\def\scriptface {\bodyfontvariable\s!script } -\def\scriptscriptface{\bodyfontvariable\s!scriptscript} +\def\textface {\currentbodyfontdimension\s!text } +\def\scriptface {\currentbodyfontdimension\s!script } +\def\scriptscriptface{\currentbodyfontdimension\s!scriptscript} \unexpanded\def\font_basics_complete_switch#size% {\bodyfontsize#size\relax \normalizebodyfontsize\normalizedbodyfontsize\bodyfontsize - \edef\textface {\bodyfontvariable\s!text }% - \edef\scriptface {\bodyfontvariable\s!script }% - \edef\scriptscriptface{\bodyfontvariable\s!scriptscript}} + \edef\textface {\currentbodyfontdimension\s!text }% + \edef\scriptface {\currentbodyfontdimension\s!script }% + \edef\scriptscriptface{\currentbodyfontdimension\s!scriptscript}}% + +\def\currentbodyfontdimension#parameter% + {\the\dimexpr + \ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname + \csname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname \else + \ifcsname\??fontenvironments\fontclass\s!default #parameter\endcsname + \csname\??fontenvironments\fontclass\s!default #parameter\endcsname + \dimexpr\normalizedbodyfontsize\relax \else % factor + \ifcsname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname + \csname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname \else + \csname\??fontenvironments \s!default #parameter\endcsname + \dimexpr\normalizedbodyfontsize\relax \fi\fi\fi % factor + \relax} %D \macros %D {setupbodyfont,switchtobodyfont} @@ -2151,7 +2182,7 @@ %D The three alternatives can be activated by the next three %D system calls and are defined by the bodyfontenvironment. -\let\m_font_step\empty +\newmacro\m_font_step \def\font_helpers_set_bodyfont_step#step% {\edef\m_font_step{\bodyfontvariable{#step}}% not always \cs @@ -2159,7 +2190,7 @@ \font_basics_switch_style \fontstyle} \unexpanded\def\setsmallbodyfont{\font_helpers_set_bodyfont_step\v!small\the\everybodyfont} -\unexpanded\def\setbigbodyfont {\font_helpers_set_bodyfont_step\v!big \the\everybodyfont} +\unexpanded\def\setbigbodyfont {\font_helpers_set_bodyfont_step\gg \the\everybodyfont} \unexpanded\def\setmainbodyfont {\font_basics_switch_points\normalizedbodyfontsize diff --git a/tex/context/base/font-mat.mkvi b/tex/context/base/font-mat.mkvi index 85a10bf3a..4ecb9d082 100644 --- a/tex/context/base/font-mat.mkvi +++ b/tex/context/base/font-mat.mkvi @@ -15,6 +15,12 @@ \unprotect +%D Be nice: + +\ifdefined\??fontinstanceready \else \installcorenamespace{fontinstanceready} \fi +\ifdefined\??fontinstancebasic \else \installcorenamespace{fontinstancebasic} \fi +\ifdefined\??fontinstanceclass \else \installcorenamespace{fontinstanceclass} \fi + %D \macros %D {textonly} %D @@ -76,44 +82,44 @@ % for bold. \def\font_helpers_set_math_family_a - {\ifcsname\fontclass \fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \setfalse\font_auto_font_size - \csname\fontclass \fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \else - \ifcsname\fontclass \fontbody\s!mm\fontfamily \currentmathsize\endcsname \settrue\font_auto_font_size - \csname\fontclass \fontbody\s!mm\fontfamily \currentmathsize\endcsname \else + {\ifcsname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size + \csname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else + \ifcsname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size + \csname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily \endcsname \else \font_helpers_set_math_family_b \fi\fi} \def\font_helpers_set_math_family_b - {\ifcsname\defaultfontclass\fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \setfalse\font_auto_font_size - \csname\defaultfontclass\fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \else - \ifcsname\defaultfontclass\fontbody\s!mm\fontfamily \currentmathsize\endcsname \settrue\font_auto_font_size - \csname\defaultfontclass\fontbody\s!mm\fontfamily \currentmathsize\endcsname \else + {\ifcsname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size + \csname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else + \ifcsname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size + \csname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily \endcsname \else \font_helpers_set_math_family_c \fi\fi} \def\font_helpers_set_math_family_c - {\ifcsname \fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \setfalse\font_auto_font_size - \csname \fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \else - \ifcsname \fontbody\s!mm\fontfamily \currentmathsize\endcsname \settrue\font_auto_font_size - \csname \fontbody\s!mm\fontfamily \currentmathsize\endcsname \else - \nullfont \settrue\font_auto_font_size + {\ifcsname\??fontinstanceready \fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size + \csname\??fontinstanceready \fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else + \ifcsname\??fontinstanceready \fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size + \csname\??fontinstanceready \fontbody-\s!mm-\fontfamily \endcsname \else + \nullfont \settrue \c_font_auto_size \fi\fi} \def\font_helpers_set_math_family_indeed#mrtag#family% \currentmathsize etc are also used later on {\let\savedfontbody\fontbody \let\fontfamily#family% - \let\currentmathsize\!!plusthree\let\fontbody\scriptscriptface\font_helpers_set_math_family_a\scriptscriptfont#mrtag\font - \let\currentmathsize\!!plustwo \let\fontbody\scriptface \font_helpers_set_math_family_a\scriptfont #mrtag\font - \let\currentmathsize\!!plusone \let\fontbody\textface \font_helpers_set_math_family_a\textfont #mrtag\font + \let\currentmathsize\!!plusthree\font_helpers_set_math_family_a\scriptscriptfont#mrtag\font + \let\currentmathsize\!!plustwo \font_helpers_set_math_family_a\scriptfont #mrtag\font + \let\currentmathsize\!!plusone \font_helpers_set_math_family_a\textfont #mrtag\font \let\currentmathsize\empty \let\fontbody\savedfontbody - \setfalse\font_auto_font_size} + \setfalse\c_font_auto_size} \def\font_helpers_set_math_family_bold_a#font#mbfam#mrfam% - {\ifcsname\fontclass\fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname \setfalse\font_auto_font_size - \csname\fontclass\fontbody\s!mm\fontfamily\fontsize\currentmathsize\endcsname #font#mbfam\font \else - \ifcsname\fontclass\fontbody\s!mm\fontfamily \currentmathsize\endcsname \settrue\font_auto_font_size - \csname\fontclass\fontbody\s!mm\fontfamily \currentmathsize\endcsname #font#mbfam\font \else + {\ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname #font#mbfam\font \else + \ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size + \csname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname #font#mbfam\font \else #font#mbfam#font#mrfam% \fi\fi} @@ -122,13 +128,13 @@ \let\defaultfontclass\fontclass % else truefontname falls back on the wrong one \let\savedfontbody\fontbody \let\fontfamily#familytag% - \let\currentmathsize\!!plusthree\let\fontbody\scriptscriptface\font_helpers_set_math_family_bold_a\scriptscriptfont#mbfam#mrfam% - \let\currentmathsize\!!plustwo \let\fontbody\scriptface \font_helpers_set_math_family_bold_a\scriptfont #mbfam#mrfam% - \let\currentmathsize\!!plusone \let\fontbody\textface \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% + \let\currentmathsize\!!plusthree\font_helpers_set_math_family_bold_a\scriptscriptfont#mbfam#mrfam% + \let\currentmathsize\!!plustwo \font_helpers_set_math_family_bold_a\scriptfont #mbfam#mrfam% + \let\currentmathsize\!!plusone \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% \let\currentmathsize\empty \let\fontbody\savedfontbody \let\defaultfontclass\savedfontclass - \setfalse\font_auto_font_size} + \setfalse\c_font_auto_size} % optimized: math fonts are never changed (10K \bfa $x$: 3.2 => 2.5 (baseline 1.0)) % @@ -141,9 +147,11 @@ \def\font_helpers_set_math_family#mrfam#familytag% {\ifconditional\optimizemathfontdefinitions - \ifcsname\??fontinstanceclass\fontclass\textface\s!mm#familytag1\fontsize1\endcsname + \ifcsname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname + % \writestatus{fonts}{math: reusing \fontclass\fontbody\s!mm#familytag\fontsize1}% \font_helpers_preset_math_family_indeed#mrfam#familytag% \else + % \writestatus{fonts}{math: defining \fontclass\fontbody\s!mm#familytag\fontsize1}% \font_helpers_set_math_family_indeed#mrfam#familytag% \fi \else @@ -152,7 +160,7 @@ \def\font_helpers_set_math_family_bold#mbfam#familytag#mrfam% {\ifconditional\optimizemathfontdefinitions - \ifcsname\??fontinstanceclass\fontclass\textface\s!mm#familytag1\fontsize1\endcsname + \ifcsname\??fontinstanceclass\fontclass-\textface-\s!mm-#familytag-\fontsize-1\endcsname \font_helpers_preset_math_family_indeed#mbfam#familytag% \else \font_helpers_set_math_family_bold_indeed#mbfam#familytag#mrfam% @@ -162,9 +170,9 @@ \fi} \def\font_helpers_preset_math_family_indeed#fam#familytag% - {\scriptscriptfont#fam\csname\??fontinstanceclass\fontclass\scriptscriptface\s!mm#familytag3\fontsize3\endcsname - \scriptfont #fam\csname\??fontinstanceclass\fontclass\scriptface \s!mm#familytag2\fontsize2\endcsname - \textfont #fam\csname\??fontinstanceclass\fontclass\textface \s!mm#familytag1\fontsize1\endcsname} + {\scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname + \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname + \textfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname} \let\font_helpers_reset_fontclass_math_families\gobbleoneargument diff --git a/tex/context/base/font-pre.mkiv b/tex/context/base/font-pre.mkiv index cc3e95a8c..a03609f22 100644 --- a/tex/context/base/font-pre.mkiv +++ b/tex/context/base/font-pre.mkiv @@ -323,12 +323,14 @@ %D So far. -% \definefontstyle [\s!mm] [\s!mm] -\definefontstyle [\s!rm,\v!roman,\v!serif,\v!regular] [\s!rm] -\definefontstyle [\s!ss,\v!sansserif,\v!sans,\v!support] [\s!ss] -\definefontstyle [\s!tt,\v!teletype,\v!type,\v!mono] [\s!tt] -\definefontstyle [\s!hw,\v!handwritten] [\s!hw] -\definefontstyle [\s!cg,\v!calligraphic] [\s!cg] +\definefontstyle [\s!hw] [\s!hw] +\definefontstyle [\s!cg] [\s!cg] + +\definefontstyle [\v!roman,\v!serif,\v!regular] [\s!rm] +\definefontstyle [\v!sansserif,\v!sans,\v!support] [\s!ss] +\definefontstyle [\v!teletype,\v!type,\v!mono] [\s!tt] +\definefontstyle [\v!handwritten] [\s!hw] +\definefontstyle [\v!calligraphic] [\s!cg] \definefontalternative[\s!tf] \definefontalternative[\s!bf] diff --git a/tex/context/base/font-sty.mkvi b/tex/context/base/font-sty.mkvi index b8355bee2..9291f3b0a 100644 --- a/tex/context/base/font-sty.mkvi +++ b/tex/context/base/font-sty.mkvi @@ -357,4 +357,22 @@ \unexpanded\edef\vsone#character{#character\utfchar{"FE00}} % used \unexpanded\edef\vstwo#character{#character\utfchar{"FE01}} % not used but handy for testing +%D For historic reasons we keep the following around but they are no longer +%D that relevant for \MKIV. + +\unexpanded\def\doattributes#1#2#3#4% + {\begingroup % geen \bgroup, anders in mathmode lege \hbox + \dousestylehashparameter{#1}{#2}% + \dousecolorhashparameter{#1}{#3}% + #4% + \endgroup} + +\unexpanded\def\dostartattributes#1#2#3% + {\begingroup % geen \bgroup, anders in mathmode lege \hbox + \dousestylehashparameter{#1}{#2}% + \dousecolorhashparameter{#1}{#3}} + +\let\dostopattributes\endgroup + + \protect \endinput diff --git a/tex/context/base/font-sym.mkvi b/tex/context/base/font-sym.mkvi index 1ce76fc0b..68237c073 100644 --- a/tex/context/base/font-sym.mkvi +++ b/tex/context/base/font-sym.mkvi @@ -228,4 +228,15 @@ %D After which the font is active and the baselines and %D struts are set. +%D \macros{doiffontcharelse} + +\unexpanded\def\doiffontcharelse#specification#unicode% this could be a direct lua call + {\begingroup + \font_basics_define_font_without_parameters{thedefinedfont}{#specification}% + \iffontchar\font#unicode\relax + \endgroup\expandafter\firstoftwoarguments + \else + \endgroup\expandafter\secondoftwoarguments + \fi} + \protect \endinput diff --git a/tex/context/base/font-unk.mkiv b/tex/context/base/font-unk.mkiv index 5bb89b6be..988e5df3d 100644 --- a/tex/context/base/font-unk.mkiv +++ b/tex/context/base/font-unk.mkiv @@ -103,45 +103,45 @@ %D Next we define roman, sans and monospaced font sets. \definebodyfont [default] [rm] - [tf=Serif sa 1, - bf=SerifBold sa 1, - it=SerifItalic sa 1, - sl=SerifSlanted sa 1, - bi=SerifBoldItalic sa 1, - bs=SerifBoldSlanted sa 1, - sc=SerifCaps sa 1] + [\s!tf=Serif sa 1, + \s!bf=SerifBold sa 1, + \s!it=SerifItalic sa 1, + \s!sl=SerifSlanted sa 1, + \s!bi=SerifBoldItalic sa 1, + \s!bs=SerifBoldSlanted sa 1, + \s!sc=SerifCaps sa 1] \definebodyfont [default] [ss] - [tf=Sans sa 1, - bf=SansBold sa 1, - it=SansItalic sa 1, - sl=SansSlanted sa 1, - bi=SansBoldItalic sa 1, - bs=SansBoldSlanted sa 1, - sc=SansCaps sa 1] + [\s!tf=Sans sa 1, + \s!bf=SansBold sa 1, + \s!it=SansItalic sa 1, + \s!sl=SansSlanted sa 1, + \s!bi=SansBoldItalic sa 1, + \s!bs=SansBoldSlanted sa 1, + \s!sc=SansCaps sa 1] \definebodyfont [default] [tt] - [tf=Mono sa 1, - bf=MonoBold sa 1, - it=MonoItalic sa 1, - sl=MonoSlanted sa 1, - bi=MonoBoldItalic sa 1, - bs=MonoBoldSlanted sa 1, - sc=MonoCaps sa 1] + [\s!tf=Mono sa 1, + \s!bf=MonoBold sa 1, + \s!it=MonoItalic sa 1, + \s!sl=MonoSlanted sa 1, + \s!bi=MonoBoldItalic sa 1, + \s!bs=MonoBoldSlanted sa 1, + \s!sc=MonoCaps sa 1] \definebodyfont [default] [mm] - [mr=MathRoman mo 1, - mrlr=MathRomanL2R mo 1, - mrrl=MathRomanR2L mo 1, - mb=MathRomanBold mo 1, - mblr=MathRomanBoldL2R mo 1, - mbrl=MathRomanBoldR2L mo 1] + [\s!mr =MathRoman mo 1, + \s!mrlr=MathRomanL2R mo 1, + \s!mrrl=MathRomanR2L mo 1, + \s!mb =MathRomanBold mo 1, + \s!mblr=MathRomanBoldL2R mo 1, + \s!mbrl=MathRomanBoldR2L mo 1] \definebodyfont [default] [hw] - [tf=Handwriting sa 1] + [\s!tf=Handwriting sa 1] \definebodyfont [default] [cg] - [tf=Calligraphy sa 1] + [\s!tf=Calligraphy sa 1] %D These definitions come into action as soon as names are %D mapped onto real file names (or names that themselves are diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index 9799d1f2a..789f454ae 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -582,7 +582,7 @@ local value = (squote * Cs((entity + (1 - squote))^0) * squote) + (dq local endofattributes = slash * close + close -- recovery of flacky html local whatever = space * name * optionalspace * equal -local wrongvalue = C(P(1-whatever-close)^1 + P(1-close)^1) / attribute_value_error +----- wrongvalue = C(P(1-whatever-close)^1 + P(1-close)^1) / attribute_value_error ----- wrongvalue = C(P(1-whatever-endofattributes)^1 + P(1-endofattributes)^1) / attribute_value_error ----- wrongvalue = C(P(1-space-endofattributes)^1) / attribute_value_error local wrongvalue = Cs(P(entity + (1-space-endofattributes))^1) / attribute_value_error @@ -735,7 +735,7 @@ local function xmlconvert(data, settings) else errorhandler = errorhandler or xml.errorhandler if errorhandler then - xml.errorhandler("load",errorstr) + xml.errorhandler(format("load error: %s",errorstr)) end end else @@ -1301,7 +1301,7 @@ xml.tocdata(e,"error") --ldx]]-- function xml.tocdata(e,wrapper) - local whatever = xmltostring(e.dt) + local whatever = type(e) == "table" and xmltostring(e.dt) or e or "" if wrapper then whatever = format("<%s>%s</%s>",wrapper,whatever,wrapper) end diff --git a/tex/context/base/m-chart.mkvi b/tex/context/base/m-chart.mkvi index df787e995..e94adeba2 100644 --- a/tex/context/base/m-chart.mkvi +++ b/tex/context/base/m-chart.mkvi @@ -116,12 +116,15 @@ \newtoks\everyFLOWchart +\unexpanded\def\module_charts_process[#name]% + {\ctxcommand{flow_start_chart("#name")}} + \unexpanded\def\startFLOWchart {\startnointerference \the\everyFLOWchart \dosingleempty\module_charts_start_chart} -\unexpanded\def\module_charts_process[#name]% +\unexpanded\def\module_charts_start_chart[#name]% {\ctxcommand{flow_start_chart("#name")}} \unexpanded\def\stopFLOWchart diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv index d4e98c100..f64c1631b 100644 --- a/tex/context/base/meta-ini.mkiv +++ b/tex/context/base/meta-ini.mkiv @@ -331,7 +331,7 @@ \newbox\b_meta_variable_box -\let \currentmpvariableclass \empty +\let \currentmpvariableclass \empty \let \m_meta_current_variable \empty \let \m_meta_current_variable_template\empty @@ -401,7 +401,7 @@ \def\meta_prepare_variable_yes {\defconvertedcommand\ascii\m_meta_current_variable % otherwise problems - \doifcolorelse \ascii % with 2\bodyfontsize + \doifcolorelse \ascii % with 2\bodyfontsize {\meta_prepare_variable_color} {\begingroup \setbox\b_meta_variable_box\hbox{\scratchdimen\m_meta_current_variable sp}% diff --git a/tex/context/base/mult-aux.mkiv b/tex/context/base/mult-aux.mkiv index 283c63cab..2aa59e714 100644 --- a/tex/context/base/mult-aux.mkiv +++ b/tex/context/base/mult-aux.mkiv @@ -18,6 +18,8 @@ %D with (interface might change). The code here evolved in an email %D exchange between me and Wolgang Schuster. +% todo: doifelse<whatever> + \writestatus{loading}{ConTeXt Multilingual Macros / Helpers} \registerctxluafile{mult-aux}{1.001} @@ -539,6 +541,11 @@ \installdirectparametersethandler {#1}{#2}% \installdirectstyleandcolorhandler{#1}{#2}} +\unexpanded\def\installsetuponlycommandhandler#1#2% + {\installdirectparameterhandler{#1}{#2}% + \installdirectsetuphandler {#1}{#2}% + }% maybe \installdirectparametersethandler {#1}{#2}% + % Experiment: % \installcorenamespace {one} @@ -625,9 +632,13 @@ % We install two core namespaces here, as we want nice error messages. Maybe % we will reserve the first 9. +\installcorenamespace{fontinstanceready} \installcorenamespace{fontinstancebasic} \installcorenamespace{fontinstanceclass} +% Maybe a \definecorenamespace[name][directparameter,directsetup][parent] +% but we don't gain much. Actually we might just inline all definitions. + % \enabletrackers[interfaces.namespaces,context.flush] % % \definenamespace diff --git a/tex/context/base/mult-de.mkii b/tex/context/base/mult-de.mkii index 14631c9c7..78421a5d2 100644 --- a/tex/context/base/mult-de.mkii +++ b/tex/context/base/mult-de.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{untertitel} \setinterfaceconstant{suffix}{suffix} \setinterfaceconstant{suffixseparator}{suffixseparator} +\setinterfaceconstant{suffixstopper}{suffixstopper} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua index 2ed8fe3f3..d311452f8 100644 --- a/tex/context/base/mult-def.lua +++ b/tex/context/base/mult-def.lua @@ -10327,6 +10327,10 @@ return { ["en"]="suffixseparator", ["nl"]="suffixscheider", }, + ["suffixstopper"]={ + ["en"]="suffixstopper", + ["nl"]="suffixafsluiter", + }, ["sx"]={ ["cs"]="sx", ["de"]="sx", diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv index 5e9a94554..f6f50ae72 100644 --- a/tex/context/base/mult-def.mkiv +++ b/tex/context/base/mult-def.mkiv @@ -22,8 +22,8 @@ \setvalue{\??mi :persian}{pe} \setvalue{\??mi:romanian}{ro} -\def\userinterfacetag{\ifcsname\??mi:\currentinterface\endcsname\csname\??mi\currentinterface\endcsname\else en\fi} -\def\userresponsestag{\ifcsname\??mi:\currentresponses\endcsname\csname\??mi\currentresponses\endcsname\else en\fi} +\def\userinterfacetag{\ifcsname\??mi:\currentinterface\endcsname\csname\??mi:\currentinterface\endcsname\else en\fi} +\def\userresponsestag{\ifcsname\??mi:\currentresponses\endcsname\csname\??mi:\currentresponses\endcsname\else en\fi} % \input mult-\userinterfacetag \relax % \input mult-m\userresponsestag \relax diff --git a/tex/context/base/mult-en.mkii b/tex/context/base/mult-en.mkii index 57f627906..821315097 100644 --- a/tex/context/base/mult-en.mkii +++ b/tex/context/base/mult-en.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{subtitle} \setinterfaceconstant{suffix}{suffix} \setinterfaceconstant{suffixseparator}{suffixseparator} +\setinterfaceconstant{suffixstopper}{suffixstopper} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-fr.mkii b/tex/context/base/mult-fr.mkii index f2a5599d7..6a9275c1a 100644 --- a/tex/context/base/mult-fr.mkii +++ b/tex/context/base/mult-fr.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{soustitre} \setinterfaceconstant{suffix}{suffix} \setinterfaceconstant{suffixseparator}{suffixseparator} +\setinterfaceconstant{suffixstopper}{suffixstopper} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-ini.lua b/tex/context/base/mult-ini.lua index 4ec50d350..8769641fa 100644 --- a/tex/context/base/mult-ini.lua +++ b/tex/context/base/mult-ini.lua @@ -233,7 +233,7 @@ function interfaces.setuserinterface(interface,response) translations[given] = translation[interface] or translation.en or given noftranslations = noftranslations + 1 end - report_interface("definitions: %s constants, %s variables, %s elements, %s commands, % formats, %s translations", + report_interface("definitions: %s constants, %s variables, %s elements, %s commands, %s formats, %s translations", nofconstants,nofvariables,nofelements,nofcommands,nofformats,noftranslations) end end diff --git a/tex/context/base/mult-ini.mkiv b/tex/context/base/mult-ini.mkiv index 21727f564..f0d47103d 100644 --- a/tex/context/base/mult-ini.mkiv +++ b/tex/context/base/mult-ini.mkiv @@ -40,9 +40,10 @@ %D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR %D \HL %D \NC \type{\c!prefix!} \NC c! \NC constant (direct) \NC\FR +%D \NC \type{\k!prefix!} \NC k! \NC constant (indirect) \NC\FR %D \NC \type{\e!prefix!} \NC e! \NC element \NC\MR %D \NC \type{\f!prefix!} \NC f! \NC file \NC\MR -%D \NC \type{\m!prefix!} \NC m! \NC age \NC\MR +%D \NC \type{\m!prefix!} \NC m! \NC age \NC\MR %D \NC \type{\s!prefix!} \NC s! \NC system \NC\MR %D \NC \type{\v!prefix!} \NC v! \NC variable \NC\MR %D \HL @@ -54,6 +55,7 @@ %D are obsolete (we had some 12 originally). \def\c!prefix!{c!} +\def\k!prefix!{k!} \def\e!prefix!{e!} \def\f!prefix!{f!} % for the moment we keep this one \def\m!prefix!{m!} @@ -419,22 +421,43 @@ %D We already defined these auxiliary macros in the system %D modules. Starting with this module however, we have to take %D multi||linguality a bit more serious. -%D -%D The additional \type {\c!internal!n} prefixing is no longer -%D needed as we now have separate interface files when dealing -%D with setups (quick ref docs) and no longer reload the whole -%D interface. (We no longer need the link back to the main -%D internal interface.) -\unexpanded\def\doletvalue #1#2{\expandafter \let\csname#1#2\endcsname} -\unexpanded\def\dosetvalue #1#2{\expandafter \def\csname#1#2\endcsname} -\unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1#2\endcsname} -\unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1#2\endcsname} -\unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1#2\endcsname} -\unexpanded\def\docopyvalue #1#2#3{\expandafter \def\csname#1#3\expandafter\endcsname\expandafter{\csname#2#3\endcsname}} +%D In due time, when we exclusively use the parameter handler code, we can drop +%D the backmapping (\type{\c!k...}) and make \type {\c!c...} similar to +%D \type {\v!...}. In that case we can simply the following setters. + +\unexpanded\def\doletvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetvalue #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\doresetvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty} +\unexpanded\def\doignorevalue#1#2#3{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty} + +\unexpanded\def\docopyvalue#1#2#3% + {\ifcsname\k!prefix!#3\endcsname + \expandafter\def\csname#1\csname\k!prefix!#3\endcsname\expandafter\endcsname\expandafter + {\csname#2\csname\k!prefix!#3\endcsname\endcsname}% + \else + \expandafter\def\csname#1#3\expandafter\endcsname\expandafter + {\csname#2#3\endcsname}% + \fi} + +\startinterface english + + \unexpanded\def\doletvalue #1#2{\expandafter \let\csname#1#2\endcsname} + \unexpanded\def\dosetvalue #1#2{\expandafter \def\csname#1#2\endcsname} + \unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1#2\endcsname} + \unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1#2\endcsname} + \unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1#2\endcsname} + \unexpanded\def\doresetvalue #1#2{\expandafter \let\csname#1#2\endcsname\empty} + \unexpanded\def\doignorevalue#1#2#3{\expandafter \let\csname#1#2\endcsname\empty} -\unexpanded\def\doresetvalue #1#2{\expandafter \let\csname#1#2\endcsname\empty} -\unexpanded\def\doignorevalue#1#2#3{\expandafter \let\csname#1#2\endcsname\empty} + \unexpanded\def\docopyvalue#1#2#3% + {\expandafter\def\csname#1#3\expandafter\endcsname\expandafter + {\csname#2#3\endcsname}} + +\stopinterface %D We can now redefine some messages that will be %D introduced in the multi||lingual system module. @@ -753,11 +776,18 @@ %D For at the \LUA\ end (experiment): -\def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}} +\def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}% + \expandafter\gdef\csname\k!prefix!#2\endcsname{#1}} % backmapping from non english \def\do@sivar#1#2{\expandafter\gdef\csname\v!prefix!#1\endcsname{#2}} \def\do@siele#1#2{\expandafter\gdef\csname\e!prefix!#1\endcsname{#2}} \def\do@sicom#1#2{\expandafter\gdef\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}} +\startinterface english + + \def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}} + +\stopinterface + %D So much for the basic multi||lingual interface commands. The %D macro's can be enhanced with more testing facilities, but %D for the moment they suffice. diff --git a/tex/context/base/mult-it.mkii b/tex/context/base/mult-it.mkii index c1bb74fd6..2431539b9 100644 --- a/tex/context/base/mult-it.mkii +++ b/tex/context/base/mult-it.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{sottotitolo} \setinterfaceconstant{suffix}{suffix} \setinterfaceconstant{suffixseparator}{suffixseparator} +\setinterfaceconstant{suffixstopper}{suffixstopper} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua index 130f666b6..cf391595c 100644 --- a/tex/context/base/mult-low.lua +++ b/tex/context/base/mult-low.lua @@ -84,7 +84,8 @@ return { -- -- maybe a different class -- - "startmode", "stopmode", "startnotmode", "stopnotmode", "doifmode", "doifmodeelse", "doifnotmode", + "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", + "doifmode", "doifmodeelse", "doifnotmode", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", @@ -92,6 +93,8 @@ return { "startproject", "stopproject", "project", "starttext", "stoptext", "startdocument", "stopdocument", "documentvariable", "startmodule", "stopmodule", "usemodule", + -- + "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", }, ["helpers"] = { -- @@ -109,6 +112,8 @@ return { -- "then", -- + "donetrue", "donefalse", + -- "htdp", "unvoidbox", "vfilll", @@ -137,6 +142,7 @@ return { "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", -- "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", + "scratchhsize", "scratchvsize", -- "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", @@ -147,7 +153,7 @@ return { -- "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifinsetelse", - "doifnextcharelse", "doifnextoptionalelse", "doifnextparenthesiselse", "doiffastoptionalcheckelse", + "doifnextcharelse", "doifnextoptionalelse", "doifnextbgroupelse", "doifnextparenthesiselse", "doiffastoptionalcheckelse", "doifundefinedelse", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifsomethingelse", @@ -197,6 +203,7 @@ return { "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", -- "newconstant", "setnewconstant", "newconditional", "settrue", "setfalse", "setconstant", + "newmacro", "setnewmacro", "newfraction", -- "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", diff --git a/tex/context/base/mult-nl.mkii b/tex/context/base/mult-nl.mkii index 8d6f46ed3..f8178762b 100644 --- a/tex/context/base/mult-nl.mkii +++ b/tex/context/base/mult-nl.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{subtitel} \setinterfaceconstant{suffix}{suffix} \setinterfaceconstant{suffixseparator}{suffixscheider} +\setinterfaceconstant{suffixstopper}{suffixafsluiter} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-pe.mkii b/tex/context/base/mult-pe.mkii index 074869620..98bfcb4d1 100644 --- a/tex/context/base/mult-pe.mkii +++ b/tex/context/base/mult-pe.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{زیرعنوان} \setinterfaceconstant{suffix}{پسوند} \setinterfaceconstant{suffixseparator}{suffixseparator} +\setinterfaceconstant{suffixstopper}{suffixstopper} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-ro.mkii b/tex/context/base/mult-ro.mkii index e5b2c2dd8..d16f1cc7b 100644 --- a/tex/context/base/mult-ro.mkii +++ b/tex/context/base/mult-ro.mkii @@ -983,6 +983,7 @@ \setinterfaceconstant{subtitle}{subtitlu} \setinterfaceconstant{suffix}{suffix} \setinterfaceconstant{suffixseparator}{suffixseparator} +\setinterfaceconstant{suffixstopper}{suffixstopper} \setinterfaceconstant{surnamesep}{surnamesep} \setinterfaceconstant{sx}{sx} \setinterfaceconstant{sy}{sy} diff --git a/tex/context/base/mult-sys.mkiv b/tex/context/base/mult-sys.mkiv index 8c12eb857..b9bb640e8 100644 --- a/tex/context/base/mult-sys.mkiv +++ b/tex/context/base/mult-sys.mkiv @@ -112,6 +112,7 @@ \definesystemconstant {SerifSlanted} \definesystemconstant {SerifBoldSlanted} \definesystemconstant {SerifCaps} +% \definesystemconstant {SerifCapsSlanted} \definesystemconstant {SansBold} \definesystemconstant {SansItalic} @@ -119,6 +120,7 @@ \definesystemconstant {SansSlanted} \definesystemconstant {SansBoldSlanted} \definesystemconstant {SansCaps} +% \definesystemconstant {SansCapsSlanted} \definesystemconstant {MonoBold} \definesystemconstant {MonoItalic} @@ -126,7 +128,13 @@ \definesystemconstant {MonoSlanted} \definesystemconstant {MonoBoldSlanted} \definesystemconstant {MonoCaps} +% \definesystemconstant {MonoCapsSlanted} +% \definesystemconstant {MonoVariable} +\definesystemconstant {MathRoman} +\definesystemconstant {MathRomanBold} + +\definesystemconstant {Simple} \definesystemconstant {Normal} \definesystemconstant {Caps} @@ -152,6 +160,7 @@ \definesystemconstant {attribute} \definesystemconstant {none} +\definesystemconstant {auto} \definesystemconstant {default} \definesystemconstant {smallcaps} @@ -203,6 +212,10 @@ \definesystemconstant {small} \definesystemconstant {big} +\definesystemconstant {first} +\definesystemconstant {second} +\definesystemconstant {third} + %D Net come some \CONTEXT\ constants, used in the definition %D of private commands: @@ -287,6 +300,7 @@ \definesystemconstant {direction} \definesystemconstant {fallbacks} \definesystemconstant {goodies} +\definesystemconstant {designsize} %definesystemconstant {background} %definesystemconstant {ucmap} @@ -318,6 +332,10 @@ \definesystemconstant {rightpage} \definesystemconstant {somewhere} +\definesystemconstant {userdata} +\definesystemconstant {command} +\definesystemconstant {simple} + \definesystemconstant {full} \definesystemconstant {text} \definesystemconstant {paragraph} @@ -422,6 +440,8 @@ \def\!!plustoken {+} \def\!!minustoken {-} +\def\__unknown__ {\string\\//} % unlikely value + %D Variables are composed of a command specific tag and a user %D supplied variable (system constant). The first tag \type{ag} %D for instance is available as \type{\??ag} and expands to @@ -451,9 +471,8 @@ \definesystemvariable {dm} % DefineMeasure \definesystemvariable {du} % DUmmy \definesystemvariable {ef} % ExternFiguur -\definesystemvariable {el} % Elements \definesystemvariable {en} % ENvironments -\definesystemvariable {er} % external resources +%definesystemvariable {er} % external resources \definesystemvariable {et} % EffecT \definesystemvariable {ex} % ExterneFiguren \definesystemvariable {fc} % FramedContent @@ -491,7 +510,6 @@ \definesystemvariable {lx} % LayerteXt \definesystemvariable {ma} % MargeAchtergrond \definesystemvariable {mc} % MultiColumn -\definesystemvariable {md} % MoDule \definesystemvariable {mi} % MultilingualInterface \definesystemvariable {ml} % MultilingualLabel \definesystemvariable {mm} % MultilingualMath diff --git a/tex/context/base/pack-pos.mkiv b/tex/context/base/pack-pos.mkiv index e0dc5508c..fab73bc4a 100644 --- a/tex/context/base/pack-pos.mkiv +++ b/tex/context/base/pack-pos.mkiv @@ -60,21 +60,6 @@ \vfill}% \egroup} -% \def\resetpositioning -% {\getparameters[\??ps] -% [\c!state=\v!start, -% \c!unit=\s!cm, -% \c!factor=\plusone, -% \c!scale=\plusone, -% \c!xfactor=\@@psfactor, -% \c!yfactor=\@@psfactor, -% \c!xscale=\@@psscale, -% \c!yscale=\@@psscale, -% \c!xstep=\v!absolute, -% \c!ystep=\v!absolute, -% \c!xoffset=\zeropoint, -% \c!yoffset=\zeropoint]} - \def\resetpositioning {\let\@@psstate \v!start \let\@@psunit \s!cm diff --git a/tex/context/base/page-lay.mkiv b/tex/context/base/page-lay.mkiv index 5af50aa8a..4e2c254e6 100644 --- a/tex/context/base/page-lay.mkiv +++ b/tex/context/base/page-lay.mkiv @@ -119,7 +119,7 @@ \installswitchcommandhandler \??layout {layout} \??layout \appendtoks - \letlayoutparameter\c!state\v!start + \doifnothing{\strictlayoutparameter\c!state}{\letlayoutparameter\c!state\v!start}% \to \everydefinelayout \appendtoks @@ -748,8 +748,8 @@ \let\changetolayout\page_layouts_change % also public -\def\v_real_page_normal {\the\realpageno} -\def\v_real_page_reverse{-\the\realpageno} +\def\v_real_page_normal {\the\realpageno} +\def\v_real_page_reverse{-\the\numexpr\lastpage-\realpageno\relax} \def\v_real_page_odd_or_even {\ifodd\pagenoshift @@ -766,18 +766,45 @@ \else\ifnum\plusone=\realpageno \v!first \else - \s!unknown + \__unknown__ \fi\fi} +\let\v_page_layouts_pre_check\relax + \def\page_layouts_check_default_indeed#1% - {\doif{\namedlayoutparameter#1\c!state}\v!start{\page_layouts_change{#1}}} + {\edef\m_page_check{#1} + \edef\m_page_state{\namedlayoutparameter\m_page_check\c!state}% + \ifx\m_page_state\v!start + \global\let\v_page_layouts_pre_check\currentlayout + \global\let\currentlayout\m_page_check + \page_layouts_synchronize + \else\ifx\m_page_state\v!repeat + \global\let\v_page_layouts_pre_check\relax + \global\let\currentlayout\m_page_check + \page_layouts_synchronize + \fi\fi} + +\def\page_layouts_check_revert + {\global\let\currentlayout\v_page_layouts_pre_check + \global\let\v_page_layouts_pre_check\relax + \page_layouts_synchronize} \def\page_layouts_check_default - {\ifcsname\namedlayouthash\v_real_page_normal \c!state\endcsname \page_layouts_check_default_indeed\v_real_page_normal \else - \ifcsname\namedlayouthash\v_real_page_reverse \c!state\endcsname \page_layouts_check_default_indeed\v_real_page_revers \else - \ifcsname\namedlayouthash\v_real_page_named \c!state\endcsname \page_layouts_check_default_indeed\v_real_page_named \else - \ifcsname\namedlayouthash\v_real_page_current \c!state\endcsname \page_layouts_check_default_indeed\v_real_page_current \else - \ifcsname\namedlayouthash\v_real_page_odd_or_even\c!state\endcsname \page_layouts_check_default_indeed\v_real_page_odd_or_even\fi\fi\fi\fi\fi} + {\ifcsname\namedlayouthash\v_real_page_normal\c!state\endcsname + \page_layouts_check_default_indeed\v_real_page_normal + \else\ifcsname\namedlayouthash\v_real_page_reverse\c!state\endcsname + \page_layouts_check_default_indeed\v_real_page_reverse + \else\ifcsname\namedlayouthash\v_real_page_named\c!state\endcsname + \page_layouts_check_default_indeed\v_real_page_named + \else\ifcsname\namedlayouthash\v_real_page_current\c!state\endcsname + \page_layouts_check_default_indeed\v_real_page_current + \else\ifcsname\namedlayouthash\v_real_page_odd_or_even\c!state\endcsname + \page_layouts_check_default_indeed\v_real_page_odd_or_even + \else\ifx\v_page_layouts_pre_check\relax + % okay + \else + \page_layouts_check_revert + \fi\fi\fi\fi\fi\fi} \def\installlayoutmethod#1#2% {\setgvalue{\??layoutmethod#1}{#2}} @@ -899,6 +926,8 @@ %D \macros %D {adaptlayout} +\installcorenamespace{pageadaptations} + \newdimen\d_page_adepts_pushed_text_height \newdimen\d_page_adepts_pushed_footer_height \newdimen\d_page_adepts_height @@ -915,7 +944,7 @@ \fi} \def\page_adapts_layout_register#1#2% - {\setgvalue{\??za:#2}{\page_adapts_layout_indeed{#1}}} + {\setgvalue{\??pageadaptations#2}{\page_adapts_layout_indeed{#1}}} \def\page_adapts_layout_indeed#1% {\getparameters[\??za][\c!height=\zeropoint,\c!lines=0,#1]% @@ -944,13 +973,13 @@ \global\let\page_adepts_pop\page_adepts_pop_indeed} \def\page_adapts_check - {\ifcsname\??za:\the\realpageno\endcsname + {\ifcsname\??pageadaptations\the\realpageno\endcsname \page_adapts_check_indeed \fi} \def\page_adapts_check_indeed - {\getvalue{\??za:\the\realpageno}% - \letvalue{\??za:\the\realpageno}\relax} + {\getvalue{\??pageadaptations\the\realpageno}% + \letvalue{\??pageadaptations\the\realpageno}\relax} \def\page_adepts_push_indeed {\global\d_page_adepts_pushed_text_height \textheight diff --git a/tex/context/base/s-map-10.mkiv b/tex/context/base/s-map-10.mkiv index 8f6bff5bd..e9ef436f9 100644 --- a/tex/context/base/s-map-10.mkiv +++ b/tex/context/base/s-map-10.mkiv @@ -106,7 +106,7 @@ \starttypescript [maps] \definetypeface [maps] [rm] [serif] [modern] [default] [rscale=0.95] -\definetypeface [maps] [mm] [math] [modern] [computer-modern] +\definetypeface [maps] [mm] [math] [modern] [latin-modern] \definetypeface [maps] [tt] [mono] [modern] [default] [rscale=0.90] \definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] \stoptypescript diff --git a/tex/context/base/scrn-but.mkvi b/tex/context/base/scrn-but.mkvi index 557615738..b20d34c09 100644 --- a/tex/context/base/scrn-but.mkvi +++ b/tex/context/base/scrn-but.mkvi @@ -934,15 +934,32 @@ %D Lists: -\setvalue{\??listelement\v!left }{\def\dosomelistelement{\scrn_menu_list_element\v!left }} -\setvalue{\??listelement\v!right }{\def\dosomelistelement{\scrn_menu_list_element\v!right }} -\setvalue{\??listelement\v!top }{\def\dosomelistelement{\scrn_menu_list_element\v!top }} -\setvalue{\??listelement\v!bottom}{\def\dosomelistelement{\scrn_menu_list_element\v!bottom}} - -\def\scrn_menu_list_element#1#2#3#4#5#6#7% - {\startbut[internal(#3)] - \limitatetext{#5}{\namedlistparameter{#2}\c!maxwidth}\unknown% - \stopbut} +\ifdefined\definelistalternative + + \definelistalternative [\v!left ] [\c!renderingsetup=strc:lists:rendering:menu] + \definelistalternative [\v!right ] [\c!renderingsetup=strc:lists:rendering:menu] + \definelistalternative [\v!top ] [\c!renderingsetup=strc:lists:rendering:menu] + \definelistalternative [\v!bottom] [\c!renderingsetup=strc:lists:rendering:menu] + + \startsetups[strc:lists:rendering:menu] + \startbut[internal(\currentlistentryinternal)] + \limitatetext\currentlistentrytext{\currentlistparameter\c!maxwidth}\unknown + \stopbut + \stopsetups + +\else % will go + + \setvalue{\??listelement\v!left }{\def\dosomelistelement{\scrn_menu_list_element\v!left }} + \setvalue{\??listelement\v!right }{\def\dosomelistelement{\scrn_menu_list_element\v!right }} + \setvalue{\??listelement\v!top }{\def\dosomelistelement{\scrn_menu_list_element\v!top }} + \setvalue{\??listelement\v!bottom}{\def\dosomelistelement{\scrn_menu_list_element\v!bottom}} + + \def\scrn_menu_list_element#1#2#3#4#5#6#7% + {\startbut[internal(#3)] + \limitatetext{#5}{\namedlistparameter{#2}\c!maxwidth}\unknown% + \stopbut} + +\fi %D Sometimes handy: diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv index 6cc04b203..1c92def9c 100644 --- a/tex/context/base/spac-ali.mkiv +++ b/tex/context/base/spac-ali.mkiv @@ -545,6 +545,18 @@ \fi \raggedcommand} +\unexpanded\def\usealignparameter#1% faster local variant + {\edef\m_spac_align{#1\c!align}% + \ifx\m_spac_align\else + \expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache\m_spac_align\endcsname + \ifx\raggedcommand\relax + \spac_align_add_to_cache\m_spac_align + \else + \expandafter\let\expandafter\updateraggedskips\csname\??alignmentraggedcache\m_spac_align\endcsname + \fi + \raggedcommand + \fi} + % The keywords: \unexpanded\def\installalign#1#2% beware: commands must be unexpandable! @@ -647,15 +659,15 @@ \let\raggedbox\relax -\def\dosetraggedvbox#1% can be more keys +\def\dosetraggedvbox#1% can be more keys .. how about caching here (but seldom used) {\let\raggedbox\vbox - \processcommacommand[#1]\spac_align_set_ragged_box} + \processcommacommand[#1]\spac_align_set_ragged_vbox} -\def\dosetraggedhbox#1% can be more keys +\def\dosetraggedhbox#1% can be more keys .. how about caching here (but seldom used) {\let\raggedbox\hbox \processcommacommand[#1]\spac_align_set_ragged_hbox} -\def\spac_align_set_ragged_box#1% +\def\spac_align_set_ragged_vbox#1% {\ifcsname\??alignvertical#1\endcsname \csname\??alignvertical#1\endcsname \quitcommalist @@ -667,6 +679,20 @@ \quitcommalist \fi} +% \def\usealignparametersethbox#1% +% {\edef\p_spac_align{#1\c!align}% +% \let\raggedbox\hbox +% \ifx\p_spac_align\empty \else +% \processcommacommand[\p_spac_align]\spac_align_set_ragged_hbox +% \fi} +% +% \def\usealignparametersetvbox#1% +% {\edef\p_spac_align{#1\c!align}% +% \let\raggedbox\vbox +% \ifx\p_spac_align\empty \else +% \processcommacommand[\p_spac_align]\spac_align_set_ragged_vbox +% \fi} + \setvalue{\??alignvertical \v!left }{\let\raggedbox\lbox} \setvalue{\??alignvertical \v!right }{\let\raggedbox\rbox} \setvalue{\??alignvertical \v!middle }{\let\raggedbox\cbox} diff --git a/tex/context/base/spac-chr.lua b/tex/context/base/spac-chr.lua index b8a428aaf..00c3d6766 100644 --- a/tex/context/base/spac-chr.lua +++ b/tex/context/base/spac-chr.lua @@ -46,8 +46,10 @@ local typesetters = typesetters local characters = { } typesetters.characters = characters -local fontparameters = fonts.hashes.parameters -local fontcharacters = fonts.hashes.characters +local fonthashes = fonts.hashes +local fontparameters = fonthashes.parameters +local fontcharacters = fonthashes.characters +local fontquads = fonthashes.quads local a_character = attributes.private("characters") local a_alignstate = attributes.private("alignstate") @@ -58,7 +60,7 @@ local c_period = byte('.') local function inject_quad_space(unicode,head,current,fraction) local attr = current.attr if fraction ~= 0 then - fraction = fraction * fontparameters[current.font].quad + fraction = fraction * fontquads[current.font] end local glue = new_glue(fraction) -- glue.attr = copy_node_list(attr) @@ -71,8 +73,9 @@ end local function inject_char_space(unicode,head,current,parent) local attr = current.attr - local char = fontcharacters[current.font][parent] - local glue = new_glue(char and char.width or fontparameters[current.font].space) + local font = current.font + local char = fontcharacters[font][parent] + local glue = new_glue(char and char.width or fontparameters[font].space) -- glue.attr = copy_node_list(current.attr) glue.attr = current.attr current.attr = nil @@ -160,7 +163,7 @@ local methods = { end, [0x202F] = function(head,current) -- narrownobreakspace - return inject_nobreak_space(0x202F,head,current,fontparameters[current.font].space/8) + return inject_nobreak_space(0x202F,head,current,fontquads[current.font]/8) end, [0x205F] = function(head,current) -- math thinspace diff --git a/tex/context/base/spac-fnt.mkiv b/tex/context/base/spac-fnt.mkiv deleted file mode 100644 index 5bfe9aab0..000000000 --- a/tex/context/base/spac-fnt.mkiv +++ /dev/null @@ -1,37 +0,0 @@ -%D \module -%D [ file=spac-fnt, -%D version=2009.10.16, % 1997.03.31, was core-spa.tex -%D title=\CONTEXT\ Spacing Macros, -%D subtitle=Fonts, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\writestatus{loading}{ConTeXt Spacing Macros / Fonts} - -%D For historic reasons we keep the following around but -%D they are no longer that relevant for \MKIV. The name of -%D this module is somewhat weird, but it happened that these -%D macros were defined in a larger one with the same name. - -\unprotect - -\unexpanded\def\doattributes#1#2#3#4% - {\begingroup % geen \bgroup, anders in mathmode lege \hbox - \dousestylehashparameter{#1}{#2}% - \dousecolorhashparameter{#1}{#3}% - #4% - \endgroup} - -\unexpanded\def\dostartattributes#1#2#3% - {\begingroup % geen \bgroup, anders in mathmode lege \hbox - \dousestylehashparameter{#1}{#2}% - \dousecolorhashparameter{#1}{#3}} - -\let\dostopattributes\endgroup - -\protect \endinput diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv index d1dd1b979..cbe971ca9 100644 --- a/tex/context/base/spac-ver.mkiv +++ b/tex/context/base/spac-ver.mkiv @@ -1160,6 +1160,7 @@ % TODO: NAMED SNAPPERS \installcorenamespace{gridsnappers} +\installcorenamespace{gridsnapperattributes} \newskip \bodyfontlineheight \newdimen \bodyfontstrutheight @@ -1181,10 +1182,10 @@ \unexpanded\def\installsnapvalues#1#2% todo: a proper define {\edef\currentsnapper{#1:#2}% - \ifcsname\currentsnapper\endcsname \else - \setevalue\currentsnapper{\ctxlua{builders.vspacing.definesnapmethod("#1","#2")}}% + \ifcsname\??gridsnapperattributes\currentsnapper\endcsname \else + \setevalue{\??gridsnapperattributes\currentsnapper}{\ctxlua{builders.vspacing.definesnapmethod("#1","#2")}}% \fi - \setevalue{\??gridsnappers#1}{\attribute\snapmethodattribute\csname\currentsnapper\endcsname\space}} + \setevalue{\??gridsnappers#1}{\attribute\snapmethodattribute\csname\??gridsnapperattributes\currentsnapper\endcsname\space}} \unexpanded\def\definegridsnapping {\dodoubleargument\spac_grids_define} @@ -1248,6 +1249,7 @@ \definegridsnapping[\v!high] [\v!minheight,\v!maxdepth,\v!none] \definegridsnapping[\v!one] [\v!minheight,\v!mindepth] \definegridsnapping[\v!low] [\v!maxheight,\v!mindepth,\v!none] +\definegridsnapping[\v!none] [\v!none] \definegridsnapping[\v!line] [\v!line] \definegridsnapping[\v!strut] [\v!strut] diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex e0ea0e265..279d7e8ad 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 81fbe2332..9d6eb01b1 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua index 33325aa63..482586b94 100644 --- a/tex/context/base/status-mkiv.lua +++ b/tex/context/base/status-mkiv.lua @@ -330,7 +330,7 @@ return { { filename = "file-mod", marktype = "mkvi", - status = "unknown", + status = "okay", }, { filename = "core-con", @@ -495,7 +495,7 @@ return { { filename = "strc-tag", marktype = "mkiv", - status = "unknown", + status = "okay", }, { filename = "strc-doc", @@ -520,7 +520,7 @@ return { { filename = "strc-lst", marktype = "mkiv", - status = "unknown", + status = "okay", }, { filename = "strc-sec", @@ -593,11 +593,6 @@ return { comment = "this needs to be checked occasionally", }, { - filename = "spac-fnt", - marktype = "mkiv", - status = "unknown", - }, - { filename = "spac-par", marktype = "mkiv", status = "okay", @@ -673,7 +668,8 @@ return { { filename = "page-brk", marktype = "mkiv", - status = "unknown", + status = "okay", + comment = "otr commands will be redone", }, { filename = "page-col", @@ -743,7 +739,8 @@ return { { filename = "page-mbk", marktype = "mkvi", - status = "unknown", + status = "okay", + comment = "might be extended", }, { filename = "page-mul", @@ -768,7 +765,7 @@ return { { filename = "page-mak", marktype = "mkvi", - status = "unknown", + status = "okay", }, { filename = "page-lin", @@ -799,7 +796,8 @@ return { { filename = "buff-ver", marktype = "mkiv", - status = "unknown", + status = "okay", + comment = "check obsolete processbuffer" }, { filename = "buff-par", @@ -1137,7 +1135,8 @@ return { { filename = "meta-ini", marktype = "mkiv", - status = "unknown", + status = "okay", + comment = "metapost code is always evolving", }, { filename = "meta-tex", @@ -1153,7 +1152,8 @@ return { { filename = "meta-pag", marktype = "mkiv", - status = "unknown", + status = "okay", + comment = "might get updated when its mp counterpart gets cleaned up", }, { filename = "page-mrk", @@ -1286,6 +1286,11 @@ return { status = "unknown", }, { + filename = "typo-scr", + marktype = "mkiv", + status = "okay", + }, + { filename = "core-fnt", marktype = "mkiv", status = "unknown", diff --git a/tex/context/base/status-mkiv.tex b/tex/context/base/status-mkiv.tex index 110117bbb..dac5f64f2 100644 --- a/tex/context/base/status-mkiv.tex +++ b/tex/context/base/status-mkiv.tex @@ -1,4 +1,4 @@ -\setupbodyfont[dejavu,10pt] + \setupbodyfont[dejavu,10pt] \setuplayout [width=middle, diff --git a/tex/context/base/strc-des.mkiv b/tex/context/base/strc-des.mkiv index 9f84c493d..e2e6664eb 100644 --- a/tex/context/base/strc-des.mkiv +++ b/tex/context/base/strc-des.mkiv @@ -697,9 +697,9 @@ \def\doenumerationstart #1#2#3{\doenumerationinit{#1}{#2}{#3}\dosingleempty\@@startdescription} \def\doenumerationstop #1#2#3{\doenumerationinit{#1}{#2}{#3}\@@stopdescription} -\def\doresetenumerationnumber#1#2#3{\doresetsubstructurecounter [\specificdescriptionnumber{#1}][#2]} -\def\dosetenumerationnumber#1#2#3#4{\dosetsubstructurecounter [\specificdescriptionnumber{#1}][#2]{#4}} -\def\donextenumerationnumber #1#2#3{\doincrementsubstructurecounter[\specificdescriptionnumber{#1}][#2]} +\def\doresetenumerationnumber#1#2#3{\strc_counters_reset_sub {\specificdescriptionnumber{#1}}{#2}} +\def\dosetenumerationnumber#1#2#3#4{\strc_counters_set_sub {\specificdescriptionnumber{#1}}{#2}{#4}} +\def\donextenumerationnumber #1#2#3{\strc_counters_increment_sub{\specificdescriptionnumber{#1}}{#2}} % implementation @@ -782,9 +782,9 @@ \descriptionparameter\c!titleright}% \endgroup}}} -\def\doenumerationsavecounter {\savestructurecounter[\currentdescriptionnumber]} -\def\doenumerationrestorecounter {\restorestructurecounter[\currentdescriptionnumber]} -\def\doenumerationincrementcounter{\doincrementsubstructurecounter[\currentdescriptionnumber][\currentdescriptionlevel]} +\def\doenumerationsavecounter {\strc_counters_save \currentdescriptionnumber} % can be inlined +\def\doenumerationrestorecounter {\strc_counters_restore \currentdescriptionnumber} % can be inlined +\def\doenumerationincrementcounter{\strc_counters_increment_sub\currentdescriptionnumber\currentdescriptionlevel} % can be inlined % to be used in for instance: % @@ -921,7 +921,7 @@ \else %\setnextinternalreference \setnextinternalreferences{description}\currentdescriptionname % plural - \xdef\currentdescriptionnumberentry{\ctxlua{structures.lists.push{ + \xdef\currentdescriptionnumberentry{\ctxcommand{addtolist{ metadata = { kind = "description", name = "\currentdescriptionname", @@ -971,11 +971,11 @@ \or % symbol \fi - userdata = structures.helpers.touserdata(\!!bs\detokenize{#2}\!!es) + userdata = \!!bs\detokenize{#2}\!!es % will be converted to table at the lua end } }}% - \xdef\currentdescriptionattribute {\ctxlua {tex.write(structures.references.setinternalreference("\referenceprefix","\currentdescriptionreference",\nextinternalreference,"\interactionparameter\c!focus"))}}% - \xdef\currentdescriptionsynchronize{\ctxlatelua{structures.lists.enhance(\currentdescriptionnumberentry)}}% + \xdef\currentdescriptionattribute {\ctxlua {tex.write(structures.references.setinternalreference("\referenceprefix","\currentdescriptionreference",\nextinternalreference,"\interactionparameter\c!focus"))}}% + \xdef\currentdescriptionsynchronize{\ctxlatecommand{enhancelist(\currentdescriptionnumberentry)}}% \fi \endgroup} @@ -984,8 +984,8 @@ % macros. \def\reinstatedescriptionnumberentry#1% - {\xdef\currentdescriptionattribute {\ctxlua {structures.references.getinternalreference(#1)}}% - \xdef\currentdescriptionsynchronize{\ctxlatelua{structures.lists.enhance(#1)}}} + {\xdef\currentdescriptionattribute {\ctxlua {structures.references.getinternalreference(#1)}}% + \xdef\currentdescriptionsynchronize{\ctxlatecommand{enhancelist(#1)}}} \installstructurelistprocessor{description}{\usestructurelistprocessor{number+title}} @@ -1040,9 +1040,9 @@ \def\donextlabelnumber #1{\dolabelinit{#1}\dosingleempty\dodonextlabelnumber} \def\dolabelnumbercommand #1{\dolabelinit{#1}\dosingleempty\dodolabelnumbercommand} -\def\doresetlabelnumber #1{\dolabelinit{#1}\doresetsubstructurecounter [\currentdescriptionnumber][\currentdescriptionlevel]} -\def\dosetlabelnumber #1#2{\dolabelinit{#1}\dosetsubstructurecounter [\currentdescriptionnumber][\currentdescriptionlevel]{#2}} -\def\doincrementlabelnumber #1{\dolabelinit{#1}\doincrementsubstructurecounter[\currentdescriptionnumber][\currentdescriptionlevel]} +\def\doresetlabelnumber #1{\dolabelinit{#1}\strc_counters_reset_sub \currentdescriptionnumber\currentdescriptionlevel} +\def\dosetlabelnumber #1#2{\dolabelinit{#1}\strc_counters_set_sub \currentdescriptionnumber\currentdescriptionlevel{#2}} +\def\doincrementlabelnumber #1{\dolabelinit{#1}\strc_counters_increment_sub\currentdescriptionnumber\currentdescriptionlevel} \def\dodocurrentlabelnumber[#1]% {\dontleavehmode @@ -1051,14 +1051,14 @@ \convertedsubstructurecounter[\currentdescriptionnumber][\currentdescriptionlevel]} \def\dodonextlabelnumber[#1]% todo: ref - {\doincrementsubstructurecounter[\currentdescriptionnumber][\currentdescriptionlevel]% + {\strc_counters_increment_sub\currentdescriptionnumber\currentdescriptionlevel \dodocurrentlabelnumber[\currentdescriptionnumber]} \def\dodolabelnumbercommand[#1]% todo: ref {\dontleavehmode \descriptionparameter\c!before \begingroup - \doincrementsubstructurecounter[\currentdescriptionnumber][\currentdescriptionlevel]% + \strc_counters_increment_sub\currentdescriptionnumber\currentdescriptionlevel \usedescriptionstyleandcolor\c!headstyle\c!headcolor \executeifdefined{\??db:\c!location:\descriptionparameter\c!location}{\descriptionparameter\c!command}{\dodocurrentlabelnumber[#1]}% \endgroup diff --git a/tex/context/base/strc-doc.lua b/tex/context/base/strc-doc.lua index 14726b7aa..91c6ba0e3 100644 --- a/tex/context/base/strc-doc.lua +++ b/tex/context/base/strc-doc.lua @@ -10,6 +10,11 @@ if not modules then modules = { } end modules ['strc-doc'] = { -- we need to better split the lua/tex end -- we need to freeze and document this module +-- keep this as is: +-- +-- in section titles by default a zero aborts, so there we need: sectionset=bagger with \definestructureprefixset [bagger] [section-2,section-4] [] +-- in lists however zero's are ignored, so there numbersegments=2:4 gives result + local next, type = next, type local format, gsub, find, gmatch, match = string.format, string.gsub, string.find, string.gmatch, string.match local concat = table.concat diff --git a/tex/context/base/strc-doc.mkiv b/tex/context/base/strc-doc.mkiv index a6024113f..3811e2ab7 100644 --- a/tex/context/base/strc-doc.mkiv +++ b/tex/context/base/strc-doc.mkiv @@ -34,10 +34,6 @@ % \def\structureparameter#1{\csname\??ns#1\endcsname} % \def\detokenizedstructureparameter#1{\detokenize\expandafter\expandafter\expandafter{\csname\??ns#1\endcsname}} -\def\structurecomponent{\dodoubleempty\dostructurecomponent} - -% \getparameters % initialization, used not grouped anyway -% [\??ns] \setupstructure % not a user command so we might need to change the name [\c!number=, \c!level=, @@ -82,9 +78,11 @@ % why xdef ? +\unexpanded\def\structurecomponent + {\dodoubleempty\dostructurecomponent} + \def\dostructurecomponent[#1][#2]% #1=interfaced-settings, #2=optional user data (not yet supported) {\begingroup -% \getparameters[\??ns][#1]% \setupstructure[#1]% \xdef\currentstructurename {\structureparameter\c!name}% \xdef\currentstructurecoupling {\structureparameter\c!coupling}% @@ -195,10 +193,10 @@ segments = "\structureparameter\c!sectionsegments", ownnumber = "\currentstructureownnumber", }, - userdata = structures.helpers.touserdata(\!!bs\detokenize{#2}\!!es) + userdata = \!!bs\detokenize{#2}\!!es % will be converted to table at the lua end } }}% - \xdef\currentstructurelistnumber{\ctxlua{structures.lists.push(structures.sections.current())}}% + \xdef\currentstructurelistnumber{\ctxcommand{addtolist(structures.sections.current())}}% % \currentstructuresynchronize has to be called someplace, since it introduces a node \setstructuresynchronization\currentstructurelistnumber \structureparameter\c!command @@ -211,8 +209,8 @@ % todo: a direct flusher (needed when hidden) \def\setstructuresynchronization#1% todo: use ctxcontext - {\xdef\currentstructureattribute {\ctxlua {tex.write(structures.references.setinternalreference("\currentstructurereferenceprefix","\currentstructurereference",\nextinternalreference,"\interactionparameter\c!focus"))}}% - \xdef\currentstructuresynchronize{\ctxlatelua{structures.lists.enhance(#1)}}} + {\xdef\currentstructureattribute {\ctxlua {tex.write(structures.references.setinternalreference("\currentstructurereferenceprefix","\currentstructurereference",\nextinternalreference,"\interactionparameter\c!focus"))}}% + \xdef\currentstructuresynchronize{\ctxlatecommand{enhancelist(#1)}}} \def\reportcurrentstructure{\ctxlua{structures.sections.reportstructure()}} diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi index 8e043446e..b9a7d7990 100644 --- a/tex/context/base/strc-flt.mkvi +++ b/tex/context/base/strc-flt.mkvi @@ -176,8 +176,8 @@ \dodefinefloatcommands[#1][#2]} \def\dodefinefloatcommands[#1][#2]% - {\setuvalue {\e!place\e!listof#2}{\dodoubleempty\doplacelist[#1]}% - \setuvalue {\e!complete\e!listof#2}{\dotripleempty\dodocompletelist[#1][#2]}% + {\setuvalue {\e!place\e!listof#2}{\dodoubleempty\strc_lists_place[#1]}% call will change + \setuvalue {\e!complete\e!listof#2}{\dotripleempty\strc_lists_complete_indeed[#1][#2]}% call will change \setuevalue {\e!place#1}{\strc_floats_place{#1}}% \setuevalue {\e!start\e!place#1}{\strc_floats_start_place{#1}}% \setuevalue {\e!stop\e!place#1}{\strc_floats_stop_place}% @@ -723,7 +723,7 @@ \globallet\currentfloatsynchronize\relax \else \ifnofloatnumber \else \ifnofloatcaption \else - \doincrementsubstructurecounter[\@@thestructurecounter\currentfloat][1]% + \strc_counters_increment{\strc_counters_the\currentfloat}% \fi \fi \dostructurecountercomponent {float}% @@ -734,7 +734,7 @@ \relax \relax [\c!name=\currentfloat,% - \s!counter=\@@thestructurecounter\currentfloat,% + \s!counter=\strc_counters_the\currentfloat,% \s!hascaption=\ifnofloatcaption \v!no\else\v!yes\fi,% \s!hasnumber=\ifnofloatnumber \v!no\else\v!yes\fi,% \s!hastitle=\ifemptyfloatcaption\v!no\else\v!yes\fi]% diff --git a/tex/context/base/strc-itm.mkvi b/tex/context/base/strc-itm.mkvi index 2cf31d83e..863e7069a 100644 --- a/tex/context/base/strc-itm.mkvi +++ b/tex/context/base/strc-itm.mkvi @@ -216,7 +216,7 @@ \let \currentitemlevel \!!zerocount % public \def \currentnofitems {\the\c_strc_itemgroups_max_items} -\def \currentitemnumber {\dorawsubstructurecounter[\v_strc_itemgroups_counter][\currentitemlevel]} % public +\def \currentitemnumber {\strc_counters_raw_sub\v_strc_itemgroups_counter\currentitemlevel} % public \newtoks \itemgroupcommands % maybe public @@ -322,11 +322,14 @@ {\letgvalue{\??itemgroupoption \currentitemgroup}\relax \letgvalue{\??itemgroupsetting\currentitemgroup}\relax} +% These will become keywords. We will also add a feature to keep the while set +% together. + \definevspacing[\v!item @0] [penalty:0] % allow \definevspacing[\v!item @10000] [penalty:10000] % no \definevspacing[\v!item @-5] [penalty:-5] \definevspacing[\v!item @5] [penalty:5] -\definevspacing[\v!item @500] [penalty:500] +\definevspacing[\v!item @500] [penalty:500] % discourage .. too low, 5000 is better \def\strc_itemgroups_insert_break_when_needed#break% {\ifconditional\c_strc_itemgroups_optimize @@ -343,13 +346,13 @@ \def\strc_itemgroups_insert_breakallow_indeed{\vspacing[\v!item @0]} \def\strc_itemgroups_insert_breakno_indeed {\vspacing[\v!item @10000]} \def\strc_itemgroups_insert_break_indeed {\flushnotes - \vspacing[\v!item @-5]} + \vspacing[\v!item @-5]} \def\strc_itemgroups_insert_nobreak_indeed {\flushnotes - \ifinsidecolumns - \vspacing[\v!item @5]% - \else - \vspacing[\v!item @500]% - \fi} + \ifinsidecolumns + \vspacing[\v!item @5]% + \else + \vspacing[\v!item @500]% + \fi} \unexpanded\def\strc_itemgroups_process_options#options% {\processcommacommand[#options]\strc_itemgroups_process_option} % expansion of options is handy for xml @@ -570,7 +573,7 @@ \def\strc_itemgroups_increment_item_counter {\ifconditional\c_strc_itemgroups_sub \else \ifx\strc_itemgroups_extra_symbol\empty - \doincrementsubstructurecounter[\v_strc_itemgroups_counter][\currentitemlevel]% + \strc_counters_increment_sub\v_strc_itemgroups_counter\currentitemlevel \fi\fi} \unexpanded\def\strc_itemgroups_insert_item_counter @@ -717,7 +720,7 @@ % \fi % \iftrialtypesetting - \savestructurecounter[\v_strc_itemgroups_counter]% + \strc_counters_save\v_strc_itemgroups_counter \fi \global\advance\c_strc_itemgroups_n_of_lists\plusone \c_strc_itemgroups_n_of_items\zerocount @@ -761,10 +764,7 @@ \ifnum\c_strc_itemgroups_nesting>\zerocount \settrue\c_strc_itemgroups_first \ifconditional\c_strc_itemgroups_continue \else - \dorestartsubstructurecounter - [\v_strc_itemgroups_counter]% - [\currentitemlevel]% - {\the\numexpr\itemgroupparameter\c!start-\plusone\relax}% + \strc_counters_restart_sub\v_strc_itemgroups_counter\currentitemlevel{\numexpr\itemgroupparameter\c!start-\plusone\relax}% \fi \fi \ifx\strc_itemgroups_used_symbol\empty @@ -904,7 +904,7 @@ \fi\fi % new test, needed in sidefloats (surfaced in volker's proceedings) \iftrialtypesetting - \restorestructurecounter[\v_strc_itemgroups_counter]% + \strc_counters_restore\v_strc_itemgroups_counter \global\advance\c_strc_itemgroups_n_of_lists\minusone \fi \global\advance\c_strc_itemgroups_nesting\minusone @@ -1211,7 +1211,6 @@ \else \useitemgroupstyleandcolor\c!symstyle\c!symcolor \strc_itemgroups_extra_symbol - \let\strc_itemgroups_extra_symbol\empty \fi \else \ifx\strc_itemgroups_extra_symbol\empty @@ -1220,9 +1219,9 @@ \else \useitemgroupstyleandcolor\c!symstyle\c!symcolor \strc_itemgroups_extra_symbol - \let\strc_itemgroups_extra_symbol\empty \fi - \fi}} + \fi}% + \let\strc_itemgroups_extra_symbol\empty} \def\strc_itemgroups_make_fitting_box {\ifdim\wd\b_strc_itemgroups>\itemgroupparameter\c!maxwidth\scaledpoint\relax % brr, sp @@ -1515,6 +1514,8 @@ %\c!symcolor=, %\c!headcolor=, %\c!beforehead=, + \c!symcolor=\itemgroupparameter\c!color, % new per 2012.01.17 + \c!symstyle=\itemgroupparameter\c!style, % new per 2012.01.17 \c!afterhead=\blank, \c!before=\blank, \c!inbetween=\blank, diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index ed0049081..ba91e56bc 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -113,7 +113,7 @@ end job.register('structures.lists.collected', tobesaved, initializer) -function lists.push(t) +function lists.addto(t) local m = t.metadata local r = t.references local i = (r and r.internal) or 0 -- brrr @@ -129,8 +129,11 @@ function lists.push(t) if setcomponent then setcomponent(t) -- might move to the tex end end - -- - context(p) + local u = t.userdata + if u and type(u) == "string" then + t.userdata = helpers.touserdata(u) -- nicer at the tex end + end + return p end function lists.doifstoredelse(n) @@ -490,7 +493,7 @@ function lists.process(specification) local r = lists.result[i] local m = r.metadata local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or "" - context.processlistofstructure(m.name,m.kind,i,s) + context.strclistsentryprocess(m.name,m.kind,i,s) end end @@ -504,13 +507,7 @@ function lists.userdata(name,r,tag) -- to tex (todo: xml) local userdata, metadata = result.userdata, result.metadata local str = userdata and userdata[tag] if str then ---~ local catcodes = metadata and metadata.catcodes ---~ if catcodes then ---~ context.sprint(catcodes,str) ---~ else ---~ context(str) ---~ end - helpers.title(str,metadata) + return str, metadata end end end @@ -523,20 +520,18 @@ function lists.uservalue(name,r,tag,default) -- to lua end function lists.size() - context(#lists.result) + return #lists.result end function lists.location(n) local l = lists.result[n] - context(l.references.internal or n) + return l.references.internal or n end function lists.label(n,default) local l = lists.result[n] local t = l.titledata - if t then - context(t.label or default or "") - end + return t and t.label or default or "" end function lists.sectionnumber(name,n,spec) @@ -589,6 +584,28 @@ function lists.savedprefixednumber(name,n) end end +function lists.haspagedata(name,n) + local data = lists.result[n] + if data then + local references = data.references + if references and references.realpage then -- or references.pagedata + return true + end + end + return false +end + +function lists.hasnumberdata(name,n) + local data = lists.result[n] + if data then + local numberdata = data.numberdata + if numberdata then + return true + end + end + return false +end + function lists.prefix(name,n,spec) helpers.prefix(lists.result[n],spec) end @@ -605,9 +622,9 @@ function lists.realpage(name,n) local data = lists.result[n] if data then local references = data.references - context(references and references.realpage or 0) + return references and references.realpage or 0 else - context(0) + return 0 end end @@ -656,3 +673,44 @@ function references.specials.order(var,actions) -- references.specials ! end end end + +-- interface (maybe strclistpush etc) + +commands.pushlist = lists.pushnesting +commands.poplist = lists.popnesting +commands.enhancelist = lists.enhance +commands.processlist = lists.process +commands.analyzelist = lists.analyze +commands.listtitle = lists.title +commands.listprefixednumber = lists.prefixednumber +commands.listprefixedpage = lists.prefixedpage + + +function commands.addtolist (...) context(lists.addto (...)) end +function commands.listsize (...) context(lists.size (...)) end +function commands.listlocation(...) context(lists.location(...)) end +function commands.listlabel (...) context(lists.label (...)) end +function commands.listrealpage(...) context(lists.realpage(...)) end + +function commands.listuserdata(...) + local str, metadata = lists.userdata(...) + if str then + -- local catcodes = metadata and metadata.catcodes + -- if catcodes then + -- context.sprint(catcodes,str) + -- else + -- context(str) + -- end + helpers.title(str,metadata) + end +end + +-- we could also set variables + +function commands.doiflisthaspageelse(...) + commands.doifelse(lists.haspagedata(...)) +end + +function commands.doiflisthasnumberelse(...) + commands.doifelse(lists.hasnumberdata(...)) +end diff --git a/tex/context/base/strc-lst.mkiv b/tex/context/base/strc-lst.mkiv deleted file mode 100644 index d80217a32..000000000 --- a/tex/context/base/strc-lst.mkiv +++ /dev/null @@ -1,998 +0,0 @@ -%D \module -%D [ file=strc-lst, -%D version=2008.10.20, -%D title=\CONTEXT\ Structure Macros, -%D subtitle=Lists, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\writestatus{loading}{ConTeXt Structure Macros / Lists} - -\registerctxluafile{strc-lst}{1.001} - -% needs clean up - -% nmstate -> no pagenumber if not start -% autocrossdocument -> todo -% expansion -> todo -% auto refs to lists (chain) -> todo (\dododowritetolist) -% todo: \normalexpanded{\noexpand\everylistentry\emptytoks\the\everylistentry}% \emptytoks, else loop - -\unprotect - -\installcorenamespace{list} -\installcorenamespace{listextras} -\installcorenamespace{listalternatives} -\installcorenamespace{listelement} -\installcorenamespace{listelementcommand} - -\installframedcommandhandler \??list {list} \??list - -\def\usenestedliststyleandcolor#1#2% will change - {\useliststyleandcolor#1#2% - \ifx\currentcolorparameter\empty \else - \resetinteractionparameter\c!color - \resetinteractionparameter\c!contrastcolor - \fi} - -\let\setuplists\setuplist % yes or no - -\unexpanded\def\doifelselist#1% can also move to \installcommandhandler - {\ifcsname\namedlisthash{#1}\s!parent\endcsname - \expandafter\firstoftwoarguments - \else - \expandafter\secondoftwoarguments - \fi} - -\setuplist - [\c!height=\v!broad, - \c!depth=\v!broad, - \c!offset=0.25em, - \c!maxwidth=, - \c!state=\v!start, - \c!coupling=\v!off, - \c!criterium=\v!local, - \c!number=0, - \c!width=3em, - \c!alternative=\c!b, - \c!style=\v!normal, - \c!textstyle=\listparameter\c!style, - \c!numberstyle=\listparameter\c!style, - \c!pagestyle=\listparameter\c!style, - %\c!color=, - \c!textcolor=\listparameter\c!color, - \c!numbercolor=\listparameter\c!color, - \c!pagecolor=\listparameter\c!color, - \c!numbercommand=\listnumbercommand, - \c!textcommand=\listtextcommand, - \c!pagecommand=\listpagecommand, - \c!pagenumber=\v!yes, - \c!headnumber=\v!yes, - \c!extras=, - \c!margin=\!!zeropoint, - \c!aligntitle=, - \c!before=, - \c!after=, - \c!inbetween=, - \c!symbol=, - \c!interaction=\v!sectionnumber, - \c!label=\v!no, - \c!distance=\!!zeropoint, - %\c!number*= - %\c!prefix*=, - %\c!pageprefix*=, - %\c!expansion=, - \c!limittext=\languageparameter\c!limittext] % not used currently - -% Whatever: - -\def\currentstructurelistnumber{0} - -% we have to deal with compatible processing, i.e. list elements that have two -% elements plus a pagenumber - -\let\listentry\gobblesixarguments - -\def\currentlistmethod{entry} -\def\currentlistindex {0} - -% The next code injects data into the list at the current level. - -\def\structurelistinject{\dotripleempty\dostructurelistinject} - -\def\dostructurelistinject[#1]% [#2][#3]% no check on nofarguments here - {\begingroup - \edef\currentlist{#1}% - \doifelse{\listparameter\c!state}\v!start\dodostructurelistinject\nonostructurelistinject} - -\def\dodostructurelistinject[#1][#2]% - {\endgroup} - -\def\dodostructurelistinject[#1][#2]% -% {\getparameters[\??li\??li][\c!type=userdata,\c!location=\v!none,#1]% -% \edef\currentlisttype {\@@li@@litype}% -% \edef\currentlistlocation{\@@li@@lilocation}% - {\setupcurrentlist[\c!type=userdata,\c!location=\v!none,#1]% grouped - \edef\currentlisttype {\listparameter\c!type}% - \edef\currentlistlocation{\listparameter\c!location}% - \setnextinternalreference - \edef\currentlistnumber{\ctxlua{structures.lists.push{ - references = { - internal = \nextinternalreference, - block = "\currentsectionblock", % handy for lists, like bibl - section = structures.sections.currentid(), - % location = "\currentlistlocation", - }, - metadata = { - kind = "\currentlisttype", - name = "\currentlist", - level = structures.sections.currentlevel(), - catcodes = \the\catcodetable, - }, - userdata = structures.helpers.touserdata(\!!bs\detokenize{#2}\!!es) - }}}% - % we can do the enhance injection at the lua end which saves tokenization and a call - \ifx\currentlistlocation\v!here - % this injects nodes ! - \expanded{\ctxlatelua{structures.lists.enhance(\currentlistnumber)}}% - % new from here - \xdef\currentstructurelistattribute{\ctxlua{tex.write(structures.references.setinternalreference(nil,nil,\nextinternalreference))}}% - \xdef\currentdestinationattribute{\number\lastdestinationattribute}% - %begingroup\attribute\destinationattribute\currentdestinationattribute\dontleavehmode\emptyhbox\endgroup % todo - \dontleavehmode\hbox attr \destinationattribute \currentdestinationattribute{}% todo - % end of new - \else - \ctxlua{structures.lists.enhance(\currentlistnumber)}% direct injection - \fi - \endgroup} - -\def\structurelistlocation - {\ctxlua{structures.lists.location(\currentlistindex)}} - -\def\structurelistpagenumber - {\dostarttagged\t!listpage\empty - \ctxlua{structures.lists.prefixedpage( - "\currentlist", - \currentlistindex, - { - separatorset = "\listparameter\c!pageprefixseparatorset", - conversionset = "\listparameter\c!pageprefixconversionset", - set = "\listparameter\c!pageprefixset", - segments = "\listparameter\c!pageprefixsegments", - connector = \!!bs\listparameter\c!pageprefixconnector\!!es, - }, - { - prefix = "\listparameter\c!pageprefix", - conversionset = "\listparameter\c!pageconversionset", - starter = \!!bs\listparameter\c!pagestarter\!!es, - stopper = \!!bs\listparameter\c!pagestopper\!!es, - } - )}% - \dostoptagged} - -\def\structurelistrealpagenumber - {\ctxlua{structures.lists.realpage("\currentlist",\currentlistindex)}} - -\def\structurelistfirst - {\dostarttagged\t!listdata{first}% not always ok - \ctxlua{structures.lists.userdata("\currentlist",\currentlistindex,"first")}% - \dostoptagged} - -\def\structurelistsecond - {\dostarttagged\t!listdata{second}% - \ctxlua{structures.lists.userdata("\currentlist",\currentlistindex,"second")}% - \dostoptagged} - -\def\structurelistuservariable#1% - {\dostarttagged\t!listdata{#1}% - \ctxlua{structures.lists.userdata("\currentlist",\currentlistindex,"#1")}% - \dostoptagged} - -% we also need named ones (of the current parent) - -% \appendtoks -% \to \everystructurelist - -\unexpanded\def\doplacestructurelist#1#2#3#4#5% beware, not a user command - {\dostarttagged\t!list\empty - \ctxlua{structures.lists.process { - names = "#1", - criterium = "#2", - number = "#3", - extras = "#4", - order = "#5" - }}% - \dostoptagged} - -\unexpanded\def\doanalyzestructurelist#1#2#3% - {\ctxlua{structures.lists.analyze { - names = "#1", - criterium = "#2", - number = "#3" - }}} - -\def\firststructureelementinlist#1% - {\ctxcommand{firstinlist("#1")}} - -\def\structurelistsize - {\ctxlua{structures.lists.size()}} - -\def\@@structurelistprocess{structurelist:process:} - -\unexpanded\def\installstructurelistprocessor#1#2% - {\expandafter\def\csname\@@structurelistprocess#1\endcsname{#2}} - -\def\usestructurelistprocessor#1% - {\csname\@@structurelistprocess#1\endcsname} - -\installstructurelistprocessor\s!default - {no list method} - -% push pop test: -% -% \starttext -% \placelist[chapter] [after={\placelist[section][criterium=local]}] -% \chapter{One} \section{Alpha} \section{Beta} -% \chapter{Two} \section{First} \section{Second} -% \stoptext - -\def\definelistextra - {\dodoubleargument\dodefinelistextra} - -\def\dodefinelistextra[#1][#2]% - {\getparameters[\??listextras#1:][#2]} - -% todo: more generic tracing - -\definelistextra - [\v!page] - [\c!before={\showmessage\m!system{14}{\currentlist/\currentlistindex}\page}] - -\def\processlistextrabefore{\executeifdefined{\??listextras\currentlistextra:\c!before}\relax} -\def\processlistextraafter {\executeifdefined{\??listextras\currentlistextra:\c!after }\relax} - -\unexpanded\def\processlistofstructure#1#2#3#4% name, method, n, extra - {\ctxlua{structures.lists.pushnesting(#3)}% - \edef\currentlist {#1}% - \edef\currentlistmethod {#2}% - \edef\currentlistindex {#3}% - \edef\currentlistextra {#4}% - \processlistextrabefore - \dostarttagged\t!listitem\currentlist - \csname\@@structurelistprocess - \ifcsname\@@structurelistprocess\currentlist:\currentlistmethod\endcsname\currentlist:\currentlistmethod\else - \ifcsname\@@structurelistprocess\currentlistmethod \endcsname\currentlistmethod \else - \ifcsname\@@structurelistprocess\currentlist \endcsname\currentlist \else - \s!default \fi\fi\fi - \endcsname - \dostoptagged - \processlistextraafter - \ctxlua{structures.lists.popnesting()}} - -% \installstructcurelistprocessor{pubs:userdata} -% {\ctxlua{structures.lists.userdata("\currentlist",\currentlistindex,"bibref")}} - -\installstructurelistprocessor{command} - {\ctxlua{structures.lists.userdata("\currentlist",\currentlistindex,"command")}} - -\installstructurelistprocessor{section} - {\dodolistelement - \currentlist - \structurelistlocation - \structurelistgenericnumber - \structurelistgenerictitle % hm, can end up in message (volkers test) - \structurelistpagenumber - \structurelistrealpagenumber} - -% so far (todo: also recursive) - -% TODO: also make this a commandhandler - -\def\listalternativeparameter#1% - {\ifcsname\??listalternatives\listparameter\c!alternative#1\endcsname - \csname\??listalternatives\listparameter\c!alternative#1\endcsname - \else - \listparameter{#1}% - \fi} - -\unexpanded\def\setuplistalternative[#1]% - {\dodoubleargument\getparameters[\??listalternatives#1]} - -\def\listfill {\listalternativeparameter\c!command } -\def\listskip {\listalternativeparameter\c!distance} -\def\listwidth {\listalternativeparameter\c!width } -\def\liststretch{\listalternativeparameter\c!stretch } - -% a : nr - tit - pag -% b : nr - tit - fill - pag -% c : nr - tit - dots - pag - -\setuplistalternative[a][\c!distance=0pt,\c!width=2em,\c!stretch=10em,\c!command=\hskip.25em\relax] -\setuplistalternative[b][\c!distance=5em,\c!width=2em,\c!stretch=10em,\c!command=\hfill] -\setuplistalternative[c][\c!distance=5em,\c!width=0pt,\c!stretch=10em,\c!command=\hskip.5em\listdots\hskip.5em\relax] - -%def\listdots{\leaders \hbox to .5em{\hss.\hss}\hfill} -\def\listdots{\gleaders\hbox to .5em{\hss.\hss}\hfill} - -\unexpanded\def\placelist - {\dodoubleempty\doplacelist} - -\unexpanded\def\placerawlist - {\dodoubleempty\doplacerawlist} - -\def\dobeginoflist - {\begingroup - \startpacked[\v!blank]} - -\def\doendoflist - {\stoppacked - \endgroup} - -\def\doplacelist[#1][#2]% - {\dobeginoflist - \doplacerawlist[#1][#2]% - \doendoflist} - -\newtoks\everystructurelist - -% writing to lists - -\let\dowritetolist \gobblefourarguments -\let\dodowritetolist\gobblefourarguments - -%D Regular list entries are bound to a specific location in order to -%D get the right pagenumber etc.\ associated. When pushing something -%D inbetween (in mkiv) it ends up directtly in the list. This is the -%D default because otherwise users will wonder why spacing might get -%D messed up (due to an unseen but present node). It is possible to -%D force a location by explicitly setting \type {location} to \type -%D {here}. -%D -%D Another way to force a certain order is to set the \type {order} -%D variable when placing a list. The \type {command} option only -%D pushes commands into the right order, and \type {all} orders all -%D entries (which might be too much). In this case no specific -%D location is needed with the inbetween method. Maybe additional -%D mechanisms show up some day. See \type {inbetween-001.tex} for an -%D example. - -% command : location=none -% userdata : location=none -% simple : location=here - -\unexpanded\def\writebetweenlist{\dodoubleempty \dowritebetweenlist} -\unexpanded\def\writedatatolist {\dotripleargument\dowritedatatolist} -\unexpanded\def\writetolist {\dodoubleempty \dowritetolist} - -\def\dowritebetweenlist[#1][#2]#3% we can overload location - {\doif{\namedlistparameter{#1}\c!state}\v!start - {\ifsecondargument - \dostructurelistinject[#1][#2,\c!type=command][command={#3}]% - \else - \dostructurelistinject[#1][\c!type=command][command={#3}]% - \fi}} - -\def\dowritedatatolist[#1][#2][#3]% we can overload location - {\doif{\namedlistparameter{#1}\c!state}\v!start - {\ifthirdargument - \dostructurelistinject[#1][#2,\c!type=userdata][#3]% - \else - \dostructurelistinject[#1][\c!type=userdata][#2]% - \fi}} - -\def\dowritetolist[#1][#2]#3#4% we can overload location - {\doif{\namedlistparameter{#1}\c!state}\v!start - {\ifsecondargument - \dostructurelistinject[#1][\c!location=\v!here,#2,\c!type=simple][first={#3},second={#4}]% - \else - \dostructurelistinject[#1][\c!location=\v!here,\c!type=simple][first={#3},second={#4}]% - \fi}} - -\installstructurelistprocessor{simple} - {\dodolistelement - \currentlist - \structurelistlocation - \structurelistfirst - \structurelistsecond - \structurelistpagenumber - \structurelistrealpagenumber} - -% % % - -\def\doplacerawlist[#1][#2]% listreferences will be redone - {\begingroup - \setuplist[#1][#2]% - \edef\currentlist{\firststructureelementinlist{#1}}% - \the\everystructurelist - \doif{\listparameter\c!coupling}\v!on{\startlistreferences{#1}}% - \doplacestructurelist - {#1}% - {\listparameter\c!criterium}% - {\number\listparameter\c!number}% - {\listparameter\c!extras}% - {\listparameter\c!order}% - \stoplistreferences - \endgroup - \dosetlistmode} - -\def\dosetlistmode - {\ifcase\structurelistsize\relax - \resetsystemmode\v!list - \else - \setsystemmode \v!list - \fi} - -\unexpanded\def\systemsuppliedchapter {\getvalue{\v!chapter}} % obsolete -\unexpanded\def\systemsuppliedtitle {\getvalue{\v!title}} % obsolete - -\def\dodocompletelist[#1][#2][#3]% enkelvoud, meervoud, instellingen - {\normalexpanded{\startnamedsection[\v!title][\c!title=\headtext{#2},\c!reference=#2]}% - \doplacelist[#1][#3]% - \stopnamedsection} - -\def\docompletelist[#1][#2]% - {\dodocompletelist[#1][#1][#2]} - -\unexpanded\def\completelist - {\dodoubleempty\docompletelist} - -\def\listelements {} % list of page breaks -\def\listnumbercommand #1{#1} % no strut due to interactive version -\def\listtextcommand #1{\begstrut#1\endstrut} -\def\listpagecommand #1{\strut#1} - -\def\doassignlistdimen#1#2#3% - {\doifinsetelse{#2}{\v!fit,\v!broad}{#1=#3}{#1=#2}\relax} - -\unexpanded\def\listsymbol[#1]#2% - {\begingroup - \edef\currentlist{#1}% - \def\currentlistnumber{#2}% no edef else tag problems - \currentlistsymbol - \endgroup} - -% Beware, the list symbol macro gets an argument passed, i.e. when this -% argument is not picked up, the symbol becomes a kind of prefix. - -% for historical reasons we're stuck to symbols, so in order to generalize, -% we have to hook it into the symbol handler; we need a beter clean up later -% -% < 2005 -% -% \def\dosetlistsymbol % #1 -% {\executeifdefined{listsymbol@\listparameter\c!symbol}\listsymbol@default} % {#1} -% -% >= 2005 -% -% at this symbol level, we have access to the raw 'number' in -% \currentlistnumber - -\definesymbol[\v!list][\v!none ][\listsymbol@none ] -\definesymbol[\v!list][\v!one ][\listsymbol@one ] -\definesymbol[\v!list][\v!two ][\listsymbol@two ] -\definesymbol[\v!list][\v!three ][\listsymbol@three ] -\definesymbol[\v!list][\s!default][\listsymbol@default] -\definesymbol[\v!list][\s!unknown][\listsymbol@unknown] - -\unexpanded\def\currentlistsymbol - {\doifinsymbolsetelse\v!list{\listparameter\c!symbol} - {\directsymbol\v!list{\listparameter\c!symbol}} - {\directsymbol\v!list\s!default}} - -\def\listsymbol@none - {\doassignlistdimen\scratchdimen{\listparameter\c!width}{1.5em}% - \hbox to \scratchdimen{}} - -\def\listsymbol@one - {\strut$\bullet$} - -\def\listsymbol@two - {\vrule\!!width1em\!!height1ex\!!depth\zeropoint} - -\def\listsymbol@three - {\begingroup - \doassignlistdimen{\dimen0}{\listparameter\c!width }{1.5em}% - \doassignlistdimen{\dimen2}{\listparameter\c!height}{1ex}% - \doassignlistdimen{\dimen4}{\listparameter\c!depth }\zeropoint - \vrule\!!width\dimen0\!!height\dimen2\!!depth\dimen4% - \endgroup} - -\def\listsymbol@default - {\strut - \begingroup - \edef\currentlistlabel{\listparameter\c!label}% - \ifx\currentlistlabel\empty % default - \listparameter\c!starter - \currentlistnumber - \listparameter\c!stopper - \else\ifx\currentlistlabel\v!no % also default - \listparameter\c!starter - \currentlistnumber - \listparameter\c!stopper - \else\ifx\currentlistlabel\v!none % real minimal (as suggested by WS) - \currentlistnumber - \else\ifx\currentlistlabel\v!yes % auto (use value stored in tuc file) - \edef\currentlistlabel{\ctxlua{structures.lists.label(\currentlistindex,"\currentlistlabel")}}% - \leftlabeltext\currentlistlabel - \listparameter\c!starter - \currentlistnumber - \listparameter\c!stopper - \rightlabeltext\currentlistlabel - \else % use whatever is set - \leftlabeltext\currentlistlabel - \listparameter\c!starter - \currentlistnumber - \listparameter\c!stopper - \rightlabeltext\currentlistlabel - \fi\fi\fi\fi - \endgroup} - -\def\listsymbol@unknown - {\listparameter\c!symbol} - -% so far for list symbols - -\def\dosomelistelement#1#2#3{#1 #2 #3} - -\setvalue{\??listelement a}{\let\dosomelistelement\dodofixdlistelementABC} -\setvalue{\??listelement b}{\let\dosomelistelement\dodofixdlistelementABC} -\setvalue{\??listelement c}{\let\dosomelistelement\dodofixdlistelementABC} -\setvalue{\??listelement d}{\let\dosomelistelement\dodofixdlistelementD} -\setvalue{\??listelement e}{\let\dosomelistelement\dodofixdlistelementE} -\setvalue{\??listelement f}{\let\dosomelistelement\dodofixdlistelementF} -\setvalue{\??listelement g}{\let\dosomelistelement\dodofixdlistelementG} - -\setvalue{\??listelement\v!none }{\def\dosomelistelement{\dodofreevlistelement}} -\setvalue{\??listelement\v!vertical }{\def\dosomelistelement{\dodofreevlistelement}} -\setvalue{\??listelement\v!horizontal}{\def\dosomelistelement{\dodofreehlistelement}} -\setvalue{\??listelement\v!command }{\let\dosomelistelement\dodocommandlistelement} - -% \setuplist -% [section] -% [alternative=MyListItem, -% after=\blank, -% before=\blank] -% -% \definelistplacement[MyListItem][none]#1#2#3% -% {(#1) (#2) (#3)} - -\unexpanded\def\definelistplacement - {\dodoubleempty\dodefinelistplacement} - -\def\dodefinelistplacement[#1][#2]% looks messy - {\setvalue{\??listelement#1}% - {\doifelsenothing{#2} - {\getvalue{\??listelement\v!command}}% - {\executeifdefined{\??listelement#2}{\getvalue{\??listelement\v!command}}}% - \setlistparameter\c!command{\getvalue{\??listelementcommand#1}}}% - \setvalue{\??listelementcommand#1}} - -% don't mess arround with endgraf/grouping else we loose leftskip - -% \strippedcsname\dodolistelement - -\def\newlineinlist{\space} - -\def\docurrentlistalternative - {\edef\currentlistalternative{\listparameter\c!alternative}% - \ifx\currentlistalternative\empty - [unknown list alternative]% - \else - \executeifdefined{\??listelement\currentlistalternative}{[unknown list alternative: \currentlistalternative]}% - \fi} - -\def\dodolistelement#1#2#3#4#5#6% - {\edef\currentlist{#1}% - \def\currentlistnumber{#3}% no edef else tag problem - \docurrentlistalternative - \letinteractionparameter\c!width\zeropoint - \dontcomplain - \dosomelistelement{#1}{#2}{#3}{#4}{#5}{#6}} - -\def\dodocommandlistelement#1#2#3#4#5#6% - {\doifdefinedelse{\currentlisthash\c!command} - {\listparameter\c!command{#3}{#4}{#5}} - {[\currentlist: #3 -- #4 -- #5]}} - -\def\domakelistelement#1#2#3#4% ref internal command data - {\dontleavehmode - \iflocation % we cannot tweak \iflocation as we nest - \doifelse{\listparameter\c!interaction}{#1} - {\begingroup - \doif{\namedheadparameter\currentlist\c!interaction}\v!list - {\dosetsimplepagereference{bck:#2}% - \attribute\destinationattribute\currentdestinationattribute}% - \directgoto{\setlocationcolor#4}[internal(#2)]% we can get the attribute instead so then we don't need a goto - \endgroup}% was \directgotobox - {#3{#4}}% - \else - #3{#4}% - \fi} - -\def\dodofreelistelement#1#2#3#4#5#6#7#8% #1 is sort of redundant - {\listparameter\c!before% can be \hskip - \doifdefinedelse{\currentlisthash\c!command} % maybe ifcsname - {\domakelistelement{\listparameter\c!interaction}{#2}\hbox - {\listparameter\c!command - {#3}% geen conversies etc - {#4}% geen conversies etc - {#5}}}% geen command - {#7% - \vbox - {\forgetall - \domakelistelement\v!all{#2}\hbox - {\doif{\listparameter\c!headnumber}\v!yes - {\domakelistelement\v!sectionnumber{#2}\hbox - {\usenestedliststyleandcolor\c!numberstyle\c!numbercolor - {\listparameter\c!numbercommand{\currentlistsymbol}}}}% - \domakelistelement\v!text{#2}\hbox - {\usenestedliststyleandcolor\c!textstyle\c!textcolor - {\let\\=\newlineinlist - \dontconvertfont - \listparameter\c!textcommand{#4}}}% - \doif{\listparameter\c!pagenumber}\v!yes - {\doifsomething{#5} - {\domakelistelement\v!pagenumber{#2}\hbox - {\usenestedliststyleandcolor\c!pagestyle\c!pagecolor - {\listparameter\c!pagecommand{#5}}}}}}}% - #8}% - \listparameter\c!after} - -\def\dodofreehlistelement#1#2#3#4#5#6% - {\dodofreelistelement{#1}{#2}{#3}{#4}{#5}{#6} - {\noindent}{}} - -\def\dodofreevlistelement#1#2#3#4#5#6% % \nointerlineskip needed, - {\dodofreelistelement{#1}{#2}{#3}{#4}{#5}{#6} % otherwise wrong spacing - {\ifvmode\nointerlineskip\fi} % at multi-line lists - {\ifvmode\nointerlineskip\fi\endgraf\allowbreak}} % test is saveguard - -% to be documented: align, hang - -\def\limitatedlistentry#1% - {\doifelsenothing{\listparameter\c!maxwidth} - {\listparameter\c!textcommand{#1}} - {\listparameter\c!textcommand - {\limitatetext - {#1}% - {\listparameter\c!maxwidth}% - {\splitsymbol{\listparameter\c!limittext}}}}} - -\def\dodofixdlistelementABC#1#2#3#4#5#6% weeden - {\endgraf - \leftskip\listparameter\c!margin% na de \endgraf ! - \listparameter\c!before - \!!widthc\listparameter\c!distance - \doifelse{\listparameter\c!width}\v!fit - {\!!widtha\zeropoint} - {\doifelsenothing{#3} - {\doifelse{\listparameter\c!aligntitle}\v!yes - {\!!widtha\zeropoint - \!!widthc\zeropoint} - {\!!widtha\listparameter\c!width}} - {\!!widtha\listparameter\c!width}}% - \endgraf - \noindent - \domakelistelement\v!all{#2}\hbox - {\setlocalhsize - \hsize\localhsize - \hbox to \hsize - {\forgetall - \useliststyleandcolor\c!style\c!color - \!!widthb\hsize - \doifelse{\listparameter\c!headnumber}\v!yes - {\setbox2\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi - {\domakelistelement\v!sectionnumber{#2}\hbox - {\usenestedliststyleandcolor\c!numberstyle\c!numbercolor - {\listparameter\c!numbercommand{\currentlistsymbol}}% - \hfill}}} - {\!!widtha\zeropoint - \!!widthc\zeropoint - \setbox2\emptyhbox}% - \setbox4\hbox - {\doif{\listparameter\c!pagenumber}\v!yes - {\doifsomething{#5} % \listwidth is new ; temp hack - {\hbox \ifdim\listwidth>\zeropoint to \listwidth\fi - {\hfill - \domakelistelement\v!pagenumber{#2}\hbox - {\usenestedliststyleandcolor\c!pagestyle\c!pagecolor - {\listparameter\c!pagecommand{#5}}}}}}}% - \vbox - {\hsize\!!widthb - \setupalign[\listparameter\c!align]% - \ifdim\!!widtha<\hsize - \hangindent\wd2 - \dimen2=\!!widthc % \listparameter\c!distance - \advance\hangindent \dimen2 - \hangafter\plusone - \doif{\listparameter\c!hang}\v!no{\hangafter\zerocount}% - \ifdim\wd4=\zeropoint % \ifvoid4 - % we kunnen gewoon afbreken aan het eind - \else - \ifdim\listskip>\zeropoint\relax - \rightskip\listskip\!!plus\liststretch\relax - \parfillskip-\rightskip - \fi - \fi - \else - \dimen2\zeropoint - \fi - \parindent\zeropoint\relax - \leavevmode -% % topaligned -% -% \dontleavehmode -% \scratchdimen\wd2 -% \setbox2\hbox to \hsize{\box2\hss\box4}% -% \wd2\scratchdimen -% - \box2\relax - \hskip\dimen2 - \domakelistelement\v!text{#2}\firstofoneargument - {\bgroup - \usenestedliststyleandcolor\c!textstyle\c!textcolor - {\let\\=\newlineinlist - \dontconvertfont - %\listparameter\c!textcommand{#4}}% - \limitatedlistentry{#4}}% - %\carryoverpar % new otherwise wrong linespacing - \egroup}% - \ifdim\wd4=\zeropoint\relax % \ifvoid4 - % \ifdim\!!widtha<\hsize \hfill\strut \fi % spoils align - \else - \nobreak\listfill - \box4\relax - \relax - \fi}% - \hss}}% new - \endgraf % new, else problems with nointerlinespace and prevdepth - \nointerlineskip % anders verkeerde spatiering bij multi-line - \endgraf - \allowbreak - \listparameter\c!after} - -% % example from the context list -% -% \setuphead [part] [page=right,placehead=yes] -% \setuplist [chapter] [alternative=d,before=\blank,after=\blank] -% \setuplist [part] [before=\blank,after=\blank] -% -% \starttext -% \startnarrower[2*right] \placecontent \stopnarrower -% \blank[4*big] -% \startsetups chapter -% \blank \startnarrower[3*middle] \placecontent[criterium=local] \stopnarrower -% \stopsetups -% \placelist[part][criterium=text,after=\setups{chapter}] -% -% \part{First part} \chapter{Chapter one} \chapter{Chapter two} -% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} -% \part{Second part} \chapter{Chapter one} \chapter{Chapter two} -% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} -% \part{Third part} \chapter{Chapter one} \chapter{Chapter two} -% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} -% \stoptext - -% overrulen interactie kan sneller, bv door hulpconstanten -% te gebruiken en die te letten - -\def\dodofixdlistelementD#1#2#3#4#5#6% - {%\leftskip=\listparameter\c!margin - \ifvmode - \advance\leftskip\listparameter\c!margin% AANGEPAST - \fi - \bgroup - \ifvmode - \noindent\leavevmode % leavevmode ? ? ? - \fi -%% actually, the next can be supported now (will be enabled when I have time to test it) - \doif{\listparameter\c!interaction}\v!text % not supported - {\setlistparameter\currentlist\c!interaction\v!sectionnumber}% - \doif{\listparameter\c!interaction}\v!all % not supported - {\setlistparameter\currentlist\c!interaction\v!sectionnumber}% -%% - \setbox4\hbox - {\doif{\listparameter\c!pagenumber}\v!yes - {\doifsomething{#5} - {\domakelistelement\v!pagenumber{#2}\hbox - {\usenestedliststyleandcolor\c!pagestyle\c!pagecolor - {\listparameter\c!pagecommand{#5}}}}}}% -%% \domakelistelement\v!all{#2}\firstofoneargument{% - \doif{\listparameter\c!headnumber}\v!yes - {\donetrue - \doifnothing{#3}{\doifnothing{\listparameter\c!symbol}\donefalse}% - % == \doifnothing{#3\listparameter\c!symbol}\donefalse - \ifdone - \hbox - {\listparameter\c!left - \domakelistelement\v!sectionnumber{#2}\hbox - {\usenestedliststyleandcolor\c!numberstyle\c!numbercolor - {\listparameter\c!numbercommand{\currentlistsymbol}}}% - \listparameter\c!right - \hskip.5em}% - \nobreak - \fi}% - \tolerance3500 % niet zomaar veranderen -%% \domakelistelement\v!text{#2}\firstofoneargument{% - \usenestedliststyleandcolor\c!textstyle\c!textcolor - {\let\\=\newlineinlist - \dontconvertfont - %\listparameter\c!textcommand{#4}}% - \limitatedlistentry{#4}}% -%% }% - \ifvoid4\else - \nobreak - \hskip.75em\relax - \nobreak - \box4 - \fi -%% }% - \dimen0=\listparameter\c!distance\relax - \ifdim\dimen0<1em\relax - \hskip1em\!!plus1em\!!minus.25em\relax - \else - \hskip\dimen0\!!plus.5\dimen0\!!minus.25\dimen0\relax - \fi - \egroup} - -\def\dodofixdlistelementE#1% - {\dodofixdlistelementEFG - {\setupinteraction[\c!strut=\v!no]} - {\letlistparameter\c!depth\!!zeropoint - \letlistparameter\c!color\empty - \inheritedlistframed} - {}} - -\def\dodofixdlistelementF#1% - {\dodofixdlistelementEFG - {} - {\dosetraggedhbox{\listparameter\c!align}\raggedbox} - {}} - -\def\dodofixdlistelementG#1% - {\dodofixdlistelementEFG - {} - \midaligned - {}} - -\def\dodofixdlistelementEFG#1#2#3#4#5#6#7#8% - {\noindent - \bgroup - \domakelistelement\v!all{#4}{#2}% - {\let\\=\newlineinlist - #1% in case E nils the strut (still needed?) - \usesetliststyleandcolor\c!style\c!color - \ignorespaces\dontconvertfont\setstrut - \begstrut - \limitatedlistentry{#6}% - \endstrut}% - \egroup - \par - \listparameter\c!inbetween} - -\def\listlength{\utilitylistlength} -\def\listwidth {\utilitylistwidth} -\def\listheight{\utilitylistheight} - -\def\utilitylistlength {0} -\def\utilitylistwidth {0pt} % no longer supported -\def\utilitylistheight {0pt} % no longer supported - -\def\dodeterminelistcharacteristics[#1][#2]% - {\begingroup - \setuplist[#1][#2]% - \edef\currentlist{\firststructureelementinlist{#1}}% - \the\everystructurelist - \doanalyzestructurelist{#1}{\listparameter\c!criterium}{\number\listparameter\c!number}% - \xdef\utilitylistlength{\structurelistsize}% - \endgroup - \dosetlistmode} - -\unexpanded\def\determinelistcharacteristics - {\dodoubleempty\dodeterminelistcharacteristics} - -% todo: make simple parameter handler - -\def\combinedlistparameter#1{\csname\??ih\currentcombinedlist#1\endcsname} % to be redone! -\def\combinedlisttoks {\csname\??ih::\currentcombinedlist\endcsname} % to be redone! - -\unexpanded\def\definecombinedlist - {\dotripleempty\dodefinecombinedlist} - -\def\dodefinecombinedlist[#1][#2][#3]% - {\edef\currentcombinedlist{#1}% - \getparameters - [\??ih#1] - [\c!criterium=\v!local,\c!number=0,\c!list={#2},#3]% - \expandafter\newtoks\csname\??ih::\currentcombinedlist\endcsname - \combinedlisttoks{#3}% - \setvalue{\e!setup#1\e!endsetup}{\dodoubleempty\dosetupcombinedlist[#1]}% - \setvalue{\e!place#1}{\dodoubleempty\doplacecombinedlist[#1]}% - \setvalue{\e!complete#1}{\dodoubleempty\docompletecombinedlist[#1]}} - -\unexpanded\def\setupcombinedlist - {\dodoubleargument\dosetupcombinedlist} - -% \def\dosetupcombinedlist[#1][#2]% this will change, as we now adapt all list elements -% {\getparameters[\??ih#1][#2]% % maybe some parent magic or store in a toks -% \edef\currentcombinedlist{#1}% -% \normalexpanded{\setuplist[\combinedlistparameter\c!list]}[#2]} - -\def\dosetupcombinedlist[#1][#2]% - {\edef\currentcombinedlist{#1}% - \getparameters[\??ih#1][#2]% - \combinedlisttoks\expandafter{\the\combinedlisttoks,#2}}% can accumulate - -\unexpanded\def\placecombinedlist - {\dodoubleempty\doplacecombinedlist} - -\def\doplacecombinedlist[#1][#2]% we can move much of the analysis to lua - {\begingroup - % level is no longer supported - \edef\currentcombinedlist{#1}% - \getparameters[\??ih#1][#2]% - \edef\combinedlist{\combinedlistparameter\c!list}% - \the\everystructurelist - \doif{\combinedlistparameter\c!coupling}\v!on{\startlistreferences{#1}}% - \dobeginoflist -% \normalexpanded{\setuplist[\combinedlist][#2]}% -\normalexpanded{\setuplist[\combinedlist][\the\combinedlisttoks,#2]}% or ,}#2]% - \doplacestructurelist - {\combinedlist}% - {\combinedlistparameter\c!criterium}% - {\combinedlistparameter\c!number}% - {\combinedlistparameter\c!extras}% - {\combinedlistparameter\c!order}% - \doendoflist - \stoplistreferences - \endgroup - \dosetlistmode} - -\def\docompletecombinedlist[#1][#2]% - {\normalexpanded{\startnamedsection[\v!title][\c!title={\headtext{#1}},\c!reference=#1]}% - \doplacecombinedlist[#1][#2]% - \stopnamedsection} - -% lists that have a number/title are kind of generic and can share code - -\installstructurelistprocessor{number+title} - {\dodolistelement - \currentlist - \structurelistlocation - \structurelistgenericnumber - \structurelistgenerictitle - \structurelistpagenumber - \structurelistrealpagenumber} - -\def\structurelistgenerictitle - {\dostarttagged\t!listcontent\empty - \ctxlua{structures.lists.title("\currentlist",\currentlistindex)}% - \dostoptagged} - -\def\structurelistgenericnumber % tricky, we need to delay tagging as we have nested lua calls - {\dostarttagged\t!listtag\empty - \ctxlua{structures.lists.prefixednumber("\currentlist",\currentlistindex, { - prefix = "\listparameter\c!prefix", - separatorset = "\listparameter\c!prefixseparatorset", - conversionset = "\listparameter\c!prefixconversionset", - starter = \!!bs\listparameter\c!prefixstarter\!!es, - stopper = \!!bs\listparameter\c!prefixstopper\!!es, - set = "\listparameter\c!prefixset", - segments = "\listparameter\c!prefixsegments", - connector = \!!bs\listparameter\c!prefixconnector\!!es, - }, - { - separatorset = "\listparameter\c!numberseparatorset", - conversionset = "\listparameter\c!numberconversionset", - starter = \!!bs\listparameter\c!numberstarter\!!es, - stopper = \!!bs\listparameter\c!numberstopper\!!es, - segments = "\listparameter\c!numbersegments", - } )}% - \dostoptagged} - -\protect \endinput diff --git a/tex/context/base/strc-lst.mkvi b/tex/context/base/strc-lst.mkvi new file mode 100644 index 000000000..b0c2aa8c8 --- /dev/null +++ b/tex/context/base/strc-lst.mkvi @@ -0,0 +1,1199 @@ +%D \module +%D [ file=strc-lst, +%D version=2008.10.20, +%D title=\CONTEXT\ Structure Macros, +%D subtitle=Lists, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Structure Macros / Lists} + +\registerctxluafile{strc-lst}{1.001} + +% clean up in progress ... +% +% also (long term) todo: +% +% autocrossdocument +% auto refs to lists (chain) +% +% TODO: strut=yes|no + +\unprotect + +\ifdefined\c!renderingsetup \else \def\c!renderingsetup{renderingsetup} \fi % maybe not interfaced +\ifdefined\c!filler \else \def\c!filler {filler} \fi + +%D Lists are mostly used for tables of contents but are in fact a rather generic +%D feature of \CONTEXT. We seperate between storage and rendering and the current +%D implementation is a reworked version of all that was added in steps. As lists +%D are used frequently compatibility is an important aspect. A couple of rendering +%D alternatives are provided here but more are possible. + +\installcorenamespace{list} + +\installframedcommandhandler \??list {list} \??list + +\let\setuplists\setuplist % yes or no + +\setuplist + [\c!height=\v!broad, + \c!depth=\v!broad, + \c!offset=.25\emwidth, + \c!state=\v!start, + \c!coupling=\v!off, + \c!criterium=\v!local, + \c!number=\zerocount, + \c!width=3\emwidth, + %\c!maxwidth=, + \c!distance=\zeropoint, + \c!margin=\zeropoint, + \c!alternative=\c!b, + \c!style=\v!normal, + %\c!color=, + \c!textstyle=\listparameter\c!style, % \currentliststyleparameter (but then we need to set it in every ...) + \c!numberstyle=\listparameter\c!style, % \currentliststyleparameter + \c!pagestyle=\listparameter\c!style, % \currentliststyleparameter + \c!textcolor=\listparameter\c!color, % \currentlistcolorparameter (but then we need to set it in every ...) + \c!numbercolor=\listparameter\c!color, % \currentlistcolorparameter + \c!pagecolor=\listparameter\c!color, % \currentlistcolorparameter + \c!numbercommand=\firstofoneargument, + \c!textcommand=\firstofoneargument, + \c!pagecommand=\firstofoneargument, + \c!pagenumber=\v!yes, + \c!headnumber=\v!yes, % old (keep for a while) +% \c!headnumber=\v!yes, % old (keep for a while) +% \c!sectionnumber=\listparameter\c!headnumber, % use this instead + \c!interaction=\v!all, % was \v!sectionnumber, % or make this headnumber (or accept both) + \c!label=\v!no, + %\c!extras=, + %\c!aligntitle=, + %\c!before=, + %\c!after=, + %\c!inbetween=, + %\c!symbol=, + %\c!expansion=, + \c!limittext=\languageparameter\c!limittext] % not used currently + +%D Helpers: + +\unexpanded\def\usenestedliststyleandcolor#style#color% will change + {\useliststyleandcolor#style#color% + \ifx\currentcolorparameter\empty \else + \resetinteractionparameter\c!color + \resetinteractionparameter\c!contrastcolor + \fi} + +\unexpanded\def\doifelselist#tag% can also move to \installcommandhandler + {\ifcsname\namedlisthash{#tag}\s!parent\endcsname + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + +%D Regular list entries are bound to a specific location in order to +%D get the right pagenumber etc.\ associated. When pushing something +%D inbetween (in mkiv) it ends up directtly in the list. This is the +%D default because otherwise users will wonder why spacing might get +%D messed up (due to an unseen but present node). It is possible to +%D force a location by explicitly setting \type {location} to \type +%D {here}. +%D +%D Another way to force a certain order is to set the \type {order} +%D variable when placing a list. The \type {command} option only +%D pushes commands into the right order, and \type {all} orders all +%D entries (which might be too much). In this case no specific +%D location is needed with the inbetween method. Maybe additional +%D mechanisms show up some day. See \type {inbetween-001.tex} for an +%D example. + +% command : location=none +% userdata : location=none +% simple : location=here + +\unexpanded\def\structurelistinject + {\dotripleempty\strc_lists_inject} + +\def\strc_lists_inject[#tag]% + {\begingroup + \edef\currentlist{#tag}% + \doifelse{\listparameter\c!state}\v!start\strc_lists_inject_yes\strc_lists_inject_nop} + +\def\strc_lists_inject_nop[#dummya][#dummyb]% + {\endgroup} + +\def\strc_lists_inject_yes[#settings][#userdata]% + {\setupcurrentlist[\c!type=userdata,\c!location=\v!none,#settings]% grouped + \edef\p_location{\listparameter\c!location}% + \setnextinternalreference + \edef\currentlistnumber{\ctxcommand{addtolist{ + references = { + internal = \nextinternalreference, + block = "\currentsectionblock", % handy for lists, like bibl + section = structures.sections.currentid(), + % location = "\p_location", + }, + metadata = { + kind = "\listparameter\c!type", + name = "\currentlist", + level = structures.sections.currentlevel(), + catcodes = \the\catcodetable, + }, + userdata = \!!bs\detokenize{#userdata}\!!es % will be converted to table at the lua end + }}}% + \ifx\p_location\v!here + % this branch injects nodes ! + \expanded{\ctxlatecommand{enhancelist(\currentlistnumber)}}% + \ctxlua{structures.references.setinternalreference(nil,nil,\nextinternalreference)}% will change + \xdef\currentstructurelistattribute{\number\lastdestinationattribute}% + \dontleavehmode\hbox attr \destinationattribute \lastdestinationattribute{}% todo + \else + % and this one doesn't + \ctxcommand{enhancelist(\currentlistnumber)}% + \fi + \endgroup} + +\unexpanded\def\writebetweenlist{\dodoubleempty \strc_lists_write_between} +\unexpanded\def\writedatatolist {\dotripleargument\strc_lists_write_data_to} +\unexpanded\def\writetolist {\dodoubleempty \strc_lists_write_to} + +\def\strc_lists_write_between[#tag][#settings]#command% we can overload location + {\doif{\namedlistparameter{#tag}\c!state}\v!start + {\strc_lists_inject_yes[#tag][#settings,\c!type=\s!command][\s!command={#command}]}} + +\def\strc_lists_write_data_to[#tag][#settings][#userdata]% we can overload location + {\doif{\namedlistparameter{#tag}\c!state}\v!start + {\ifthirdargument + \strc_lists_inject_yes[#tag][#settings,\c!type=\s!userdata][#userdata]% + \else + \strc_lists_inject_yes[#tag][\c!type=\s!userdata][#settings]% + \fi}} + +\def\strc_lists_write_to[#tag][#settings]#first#second% we can overload location + {\doif{\namedlistparameter{#tag}\c!state}\v!start + {\strc_lists_inject_yes[#tag][\c!location=\v!here,#settings,\c!type=\s!simple][\s!first={#first},\s!second={#second}]}} + +%D When placing a list either one or a set can be giving. This makes +%D it possible to flush for instance an nested (or merged) table of +%D contents. Keep in mind that placing a list is what we do most (think +%D of tables of contents, figures, etc.\ but other usag eis also possible +%D in which case low level commands have to be used. + +\newtoks\everystructurelist + +\unexpanded\def\placelist + {\dodoubleempty\strc_lists_place} + +\unexpanded\def\placerawlist + {\dodoubleempty\strc_lists_place_raw} + +\def\strc_lists_place[#taglist][#settings]% + {\begingroup + \startpacked[\v!blank]% + \edef\m_list {#taglist}% + \edef\m_first{\firststructureelementinlist{#taglist}}% + \ifx\m_list\m_first + % use settings of first + \else + % use settings of root + \let\m_first\empty + \fi + \strc_lists_place_indeed\m_first\m_list{#settings}% + \stoppacked + \endgroup} + +\def\strc_lists_place_raw[#tag][#settings]% just one list + {\strc_lists_place_indeed\empty{#tag}{#settings}} + +\def\strc_lists_place_indeed#tag#list#settings% + {\begingroup + \edef\currentlist{#tag}% + \setupcurrentlist[#settings]% + \the\everystructurelist + % \doif{\listparameter\c!coupling}\v!on{\startlistreferences{#tag}}% + \doplacestructurelist % maybe inline + {#list}% + {\listparameter\c!criterium}% + {\listparameter\c!number}% + {\listparameter\c!extras}% + {\listparameter\c!order}% + % \stoplistreferences + \endgroup + \strc_lists_set_mode} + +\def\strc_lists_set_mode + {\ifcase\structurelistsize\relax + \resetsystemmode\v!list + \else + \setsystemmode \v!list + \fi} + +%D Complete lists are just lists but with a title. They were +%D originally introduced to minimize the number for commands in +%D a document source but nowadays that is less an issue in the +%D sense that the extra few lines are neglectable to the rest. + +\unexpanded\def\systemsuppliedchapter {\getvalue{\v!chapter}} % obsolete +\unexpanded\def\systemsuppliedtitle {\getvalue{\v!title}} % obsolete + +\unexpanded\def\completelist + {\dodoubleempty\strc_lists_complete} + +\def\strc_lists_complete[#tag][#settings]% + {\strc_lists_complete_indeed[#tag][#tag][#settings]} + +\def\strc_lists_complete_indeed[#singular][#plural][#settings]% + {\normalexpanded{\startnamedsection[\v!title][\c!title=\headtext{#plural},\c!reference=#singular]}% + \strc_lists_place[#singular][#settings]% + \stopnamedsection} + +%D Combined list provide a nice level of abstraction. +%D +%D \starttyping +%D \definecombinedlist[whatever][a,b,c][settings] +%D \stoptyping + +\unexpanded\def\definecombinedlist + {\dotripleempty\strc_lists_combined_define} + +\def\strc_lists_combined_define[#tag][#list][#settings]% + {\definelist[#tag][\c!criterium=\v!local,\c!number=0,\c!list={#list},#settings]% inherits from root + \setvalue{\e!setup #tag\e!endsetup}{\dodoubleempty\strc_lists_combined_setup [#tag]}% + \setvalue{\e!place #tag}{\dodoubleempty\strc_lists_combined_place [#tag]}% + \setvalue{\e!complete #tag}{\dodoubleempty\strc_lists_combined_complete[#tag]}} + +\unexpanded\def\setupcombinedlist + {\dodoubleargument\strc_lists_combined_setup} + +\def\strc_lists_combined_setup[#tag][#settings]% + {\ifsecondargument + \setuplist[#tag][#settings]% we don't want to mess up the parent + \fi} + +\unexpanded\def\placecombinedlist + {\dodoubleempty\strc_lists_combined_place} + +\def\strc_lists_combined_place[#tag][#settings]% i.e. no list set in settings + {\begingroup + \strc_lists_place_indeed{#tag}{\listparameter\c!list}{#settings}% + \endgroup} + +\def\strc_lists_combined_complete[#tag][#settings]% + {\normalexpanded{\startnamedsection[\v!title][\c!title={\headtext{#tag}},\c!reference=#tag]}% + \strc_lists_combined_place[#tag][#settings]% + \stopnamedsection} + +%D Given that some variables are set, we can ask for some properties of +%D an entry. + +\def\currentstructurelistnumber{0} % injection +\def\currentlistmethod {entry} % typesetting +\def\currentlistindex {0} % typesetting + +\def\structurelistlocation + {\ctxcommand{listlocation(\currentlistindex)}} + +\def\structurelistrealpagenumber + {\ctxcommand{listrealpage("\currentlist",\currentlistindex)}} + +\unexpanded\def\structurelistpagenumber + {\dostarttagged\t!listpage\empty + \ctxcommand{listprefixedpage( + "\currentlist", + \currentlistindex, + { + separatorset = "\listparameter\c!pageprefixseparatorset", + conversionset = "\listparameter\c!pageprefixconversionset", + set = "\listparameter\c!pageprefixset", + segments = "\listparameter\c!pageprefixsegments", + connector = \!!bs\listparameter\c!pageprefixconnector\!!es, + }, + { + prefix = "\listparameter\c!pageprefix", + conversionset = "\listparameter\c!pageconversionset", + starter = \!!bs\listparameter\c!pagestarter\!!es, + stopper = \!!bs\listparameter\c!pagestopper\!!es, + } + )}% + \dostoptagged} + +\unexpanded\def\structurelistuservariable#name% + {\dostarttagged\t!listdata{#name}% + \ctxcommand{listuserdata("\currentlist",\currentlistindex,"#name")}% + \dostoptagged} + +\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s! +\unexpanded\def\structurelistsecond{\structurelistuservariable\s!second} % s! + +\unexpanded\def\doifstructurelisthaspageelse + {\ctxcommand{doiflisthaspageelse("\currentlist",\currentlistindex)}} + +\unexpanded\def\doifstructurelisthasnumberelse + {\ctxcommand{doiflisthasnumberelse("\currentlist",\currentlistindex)}} + +\unexpanded\def\structurelistgenerictitle + {\dostarttagged\t!listcontent\empty + \ctxcommand{listtitle("\currentlist",\currentlistindex)}% + \dostoptagged} + +\unexpanded\def\structurelistgenericnumber % tricky, we need to delay tagging as we have nested lua calls + {\dostarttagged\t!listtag\empty + \ctxcommand{listprefixednumber("\currentlist",\currentlistindex, { + prefix = "\listparameter\c!prefix", + separatorset = "\listparameter\c!prefixseparatorset", + conversionset = "\listparameter\c!prefixconversionset", + starter = \!!bs\listparameter\c!prefixstarter\!!es, + stopper = \!!bs\listparameter\c!prefixstopper\!!es, + set = "\listparameter\c!prefixset", + segments = "\listparameter\c!prefixsegments", + connector = \!!bs\listparameter\c!prefixconnector\!!es, + }, + { + separatorset = "\listparameter\c!numberseparatorset", + conversionset = "\listparameter\c!numberconversionset", + starter = \!!bs\listparameter\c!numberstarter\!!es, + stopper = \!!bs\listparameter\c!numberstopper\!!es, + segments = "\listparameter\c!numbersegments", + } )}% + \dostoptagged} + +% TODO: pass extra tag name (contents, figures, bibliography ...) + +\unexpanded\def\doplacestructurelist#list#criterium#number#extras#order% beware, not a user command + {\dostarttagged\t!list\empty + \ctxcommand{processlist{ + names = "#list", + criterium = "#criterium", + number = "\number#number", + extras = "#extras", + order = "#order" + }}% + \dostoptagged} + +\unexpanded\def\doanalyzestructurelist#list#criterium#number% + {\ctxcommand{analyzelist{ + names = "#list", + criterium = "#criterium", + number = "\number#number" + }}} + +\def\firststructureelementinlist#list% + {\ctxcommand{firstinset("#list")}} + +\def\structurelistsize + {\ctxcommand{listsize()}} + +%D Depending on what kind of list we have (e.g.\ a section related one) +%D processors can be defined. + +% push pop test: +% +% \starttext +% \placelist[chapter] [after={\placelist[section][criterium=local]}] +% \chapter{One} \section{Alpha} \section{Beta} +% \chapter{Two} \section{First} \section{Second} +% \stoptext + +\installcorenamespace{structurelistprocessor} % the topmost list handler +\installcorenamespace{listextra} % control of that handler + +\installcommandhandler \??listextra {listextra} \??listextra + +\definelistextra % example + [\v!page] + [\c!before={\showmessage\m!system{14}{\currentlist/\currentlistindex}\page}] + +\unexpanded\def\installstructurelistprocessor#tag#meaning% + {\expandafter\normaldef\csname\??structurelistprocessor#tag\endcsname{#meaning}} + +\def\usestructurelistprocessor#tag% + {\csname\??structurelistprocessor#tag\endcsname} + +\unexpanded\def\strclistsentryprocess#tag#method#index#extra% This one is called at the lua end! + {\ctxcommand{pushlist(#index)}% + \edef\currentlist {#tag}% + \edef\currentlistmethod{#method}% + \edef\currentlistindex {#index}% + \edef\currentlistextra {#extra}% + \listextraparameter\c!before + \dostarttagged\t!listitem\currentlist + \csname\??structurelistprocessor + \ifcsname\??structurelistprocessor\currentlist:\currentlistmethod\endcsname\currentlist:\currentlistmethod\else + \ifcsname\??structurelistprocessor\currentlistmethod \endcsname\currentlistmethod \else + \ifcsname\??structurelistprocessor\currentlist \endcsname\currentlist \else + \s!default \fi\fi\fi + \endcsname + \dostoptagged + \listextraparameter\c!after + \ctxcommand{poplist()}} + +% lists that have a number/title are kind of generic and can share code + +\installstructurelistprocessor\s!default + {no list method} + +\installstructurelistprocessor\s!simple + {\let\currentlistentrynumber \structurelistfirst + \let\currentlistentrytitle \structurelistsecond + \let\currentlistentrypagenumber\structurelistpagenumber + \strc_lists_apply_renderingsetup} + +\installstructurelistprocessor\s!command + {\ctxcommand{listuserdata("\currentlist",\currentlistindex,"\s!command")}} + +\installstructurelistprocessor{section} + {\let\currentlistentrynumber \structurelistgenericnumber + \let\currentlistentrytitle \structurelistgenerictitle + \let\currentlistentrypagenumber\structurelistpagenumber + \strc_lists_apply_renderingsetup} + +\installstructurelistprocessor{number+title} + {\let\currentlistentrynumber \structurelistgenericnumber + \let\currentlistentrytitle \structurelistgenerictitle + \let\currentlistentrypagenumber\structurelistpagenumber + \strc_lists_apply_renderingsetup} + +% example of usage elsewhere: +% +% \installstructcurelistprocessor{pubs:userdata} +% {\ctxcommand{listuserdata("\currentlist",\currentlistindex,"bibref")}} + +%D List symbols are used in interactive documents where no numbers +%D are used but nevertheless structure is present. Beware, the list +%D symbol macro gets an argument passed, i.e. when this argument is +%D not picked up, the symbol becomes a kind of prefix. It's not really +%D a user command (and might even get protected). + +\unexpanded\def\listsymbol[#tag]#number% + {\begingroup + \edef\currentlist{#tag}% + \def\currentlistentrynumber{#number}% no edef else tag problems + \currentlistsymbol + \endgroup} + +% For historical reasons we're stuck to symbols, so in order to generalize, +% we have to hook it into the symbol handle. One way to deal with this is +% to use a different key and as it makes sense to use setups instead of +% def's we use a new key 'renderingsetup' which is the name of a setup. + +\def\strc_lists_assign_dimen#dimension#key#default% + {\edef\m_strc_list_dimen{\listparameter#key}% + \doifinsetelse\m_strc_list_dimen{\v!fit,\v!broad}{#dimension#default}{#dimension\m_strc_list_dimen}\relax} + +\definesymbol[\v!list][\v!none ][\strc_lists_symbol_none] +\definesymbol[\v!list][\v!one ][\strc_lists_symbol_one] +\definesymbol[\v!list][\v!two ][\strc_lists_symbol_two] +\definesymbol[\v!list][\v!three ][\strc_lists_symbol_three] +\definesymbol[\v!list][\s!default][\strc_lists_symbol_default] +\definesymbol[\v!list][\s!unknown][\strc_lists_symbol_unknown] + +\unexpanded\def\currentlistsymbol + {\edef\p_symbol{\listparameter\c!symbol}% + \doifinsymbolsetelse\v!list\p_symbol + {\directsymbol\v!list\p_symbol} + {\directsymbol\v!list\s!default}} + +\unexpanded\def\strc_lists_symbol_none + {\strc_lists_assign_dimen\scratchwidth\c!width{1.5\emwidth}% + \hbox to \scratchwidth{}} + +\unexpanded\def\strc_lists_symbol_one + {\strut\symbol[bullet]} + +\unexpanded\def\strc_lists_symbol_two + {\vrule\!!width\emwidth\!!height\exheight\!!depth\zeropoint} + +\unexpanded\def\strc_lists_symbol_three + {\begingroup + \strc_lists_assign_dimen\scratchwidth \c!width {1.5\emwidth}% + \strc_lists_assign_dimen\scratchheight\c!height\exheight + \strc_lists_assign_dimen\scratchdepth \c!depth \zeropoint + \vrule\!!width\scratchwidth\!!height\scratchheight\!!depth\scratchdepth + \endgroup} + +\unexpanded\def\strc_lists_symbol_unknown + {\listparameter\c!symbol} + +\installcorenamespace{listsymbollabels} + +\unexpanded\def\strc_lists_symbol_default + {\dontleavehmode + \strut + \begingroup + \edef\currentlistlabel{\listparameter\c!label}% can be used in label + \csname\??listsymbollabels + \ifcsname\??listsymbollabels\currentlistlabel\endcsname\currentlistlabel\else\s!unknown\fi + \endcsname + \endgroup} + +\setvalue{\??listsymbollabels\s!unknown}% use whatever is set + {\leftlabeltext\currentlistlabel + \listparameter\c!starter + \currentlistentrynumber + \listparameter\c!stopper + \rightlabeltext\currentlistlabel} + +\setvalue{\??listsymbollabels}% default (empty) + {\listparameter\c!starter + \currentlistentrynumber + \listparameter\c!stopper} + +\setvalue{\??listsymbollabels\v!no}% also default + {\listparameter\c!starter + \currentlistentrynumber + \listparameter\c!stopper} + +\setvalue{\??listsymbollabels\v!none}% real minimal (as suggested by WS) + {\currentlistentrynumber} + +\setvalue{\??listsymbollabels\v!yes}% auto (use value stored in tuc file) + {\edef\currentlistlabel{\ctxcommand{listlabel(\currentlistindex,"\currentlistlabel")}}% + \leftlabeltext\currentlistlabel + \listparameter\c!starter + \currentlistentrynumber + \listparameter\c!stopper + \rightlabeltext\currentlistlabel} + +% a : nr - tit - pag +% b : nr - tit - fill - pag +% c : nr - tit - dots - pag +% d : inline +% e : interaction +% f : interaction +% g : interaction + +\installcorenamespace{listalternative} % specific ways of rendering a list + +\installcommandhandler \??listalternative {listalternative} \??listalternative + +% Commands are bound to specific list instances as often these are +% quite special and don't apply to multiple. So, being strict saves +% us resets. + +\setuplistalternative + [\c!command=\strictlistparameter\c!command] + +\definelistalternative + [a] + [\c!distance=0pt, + \c!width=2em, + \c!stretch=10em, + \c!filler=\hskip.25em\relax, + \c!renderingsetup=\??listrenderings:abc] + +\definelistalternative + [b] + [\c!distance=5em, + \c!width=2em, + \c!stretch=10em, + \c!filler=\hfill, + \c!renderingsetup=\??listrenderings:abc] + +\definelistalternative + [c] + [\c!distance=5em, + \c!width=0pt, + \c!stretch=10em, + \c!filler=\hskip.5em\gleaders\hbox to .5em{\hss.\hss}\hfill\hskip.5em\relax, + \c!renderingsetup=\??listrenderings:abc] + +\definelistalternative + [d] + [\c!renderingsetup=\??listrenderings:d] + +\definelistalternative + [e] + [\c!renderingsetup=\??listrenderings:e] + +\definelistalternative + [f] + [\c!renderingsetup=\??listrenderings:f] + +\definelistalternative + [g] + [\c!renderingsetup=\??listrenderings:g] + +\definelistalternative + [\v!command] + [\c!renderingsetup=\??listrenderings:command] + +\definelistalternative + [\v!none] + [\c!renderingsetup=\??listrenderings:none] + +\definelistalternative + [\v!vertical] + [\c!before=\ifvmode\nointerlineskip\fi, + \c!after=\ifvmode\nointerlineskip\fi\endgraf\allowbreak, + \c!renderingsetup=\??listrenderings:generic] + +\definelistalternative + [\v!horizontal] + [\c!before=\noindent, + \c!after=, + \c!renderingsetup=\??listrenderings:generic] + +% \setuplist +% [section] +% [alternative=MyListItem, +% after=\blank, +% before=\blank] +% +% \definelistplacement[MyListItem][command]#1#2#3{(#1) (#2) (#3)} +% \definelistplacement[MyListItem][command]{\whatever} +% +% this is a compatibility command, best use the regular +% defined with command= either set in the alternative or +% in the list + +\installcorenamespace{listelementcommand} % the old plugin model + +\unexpanded\def\definelistplacement + {\dodoubleempty\strc_lists_define_placement} + +\def\strc_lists_define_placement[#tag][#method]% + {\edef\p_method{#method}% + \ifx\p_method\empty + \let\p_method\v!command + \fi + \normalexpanded{\definelistalternative[#tag][\p_method]}[\c!command=\strc_lists_placement_command]% + \doifnextbgroupelse + {\strc_lists_define_placement_yes{#tag}} + {\strc_lists_define_placement_nop{#tag}}} + +% indirect definition: <three ignore arguments>: {\bla} + +\def\strc_lists_define_placement_yes#tag% + {\unexpanded\expandafter\normaldef\csname\??listelementcommand#tag\endcsname##1##2##3} + +% direct definition: <three arguments>{\bla} + +\def\strc_lists_define_placement_nop#tag% + {\unexpanded\expandafter\normaldef\csname\??listelementcommand#tag\endcsname} + +\def\strc_lists_placement_command + {\csname\??listelementcommand\currentlistalternative\endcsname} + +%D The rendering macros. + +\newbox \b_strc_lists_number +\newbox \b_strc_lists_text +\newbox \b_strc_lists_page + +\newtoks \t_lists_every_renderingsetup +\newtoks \t_lists_every_renderingtext +\newtoks \t_lists_every_renderingcleanup + +\newconditional\c_lists_has_number +\newconditional\c_lists_has_page + +\let\currentlistentrylocation \empty % watch the 'entry' in the name +\let\currentlistentrynumber \empty % watch the 'entry' in the name +\let\currentlistentrytitle \empty % watch the 'entry' in the name +\let\currentlistentrypagenumber\empty % watch the 'entry' in the name + +\appendtoks + \dontcomplain + \letinteractionparameter\c!width\zeropoint % a weird one +\to \t_lists_every_renderingsetup + +\appendtoks + % better is to use a special list entry but we keep this for compatibility + \let\\=\space + % so expanding this token register has to come *after* the font switch + \dontconvertfont +\to \t_lists_every_renderingtext + +\appendtoks + % because we want to avoid redundant lua calls we expand the + % location beforehand + \ifx\currentlistentrylocation\empty + \edef\currentlistentrylocation{\structurelistlocation}% + \fi + % because these tests happen often and because we're dealing with + % rather complex composed data we have special conditionals; keep + % in mind that testing for empty fails do to tagging being applied + \doifstructurelisthaspageelse \settrue\setfalse\c_lists_has_page + \doifstructurelisthasnumberelse\settrue\setfalse\c_lists_has_number +\to \t_lists_every_renderingsetup + +\appendtoks + \strc_lists_interaction_check +\to \t_lists_every_renderingsetup + +\appendtoks + % as we don't want any interference we clear some variables + % afterwards + \let\currentlistentrylocation \empty + \let\currentlistentrynumber \empty + \let\currentlistentrytitle \empty + \let\currentlistentrypagenumber\empty + \setfalse\c_lists_has_page + \setfalse\c_lists_has_number +\to \t_lists_every_renderingcleanup + +\unexpanded\def\strc_lists_apply_renderingsetup + {\the\t_lists_every_renderingsetup + \edef\currentlistalternative{\listparameter\c!alternative}% + \directsetup{\listalternativeparameter\c!renderingsetup}\relax + \the\t_lists_every_renderingsetup} + +% todo: provide packager via attributes + +\installcorenamespace{listalternativemethods} % the general wrapper of a rendering +\installcorenamespace{listrenderings} % a namespace for setups (rather local) + +\startsetups[\??listrenderings:\v!none] + % nothing, nb we use the [] syntax here because we end with a \cs +\stopsetups + +\startsetups[\??listrenderings:\v!command] + \edef\p_command{\listalternativeparameter\c!command}% + \ifx\p_command\empty + [\currentlist: \currentlistentrynumber\space -- \currentlistentrytitle\space -- \currentlistentrypagenumber]% + \else + \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber + \fi +\stopsetups + +% \startsetups[\??listrenderings:\v!vertical] +% \directsetup{\??listrenderings:generic} +% \stopsetups + +% \startsetups[\??listrenderings:\v!horizontal] +% \directsetup{\??listrenderings:generic} +% \stopsetups + +\startsetups[\??listrenderings:generic] + \listparameter\c!before % can be \hskip + \edef\p_command{\listalternativeparameter\c!command} + \ifx\p_command\empty + \listalternativeparameter\c!before + \vbox { + \forgetall + \hbox \strc_lists_get_reference_attribute\v!all { + \edef\p_headnumber{\listparameter\c!headnumber} + \ifx\p_headnumber\v!yes + % \ifconditional\c_lists_has_page + \hbox \strc_lists_get_reference_attribute\v!number { + \strc_lists_set_style_color\c!numberstyle\c!numbercolor\v!number + \listparameter\c!numbercommand\currentlistsymbol + } + % \fi + \fi + \hbox \strc_lists_get_reference_attribute\v!text { + \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text + \the\t_lists_every_renderingtext + \listparameter\c!textcommand\currentlistentrytitle + } + \edef\p_pagenumber{\listparameter\c!pagenumber} + \ifx\p_pagenumber\v!yes + \ifconditional\c_lists_has_page + \hbox \strc_lists_get_reference_attribute\v!pagenumber { + \strc_lists_set_style_color\c!pagestyle\c!pagecolor\v!pagenumber + \listparameter\c!pagecommand\currentlistentrypagenumber + } + \fi + \fi + } + } + \listalternativeparameter\c!after + \else + \hbox \strc_lists_get_reference_attribute\v!all { + \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber + } + \fi + \listparameter\c!after +\stopsetups + +% to be documented: align, hang + +\startsetups[\??listrenderings:abc] + \endgraf % are we grouped? + \leftskip\listparameter\c!margin % after \endgraf ! + \listparameter\c!before + \endgraf + \edef\p_width{\listparameter\c!width} + \scratchdistance\listparameter\c!distance + \ifx\p_width\v!fit + \scratchwidth\zeropoint + \else\ifconditional\c_lists_has_number + \scratchwidth\p_width + \else + \edef\p_aligntitle{\listparameter\c!aligntitle} + \ifx\p_aligntitle\v!yes + \scratchwidth\zeropoint + \scratchdistance\zeropoint + \else + \scratchwidth\p_width + \fi + \fi\fi + \noindent + \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { + \setlocalhsize + \hsize\localhsize + \hbox to \hsize { + \forgetall + \strc_lists_set_style_color\c!style\c!color\v!all + \scratchhsize\hsize + \edef\p_headnumber{\listparameter\c!headnumber} + \ifconditional\c_lists_has_number + \ifx\p_headnumber\v!yes + \setbox\b_strc_lists_number\hbox \strc_lists_get_reference_attribute\v!number \ifdim\scratchwidth>\zeropoint to \scratchwidth \fi { + \strc_lists_set_style_color\c!numberstyle\c!numbercolor\v!number + \listparameter\c!numbercommand\currentlistsymbol + \hfill + } + \else + \setbox\b_strc_lists_number\emptyhbox + \fi + \else + \scratchwidth\zeropoint + \scratchdistance\zeropoint + \setbox\b_strc_lists_number\emptyhbox + \fi + \ifconditional\c_lists_has_page + \edef\p_pagenumber{\listparameter\c!pagenumber} + \ifx\p_pagenumber\v!yes + \setbox\b_strc_lists_page\hbox { + \scratchdimen\listalternativeparameter\c!width + \hbox \strc_lists_get_reference_attribute\v!pagenumber \ifdim\scratchdimen>\zeropoint to \scratchdimen\fi { + \hfill + \strc_lists_set_style_color\c!pagestyle\c!pagecolor\v!pagenumber + \strut + \listparameter\c!pagecommand\currentlistentrypagenumber + } + } + \else + \setbox\b_strc_lists_page\emptyhbox + \fi + \else + \setbox\b_strc_lists_page\emptyhbox + \fi + \vbox { + \hsize\scratchhsize + \usealignparameter\listparameter + \ifdim\scratchwidth<\hsize + \edef\p_hang{\listparameter\c!hang} + \hangindent\dimexpr\wd\b_strc_lists_number+\scratchdistance\relax + \hangafter\ifx\p_hang\v!no\zerocount\else\plusone\fi + \scratchdimen\listalternativeparameter\c!distance + \ifdim\wd\b_strc_lists_page=\zeropoint \else\ifdim\scratchdimen>\zeropoint\relax + \rightskip\scratchdimen\!!plus\listalternativeparameter\c!stretch\relax + \parfillskip-\rightskip + \fi \fi + \else + \scratchdistance\zeropoint + \fi + \parindent\zeropoint + \dontleavehmode + % % topaligned + % + % \scratchdimen\wd\b_strc_lists_number + % \setbox\b_strc_lists_number\hbox to \hsize{\box\b_strc_lists_number\hss\box\b_strc_lists_page}% + % \wd\b_strc_lists_number\scratchdimen + % + \box\b_strc_lists_number + \hskip\scratchdistance\relax + \begingroup + \strc_lists_set_reference_attribute\v!text + \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text + \the\t_lists_every_renderingtext + \setstrut % needs checking, new here + \begstrut + \strc_lists_limitated_text\currentlistentrytitle + \endstrut + \endgroup + \ifdim\wd\b_strc_lists_page=\zeropoint\else + \nobreak + \listalternativeparameter\c!filler + \box\b_strc_lists_page + \fi + } + \hss + } + }% new + \endgraf % new, else problems with nointerlinespace and prevdepth + \nointerlineskip % anders verkeerde spatiering bij multi-line + \endgraf + \allowbreak + \listparameter\c!after +\stopsetups + +% % example from the context list +% +% \setuphead [part] [page=right,placehead=yes] +% \setuplist [chapter] [alternative=d,before=\blank,after=\blank] +% \setuplist [part] [before=\blank,after=\blank] +% +% \starttext +% \startnarrower[2*right] \placecontent \stopnarrower +% \blank[4*big] +% \startsetups chapter +% \blank \startnarrower[3*middle] \placecontent[criterium=local] \stopnarrower +% \stopsetups +% \placelist[part][criterium=text,after=\setups{chapter}] +% +% \part{First part} \chapter{Chapter one} \chapter{Chapter two} +% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} +% \part{Second part} \chapter{Chapter one} \chapter{Chapter two} +% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} +% \part{Third part} \chapter{Chapter one} \chapter{Chapter two} +% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} +% \stoptext + +% overrulen interactie kan sneller, bv door hulpconstanten +% te gebruiken en die te letten + +\startsetups[\??listrenderings:d] + \ifvmode + \advance\leftskip\listparameter\c!margin + \fi + \begingroup + \ifvmode + \noindent + \fi + \begingroup + \strc_lists_set_reference_attribute\v!all + \strc_lists_set_style_color\c!style\c!color\v!all + \strc_lists_get_destination_attribute + \begingroup + \edef\p_headnumber{\listparameter\c!headnumber} + \ifx\p_headnumber\v!yes + \donetrue + \ifconditional\c_lists_has_number \else + \edef\p_symbol{\listparameter\c!symbol} + \ifx\p_symbol\empty + \donefalse + \fi + \fi + \ifdone + \begingroup + \strc_lists_set_reference_attribute\v!number + \strc_lists_set_style_color\c!numberstyle\c!numbercolor\v!number + \listparameter\c!left + \listparameter\c!numbercommand\currentlistsymbol + \listparameter\c!right + \endgroup + \kern.5em + \nobreak + \fi + \fi + \endgroup + \begingroup + \strc_lists_set_reference_attribute\v!text + \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text + \the\t_lists_every_renderingtext + \setstrut % needs checking, new here + \begstrut + \strc_lists_limitated_text\currentlistentrytitle + \endstrut + \endgroup + \begingroup + \ifconditional\c_lists_has_page + \edef\p_pagenumber{\listparameter\c!pagenumber} + \ifx\p_pagenumber\v!yes + \nobreak + \hskip.75em\relax + \nobreak + \strc_lists_set_reference_attribute\v!pagenumber + \strc_lists_set_style_color\c!pagestyle\c!pagecolor\v!pagenumber + \strut + \listparameter\c!pagecommand\currentlistentrypagenumber + \fi + \fi + \endgroup + \scratchdistance\listparameter\c!distance\relax + \ifdim\scratchdistance<\emwidth + \hskip\emwidth\!!plus\emwidth\!!minus.25\emwidth\relax + \else + \hskip\scratchdistance\!!plus.5\scratchdistance\!!minus.25\scratchdistance\relax + \fi + \endgroup + \endgroup +\stopsetups + +\startsetups[\??listrenderings:e] + \noindent + \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { + \letlistparameter\c!depth\zeropoint + \letlistparameter\c!color\empty + \inheritedlistframed { + \letinteractionparameter\c!strut\v!no % still needed? + \strc_lists_set_style_color\c!style\c!color\v!all + \the\t_lists_every_renderingtext + \setstrut + \begstrut + \strc_lists_limitated_text\currentlistentrytitle + \endstrut + } + } + \par + \listparameter\c!inbetween +\stopsetups + +\startsetups[\??listrenderings:f] + \noindent + \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { + \dosetraggedhbox{\listparameter\c!align}% + \raggedbox { + \strc_lists_set_style_color\c!style\c!color\v!all + \the\t_lists_every_renderingtext + \setstrut + \begstrut + \strc_lists_limitated_text\currentlistentrytitle + \endstrut + } + } + \par + \listparameter\c!inbetween +\stopsetups + +\startsetups[\??listrenderings:g] + \noindent + \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { + \midaligned { + \strc_lists_set_style_color\c!style\c!color\v!all + \the\t_lists_every_renderingtext + \setstrut + \begstrut + \strc_lists_limitated_text\currentlistentrytitle + \endstrut + } + } + \par + \listparameter\c!inbetween +\stopsetups + +%D List elements are packaged in such a way that we can click on them +%D in an interactive document. Here are a few helpers. + +\newconstant\a_strc_lists_reference +\newconstant\a_strc_lists_destination + +\installcorenamespace{listinteractions} + +\letvalue{\??listinteractions\v!number }\v!number +\letvalue{\??listinteractions\v!sectionnumber}\v!number +\letvalue{\??listinteractions\v!text }\v!text +\letvalue{\??listinteractions\v!title }\v!text +\letvalue{\??listinteractions\v!page }\v!pagenumber +\letvalue{\??listinteractions\v!pagenumber }\v!pagenumber +\letvalue{\??listinteractions\v!all }\v!all +\letvalue{\??listinteractions\v!yes }\v!all + +\unexpanded\def\strc_lists_interaction_check + {\iflocation + \strc_lists_interaction_check_yes + \else + \strc_lists_interaction_check_nop + \fi} + +\def\strc_lists_interaction_check_yes + {\edef\p_interaction_forward{\listparameter\c!interaction}% + \ifcsname\??listinteractions\p_interaction_forward\endcsname + \expandafter\let\expandafter\p_interaction_forward\csname\??listinteractions\p_interaction_forward\endcsname + \dogetsimplepagereference{internal(\currentlistentrylocation)}% + \a_strc_lists_reference\currentreferenceattribute + \else + \a_strc_lists_reference\attributeunsetvalue + \fi + \ifnum\a_strc_lists_reference=\attributeunsetvalue + \let\strc_lists_get_reference_attribute\gobbleoneargument + \let\strc_lists_set_reference_attribute\gobbleoneargument + \let\strc_lists_set_style_color \strc_lists_set_style_color_normal + \else + \let\strc_lists_get_reference_attribute\strc_lists_get_reference_attribute_indeed + \let\strc_lists_set_reference_attribute\strc_lists_set_reference_attribute_indeed + \let\strc_lists_set_style_color \strc_lists_set_style_color_special + \fi + \edef\p_interaction_backward{\namedheadparameter\currentlist\c!interaction}% \namedheadparameter ! + \ifx\p_interaction_backward\v!list + \dosetsimplepagereference{bck:\currentlistentrylocation}% + \a_strc_lists_destination\currentdestinationattribute + \else + \a_strc_lists_destination\attributeunsetvalue + \fi + \ifnum\a_strc_lists_destination=\attributeunsetvalue + \let\strc_lists_get_destination_attribute\empty + \let\strc_lists_set_destination_attribute\empty + \else + \let\strc_lists_get_destination_attribute\strc_lists_get_destination_attribute_indeed + \let\strc_lists_set_destination_attribute\strc_lists_set_destination_attribute_indeed + \fi} + +\def\strc_lists_interaction_check_nop + {\let\strc_lists_get_reference_attribute \gobbleoneargument + \let\strc_lists_set_reference_attribute \gobbleoneargument + \let\strc_lists_get_destination_attribute\empty + \let\strc_lists_set_destination_attribute\empty + \let\strc_lists_set_style_color \strc_lists_set_style_color_normal} + +\def\strc_lists_get_reference_attribute_indeed#element% + {\ifx#element\p_interaction_forward + attr \referenceattribute\a_strc_lists_reference + \fi} + +\def\strc_lists_set_reference_attribute_indeed#element% + {\ifx#element\p_interaction_forward + \attribute\referenceattribute\a_strc_lists_reference + \fi} + +\def\strc_lists_get_destination_attribute_indeed + {attr \destinationattribute\number\a_strc_lists_destination} + +\def\strc_lists_set_destination_attribute_indeed + {\attribute\destinationattribute\a_strc_lists_destination} + +\unexpanded\def\strc_lists_set_style_color_normal#style#color#element% + {\useliststyleandcolor#style#color} + +\unexpanded\def\strc_lists_set_style_color_special#style#color#element% + {\useliststyleandcolor#style#color% + \ifx\currentcolorparameter\empty + \ifx#element\p_interaction_forward + \setlocationcolor + \fi + % \else + % \resetinteractionparameter\c!color + % \resetinteractionparameter\c!contrastcolor + \fi} + +%D A helper: + +\def\strc_lists_limitated_text#text% + {\edef\p_maxwidth{\listparameter\c!maxwidth}% + \ifx\p_maxwidth\empty + \listparameter\c!textcommand{#text}% + \else + \listparameter\c!textcommand{\limitatetext{#text}\p_maxwidth{\splitsymbol{\listparameter\c!limittext}}}% + \fi} + +% todo: + +\def\utilitylistlength{\listlength} % old name ... uses in styles + +\let\listlength\!!zerocount % better use listmode + +\unexpanded\def\determinelistcharacteristics + {\dodoubleempty\strc_lists_determine_characteristics} + +\def\strc_lists_determine_characteristics[#list][#settings]% + {\begingroup + \edef\currentlist{\firststructureelementinlist{#list}}% + \ifx\currentlist\empty + \endgroup + \let\listlength\!!zerocount + \else + \setupcurrentlist[#settings]% + \doanalyzestructurelist{#list}{\listparameter\c!criterium}{\listparameter\c!number}% + \normalexpanded{\endgroup\noexpand\edef\noexpand\listlength{\structurelistsize}}% + \fi + \strc_lists_set_mode} + +\protect \endinput diff --git a/tex/context/base/strc-mat.mkiv b/tex/context/base/strc-mat.mkiv index d5f864c90..88da8f2cc 100644 --- a/tex/context/base/strc-mat.mkiv +++ b/tex/context/base/strc-mat.mkiv @@ -179,7 +179,7 @@ \def\handlesubformulasnumbering % sub formulas {\docheckformulareference\subformulasnumbermode\currentsubformulasreference - \doincrementsubstructurecounter[\v!formula][1]% always + \strc_counters_increment\v!formula \storecurrentformulanumber \currentsubformulasreference \empty @@ -324,14 +324,14 @@ % needs checking ... too many: \def\dohandleformulanumbering - {\doincrementsubstructurecounter[\v!formula][1]% - \doiftext\currentplaceformulasuffix{\setsubstructurecounterown[\v!formula][2]{\currentplaceformulasuffix}}% + {\strc_counters_increment\v!formula + \doiftext\currentplaceformulasuffix{\strc_counters_setown_sub\v!formula\plustwo\currentplaceformulasuffix}% \placecurrentformulanumber} \def\dohandlesubformulanumbering {\doiftextelse\currentsubformulasuffix - {\setsubstructurecounterown[\v!formula][2]{\currentsubformulasuffix}} - {\doincrementsubstructurecounter[\v!formula][2]}% + {\strc_counters_setown_sub\v!formula\plustwo\currentsubformulasuffix} + {\strc_counters_increment_sub\v!formula\plustwo}% \placecurrentformulanumber} \def\dododoformulanumber @@ -376,13 +376,10 @@ \fi} \installstructurelistprocessor\v!formula % to be checked ... - {\dodolistelement - \currentlist - \structurelistlocation - \structurelistgenericnumber - \structurelistgenerictitle % hm, can end up in message (volkers test) - \structurelistpagenumber - \structurelistrealpagenumber} + {\let\currentlistentrynumber \structurelistgenericnumber + \let\currentlistentrytitle \structurelistgenerictitle + \let\currentlistentrypagenumber\structurelistpagenumber + \strc_lists_apply_renderingsetup} \newif\ifinformula diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 0a32cb5e7..77404ccd6 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -1120,13 +1120,13 @@ \def\dodostartlocalnotes#1% {\doifnot{\noteparameter\c!continue}\v!yes - {\savestructurecounter[#1]% - \resetstructurecounter[#1]}% + {\strc_counters_save{#1}% + \strc_counters_reset{#1}}% \ctxlua{structures.notes.save("#1","store")}} \def\dodostoplocalnotes#1% {\doifnot{\noteparameter\c!continue}\v!yes - {\restorestructurecounter[#1]}% + {\strc_counters_restore{#1}}% \ctxlua{structures.notes.restore("#1")}} \unexpanded\def\placelocalnotes diff --git a/tex/context/base/strc-num.lua b/tex/context/base/strc-num.lua index 0af5f6421..09b51d29d 100644 --- a/tex/context/base/strc-num.lua +++ b/tex/context/base/strc-num.lua @@ -506,6 +506,13 @@ function commands.doifnotstructurecounter (name) commands.doifnot (counterdata[n function commands.incrementedstructurecounter(...) context(counters.add(...)) end +function commands.checkstructurecountersetup(name,level,start,state) + counters.restart(name,1,start) + counters.setstate(name,state) + counters.setlevel(name,level) + sections.setchecker(name,level,counters.reset) +end + --~ -- move to strc-pag.lua --~ function counters.analyze(name,counterspecification) diff --git a/tex/context/base/strc-num.mkiv b/tex/context/base/strc-num.mkiv index e5d8d2bae..41fb377c3 100644 --- a/tex/context/base/strc-num.mkiv +++ b/tex/context/base/strc-num.mkiv @@ -17,27 +17,8 @@ \unprotect -% we need to rework this, i.e. clone like itm, des etc with \s!parent - -% numbering - -% \definestructurecounter[name] -% \setupstructurecounter[name][wijze=,blok=,tekst=,plaats=,conversie=,start=] -% \setstructurecounter[name]{value} -% \resetstructurecounter[name] -% \incrementstructurecounter[name] -% \decrementstructurecounter[name] -% \savestructurecounter[name] -% \restorestructurecounter[name] -% \convertedstructurecounter[name] % depricated: \getstructurecounter[name] -% \rawstructurecounter[name] - -% private (defined in core-sec.tex) -% -% \nextstructurecounter[name][tag][reference] -% \currentstructurecounter[name] - -% todo: better inheritane system +% work in progress +% to be checked: can we use the command handler code here? \unexpanded\def\setupstructurecountering{\dodoubleempty\getparameters[\??nn]} @@ -55,15 +36,22 @@ \setupstructurecountering [\c!prefixsegments=\autostructureprefixsegments\sharedstructurecounterparameter] +\def\strc_counters_the#1% we need a nicer name + {\ifcsname\??nn#1\c!number\endcsname + \expandafter\strc_counters_the\csname\??nn#1\c!number\endcsname + \else + #1% + \fi} + \def\autostructureprefixsegments#1% todo: \c!prefixsegments=\v!auto {2:\thenamedheadlevel{\ctxlua{structures.sections.way("#1\c!way","\v!by")}}} -\def\structurecounterparameter#1#2% +\def\structurecounterparameter#1#2% this will become \named.... {\csname \ifcsname\??nn#1#2\endcsname \??nn#1#2% - \else\ifcsname\??nn\@@thestructurecounter{#1}#2\endcsname - \??nn\@@thestructurecounter{#1}#2% + \else\ifcsname\??nn\strc_counters_the{#1}#2\endcsname + \??nn\strc_counters_the{#1}#2% \else\ifcsname\??nn#2\endcsname \??nn#2% \else @@ -71,13 +59,6 @@ \fi\fi\fi \endcsname} -\def\@@thestructurecounter#1% - {\ifcsname\??nn#1\c!number\endcsname - \expandafter\@@thestructurecounter\csname\??nn#1\c!number\endcsname - \else - #1% - \fi} - \def\sharedstructurecounterparameter#1% {\csname \ifcsname\??nn#1\endcsname @@ -124,6 +105,8 @@ {\getparameters[\??nn#1][\c!start=,#2]% \docheckstructurecountersetup{#1}} +% % % % + \def\structurecounterway#1% slow, we need to store it at the tex end {\ctxlua{structures.sections.way("\structurecounterparameter{#1}\c!way","\v!by")}} @@ -140,81 +123,266 @@ % it's a clone \else \edef\currentstructurecounterlevel{\thenamedstructurecounterlevel{#1}}% - \ctxlua{% will be a command (depends on sections) - structures.counters.restart("#1",1,"\structurecounterparameter{#1}\c!start") - structures.counters.setstate("#1","\structurecounterparameter{#1}\c!state") - structures.counters.setlevel("#1",\currentstructurecounterlevel) - structures.sections.setchecker("#1",\currentstructurecounterlevel,structures.counters.reset) - }% +% \ctxlua{% will be a command (depends on sections) +% structures.counters.restart("#1",1,"\structurecounterparameter{#1}\c!start") +% structures.counters.setstate("#1","\structurecounterparameter{#1}\c!state") +% structures.counters.setlevel("#1",\currentstructurecounterlevel) +% structures.sections.setchecker("#1",\currentstructurecounterlevel,structures.counters.reset) +% }% + \ctxcommand{checkstructurecountersetup("#1",\currentstructurecounterlevel, + "\structurecounterparameter{#1}\c!start","\structurecounterparameter{#1}\c!state")}% + \fi} + +\unexpanded\def\doifstructurecounterelse#1{\ctxcommand{doifelsestructurecounter("\strc_counters_the{#1}")}} +\unexpanded\def\doifstructurecounter #1{\ctxcommand{doifstructurecounter ("\strc_counters_the{#1}")}} +\unexpanded\def\doifnotstructurecounter #1{\ctxcommand{doifnotstructurecounter ("\strc_counters_the{#1}")}} + +\unexpanded\def\setstructurecounter {\dotripleempty \strc_counters_set_interfaced} +\unexpanded\def\setstructurecounterown {\dotripleempty \strc_counters_setown_interfaced} +\unexpanded\def\restartstructurecounter {\dotripleempty \strc_counters_restart_interfaced} +\unexpanded\def\resetstructurecounter {\dodoubleempty \strc_counters_reset_interfaced} +\unexpanded\def\incrementstructurecounter{\dodoubleempty \strc_counters_increment_interfaced} +\unexpanded\def\decrementstructurecounter{\dodoubleempty \strc_counters_decrement_interfaced} + +\unexpanded\def\rawstructurecounter {\dodoubleargument\strc_counters_raw_interfaced} +\unexpanded\def\laststructurecounter {\dodoubleargument\strc_counters_last_interfaced} +\unexpanded\def\firststructurecounter {\dodoubleargument\strc_counters_first_interfaced} +\unexpanded\def\nextstructurecounter {\dodoubleargument\strc_counters_next_interfaced} +\unexpanded\def\prevstructurecounter {\dodoubleargument\strc_counters_prev_interfaced} +\unexpanded\def\structurecountersubs {\dodoubleargument\strc_counters_subs_interfaced} + +\unexpanded\def\savestructurecounter {\dodoubleempty\strc_counters_save_interfaced} +\unexpanded\def\restorestructurecounter {\dodoubleempty\strc_counters_restore_interfaced} + +\def\strc_counters_set_interfaced + {\ifthirdargument + \singleexpandafter\strc_counters_set_two + \else\ifsecondargument + \doubleexpandafter\strc_counters_set_one + \else + \doubleexpandafter\gobblethreeoptionals + \fi\fi} + +\def\strc_counters_setown_interfaced + {\ifthirdargument + \singleexpandafter\strc_counters_setown_two + \else\ifsecondargument + \doubleexpandafter\strc_counters_setown_one + \else + \doubleexpandafter\gobblethreeoptionals + \fi\fi} + +\def\strc_counters_restart_interfaced + {\ifthirdargument + \singleexpandafter\strc_counters_restart_two + \else\ifsecondargument + \doubleexpandafter\strc_counters_restart_one + \else + \doubleexpandafter\gobblethreeoptionals + \fi\fi} + +\def\strc_counters_reset_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_reset_two + \else\iffirstargument + \doubleexpandafter\strc_counters_reset_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_increment_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_increment_two + \else\iffirstargument + \doubleexpandafter\strc_counters_increment_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_decrement_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_decrement_two + \else\iffirstargument + \doubleexpandafter\strc_counters_decrement_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_raw_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_raw_two + \else\iffirstargument + \doubleexpandafter\strc_counters_raw_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_last_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_last_two + \else\iffirstargument + \doubleexpandafter\strc_counters_last_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_first_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_first_two + \else\iffirstargument + \doubleexpandafter\strc_counters_first_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_prev_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_prev_two + \else\iffirstargument + \doubleexpandafter\strc_counters_prev_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_next_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_next_two + \else\iffirstargument + \doubleexpandafter\strc_counters_next_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_subs_interfaced + {\ifsecondargument + \singleexpandafter\strc_counters_subs_two + \else\iffirstargument + \doubleexpandafter\strc_counters_subs_one + \else + \doubleexpandafter\gobbletwooptionals + \fi\fi} + +\def\strc_counters_save_interfaced + {\iffirstargument + \expandafter\strc_counters_save_one + \else + \expandafter\gobbleoneoptional \fi} -\unexpanded\def\doifstructurecounterelse#1{\ctxcommand{doifelsestructurecounter("\@@thestructurecounter{#1}")}} -\unexpanded\def\doifstructurecounter #1{\ctxcommand{doifstructurecounter ("\@@thestructurecounter{#1}")}} -\unexpanded\def\doifnotstructurecounter #1{\ctxcommand{doifnotstructurecounter ("\@@thestructurecounter{#1}")}} - -\unexpanded\def\setstructurecounter [#1]#2{\ctxcommand{setstructurecounter ("\@@thestructurecounter{#1}",1,\number#2)}} -\unexpanded\def\setstructurecounterown [#1]#2{\ctxcommand{setownstructurecounter ("\@@thestructurecounter{#1}",1,"#2")}} -\unexpanded\def\resetstructurecounter [#1]{\ctxcommand{resetstructurecounter ("\@@thestructurecounter{#1}",1)}} -\unexpanded\def\restartstructurecounter [#1]#2{\ctxcommand{restartstructurecounter("\@@thestructurecounter{#1}",1,#2)}} -\unexpanded\def\savestructurecounter [#1]{\ctxcommand{savestructurecounter ("\@@thestructurecounter{#1}")}} -\unexpanded\def\restorestructurecounter [#1]{\ctxcommand{restorestructurecounter("\@@thestructurecounter{#1}")}} -\unexpanded\def\incrementstructurecounter [#1]{\ctxcommand{addstructurecounter ("\@@thestructurecounter{#1}",1,1)}} -\unexpanded\def\decrementstructurecounter [#1]{\ctxcommand{addstructurecounter ("\@@thestructurecounter{#1}",1,-1)}} - \def\rawstructurecounter [#1]{\ctxcommand{structurecountervalue ("\@@thestructurecounter{#1}",1)}} - \def\laststructurecounter [#1]{\ctxcommand{laststructurecounter ("\@@thestructurecounter{#1}",1)}} - \def\firststructurecounter [#1]{\ctxcommand{firststructurecounter ("\@@thestructurecounter{#1}",1)}} - \def\nextstructurecounter [#1]{\ctxcommand{nextstructurecounter ("\@@thestructurecounter{#1}",1)}} - \def\prevstructurecounter [#1]{\ctxcommand{prevstructurecounter ("\@@thestructurecounter{#1}",1)}} - \def\structurecountersubs [#1]{\ctxcommand{structurecounterssub ("\@@thestructurecounter{#1}",1)}} - \def\showstructurecounter [#1]{\ctxcommand{tracestructurecounter ("\@@thestructurecounter{#1}")}} - -\unexpanded\def\incrementedstructurecounter[#1]{\ctxcommand{incrementedstructurecounter("\@@thestructurecounter{#1}",1, 1)}} -\unexpanded\def\decrementedstructurecounter[#1]{\ctxcommand{incrementedstructurecounter("\@@thestructurecounter{#1}",1,-1)}} - -\unexpanded\def\setsubstructurecounter {\dodoubleargument\dosetsubstructurecounter} -\unexpanded\def\setsubstructurecounterown {\dodoubleargument\dosetsubstructurecounterown} -\unexpanded\def\resetsubstructurecounter {\dodoubleargument\doresetsubstructurecounter} -\unexpanded\def\restartsubstructurecounter {\dodoubleargument\dorestartsubstructurecounter} -\unexpanded\def\incrementsubstructurecounter{\dodoubleargument\doincrementsubstructurecounter} -\unexpanded\def\decrementsubstructurecounter{\dodoubleargument\dodecrementsubstructurecounter} - \def\rawsubstructurecounter {\dodoubleargument\dorawsubstructurecounter} - -\def\dosetsubstructurecounter [#1][#2]#3{\ctxcommand{setstructurecounter ("\@@thestructurecounter{#1}",#2,\number#3)}} -\def\dosetsubstructurecounterown [#1][#2]#3{\ctxcommand{setownstructurecounter ("\@@thestructurecounter{#1}",#2,"#3")}} -\def\doresetsubstructurecounter [#1][#2]{\ctxcommand{resetstructurecounter ("\@@thestructurecounter{#1}",#2)}} -\def\dorestartsubstructurecounter [#1][#2]#3{\ctxcommand{restartstructurecounter ("\@@thestructurecounter{#1}",#2,#3)}} -\def\doincrementsubstructurecounter [#1][#2]{\ctxcommand{incrementedstructurecounter("\@@thestructurecounter{#1}",#2,1)}} -\def\dodecrementsubstructurecounter [#1][#2]{\ctxcommand{incrementedstructurecounter("\@@thestructurecounter{#1}",#2,-1)}} -\def\dorawsubstructurecounter [#1][#2]{\ctxcommand{structurecountervalue ("\@@thestructurecounter{#1}",#2)}} -\def\dolastsubstructurecounter [#1][#2]{\ctxcommand{laststructurecounter ("\@@thestructurecounter{#1}",#2)}} -\def\dofirstsubstructurecounter [#1][#2]{\ctxcommand{firststructurecounter ("\@@thestructurecounter{#1}",#2)}} -\def\dosubstructurecountersubs [#1][#2]{\ctxcommand{structurecountersubs ("\@@thestructurecounter{#1}",#2)}} - -% The bypage check needs a multipass reference and therefore -% we only check for it when we increment and know that some -% content will be placed. We could also check for spreads. - -% to be checked ! - -\def\docheckstructurecounterbypage#1% since we call lua to get the way we can as well do all in lua - {\doif{\structurecounterway{#1}}\v!page{\checkpagechange{#1}\ifpagechanged\resetstructurecounter[#1]\fi}} - -\unexpanded\def\incrementstructurecounter[#1]% - {\docheckstructurecounterbypage{#1}% - \ctxcommand{addstructurecounter("\@@thestructurecounter{#1}",1,1)}} - -\def\doincrementsubstructurecounter[#1][#2]% - {\docheckstructurecounterbypage{#1}% - \ctxcommand{addstructurecounter("\@@thestructurecounter{#1}",#2,1)}} +\def\strc_counters_restore_interfaced + {\iffirstargument + \expandafter\strc_counters_restore_one + \else + \expandafter\gobbleoneoptional + \fi} + +\def\strc_counters_set_two [#1][#2][#3]{\strc_counters_set_sub {#1}{#2}{#3}} +\def\strc_counters_setown_two [#1][#2][#3]{\strc_counters_setown_sub {#1}{#2}{#3}} +\def\strc_counters_restart_two [#1][#2][#3]{\strc_counters_restart_sub {#1}{#2}{#3}} +\def\strc_counters_reset_two [#1][#2]{\strc_counters_reset_sub {#1}{#2}} +\def\strc_counters_increment_two [#1][#2]{\strc_counters_increment_sub{#1}{#2}} +\def\strc_counters_decrement_two [#1][#2]{\strc_counters_decrement_sub{#1}{#2}} + +\def\strc_counters_raw_two [#1][#2]{\strc_counters_raw_sub {#1}{#2}} +\def\strc_counters_last_two [#1][#2]{\strc_counters_last_sub {#1}{#2}} +\def\strc_counters_first_two [#1][#2]{\strc_counters_first_sub {#1}{#2}} +\def\strc_counters_next_two [#1][#2]{\strc_counters_next_sub {#1}{#2}} +\def\strc_counters_prev_two [#1][#2]{\strc_counters_prev_sub {#1}{#2}} +\def\strc_counters_subs_two [#1][#2]{\strc_counters_subs_sub {#1}{#2}} + +\def\strc_counters_set_one [#1][#2][#3]{\strc_counters_set_sub {#1}\plusone{#2}} +\def\strc_counters_setown_one [#1][#2][#3]{\strc_counters_setown_sub {#1}\plusone{#2}} +\def\strc_counters_restart_one [#1][#2][#3]{\strc_counters_restart_sub {#1}\plusone{#2}} +\def\strc_counters_reset_one [#1][#2]{\strc_counters_reset_sub {#1}\plusone} +\def\strc_counters_increment_one [#1][#2]{\strc_counters_increment_sub{#1}\plusone} +\def\strc_counters_decrement_one [#1][#2]{\strc_counters_decrement_sub{#1}\plusone} + +\def\strc_counters_raw_one [#1][#2]{\strc_counters_raw_sub {#1}\plusone} +\def\strc_counters_last_one [#1][#2]{\strc_counters_last_sub {#1}\plusone} +\def\strc_counters_first_one [#1][#2]{\strc_counters_first_sub {#1}\plusone} +\def\strc_counters_next_one [#1][#2]{\strc_counters_next_sub {#1}\plusone} +\def\strc_counters_prev_one [#1][#2]{\strc_counters_prev_sub {#1}\plusone} +\def\strc_counters_subs_one [#1][#2]{\strc_counters_subs_sub {#1}\plusone} + +\def\strc_counters_save_one [#1]{\strc_counters_save {#1}} +\def\strc_counters_restore_one [#1]{\strc_counters_restore {#1}} + +\unexpanded\def\strc_counters_set #1#2{\strc_counters_set_sub {#1}\plusone{#2}} +\unexpanded\def\strc_counters_setown #1#2{\strc_counters_setown_sub {#1}\plusone{#2}} +\unexpanded\def\strc_counters_restart #1#2{\strc_counters_restart_sub {#1}\plusone{#2}} +\unexpanded\def\strc_counters_reset #1{\strc_counters_reset_sub {#1}\plusone} +\unexpanded\def\strc_counters_increment #1{\strc_counters_increment_sub{#1}\plusone} +\unexpanded\def\strc_counters_decrement #1{\strc_counters_decrement_sub{#1}\plusone} + + \def\strc_counters_raw #1{\strc_counters_raw_sub {#1}\plusone} + \def\strc_counters_last #1{\strc_counters_last_sub {#1}\plusone} + \def\strc_counters_first #1{\strc_counters_first_sub {#1}\plusone} + \def\strc_counters_next #1{\strc_counters_next_sub {#1}\plusone} + \def\strc_counters_prev #1{\strc_counters_prev_sub {#1}\plusone} + \def\strc_counters_subs #1{\strc_counters_subs_sub {#1}\plusone} + +\unexpanded\def\strc_counters_set_sub #1#2#3{\ctxcommand{setstructurecounter ("\strc_counters_the{#1}",\number#2,\number#3)}} +\unexpanded\def\strc_counters_setown_sub #1#2#3{\ctxcommand{setownstructurecounter ("\strc_counters_the{#1}",\number#2,"#3")}} +\unexpanded\def\strc_counters_restart_sub #1#2#3{\ctxcommand{restartstructurecounter("\strc_counters_the{#1}",\number#2,\number#3)}} +\unexpanded\def\strc_counters_reset_sub #1#2{\ctxcommand{resetstructurecounter ("\strc_counters_the{#1}",\number#2)}} +\unexpanded\def\strc_counters_increment_sub #1#2{\ctxcommand{addstructurecounter ("\strc_counters_the{#1}",\number#2,1)}} +\unexpanded\def\strc_counters_decrement_sub #1#2{\ctxcommand{addstructurecounter ("\strc_counters_the{#1}",\number#2,-1)}} + + \def\strc_counters_raw_sub #1#2{\ctxcommand{structurecountervalue("\strc_counters_the{#1}",\number#2)}} + \def\strc_counters_last_sub #1#2{\ctxcommand{laststructurecounter ("\strc_counters_the{#1}",\number#2)}} + \def\strc_counters_first_sub #1#2{\ctxcommand{firststructurecounter("\strc_counters_the{#1}",\number#2)}} + \def\strc_counters_next_sub #1#2{\ctxcommand{nextstructurecounter ("\strc_counters_the{#1}",\number#2)}} + \def\strc_counters_prev_sub #1#2{\ctxcommand{prevstructurecounter ("\strc_counters_the{#1}",\number#2)}} + \def\strc_counters_subs_sub #1#2{\ctxcommand{structurecounterssub ("\strc_counters_the{#1}",\number#2)}} + +\unexpanded\def\strc_counters_save #1{\ctxcommand{savestructurecounter ("\strc_counters_the{#1}")}} +\unexpanded\def\strc_counters_restore #1{\ctxcommand{restorestructurecounter("\strc_counters_the{#1}")}} + +\unexpanded\def\strc_counters_incremented #1{\ctxcommand{incrementedstructurecounter("\strc_counters_the{#1}",1, 1)}} +\unexpanded\def\strc_counters_decremented #1{\ctxcommand{incrementedstructurecounter("\strc_counters_the{#1}",1,-1)}} + +\unexpanded\def\showstructurecounter [#1]{\ctxcommand{tracestructurecounter("\strc_counters_the{#1}")}} + +\unexpanded\def\incrementedstructurecounter [#1]{\strc_counters_incremented{#1}} % expandable, no \dosingleargument +\unexpanded\def\decrementedstructurecounter [#1]{\strc_counters_decremented{#1}} % expandable, no \dosingleargument + +% public variants ... beware, for old cases, from now on the value variants are the +% ones that are expandable + +\def\rawstructurecountervalue [#1]{\strc_counters_raw_sub {#1}\plusone} +\def\laststructurecountervalue [#1]{\strc_counters_last_sub {#1}\plusone} +\def\firststructurecountervalue[#1]{\strc_counters_first_sub{#1}\plusone} +\def\nextstructurecountervalue [#1]{\strc_counters_next_sub {#1}\plusone} +\def\prevstructurecountervalue [#1]{\strc_counters_prev_sub {#1}\plusone} + +\let\rawsubstructurecountervalue \strc_counters_raw_two +\let\lastsubstructurecountervalue \strc_counters_last_two +\let\firstsubstructurecountervalue\strc_counters_first_two +\let\nextsubstructurecountervalue \strc_counters_next_two +\let\prevsubstructurecountervalue \strc_counters_prev_two + +% The bypage check needs a multipass reference and therefore we only check for it when we increment +% and know that some content will be placed. We could also check for spreads. + +\unexpanded\def\strc_counters_increment_sub#1#2% + {% this will be combined into one lua call + \edef\m_strc_counters_way{\structurecounterway{#1}}% + \ifx\m_strc_counters_way\v!page + \checkpagechange{#1}% + \ifpagechanged + \strc_counters_reset{#1}% + \fi + \fi + \ctxcommand{addstructurecounter("\strc_counters_the{#1}",\number#2,1)}} \unexpanded\def\convertedstructurecounter - {\dodoubleempty\doconvertedstructurecounter} + {\dodoubleempty\strc_counters_converted} -\def\doconvertedstructurecounter[#1][#2]% +\def\strc_counters_converted[#1][#2]% {\begingroup \ifsecondargument\getparameters[\??nn#1][#2]\fi \ctxlua{structures.sections.prefixedconverted( - "\@@thestructurecounter{#1}", + "\strc_counters_the{#1}", { prefix = "\structurecounterparameter{#1}\c!prefix", separatorset = "\structurecounterparameter{#1}\c!prefixseparatorset", @@ -242,7 +410,7 @@ \def\directconvertedstructurecounter#1#2% name, type {\ctxlua{structures.sections.prefixedconverted( - "\@@thestructurecounter{#1}", + "\strc_counters_the{#1}", { prefix = "\structurecounterparameter{#1}\c!prefix", separatorset = "\structurecounterparameter{#1}\c!prefixseparatorset", @@ -267,9 +435,9 @@ )}} \unexpanded\def\convertedsubstructurecounter - {\dotripleempty\doconvertedsubstructurecounter} + {\dotripleempty\strc_counters_converted_sub} -\def\doconvertedsubstructurecounter[#1][#2][#3]% #2 can be n or n:m +\def\strc_counters_converted_sub[#1][#2][#3]% #2 can be n or n:m {\ifsecondargument \doconvertedstructurecounter[#1][\c!numbersegments=#2,#3]% \else @@ -278,20 +446,32 @@ \let\getstructurecounter\convertedstructurecounter -\unexpanded\def\doifdefinedstructurecounter #1{\doifdefined {\csname\s!structurecounter#1\c!number\endcsname}} -\unexpanded\def\doifundefinedstructurecounter #1{\doifundefined {\csname\s!number#1\c!number\endcsname}} -\unexpanded\def\doifdefinedstructurecounterelse#1{\doifdefinedelse{\csname\s!number#1\c!number\endcsname}} +\unexpanded\def\doifdefinedstructurecounter#1% + {\ifcsname\s!number#1\c!number\endcsname + \expandafter\firstofoneargument + \else + \expandafter\gobbleoneargument + \fi} + +\unexpanded\def\doifundefinedstructurecounter#1% + {\ifcsname\s!number#1\c!number\endcsname + \expandafter\gobbleoneargument + \else + \expandafter\firstofoneargument + \fi} + +\unexpanded\def\doifdefinedstructurecounterelse#1% + {\ifcsname\s!number#1\c!number\endcsname + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} \ifx\checkstructurecounter\undefined \def\checkstructurecounter[#1]{} \fi \def\checkstructurecounter[#1]{} -%D What follows is a compatibility layer. This will be phased out (at -%D least from core usage). - -% \def\reset {\dosingleargument\doreset} -% \def\doreset[#1]{\processcommalist[#1]\dodoreset} -% \def\dodoreset#1{\csname\s!reset#1\endcsname}% +%D What follows is a compatibility layer. \let \numberparameter \structurecounterparameter % {name}\c!key @@ -346,116 +526,7 @@ \newconditional\hasstructurecountertitle \newconditional\hasstructurecounternumber -% \def\dostructurecountercomponent#1#2#3#4#5#6#7[#8][#9]% -% {\begingroup -% % -% #2[\s!haslevel=1,#8]% -% \edef\hasstructurecountercaption{#3\s!hascaption}% -% \edef\hasstructurecountertitle {#3\s!hastitle}% -% \edef\hasstructurecounternumber {#3\s!hasnumber}% -% \edef\hasstructurecounterlevel {#3\s!haslevel}% -% % -% \edef\askedprefixsegments{#3\c!prefixsegments}% -% \ifx\askedprefixsegments\v!auto -% \edef\askedprefixsegments{\autostructureprefixsegments#3}% -% \fi -% % -% \edef\currentname{#3\c!name}% -% \ifx\currentname\empty -% \edef\currentname{#1}% -% \fi -% \edef\currentcounter{#3\s!counter}% -% \ifx\currentcounter\empty -% \let\currentcounter\currentname -% \fi -% % -% \doif{#3\c!title}\v!none{\setfalse\hasstructurecountercaption\setfalse\hasstructurecounternumber}% will become obsolete -% % -% \ifx\hasstructurecounternumber\v!yes % here due to previous test but best in callers -% \doincrementsubstructurecounter[\currentcounter][\hasstructurecounterlevel]% -% \fi -% % -% \ifx\hasstructurecountercaption\v!yes -% \edef\currentexpansion{#3\c!expansion}% -% \ifx\currentexpansion\s!xml -% \edef\currenttitle{#4\c!title}% -% \edef\currentbookmark{#4\c!bookmark}% -% \xmlstartraw -% \edef\currentlisttitle{#3\c!title}% -% \xmlstopraw -% \let\currentcoding\s!xml -% \else -% \ifx\currentexpansion\v!yes -% \edef\currenttitle{#3\c!title}% -% \edef\currentbookmark{#3\c!bookmark}% -% \else -% \edef\currenttitle{#4\c!title}% -% \edef\currentbookmark{#4\c!bookmark}% -% \fi -% \let\currentlisttitle\currenttitle -% \let\currentcoding\s!tex -% \fi -% \edef\currentlabel{#3\c!label}% -% \edef\currentreference{#3\c!reference}% -% \setnextinternalreference -% \xdef\laststructurecounternumber{\ctxlua{structures.lists.push{ -% metadata = { -% kind = "#1", -% name = "\currentname", -% level = structures.sections.currentlevel(), -% catcodes = \the\catcodetable, -% }, -% references = { -% internal = \nextinternalreference, -% reference = "\currentreference", -% referenceprefix = "\referenceprefix", -% block = "\currentsectionblock", -% section = structures.sections.currentid(), -% }, -% titledata = { -% label = \!!bs\detokenize\expandafter{\currentlabel }\!!es, -% title = \!!bs\detokenize\expandafter{\currenttitle }\!!es, -% \ifx\currentbookmark\currenttitle \else -% bookmark = \!!bs\detokenize\expandafter{\currentbookmark }\!!es, -% \fi -% \ifx\currentlisttitle\currenttitle \else -% list = \!!bs\detokenize\expandafter{\currentlisttitle}\!!es, -% \fi -% }, -% \ifx\hasstructurecounternumber\v!yes -% prefixdata = { -% prefix = "#3\c!prefix", -% separatorset = "#3\c!prefixseparatorset", -% conversion = \!!bs#3\c!prefixconversion\!!es, -% conversionset = "#3\c!prefixconversionset", -% set = "#3\c!prefixset", -% % segments = "#3\c!prefixsegments", -% segments = "\askedprefixsegments", -% connector = \!!bs#3\c!prefixconnector\!!es, -% }, -% numberdata = { -% numbers = structures.counters.compact("\currentcounter",nil,true), -% separatorset = "#3\c!numberseparatorset", -% conversion = \!!bs#3\c!numberconversion\!!es, -% conversionset = "#3\c!numberconversionset", -% starter = \!!bs#3\c!numberstarter\!!es, -% stopper = \!!bs#3\c!numberstopper\!!es, -% segments = "#3\c!numbersegments", -% }, -% \fi -% userdata = structures.helpers.touserdata(\!!bs\detokenize{#9}\!!es) -% } -% }}% -% \xdef\laststructurecounterattribute {\ctxlua {tex.write(structures.references.setinternalreference(nil,nil,\nextinternalreference))}}% -% \xdef\laststructurecountersynchronize{\ctxlatelua{structures.lists.enhance(\laststructurecounternumber)}}% -% \else -% \glet\laststructurecounternumber \relax -% \glet\laststructurecounterattribute \attributeunsetvalue -% \glet\laststructurecountersynchronize\relax -% \fi -% \endgroup} - -\def\dostructurecountercomponent#1#2#3#4#5#6#7[#8][#9]% maybe also nolist +\unexpanded\def\dostructurecountercomponent#1#2#3#4#5#6#7[#8][#9]% maybe also nolist {\begingroup % #2[\s!haslevel=1,#8]% @@ -529,7 +600,7 @@ \fi % \setnextinternalreference - \xdef\laststructurecounternumber{\ctxlua{structures.lists.push{ + \xdef\laststructurecounternumber{\ctxcommand{addtolist{ metadata = { kind = "#1", name = "\currentname", @@ -584,11 +655,11 @@ segments = "#3\c!numbersegments", }, \fi - userdata = structures.helpers.touserdata(\!!bs\detokenize{#9}\!!es) + userdata = \!!bs\detokenize{#9}\!!es % will be converted to table at the lua end } }}% - \xdef\laststructurecounterattribute {\ctxlua {tex.write(structures.references.setinternalreference(nil,nil,\nextinternalreference))}}% - \xdef\laststructurecountersynchronize{\ctxlatelua{structures.lists.enhance(\laststructurecounternumber)}}% + \xdef\laststructurecounterattribute {\ctxlua {tex.write(structures.references.setinternalreference(nil,nil,\nextinternalreference))}}% + \xdef\laststructurecountersynchronize{\ctxlatecommand{enhancelist(\laststructurecounternumber)}}% \else \glet\laststructurecounternumber \relax \glet\laststructurecounterattribute \attributeunsetvalue diff --git a/tex/context/base/strc-pag.mkiv b/tex/context/base/strc-pag.mkiv index 3075b18be..87671ea60 100644 --- a/tex/context/base/strc-pag.mkiv +++ b/tex/context/base/strc-pag.mkiv @@ -90,13 +90,13 @@ \def\dosetupsubpagenumber [#1]{\dosavepagenumberstate\s!subpage \dosetupstructurecounter[\s!subpage ][#1]\the\everysetupsubpagenumber } \def\resetrealpagenumber {} % not permitted -\def\resetuserpagenumber {\resetstructurecounter[\s!userpage]} -\def\resetsubpagenumber {\resetstructurecounter[\s!subpage]} +\def\resetuserpagenumber {\strc_counters_reset\s!userpage} +\def\resetsubpagenumber {\strc_counters_reset\s!subpage} \appendtoks - \setstructurecounter[\s!realpage]\realpageno - \setstructurecounter[\s!userpage]\userpageno - \setstructurecounter[\s!subpage] \subpageno + \strc_counters_set\s!realpage\realpageno + \strc_counters_set\s!userpage\userpageno + \strc_counters_set\s!subpage \subpageno \to \everyinitializepagecounters \let\setuppagenumber\setupuserpagenumber @@ -139,20 +139,6 @@ % Counters -% \def\firstpage {1} \def\prevpage {1} \def\nextpage {1} \def\lastpage {1} -% \def\firstuserpage{1} \def\prevuserpage{1} \def\nextuserpage{1} \def\lastuserpage{1} -% \def\firstsubpage {1} \def\prevsubpage {1} \def\nextsubpage {1} \def\lastsubpage {1} - -% \def\firstrealpage{\firststructurecounter[\s!realpage]} -% \def\prevrealpage {\prevstructurecounter [\s!realpage]} -% \def\nextrealpage {\nextstructurecounter [\s!realpage]} -% \def\lastrealpage {\laststructurecounter [\s!realpage]} - -% \let\firstpage\firstrealpage -% \let\prevpage \prevrealpage -% \let\nextpage \nextrealpage -% \let\lastpage \lastrealpage - \def\firstrealpagenumber{\convertedstructurecounter[\s!realpage][\c!type=\v!first]} \def\firstuserpagenumber{\convertedstructurecounter[\s!userpage][\c!type=\v!first]} \def\firstsubpagenumber {\convertedstructurecounter[\s!subpage ][\c!type=\v!first]} @@ -169,21 +155,21 @@ \def\nextuserpagenumber {\convertedstructurecounter[\s!userpage][\c!type=\v!next]} \def\nextsubpagenumber {\convertedstructurecounter[\s!subpage ][\c!type=\v!next]} -\def\firstrealpage{\firststructurecounter[\s!realpage]} -\def\firstuserpage{\firststructurecounter[\s!userpage]} -\def\firstsubpage {\firststructurecounter[\s!subpage ]} +\def\firstrealpage{\strc_counters_first\s!realpage} +\def\firstuserpage{\strc_counters_first\s!userpage} +\def\firstsubpage {\strc_counters_first\s!subpage } -\def\prevrealpage {\prevstructurecounter [\s!realpage]} -\def\prevuserpage {\prevstructurecounter [\s!userpage]} -\def\prevsubpage {\prevstructurecounter [\s!subpage ]} +\def\prevrealpage {\strc_counters_prev \s!realpage} +\def\prevuserpage {\strc_counters_prev \s!userpage} +\def\prevsubpage {\strc_counters_prev \s!subpage } -\def\nextrealpage {\nextstructurecounter [\s!realpage]} -\def\nextuserpage {\nextstructurecounter [\s!userpage]} -\def\nextsubpage {\nextstructurecounter [\s!subpage ]} +\def\nextrealpage {\strc_counters_next \s!realpage} +\def\nextuserpage {\strc_counters_next \s!userpage} +\def\nextsubpage {\strc_counters_next \s!subpage } -\def\lastrealpage {\laststructurecounter [\s!realpage]} -\def\lastuserpage {\laststructurecounter [\s!userpage]} -\def\lastsubpage {\laststructurecounter [\s!subpage ]} +\def\lastrealpage {\strc_counters_last \s!realpage} +\def\lastuserpage {\strc_counters_last \s!userpage} +\def\lastsubpage {\strc_counters_last \s!subpage } \let\firstpage\firstrealpage \let\prevpage \prevrealpage @@ -198,7 +184,7 @@ % Renderers: -\def\pagenumber {\rawstructurecounter[\s!userpage]} +\def\pagenumber {\strc_counters_raw\s!userpage} \def\prefixedpagenumber {\directconvertedstructurecounter\s!userpage\empty} % \userpagenumber \def\realpagenumber {\directconvertedstructurecounter\s!realpage\empty} @@ -222,9 +208,9 @@ \def\nextsubpagenumber {\directconvertedstructurecounter\s!subpage \v!next} \def\dodeincrementpageboundcounters % only at the end - {\decrementstructurecounter[\s!realpage]% - \decrementstructurecounter[\s!userpage]% - \decrementstructurecounter[\s!subpage ]} + {\strc_counters_decrement\s!realpage + \strc_counters_decrement\s!userpage + \strc_counters_decrement\s!subpage} \def\doincrementpageboundcounters {\incrementpagenumber @@ -258,16 +244,16 @@ % Realpage and subpage numbers: -\def\setnextrealpageno{\global\realpageno\incrementedstructurecounter[\s!realpage]\relax} -\def\setnextsubpageno {\global\subpageno \incrementedstructurecounter[\s!subpage ]\relax} +\def\setnextrealpageno{\global\realpageno\strc_counters_incremented\s!realpage\relax} +\def\setnextsubpageno {\global\subpageno \strc_counters_incremented\s!subpage \relax} -% Page numbers: (can move to lua) +% Page numbers: (can move to lua) ... inconsistent names -\def\dodecrementpagenumber {\global\userpageno\decrementedstructurecounter[\s!userpage]\relax} -\def\doincrementpagenumber {\global\userpageno\incrementedstructurecounter[\s!userpage]\relax} +\def\dodecrementpagenumber {\global\userpageno\strc_counters_decremented\s!userpage\relax} +\def\doincrementpagenumber {\global\userpageno\strc_counters_incremented\s!userpage\relax} -\def\decrementsubpagenumber{\global\subpageno \decrementedstructurecounter[\s!subpage ]\relax} -\def\incrementsubpagenumber{\global\subpageno \incrementedstructurecounter[\s!subpage ]\relax} +\def\decrementsubpagenumber{\global\subpageno \strc_counters_decremented\s!subpage \relax} +\def\incrementsubpagenumber{\global\subpageno \strc_counters_incremented\s!subpage \relax} \def\dosynchronizepagenumber{\global\let\@@pnstate\v!start} @@ -430,7 +416,7 @@ \edef\askeduserpagenumber{\structurecounterparameter\s!userpage\c!number}% \ifx\askeduserpagenumber\empty \else \normalexpanded{\noexpand\setuppagenumber[\c!start=\structurecounterparameter\s!userpage\c!number,\c!number=]}% - \userpageno\rawstructurecounter[\s!userpage]% + \userpageno\strc_counters_raw\s!userpage \fi \to \everysetupuserpagenumber % todo: set state: none, start, stop, reset @@ -438,7 +424,7 @@ \edef\askedsubpagenumber{\structurecounterparameter\s!subpage\c!number}% \ifx\askedsubpagenumber\empty \else \normalexpanded{\noexpand\setupsubpagenumber[\c!start=\structurecounterparameter\s!subpage\c!number,\c!number=]}% - \subpageno\rawstructurecounter[\s!subpage]% + \subpageno\strc_counters_raw\s!subpage\relax \fi \to \everysetupsubpagenumber % todo: set state: none, start, stop, reset @@ -448,7 +434,7 @@ % \starttext \dorecurse{20}{\input knuth \par} \stoptext \def\checkpagenumbershift - {\userpageno\rawstructurecounter[\s!userpage]\relax + {\userpageno\strc_counters_raw\s!userpage\relax \ifnum\realpageno=\plusone \ifodd\userpageno \else diff --git a/tex/context/base/strc-tag.mkiv b/tex/context/base/strc-tag.mkiv index c6dd93657..a52e9b1af 100644 --- a/tex/context/base/strc-tag.mkiv +++ b/tex/context/base/strc-tag.mkiv @@ -19,7 +19,8 @@ \unprotect -% labels: temporary here +%D Eventually these labels will either move to the modules +%D where they're used, or they will en dup in mult-tag. \def\t!document {document} % Div @@ -142,92 +143,120 @@ \definesystemattribute[tagged][public] \definesystemattribute[image] [public] -\unexpanded\def\setelementbackendtag{\dodoubleargument\dosetelementbackendtag} -\unexpanded\def\setelementnature {\dodoubleargument\dosetelementnature} +\unexpanded\def\setelementbackendtag{\dodoubleargument\strc_tags_set_backend} +\unexpanded\def\setelementnature {\dodoubleargument\strc_tags_set_nature} -\unexpanded\def\dosetelementbackendtag[#1][#2]{\ctxcommand{settagproperty("#1","backend","#2")}} -\unexpanded\def\dosetelementnature [#1][#2]{\ctxcommand{settagproperty("#1","nature", "#2")}} +\def\strc_tags_set_backend[#1][#2]{\ctxcommand{settagproperty("#1","backend","#2")}} +\def\strc_tags_set_nature [#1][#2]{\ctxcommand{settagproperty("#1","nature", "#2")}} % todo: indirect macro for trialtypesetting -\unexpanded\def\dostartelement{\iftrialtypesetting\expandafter\renostartelement\else\expandafter\redostartelement\fi} -\unexpanded\def\dostopelement {\iftrialtypesetting\expandafter\nonostopelement \else\expandafter\dodostopelement \fi} +\unexpanded\def\strc_tags_start_element + {\iftrialtypesetting + \expandafter\strc_tags_disabled_element_start + \else + \expandafter\strc_tags_enabled_element_start + \fi} -\unexpanded\def\redostartelement{\dodoubleempty\dodostartelement} -\unexpanded\def\renostartelement{\dodoubleempty\nonostartelement} +\unexpanded\def\strc_tags_stop_element + {\iftrialtypesetting + \expandafter\strc_tags_disabled_element_stop_indeed + \else + \expandafter\strc_tags_enabled_element_stop_indeed + \fi} -\unexpanded\def\dodostartelement[#1][#2]% +\unexpanded\def\strc_tags_enabled_element_start {\dodoubleempty\strc_tags_enabled_element_start_indeed} +\unexpanded\def\strc_tags_disabled_element_start{\dodoubleempty\strc_tags_disabled_element_start_indeed} + +\unexpanded\def\strc_tags_enabled_element_start_indeed[#1][#2]% {\ctxcommand{starttag("#1",{ label = "\dogetupsometaglabeltext{#1}", userdata = \!!bs#2\!!es, })}} -\unexpanded\def\dodostopelement +\unexpanded\def\strc_tags_disabled_element_start_indeed[#1][#2]% + {} + +\unexpanded\def\strc_tags_enabled_element_stop_indeed {\ctxcommand{stoptag()}} -% beware: making this one unexpanded spoils tables (noalign problem) +\unexpanded\def\strc_tags_disabled_element_stop_indeed + {} + +% beware: making these unexpanded spoils tables (noalign problem) -\unexpanded\def\nonostartelement[#1][#2]{} -\unexpanded\def\nonostopelement {} +\def\strc_tags_enabled_start + {\iftrialtypesetting + \expandafter\strc_tags_disabled_start_indeed + \else + \expandafter\strc_tags_enabled_start_indeed + \fi} -\def\dodostarttagged{\iftrialtypesetting\expandafter\nododostarttagged\else\expandafter\dododostarttagged\fi} -\def\dodostoptagged {\iftrialtypesetting\expandafter\nododostoptagged \else\expandafter\dododostoptagged \fi} +\def\strc_tags_enabled_stop + {\iftrialtypesetting + \expandafter\strc_tags_disabled_stop + \else + \expandafter\strc_tags_enabled_stop + \fi} -\def\dododostarttagged#1#2% +\def\strc_tags_enabled_start_indeed#1#2% {\ctxcommand{starttag("#1",{ label = "\dogetupsometaglabeltext{#1}", detail = "#2", })}} -\def\dododostoptagged +\def\strc_tags_enabled_stop_indeed {\ctxcommand{stoptag()}} -\def\nododostarttagged#1#2{} -\def\nododostoptagged {} +\def\strc_tags_disabled_start#1#2% + {} + +\def\strc_tags_disabled_stop + {} % end of beware -\newtoks\everysetupstructure +\installcorenamespace{tagging} -\unexpanded\def\setupstructure[#1]% - {\getparameters[\??el][#1]% - \the\everysetupstructure} +\installsetuponlycommandhandler \??tagging {tagging} -\unexpanded\def\doenableelements +\unexpanded\def\strc_tags_enable_elements {\setuplanguage[\s!default][\s!righthyphenchar="AD]% for the moment here - \let\startelement\dostartelement - \let\stopelement \dostopelement} + \let\startelement\strc_tags_enabled_element_start + \let\stopelement \strc_tags_enabled_element_stop } + +\unexpanded\def\strc_tags_disable_elements + {\let\startelement\strc_tags_disabled_element_start + \let\stopelement \strc_tags_disabled_element_stop} -\unexpanded\def\dodisableelements - {\let\startelement\renostartelement - \let\stopelement \nonostopelement} +% this will become strc_tags_start and strc_tags_stop -\unexpanded\def\doenabletagged - {\let\dostarttagged\dodostarttagged - \let\dostoptagged \dodostoptagged } +\unexpanded\def\strc_tags_enable + {\let\dostarttagged\strc_tags_enabled_start + \let\dostoptagged \strc_tags_enabled_stop} -\unexpanded\def\dodisabletagged - {\let\dostarttagged\nododostarttagged - \let\dostoptagged \nododostoptagged } +\unexpanded\def\strc_tags_disable + {\let\dostarttagged\strc_tags_disabled_start + \let\dostoptagged \strc_tags_disabled_stop} \newtoks\everyenableelements \newtoks\everydisableelements \appendtoks - \doenableelements - \doifelse\@@elmethod\v!auto\doenabletagged\dodisabletagged + \strc_tags_enable_elements + \doifelse{\taggingparameter\c!method}\v!auto\strc_tags_enable\strc_tags_disable \to \everyenableelements \appendtoks - \dodisableelements - \dodisabletagged + \strc_tags_disable_elements + \strc_tags_disable \to \everydisableelements \appendtoks - \doifelse\@@elstate\v!start{\the\everyenableelements}{\the\everydisableelements}% -\to \everysetupstructure + \doifelse{\taggingparameter\c!state}\v!start{\the\everyenableelements}{\the\everydisableelements}% +\to \everysetuptagging -\setupstructure +\setuptagging [\c!state=\v!stop, \c!method=\v!auto] @@ -251,8 +280,8 @@ \to \everystoptext \appendtoks - \dodisableelements - \dodisabletagged + \strc_tags_disable_elements + \strc_tags_disable \to \everybeforepagebody % \doifinelementelse{structure:section} {yes} {no} diff --git a/tex/context/base/supp-box.mkiv b/tex/context/base/supp-box.mkiv index 5981b97f0..93ec8b3dd 100644 --- a/tex/context/base/supp-box.mkiv +++ b/tex/context/base/supp-box.mkiv @@ -2185,7 +2185,7 @@ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox \egroup} -\def\syst_boxes_rightbox_finish +\def\syst_boxes_leftbox_finish {\global\boxhdisplacement-\wd\nextbox \global\advance\boxhdisplacement-\boxoffset \global\boxvdisplacement.5\ht\nextbox diff --git a/tex/context/base/syst-ini.mkiv b/tex/context/base/syst-ini.mkiv index bcf15b96c..983bedc52 100644 --- a/tex/context/base/syst-ini.mkiv +++ b/tex/context/base/syst-ini.mkiv @@ -345,6 +345,8 @@ \newdimen\scratchdepth \newdimen\scratchoffset \newdimen\scratchdistance +\newdimen\scratchhsize +\newdimen\scratchvsize %D More allocations: @@ -712,6 +714,19 @@ \let\then\relax % so that we can say: \ifnum1>2\then -) +%D \macros +%D {newmacro,setnewmacro,newfraction} +%D +%D Let's be complete and also introduce some definers. These are +%D not mandate but handy for grepping. + +\normalprotected\def\newmacro #1{\let#1\empty} +\normalprotected\def\setnewmacro#1{\let#1} + +\def\!!plusone{1} + +\normalprotected\def\newfraction#1{\let#1\!!plusone} + %D It would be handy to have a primitive \unless\ifcase because %D then we could use nicer values. Anyhow, this conditional code %D used to be in the \type {syst-aux} module but is now promoted diff --git a/tex/context/base/syst-lua.lua b/tex/context/base/syst-lua.lua index e5c6c8242..f735b1962 100644 --- a/tex/context/base/syst-lua.lua +++ b/tex/context/base/syst-lua.lua @@ -93,7 +93,7 @@ function commands.doifdimenstringelse(str) testcase(lpegmatch(pattern,str)) end -function commands.firstinlist(str) +function commands.firstinset(str) local first = match(str,"^([^,]+),") context(first or str) end diff --git a/tex/context/base/type-buy.mkiv b/tex/context/base/type-buy.mkiv index c1902205c..bab9593d9 100644 --- a/tex/context/base/type-buy.mkiv +++ b/tex/context/base/type-buy.mkiv @@ -39,7 +39,7 @@ \definefontsynonym [Informal-BoldOblique] [file:ifbo] \stoptypescript -\starttypescript [math] [informal] [default] +\starttypescript [math] [informal] [name] \loadfontgoodies[informal-math] \definefontsynonym[MathRoman][informalmath@informal-math] \stoptypescript diff --git a/tex/context/base/type-def.mkiv b/tex/context/base/type-def.mkiv index 52922dad1..a80b4f7bd 100644 --- a/tex/context/base/type-def.mkiv +++ b/tex/context/base/type-def.mkiv @@ -13,34 +13,34 @@ \starttypescriptcollection[simplification] -\starttypescript [serif] [simple] [name] - \definefontsynonym [Serif] [Simple] - \definefontsynonym [SerifBold] [Serif] - \definefontsynonym [SerifItalic] [Serif] - \definefontsynonym [SerifSlanted] [Serif] - \definefontsynonym [SerifBoldItalic] [Serif] - \definefontsynonym [SerifBoldSlanted] [Serif] - \definefontsynonym [SerifCaps] [Serif] +\starttypescript [\s!serif] [\s!simple] [\s!name] + \definefontsynonym [\s!Serif] [\s!Simple] + \definefontsynonym [\s!SerifBold] [\s!Serif] + \definefontsynonym [\s!SerifItalic] [\s!Serif] + \definefontsynonym [\s!SerifSlanted] [\s!Serif] + \definefontsynonym [\s!SerifBoldItalic] [\s!Serif] + \definefontsynonym [\s!SerifBoldSlanted] [\s!Serif] + \definefontsynonym [\s!SerifCaps] [\s!Serif] \stoptypescript -\starttypescript [sans] [simple] [name] - \definefontsynonym [Sans] [Simple] - \definefontsynonym [SansBold] [Sans] - \definefontsynonym [SansItalic] [Sans] - \definefontsynonym [SansSlanted] [Sans] - \definefontsynonym [SansBoldItalic] [Sans] - \definefontsynonym [SansBoldSlanted] [Sans] - \definefontsynonym [SansCaps] [Sans] +\starttypescript [\s!sans] [\s!simple] [\s!name] + \definefontsynonym [\s!Sans] [\s!Simple] + \definefontsynonym [\s!SansBold] [\s!Sans] + \definefontsynonym [\s!SansItalic] [\s!Sans] + \definefontsynonym [\s!SansSlanted] [\s!Sans] + \definefontsynonym [\s!SansBoldItalic] [\s!Sans] + \definefontsynonym [\s!SansBoldSlanted] [\s!Sans] + \definefontsynonym [\s!SansCaps] [\s!Sans] \stoptypescript -\starttypescript [mono] [simple] [name] - \definefontsynonym [Mono] [Simple] - \definefontsynonym [MonoBold] [Mono] - \definefontsynonym [MonoItalic] [Mono] - \definefontsynonym [MonoSlanted] [Mono] - \definefontsynonym [MonoBoldItalic] [Mono] - \definefontsynonym [MonoBoldSlanted] [Mono] - \definefontsynonym [MonoCaps] [Mono] +\starttypescript [\s!mono] [\s!simple] [\s!name] + \definefontsynonym [\s!Mono] [\s!Simple] + \definefontsynonym [\s!MonoBold] [\s!Mono] + \definefontsynonym [\s!MonoItalic] [\s!Mono] + \definefontsynonym [\s!MonoSlanted] [\s!Mono] + \definefontsynonym [\s!MonoBoldItalic] [\s!Mono] + \definefontsynonym [\s!MonoBoldSlanted] [\s!Mono] + \definefontsynonym [\s!MonoCaps] [\s!Mono] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/base/type-imp-antykwa.mkiv b/tex/context/base/type-imp-antykwa.mkiv new file mode 100644 index 000000000..ba5895c8e --- /dev/null +++ b/tex/context/base/type-imp-antykwa.mkiv @@ -0,0 +1,228 @@ +%D \module +%D [ file=type-imp-antykwa, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Antykwa Torunska, +%D author=Mojca Miklavec \& Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[antykwa-torunska] + + \starttypescript [antykwa,antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] + \definetypeface[\typescriptone][\s!rm][\s!serif][\typescriptone] [\s!default] + \definetypeface[\typescriptone][\s!ss][\s!sans] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface[\typescriptone][\s!tt][\s!mono] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface[\typescriptone][\s!mm][\s!math] [\typescriptone] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [\s!serif] [antykwa,antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] + \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-MedItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondMedItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default] + + \definefontsynonym [AntykwaTorunska-Cap] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-ItalicCap] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-BoldCap] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-BoldItalicCap] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-LightCap] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-LightItalicCap] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-MediumCap] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-MedItalicCap] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondCap] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondItalicCap] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondBoldCap] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondLightCap] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondLightItalicCap][\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondMediumCap] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaTorunska-CondMedItalicCap] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!smallcaps] + \stoptypescript + + \starttypescript [\s!math][antykwa,antykwa-torunska][\s!all] + \loadfontgoodies[antykwa-math] + \definefontsynonym[\s!MathRoman][antykwamath@antykwa-math] + \stoptypescript + + \starttypescript [\s!math][antykwa-torunska-light][\s!all] + \loadfontgoodies[antykwa-math] + \definefontsynonym[\s!MathRoman][antykwalightmath@antykwa-light-math] + \stoptypescript + + \starttypescript [\s!math][antykwa-torunska-cond][\s!all] + \loadfontgoodies[antykwa-math] + \definefontsynonym[\s!MathRoman][antykwacondmath@antykwa-cond-math] + \stoptypescript + + \starttypescript [\s!math][antykwa-torunska-lightcond][\s!all] + \loadfontgoodies[antykwa-math] + \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-lightcond-math] + \stoptypescript + + \starttypescript [\s!serif] [antykwa,antykwa-torunska] [\s!name] + \definefontsynonym [\s!Serif] [AntykwaTorunska-Regular] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Bold] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-Italic] + \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-Italic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic] + \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-BoldItalic] + \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-Cap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-torunska-light] [\s!name] + \definefontsynonym [\s!Serif] [AntykwaTorunska-Light] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Medium] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-LightItalic] + \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-LightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MedItalic] + \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-MedItalic] + \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-LightCap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-torunska-cond] [\s!name] + \definefontsynonym [\s!Serif] [AntykwaTorunska-CondRegular] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondBold] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondItalic] + \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic] + \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondBoldItalic] + \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-CondCap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-torunska-lightcond] [\s!name] + \definefontsynonym [\s!Serif] [AntykwaTorunska-CondLight] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondMedium] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMedItalic] + \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondMedItalic] + \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-CondLightCap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa,antykwa-torunska] [\s!name] + \definefontsynonym [SerifRegular] [Serif] + \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-Cap] + \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-BoldCap] + \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-ItalicCap] + \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-ItalicCap] + \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-BoldItalicCap] + \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-BoldItalicCap] + \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-Cap] + + \definefontsynonym [SerifRegularLight] [AntykwaTorunska-Light] + \definefontsynonym [SerifBoldLight] [AntykwaTorunska-Medium] + \definefontsynonym [SerifItalicLight] [AntykwaTorunska-LightItalic] + \definefontsynonym [SerifSlantedLight] [AntykwaTorunska-LightItalic] + \definefontsynonym [SerifBoldItalicLight] [AntykwaTorunska-MedItalic] + \definefontsynonym [SerifBoldSlantedLight] [AntykwaTorunska-MedItalic] + \definefontsynonym [SerifCapsLight] [AntykwaTorunska-LightCap] + + \definefontsynonym [SerifRegularCond] [AntykwaTorunska-CondRegular] + \definefontsynonym [SerifBoldCond] [AntykwaTorunska-CondBold] + \definefontsynonym [SerifItalicCond] [AntykwaTorunska-CondItalic] + \definefontsynonym [SerifSlantedCond] [AntykwaTorunska-CondItalic] + \definefontsynonym [SerifBoldItalicCond] [AntykwaTorunska-CondBoldItalic] + \definefontsynonym [SerifBoldSlantedCond] [AntykwaTorunska-CondBoldItalic] + \definefontsynonym [SerifCapsCond] [AntykwaTorunska-CondCap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-torunska-light] [\s!name] + \definefontsynonym [SerifRegular] [Serif] + \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-LightCap] + \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-MediumCap] + \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-LightItalicCap] + \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-LightItalicCap] + \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-MedItalicCap] + \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-MedItalicCap] + \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-LightCap] + + \definefontsynonym [SerifRegularDark] [AntykwaTorunska-Regular] + \definefontsynonym [SerifBoldDark] [AntykwaTorunska-Bold] + \definefontsynonym [SerifItalicDark] [AntykwaTorunska-Italic] + \definefontsynonym [SerifSlantedDark] [AntykwaTorunska-Italic] + \definefontsynonym [SerifBoldItalicDark] [AntykwaTorunska-BoldItalic] + \definefontsynonym [SerifBoldSlantedDark] [AntykwaTorunska-BoldItalic] + \definefontsynonym [SerifCapsDark] [AntykwaTorunska-Cap] + + \definefontsynonym [SerifRegularCond] [AntykwaTorunska-CondLight] + \definefontsynonym [SerifBoldCond] [AntykwaTorunska-CondMedium] + \definefontsynonym [SerifItalicCond] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [SerifSlantedCond] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [SerifBoldItalicCond] [AntykwaTorunska-CondMedItalic] + \definefontsynonym [SerifBoldSlantedCond] [AntykwaTorunska-CondMedItalic] + \definefontsynonym [SerifCapsCond] [AntykwaTorunska-CondLightCap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-torunska-cond] [\s!name] + \definefontsynonym [SerifRegular] [Serif] + \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-CondCap] + \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-CondBoldCap] + \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-CondItalicCap] + \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-CondItalicCap] + \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-CondBoldItalicCap] + \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-CondBoldItalicCap] + \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-CondCap] + + \definefontsynonym [SerifRegularLight] [AntykwaTorunska-CondLight] + \definefontsynonym [SerifBoldLight] [AntykwaTorunska-CondMedium] + \definefontsynonym [SerifItalicLight] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [SerifSlantedLight] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [SerifBoldItalicLight] [AntykwaTorunska-CondMedItalic] + \definefontsynonym [SerifBoldSlantedLight] [AntykwaTorunska-CondMedItalic] + \definefontsynonym [SerifCapsLight] [AntykwaTorunska-CondLightCap] + + \definefontsynonym [SerifRegularExp] [AntykwaTorunska-Regular] + \definefontsynonym [SerifBoldExp] [AntykwaTorunska-Bold] + \definefontsynonym [SerifItalicExp] [AntykwaTorunska-Italic] + \definefontsynonym [SerifSlantedExp] [AntykwaTorunska-Italic] + \definefontsynonym [SerifBoldItalicExp] [AntykwaTorunska-BoldItalic] + \definefontsynonym [SerifBoldSlantedExp] [AntykwaTorunska-BoldItalic] + \definefontsynonym [SerifCapsExp] [AntykwaTorunska-Cap] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-torunska-lightcond] [\s!name] + \definefontsynonym [SerifRegular] [Serif] + \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-CondLightCap] + \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-CondMediumCap] + \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-CondLightItalicCap] + \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-CondLightItalicCap] + \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-CondMedItalicCap] + \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-CondMedItalicCap] + \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-CondLightCap] + + \definefontsynonym [SerifRegularDark] [AntykwaTorunska-CondRegular] + \definefontsynonym [SerifBoldDark] [AntykwaTorunska-CondBold] + \definefontsynonym [SerifItalicDark] [AntykwaTorunska-CondItalic] + \definefontsynonym [SerifSlantedDark] [AntykwaTorunska-CondItalic] + \definefontsynonym [SerifBoldItalicDark] [AntykwaTorunska-CondBoldItalic] + \definefontsynonym [SerifBoldSlantedDark] [AntykwaTorunska-CondBoldItalic] + \definefontsynonym [SerifCapsDark] [AntykwaTorunska-CondCap] + + \definefontsynonym [SerifRegularExp] [AntykwaTorunska-Light] + \definefontsynonym [SerifBoldExp] [AntykwaTorunska-Medium] + \definefontsynonym [SerifItalicExp] [AntykwaTorunska-LightItalic] + \definefontsynonym [SerifSlantedExp] [AntykwaTorunska-LightItalic] + \definefontsynonym [SerifBoldItalicExp] [AntykwaTorunska-MedItalic] + \definefontsynonym [SerifBoldSlantedExp] [AntykwaTorunska-MedItalic] + \definefontsynonym [SerifCapsExp] [AntykwaTorunska-LightCap] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-antykwapoltawskiego.mkiv b/tex/context/base/type-imp-antykwapoltawskiego.mkiv new file mode 100644 index 000000000..5a4c1c462 --- /dev/null +++ b/tex/context/base/type-imp-antykwapoltawskiego.mkiv @@ -0,0 +1,140 @@ +%D \module +%D [ file=type-imp-antykwa-poltawskiego, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Antykwa Poltawskiego, +%D author=Mojca Miklavec \& Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[antykwa-poltawskiego] + + % condensed and extended variants are still missing + + \starttypescript [antykwa-poltawskiego,antykwa-poltawskiego-light,antykwapoltawskiego,antykwapoltawskiego-light] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] [\s!rscale=1.05] + \quittypescriptscanning + \stoptypescript + + % names of "Caps" may still change + + \starttypescript [\s!serif] [antykwa-poltawskiego,antykwa-poltawskiego-light,antykwapoltawskiego,antykwapoltawskiego-light] + \definefontsynonym [AntykwaPoltawskiego-Condensed-Light] [\s!file:antpoltltcond-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-LightItalic] [\s!file:antpoltltcond-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-Regular] [\s!file:antpoltcond-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-Italic] [\s!file:antpoltcond-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-Medium] [\s!file:antpoltltcond-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-MediumItalic] [\s!file:antpoltltcond-bolditalic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-Bold] [\s!file:antpoltcond-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Condensed-BoldItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!default] + + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsLight] [\s!file:antpoltltcond-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsLightItalic] [\s!file:antpoltltcond-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsRegular] [\s!file:antpoltcond-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsItalic] [\s!file:antpoltcond-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsMedium] [\s!file:antpoltltcond-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsMediumItalic] [\s!file:antpoltltcond-bolditalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsBold] [\s!file:antpoltcond-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsBoldItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!smallcaps] + + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Light] [\s!file:antpoltltsemicond-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-LightItalic] [\s!file:antpoltltsemicond-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Regular] [\s!file:antpoltsemicond-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Italic] [\s!file:antpoltsemicond-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Medium] [\s!file:antpoltltsemicond-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-MediumItalic] [\s!file:antpoltltsemicond-bolditalic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Bold] [\s!file:antpoltsemicond-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-BoldItalic] [\s!file:antpoltsemicond-bolditalic] [\s!features=\s!default] + + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsLight] [\s!file:antpoltltsemicond-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsLightItalic] [\s!file:antpoltltsemicond-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsRegular] [\s!file:antpoltsemicond-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsItalic] [\s!file:antpoltsemicond-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsMedium] [\s!file:antpoltltsemicond-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsMediumItalic] [\s!file:antpoltltsemicond-bolditalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsBold] [\s!file:antpoltsemicond-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsBoldItalic] [\s!file:antpoltsemicond-bolditalic] [\s!features=\s!smallcaps] + + \definefontsynonym [AntykwaPoltawskiego-Light] [\s!file:antpoltlt-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-LightItalic] [\s!file:antpoltlt-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Regular] [\s!file:antpolt-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Italic] [\s!file:antpolt-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Medium] [\s!file:antpoltlt-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-MediumItalic] [\s!file:antpoltlt-bolditalic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Bold] [\s!file:antpolt-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [\s!file:antpolt-bolditalic] [\s!features=\s!default] + + \definefontsynonym [AntykwaPoltawskiego-CapsLight] [\s!file:antpoltcond-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsLightItalic] [\s!file:antpoltcond-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsRegular] [\s!file:antpolt-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsItalic] [\s!file:antpolt-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsMedium] [\s!file:antpoltcond-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsMediumItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsBold] [\s!file:antpolt-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-CapsBoldItalic] [\s!file:antpolt-bolditalic] [\s!features=\s!smallcaps] + + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Light] [\s!file:antpoltltsemiexpd-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-LightItalic] [\s!file:antpoltltsemiexpd-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Regular] [\s!file:antpoltsemiexpd-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Italic] [\s!file:antpoltsemiexpd-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Medium] [\s!file:antpoltltsemiexpd-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-MediumItalic] [\s!file:antpoltltsemiexpd-bolditalic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Bold] [\s!file:antpoltsemiexpd-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-BoldItalic] [\s!file:antpoltsemiexpd-bolditalic] [\s!features=\s!default] + + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsLight] [\s!file:antpoltltsemiexpd-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsLightItalic] [\s!file:antpoltltsemiexpd-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsRegular] [\s!file:antpoltsemiexpd-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsItalic] [\s!file:antpoltsemiexpd-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsMedium] [\s!file:antpoltltsemiexpd-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsMediumItalic] [\s!file:antpoltltsemiexpd-bolditalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsBold] [\s!file:antpoltsemiexpd-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsBoldItalic] [\s!file:antpoltsemiexpd-bolditalic] [\s!features=\s!smallcaps] + + \definefontsynonym [AntykwaPoltawskiego-Expanded-Light] [\s!file:antpoltltexpd-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-LightItalic] [\s!file:antpoltltexpd-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-Regular] [\s!file:antpoltexpd-regular] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-Italic] [\s!file:antpoltexpd-italic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-Medium] [\s!file:antpoltltexpd-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-MediumItalic] [\s!file:antpoltltexpd-bolditalic] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-Bold] [\s!file:antpoltexpd-bold] [\s!features=\s!default] + \definefontsynonym [AntykwaPoltawskiego-Expanded-BoldItalic] [\s!file:antpoltexpd-bolditalic] [\s!features=\s!default] + + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsLight] [\s!file:antpoltltexpd-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsLightItalic] [\s!file:antpoltltexpd-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsRegular] [\s!file:antpoltexpd-regular] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsItalic] [\s!file:antpoltexpd-italic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsMedium] [\s!file:antpoltltexpd-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsMediumItalic] [\s!file:antpoltltexpd-bolditalic] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsBold] [\s!file:antpoltexpd-bold] [\s!features=\s!smallcaps] + \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsBoldItalic] [\s!file:antpoltexpd-bolditalic] [\s!features=\s!smallcaps] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-poltawskiego,antykwapoltawskiego] [\s!name] + \definefontsynonym [\s!Serif] [AntykwaPoltawskiego-Regular] + \definefontsynonym [\s!SerifBold] [AntykwaPoltawskiego-Bold] + \definefontsynonym [\s!SerifItalic] [AntykwaPoltawskiego-Italic] + \definefontsynonym [\s!SerifSlanted] [AntykwaPoltawskiego-Italic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaPoltawskiego-BoldItalic] + \definefontsynonym [\s!SerifBoldSlanted] [AntykwaPoltawskiego-BoldItalic] + \definefontsynonym [\s!SerifCaps] [AntykwaPoltawskiego-CapsRegular] + \stoptypescript + + \starttypescript [\s!serif] [antykwa-poltawskiego-light,antykwapoltawskiego-light] [\s!name] + \definefontsynonym [\s!Serif] [AntykwaPoltawskiego-Light] + \definefontsynonym [\s!SerifBold] [AntykwaPoltawskiego-Medium] + \definefontsynonym [\s!SerifItalic] [AntykwaPoltawskiego-LightItalic] + \definefontsynonym [\s!SerifSlanted] [AntykwaPoltawskiego-LightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaPoltawskiego-MediumItalic] + \definefontsynonym [\s!SerifBoldSlanted] [AntykwaPoltawskiego-MediumItalic] + \definefontsynonym [\s!SerifCaps] [AntykwaPoltawskiego-CapsLight] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-asana.mkiv b/tex/context/base/type-imp-asana.mkiv new file mode 100644 index 000000000..b87c969e2 --- /dev/null +++ b/tex/context/base/type-imp-asana.mkiv @@ -0,0 +1,35 @@ +%D \module +%D [ file=type-imp-asana, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Asana, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\loadtypescriptfile[texgyre] + +\starttypescriptcollection [asanamath] + + \starttypescript [\s!math] [asana] + \definefontsynonym [AsanaMath] [\s!name:asanamath] + \stoptypescript + + \starttypescript [\s!math] [asana] [\s!name] + \loadfontgoodies[asana-math] + \definefontsynonym [MathRoman] [AsanaMath] [\s!features=\s!math\mathsizesuffix,\s!goodies=asana-math] + \stoptypescript + + \starttypescript[asana] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [palatino] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.075] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.075] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default] + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-cambria.mkiv b/tex/context/base/type-imp-cambria.mkiv new file mode 100644 index 000000000..91288b6d0 --- /dev/null +++ b/tex/context/base/type-imp-cambria.mkiv @@ -0,0 +1,73 @@ +%D \module +%D [ file=type-imp-cambria, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Microsoft Cambria, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[cambria] + + % microsoft: cambria.ttc cambriab.ttf cambriai.ttf cambriaz.ttf + % ascender : cambmath.ttf cambria.ttf cambriab.ttf cambriai.ttf cambriaz.ttf + + \starttypescript [\s!math,\s!serif] [cambria,cambria-x,cambria-y] + % whatever matches + \definefontsynonym [CambriaMath] [\s!name:cambriamath] + \definefontsynonym [CambriaSerif] [\s!name:cambria] + \stoptypescript + \starttypescript [\s!math,\s!serif] [cambria-m] + % microsoft cabria + \definefontsynonym [CambriaMath] [\s!file:cambria.ttc(Cambria Math)] + \definefontsynonym [CambriaSerif] [\s!file:cambria.ttc(Cambria)] + \stoptypescript + \starttypescript [\s!math,\s!serif] [cambria-a] + % ascender cambria + \definefontsynonym [CambriaMath] [\s!file:cambmath.ttf] + \definefontsynonym [CambriaSerif] [\s!file:cambria.ttf] + \stoptypescript + + % We load a goodies file that will apply a patch to the font. As a demonstration + % we apply the patch when caching as as when scaling which is why we also specify + % the goodies file with the name. + + \starttypescript [\s!math] [cambria,cambria-m,cambria-a] [\s!name] + \loadfontgoodies[cambria-math] + \definefontsynonym [\s!MathRoman] [CambriaMath] [\s!features=\s!math\mathsizesuffix,\s!goodies=cambria-math] + \stoptypescript + \starttypescript [\s!math] [cambria-x] [\s!name] + \loadfontgoodies[cambria-math] + \definefontsynonym [\s!MathRoman] [CambriaMath] [\s!features=\s!math,\s!goodies=cambria-math] + \stoptypescript + \starttypescript [\s!math] [cambria-y] [\s!name] + \loadfontgoodies[cambria-math] + \definefontsynonym [\s!MathRoman] [CambriaMath] [\s!features=\s!math-nostack\mathsizesuffix,\s!goodies=cambria-math] + \stoptypescript + + \starttypescript [\s!serif] [cambria,cambria-m,cambria-a] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [CambriaSerif] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!name:cambriabold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!name:cambriaitalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!name:cambriabolditalic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [cambria,cambria-m,cambria-a] + % any + \definetypeface [cambria] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [cambria] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [cambria] [\s!mm] [\s!math] [\typescriptone] [\s!default] + \stoptypescript + \starttypescript [cambria-x,cambria-y] + % test x + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [cambria] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-charter.mkiv b/tex/context/base/type-imp-charter.mkiv new file mode 100644 index 000000000..b788a974e --- /dev/null +++ b/tex/context/base/type-imp-charter.mkiv @@ -0,0 +1,36 @@ +%D \module +%D [ file=type-imp-charter, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Charter, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[charter] + + \starttypescript [\s!serif] [charter] + \definefontsynonym [Charter-Roman] [\s!name:CharterBT-Roman] + \definefontsynonym [Charter-Italic] [\s!name:CharterBT-Italic] + \definefontsynonym [Charter-Bold] [\s!name:CharterBT-Bold] + \definefontsynonym [Charter-BoldItalic] [\s!name:CharterBT-BoldItalic] + \definefontsynonym [Charter-Slanted] [\s!name:CharterBT-Italic] + \definefontsynonym [Charter-BoldSlanted] [\s!name:CharterBT-BoldItalic] + \definefontsynonym [Charter-Roman-Caps] [Charter-Roman] + \stoptypescript + + \starttypescript [\s!serif] [charter] [\s!name] + \definefontsynonym [Serif] [Charter-Roman] + \definefontsynonym [SerifItalic] [Charter-Italic] + \definefontsynonym [SerifBold] [Charter-Bold] + \definefontsynonym [SerifBoldItalic] [Charter-BoldItalic] + \definefontsynonym [SerifSlanted] [Charter-Slanted] + \definefontsynonym [SerifBoldSlanted] [Charter-BoldSlanted] + \definefontsynonym [SerifCaps] [Charter-Roman-Caps] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-cleartype.mkiv b/tex/context/base/type-imp-cleartype.mkiv new file mode 100644 index 000000000..b2f1b21a5 --- /dev/null +++ b/tex/context/base/type-imp-cleartype.mkiv @@ -0,0 +1,56 @@ +%D \module +%D [ file=type-imp-cleartype, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Microsoft Cleartype, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[cleartype] + + \starttypescript [\s!sans] [candara] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!file:candara] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:candarab] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:candarai] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:candaraz] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [consolas] [\s!name] + \setups[\s!font:\s!fallback:\s!mono] + \definefontsynonym [\s!Mono] [\s!file:consola] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!file:consolab] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!file:consolai] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] [\s!features=\s!none] + \stoptypescript + + \starttypescript [\s!serif] [constantia] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!file:constan] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:constanb] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:constani] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:constanz] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [corbel] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!file:corbel] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:corbelb] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:corbeli] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:corbelz] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [calibri] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!file:calibri] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:calibrib] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:calibrii] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:calibriz] [\s!features=\s!default] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-computer-modern-unicode.mkiv b/tex/context/base/type-imp-computer-modern-unicode.mkiv new file mode 100644 index 000000000..329233174 --- /dev/null +++ b/tex/context/base/type-imp-computer-modern-unicode.mkiv @@ -0,0 +1,49 @@ +%D \module +%D [ file=type-computer-modern-unicode, +%D version=2007.07.30, % moved from type-otf +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Computer Modern Unicode, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[computer-modern-unicode] + + \starttypescript [serif,sans,mono] [computer-modern-unicode] + \definefontsynonym [\s!Serif] [\s!file:cmunrm] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:cmunti] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [\s!file:cmunsl] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:cmunbx] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunbi] [\s!features=\s!default] + \definefontsynonym [\s!Sans] [\s!file:cmunss] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:cmunsi] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:cmunsx] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:cmunso] [\s!features=\s!default] + \definefontsynonym [\s!Mono] [\s!file:cmuntt] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!file:cmunit] [\s!features=\s!none] + \definefontsynonym [\s!MonoSlanted] [\s!file:cmunst] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!file:cmuntb] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:cmuntx] [\s!features=\s!none] + \stoptypescript + + \starttypescript [serif] [computer-modern-unicode-concrete] + \definefontsynonym [\s!Serif] [\s!file:cmunorm] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:cmunoti] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:cmunobx] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunobi] [\s!features=\s!default] + \stoptypescript + + \starttypescript[computer-modern-unicode] + \definetypeface[computer-modern-unicode][rm][\s!serif][computer-modern-unicode][\s!default] + \definetypeface[computer-modern-unicode][ss][\s!sans] [computer-modern-unicode][\s!default] + \definetypeface[computer-modern-unicode][tt][\s!mono] [computer-modern-unicode][\s!default] + \definetypeface[computer-modern-unicode][mm][\s!math] [modern] [\s!default] + \stoptypescript + +\stoptypescriptcollection + +\endinput diff --git a/tex/context/base/type-imp-dejavu.mkiv b/tex/context/base/type-imp-dejavu.mkiv new file mode 100644 index 000000000..0e628c4ba --- /dev/null +++ b/tex/context/base/type-imp-dejavu.mkiv @@ -0,0 +1,92 @@ +%D \module +%D [ file=type-imp-dejavu, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Dejavu fonts (dejavu-fonts.org), +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\definefontfeature[dejavu-condensed-mono][extend=.8] + +\starttypescriptcollection[dejavu] + + \starttypescript [\s!mono] [dejavu-condensed] [\s!name] + \setups[\s!font:\s!fallback:\s!mono] + % \definefontsynonym [\s!Mono] [\s!name:dejavusansmonocondensed] [\s!features=\s!none] + % \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonoboldcondensed] [\s!features=\s!none] + % \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonoobliquecondensed] [\s!features=\s!none] + % \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldobliquecondensed] [\s!features=\s!none] + \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=dejavu-condensed-mono] + \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=dejavu-condensed-mono] + \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=dejavu-condensed-mono] + \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=dejavu-condensed-mono] + \stoptypescript + + % \starttypescript [\s!mono] [dejavu-condensed] [\s!name] + % \setups[\s!font:\s!fallback:\s!mono] + % \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=\s!none] + % \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=\s!none] + % \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=\s!none] + % \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=\s!none] + % \stoptypescript + + \starttypescript[dejavu-condensed] + \definetypeface [dejavu-condensed] [\s!rm] [\s!serif] [dejavu-condensed] [\s!default] + \definetypeface [dejavu-condensed] [\s!ss] [\s!sans] [dejavu-condensed] [\s!default] + \definetypeface [dejavu-condensed] [\s!tt] [\s!mono] [dejavu-condensed] [\s!default] + \definetypeface [dejavu-condensed] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2] + \stoptypescript + + \starttypescript [\s!serif] [dejavu] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifbold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!name:dejavuserifitalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!name:dejavuserifbolditalic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [dejavu] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!name:dejavusans] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!name:dejavusansbold] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!name:dejavusansoblique] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!name:dejavusansboldoblique] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [dejavu] [\s!name] + \setups[\s!font:\s!fallback:\s!mono] + \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=\s!none] + \stoptypescript + + \starttypescript[dejavu] + \definetypeface [dejavu] [\s!rm] [\s!serif] [dejavu] [\s!default] + \definetypeface [dejavu] [\s!ss] [\s!sans] [dejavu] [\s!default] + \definetypeface [dejavu] [\s!tt] [\s!mono] [dejavu] [\s!default] + \definetypeface [dejavu] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2] + \stoptypescript + + \starttypescript [\s!serif] [dejavu-condensed] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!name:dejavuserifcondensed] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifcondensedbold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!name:dejavuserifcondenseditalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!name:dejavuserifcondensedbolditalic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [dejavu-condensed] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!name:dejavusanscondensed] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!name:dejavusanscondensedbold] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!name:dejavusanscondensedoblique] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!name:dejavusanscondensedboldoblique] [\s!features=\s!default] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-euler.mkiv b/tex/context/base/type-imp-euler.mkiv new file mode 100644 index 000000000..60b9760f5 --- /dev/null +++ b/tex/context/base/type-imp-euler.mkiv @@ -0,0 +1,47 @@ +%D \module +%D [ file=type-otf, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Euler, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\loadtypescriptfile[texgyre] + +\starttypescriptcollection[pagella-euler] + + \starttypescript [\s!math] [euler] + \definefontsynonym [EulerMath] [\s!file:euler.otf] + \stoptypescript + + \starttypescript [\s!math] [euler] [\s!name] + % \definefontsynonym [MathRoman] [EulerMath] [\s!features=\s!math] + \definefontsynonym [MathRoman] [EulerMath] [\s!features=\s!math\mathsizesuffix] + \stoptypescript + + \starttypescript [pagella-euler] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [pagella] [\s!default] + % \definetypeface [\typescriptone] [\s!ss] [\s!sans] [pagella] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [euler] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [\s!serif] [euler] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!file:euler.otf] [\s!features=\s!default] + \stoptypescript + + \starttypescript [euler] + \definetypeface [euler] [\s!rm] [\s!serif] [euler] [\s!default] + \definetypeface [euler] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [euler] [\s!mm] [\s!math] [euler] [\s!default] + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-husayni-default.mkiv b/tex/context/base/type-imp-husayni.mkiv index b3c1af5b7..b3c1af5b7 100644 --- a/tex/context/base/type-husayni-default.mkiv +++ b/tex/context/base/type-imp-husayni.mkiv diff --git a/tex/context/base/type-imp-hvmath.mkiv b/tex/context/base/type-imp-hvmath.mkiv new file mode 100644 index 000000000..01595710e --- /dev/null +++ b/tex/context/base/type-imp-hvmath.mkiv @@ -0,0 +1,30 @@ +%D \module +%D [ file=type-imp-hvmath, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=HV Math Fonts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\loadtypescriptfile[texgyre] + +\starttypescriptcollection[hvmath] + + \starttypescript [\s!math] [hvmath] + \definefontsynonym[\s!MathRoman][hvmath@hvmath-math] + \loadfontgoodies[hvmath-math] + \stoptypescript + + \starttypescript [hvmath] + \definetypeface [hvmath] [\s!ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9] + \definetypeface [hvmath] [\s!rm] [\s!serif] [termes] [\s!default] + \definetypeface [hvmath] [\s!tt] [\s!mono] [cursor] [\s!default] [\s!rscale=1.05] + \definetypeface [hvmath] [\s!mm] [\s!math] [hvmath] [\s!default] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-inconsolata.mkiv b/tex/context/base/type-imp-inconsolata.mkiv new file mode 100644 index 000000000..159759e9b --- /dev/null +++ b/tex/context/base/type-imp-inconsolata.mkiv @@ -0,0 +1,25 @@ +%D \module +%D [ file=type-imp-incolsolata, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Inconsolata, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[inconsolata] + + \starttypescript [\s!mono] [inconsolata] + \definefontsynonym [Inconsolata] [\s!file:inconsolata.otf] + \stoptypescript + + \starttypescript [\s!mono] [inconsolata] [\s!name] + \setups[\s!font:\s!fallback:\s!mono] + \definefontsynonym [\s!Mono] [Inconsolata] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-iwona.mkiv b/tex/context/base/type-imp-iwona.mkiv new file mode 100644 index 000000000..88cb7e719 --- /dev/null +++ b/tex/context/base/type-imp-iwona.mkiv @@ -0,0 +1,236 @@ +%D \module +%D [ file=type-imp-iwona, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Iwona, +%D author=Mojca Miklavec \& Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[iwona] + + % maybe this will change in Iwona-Math-Letters and Iwona-Math-Letters-Italic + + % These names are a depressing mess. They have changed over time and are + % still not consistent. I'd expect Bold-Regular and Bold-Italic. + + \starttypescript [\s!sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond] + + \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default] + \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default] + \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default] + + \definefontsynonym [Iwona-CapsRegular] [\s!file:Iwona-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsItalic] [\s!file:Iwona-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsBold] [\s!file:Iwona-Bold] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsBoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsLight] [\s!file:IwonaLight-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsLight-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsMedium] [\s!file:IwonaMedium-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsMedium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsHeavy] [\s!file:IwonaHeavy-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsHeavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!smallcaps] + + \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default] + \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default] + + \definefontsynonym [Iwona-CapsCondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondMedium-Regular][\s!file:IwonaCondMedium-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!smallcaps] + \definefontsynonym [Iwona-CapsCondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!smallcaps] + + \stoptypescript + + % [all] is redundant + + \starttypescript [\s!math][iwona][\s!all] + \definefontsynonym[\s!MathRoman][iwonamath@iwona-math] + \stoptypescript + \starttypescript [\s!math][iwona-light][\s!all] + \definefontsynonym[\s!MathRoman][iwonalightmath@iwona-light-math] + \stoptypescript + \starttypescript [\s!math][iwona-medium][\s!all] + \definefontsynonym[\s!MathRoman][iwonamediummath@iwona-medium-math] + \stoptypescript + \starttypescript [\s!math][iwona-heavy][\s!all] + \definefontsynonym[\s!MathRoman][iwonaheavymath@iwona-heavy-math] + \stoptypescript + + \starttypescript [\s!math] [iwona,iwona-light,iwona-medium,iwona-heavy] [\s!all] + \loadfontgoodies[iwona-math] + \stoptypescript + + \starttypescript [\s!sans] [iwona-light] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-Light-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Light-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Medium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Medium-Italic] + \definefontsynonym [SansCaps] [Iwona-CapsLight] + \definefontsynonym [SansItalicCaps] [Iwona-CapsLightItalic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsMedium] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsMediumItalic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-light-caps] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CapsLight-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CapsLight-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CapsMedium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsMedium-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Bold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-BoldItalic] + \definefontsynonym [SansCaps] [Iwona-CapsRegular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsItalic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsBold] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsBoldItalic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-caps] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CapsRegular] + \definefontsynonym [\s!SansItalic] [Iwona-CapsItalic] + \definefontsynonym [\s!SansBold] [Iwona-CapsBold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsBoldItalic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-medium] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-Medium-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Medium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] + \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsMedium-Italic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-medium-caps] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CapsHeavy-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CapsMedium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CapsHeavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsHeavy-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-heavy] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] + \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavy-Italic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-heavy-caps] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavy-Italic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-light-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CondLight-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CondLight-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CondMedium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondMedium-Italic] + \definefontsynonym [SansCaps] [Iwona-CapsCondLight-Regular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsCondLight-Italic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsCondMedium-Regular] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondMedium-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-light-cond-caps,iwona-light-caps-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CapsCondLight-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CapsCondLight-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CapsCondMedium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsCondMedium-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CondRegular] + \definefontsynonym [\s!SansItalic] [Iwona-CondItalic] + \definefontsynonym [\s!SansBold] [Iwona-CondBold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondBoldItalic] + \definefontsynonym [SansCaps] [Iwona-CapsCondRegular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsCondItalic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsCondBold] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondBoldItalic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-cond-caps,iwona-caps-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CapsCondRegular] + \definefontsynonym [\s!SansItalic] [Iwona-CapsCondItalic] + \definefontsynonym [\s!SansBold] [Iwona-CapsCondBold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsCondBoldItalic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-medium-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CondMedium-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CondMedium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CondHeavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondHeavy-Italic] + \definefontsynonym [SansCaps] [Iwona-CapsCondHeavy-Regular] + \definefontsynonym [SansItalicCaps] [Iwona-CapsCondMedium-Italic] + \definefontsynonym [SansBoldCaps] [Iwona-CapsCondHeavy-Regular] + \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondHeavy-Italic] + \stoptypescript + + \starttypescript [\s!sans] [iwona-medium-cond-caps,iwona-medium-caps-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Iwona-CapsCondHeavy-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CapsCondMedium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CapsCondHeavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsCondHeavy-Italic] + \stoptypescript + + \starttypescript [iwona,iwona-light,iwona-heavy,iwona-medium] + \definetypeface[\typescriptone][\s!ss][\s!sans] [\typescriptone] [\s!default] + \definetypeface[\typescriptone][\s!rm][\s!serif][modern] [\s!default] + \definetypeface[\typescriptone][\s!tt][\s!mono] [modern] [\s!default] + \definetypeface[\typescriptone][\s!mm][\s!math] [\typescriptone] [\s!default][text=ss] + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-kurier.mkiv b/tex/context/base/type-imp-kurier.mkiv new file mode 100644 index 000000000..d83510b95 --- /dev/null +++ b/tex/context/base/type-imp-kurier.mkiv @@ -0,0 +1,56 @@ +%D \module +%D [ file=type-imp-kurier, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Kurier by JMN, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% There are no open type fonts yet so this should be in type-one.mkiv +% instead but we keep it here till ready. + +\starttypescriptcollection[kurier] + + \starttypescript [\s!sans] [kurier-light,kurier,kurier-medium] + \definefontsynonym[Kurier-Light] [kurierl] + \definefontsynonym[Kurier-Regular] [kurierr] + \definefontsynonym[Kurier-Medium] [kurierm] + \definefontsynonym[Kurier-Bold] [kurierb] + \definefontsynonym[Kurier-Heavy] [kurierh] + \definefontsynonym[Kurier-LightItalic] [kurierli] + \definefontsynonym[Kurier-Italic] [kurierri] + \definefontsynonym[Kurier-MediumItalic] [kuriermi] + \definefontsynonym[Kurier-BoldItalic] [kurierbi] + \definefontsynonym[Kurier-HeavyItalic] [kurierhi] + \stoptypescript + + \starttypescript [\s!sans] [kurier-light] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Kurier-Light-Regular] + \definefontsynonym [\s!SansItalic] [Kurier-Light-Italic] + \definefontsynonym [\s!SansBold] [Kurier-Medium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Kurier-Medium-Italic] + \stoptypescript + + \starttypescript [\s!sans] [kurier] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Kurier-Regular] + \definefontsynonym [\s!SansItalic] [Kurier-Italic] + \definefontsynonym [\s!SansBold] [Kurier-Bold] + \definefontsynonym [\s!SansBoldItalic] [Kurier-BoldItalic] + \stoptypescript + + \starttypescript [\s!sans] [kurier-medium] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Kurier-Medium-Regular] + \definefontsynonym [\s!SansItalic] [Kurier-Medium-Italic] + \definefontsynonym [\s!SansBold] [Kurier-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Kurier-Heavy-Italic] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-latinmodern.mkiv b/tex/context/base/type-imp-latinmodern.mkiv new file mode 100644 index 000000000..55824597f --- /dev/null +++ b/tex/context/base/type-imp-latinmodern.mkiv @@ -0,0 +1,216 @@ +%D \module +%D [ file=type-imp-modern, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Latin Modern, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[fallback] + + \starttypescript [fallback] + \definetypeface [] [\s!rm] [\s!serif] [latin-modern-designsize] [\s!default] % maybe modern-base + \definetypeface [] [\s!ss] [\s!sans] [latin-modern-designsize] [\s!default] % maybe modern-base + \definetypeface [] [\s!tt] [\s!mono] [latin-modern-designsize] [\s!default] % maybe modern-base + \definetypeface [] [\s!mm] [\s!math] [latin-modern-designsize] [\s!default] % maybe modern-base + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection + +%D Here comes good old Latin Modern, the default font, based on Knuths Computer +%D Modern. + +\starttypescriptcollection[latinmodern] + + \starttypescript [modern,modern-designsize] + \definetypeface [modern] [\s!rm] [\s!serif] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \definetypeface [modern] [\s!ss] [\s!sans] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \definetypeface [modern] [\s!tt] [\s!mono] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \definetypeface [modern] [\s!mm] [\s!math] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modern-base] + \definetypeface [modern] [\s!rm] [\s!serif] [modern] [\s!default] + \definetypeface [modern] [\s!ss] [\s!sans] [modern] [\s!default] + \definetypeface [modern] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [modern] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modernvariable,modern-variable] + \definetypeface [modernvariable] [\s!rm] [\s!serif] [modern-variable] [\s!default] + \definetypeface [modernvariable] [\s!tt] [\s!mono] [modern-variable] [\s!default] + \definetypeface [modernvariable] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modernvariablelight,modern-variable-light] + \definetypeface [modernvariable] [\s!rm] [\s!serif] [modern-variable-light] [\s!default] + \definetypeface [modernvariable] [\s!tt] [\s!mono] [modern-variable-light] [\s!default] + \definetypeface [modernvariable] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modern-mono,modern-base-mono] + \definetypeface [modern] [\s!rm] [\s!serif] [modern] [\s!default] + \definetypeface [modern] [\s!ss] [\s!sans] [modern] [\s!default] + \definetypeface [modern] [\s!tt] [\s!mono] [modern-light] [\s!default] + \definetypeface [modern] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [\s!serif] [simple] [\s!name]% for old times sake (manuals) + \definefontsynonym [\s!Simple] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!serif] [modern,latin-modern-designsize,latin-modern] [\s!name] + \definefontsynonym [\s!Serif] [LMRoman-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [LMRoman-Bold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [LMRoman-Italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [LMRoman-Oblique] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [LMRoman-BoldItalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldSlanted] [LMRoman-BoldOblique] [\s!features=\s!default] + \definefontsynonym [\s!SerifCaps] [LMRoman-CapsRegular] [\s!features=\s!default] + \definefontsynonym [SerifCapsSlanted] [LMRoman-CapsOblique] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [modern,latin-modern-designsize,latin-modern] [\s!name] + \definefontsynonym [\s!Sans] [LMSans-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [LMSans-Bold] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [LMSans-Oblique] [\s!features=\s!default] + \definefontsynonym [\s!SansSlanted] [LMSans-Oblique] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [LMSans-BoldOblique] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldSlanted] [LMSans-BoldOblique] [\s!features=\s!default] + \definefontsynonym [\s!SansCaps] [LMSans-Regular] [\s!features=\s!default] + \definefontsynonym [SansCapsSlanted] [LMSans-Oblique] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [modern,latin-modern-designsize,latin-modern] [\s!name] + \definefontsynonym [\s!Mono] [LMTypewriter-Regular] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [LMTypewriter-Dark] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [LMTypewriter-Italic] [\s!features=\s!none] + \definefontsynonym [\s!MonoSlanted] [LMTypewriter-Oblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [LMTypewriter-DarkOblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldSlanted] [LMTypewriter-DarkOblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoCaps] [LMTypewriter-CapsRegular] [\s!features=\s!none] + \definefontsynonym [MonoCapsSlanted] [LMTypewriter-CapsOblique] [\s!features=\s!none] + \definefontsynonym [MonoVariable] [LMTypewriterVarWd-Regular] [\s!features=\s!none] + \stoptypescript + + \starttypescript [\s!math] [modern,latin-modern-designsize,latin-modern] [\s!name] + \definefontsynonym [\s!MathRoman] [LMMathRoman-Regular] + \definefontsynonym [\s!MathRomanBold] [LMMathRoman-Bold] + \stoptypescript + + \starttypescript [\s!serif] [modern-variable,latin-modern-variable-designsize,latin-modern-variable] [\s!name] + \definefontsynonym [\s!Serif] [LMTypewriterVarWd-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [LMTypewriterVarWd-Oblique] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [LMTypewriterVarWd-Oblique] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [LMTypewriterVarWd-Dark] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [LMTypewriterVarWd-DarkOblique] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldSlanted] [LMTypewriterVarWd-DarkOblique] [\s!features=\s!default] + \definefontsynonym [\s!SerifCaps] [LMTypewriterVarWd-Regular] [\s!features=\s!default] + \definefontsynonym [SerifCapsSlanted] [LMTypewriterVarWd-Oblique] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [modern-condensed,latin-modern-condensed-designsize,latin-modern-condensed,modern-light-condensed,latin-modern-light-condensed] [\s!name] + \definefontsynonym [\s!Mono] [LMTypewriter-LightCondensed] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [LMTypewriter-LightCondensed] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [LMTypewriter-LightCondensedOblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoSlanted] [LMTypewriter-LightCondensedOblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [LMTypewriter-LightCondensed] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldSlanted] [LMTypewriter-LightCondensed] [\s!features=\s!none] + \definefontsynonym [\s!MonoCaps] [LMTypewriter-LightCondensed] [\s!features=\s!none] + \definefontsynonym [MonoCapsSlanted] [LMTypewriter-LightCondensed] [\s!features=\s!none] + \stoptypescript + + \starttypescript [\s!mono] [modern-light,latin-modern-light-designsize,latin-modern-light] [\s!name] + \definefontsynonym [\s!Mono] [LMTypewriter-Light] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [LMTypewriter-Light] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [LMTypewriter-LightOblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoSlanted] [LMTypewriter-LightOblique] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [LMTypewriter-Light] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldSlanted] [LMTypewriter-Light] [\s!features=\s!none] + \definefontsynonym [\s!MonoCaps] [LMTypewriter-Light] [\s!features=\s!none] + \definefontsynonym [MonoCapsSlanted] [LMTypewriter-Light] [\s!features=\s!none] + \stoptypescript + + \starttypescript [\s!serif] [modern,latin-modern] + \definefontsynonym [LMRoman-Regular] [\s!file:lmroman10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman-Bold] [\s!file:lmroman10-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman-Demi] [\s!file:lmromandemi10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman-Italic] [\s!file:lmroman10-italic] [\s!features=\s!default] + \definefontsynonym [LMRoman-Oblique] [\s!file:lmromanslant10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman-BoldItalic] [\s!file:lmroman10-bolditalic] [\s!features=\s!default] + \definefontsynonym [LMRoman-BoldOblique] [\s!file:lmromanslant10-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman-DemiOblique] [\s!file:lmromandemi10-oblique] [\s!features=\s!default] + \definefontsynonym [LMRoman-CapsRegular] [\s!file:lmroman10-CapsRegular] [\s!features=\s!default] + \definefontsynonym [LMRoman-CapsOblique] [\s!file:lmroman10-CapsOblique] [\s!features=\s!default] + \definefontsynonym [LMRoman-CapsRegular] [\s!file:lmromancaps10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman-CapsOblique] [\s!file:lmromancaps10-oblique] [\s!features=\s!default] + \definefontsynonym [LMRoman-Dunhill] [\s!file:lmromandunh10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman-DunhillOblique] [\s!file:lmromandunh10-oblique] [\s!features=\s!default] + \definefontsynonym [LMRoman-Unslanted] [\s!file:lmromanunsl10-regular] [\s!features=\s!default] + + \stoptypescript + + \starttypescript [\s!sans] [modern,latin-modern] + \definefontsynonym [LMSans-Regular] [\s!file:lmsans10-regular] [\s!features=\s!default] + \definefontsynonym [LMSans-Bold] [\s!file:lmsans10-bold] [\s!features=\s!default] + \definefontsynonym [LMSans-Oblique] [\s!file:lmsans10-oblique] [\s!features=\s!default] + \definefontsynonym [LMSans-BoldOblique] [\s!file:lmsans10-boldoblique] [\s!features=\s!default] + \definefontsynonym [LMSans-DemiCondensed] [\s!file:lmsansdemicond10-regular] [\s!features=\s!default] + \definefontsynonym [LMSans-DemiCondensedOblique] [\s!file:lmsansdemicond10-oblique] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation-Regular] [\s!file:lmsansquot8-regular] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation-Bold] [\s!file:lmsansquot8-bold] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation-Oblique] [\s!file:lmsansquot8-oblique] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation-BoldOblique] [\s!file:lmsansquot8-boldoblique] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [modern,latin-modern-designsize,latin-modern,modern-variable,latin-modern-variable,modern-condensed,latin-modern-condensed] + \definefontsynonym [LMTypewriter-Regular] [\s!file:lmmono10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-Italic] [\s!file:lmmono10-italic] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-Oblique] [\s!file:lmmonoslant10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-CapsRegular] [\s!file:lmmonocaps10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-CapsOblique] [\s!file:lmmonocaps10-oblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-Light] [\s!file:lmmonolt10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-LightOblique] [\s!file:lmmonolt10-oblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-LightCondensed] [\s!file:lmmonoltcond10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-LightCondensedOblique] [\s!file:lmmonoltcond10-oblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-Dark] [\s!file:lmmonolt10-bold] [\s!features=\s!none] + \definefontsynonym [LMTypewriter-DarkOblique] [\s!file:lmmonolt10-boldoblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriterVarWd-Regular] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd-Oblique] [\s!file:lmmonoproplt10-oblique] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd-Light] [\s!file:lmmonoprop10-regular] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd-LightOblique] [\s!file:lmmonoprop10-oblique] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd-Dark] [\s!file:lmmonoproplt10-bold] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd-DarkOblique] [\s!file:lmmonoproplt10-boldoblique] [\s!features=\s!default] + \stoptypescript + + \starttypescript [modern,latin-modern] + \loadfontgoodies[lm] + \loadfontgoodies[lm-math] + \stoptypescript + + \starttypescript [\s!math] [modern,latin-modern] + % \loadfontgoodies[lm-math] + \definefontsynonym [LMMathRoman-Regular] [\v!file:lmmath-regular.otf] [\s!features=\s!math] + \definefontsynonym [LMMathRoman-Bold] [\v!file:lmmath-regular.otf] [\s!features=\s!math] + \stoptypescript + +\stoptypescriptcollection + +%D It doesn't hurt to have these, at least for the moment (can go to type-imp-symbol) + +\definefontsynonym [ZapfDingbats] [\s!file:uzdr] [\s!goodies=dingbats] +%definefontsynonym [MartinVogel] [\s!file:marvosym.ttf] +%definefontsynonym [RalfSmithFormalScript] [\s!file:rsfs10] + +\endinput diff --git a/tex/context/base/type-imp-liberation.mkiv b/tex/context/base/type-imp-liberation.mkiv new file mode 100644 index 000000000..cc2c01b7b --- /dev/null +++ b/tex/context/base/type-imp-liberation.mkiv @@ -0,0 +1,47 @@ +%D \module +%D [ file=type-imp-liberation, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Liberation fonts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[liberation] + + \starttypescript [\s!serif] [liberation] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!file:liberationserif-regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:liberationserif-bold] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:liberationserif-italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:liberationserif-bolditalic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [liberation] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!file:liberationsans-regular] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:liberationsans-bold] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:liberationsans-italic] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:liberationsans-bolditalic] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [liberation] [\s!name] + \setups[\s!font:\s!fallback:\s!mono] + \definefontsynonym [\s!Mono] [\s!file:liberationmono-regular] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!file:liberationmono-bold] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!file:liberationmono-italic] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:liberationmono-bolditalic] [\s!features=\s!none] + \stoptypescript + + \starttypescript[liberation] + \definetypeface [liberation] [\s!rm] [\s!serif] [liberation] [\s!default] + \definetypeface [liberation] [\s!ss] [\s!sans] [liberation] [\s!default] [\s!rscale=0.870] + \definetypeface [liberation] [\s!tt] [\s!mono] [liberation] [\s!default] [\s!rscale=0.870] + \definetypeface [liberation] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.040] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-libertine.mkiv b/tex/context/base/type-imp-libertine.mkiv new file mode 100644 index 000000000..be92c27c7 --- /dev/null +++ b/tex/context/base/type-imp-libertine.mkiv @@ -0,0 +1,63 @@ +%D \module +%D [ file=type-imp-libertine, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Libertine fonts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[libertine] + + \starttypescript [\s!serif] [libertine] + \definefontsynonym [Libertine-Regular] [\s!file:linlibertiner] + \definefontsynonym [Libertine-Italic] [\s!file:linlibertineri] + \definefontsynonym [Libertine-Slanted] [\s!file:linlibertinearl] + \definefontsynonym [Libertine-Bold] [\s!file:linlibertinerb] + \definefontsynonym [Libertine-BoldItalic] [\s!file:linlibertinerbi] + \definefontsynonym [Libertine-BoldSlanted] [\s!file:linlibertineabl] + \stoptypescript + + \starttypescript [\s!serif] [libertine] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [Libertine-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [Libertine-Italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [Libertine-Slanted] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [Libertine-Bold] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [Libertine-BoldItalic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldSlanted] [Libertine-BoldSlanted] [\s!features=\s!default] + \definefontsynonym [SerifCaps] [Libertine-Regular] [\s!features=\s!smallcaps] + \stoptypescript + + \starttypescript [\s!sans] [biolinum] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [Biolinum-Regular] [\s!file:linbiolinumr] + \definefontsynonym [Biolinum-Bold] [\s!file:linbiolinumrb] + \definefontsynonym [Biolinum-Italic] [\s!file:linbiolinumri] + \definefontsynonym [Biolinum-Slanted] [\s!file:linbiolinumarl] + \definefontsynonym [Biolinum-BoldSlanted] [\s!file:linbiolinumabl] + \stoptypescript + + \starttypescript [\s!sans] [biolinum] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [Biolinum-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [Biolinum-Bold] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [Biolinum-Italic] [\s!features=\s!default] + \definefontsynonym [\s!SansSlanted] [Biolinum-Slanted] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [Biolinum-BoldSlanted] [\s!features=\s!default] + \definefontsynonym [SansCaps] [Biolinum-Regular] [\s!features=\s!smallcaps] + \stoptypescript + + \starttypescript [libertine] + \definetypeface [libertine] [\s!rm] [\s!serif] [libertine] [\s!default] + \definetypeface [libertine] [\s!ss] [\s!sans] [biolinum] [\s!default] + \definetypeface [libertine] [\s!tt] [\s!mono] [default] [\s!default] + %definetypeface [libertine] [\s!mm] [\s!math] [times] [\s!default] + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-lmnames.mkiv b/tex/context/base/type-imp-lmnames.mkiv new file mode 100644 index 000000000..eea7a3560 --- /dev/null +++ b/tex/context/base/type-imp-lmnames.mkiv @@ -0,0 +1,134 @@ +%D \module +%D [ file=type-otf, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Opentype Definitions, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[latinmodern-names] + + \starttypescript [\s!serif] [modern,latin-modern-designsize,latin-modern] + + \definefontsynonym [LMRoman5-Regular] [\s!file:lmroman5-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman6-Regular] [\s!file:lmroman6-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman7-Regular] [\s!file:lmroman7-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman8-Regular] [\s!file:lmroman8-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman9-Regular] [\s!file:lmroman9-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Regular] [\s!file:lmroman10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman12-Regular] [\s!file:lmroman12-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman17-Regular] [\s!file:lmroman17-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman5-Bold] [\s!file:lmroman5-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman6-Bold] [\s!file:lmroman6-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman7-Bold] [\s!file:lmroman7-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman8-Bold] [\s!file:lmroman8-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman9-Bold] [\s!file:lmroman9-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Bold] [\s!file:lmroman10-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman12-Bold] [\s!file:lmroman12-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman7-Italic] [\s!file:lmroman7-italic] [\s!features=\s!default] + \definefontsynonym [LMRoman8-Italic] [\s!file:lmroman8-italic] [\s!features=\s!default] + \definefontsynonym [LMRoman9-Italic] [\s!file:lmroman9-italic] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Italic] [\s!file:lmroman10-italic] [\s!features=\s!default] + \definefontsynonym [LMRoman12-Italic] [\s!file:lmroman12-italic] [\s!features=\s!default] + \definefontsynonym [LMRoman10-BoldItalic] [\s!file:lmroman10-bolditalic] [\s!features=\s!default] + \definefontsynonym [LMRoman8-Oblique] [\s!file:lmromanslant8-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman9-Oblique] [\s!file:lmromanslant9-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Oblique] [\s!file:lmromanslant10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman12-Oblique] [\s!file:lmromanslant12-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman17-Oblique] [\s!file:lmromanslant17-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman10-BoldOblique] [\s!file:lmromanslant10-bold] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Demi] [\s!file:lmromandemi10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman10-DemiOblique] [\s!file:lmromandemi10-oblique] [\s!features=\s!default] + \definefontsynonym [LMRoman10-CapsRegular] [\s!file:lmromancaps10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman10-CapsOblique] [\s!file:lmromancaps10-oblique] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Dunhill] [\s!file:lmromandunh10-regular] [\s!features=\s!default] + \definefontsynonym [LMRoman10-DunhillOblique] [\s!file:lmromandunh10-oblique] [\s!features=\s!default] + \definefontsynonym [LMRoman10-Unslanted] [\s!file:lmromanunsl10-regular] [\s!features=\s!default] + + \stoptypescript + + \starttypescript [\s!sans] [modern,latin-modern-designsize,latin-modern] + + \definefontsynonym [LMSans8-Regular] [\s!file:lmsans8-regular] [\s!features=\s!default] + \definefontsynonym [LMSans9-Regular] [\s!file:lmsans9-regular] [\s!features=\s!default] + \definefontsynonym [LMSans10-Regular] [\s!file:lmsans10-regular] [\s!features=\s!default] + \definefontsynonym [LMSans12-Regular] [\s!file:lmsans12-regular] [\s!features=\s!default] + \definefontsynonym [LMSans17-Regular] [\s!file:lmsans17-regular] [\s!features=\s!default] + \definefontsynonym [LMSans10-Bold] [\s!file:lmsans10-bold] [\s!features=\s!default] + \definefontsynonym [LMSans8-Oblique] [\s!file:lmsans8-oblique] [\s!features=\s!default] + \definefontsynonym [LMSans9-Oblique] [\s!file:lmsans9-oblique] [\s!features=\s!default] + \definefontsynonym [LMSans10-Oblique] [\s!file:lmsans10-oblique] [\s!features=\s!default] + \definefontsynonym [LMSans12-Oblique] [\s!file:lmsans12-oblique] [\s!features=\s!default] + \definefontsynonym [LMSans17-Oblique] [\s!file:lmsans17-oblique] [\s!features=\s!default] + \definefontsynonym [LMSans10-BoldOblique] [\s!file:lmsans10-boldoblique] [\s!features=\s!default] + \definefontsynonym [LMSans10-DemiCondensed] [\s!file:lmsansdemicond10-regular] [\s!features=\s!default] + \definefontsynonym [LMSans10-DemiCondensedOblique] [\s!file:lmsansdemicond10-oblique] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation8-Regular] [\s!file:lmsansquot8-regular] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation8-Bold] [\s!file:lmsansquot8-bold] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation8-Oblique] [\s!file:lmsansquot8-oblique] [\s!features=\s!default] + \definefontsynonym [LMSansQuotation8-BoldOblique] [\s!file:lmsansquot8-boldoblique] [\s!features=\s!default] + + \stoptypescript + + \starttypescript [\s!mono] [modern,latin-modern-designsize,latin-modern,modern-variable,modern-condensed,latin-modern-variable,latin-modern-condensed] + + \definefontsynonym [LMTypewriter8-Regular] [\s!file:lmmono8-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter9-Regular] [\s!file:lmmono9-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-Regular] [\s!file:lmmono10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter12-Regular] [\s!file:lmmono12-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-Italic] [\s!file:lmmono10-italic] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-Oblique] [\s!file:lmmonoslant10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-CapsRegular] [\s!file:lmmonocaps10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-CapsOblique] [\s!file:lmmonocaps10-oblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-Light] [\s!file:lmmonolt10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-LightOblique] [\s!file:lmmonolt10-oblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-LightCondensed] [\s!file:lmmonoltcond10-regular] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-LightCondensedOblique] [\s!file:lmmonoltcond10-oblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-Dark] [\s!file:lmmonolt10-bold] [\s!features=\s!none] + \definefontsynonym [LMTypewriter10-DarkOblique] [\s!file:lmmonolt10-boldoblique] [\s!features=\s!none] + \definefontsynonym [LMTypewriterVarWd10-Regular] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd10-Oblique] [\s!file:lmmonoproplt10-oblique] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd10-Light] [\s!file:lmmonoprop10-regular] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd10-LightOblique] [\s!file:lmmonoprop10-oblique] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd10-Dark] [\s!file:lmmonoproplt10-bold] [\s!features=\s!default] + \definefontsynonym [LMTypewriterVarWd10-DarkOblique] [\s!file:lmmonoproplt10-boldoblique] [\s!features=\s!default] + + \stoptypescript + + \starttypescript [\s!math] [modern,latin-modern] + + \definefontsynonym [LMMathRoman5-Regular] [LMMath5-Regular@lmroman5-math] + \definefontsynonym [LMMathRoman6-Regular] [LMMath6-Regular@lmroman6-math] + \definefontsynonym [LMMathRoman7-Regular] [LMMath7-Regular@lmroman7-math] + \definefontsynonym [LMMathRoman8-Regular] [LMMath8-Regular@lmroman8-math] + \definefontsynonym [LMMathRoman9-Regular] [LMMath9-Regular@lmroman9-math] + \definefontsynonym [LMMathRoman10-Regular] [LMMath10-Regular@lmroman10-math] + \definefontsynonym [LMMathRoman12-Regular] [LMMath12-Regular@lmroman12-math] + \definefontsynonym [LMMathRoman17-Regular] [LMMath17-Regular@lmroman17-math] + + % we no longer care to provide pseudo full bold + + \definefontsynonym [LMMathRoman5-Bold] [LMMathRoman5-Regular] + \definefontsynonym [LMMathRoman6-Bold] [LMMathRoman6-Regular] + \definefontsynonym [LMMathRoman7-Bold] [LMMathRoman7-Regular] + \definefontsynonym [LMMathRoman8-Bold] [LMMathRoman8-Regular] + \definefontsynonym [LMMathRoman9-Bold] [LMMathRoman9-Regular] + \definefontsynonym [LMMathRoman10-Bold] [LMMathRoman10-Regular] + \definefontsynonym [LMMathRoman12-Bold] [LMMathRoman12-Regular] + \definefontsynonym [LMMathRoman17-Bold] [LMMathRoman17-Regular] + + % overloads lmmath.otf usage + % + % \definefontsynonym[MathRoman][LMMath10-Regular@lmroman10-math] + % \definefontsynonym[MathBold] [MathRoman] + + \loadfontgoodies[lm-math] + + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-lucida-opentype.mkiv b/tex/context/base/type-imp-lucida-opentype.mkiv new file mode 100644 index 000000000..b6277b37c --- /dev/null +++ b/tex/context/base/type-imp-lucida-opentype.mkiv @@ -0,0 +1,87 @@ +%D \module +%D [ file=type-lucida-opentype, +%D version=2011.05.18, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Lucida Nova Opentype, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% NOTA BENE: class feattures and goodies get expanded! + +\starttypescriptcollection[lucida-opentype] + + \starttypescript [lucidanova,lucidaot,otlucida] + \loadfontgoodies[lucida-opentype-math] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!features=\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!features=\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [\typescriptone] [\s!default] [\s!features=\s!none] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default] + % for the moment here: + \setupmathrendering[\typescriptone][\s!it=\s!italic] + \quittypescriptscanning + \stoptypescript + + \starttypescript [\s!serif] [lucidanova,lucidaot,otlucida] + \definefontsynonym [\s!Serif] [\s!file:LucidaBrightOT.otf] + \definefontsynonym [\s!SerifBold] [\s!file:LucidaBrightOT-Demi.otf] + \definefontsynonym [\s!SerifItalic] [\s!file:LucidaBrightOT-Italic.otf] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:LucidaBrightOT-DemiItalic.otf] + \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic] + \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic] + \stoptypescript + + \starttypescript [\s!sans] [lucidanova,lucidaot,otlucida] + \definefontsynonym [\s!Sans] [\s!file:LucidaSansOT.otf] + \definefontsynonym [\s!SansBold] [\s!file:LucidaSansOT-Bold.otf] + \definefontsynonym [\s!SansItalic] [\s!file:LucidaSansOT-Oblique.otf] + \definefontsynonym [\s!SansBoldItalic] [\s!file:LucidaSansOT-BoldOblique.otf] + \definefontsynonym [\s!SansSlanted] [\s!MonoItalic] + \definefontsynonym [\s!SansBoldSlanted] [\s!MonoBoldItalic] + \stoptypescript + + \starttypescript [\s!mono] [lucidanova,lucidaot,otlucida] + \definefontsynonym [\s!Mono] [\s!file:LucidaSansTypewriterOT.otf] + \definefontsynonym [\s!MonoBold] [\s!file:LucidaSansTypewriterOT-Bold.otf] + \definefontsynonym [\s!MonoItalic] [\s!file:LucidaSansTypewriterOT-Oblique.otf] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:LucidaSansTypewriterOT-BoldOblique.otf] + \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic] + \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic] + \stoptypescript + + \starttypescript [\s!math] [lucidanova,lucidaot,otlucida] + \definefontsynonym [\s!MathRoman] [\s!file:LucidaBrightMathOT.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lucidanova-math] + \definefontsynonym [\s!MathRomanBold] [\s!file:LucidaBrightMathOT-Demi.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lucidanova-math] + \stoptypescript + + \starttypescript [handwriting] [lucidanova,lucidaot,otlucida] + \definefontsynonym [\s!Handwriting] [\s!file:LucidaHandwritingOT] + \definefontsynonym [\s!Serif] [\s!Handwriting] + \stoptypescript + +\stoptypescriptcollection + +\endinput + +\starttext + + \setupbodyfont[lucidanova] + +% \showfont[Serif][all] +% \showfont[MathRoman][all] + + \usemodule[fnt-31] + + \startluacode + fonts.tracers.coverage { + "LucidaMathOT.otf", + "LucidaBrightOT.otf", + "LucidaSansOT-Typewriter.otf", + } + \stopluacode + +\stoptext diff --git a/tex/context/base/type-imp-lucida-typeone.mkiv b/tex/context/base/type-imp-lucida-typeone.mkiv new file mode 100644 index 000000000..5f28b9eed --- /dev/null +++ b/tex/context/base/type-imp-lucida-typeone.mkiv @@ -0,0 +1,134 @@ +%D \module +%D [ file=type-imp-lucida-typeone, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Lucida, +%D author=Mojca Miklavec \& Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[lucida-typeone] + + \starttypescript [\s!serif] [lucida] + \definefontsynonym [LucidaBright] [\s!name:LucidaBright] + \definefontsynonym [LucidaBright-Demi] [\s!name:LucidaBright-Demi] + \definefontsynonym [LucidaBright-Italic] [\s!name:LucidaBright-Italic] + \definefontsynonym [LucidaBright-DemiItalic] [\s!name:LucidaBright-DemiItalic] + \definefontsynonym [LucidaBright-Oblique] [\s!name:LucidaBright-Oblique] + \definefontsynonym [LucidaBrightSmallcaps] [\s!name:LucidaBrightSmallcaps] + \definefontsynonym [LucidaBrightSmallcaps-Demi] [\s!name:LucidaBrightSmallcaps-Demi] + \stoptypescript + + \starttypescript [\s!sans] [lucida] + \definefontsynonym [LucidaSans] [\s!name:LucidaSans] + \definefontsynonym [LucidaSans-Demi] [\s!name:LucidaSans-Demi] + \definefontsynonym [LucidaSans-Bold] [\s!name:LucidaSans-Bold] + \definefontsynonym [LucidaSans-Italic] [\s!name:LucidaSans-Italic] + \definefontsynonym [LucidaSans-DemiItalic] [\s!name:LucidaSans-DemiItalic] + \definefontsynonym [LucidaSans-BoldItalic] [\s!name:LucidaSans-BoldItalic] + \stoptypescript + + \starttypescript [\s!mono] [lucida] + \definefontsynonym [LucidaTypewriter] [\s!name:LucidaTypewriter] + \definefontsynonym [LucidaTypewriterBold] [\s!name:LucidaTypewriterBold] + \definefontsynonym [LucidaTypewriterOblique] [\s!name:LucidaTypewriterOblique] + \definefontsynonym [LucidaTypewriterBoldOblique] [\s!name:LucidaTypewriterBoldOblique] + \stoptypescript + + \starttypescript [\s!mono] [lucida] + \definefontsynonym [LucidaSans-Typewriter] [\s!name:LucidaSans-Typewriter] + \definefontsynonym [LucidaSans-TypewriterBold] [\s!name:LucidaSans-TypewriterBold] + \definefontsynonym [LucidaSans-TypewriterOblique] [\s!name:LucidaSans-TypewriterOblique] + \definefontsynonym [LucidaSans-TypewriterBoldOblique] [\s!name:LucidaSans-TypewriterBoldOblique] + \stoptypescript + + \starttypescript [calligraphy] [lucida] + \definefontsynonym [LucidaCalligraphy-Italic] [\s!name:LucidaCalligraphy-Italic] + \stoptypescript + + \starttypescript [casual] [lucida] + \definefontsynonym [LucidaCasual] [\s!name:LucidaCasual] + \definefontsynonym [LucidaCasual-Italic] [\s!name:LucidaCasual-Italic] + \stoptypescript + + \starttypescript [handwriting] [lucida] + \definefontsynonym [LucidaHandwriting-Italic] [\s!name:LucidaHandwriting-Italic] + \stoptypescript + + \starttypescript [fax] [lucida] + \definefontsynonym [LucidaFax] [\s!name:LucidaFax] + \definefontsynonym [LucidaFax-Demi] [\s!name:LucidaFax-Demi] + \definefontsynonym [LucidaFax-Italic] [\s!name:LucidaFax-Italic] + \definefontsynonym [LucidaFax-DemiItalic] [\s!name:LucidaFax-DemiItalic] + \stoptypescript + + \starttypescript [blackletter] [lucida] + \definefontsynonym [LucidaBlackletter] [\s!name:LucidaBlackletter] + \stoptypescript + + \starttypescript [\s!math] [lucida] + \loadfontgoodies[lucida-typeone-math] + \definefontsynonym[\s!MathRoman][lucidamath@lucida-math] + \stoptypescript + + \starttypescript [\s!serif] [lucida] [\s!name] + \definefontsynonym [\s!Serif] [LucidaBright] + \definefontsynonym [\s!SerifBold] [LucidaBright-Demi] + \definefontsynonym [\s!SerifItalic] [LucidaBright-Italic] + \definefontsynonym [\s!SerifBoldItalic] [LucidaBright-DemiItalic] + \definefontsynonym [\s!SerifSlanted] [LucidaBright-Oblique] + \definefontsynonym [\s!SerifBoldSlanted] [LucidaBright-DemiItalic] + \definefontsynonym [SerifCaps] [LucidaBrightSmallcaps] + \definefontsynonym [SerifBoldCaps] [LucidaBrightSmallcaps-Demi] + \stoptypescript + + % Lucida Bright Sans + + \starttypescript [\s!sans] [lucida] [\s!name] + \definefontsynonym [\s!Sans] [LucidaSans] + \definefontsynonym [\s!SansBold] [LucidaSans-Demi] + \definefontsynonym [\s!SansItalic] [LucidaSans-Italic] + \definefontsynonym [\s!SansBoldItalic] [LucidaSans-DemiItalic] + \definefontsynonym [\s!SansSlanted] [LucidaSans-Italic] + \definefontsynonym [\s!SansBoldSlanted] [LucidaSans-DemiItalic] + \definefontsynonym [SansCaps] [LucidaSans] + \stoptypescript + + % Lucida Bright Sans Typewriter + + \starttypescript [\s!mono] [lucida] [\s!name] + \definefontsynonym [\s!Mono] [LucidaSans-Typewriter] + \definefontsynonym [\s!MonoBold] [LucidaSans-TypewriterBold] + \definefontsynonym [\s!MonoItalic] [LucidaSans-TypewriterOblique] + \definefontsynonym [\s!MonoBoldItalic] [LucidaSans-TypewriterBoldOblique] + \definefontsynonym [\s!MonoSlanted] [LucidaSans-TypewriterOblique] + \definefontsynonym [\s!MonoBoldSlanted] [LucidaSans-TypewriterBoldOblique] + \definefontsynonym [MonoCaps] [LucidaSans-Typewriter] + \stoptypescript + + % Lucida Calligraphy + + \starttypescript [calligraphy] [lucida] [\s!name] + \definefontsynonym [Calligraphy] [LucidaCalligraphy-Italic] + \stoptypescript + + % Lucida Handwriting + + \starttypescript [handwriting] [lucida] [\s!name] + \definefontsynonym [Handwriting] [LucidaHandwriting-Italic] + \stoptypescript + + \starttypescript [lucida] + \definetypeface [lucida] [\s!rm] [\s!serif] [lucida] [\s!default] [\s!features=\s!default] + \definetypeface [lucida] [\s!ss] [\s!sans] [lucida] [\s!default] [\s!features=\s!default] + \definetypeface [lucida] [\s!tt] [\s!mono] [lucida] [\s!default] [\s!features=\s!none] + \definetypeface [lucida] [\s!hw] [\s!handwriting] [lucida] [\s!default] [\s!features=\s!default] + \definetypeface [lucida] [\s!cg] [\s!calligraphy] [lucida] [\s!default] [\s!features=\s!default] + \definetypeface [lucida] [\s!mm] [\s!math] [lucida] [\s!default] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-mathdesign.mkiv b/tex/context/base/type-imp-mathdesign.mkiv new file mode 100644 index 000000000..39ec3843f --- /dev/null +++ b/tex/context/base/type-imp-mathdesign.mkiv @@ -0,0 +1,32 @@ +%D \module +%D [ file=type-imp-mathdesign, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Mathdesign, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection [mathdesign] + + \starttypescript [\s!math] [charter,mathdesignch] [\s!all] + \loadfontgoodies[charter-math] + \definefontsynonym[\s!MathRoman][chartermath@charter-math] + \stoptypescript + + \starttypescript [\s!math] [garamond,mathdesigngm] [\s!all] + \loadfontgoodies[garamond-math] + \definefontsynonym[\s!MathRoman][garamondmath@garamond-math] + \stoptypescript + + \starttypescript [\s!math] [utopia,mathdesignut] [\s!all] + \loadfontgoodies[utopia-math] + \definefontsynonym[\s!MathRoman][utopiamath@utopia-math] + \stoptypescript + +\stoptypescriptcollection + diff --git a/tex/context/base/type-imp-mathtimes.mkiv b/tex/context/base/type-imp-mathtimes.mkiv new file mode 100644 index 000000000..212882772 --- /dev/null +++ b/tex/context/base/type-imp-mathtimes.mkiv @@ -0,0 +1,31 @@ +%D \module +%D [ file=type-imp-mathtimes, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Math Times, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\loadtypescriptfile[texgyre] + +\starttypescriptcollection[mathtimes] + + \starttypescript [\s!math] [mathtimes] [\s!all] + \loadfontgoodies[mathtimes-math] + \definefontsynonym[\s!MathRoman][mathtimes@mathtimes-math] + \stoptypescript + + \starttypescript [mathtimes] + \definetypeface [mathtimes] [\s!rm] [\s!serif] [times] [\s!default] + \definetypeface [mathtimes] [\s!ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9] + \definetypeface [mathtimes] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface [mathtimes] [\s!mm] [\s!math] [mathtimes] [\s!default] + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-mscore.mkiv b/tex/context/base/type-imp-mscore.mkiv new file mode 100644 index 000000000..19276c017 --- /dev/null +++ b/tex/context/base/type-imp-mscore.mkiv @@ -0,0 +1,64 @@ +%D \module +%D [ file=type-imp-mscore, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Microsoft Core Fonts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\starttypescriptcollection[mscore] + + % .ttf not really needed but we want to force the originals + + \starttypescript [\s!serif] [mscoretimes] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [\s!file:times.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:timesbd.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:timesi.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:timesbi.ttf] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!sans] [mscorearial] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!file:arial.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:arialbd.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:ariali.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:arialbi.ttf] [\s!features=\s!default] + \stoptypescript + + \starttypescript [\s!mono] [mscorecourier] [\s!name] + \setups[\s!font:\s!fallback:\s!mono] + \definefontsynonym [\s!Mono] [\s!file:cour.ttf] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!file:courbd.ttf] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!file:couri.ttf] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:courbi.ttf] [\s!features=\s!none] + \stoptypescript + + \starttypescript [\s!sans] [mscoreverdana] [\s!name] + \setups[\s!font:\s!fallback:\s!sans] + \definefontsynonym [\s!Sans] [\s!file:verdana.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:verdanab.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:verdanai.ttf] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:verdanaz.ttf] [\s!features=\s!default] + \stoptypescript + + \starttypescript[mscore] + \definetypeface [mscore] [\s!rm] [\s!serif] [mscoretimes] [\s!default] + \definetypeface [mscore] [\s!ss] [\s!sans] [mscorearial] [\s!default] [\s!rscale=0.860] + \definetypeface [mscore] [\s!tt] [\s!mono] [mscorecourier] [\s!default] [\s!rscale=1.065] + \definetypeface [mscore] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.020] + \stoptypescript + + % \starttypescript[mscoress] + % \definetypeface [mscoress] [\s!ss] [\s!sans] [mscorearial] [\s!default] + % \definetypeface [mscoress] [\s!rm] [\s!serif] [mscoretimes] [\s!default] [rscale=1.160] + % \definetypeface [mscoress] [\s!tt] [\s!mono] [mscorecourier] [\s!default] [rscale=1.240] + % \definetypeface [mscoress] [\s!mm] [\s!math] [times] [\s!default] [rscale=1.185] + % \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-postscript.mkiv b/tex/context/base/type-imp-postscript.mkiv new file mode 100644 index 000000000..c53b89519 --- /dev/null +++ b/tex/context/base/type-imp-postscript.mkiv @@ -0,0 +1,26 @@ +%D \module +%D [ file=type-imp-postscript, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Basic Font Set, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\loadtypescriptfile[texgyre] + +\starttypescriptcollection[postscript] + + \starttypescript [postscript] + \definetypeface [postscript] [\s!rm] [\s!serif] [times] [\s!default] + \definetypeface [postscript] [\s!ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9] + \definetypeface [postscript] [\s!tt] [\s!mono] [courier] [\s!default] [\s!rscale=1.1] + \definetypeface [postscript] [\s!mm] [\s!math] [times] [\s!default] + \quittypescriptscanning + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-punknova.mkiv b/tex/context/base/type-imp-punknova.mkiv new file mode 100644 index 000000000..8d95bf885 --- /dev/null +++ b/tex/context/base/type-imp-punknova.mkiv @@ -0,0 +1,34 @@ +%D \module +%D [ file=type-imp-punknova, +%D version=2010.06.21, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Punk Nova, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This file defined the Punk made by Khaled Hosny based on the +%D \METAPOST\ output from a (slightly) adapted punk font. + +\starttypescriptcollection[punknova] + + \definefontfeature [punknova] [mode=node,script=latn,rand=yes,kern=yes,liga=yes,tlig=yes] + + \starttypescript [\s!serif] [punknova] + \definefontsynonym [\s!Serif] [\s!file:punknova-regular] [\s!features=punknova] + \definefontsynonym [\s!SerifSlanted] [\s!file:punknova-slanted] [\s!features=punknova] + \definefontsynonym [\s!SerifBold] [\s!file:punknova-bold] [\s!features=punknova] + \definefontsynonym [\s!SerifBoldSlanted][\s!file:punknova-boldslanted] [\s!features=punknova] + \definefontsynonym [\s!SerifItalic] [\s!SerifSlanted] + \definefontsynonym [\s!SerifBoldItalic] [\s!SerifBoldSlanted] + \stoptypescript + + \starttypescript [punknova] + \definetypeface [punknova] [\s!rm] [\s!serif] [punknova] [\s!default] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-texgyre.mkiv b/tex/context/base/type-imp-texgyre.mkiv new file mode 100644 index 000000000..ef487f262 --- /dev/null +++ b/tex/context/base/type-imp-texgyre.mkiv @@ -0,0 +1,216 @@ +%D \module +%D [ file=type-imp-texgyre, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=\TEX Gyre Fonts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D There are some weird ones that are never used .. all these Caps ... we can better +%D split them into pagella-caps etc. + +\starttypescriptcollection[texgyre] + + % caps: \definetypeface [pagella] [rm] [serif] [pagella-caps] [default] + + \starttypescript [times,termes] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [times] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [palatino,pagella] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.075] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.075] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [palatino] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [schoolbook,schola] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.1] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.1] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] [\s!rscale=1.1] + \quittypescriptscanning + \stoptypescript + + \starttypescript [bookman,bonum] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.1] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.1] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] [\s!rscale=1.1] + \quittypescriptscanning + \stoptypescript + + \starttypescript [chancery,chorus] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [helvetica,heros] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] [\s!rscale=1.15] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.15] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] [\s!rscale=1.15] + \quittypescriptscanning + \stoptypescript + + \starttypescript [avantgarde,adventor] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [adventor] [\s!default] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] [\s!rscale=1.15] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.15] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [courier,cursor] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [\typescriptone] [\s!default] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \definetypescriptprefix [f:pagella] [pagella] \definetypescriptprefix [f:palatino] [pagella] + \definetypescriptprefix [f:termes] [termes] \definetypescriptprefix [f:times] [termes] + \definetypescriptprefix [f:heros] [heros] \definetypescriptprefix [f:helvetica] [heros] + \definetypescriptprefix [f:bonum] [bonum] \definetypescriptprefix [f:bookman] [bonum] + \definetypescriptprefix [f:schola] [schola] \definetypescriptprefix [f:schoolbook] [schola] + \definetypescriptprefix [f:adventor][adventor] \definetypescriptprefix [f:avantgarde] [adventor] + \definetypescriptprefix [f:cursor] [cursor] \definetypescriptprefix [f:courier] [cursor] + \definetypescriptprefix [f:chorus] [chorus] \definetypescriptprefix [f:chancery] [chorus] + + \starttypescript [serif,sans] [adventor,bonum,bookman,heros,helvetica,pagella,palatino,schola,schoolbook,termes,times] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!default] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!default] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!default] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!default] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!smallcaps] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-ItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!smallcaps] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!smallcaps] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!smallcaps] + \stoptypescript + + \starttypescript [\s!mono] [cursor,courier] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!none] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!none] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!none] + \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!none] + \stoptypescript + + \starttypescript [\s!serif,\s!calligraphy] [chorus,chancery] + \definefontsynonym [TeXGyreChorus-MediumItalic] [\s!file:texgyrechorus-mediumitalic] [\s!features=\s!default] + \stoptypescript + + \definetypescriptprefix [n:pagella] [TeXGyrePagella] \definetypescriptprefix [n:palatino] [TeXGyrePagella] + \definetypescriptprefix [n:termes] [TeXGyreTermes] \definetypescriptprefix [n:times] [TeXGyreTermes] + \definetypescriptprefix [n:heros] [TeXGyreHeros] \definetypescriptprefix [n:helvetica] [TeXGyreHeros] + \definetypescriptprefix [n:bonum] [TeXGyreBonum] \definetypescriptprefix [n:bookman] [TeXGyreBonum] + \definetypescriptprefix [n:schola] [TeXGyreSchola] \definetypescriptprefix [n:schoolbook] [TeXGyreSchola] + \definetypescriptprefix [n:adventor] [TeXGyreAdventor]% \definetypescriptprefix [n:adventor] [TeXGyreAdventor] + \definetypescriptprefix [n:cursor] [TeXGyreCursor] \definetypescriptprefix [n:courier] [TeXGyreCursor] + \definetypescriptprefix [n:chorus] [TeXGyreChorus] \definetypescriptprefix [n:chancery] [TeXGyreChorus] % not the full set + + \starttypescript [\s!serif] [pagella,palatino,termes,times,bonum,bookman,schola,schoolbook] [\s!name] + \definefontsynonym [\s!Serif] [\typescriptprefix{n:\typescripttwo}-Regular] + \definefontsynonym [\s!SerifItalic] [\typescriptprefix{n:\typescripttwo}-Italic] + \definefontsynonym [\s!SerifBold] [\typescriptprefix{n:\typescripttwo}-Bold] + \definefontsynonym [\s!SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] + \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic] + \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic] + \definefontsynonym [\s!SerifCaps] [\typescriptprefix{n:\typescripttwo}-Caps] + \stoptypescript + + \starttypescript [\s!serif] [pagella-caps,palatino-caps,terme-capss,times-caps,bonum-caps,bookman-caps,schola-caps,schoolbook-caps] [\s!name] + \definefontsynonym [\s!Serif] [\typescriptprefix{n:\typescripttwo}-Caps] + \definefontsynonym [\s!SerifItalic] [\typescriptprefix{n:\typescripttwo}-ItalicCaps] + \definefontsynonym [\s!SerifBold] [\typescriptprefix{n:\typescripttwo}-BoldCaps] + \definefontsynonym [\s!SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] + \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic] + \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic] + \stoptypescript + + \starttypescript [\s!serif] [chorus,chancery] [\s!name] + \definefontsynonym [\s!Serif] [TeXGyreChorus-MediumItalic] + \definefontsynonym [\s!SerifItalic] [\s!Serif] + \definefontsynonym [\s!SerifBold] [\s!Serif] + \definefontsynonym [\s!SerifBoldItalic] [\s!Serif] + \definefontsynonym [\s!SerifSlanted] [\s!Serif] + \definefontsynonym [\s!SerifBoldSlanted] [\s!Serif] + \definefontsynonym [\s!SerifCaps] [\s!Serif] + \stoptypescript + + \starttypescript [\s!calligraphy] [chorus,chancery] [\s!name] + \definefontsynonym [Calligraphy] [TeXGyreChorus-MediumItalic] + \stoptypescript + + \starttypescript [\s!sans] [heros,helvetica,adventor] [\s!name] + \definefontsynonym [\s!Sans] [\typescriptprefix{n:\typescripttwo}-Regular] + \definefontsynonym [\s!SansItalic] [\typescriptprefix{n:\typescripttwo}-Italic] + \definefontsynonym [\s!SansBold] [\typescriptprefix{n:\typescripttwo}-Bold] + \definefontsynonym [\s!SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] + \definefontsynonym [\s!SansSlanted] [\s!SansItalic] + \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic] + \definefontsynonym [\s!SansCaps] [\typescriptprefix{n:\typescripttwo}-Caps] + \stoptypescript + + \starttypescript [\s!sans] [heros-caps,helvetica-caps,adventor-caps] [\s!name] + \definefontsynonym [\s!Sans] [\typescriptprefix{n:\typescripttwo}-Caps] + \definefontsynonym [\s!SansItalic] [\typescriptprefix{n:\typescripttwo}-ItalicCaps] + \definefontsynonym [\s!SansBold] [\typescriptprefix{n:\typescripttwo}-BoldCaps] + \definefontsynonym [\s!SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] + \definefontsynonym [\s!SansSlanted] [\s!SansItalic] + \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic] + \stoptypescript + + \starttypescript [\s!mono] [cursor,courier] [\s!name] + \definefontsynonym [\s!Mono] [\typescriptprefix{n:\typescripttwo}-Regular] + \definefontsynonym [\s!MonoItalic] [\typescriptprefix{n:\typescripttwo}-Italic] + \definefontsynonym [\s!MonoBold] [\typescriptprefix{n:\typescripttwo}-Bold] + \definefontsynonym [\s!MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] + \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic] + \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic] + \definefontsynonym [\s!MonoCaps] [\typescriptprefix{n:\typescripttwo}-Caps] + \stoptypescript + + \starttypescript [\s!mono] [cursor-caps,courier-caps] [\s!name] + \definefontsynonym [\s!Mono] [\typescriptprefix{n:\typescripttwo}-Caps] + \definefontsynonym [\s!MonoItalic] [\typescriptprefix{n:\typescripttwo}-ItalicCaps] + \definefontsynonym [\s!MonoBold] [\typescriptprefix{n:\typescripttwo}-BoldCaps] + \definefontsynonym [\s!MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] + \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic] + \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic] + \stoptypescript + +\stoptypescriptcollection + +\starttypescriptcollection[xmath] + + % Times Math (tx) + + \starttypescript [\s!math][times][\s!all] + \loadfontgoodies[tx-math] + \definefontsynonym[\s!MathRoman][txmath@tx-math] + % \definefontsynonym[\s!MathRomanBold][MathRoman] + \stoptypescript + + % Palatino Math (px) + + \starttypescript [\s!math][palatino][\s!all] + \loadfontgoodies[px-math] + \definefontsynonym[\s!MathRoman][pxmath@px-math] + % \definefontsynonym[\s!MathRomanBold][MathRoman] + \stoptypescript + +\stoptypescriptcollection diff --git a/tex/context/base/type-imp-xits.mkiv b/tex/context/base/type-imp-xits.mkiv new file mode 100644 index 000000000..5a0c4d153 --- /dev/null +++ b/tex/context/base/type-imp-xits.mkiv @@ -0,0 +1,57 @@ +%D \module +%D [ file=type-imp-hvmath, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Xits, +%D author=Khaled Hosny \& Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% This one makes more sense than Stix. Xits uses the glyph collection from stix +% but packages it in a proper OpenType Math font. From the Stix site: Version 1.1, +% which will include fonts packaged for use with Microsoft Office applications, is +% scheduled for release by the end of 2010. Version 1.2, which will include Type 1 +% fonts for use with LaTeX, will follow in 2011. So, we are on our own anyway. + +\loadtypescriptfile[texgyre] + +\starttypescriptcollection[xits] + + \starttypescript [\s!math] [xits,xitsbidi] [\s!name] + \loadfontgoodies[xits-math] + \definefontsynonym[\s!MathRoman ][\s!file:xits-math.otf][\s!features=\s!math\mathsizesuffix,\s!goodies=xits-math] + \definefontsynonym[\s!MathRoman L2R][\s!file:xits-math.otf][\s!features=\s!math\mathsizesuffix-l2r,\s!goodies=xits-math] + \definefontsynonym[\s!MathRoman R2L][\s!file:xits-math.otf][\s!features=\s!math\mathsizesuffix-r2l,\s!goodies=xits-math] + \stoptypescript + + \starttypescript [\s!serif] [xits] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym[\s!Serif] [\s!file:xits-regular.otf] [\s!features=\s!default] + \definefontsynonym[\s!SerifBold] [\s!file:xits-bold.otf] [\s!features=\s!default] + \definefontsynonym[\s!SerifItalic] [\s!file:xits-italic.otf] [\s!features=\s!default] + \definefontsynonym[\s!SerifBoldItalic][\s!file:xits-bolditalic.otf] [\s!features=\s!default] + \stoptypescript + + \starttypescript[xits] + \definetypeface [xits] [\s!rm] [\s!serif] [xits] [\s!default] + \definetypeface [xits] [\s!ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9] + \definetypeface [xits] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] + \definetypeface [xits] [\s!mm] [\s!math] [xits] [\s!default] + \stoptypescript + + % for the moment + + \starttypescript[xitsbidi] + \definetypeface [xitsbidi] [\s!rm] [\s!serif] [xits] [\s!default] + \definetypeface [xitsbidi] [\s!ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9] + \definetypeface [xitsbidi] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] + %definetypeface [xitsbidi] [\s!mm] [\s!math] [xitsbidi] [bidi] [\s!direction=\s!both] + \definetypeface [xitsbidi] [\s!mm] [\s!math] [xitsbidi] [\s!default] [\s!direction=\s!both] + \stoptypescript + +\stoptypescriptcollection + diff --git a/tex/context/base/type-imp-xitsbidi.mkiv b/tex/context/base/type-imp-xitsbidi.mkiv new file mode 100644 index 000000000..33c4340ed --- /dev/null +++ b/tex/context/base/type-imp-xitsbidi.mkiv @@ -0,0 +1,16 @@ +%D \module +%D [ file=type-imp-hvmath, +%D version=2007.07.30, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=Xits, +%D author=Khaled Hosny \& Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\loadtypescriptfile[xits] + +\endinput diff --git a/tex/context/base/type-ini.lua b/tex/context/base/type-ini.lua index c2b274fb9..4ce953168 100644 --- a/tex/context/base/type-ini.lua +++ b/tex/context/base/type-ini.lua @@ -10,7 +10,9 @@ if not modules then modules = { } end modules ['type-ini'] = { local gsub = string.gsub -local patterns = { "type-imp-%s.mkiv", "type-imp-%s.tex", "type-%s.mkiv", "type-%s.tex" } +local report_typescripts = logs.reporter("fonts","typescripts") + +local patterns = { "type-imp-%s.mkiv", "type-imp-%s.tex", "type-%s.mkiv", "type-%s.tex" } -- this will be imp only local function action(name,foundname) context.startreadingfile() @@ -22,12 +24,50 @@ local function action(name,foundname) context.stopreadingfile() end +local name_one, name_two + +local function failure_two(name) + report_typescripts("unknown: library '%s' or '%s'",name_one,name_two) +end + +local function failure_one(name) + name_two = gsub(name,"%-.*$","") + if name_two == name then + report_typescripts("unknown: library '%s'",name_one) + else + commands.uselibrary { + name = name_two, + patterns = patterns, + action = action, + failure = failure_two, + onlyonce = false, -- will become true + } + end +end + function commands.doprocesstypescriptfile(name) + name_one = gsub(name,"^type%-","") commands.uselibrary { - name = gsub(name,"^type%-",""), + name = name_one, patterns = patterns, action = action, + failure = failure_one, + onlyonce = false, -- will become true } end +local patterns = { "type-imp-%s.mkiv", "type-imp-%s.tex" } +local function failure(name) + report_typescripts("unknown: library '%s'",name) +end + +function commands.loadtypescriptfile(name) -- a more specific name + commands.uselibrary { + name = gsub(name,"^type%-",""), + patterns = patterns, + action = action, + failure = failure, + onlyonce = false, -- will become true + } +end diff --git a/tex/context/base/type-ini.mkvi b/tex/context/base/type-ini.mkvi index efe360bdb..1d469b02a 100644 --- a/tex/context/base/type-ini.mkvi +++ b/tex/context/base/type-ini.mkvi @@ -19,11 +19,11 @@ %D and then make the calling macros simplier (always assume fontclass) but %D apart from downward compatibility issues, it would make global, class %D spanning definitions a pain. Some day we will introduce a default class. - +%D %D The \type {type-ini} and \type {font-ini} modules come as a pair and have %D mutual dependencies. - -%D Todo: store them at the lua end +%D +%D At some point we will only store in memory so some code can go away. \unprotect @@ -68,10 +68,10 @@ \definesystemvariable{ts} % TypeScript -% tricky ... here we push/pop +% tricky ... here we push/pop ... so \let -\chardef\typescriptmethod\plusone % 1: empty==all==true 2: empty==false -\chardef\typescriptstate \plustwo % 1: process 2: store +\let\typescriptmethod\plusone % 1: empty==all==true 2: empty==false +\let\typescriptstate \plustwo % 1: process 2: store \unexpanded\def\starttypescriptcollection {\dosingleempty\font_typescripts_collection_start} @@ -107,7 +107,7 @@ \pushmacro\typescriptstate \pushmacro\stoptypescript \typescriptfoundfalse - \let\typescriptstate\plusone + \let\typescriptstate\plusone % why \iftracetypescripts \writestatus\m!fonts{request: [\m_font_typescripts_one] [\m_font_typescripts_two] [\m_font_typescripts_three]}% \fi @@ -131,6 +131,18 @@ \preloadtypescripts \to \everyjob +% The next will change .. we can load a file inside a typescript but as the state is +% 1 then, it doesn't get stored without doing that explicitly + +% \unexpanded\def\loadtypescriptfile[#1]% +% {\ctxcommand{loadtypescriptfile("#1")}} + +\unexpanded\def\loadtypescriptfile[#1]% + {\pushmacro\typescriptstate + \let\typescriptstate\plustwo % assumes 2 at the outer level + \ctxcommand{loadtypescriptfile("#1")}% + \popmacro\typescriptstate} + \unexpanded\def\quittypescriptscanning {\settrue\c_font_typescripts_quit} % public @@ -285,9 +297,6 @@ \def\font_typescripts_start_process_again_two {\doifnextoptionalelse\font_typescripts_start_process_three\font_typescripts_start_process_yes} -% \def\font_typescripts_start_process_again_three -% {\font_typescripts_start_process_yes} - \let\font_typescripts_start_process_again_three\font_typescripts_start_process_yes \def\font_typescripts_start_process_indeed @@ -385,6 +394,33 @@ \font_helpers_reset_fontclass_math_families\fontclass \to \everybeforedefinetypeface +%D This hooks into the font switcher: + +\settrue\autotypescripts + +\unexpanded\def\trycurrentfontclass#typeface% this will move to type-ini + {\ifconditional\autotypescripts + \usetypescript[#typeface]% + \ifcsname\??fontclassyes#typeface\endcsname + \edef\fontclass{#typeface}% + \else + \iftracetypescripts\writestatus\m!fonts{auto load typescript file 1: [#typeface]}\fi + \usetypescriptfile[#typeface]% + \usetypescript[#typeface]% + \ifcsname\??fontclassyes#typeface\endcsname + \edef\fontclass{#typeface}% + \else + % todo: message + \letvalueempty{\??fontclassnop#typeface}% + \fi + \fi + \else + % todo: message + \letvalueempty{\??fontclassnop#typeface}% + \fi} + +%D Now we define: + \def\font_typefaces_define {\iffifthargument \singleexpandafter\font_typefaces_define_a @@ -400,7 +436,16 @@ {\iftracetypescripts\writestatus\m!fonts{define: [#name] [#style] [#fontshape] [#fontname]}\fi \font_typefaces_define_indeed[#name][#style]% \font_typefaces_defining_start{#name}{#style}{#settings}% - \font_typescripts_use_one[#fontshape][#fontname][\s!name,\s!default]% + \font_typescripts_use_one[#fontshape][#fontname][\s!name]% [\s!name,\s!default]% + \iftypescriptfound + % we're okay + \else + \ifconditional\autotypescripts + \iftracetypescripts\writestatus\m!fonts{auto load typescript file 2: [#fontname]}\fi + \usetypescriptfile[#fontname]% + \font_typescripts_use_one[#fontshape][#fontname][\s!name]% [\s!name,\s!default]% + \fi + \fi \font_typescripts_use_one[#fontshape][#fontsize][\s!size]% \font_typefaces_defining_stop} @@ -428,18 +473,17 @@ \fi}} \def\font_typefaces_defining_start#name#style#settings% - {\let\@@tsrscale \plusone - \let\@@tsfeatures \empty - \let\@@tsfallbacks\empty - \let\@@tsgoodies \empty - \let\@@tsdirection\empty - \geteparameters[\??ts][#settings]% + {\let\@@tsrscale \!!plusone % as we push/pop + \let\@@tsfeatures \empty + \let\@@tsfallbacks \empty + \let\@@tsgoodies \empty + \let\@@tsdirection \empty + \let\@@tsdesignsize\empty + \geteparameters[\??ts][#settings]% todo raw \pushmacro\fontclass \pushmacro\fontclassstyle \setcurrentfontclass{#name}% - \pushmacro\relativefontsize % hm, can be a counter - \let\relativefontsize\@@tsrscale % still needed ? - \savefontclassparameters{#style}\@@tsrscale\@@tsfeatures\@@tsfallbacks\@@tsgoodies\@@tsdirection + \savefontclassparameters{#style}\@@tsrscale\@@tsfeatures\@@tsfallbacks\@@tsgoodies\@@tsdesignsize\@@tsdirection \the\everybeforedefinetypeface} \def\tsvar#key#default% undocumented and unofficial @@ -451,7 +495,6 @@ \def\font_typefaces_defining_stop {\the\everyafterdefinetypeface - \popmacro\relativefontsize \popmacro\fontclassstyle \popmacro\fontclass} @@ -495,9 +538,11 @@ \fi \fi \fi \ifmmode\mr\else\tf\fi} % needed ? -\unexpanded\def\usetypefile[#type]% recurses on path ! % no storage? obsolete? - {\edef\currenttypefile{#type}% - \ctxcommand{doprocesstypescriptfile("\currenttypefile")}} +% obsolete +% +% \unexpanded\def\usetypefile[#type]% recurses on path ! % no storage +% {\edef\currenttypefile{#type}% +% \ctxcommand{doprocesstypescriptfile("\currenttypefile")}} %D For Taco: %D @@ -535,7 +580,7 @@ % \expandafter\let\expandafter\relativefontid\csname\??typescriptrelatives\fontclass\endcsname % \else % \expandafter\normalxdef\csname\??typescriptrelatives\fontclass\endcsname{\the\lastfontid}% -% \let\relativefontid\empty +% \let\relativefontid\minusone % \fi} \def\v_font_string_d % default fontstyle (expands to \s!Serif in font-ini) diff --git a/tex/context/base/type-lua.mkiv b/tex/context/base/type-lua.mkiv index 1ce3f80fb..fac6c3867 100644 --- a/tex/context/base/type-lua.mkiv +++ b/tex/context/base/type-lua.mkiv @@ -11,78 +11,76 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\unprotect - \starttypescriptcollection [luatex] -\starttypescript [specserif] [all] [name] - \definefontsynonym [Serif] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] - \definefontsynonym [SerifItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] - \definefontsynonym [SerifSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] - \definefontsynonym [SerifBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] - \definefontsynonym [SerifBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] - \definefontsynonym [SerifBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] - \definefontsynonym [SerifCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] +\starttypescript [specserif] [\s!all] [\s!name] + \definefontsynonym [\s!Serif] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] \stoptypescript -\starttypescript [specsans] [all] [name] - \definefontsynonym [Sans] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] - \definefontsynonym [SansItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] - \definefontsynonym [SansSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] - \definefontsynonym [SansBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] - \definefontsynonym [SansBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] - \definefontsynonym [SansBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] - \definefontsynonym [SansCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] +\starttypescript [specsans] [\s!all] [\s!name] + \definefontsynonym [\s!Sans] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SansSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!SansCaps] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] \stoptypescript -\starttypescript [specmono] [all] [name] - \definefontsynonym [Mono] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] - \definefontsynonym [MonoItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] - \definefontsynonym [MonoSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] - \definefontsynonym [MonoBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] - \definefontsynonym [MonoBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] - \definefontsynonym [MonoBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] - \definefontsynonym [MonoCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] +\starttypescript [specmono] [\s!all] [\s!name] + \definefontsynonym [\s!Mono] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default] + \definefontsynonym [\s!MonoItalic] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!MonoSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!MonoBold] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default] + \definefontsynonym [\s!MonoBoldItalic] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!MonoBoldSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default] + \definefontsynonym [\s!MonoCaps] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps] \stoptypescript % we could combine these in the normal serif settings -\starttypescript [specserif] [default] [size] +\starttypescript [specserif] [\s!default] [\s!size] \definebodyfont - [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [rm] - [\s!default] + [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] + [\s!rm] [\s!default] \stoptypescript -\starttypescript [specsans] [default] [size] +\starttypescript [specsans] [\s!default] [\s!size] \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] - [ss] [\s!default] + [\s!ss] [\s!default] \stoptypescript -\starttypescript [specmono] [default] [size] +\starttypescript [specmono] [\s!default] [\s!size] \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] - [tt] [\s!default] + [\s!tt] [\s!default] \stoptypescript -\starttypescript [specserif] [dtp] [size] +\starttypescript [specserif] [\s!dtp] [\s!size] \definebodyfont [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] - [rm] [\s!default] + [\s!rm] [\s!default] \stoptypescript -\starttypescript [specsans] [dtp] [size] +\starttypescript [specsans] [\s!dtp] [\s!size] \definebodyfont [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] - [ss] [\s!default] + [\s!ss] [\s!default] \stoptypescript -\starttypescript [specmono] [dtp] [size] +\starttypescript [specmono] [\s!dtp] [\s!size] \definebodyfont [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] - [tt] [\s!default] + [\s!tt] [\s!default] \stoptypescript \stoptypescriptcollection -\protect \endinput +\endinput diff --git a/tex/context/base/type-lucidanova.mkiv b/tex/context/base/type-lucidanova.mkiv deleted file mode 100644 index b0b080839..000000000 --- a/tex/context/base/type-lucidanova.mkiv +++ /dev/null @@ -1,86 +0,0 @@ -%D \module -%D [ file=type-lucidanova, -%D version=2011.05.18, -%D title=\CONTEXT\ Typescript Macros, -%D subtitle=Lucida Nova Opentype, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -% NOTA BENE: class feattures and goodies get expanded! - -\starttypescriptcollection[lucidanova] - - \starttypescript [\s!math] [lucidanova,lucidaot,otlucida] - \definefontsynonym [MathRoman] [\s!file:LucidaBrightMathOT.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lucidanova-math] - \definefontsynonym [MathRomanBold] [\s!file:LucidaBrightMathOT-Demi.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lucidanova-math] - \stoptypescript - - \starttypescript [\s!serif] [lucidanova,lucidaot,otlucida] - \definefontsynonym [\s!Serif] [\s!file:LucidaBrightOT.otf] - \definefontsynonym [\s!SerifBold] [\s!file:LucidaBrightOT-Demi.otf] - \definefontsynonym [\s!SerifItalic] [\s!file:LucidaBrightOT-Italic.otf] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:LucidaBrightOT-DemiItalic.otf] - \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic] - \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic] - \stoptypescript - - \starttypescript [\s!sans] [lucidanova,lucidaot,otlucida] - \definefontsynonym [\s!Sans] [\s!file:LucidaSansOT.otf] - \definefontsynonym [\s!SansBold] [\s!file:LucidaSansOT-Bold.otf] - \definefontsynonym [\s!SansItalic] [\s!file:LucidaSansOT-Oblique.otf] - \definefontsynonym [\s!SansBoldItalic] [\s!file:LucidaSansOT-BoldOblique.otf] - \definefontsynonym [\s!SansSlanted] [\s!MonoItalic] - \definefontsynonym [\s!SansBoldSlanted] [\s!MonoBoldItalic] - \stoptypescript - - \starttypescript [\s!mono] [lucidanova,lucidaot,otlucida] - \definefontsynonym [\s!Mono] [\s!file:LucidaSansTypewriterOT.otf] - \definefontsynonym [\s!MonoBold] [\s!file:LucidaSansTypewriterOT-Bold.otf] - \definefontsynonym [\s!MonoItalic] [\s!file:LucidaSansTypewriterOT-Oblique.otf] - \definefontsynonym [\s!MonoBoldItalic] [\s!file:LucidaSansTypewriterOT-BoldOblique.otf] - \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic] - \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic] - \stoptypescript - - \starttypescript [handwriting] [lucidanova,lucidaot,otlucida] - \definefontsynonym [LucidaHandwriting] [\s!name:LucidaHandwriting-Italic] - \definefontsynonym [Handwriting] [LucidaHandwriting] - \stoptypescript - - \starttypescript [lucidanova,lucidaot,otlucida] - %\loadfontgoodies[lucidanova-math] - \definetypeface [\typescriptone] [rm] [\s!serif] [lucidanova] [\s!default] [\s!features=\s!default] - \definetypeface [\typescriptone] [ss] [\s!sans] [lucidanova] [\s!default] [\s!features=\s!default] - \definetypeface [\typescriptone] [tt] [\s!mono] [lucidanova] [\s!default] [\s!features=\s!none] - \definetypeface [\typescriptone] [mm] [\s!math] [lucidanova] [\s!default] - % for the moment here: - \setupmathrendering[\typescriptone][it=italic] - \stoptypescript - -\stoptypescriptcollection - -\endinput - -\starttext - - \setupbodyfont[lucidanova] - -% \showfont[Serif][all] -% \showfont[MathRoman][all] - - \usemodule[fnt-31] - - \startluacode - fonts.tracers.coverage { - "LucidaMath.otf", - "LucidaBright.otf", - "LucidaSans-Typewriter.otf", - } - \stopluacode - -\stoptext diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv index 7c915e77c..1f1564ef5 100644 --- a/tex/context/base/type-otf.mkiv +++ b/tex/context/base/type-otf.mkiv @@ -11,1992 +11,17 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D Actually, \LUATEX\ does not need all these definitions since it can -%D consult its database. However, here we use the names that we used -%D in good old \TEX, and these may differ a bit. Here we also see -%D some oldstyle definitions which normally are done with features. +%D When a fontname equals the filename, then use %D -%D The ComputerModern* names will become obsolete (all LM now). - -% \starttypescriptcollection[myfonts] -% -% \starttypescript [serif] [myserif] [name] -% \setups[font:fallback:serif] -% \definefontsynonym [Serif] [\s!file:myserif.ttf] [features=default] -% \definefontsynonym [SerifBold] [\s!file:myserifbold.ttf] [features=default] -% \definefontsynonym [SerifItalic] [\s!file:myserifitalic.ttf] [features=default] -% \definefontsynonym [SerifBoldItalic] [\s!file:myserifbolditalic.ttf] [features=default] -% \stoptypescript -% -% \starttypescript[myfont] -% \definetypeface [myfont] [rm] [serif] [myserif] [default] -% \stoptypescript -% -% \stoptypescriptcollection -% -% \setupbodyfont[myfont] - -\starttypescriptcollection[fallback] - -\starttypescript [fallback] - \definetypeface [] [rm] [serif] [modern] [computer-modern] - \definetypeface [] [ss] [sans] [modern] [computer-modern] - \definetypeface [] [tt] [mono] [modern] [computer-modern] - \definetypeface [] [mm] [math] [modern] [computer-modern] - \quittypescriptscanning -\stoptypescript - -% faster -% -% \starttypescript [fallback] -% \definetypeface [] [rm] [serif] [modern] [default] -% \definetypeface [] [ss] [sans] [modern] [default] -% \definetypeface [] [tt] [mono] [modern] [default] -% \definetypeface [] [mm] [math] [modern] [default] -% \quittypescriptscanning -% \stoptypescript - -\stoptypescriptcollection - -% if a fontname equals the filename, then use -% -% \setupfontsynonym [LMRoman10-DemiOblique] [\s!features=\s!default] % file is lowercase, so fails -% \definefontsynonym [LMRoman10-DemiOblique] [\s!name:LMRoman10-DemiOblique] [\s!features=\s!default] -% \definefontsynonym [LMRoman10-DemiOblique] [lmroman10-demioblique] [\s!features=\s!default] - -\starttypescriptcollection[latinmodern] - - %D The names have changed (again) ... but I will not change the symbolic names - %D any more. Filename changes will be catched in luatex (fallbacks) but not in - %D other tex's. - - \starttypescript [serif] [modern,latin-modern,computer-modern,default] - \definefontsynonym [LMRoman5-Regular] [\s!file:lmroman5-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman6-Regular] [\s!file:lmroman6-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman7-Regular] [\s!file:lmroman7-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman8-Regular] [\s!file:lmroman8-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman9-Regular] [\s!file:lmroman9-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman10-Regular] [\s!file:lmroman10-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman12-Regular] [\s!file:lmroman12-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman17-Regular] [\s!file:lmroman17-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman5-Bold] [\s!file:lmroman5-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman6-Bold] [\s!file:lmroman6-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman7-Bold] [\s!file:lmroman7-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman8-Bold] [\s!file:lmroman8-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman9-Bold] [\s!file:lmroman9-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman10-Bold] [\s!file:lmroman10-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman12-Bold] [\s!file:lmroman12-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman7-Italic] [\s!file:lmroman7-italic] [\s!features=\s!default] - \definefontsynonym [LMRoman8-Italic] [\s!file:lmroman8-italic] [\s!features=\s!default] - \definefontsynonym [LMRoman9-Italic] [\s!file:lmroman9-italic] [\s!features=\s!default] - \definefontsynonym [LMRoman10-Italic] [\s!file:lmroman10-italic] [\s!features=\s!default] - \definefontsynonym [LMRoman12-Italic] [\s!file:lmroman12-italic] [\s!features=\s!default] - \definefontsynonym [LMRoman10-BoldItalic] [\s!file:lmroman10-bolditalic] [\s!features=\s!default] - \definefontsynonym [LMRoman8-Oblique] [\s!file:lmromanslant8-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman9-Oblique] [\s!file:lmromanslant9-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman10-Oblique] [\s!file:lmromanslant10-regular][\s!features=\s!default] - \definefontsynonym [LMRoman12-Oblique] [\s!file:lmromanslant12-regular][\s!features=\s!default] - \definefontsynonym [LMRoman17-Oblique] [\s!file:lmromanslant17-regular][\s!features=\s!default] - \definefontsynonym [LMRoman10-BoldOblique] [\s!file:lmromanslant10-bold] [\s!features=\s!default] - \definefontsynonym [LMRoman10-Demi] [\s!file:lmromandemi10-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman10-DemiOblique] [\s!file:lmromandemi10-oblique] [\s!features=\s!default] - \definefontsynonym [LMRoman10-CapsRegular] [\s!file:lmromancaps10-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman10-CapsOblique] [\s!file:lmromancaps10-oblique] [\s!features=\s!default] - - \definefontsynonym [LMRoman10-Dunhill] [\s!file:lmromandunh10-regular] [\s!features=\s!default] - \definefontsynonym [LMRoman10-DunhillOblique] [\s!file:lmromandunh10-oblique] [\s!features=\s!default] - \definefontsynonym [LMRoman10-Unslanted] [\s!file:lmromanunsl10-regular] [\s!features=\s!default] - \stoptypescript - - \starttypescript [sans] [modern,latin-modern,computer-modern,default] - \definefontsynonym [LMSans8-Regular] [\s!file:lmsans8-regular] [\s!features=\s!default] - \definefontsynonym [LMSans9-Regular] [\s!file:lmsans9-regular] [\s!features=\s!default] - \definefontsynonym [LMSans10-Regular] [\s!file:lmsans10-regular] [\s!features=\s!default] - \definefontsynonym [LMSans12-Regular] [\s!file:lmsans12-regular] [\s!features=\s!default] - \definefontsynonym [LMSans17-Regular] [\s!file:lmsans17-regular] [\s!features=\s!default] - \definefontsynonym [LMSans10-Bold] [\s!file:lmsans10-bold] [\s!features=\s!default] - \definefontsynonym [LMSans8-Oblique] [\s!file:lmsans8-oblique] [\s!features=\s!default] - \definefontsynonym [LMSans9-Oblique] [\s!file:lmsans9-oblique] [\s!features=\s!default] - \definefontsynonym [LMSans10-Oblique] [\s!file:lmsans10-oblique] [\s!features=\s!default] - \definefontsynonym [LMSans12-Oblique] [\s!file:lmsans12-oblique] [\s!features=\s!default] - \definefontsynonym [LMSans17-Oblique] [\s!file:lmsans17-oblique] [\s!features=\s!default] - \definefontsynonym [LMSans10-BoldOblique] [\s!file:lmsans10-boldoblique] [\s!features=\s!default] - - \definefontsynonym [LMSans10-DemiCondensed] [\s!file:lmsansdemicond10-regular] [\s!features=\s!default] - \definefontsynonym [LMSans10-DemiCondensedOblique] [\s!file:lmsansdemicond10-oblique] [\s!features=\s!default] - - \definefontsynonym [LMSansQuotation8-Regular] [\s!file:lmsansquot8-regular] [\s!features=\s!default] - \definefontsynonym [LMSansQuotation8-Bold] [\s!file:lmsansquot8-bold] [\s!features=\s!default] - \definefontsynonym [LMSansQuotation8-Oblique] [\s!file:lmsansquot8-oblique] [\s!features=\s!default] - \definefontsynonym [LMSansQuotation8-BoldOblique] [\s!file:lmsansquot8-boldoblique] [\s!features=\s!default] - \stoptypescript - - \starttypescript [mono] [modern,modern-variable,modern-condensed,latin-modern,latin-modern-variable,latin-modern-condensed,computer-modern,default] - \definefontsynonym [LMTypewriter8-Regular] [\s!file:lmmono8-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter9-Regular] [\s!file:lmmono9-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-Regular] [\s!file:lmmono10-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter12-Regular] [\s!file:lmmono12-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-Italic] [\s!file:lmmono10-italic] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-Oblique] [\s!file:lmmonoslant10-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-CapsRegular] [\s!file:lmmonocaps10-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-CapsOblique] [\s!file:lmmonocaps10-oblique] [\s!features=\s!none] - - \definefontsynonym [LMTypewriter10-Light] [\s!file:lmmonolt10-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-LightOblique] [\s!file:lmmonolt10-oblique] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-LightCondensed] [\s!file:lmmonoltcond10-regular] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-LightCondensedOblique] [\s!file:lmmonoltcond10-oblique] [\s!features=\s!none] - - \definefontsynonym [LMTypewriter10-Dark] [\s!file:lmmonolt10-bold] [\s!features=\s!none] - \definefontsynonym [LMTypewriter10-DarkOblique] [\s!file:lmmonolt10-boldoblique] [\s!features=\s!none] - - \definefontsynonym [LMTypewriterVarWd10-Regular] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default] - \definefontsynonym [LMTypewriterVarWd10-Oblique] [\s!file:lmmonoproplt10-oblique] [\s!features=\s!default] - \definefontsynonym [LMTypewriterVarWd10-Light] [\s!file:lmmonoprop10-regular] [\s!features=\s!default] - \definefontsynonym [LMTypewriterVarWd10-LightOblique] [\s!file:lmmonoprop10-oblique] [\s!features=\s!default] - \definefontsynonym [LMTypewriterVarWd10-Dark] [\s!file:lmmonoproplt10-bold] [\s!features=\s!default] - \definefontsynonym [LMTypewriterVarWd10-DarkOblique] [\s!file:lmmonoproplt10-boldoblique] [\s!features=\s!default] - \stoptypescript - - \starttypescript [math] [modern,latin-modern,computer-modern,default] - \definefontsynonym[LMMathRoman5-Regular] [LMMath5-Regular@lmroman5-math] - \definefontsynonym[LMMathRoman6-Regular] [LMMath6-Regular@lmroman6-math] - \definefontsynonym[LMMathRoman7-Regular] [LMMath7-Regular@lmroman7-math] - \definefontsynonym[LMMathRoman8-Regular] [LMMath8-Regular@lmroman8-math] - \definefontsynonym[LMMathRoman9-Regular] [LMMath9-Regular@lmroman9-math] - \definefontsynonym[LMMathRoman10-Regular][LMMath10-Regular@lmroman10-math] - \definefontsynonym[LMMathRoman12-Regular][LMMath12-Regular@lmroman12-math] - \definefontsynonym[LMMathRoman17-Regular][LMMath17-Regular@lmroman17-math] - - % we no longer care to provide pseudo full bold - - \definefontsynonym[LMMathRoman5-Bold] [LMMathRoman5-Regular] - \definefontsynonym[LMMathRoman6-Bold] [LMMathRoman6-Regular] - \definefontsynonym[LMMathRoman7-Bold] [LMMathRoman7-Regular] - \definefontsynonym[LMMathRoman8-Bold] [LMMathRoman8-Regular] - \definefontsynonym[LMMathRoman9-Bold] [LMMathRoman9-Regular] - \definefontsynonym[LMMathRoman10-Bold] [LMMathRoman10-Regular] - \definefontsynonym[LMMathRoman12-Bold] [LMMathRoman12-Regular] - \definefontsynonym[LMMathRoman17-Bold] [LMMathRoman17-Regular] - - % overloads lmmath.otf usage - % - % \definefontsynonym[MathRoman][LMMath10-Regular@lmroman10-math] - % \definefontsynonym[MathBold] [MathRoman] - - \loadfontgoodies[lm-math] - \stoptypescript - - \starttypescript [serif] [modern,latin-modern,computer-modern,default] [name] - \definefontsynonym [Serif] [LMRoman-Regular] - \definefontsynonym [SerifBold] [LMRoman-Bold] - \definefontsynonym [SerifItalic] [LMRoman-Italic] - \definefontsynonym [SerifSlanted] [LMRoman-Oblique] - \definefontsynonym [SerifBoldItalic] [LMRoman-BoldItalic] - \definefontsynonym [SerifBoldSlanted] [LMRoman-BoldOblique] - \definefontsynonym [SerifCaps] [LMRoman-CapsRegular] - \definefontsynonym [SerifCapsSlanted] [LMRoman-CapsOblique] - \stoptypescript - - \starttypescript [sans] [modern,latin-modern,computer-modern,default] [name] - \definefontsynonym [Sans] [LMSans-Regular] - \definefontsynonym [SansBold] [LMSans-Bold] - \definefontsynonym [SansItalic] [LMSans-Oblique] - \definefontsynonym [SansSlanted] [LMSans-Oblique] - \definefontsynonym [SansBoldItalic] [LMSans-BoldOblique] - \definefontsynonym [SansBoldSlanted] [LMSans-BoldOblique] - \definefontsynonym [SansCaps] [LMSans-Regular] - \definefontsynonym [SansCapsSlanted] [LMSans-Oblique] - \stoptypescript - - \starttypescript [mono] [modern,latin-modern,computer-modern,default] [name] - \definefontsynonym [Mono] [LMTypewriter-Regular] - \definefontsynonym [MonoBold] [LMTypewriter-Dark] - \definefontsynonym [MonoItalic] [LMTypewriter-Italic] - \definefontsynonym [MonoSlanted] [LMTypewriter-Oblique] - \definefontsynonym [MonoBoldItalic] [LMTypewriter-DarkOblique] - \definefontsynonym [MonoBoldSlanted] [LMTypewriter-DarkOblique] - \definefontsynonym [MonoCaps] [LMTypewriter-CapsRegular] - \definefontsynonym [MonoCapsSlanted] [LMTypewriter-CapsOblique] - \definefontsynonym [MonoVariable] [LMTypewriterVarWd-Regular] - \stoptypescript - - \starttypescript [math] [modern,latin-modern,computer-modern,default] [name] - \definefontsynonym [MathRoman] [LMMathRoman-Regular] - \definefontsynonym [MathRomanBold] [LMMathRoman-Bold] - \stoptypescript - - \starttypescript [serif] [modern-variable,latin-modern-variable,default] [name] - \definefontsynonym [Serif] [LMTypewriterVarWd-Regular] - \definefontsynonym [SerifBold] [LMTypewriterVarWd-Oblique] - \definefontsynonym [SerifItalic] [LMTypewriterVarWd-Oblique] - \definefontsynonym [SerifSlanted] [LMTypewriterVarWd-Dark] - \definefontsynonym [SerifBoldItalic] [LMTypewriterVarWd-DarkOblique] - \definefontsynonym [SerifBoldSlanted] [LMTypewriterVarWd-DarkOblique] - \definefontsynonym [SerifCaps] [LMTypewriterVarWd-Regular] - \definefontsynonym [SerifCapsSlanted] [LMTypewriterVarWd-Oblique] - \stoptypescript - - \starttypescript [mono] [modern-condensed,latin-modern-condensed,modern-light-condensed,latin-modern-light-condensed,default] [name] - \definefontsynonym [Mono] [LMTypewriter-LightCondensed] - \definefontsynonym [MonoBold] [LMTypewriter-LightCondensed] - \definefontsynonym [MonoItalic] [LMTypewriter-LightCondensedOblique] - \definefontsynonym [MonoSlanted] [LMTypewriter-LightCondensedOblique] - \definefontsynonym [MonoBoldItalic] [LMTypewriter-LightCondensed] - \definefontsynonym [MonoBoldSlanted] [LMTypewriter-LightCondensed] - \definefontsynonym [MonoCaps] [LMTypewriter-LightCondensed] - \definefontsynonym [MonoCapsSlanted] [LMTypewriter-LightCondensed] - \stoptypescript - - \starttypescript [mono] [modern-light,latin-modern-light,default] [name] - \definefontsynonym [Mono] [LMTypewriter-Light] - \definefontsynonym [MonoBold] [LMTypewriter-Light] - \definefontsynonym [MonoItalic] [LMTypewriter-LightOblique] - \definefontsynonym [MonoSlanted] [LMTypewriter-LightOblique] - \definefontsynonym [MonoBoldItalic] [LMTypewriter-Light] - \definefontsynonym [MonoBoldSlanted] [LMTypewriter-Light] - \definefontsynonym [MonoCaps] [LMTypewriter-Light] - \definefontsynonym [MonoCapsSlanted] [LMTypewriter-Light] - \stoptypescript - - % Later we will map the real fonts, here we just map synonyms. - - \starttypescript [serif] [modern,latin-modern,computer-modern,default] - \definefontsynonym [LMRoman-DemiOblique] [LMRoman10-DemiOblique] - \definefontsynonym [LMRoman-Bold] [LMRoman10-Bold] - \definefontsynonym [LMRoman-BoldItalic] [LMRoman10-BoldItalic] - \definefontsynonym [LMRoman-BoldOblique] [LMRoman10-BoldOblique] - \definefontsynonym [LMRoman-CapsRegular] [LMRoman10-CapsRegular] - \definefontsynonym [LMRoman-CapsOblique] [LMRoman10-CapsOblique] - \definefontsynonym [LMRoman-Regular] [LMRoman10-Regular] - \definefontsynonym [LMRoman-Italic] [LMRoman10-Italic] - \definefontsynonym [LMRoman-Oblique] [LMRoman10-Oblique] - \stoptypescript - - \starttypescript [sans] [modern,latin-modern,computer-modern,default] - \definefontsynonym [LMSans-Regular] [LMSans10-Regular] - \definefontsynonym [LMSans-BoldOblique] [LMSans10-BoldOblique] - \definefontsynonym [LMSans-Bold] [LMSans10-Bold] - \definefontsynonym [LMSans-DemiCondensed] [LMSans10-DemiCondensed] - \definefontsynonym [LMSans-DemiCondensedOblique] [LMSans10-DemiCondensedOblique] - \definefontsynonym [LMSans-Oblique] [LMSans10-Oblique] - \stoptypescript - - \starttypescript [mono] [modern,latin-modern,modern-variable,latin-modern-variable,modern-condensed,latin-modern-condensed,default] - \definefontsynonym [LMTypewriter-CapsRegular] [LMTypewriter10-CapsRegular] - \definefontsynonym [LMTypewriter-CapsOblique] [LMTypewriter10-CapsOblique] - \definefontsynonym [LMTypewriter-Light] [LMTypewriter10-Light] - \definefontsynonym [LMTypewriter-LightOblique] [LMTypewriter10-LightOblique] - \definefontsynonym [LMTypewriter-LightCondensed] [LMTypewriter10-LightCondensed] - \definefontsynonym [LMTypewriter-LightCondensedOblique] [LMTypewriter10-LightCondensedOblique] - \definefontsynonym [LMTypewriter-Dark] [LMTypewriter10-Dark] - \definefontsynonym [LMTypewriter-DarkOblique] [LMTypewriter10-DarkOblique] - \definefontsynonym [LMTypewriter-Regular] [LMTypewriter10-Regular] - \definefontsynonym [LMTypewriter-Italic] [LMTypewriter10-Italic] - \definefontsynonym [LMTypewriter-Oblique] [LMTypewriter10-Oblique] - \definefontsynonym [LMTypewriterVarWd-Regular] [LMTypewriterVarWd10-Regular] - \definefontsynonym [LMTypewriterVarWd-Oblique] [LMTypewriterVarWd10-Oblique] - \definefontsynonym [LMTypewriterVarWd-Light] [LMTypewriterVarWd10-Light] - \definefontsynonym [LMTypewriterVarWd-LightOblique] [LMTypewriterVarWd10-LightOblique] - \definefontsynonym [LMTypewriterVarWd-Dark] [LMTypewriterVarWd10-Dark] - \definefontsynonym [LMTypewriterVarWd-DarkOblique] [LMTypewriterVarWd10-DarkOblique] - \stoptypescript - - \starttypescript [serif] [modern,latin-modern,computer-modern,default] - \definefontsynonym [ComputerModern] [LMRoman-Regular] - \definefontsynonym [ComputerModern-Italic] [LMRoman-Italic] - \definefontsynonym [ComputerModern-Slanted] [LMRoman-Oblique] - \definefontsynonym [ComputerModern-Bold] [LMRoman-Bold] - \definefontsynonym [ComputerModern-BoldItalic] [LMRoman-BoldItalic] - \definefontsynonym [ComputerModern-BoldSlanted] [LMRoman-BoldOblique] - \definefontsynonym [ComputerModern-Caps] [LMRoman-CapsRegular] - \definefontsynonym [ComputerModern-CapsSlanted] [LMRoman-CapsOblique] - \stoptypescript - - \starttypescript [sans] [modern,latin-modern,computer-modern,default] - \definefontsynonym [ComputerModernSans] [LMSans-Regular] - \definefontsynonym [ComputerModernSans-Italic] [LMSans-Oblique] - \definefontsynonym [ComputerModernSans-Slanted] [LMSans-Oblique] - \definefontsynonym [ComputerModernSans-Bold] [LMSans-Bold] - \definefontsynonym [ComputerModernSans-BoldItalic] [LMSans-BoldOblique] - \definefontsynonym [ComputerModernSans-BoldSlanted] [LMSans-BoldOblique] - \definefontsynonym [ComputerModernSans-Caps] [LMSans-Regular]% [LMSans-CapsRegular] - \definefontsynonym [ComputerModernSans-CapsSlanted] [LMSans-Oblique]% [LMSans-CapsOblique] - \stoptypescript - - \starttypescript [mono] [modern,latin-modern,computer-modern,default] - \definefontsynonym [ComputerModernMono] [LMTypewriter-Regular] - \definefontsynonym [ComputerModernMono-Italic] [LMTypewriter-Italic] - \definefontsynonym [ComputerModernMono-Slanted] [LMTypewriter-Oblique] - \definefontsynonym [ComputerModernMono-Bold] [LMTypewriter-Dark] - \definefontsynonym [ComputerModernMono-BoldItalic] [LMTypewriter-DarkOblique] - \definefontsynonym [ComputerModernMono-BoldSlanted] [LMTypewriter-DarkOblique] - \definefontsynonym [ComputerModernMono-Caps] [LMTypewriter-CapsRegular] - \definefontsynonym [ComputerModernMono-CapsSlanted] [LMTypewriter-CapsOblique] - \definefontsynonym [ComputerModernMono-Variable] [LMTypewriterVarWd-Regular] - \stoptypescript - - \starttypescript [mono] [modern-light,latin-modern-light,default] - \definefontsynonym [ComputerModernMono] [LMTypewriter-Light] - \definefontsynonym [ComputerModernMono-Italic] [LMTypewriter-LightOblique] - \definefontsynonym [ComputerModernMono-Slanted] [LMTypewriter-LightOblique] - \definefontsynonym [ComputerModernMono-Bold] [LMTypewriter-Dark] - \definefontsynonym [ComputerModernMono-BoldItalic] [LMTypewriter-DarkOblique] - \definefontsynonym [ComputerModernMono-BoldSlanted] [LMTypewriter-DarkOblique] - \definefontsynonym [ComputerModernMono-Caps] [LMTypewriter-Light] - \definefontsynonym [ComputerModernMono-CapsSlanted] [LMTypewriter-LightOblique] - \definefontsynonym [ComputerModernMono-Variable] [LMTypewriterVarWd-Light] - \stoptypescript - - \starttypescript [serif] [modern-variable,latin-modern-variable,default] - \definefontsynonym [ComputerModernVariable] [LMTypewriterVarWd-Regular] - \definefontsynonym [ComputerModernVariable-Italic] [LMTypewriterVarWd-Oblique] - \definefontsynonym [ComputerModernVariable-Slanted] [LMTypewriterVarWd-Oblique] - \definefontsynonym [ComputerModernVariable-Bold] [LMTypewriterVarWd-Dark] - \definefontsynonym [ComputerModernVariable-BoldItalic] [LMTypewriterVarWd-DarkOblique] - \definefontsynonym [ComputerModernVariable-BoldSlanted] [LMTypewriterVarWd-DarkOblique] - \definefontsynonym [ComputerModernVariable-Caps] [LMTypewriterVarWd-Regular] - \definefontsynonym [ComputerModernVariable-CapsSlanted] [LMTypewriterVarWd-Oblique] - \stoptypescript - - \starttypescript [serif] [modern-variable-light,latin-modern-variable-light,default] - \definefontsynonym [ComputerModernVariable] [LMTypewriterVarWd-Light] - \definefontsynonym [ComputerModernVariable-Italic] [LMTypewriterVarWd-LightOblique] - \definefontsynonym [ComputerModernVariable-Slanted] [LMTypewriterVarWd-LightOblique] - \definefontsynonym [ComputerModernVariable-Bold] [LMTypewriterVarWd-Dark] - \definefontsynonym [ComputerModernVariable-BoldItalic] [LMTypewriterVarWd-DarkOblique] - \definefontsynonym [ComputerModernVariable-BoldSlanted] [LMTypewriterVarWd-DarkOblique] - \definefontsynonym [ComputerModernVariable-Caps] [LMTypewriterVarWd-Light] - \definefontsynonym [ComputerModernVariable-CapsSlanted] [LMTypewriterVarWd-LightOblique] - \stoptypescript - - \starttypescript [math] [modern,latin-modern,default] - \definefontsynonym [LMMathRoman-Regular] [LMMathRoman10-Regular] - \definefontsynonym [LMMathRoman-Bold] [LMMathRoman10-Bold] - \stoptypescript - - \starttypescript [math] [modern,latin-modern,default] - % \loadfontgoodies[lm-math] - \definefontsynonym [LMMathRoman-Regular] [\v!file:lmmath-regular.otf] [\s!features=\s!math] - \definefontsynonym [LMMathRoman-Bold] [\v!file:lmmath-regular.otf] [\s!features=\s!math] - \stoptypescript - - \starttypescript [modern,default] - \definetypeface [modern] [rm] [serif] [modern] [computer-modern] - \definetypeface [modern] [ss] [sans] [modern] [computer-modern] - \definetypeface [modern] [tt] [mono] [modern] [computer-modern] - \definetypeface [modern] [mm] [math] [modern] [computer-modern] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modern-base] - \definetypeface [modern] [rm] [serif] [modern] [default] - \definetypeface [modern] [ss] [sans] [modern] [default] - \definetypeface [modern] [tt] [mono] [modern] [default] - \definetypeface [modern] [mm] [math] [modern] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modernvariable,modern-variable] - \definetypeface [modernvariable] [rm] [serif] [modern-variable] [default] - \definetypeface [modernvariable] [tt] [mono] [modern-variable] [default] - \definetypeface [modernvariable] [mm] [math] [modern] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modernvariablelight,modern-variable-light] - \definetypeface [modernvariable] [rm] [serif] [modern-variable-light] [default] - \definetypeface [modernvariable] [tt] [mono] [modern-variable-light] [default] - \definetypeface [modernvariable] [mm] [math] [modern] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modern-mono] - \definetypeface [modern] [rm] [serif] [modern] [computer-modern] - \definetypeface [modern] [ss] [sans] [modern] [computer-modern] - \definetypeface [modern] [tt] [mono] [modern-light] [computer-modern] - \definetypeface [modern] [mm] [math] [modern] [computer-modern] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modern-base-mono] - \definetypeface [modern] [rm] [serif] [modern] [computer-modern] [default] - \definetypeface [modern] [ss] [sans] [modern] [computer-modern] [default] - \definetypeface [modern] [tt] [mono] [modern-light] [computer-modern] [default] - \definetypeface [modern] [mm] [math] [modern] [computer-modern] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [serif] [simple] [name]% bad, will be changed but in sycn with manuals that use it - \definefontsynonym [Simple] [cmvtt10] - %setupfontsynonym [Simple] [handling=pure] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[texgyre] - - \definetypescriptprefix [f:pagella] [pagella] \definetypescriptprefix [f:palatino] [pagella] - \definetypescriptprefix [f:termes] [termes] \definetypescriptprefix [f:times] [termes] - \definetypescriptprefix [f:heros] [heros] \definetypescriptprefix [f:helvetica] [heros] - \definetypescriptprefix [f:bonum] [bonum] \definetypescriptprefix [f:bookman] [bonum] - \definetypescriptprefix [f:schola] [schola] \definetypescriptprefix [f:schoolbook] [schola] - \definetypescriptprefix [f:adventor][adventor]% \definetypescriptprefix [f:adventor] [adventor] - \definetypescriptprefix [f:cursor] [cursor] \definetypescriptprefix [f:courier] [cursor] - \definetypescriptprefix [f:chorus] [chorus] \definetypescriptprefix [f:chancery] [chorus] - - \starttypescript [serif,sans] [adventor,bonum,bookman,heros,helvetica,pagella,palatino,schola,schoolbook,termes,times] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!default] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!default] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!default] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!default] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!smallcaps] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-ItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!smallcaps] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!smallcaps] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!smallcaps] - \stoptypescript - - \starttypescript [mono] [cursor,courier] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!none] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!none] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!none] - \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!none] - \stoptypescript - - \starttypescript [serif,calligraphy] [chorus,chancery] - \definefontsynonym [TeXGyreChorus-MediumItalic] [\s!file:texgyrechorus-mediumitalic] [\s!features=\s!default] - \stoptypescript - - \definetypescriptprefix [n:pagella] [TeXGyrePagella] \definetypescriptprefix [n:palatino] [TeXGyrePagella] - \definetypescriptprefix [n:termes] [TeXGyreTermes] \definetypescriptprefix [n:times] [TeXGyreTermes] - \definetypescriptprefix [n:heros] [TeXGyreHeros] \definetypescriptprefix [n:helvetica] [TeXGyreHeros] - \definetypescriptprefix [n:bonum] [TeXGyreBonum] \definetypescriptprefix [n:bookman] [TeXGyreBonum] - \definetypescriptprefix [n:schola] [TeXGyreSchola] \definetypescriptprefix [n:schoolbook] [TeXGyreSchola] - \definetypescriptprefix [n:adventor] [TeXGyreAdventor]% \definetypescriptprefix [n:adventor] [TeXGyreAdventor] - \definetypescriptprefix [n:cursor] [TeXGyreCursor] \definetypescriptprefix [n:courier] [TeXGyreCursor] - \definetypescriptprefix [n:chorus] [TeXGyreChorus] \definetypescriptprefix [n:chancery] [TeXGyreChorus] % not the full set - - \starttypescript [serif] [pagella,palatino,termes,times,bonum,bookman,schola,schoolbook] [name] - \definefontsynonym [Serif] [\typescriptprefix{n:\typescripttwo}-Regular] - \definefontsynonym [SerifItalic] [\typescriptprefix{n:\typescripttwo}-Italic] - \definefontsynonym [SerifBold] [\typescriptprefix{n:\typescripttwo}-Bold] - \definefontsynonym [SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] - \definefontsynonym [SerifSlanted] [SerifItalic] - \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] - \definefontsynonym [SerifCaps] [\typescriptprefix{n:\typescripttwo}-Caps] - - \definefontsynonym [SerifRegular] [Serif] - \definefontsynonym [SerifRegularCaps] [SerifCaps] - \definefontsynonym [SerifItalicCaps] [\typescriptprefix{n:\typescripttwo}-ItalicCaps] - \definefontsynonym [SerifBoldCaps] [\typescriptprefix{n:\typescripttwo}-BoldCaps] - \definefontsynonym [SerifBoldItalicCaps] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] - \definefontsynonym [SerifSlantedCaps] [SerifItalicCaps] - \definefontsynonym [SerifBoldSlantedCaps] [SerifBoldItalicCaps] - \definefontsynonym [SerifCapsCaps] [SerifCaps] - \stoptypescript - - \starttypescript [serif] [chorus,chancery] [name] - \definefontsynonym [SerifMediumItalic] [TeXGyreChorus-MediumItalic] - \definefontsynonym [Serif] [SerifMediumItalic] - \definefontsynonym [SerifItalic] [SerifMediumItalic] - \definefontsynonym [SerifBold] [SerifMediumItalic] - \definefontsynonym [SerifBoldItalic] [SerifMediumItalic] - \definefontsynonym [SerifSlanted] [SerifMediumItalic] - \definefontsynonym [SerifBoldSlanted] [SerifMediumItalic] - \definefontsynonym [SerifCaps] [SerifMediumItalic] - \stoptypescript - - \starttypescript [calligraphy] [chorus,chancery] [name] - \definefontsynonym [Calligraphy] [TeXGyreChorus-MediumItalic] - \stoptypescript - - \starttypescript [sans] [heros,helvetica,adventor] [name] - \definefontsynonym [Sans] [\typescriptprefix{n:\typescripttwo}-Regular] - \definefontsynonym [SansItalic] [\typescriptprefix{n:\typescripttwo}-Italic] - \definefontsynonym [SansBold] [\typescriptprefix{n:\typescripttwo}-Bold] - \definefontsynonym [SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] - \definefontsynonym [SansSlanted] [SansItalic] - \definefontsynonym [SansBoldSlanted] [SansBoldItalic] - \definefontsynonym [SansCaps] [\typescriptprefix{n:\typescripttwo}-Caps] - - \definefontsynonym [SansRegular] [Sans] - \definefontsynonym [SansRegularCaps] [SansCaps] - \definefontsynonym [SansItalicCaps] [\typescriptprefix{n:\typescripttwo}-ItalicCaps] - \definefontsynonym [SansBoldCaps] [\typescriptprefix{n:\typescripttwo}-BoldCaps] - \definefontsynonym [SansBoldItalicCaps] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] - \definefontsynonym [SansSlantedCaps] [SansItalicCaps] - \definefontsynonym [SansBoldSlantedCaps] [SansBoldItalicCaps] - \definefontsynonym [SansCapsCaps] [SansCaps] - \stoptypescript - - \starttypescript [mono] [cursor,courier] [name] - \definefontsynonym [Mono] [\typescriptprefix{n:\typescripttwo}-Regular] - \definefontsynonym [MonoItalic] [\typescriptprefix{n:\typescripttwo}-Italic] - \definefontsynonym [MonoBold] [\typescriptprefix{n:\typescripttwo}-Bold] - \definefontsynonym [MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] - \definefontsynonym [MonoSlanted] [MonoItalic] - \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic] - - \definefontsynonym [MonoRegular] [Mono] - \definefontsynonym [MonoRegularCaps] [MonoCaps] - \definefontsynonym [MonoItalicCaps] [\typescriptprefix{n:\typescripttwo}-ItalicCaps] - \definefontsynonym [MonoBoldCaps] [\typescriptprefix{n:\typescripttwo}-BoldCaps] - \definefontsynonym [MonoBoldItalicCaps] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] - \definefontsynonym [MonoSlantedCaps] [MonoItalicCaps] - \definefontsynonym [MonoBoldSlantedCaps] [MonoBoldItalicCaps] - \definefontsynonym [MonoCapsCaps] [MonoCaps] - \stoptypescript - - \starttypescript [times,termes] - \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] - \definetypeface [\typescriptone] [ss] [sans] [helvetica] [default] [rscale=0.9] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.05] - \definetypeface [\typescriptone] [mm] [math] [times] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [palatino,pagella] - \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] - \definetypeface [\typescriptone] [ss] [sans] [modern] [default] [rscale=1.075] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.075] - \definetypeface [\typescriptone] [mm] [math] [palatino] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [schoolbook,schola] - \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] - \definetypeface [\typescriptone] [ss] [sans] [modern] [default] [rscale=1.1] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.1] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] [rscale=1.1] - \quittypescriptscanning - \stoptypescript - - \starttypescript [bookman,bonum] - \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] - \definetypeface [\typescriptone] [ss] [sans] [modern] [default] [rscale=1.1] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.1] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] [rscale=1.1] - \quittypescriptscanning - \stoptypescript - - \starttypescript [chancery,chorus] - \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] - \definetypeface [\typescriptone] [ss] [sans] [modern] [default] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [helvetica,heros] - \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default] - \definetypeface [\typescriptone] [rm] [serif] [modern] [default] [rscale=1.15] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.15] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] [rscale=1.15] - \quittypescriptscanning - \stoptypescript - - \starttypescript [avantgarde,adventor] - \definetypeface [\typescriptone] [ss] [sans] [adventor] [default] - \definetypeface [\typescriptone] [rm] [serif] [modern] [default] [rscale=1.15] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.15] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [courier,cursor] - \definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default] - \definetypeface [\typescriptone] [rm] [serif] [modern] [default] - \definetypeface [\typescriptone] [ss] [sans] [modern] [default] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[xmath] - - % Times Math (tx) - - \starttypescript [math][times][all] - \loadfontgoodies[tx-math] - \definefontsynonym[MathRoman][txmath@tx-math] - % \definefontsynonym[MathRomanBold][MathRoman] - \stoptypescript - - % Palatino Math (px) - - \starttypescript [math][palatino][all] - \loadfontgoodies[px-math] - \definefontsynonym[MathRoman][pxmath@px-math] - % \definefontsynonym[MathRomanBold][MathRoman] - \stoptypescript - -\stoptypescriptcollection - -% nb: on my system already 'type-imp-dejavu.mkiv' and 'type-imp-dejavu-condensed.mkiv' - -\starttypescriptcollection[dejavu] - - \starttypescript [serif] [dejavu] [name] - \setups[font:fallback:serif] - \definefontsynonym [Serif] [name:dejavuserif] [features=default] - \definefontsynonym [SerifBold] [name:dejavuserifbold] [features=default] - \definefontsynonym [SerifItalic] [name:dejavuserifitalic] [features=default] - \definefontsynonym [SerifBoldItalic] [name:dejavuserifbolditalic] [features=default] - \stoptypescript - - \starttypescript [sans] [dejavu] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [name:dejavusans] [features=default] - \definefontsynonym [SansBold] [name:dejavusansbold] [features=default] - \definefontsynonym [SansItalic] [name:dejavusansoblique] [features=default] - \definefontsynonym [SansBoldItalic] [name:dejavusansboldoblique] [features=default] - \stoptypescript - - \starttypescript [mono] [dejavu] [name] - \setups[font:fallback:mono] - \definefontsynonym [Mono] [name:dejavusansmono] [features=none] - \definefontsynonym [MonoBold] [name:dejavusansmonobold] [features=none] - \definefontsynonym [MonoItalic] [name:dejavusansmonooblique] [features=none] - \definefontsynonym [MonoBoldItalic] [name:dejavusansmonoboldoblique] [features=none] - \stoptypescript - - \starttypescript[dejavu] - \definetypeface [dejavu] [rm] [serif] [dejavu] [default] - \definetypeface [dejavu] [ss] [sans] [dejavu] [default] - \definetypeface [dejavu] [tt] [mono] [dejavu] [default] - \definetypeface [dejavu] [mm] [math] [xits] [default] [rscale=1.2] - \stoptypescript - - \starttypescript [serif] [dejavu-condensed] [name] - \setups[font:fallback:serif] - \definefontsynonym [Serif] [name:dejavuserifcondensed] [features=default] - \definefontsynonym [SerifBold] [name:dejavuserifcondensedbold] [features=default] - \definefontsynonym [SerifItalic] [name:dejavuserifcondenseditalic] [features=default] - \definefontsynonym [SerifBoldItalic] [name:dejavuserifcondensedbolditalic] [features=default] - \stoptypescript - - \starttypescript [sans] [dejavu-condensed] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [name:dejavusanscondensed] [features=default] - \definefontsynonym [SansBold] [name:dejavusanscondensedbold] [features=default] - \definefontsynonym [SansItalic] [name:dejavusanscondensedoblique] [features=default] - \definefontsynonym [SansBoldItalic] [name:dejavusanscondensedboldoblique] [features=default] - \stoptypescript - - \definefontfeature[dejavu-condensed-mono][extend=.8] - - \starttypescript [mono] [dejavu-condensed] [name] - \setups[font:fallback:mono] - % \definefontsynonym [Mono] [name:dejavusansmonocondensed] [features=none] - % \definefontsynonym [MonoBold] [name:dejavusansmonoboldcondensed] [features=none] - % \definefontsynonym [MonoItalic] [name:dejavusansmonoobliquecondensed] [features=none] - % \definefontsynonym [MonoBoldItalic] [name:dejavusansmonoboldobliquecondensed] [features=none] - \definefontsynonym [Mono] [name:dejavusansmono] [features=dejavu-condensed-mono] - \definefontsynonym [MonoBold] [name:dejavusansmonobold] [features=dejavu-condensed-mono] - \definefontsynonym [MonoItalic] [name:dejavusansmonooblique] [features=dejavu-condensed-mono] - \definefontsynonym [MonoBoldItalic] [name:dejavusansmonoboldoblique] [features=dejavu-condensed-mono] - \stoptypescript - - % \starttypescript [mono] [dejavu-condensed] [name] - % \setups[font:fallback:mono] - % \definefontsynonym [Mono] [name:dejavusansmono] [features=none] - % \definefontsynonym [MonoBold] [name:dejavusansmonobold] [features=none] - % \definefontsynonym [MonoItalic] [name:dejavusansmonooblique] [features=none] - % \definefontsynonym [MonoBoldItalic] [name:dejavusansmonoboldoblique] [features=none] - % \stoptypescript - - \starttypescript[dejavu-condensed] - \definetypeface [dejavu-condensed] [rm] [serif] [dejavu-condensed] [default] - \definetypeface [dejavu-condensed] [ss] [sans] [dejavu-condensed] [default] - \definetypeface [dejavu-condensed] [tt] [mono] [dejavu-condensed] [default] - \definetypeface [dejavu-condensed] [mm] [math] [xits] [default] [rscale=1.2] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[antykwa] - - % Antykwa Torunska (GUST) - - \starttypescript [serif] [antykwa,antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] - \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-MedItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondMedItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default] - - \definefontsynonym [AntykwaTorunska-Cap] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-ItalicCap] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-BoldCap] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-BoldItalicCap] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-LightCap] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-LightItalicCap] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-MediumCap] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-MedItalicCap] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondCap] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondItalicCap] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondBoldCap] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondLightCap] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondLightItalicCap][\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondMediumCap] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaTorunska-CondMedItalicCap] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!smallcaps] - \stoptypescript - - \starttypescript [math][antykwa,antykwa-torunska][all] - \loadfontgoodies[antykwa-math] - \definefontsynonym[MathRoman][antykwamath@antykwa-math] - \stoptypescript - - \starttypescript [math][antykwa-torunska-light][all] - \loadfontgoodies[antykwa-math] - \definefontsynonym[MathRoman][antykwalightmath@antykwa-light-math] - \stoptypescript - - \starttypescript [math][antykwa-torunska-cond][all] - \loadfontgoodies[antykwa-math] - \definefontsynonym[MathRoman][antykwacondmath@antykwa-cond-math] - \stoptypescript - - \starttypescript [math][antykwa-torunska-lightcond][all] - \loadfontgoodies[antykwa-math] - \definefontsynonym[MathRoman][antykwalightcondmath@antykwa-lightcond-math] - \stoptypescript - - \starttypescript [serif] [antykwa,antykwa-torunska] [name] - \definefontsynonym [Serif] [AntykwaTorunska-Regular] - \definefontsynonym [SerifBold] [AntykwaTorunska-Bold] - \definefontsynonym [SerifItalic] [AntykwaTorunska-Italic] - \definefontsynonym [SerifSlanted] [AntykwaTorunska-Italic] - \definefontsynonym [SerifBoldItalic] [AntykwaTorunska-BoldItalic] - \definefontsynonym [SerifBoldSlanted] [AntykwaTorunska-BoldItalic] - \definefontsynonym [SerifCaps] [AntykwaTorunska-Cap] - \stoptypescript - - \starttypescript [serif] [antykwa-torunska-light] [name] - \definefontsynonym [Serif] [AntykwaTorunska-Light] - \definefontsynonym [SerifBold] [AntykwaTorunska-Medium] - \definefontsynonym [SerifItalic] [AntykwaTorunska-LightItalic] - \definefontsynonym [SerifSlanted] [AntykwaTorunska-LightItalic] - \definefontsynonym [SerifBoldItalic] [AntykwaTorunska-MedItalic] - \definefontsynonym [SerifBoldSlanted] [AntykwaTorunska-MedItalic] - \definefontsynonym [SerifCaps] [AntykwaTorunska-LightCap] - \stoptypescript - - \starttypescript [serif] [antykwa-torunska-cond] [name] - \definefontsynonym [Serif] [AntykwaTorunska-CondRegular] - \definefontsynonym [SerifBold] [AntykwaTorunska-CondBold] - \definefontsynonym [SerifItalic] [AntykwaTorunska-CondItalic] - \definefontsynonym [SerifSlanted] [AntykwaTorunska-CondItalic] - \definefontsynonym [SerifBoldItalic] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [SerifBoldSlanted] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [SerifCaps] [AntykwaTorunska-CondCap] - \stoptypescript - - \starttypescript [serif] [antykwa-torunska-lightcond] [name] - \definefontsynonym [Serif] [AntykwaTorunska-CondLight] - \definefontsynonym [SerifBold] [AntykwaTorunska-CondMedium] - \definefontsynonym [SerifItalic] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [SerifSlanted] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [SerifBoldItalic] [AntykwaTorunska-CondMedItalic] - \definefontsynonym [SerifBoldSlanted] [AntykwaTorunska-CondMedItalic] - \definefontsynonym [SerifCaps] [AntykwaTorunska-CondLightCap] - \stoptypescript - - \starttypescript [serif] [antykwa,antykwa-torunska] [name] - \definefontsynonym [SerifRegular] [Serif] - \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-Cap] - \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-BoldCap] - \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-ItalicCap] - \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-ItalicCap] - \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-BoldItalicCap] - \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-BoldItalicCap] - \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-Cap] - - \definefontsynonym [SerifRegularLight] [AntykwaTorunska-Light] - \definefontsynonym [SerifBoldLight] [AntykwaTorunska-Medium] - \definefontsynonym [SerifItalicLight] [AntykwaTorunska-LightItalic] - \definefontsynonym [SerifSlantedLight] [AntykwaTorunska-LightItalic] - \definefontsynonym [SerifBoldItalicLight] [AntykwaTorunska-MedItalic] - \definefontsynonym [SerifBoldSlantedLight] [AntykwaTorunska-MedItalic] - \definefontsynonym [SerifCapsLight] [AntykwaTorunska-LightCap] - - \definefontsynonym [SerifRegularCond] [AntykwaTorunska-CondRegular] - \definefontsynonym [SerifBoldCond] [AntykwaTorunska-CondBold] - \definefontsynonym [SerifItalicCond] [AntykwaTorunska-CondItalic] - \definefontsynonym [SerifSlantedCond] [AntykwaTorunska-CondItalic] - \definefontsynonym [SerifBoldItalicCond] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [SerifBoldSlantedCond] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [SerifCapsCond] [AntykwaTorunska-CondCap] - \stoptypescript - - \starttypescript [serif] [antykwa-torunska-light] [name] - \definefontsynonym [SerifRegular] [Serif] - \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-LightCap] - \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-MediumCap] - \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-LightItalicCap] - \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-LightItalicCap] - \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-MedItalicCap] - \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-MedItalicCap] - \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-LightCap] - - \definefontsynonym [SerifRegularDark] [AntykwaTorunska-Regular] - \definefontsynonym [SerifBoldDark] [AntykwaTorunska-Bold] - \definefontsynonym [SerifItalicDark] [AntykwaTorunska-Italic] - \definefontsynonym [SerifSlantedDark] [AntykwaTorunska-Italic] - \definefontsynonym [SerifBoldItalicDark] [AntykwaTorunska-BoldItalic] - \definefontsynonym [SerifBoldSlantedDark] [AntykwaTorunska-BoldItalic] - \definefontsynonym [SerifCapsDark] [AntykwaTorunska-Cap] - - \definefontsynonym [SerifRegularCond] [AntykwaTorunska-CondLight] - \definefontsynonym [SerifBoldCond] [AntykwaTorunska-CondMedium] - \definefontsynonym [SerifItalicCond] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [SerifSlantedCond] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [SerifBoldItalicCond] [AntykwaTorunska-CondMedItalic] - \definefontsynonym [SerifBoldSlantedCond] [AntykwaTorunska-CondMedItalic] - \definefontsynonym [SerifCapsCond] [AntykwaTorunska-CondLightCap] - \stoptypescript - - \starttypescript [serif] [antykwa-torunska-cond] [name] - \definefontsynonym [SerifRegular] [Serif] - \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-CondCap] - \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-CondBoldCap] - \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-CondItalicCap] - \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-CondItalicCap] - \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-CondBoldItalicCap] - \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-CondBoldItalicCap] - \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-CondCap] - - \definefontsynonym [SerifRegularLight] [AntykwaTorunska-CondLight] - \definefontsynonym [SerifBoldLight] [AntykwaTorunska-CondMedium] - \definefontsynonym [SerifItalicLight] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [SerifSlantedLight] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [SerifBoldItalicLight] [AntykwaTorunska-CondMedItalic] - \definefontsynonym [SerifBoldSlantedLight] [AntykwaTorunska-CondMedItalic] - \definefontsynonym [SerifCapsLight] [AntykwaTorunska-CondLightCap] - - \definefontsynonym [SerifRegularExp] [AntykwaTorunska-Regular] - \definefontsynonym [SerifBoldExp] [AntykwaTorunska-Bold] - \definefontsynonym [SerifItalicExp] [AntykwaTorunska-Italic] - \definefontsynonym [SerifSlantedExp] [AntykwaTorunska-Italic] - \definefontsynonym [SerifBoldItalicExp] [AntykwaTorunska-BoldItalic] - \definefontsynonym [SerifBoldSlantedExp] [AntykwaTorunska-BoldItalic] - \definefontsynonym [SerifCapsExp] [AntykwaTorunska-Cap] - \stoptypescript - - \starttypescript [serif] [antykwa-torunska-lightcond] [name] - \definefontsynonym [SerifRegular] [Serif] - \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-CondLightCap] - \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-CondMediumCap] - \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-CondLightItalicCap] - \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-CondLightItalicCap] - \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-CondMedItalicCap] - \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-CondMedItalicCap] - \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-CondLightCap] - - \definefontsynonym [SerifRegularDark] [AntykwaTorunska-CondRegular] - \definefontsynonym [SerifBoldDark] [AntykwaTorunska-CondBold] - \definefontsynonym [SerifItalicDark] [AntykwaTorunska-CondItalic] - \definefontsynonym [SerifSlantedDark] [AntykwaTorunska-CondItalic] - \definefontsynonym [SerifBoldItalicDark] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [SerifBoldSlantedDark] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [SerifCapsDark] [AntykwaTorunska-CondCap] - - \definefontsynonym [SerifRegularExp] [AntykwaTorunska-Light] - \definefontsynonym [SerifBoldExp] [AntykwaTorunska-Medium] - \definefontsynonym [SerifItalicExp] [AntykwaTorunska-LightItalic] - \definefontsynonym [SerifSlantedExp] [AntykwaTorunska-LightItalic] - \definefontsynonym [SerifBoldItalicExp] [AntykwaTorunska-MedItalic] - \definefontsynonym [SerifBoldSlantedExp] [AntykwaTorunska-MedItalic] - \definefontsynonym [SerifCapsExp] [AntykwaTorunska-LightCap] - \stoptypescript - - \starttypescript [antykwa,antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] - \definetypeface[\typescriptone][rm][serif][\typescriptone] [default] - \definetypeface[\typescriptone][ss][sans] [modern] [default] [rscale=1.05] - \definetypeface[\typescriptone][tt][mono] [modern] [default] [rscale=1.05] - \definetypeface[\typescriptone][mm][math] [\typescriptone] [default] - \quittypescriptscanning - \stoptypescript - - % Antykwa Poltawskiego (GUST) - -% \starttypescript [serif] [antykwa-poltawskiego] -% \definefontsynonym [AntykwaPoltawskiego-Regular] [antpr] -% \definefontsynonym [AntykwaPoltawskiego-Bold] [antpb] -% \definefontsynonym [AntykwaPoltawskiego-Italic] [antpri] -% \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [antpbi] -% \stoptypescript - -% \starttypescript [serif] [antykwa-poltawskiego] [name] -% \definefontsynonym [Serif] [AntykwaPoltawskiego-Regular] -% \definefontsynonym [SerifBold] [AntykwaPoltawskiego-Bold] -% \definefontsynonym [SerifItalic] [AntykwaPoltawskiego-Italic] -% \definefontsynonym [SerifSlanted] [AntykwaPoltawskiego-Italic] -% \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-Bold] -% \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-Bold] -% \definefontsynonym [SerifCaps] [AntykwaPoltawskiego-Regular] -% \stoptypescript - - % names of "Caps" may still change - \starttypescript [serif] [antykwa-poltawskiego,antykwa-poltawskiego-light] - \definefontsynonym [AntykwaPoltawskiego-Condensed-Light] [\s!file:antpoltltcond-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-LightItalic] [\s!file:antpoltltcond-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-Regular] [\s!file:antpoltcond-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-Italic] [\s!file:antpoltcond-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-Medium] [\s!file:antpoltltcond-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-MediumItalic] [\s!file:antpoltltcond-bolditalic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-Bold] [\s!file:antpoltcond-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Condensed-BoldItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!default] - - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsLight] [\s!file:antpoltltcond-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsLightItalic] [\s!file:antpoltltcond-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsRegular] [\s!file:antpoltcond-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsItalic] [\s!file:antpoltcond-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsMedium] [\s!file:antpoltltcond-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsMediumItalic] [\s!file:antpoltltcond-bolditalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsBold] [\s!file:antpoltcond-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsBoldItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!smallcaps] - - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Light] [\s!file:antpoltltsemicond-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-LightItalic] [\s!file:antpoltltsemicond-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Regular] [\s!file:antpoltsemicond-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Italic] [\s!file:antpoltsemicond-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Medium] [\s!file:antpoltltsemicond-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-MediumItalic] [\s!file:antpoltltsemicond-bolditalic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Bold] [\s!file:antpoltsemicond-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-BoldItalic] [\s!file:antpoltsemicond-bolditalic] [\s!features=\s!default] - - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsLight] [\s!file:antpoltltsemicond-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsLightItalic] [\s!file:antpoltltsemicond-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsRegular] [\s!file:antpoltsemicond-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsItalic] [\s!file:antpoltsemicond-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsMedium] [\s!file:antpoltltsemicond-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsMediumItalic] [\s!file:antpoltltsemicond-bolditalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsBold] [\s!file:antpoltsemicond-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsBoldItalic] [\s!file:antpoltsemicond-bolditalic] [\s!features=\s!smallcaps] - - \definefontsynonym [AntykwaPoltawskiego-Light] [\s!file:antpoltlt-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-LightItalic] [\s!file:antpoltlt-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Regular] [\s!file:antpolt-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Italic] [\s!file:antpolt-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Medium] [\s!file:antpoltlt-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-MediumItalic] [\s!file:antpoltlt-bolditalic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Bold] [\s!file:antpolt-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [\s!file:antpolt-bolditalic] [\s!features=\s!default] - - \definefontsynonym [AntykwaPoltawskiego-CapsLight] [\s!file:antpoltcond-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsLightItalic] [\s!file:antpoltcond-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsRegular] [\s!file:antpolt-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsItalic] [\s!file:antpolt-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsMedium] [\s!file:antpoltcond-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsMediumItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsBold] [\s!file:antpolt-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-CapsBoldItalic] [\s!file:antpolt-bolditalic] [\s!features=\s!smallcaps] - - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Light] [\s!file:antpoltltsemiexpd-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-LightItalic] [\s!file:antpoltltsemiexpd-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Regular] [\s!file:antpoltsemiexpd-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Italic] [\s!file:antpoltsemiexpd-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Medium] [\s!file:antpoltltsemiexpd-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-MediumItalic] [\s!file:antpoltltsemiexpd-bolditalic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Bold] [\s!file:antpoltsemiexpd-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-BoldItalic] [\s!file:antpoltsemiexpd-bolditalic] [\s!features=\s!default] - - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsLight] [\s!file:antpoltltsemiexpd-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsLightItalic] [\s!file:antpoltltsemiexpd-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsRegular] [\s!file:antpoltsemiexpd-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsItalic] [\s!file:antpoltsemiexpd-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsMedium] [\s!file:antpoltltsemiexpd-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsMediumItalic] [\s!file:antpoltltsemiexpd-bolditalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsBold] [\s!file:antpoltsemiexpd-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsBoldItalic] [\s!file:antpoltsemiexpd-bolditalic] [\s!features=\s!smallcaps] - - \definefontsynonym [AntykwaPoltawskiego-Expanded-Light] [\s!file:antpoltltexpd-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-LightItalic] [\s!file:antpoltltexpd-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-Regular] [\s!file:antpoltexpd-regular] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-Italic] [\s!file:antpoltexpd-italic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-Medium] [\s!file:antpoltltexpd-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-MediumItalic] [\s!file:antpoltltexpd-bolditalic] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-Bold] [\s!file:antpoltexpd-bold] [\s!features=\s!default] - \definefontsynonym [AntykwaPoltawskiego-Expanded-BoldItalic] [\s!file:antpoltexpd-bolditalic] [\s!features=\s!default] - - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsLight] [\s!file:antpoltltexpd-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsLightItalic] [\s!file:antpoltltexpd-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsRegular] [\s!file:antpoltexpd-regular] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsItalic] [\s!file:antpoltexpd-italic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsMedium] [\s!file:antpoltltexpd-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsMediumItalic] [\s!file:antpoltltexpd-bolditalic] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsBold] [\s!file:antpoltexpd-bold] [\s!features=\s!smallcaps] - \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsBoldItalic] [\s!file:antpoltexpd-bolditalic] [\s!features=\s!smallcaps] - \stoptypescript - - \starttypescript [serif] [antykwa-poltawskiego] [name] - \definefontsynonym [Serif] [AntykwaPoltawskiego-Regular] - \definefontsynonym [SerifBold] [AntykwaPoltawskiego-Bold] - \definefontsynonym [SerifItalic] [AntykwaPoltawskiego-Italic] - \definefontsynonym [SerifSlanted] [AntykwaPoltawskiego-Italic] - \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-BoldItalic] - \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-BoldItalic] - \definefontsynonym [SerifCaps] [AntykwaPoltawskiego-CapsRegular] - \stoptypescript - - \starttypescript [serif] [antykwa-poltawskiego-light] [name] - \definefontsynonym [Serif] [AntykwaPoltawskiego-Light] - \definefontsynonym [SerifBold] [AntykwaPoltawskiego-Medium] - \definefontsynonym [SerifItalic] [AntykwaPoltawskiego-LightItalic] - \definefontsynonym [SerifSlanted] [AntykwaPoltawskiego-LightItalic] - \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-MediumItalic] - \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-MediumItalic] - \definefontsynonym [SerifCaps] [AntykwaPoltawskiego-CapsLight] - \stoptypescript - - % condensed and extended variants are still missing - - \starttypescript [antykwa-poltawskiego,antykwa-poltawskiego-light] - \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] - \definetypeface [\typescriptone] [ss] [sans] [modern] [default] [rscale=1.05] - \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.05] - \definetypeface [\typescriptone] [mm] [math] [modern] [default] [rscale=1.05] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[iwona] - - % maybe this will change in Iwona-Math-Letters and Iwona-Math-Letters-Italic - - % These names are a depressing mess. They have changed over time and are - % still not consistent. I'd expect Bold-Regular and Bold-Italic. - - \starttypescript [sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond] - - \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default] - \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default] - \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default] - - \definefontsynonym [Iwona-CapsRegular] [\s!file:Iwona-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsItalic] [\s!file:Iwona-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsBold] [\s!file:Iwona-Bold] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsBoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsLight] [\s!file:IwonaLight-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsLight-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsMedium] [\s!file:IwonaMedium-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsMedium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsHeavy] [\s!file:IwonaHeavy-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsHeavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!smallcaps] - - \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default] - \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default] - - \definefontsynonym [Iwona-CapsCondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondMedium-Regular][\s!file:IwonaCondMedium-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!smallcaps] - \definefontsynonym [Iwona-CapsCondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!smallcaps] - - \stoptypescript - - % [all] is redundant - - \starttypescript [math][iwona][all] - \definefontsynonym[MathRoman][iwonamath@iwona-math] - \stoptypescript - \starttypescript [math][iwona-light][all] - \definefontsynonym[MathRoman][iwonalightmath@iwona-light-math] - \stoptypescript - \starttypescript [math][iwona-medium][all] - \definefontsynonym[MathRoman][iwonamediummath@iwona-medium-math] - \stoptypescript - \starttypescript [math][iwona-heavy][all] - \definefontsynonym[MathRoman][iwonaheavymath@iwona-heavy-math] - \stoptypescript - - \starttypescript [math] [iwona,iwona-light,iwona-medium,iwona-heavy] [all] - \loadfontgoodies[iwona-math] - \stoptypescript - - \starttypescript [sans] [iwona-light] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-Light-Regular] - \definefontsynonym [SansItalic] [Iwona-Light-Italic] - \definefontsynonym [SansBold] [Iwona-Medium-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-Medium-Italic] - \definefontsynonym [SansCaps] [Iwona-CapsLight] - \definefontsynonym [SansItalicCaps] [Iwona-CapsLightItalic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsMedium] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsMediumItalic] - \stoptypescript - - \starttypescript [sans] [iwona-light-caps] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CapsLight-Regular] - \definefontsynonym [SansItalic] [Iwona-CapsLight-Italic] - \definefontsynonym [SansBold] [Iwona-CapsMedium-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-CapsMedium-Italic] - \stoptypescript - - \starttypescript [sans] [iwona] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-Regular] - \definefontsynonym [SansItalic] [Iwona-Italic] - \definefontsynonym [SansBold] [Iwona-Bold] - \definefontsynonym [SansBoldItalic] [Iwona-BoldItalic] - \definefontsynonym [SansCaps] [Iwona-CapsRegular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsItalic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsBold] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsBoldItalic] - \stoptypescript - - \starttypescript [sans] [iwona-caps] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CapsRegular] - \definefontsynonym [SansItalic] [Iwona-CapsItalic] - \definefontsynonym [SansBold] [Iwona-CapsBold] - \definefontsynonym [SansBoldItalic] [Iwona-CapsBoldItalic] - \stoptypescript - - \starttypescript [sans] [iwona-medium] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-Medium-Regular] - \definefontsynonym [SansItalic] [Iwona-Medium-Italic] - \definefontsynonym [SansBold] [Iwona-Heavy-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-Heavy-Italic] - \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsMedium-Italic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-medium-caps] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansItalic] [Iwona-CapsMedium-Italic] - \definefontsynonym [SansBold] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-CapsHeavy-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-heavy] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-Heavy-Regular] - \definefontsynonym [SansItalic] [Iwona-Heavy-Italic] - \definefontsynonym [SansBold] [Iwona-Heavy-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-Heavy-Italic] - \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavy-Italic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-heavy-caps] [name] - \setups[font:fallback:sans] - \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavy-Italic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-light-cond] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CondLight-Regular] - \definefontsynonym [SansItalic] [Iwona-CondLight-Italic] - \definefontsynonym [SansBold] [Iwona-CondMedium-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-CondMedium-Italic] - \definefontsynonym [SansCaps] [Iwona-CapsCondLight-Regular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsCondLight-Italic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsCondMedium-Regular] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondMedium-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-light-cond-caps,iwona-light-caps-cond] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CapsCondLight-Regular] - \definefontsynonym [SansItalic] [Iwona-CapsCondLight-Italic] - \definefontsynonym [SansBold] [Iwona-CapsCondMedium-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-CapsCondMedium-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-cond] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CondRegular] - \definefontsynonym [SansItalic] [Iwona-CondItalic] - \definefontsynonym [SansBold] [Iwona-CondBold] - \definefontsynonym [SansBoldItalic] [Iwona-CondBoldItalic] - \definefontsynonym [SansCaps] [Iwona-CapsCondRegular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsCondItalic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsCondBold] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondBoldItalic] - \stoptypescript - - \starttypescript [sans] [iwona-cond-caps,iwona-caps-cond] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CapsCondRegular] - \definefontsynonym [SansItalic] [Iwona-CapsCondItalic] - \definefontsynonym [SansBold] [Iwona-CapsCondBold] - \definefontsynonym [SansBoldItalic] [Iwona-CapsCondBoldItalic] - \stoptypescript - - \starttypescript [sans] [iwona-medium-cond] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CondMedium-Regular] - \definefontsynonym [SansItalic] [Iwona-CondMedium-Italic] - \definefontsynonym [SansBold] [Iwona-CondHeavy-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-CondHeavy-Italic] - \definefontsynonym [SansCaps] [Iwona-CapsCondHeavy-Regular] - \definefontsynonym [SansItalicCaps] [Iwona-CapsCondMedium-Italic] - \definefontsynonym [SansBoldCaps] [Iwona-CapsCondHeavy-Regular] - \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondHeavy-Italic] - \stoptypescript - - \starttypescript [sans] [iwona-medium-cond-caps,iwona-medium-caps-cond] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Iwona-CapsCondHeavy-Regular] - \definefontsynonym [SansItalic] [Iwona-CapsCondMedium-Italic] - \definefontsynonym [SansBold] [Iwona-CapsCondHeavy-Regular] - \definefontsynonym [SansBoldItalic] [Iwona-CapsCondHeavy-Italic] - \stoptypescript - - \starttypescript [iwona,iwona-light,iwona-heavy,iwona-medium] - \definetypeface[\typescriptone][ss][sans] [\typescriptone] [default] - \definetypeface[\typescriptone][rm][serif][modern] [default] - \definetypeface[\typescriptone][tt][mono] [modern] [default] - \definetypeface[\typescriptone][mm][math] [\typescriptone] [default][text=ss] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[kurier] - - % Kurier (JMN) / no open type fonts yet so this should be in type-one.mkiv - - \starttypescript [sans] [kurier-light,kurier,kurier-medium] - \definefontsynonym[Kurier-Light] [kurierl] - \definefontsynonym[Kurier-Regular] [kurierr] - \definefontsynonym[Kurier-Medium] [kurierm] - \definefontsynonym[Kurier-Bold] [kurierb] - \definefontsynonym[Kurier-Heavy] [kurierh] - \definefontsynonym[Kurier-LightItalic] [kurierli] - \definefontsynonym[Kurier-Italic] [kurierri] - \definefontsynonym[Kurier-MediumItalic] [kuriermi] - \definefontsynonym[Kurier-BoldItalic] [kurierbi] - \definefontsynonym[Kurier-HeavyItalic] [kurierhi] - \stoptypescript - - \starttypescript [sans] [kurier-light] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Kurier-Light-Regular] - \definefontsynonym [SansItalic] [Kurier-Light-Italic] - \definefontsynonym [SansBold] [Kurier-Medium-Regular] - \definefontsynonym [SansBoldItalic] [Kurier-Medium-Italic] - \stoptypescript - - \starttypescript [sans] [kurier] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Kurier-Regular] - \definefontsynonym [SansItalic] [Kurier-Italic] - \definefontsynonym [SansBold] [Kurier-Bold] - \definefontsynonym [SansBoldItalic] [Kurier-BoldItalic] - \stoptypescript - - \starttypescript [sans] [kurier-medium] [name] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [Kurier-Medium-Regular] - \definefontsynonym [SansItalic] [Kurier-Medium-Italic] - \definefontsynonym [SansBold] [Kurier-Heavy-Regular] - \definefontsynonym [SansBoldItalic] [Kurier-Heavy-Italic] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[symbols] - - \starttypescript - \definefontsynonym [ZapfDingbats] [\s!file:uzdr][goodies=dingbats] - \definefontsynonym [RalfSmithFormalScript] [rsfs10] - \definefontsynonym [MartinVogel] [\s!file:marvosym.ttf] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[charter] - - \starttypescript [serif] [charter] - \definefontsynonym [Charter-Roman] [\s!name:CharterBT-Roman] - \definefontsynonym [Charter-Italic] [\s!name:CharterBT-Italic] - \definefontsynonym [Charter-Bold] [\s!name:CharterBT-Bold] - \definefontsynonym [Charter-BoldItalic] [\s!name:CharterBT-BoldItalic] - \definefontsynonym [Charter-Slanted] [\s!name:CharterBT-Italic] - \definefontsynonym [Charter-BoldSlanted] [\s!name:CharterBT-BoldItalic] - \definefontsynonym [Charter-Roman-Caps] [Charter-Roman] - \stoptypescript - - \starttypescript [serif] [charter] [name] - \definefontsynonym [Serif] [Charter-Roman] - \definefontsynonym [SerifItalic] [Charter-Italic] - \definefontsynonym [SerifBold] [Charter-Bold] - \definefontsynonym [SerifBoldItalic] [Charter-BoldItalic] - \definefontsynonym [SerifSlanted] [Charter-Slanted] - \definefontsynonym [SerifBoldSlanted] [Charter-BoldSlanted] - \definefontsynonym [SerifCaps] [Charter-Roman-Caps] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[mathtimes] - - \starttypescript [math] [mathtimes] [all] - \loadfontgoodies[mathtimes-math] - \definefontsynonym[MathRoman][mathtimes@mathtimes-math] - \stoptypescript - - \starttypescript [mathtimes] - \definetypeface [mathtimes] [rm] [serif] [times] [default] - \definetypeface [mathtimes] [ss] [sans] [helvetica] [default] [rscale=0.9] - \definetypeface [mathtimes] [tt] [mono] [modern] [default] [rscale=1.05] - \definetypeface [mathtimes] [mm] [math] [mathtimes] [default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[lucida] - - \starttypescript [serif] [lucida] - \definefontsynonym [LucidaBright] [\s!name:LucidaBright] - \definefontsynonym [LucidaBright-Demi] [\s!name:LucidaBright-Demi] - \definefontsynonym [LucidaBright-Italic] [\s!name:LucidaBright-Italic] - \definefontsynonym [LucidaBright-DemiItalic] [\s!name:LucidaBright-DemiItalic] - \definefontsynonym [LucidaBright-Oblique] [\s!name:LucidaBright-Oblique] - \definefontsynonym [LucidaBrightSmallcaps] [\s!name:LucidaBrightSmallcaps] - \definefontsynonym [LucidaBrightSmallcaps-Demi] [\s!name:LucidaBrightSmallcaps-Demi] - \stoptypescript - - \starttypescript [sans] [lucida] - \definefontsynonym [LucidaSans] [\s!name:LucidaSans] - \definefontsynonym [LucidaSans-Demi] [\s!name:LucidaSans-Demi] - \definefontsynonym [LucidaSans-Bold] [\s!name:LucidaSans-Bold] - \definefontsynonym [LucidaSans-Italic] [\s!name:LucidaSans-Italic] - \definefontsynonym [LucidaSans-DemiItalic] [\s!name:LucidaSans-DemiItalic] - \definefontsynonym [LucidaSans-BoldItalic] [\s!name:LucidaSans-BoldItalic] - \stoptypescript - - \starttypescript [mono] [lucida] - \definefontsynonym [LucidaTypewriter] [\s!name:LucidaTypewriter] - \definefontsynonym [LucidaTypewriterBold] [\s!name:LucidaTypewriterBold] - \definefontsynonym [LucidaTypewriterOblique] [\s!name:LucidaTypewriterOblique] - \definefontsynonym [LucidaTypewriterBoldOblique] [\s!name:LucidaTypewriterBoldOblique] - \stoptypescript - - \starttypescript [mono] [lucida] - \definefontsynonym [LucidaSans-Typewriter] [\s!name:LucidaSans-Typewriter] - \definefontsynonym [LucidaSans-TypewriterBold] [\s!name:LucidaSans-TypewriterBold] - \definefontsynonym [LucidaSans-TypewriterOblique] [\s!name:LucidaSans-TypewriterOblique] - \definefontsynonym [LucidaSans-TypewriterBoldOblique] [\s!name:LucidaSans-TypewriterBoldOblique] - \stoptypescript - - \starttypescript [calligraphy] [lucida] - \definefontsynonym [LucidaCalligraphy-Italic] [\s!name:LucidaCalligraphy-Italic] - \stoptypescript - - \starttypescript [casual] [lucida] - \definefontsynonym [LucidaCasual] [\s!name:LucidaCasual] - \definefontsynonym [LucidaCasual-Italic] [\s!name:LucidaCasual-Italic] - \stoptypescript - - \starttypescript [handwriting] [lucida] - \definefontsynonym [LucidaHandwriting-Italic] [\s!name:LucidaHandwriting-Italic] - \stoptypescript - - \starttypescript [fax] [lucida] - \definefontsynonym [LucidaFax] [\s!name:LucidaFax] - \definefontsynonym [LucidaFax-Demi] [\s!name:LucidaFax-Demi] - \definefontsynonym [LucidaFax-Italic] [\s!name:LucidaFax-Italic] - \definefontsynonym [LucidaFax-DemiItalic] [\s!name:LucidaFax-DemiItalic] - \stoptypescript - - \starttypescript [blackletter] [lucida] - \definefontsynonym [LucidaBlackletter] [\s!name:LucidaBlackletter] - \stoptypescript - - \starttypescript [math] [lucida] - \loadfontgoodies[lucida-math] - \definefontsynonym[MathRoman][lucidamath@lucida-math] - \stoptypescript - - \starttypescript [serif] [lucida] [name] - \definefontsynonym [Serif] [LucidaBright] - \definefontsynonym [SerifBold] [LucidaBright-Demi] - \definefontsynonym [SerifItalic] [LucidaBright-Italic] - \definefontsynonym [SerifBoldItalic] [LucidaBright-DemiItalic] - \definefontsynonym [SerifSlanted] [LucidaBright-Oblique] - \definefontsynonym [SerifBoldSlanted] [LucidaBright-DemiItalic] - \definefontsynonym [SerifCaps] [LucidaBrightSmallcaps] - \definefontsynonym [SerifBoldCaps] [LucidaBrightSmallcaps-Demi] - \stoptypescript - - % Lucida Bright Sans - - \starttypescript [sans] [lucida] [name] - \definefontsynonym [Sans] [LucidaSans] - \definefontsynonym [SansBold] [LucidaSans-Demi] - \definefontsynonym [SansItalic] [LucidaSans-Italic] - \definefontsynonym [SansBoldItalic] [LucidaSans-DemiItalic] - \definefontsynonym [SansSlanted] [LucidaSans-Italic] - \definefontsynonym [SansBoldSlanted] [LucidaSans-DemiItalic] - \definefontsynonym [SansCaps] [LucidaSans] - \stoptypescript - - % Lucida Bright Sans Typewriter - - \starttypescript [mono] [lucida] [name] - \definefontsynonym [Mono] [LucidaSans-Typewriter] - \definefontsynonym [MonoBold] [LucidaSans-TypewriterBold] - \definefontsynonym [MonoItalic] [LucidaSans-TypewriterOblique] - \definefontsynonym [MonoBoldItalic] [LucidaSans-TypewriterBoldOblique] - \definefontsynonym [MonoSlanted] [LucidaSans-TypewriterOblique] - \definefontsynonym [MonoBoldSlanted] [LucidaSans-TypewriterBoldOblique] - \definefontsynonym [MonoCaps] [LucidaSans-Typewriter] - \stoptypescript - - % Lucida Calligraphy - - \starttypescript [calligraphy] [lucida] [name] - \definefontsynonym [Calligraphy] [LucidaCalligraphy-Italic] - \stoptypescript - - % Lucida Handwriting - - \starttypescript [handwriting] [lucida] [name] - \definefontsynonym [Handwriting] [LucidaHandwriting-Italic] - \stoptypescript - - \starttypescript [lucida] - \definetypeface [lucida] [rm] [\s!serif] [lucida] [\s!default] [\s!features=\s!default] - \definetypeface [lucida] [ss] [\s!sans] [lucida] [\s!default] [\s!features=\s!default] - \definetypeface [lucida] [tt] [\s!mono] [lucida] [\s!default] [\s!features=\s!none] - \definetypeface [lucida] [hw] [\s!handwriting] [lucida] [\s!default] [\s!features=\s!default] - \definetypeface [lucida] [cg] [\s!calligraphy] [lucida] [\s!default] [\s!features=\s!default] - \definetypeface [lucida] [mm] [\s!math] [lucida] [\s!default] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection [mathdesign] - - \starttypescript [math] [charter,mathdesignch] [all] - \loadfontgoodies[charter-math] - \definefontsynonym[MathRoman][chartermath@charter-math] - \stoptypescript - - \starttypescript [math] [garamond,mathdesigngm] [all] - \loadfontgoodies[garamond-math] - \definefontsynonym[MathRoman][garamondmath@garamond-math] - \stoptypescript - - \starttypescript [math] [utopia,mathdesignut] [all] - \loadfontgoodies[utopia-math] - \definefontsynonym[MathRoman][utopiamath@utopia-math] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection [asanamath] - - \starttypescript [math] [asana] - \definefontsynonym [AsanaMath] [\s!name:asanamath] - \stoptypescript - - \starttypescript [math] [asana] [name] - \loadfontgoodies[asana-math] - \definefontsynonym [MathRoman] [AsanaMath] [\s!features=\s!math\mathsizesuffix,\s!goodies=asana-math] - \stoptypescript - - \starttypescript[asana] - \definetypeface [\typescriptone] [rm] [\s!serif] [palatino] [\s!default] - \definetypeface [\typescriptone] [ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.075] - \definetypeface [\typescriptone] [tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.075] - \definetypeface [\typescriptone] [mm] [\s!math] [\typescriptone] [\s!default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[cleartype] - - % microsoft: cambria.ttc cambriab.ttf cambriai.ttf cambriaz.ttf - % ascender : cambmath.ttf cambria.ttf cambriab.ttf cambriai.ttf cambriaz.ttf - - \starttypescript [math,serif] [cambria,cambria-x,cambria-y] - % whatever matches - \definefontsynonym [CambriaMath] [\s!name:cambriamath] - \definefontsynonym [CambriaSerif] [\s!name:cambria] - \stoptypescript - \starttypescript [math,serif] [cambria-m] - % microsoft cabria - \definefontsynonym [CambriaMath] [\s!file:cambria.ttc(Cambria Math)] - \definefontsynonym [CambriaSerif] [\s!file:cambria.ttc(Cambria)] - \stoptypescript - \starttypescript [math,serif] [cambria-a] - % ascender cambria - \definefontsynonym [CambriaMath] [\s!file:cambmath.ttf] - \definefontsynonym [CambriaSerif] [\s!file:cambria.ttf] - \stoptypescript - - % We load a goodies file that will apply a patch to the font. As a demonstration - % we apply the patch when caching as as when scaling which is why we also specify - % the goodies file with the name. - - \starttypescript [math] [cambria,cambria-m,cambria-a] [name] - \loadfontgoodies[cambria-math] - \definefontsynonym [MathRoman] [CambriaMath] [\s!features=\s!math\mathsizesuffix,\s!goodies=cambria-math] - \stoptypescript - \starttypescript [math] [cambria-x] [name] - \loadfontgoodies[cambria-math] - \definefontsynonym [MathRoman] [CambriaMath] [\s!features=\s!math,\s!goodies=cambria-math] - \stoptypescript - \starttypescript [math] [cambria-y] [name] - \loadfontgoodies[cambria-math] - \definefontsynonym [MathRoman] [CambriaMath] [\s!features=\s!math-nostack\mathsizesuffix,\s!goodies=cambria-math] - \stoptypescript - - \starttypescript [serif] [cambria,cambria-m,cambria-a] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [CambriaSerif] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!name:cambriabold] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!name:cambriaitalic] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!name:cambriabolditalic] [\s!features=\s!default] - \stoptypescript - - \starttypescript [cambria,cambria-m,cambria-a] - % any - \definetypeface [cambria] [rm] [\s!serif] [\typescriptone] [\s!default] - \definetypeface [cambria] [tt] [\s!mono] [modern] [\s!default] - \definetypeface [cambria] [mm] [\s!math] [\typescriptone] [\s!default] - \stoptypescript - \starttypescript [cambria-x,cambria-y] - % test x - \definetypeface [\typescriptone] [rm] [\s!serif] [cambria] [\s!default] - \definetypeface [\typescriptone] [tt] [\s!mono] [modern] [\s!default] - \definetypeface [\typescriptone] [mm] [\s!math] [\typescriptone] [\s!default] - \stoptypescript - - \starttypescript [sans] [candara] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:candara] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:candarab] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:candarai] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:candaraz] [\s!features=\s!default] - \stoptypescript - - \starttypescript [mono] [consolas] [name] - \setups[\s!font:\s!fallback:\s!mono] - \definefontsynonym [\s!Mono] [\s!file:consola] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!file:consolab] [\s!features=\s!none] - \definefontsynonym [\s!MonoItalic] [\s!file:consolai] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] [\s!features=\s!none] - \stoptypescript - - \starttypescript [serif] [constantia] [name] - \setups[\s!font:\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!file:constan] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:constanb] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:constani] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:constanz] [\s!features=\s!default] - \stoptypescript - - \starttypescript [sans] [corbel] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:corbel] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:corbelb] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:corbeli] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:corbelz] [\s!features=\s!default] - \stoptypescript - - \starttypescript [sans] [calibri] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:calibri] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:calibrib] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:calibrii] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:calibriz] [\s!features=\s!default] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[mscore] - - % .ttf not really needed but we want to force the originals - - \starttypescript [serif] [mscoretimes] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!file:times.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:timesbd.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:timesi.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:timesbi.ttf] [\s!features=\s!default] - \stoptypescript - - \starttypescript [sans] [mscorearial] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:arial.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:arialbd.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:ariali.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:arialbi.ttf] [\s!features=\s!default] - \stoptypescript - - \starttypescript [mono] [mscorecourier] [name] - \setups[\s!font:\s!fallback:\s!mono] - \definefontsynonym [\s!Mono] [\s!file:cour.ttf] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!file:courbd.ttf] [\s!features=\s!none] - \definefontsynonym [\s!MonoItalic] [\s!file:couri.ttf] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldItalic] [\s!file:courbi.ttf] [\s!features=\s!none] - \stoptypescript - - \starttypescript [sans] [mscoreverdana] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:verdana.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:verdanab.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:verdanai.ttf] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:verdanaz.ttf] [\s!features=\s!default] - \stoptypescript - - \starttypescript[mscore] - \definetypeface [mscore] [rm] [serif] [mscoretimes] [default] - \definetypeface [mscore] [ss] [sans] [mscorearial] [default] [\s!rscale=0.860] - \definetypeface [mscore] [tt] [mono] [mscorecourier] [default] [\s!rscale=1.065] - \definetypeface [mscore] [mm] [math] [times] [default] [\s!rscale=1.020] - \stoptypescript - - % \starttypescript[mscoress] - % \definetypeface [mscoress] [ss] [sans] [mscorearial] [default] - % \definetypeface [mscoress] [rm] [serif] [mscoretimes] [default] [rscale=1.160] - % \definetypeface [mscoress] [tt] [mono] [mscorecourier] [default] [rscale=1.240] - % \definetypeface [mscoress] [mm] [math] [times] [default] [rscale=1.185] - % \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[liberation] - - \starttypescript [serif] [liberation] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!file:liberationserif-regular] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:liberationserif-bold] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:liberationserif-italic] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:liberationserif-bolditalic] [\s!features=\s!default] - \stoptypescript - - \starttypescript [sans] [liberation] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:liberationsans-regular] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:liberationsans-bold] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:liberationsans-italic] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:liberationsans-bolditalic] [\s!features=\s!default] - \stoptypescript - - \starttypescript [mono] [liberation] [name] - \setups[\s!font:\s!fallback:\s!mono] - \definefontsynonym [\s!Mono] [\s!file:liberationmono-regular] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!file:liberationmono-bold] [\s!features=\s!none] - \definefontsynonym [\s!MonoItalic] [\s!file:liberationmono-italic] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldItalic] [\s!file:liberationmono-bolditalic] [\s!features=\s!none] - \stoptypescript - - \starttypescript[liberation] - \definetypeface [liberation] [rm] [serif] [liberation] [default] - \definetypeface [liberation] [ss] [sans] [liberation] [default] [\s!rscale=0.870] - \definetypeface [liberation] [tt] [mono] [liberation] [default] [\s!rscale=0.870] - \definetypeface [liberation] [mm] [math] [times] [default] [\s!rscale=1.040] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[libertine] - - \starttypescript [serif] [libertine] - \definefontsynonym [Libertine-Regular] [\s!file:linlibertiner] - \definefontsynonym [Libertine-Italic] [\s!file:linlibertineri] - \definefontsynonym [Libertine-Slanted] [\s!file:linlibertinearl] - \definefontsynonym [Libertine-Bold] [\s!file:linlibertinerb] - \definefontsynonym [Libertine-BoldItalic] [\s!file:linlibertinerbi] - \definefontsynonym [Libertine-BoldSlanted] [\s!file:linlibertineabl] - \stoptypescript - - \starttypescript [serif] [libertine] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [Libertine-Regular] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [Libertine-Italic] [\s!features=\s!default] - \definefontsynonym [\s!SerifSlanted] [Libertine-Slanted] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [Libertine-Bold] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [Libertine-BoldItalic] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldSlanted] [Libertine-BoldSlanted] [\s!features=\s!default] - \definefontsynonym [\s!SerifCaps] [Libertine-Regular] [\s!features=\s!smallcaps] - \stoptypescript - - \starttypescript [sans] [biolinum] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [Biolinum-Regular] [\s!file:linbiolinumr] - \definefontsynonym [Biolinum-Bold] [\s!file:linbiolinumrb] - \definefontsynonym [Biolinum-Italic] [\s!file:linbiolinumri] - \definefontsynonym [Biolinum-Slanted] [\s!file:linbiolinumarl] - \definefontsynonym [Biolinum-BoldSlanted] [\s!file:linbiolinumabl] - \stoptypescript - - \starttypescript [sans] [biolinum] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Biolinum-Regular] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [Biolinum-Bold] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [Biolinum-Italic] [\s!features=\s!default] - \definefontsynonym [\s!SansSlanted] [Biolinum-Slanted] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [Biolinum-BoldSlanted] [\s!features=\s!default] - \definefontsynonym [\s!SansCaps] [Biolinum-Regular] [\s!features=\s!smallcaps] - \stoptypescript - - \starttypescript [libertine] - \definetypeface [libertine] [rm] [serif] [libertine] [default] - \definetypeface [libertine] [ss] [sans] [biolinum] [default] - \definetypeface [libertine] [tt] [mono] [default] [default] - %definetypeface [libertine] [mm] [math] [times] [default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[inconsolata] - - \starttypescript [mono] [inconsolata] - \definefontsynonym [Inconsolata] [\s!file:inconsolata.otf] - \stoptypescript - - \starttypescript [mono] [inconsolata] [name] - \setups[\s!font:\s!fallback:\s!mono] - \definefontsynonym [\s!Mono] [Inconsolata] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[postscript] - - \starttypescript [postscript] - \definetypeface [postscript] [rm] [\s!serif] [times] [\s!default] - \definetypeface [postscript] [ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9] - \definetypeface [postscript] [tt] [\s!mono] [courier] [\s!default] [\s!rscale=1.1] - \definetypeface [postscript] [mm] [\s!math] [times] [\s!default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[pagella-euler] - - \starttypescript [math] [euler] - \definefontsynonym [EulerMath] [\s!file:euler.otf] - \stoptypescript - - \starttypescript [math] [euler] [name] - % \definefontsynonym [MathRoman] [EulerMath] [\s!features=\s!math] - \definefontsynonym [MathRoman] [EulerMath] [\s!features=\s!math\mathsizesuffix] - \stoptypescript - - \starttypescript [pagella-euler] - \definetypeface [\typescriptone] [rm] [\s!serif] [pagella] [\s!default] - % \definetypeface [\typescriptone] [ss] [\s!sans] [pagella] [\s!default] - \definetypeface [\typescriptone] [tt] [\s!mono] [modern] [\s!default] - \definetypeface [\typescriptone] [mm] [\s!math] [euler] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [serif] [euler] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [Serif] [\s!file:euler.otf] [\s!features=\s!default] - \stoptypescript - - \starttypescript [euler] - \definetypeface [euler] [rm] [\s!serif] [euler] [\s!default] - \definetypeface [euler] [tt] [\s!mono] [modern] [\s!default] - \definetypeface [euler] [mm] [\s!math] [euler] [\s!default] - \quittypescriptscanning - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[stix] - -% % This typescript is only provided to keep an eye on developments of this font -% % but currenty these are not proper opentype math fonts (for instance they have -% % no math table yet). We will not make a virtual font for this as eventually -% % there will be a decent version. Beware, we force an otf suffix as there happen -% % to be ttf files as well. BTW, why 'italic' infull and 'bol' without 'd'? -% -% % As xits keeps evolving and also is bidirectional, it makes no sense to keep -% % stix support around. It might disappear. So, just for testing: - - \starttypescript [math] [stix] [name] - \definefontsynonym[MathRoman][\s!file:stixgeneral.otf] [\s!features=\s!math] - \stoptypescript - - \starttypescript [serif] [stix] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym[\s!Serif] [\s!file:stix-regular.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifBold] [\s!file:stix-bold.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifItalic] [\s!file:stix-italic.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifBoldItalic][\s!file:stix-bolditalic.otf][\s!features=\s!default] - \stoptypescript - - \starttypescript[stix] - \definetypeface [stix] [rm] [\s!serif] [stix] [\s!default] - \definetypeface [stix] [mm] [\s!math] [stix] [\s!default] - \stoptypescript - -\stoptypescriptcollection - -% This one makes more sense. Xits uses the glyph collection from stix but packages -% it in a proper OpenType Math font. From the Stix site: Version 1.1, which will -% include fonts packaged for use with Microsoft Office applications, is scheduled -% for release by the end of 2010. Version 1.2, which will include Type 1 fonts for -% use with LaTeX, will follow in 2011. So, we are on our own anyway. - -\starttypescriptcollection[xits] - - \starttypescript [math] [xits,xitsbidi] [name] - \loadfontgoodies[xits-math] - \definefontsynonym[MathRoman] [\s!file:xits-math.otf][\s!features=\s!math\mathsizesuffix,\s!goodies=xits-math] - \definefontsynonym[MathRomanL2R][\s!file:xits-math.otf][\s!features=\s!math\mathsizesuffix-l2r,\s!goodies=xits-math] - \definefontsynonym[MathRomanR2L][\s!file:xits-math.otf][\s!features=\s!math\mathsizesuffix-r2l,\s!goodies=xits-math] - \stoptypescript - - \starttypescript [serif] [xits] [name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym[\s!Serif] [\s!file:xits-regular.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifBold] [\s!file:xits-bold.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifItalic] [\s!file:xits-italic.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifBoldItalic][\s!file:xits-bolditalic.otf] [\s!features=\s!default] - \stoptypescript - - \starttypescript[xits] - \definetypeface [xits] [rm] [\s!serif] [xits] [\s!default] - \definetypeface [xits] [ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9] - \definetypeface [xits] [tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] - \definetypeface [xits] [mm] [\s!math] [xits] [\s!default] - \stoptypescript - - % for the moment - - \starttypescript[xitsbidi] - \definetypeface [xitsbidi] [rm] [\s!serif] [xits] [\s!default] - \definetypeface [xitsbidi] [ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9] - \definetypeface [xitsbidi] [tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05] - %definetypeface [xitsbidi] [mm] [\s!math] [xitsbidi] [bidi] [\s!direction=\s!both] - \definetypeface [xitsbidi] [mm] [\s!math] [xitsbidi] [\s!default] [\s!direction=\s!both] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[punk] - - \definefontfeature [punknova] [mode=node,script=latn,rand=yes,kern=yes,liga=yes,tlig=yes] - % \definefontfeature [punknova-slanted] [punknova] [slant=.25] % obsolete as we now have all - - \starttypescript [serif] [punknova] - \definefontsynonym [Serif] [\s!file:punknova-regular] [\s!features=punknova] - \definefontsynonym [SerifSlanted] [\s!file:punknova-slanted] [\s!features=punknova] - \definefontsynonym [SerifBold] [\s!file:punknova-bold] [\s!features=punknova] - \definefontsynonym [SerifBoldSlanted][\s!file:punknova-boldslanted] [\s!features=punknova] - \definefontsynonym [SerifItalic] [SerifSlanted] - \definefontsynonym [SerifBoldItalic] [SerifBoldSlanted] - \stoptypescript - - % \definefontfeature [slanted-25] [slant=.25] - % \starttypescript [serif] [punknova] - % \definefontsynonym [SerifSlanted] [\s!file:punknova-regular] [\s!features={punknova,slanted-25}] - % \stoptypescript - - \starttypescript [punknova] - \definetypeface [punknova] [rm] [serif] [punknova] [default] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[hvmath] - - \starttypescript [math] [hvmath] - \definefontsynonym[MathRoman][hvmath@hvmath-math] - \loadfontgoodies[hvmath-math] - \stoptypescript - - \starttypescript [hvmath] - \definetypeface [hvmath] [ss] [sans] [heros] [default] [rscale=0.9] - \definetypeface [hvmath] [rm] [serif] [termes] [default] - \definetypeface [hvmath] [tt] [mono] [cursor] [default] [rscale=1.05] - \definetypeface [hvmath] [mm] [math] [hvmath] [default] - \stoptypescript - -\stoptypescriptcollection - -\starttypescriptcollection[computer-modern-unicode] - - \starttypescript [serif,sans,mono] [computer-modern-unicode] - \definefontsynonym [\s!Serif] [\s!file:cmunrm] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:cmunti] [\s!features=\s!default] - \definefontsynonym [\s!SerifSlanted] [\s!file:cmunsl] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:cmunbx] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunbi] [\s!features=\s!default] - \definefontsynonym [\s!Sans] [\s!file:cmunss] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:cmunsi] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:cmunsx] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:cmunso] [\s!features=\s!default] - \definefontsynonym [\s!Mono] [\s!file:cmuntt] [\s!features=\s!none] - \definefontsynonym [\s!MonoItalic] [\s!file:cmunit] [\s!features=\s!none] - \definefontsynonym [\s!MonoSlanted] [\s!file:cmunst] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!file:cmuntb] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldItalic] [\s!file:cmuntx] [\s!features=\s!none] - \stoptypescript - - \starttypescript [serif] [computer-modern-unicode-concrete] - \definefontsynonym [\s!Serif] [\s!file:cmunorm] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:cmunoti] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:cmunobx] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunobi] [\s!features=\s!default] - \stoptypescript - - \starttypescript[computer-modern-unicode] - \definetypeface[computer-modern-unicode][rm][\s!serif][computer-modern-unicode][\s!default] - \definetypeface[computer-modern-unicode][ss][\s!sans] [computer-modern-unicode][\s!default] - \definetypeface[computer-modern-unicode][tt][\s!mono] [computer-modern-unicode][\s!default] - \definetypeface[computer-modern-unicode][mm][\s!math] [modern] [\s!default] - \stoptypescript - -\stoptypescriptcollection +%D \starttyping +%D \setupfontsynonym [LMRoman10-DemiOblique] [features=default] +%D \definefontsynonym [LMRoman10-DemiOblique] [\s!name:LMRoman10-DemiOblique] [features=default] +%D \definefontsynonym [LMRoman10-DemiOblique] [lmroman10-demioblique] [features=default] +%D \stoptyping +%D +%D This file is no longer used. When going from \MKII\ to \MKIV\ quite some typescripts +%D were collected here but now they are nicely distributed over files and a semi-automatic +%D loaded takes care of finding the right ones. This also benefits for instance alternative +%D loaders (like simplefonts). \endinput diff --git a/tex/context/base/type-set.mkiv b/tex/context/base/type-set.mkiv index 2cb82ae9e..932771a61 100644 --- a/tex/context/base/type-set.mkiv +++ b/tex/context/base/type-set.mkiv @@ -13,11 +13,65 @@ \unprotect -\loadmarkfile{type-def} % preloaded -\loadmarkfile{type-lua} % preloaded -\loadmarkfile{type-siz} % preloaded +\ifnum\typescriptstate=\plustwo -\usetypescriptfile[otf] % runtime -\usetypescriptfile[loc] % runtime + % store + + \loadmarkfile{type-def} + \loadmarkfile{type-lua} + \loadmarkfile{type-siz} + + % \loadtypescriptfile[def] % meant for local usage only + % \loadtypescriptfile[lua] % meant for local usage only + % \loadtypescriptfile[siz] % meant for local usage only + + \loadmarkfile{type-imp-latinmodern} + % \usetypescriptfile[latinmodern] + \usetypescriptfile[loc] + +\else + + \usetypescriptfile[def] + \usetypescriptfile[lua] + \usetypescriptfile[siz] + \usetypescriptfile[otf] + \usetypescriptfile[loc] + +\fi + +\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv] +\definefilesynonym [type-imp-lucidanova.mkiv] [type-imp-lucida-opentype.mkiv] +\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida-opentype.mkiv] + +\definefilesynonym [type-imp-palatino.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-courier.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-avantgarde.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-helvetica.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-chancery.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-bookman.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-schoolbook.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-times.mkiv] [type-imp-texgyre.mkiv] + +\definefilesynonym [type-imp-cursor.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-adventor.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-heros.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-chorus.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-bonum.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-schola.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-pagella.mkiv] [type-imp-texgyre.mkiv] +\definefilesynonym [type-imp-termes.mkiv] [type-imp-texgyre.mkiv] + +\definefilesynonym [type-imp-mscoretimes] [type-imp-mscore.mkiv] +\definefilesynonym [type-imp-mscorearial] [type-imp-mscore.mkiv] +\definefilesynonym [type-imp-mscorecourier] [type-imp-mscore.mkiv] +\definefilesynonym [type-imp-mscoreverdana] [type-imp-mscore.mkiv] + +\definefilesynonym [type-imp-candara] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-consolas] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-constantia] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-corbel] [type-imp-cleartype.mkiv] +\definefilesynonym [type-imp-calibri] [type-imp-cleartype.mkiv] + +\definefilesynonym [type-imp-antykwa-poltawskiego] [type-imp-antykwapoltawskiego.mkiv] \protect \endinput diff --git a/tex/context/base/type-siz.mkiv b/tex/context/base/type-siz.mkiv index 4e9b2b9c3..d4c90b182 100644 --- a/tex/context/base/type-siz.mkiv +++ b/tex/context/base/type-siz.mkiv @@ -166,243 +166,4 @@ \stoptypescriptcollection -% This can become type-lmr - -\starttypescriptcollection[size-mkiv] - -\definesystemconstant{LMRoman} -\definesystemconstant{LMSans} -\definesystemconstant{LMTypewriter} -\definesystemconstant{LMMathRoman} - -\starttypescript [\s!serif] [computer-modern] [\s!size] - - \definebodyfont [12pt] [\s!rm] - [tf=\s!LMRoman12-Regular, - bf=\s!LMRoman12-Bold, - it=\s!LMRoman12-Italic, - sl=\s!LMRoman12-Oblique, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [11pt] [\s!rm] - [tf=\s!LMRoman10-Regular sa 1, - bf=\s!LMRoman10-Bold sa 1, - it=\s!LMRoman10-Italic sa 1, - sl=\s!LMRoman10-Oblique sa 1, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [10pt] [\s!rm] - [tf=\s!LMRoman10-Regular, - bf=\s!LMRoman10-Bold, - it=\s!LMRoman10-Italic, - sl=\s!LMRoman10-Oblique, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [9pt] [\s!rm] - [tf=\s!LMRoman9-Regular, - bf=\s!LMRoman9-Bold, - it=\s!LMRoman9-Italic, - sl=\s!LMRoman9-Oblique, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [8pt] [\s!rm] - [tf=\s!LMRoman 8-Regular, - bf=\s!LMRoman 8-Bold, - it=\s!LMRoman 8-Italic, - sl=\s!LMRoman 8-Oblique, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [7pt] [\s!rm] - [tf=\s!LMRoman 7-Regular, - bf=\s!LMRoman 7-Bold, - it=\s!LMRoman 7-Italic sa 1, - sl=\s!LMRoman 8-Oblique sa 1, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [6pt] [\s!rm] - [tf=\s!LMRoman 6-Regular, - bf=\s!LMRoman 6-Bold, - it=\s!LMRoman 7-Italic sa 1, - sl=\s!LMRoman 8-Oblique sa 1, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [5pt] [\s!rm] - [tf=\s!LMRoman 5-Regular, - bf=\s!LMRoman 5-Bold, - it=\s!LMRoman 7-Italic sa 1, - sl=\s!LMRoman 8-Oblique sa 1, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [4pt] [\s!rm] - [tf=\s!LMRoman 5-Regular sa 1, - bf=\s!LMRoman 5-Bold sa 1, - it=\s!LMRoman 7-Italic sa 1, - sl=\s!LMRoman 8-Oblique sa 1, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - - \definebodyfont [14.4pt,17.3pt,20.7pt] [\s!rm] - [tf=\s!LMRoman12-Regular sa 1, - bf=\s!LMRoman12-Bold sa 1, - it=\s!LMRoman12-Italic sa 1, - sl=\s!LMRoman12-Oblique sa 1, - bi=\s!LMRoman10-BoldItalic sa 1, - bs=\s!LMRoman10-BoldOblique sa 1, - sc=\s!LMRoman10-CapsRegular sa 1] - -\stoptypescript - -\starttypescript [\s!sans] [computer-modern] [\s!size] - - \definebodyfont [12pt] [\s!ss] - [tf=\s!LMSans12-Regular, - bf=\s!LMSans10-Bold sa 1, - it=\s!LMSans12-Oblique, - sl=\s!LMSans12-Oblique, - bi=\s!LMSans10-BoldOblique sa 1, - bs=\s!LMSans10-BoldOblique sa 1, - sc=\s!LMSans12-Regular] - - \definebodyfont [11pt] [\s!ss] - [tf=\s!LMSans10-Regular sa 1, - bf=\s!LMSans10-Bold sa 1, - it=\s!LMSans10-Oblique sa 1, - sl=\s!LMSans10-Oblique sa 1, - bi=\s!LMSans10-BoldOblique sa 1, - bs=\s!LMSans10-BoldOblique sa 1, - sc=\s!LMSans10-Regular sa 1] - - \definebodyfont [10pt] [\s!ss] - [tf=\s!LMSans10-Regular, - bf=\s!LMSans10-Bold, - it=\s!LMSans10-Oblique, - sl=\s!LMSans10-Oblique, - bi=\s!LMSans10-BoldOblique, - bs=\s!LMSans10-BoldOblique, - sc=\s!LMSans10-Regular] - - \definebodyfont [9pt] [\s!ss] - [tf=\s!LMSans 9-Regular, - bf=\s!LMSans10-Bold sa 1, - it=\s!LMSans 9-Oblique sa 1, - sl=\s!LMSans 9-Oblique sa 1, - bi=\s!LMSans10-BoldOblique sa 1, - bs=\s!LMSans10-BoldOblique sa 1, - sc=\s!LMSans 9-Regular] - - \definebodyfont [8pt] [\s!ss] - [tf=\s!LMSans 8-Regular, - bf=\s!LMSans10-Bold sa 1, - it=\s!LMSans 8-Oblique, - sl=\s!LMSans 8-Oblique, - bi=\s!LMSans10-BoldOblique sa 1, - bs=\s!LMSans10-BoldOblique sa 1, - sc=\s!LMSans8-Regular] - - \definebodyfont [7pt,6pt,5pt,4pt] [\s!ss] - [tf=\s!LMSans 8-Regular sa 1, - bf=\s!LMSans10-Bold sa 1, - it=\s!LMSans 8-Oblique sa 1, - sl=\s!LMSans 8-Oblique sa 1, - bi=\s!LMSans10-BoldOblique sa 1, - bs=\s!LMSans10-BoldOblique sa 1, - sc=\s!LMSans 8-Regular sa 1] - - \definebodyfont [14.4pt,17.3pt,20.7pt] [\s!ss] - [tf=\s!LMSans12-Regular sa 1, - bf=\s!LMSans10-Bold sa 1, - it=\s!LMSans12-Oblique sa 1, - sl=\s!LMSans12-Oblique sa 1, - bi=\s!LMSans10-BoldOblique sa 1, - bs=\s!LMSans10-BoldOblique sa 1, - sc=\s!LMSans12-Regular sa 1] - -\stoptypescript - -\starttypescript [\s!mono] [computer-modern] [\s!size] - - \definebodyfont [12pt] [\s!tt] - [tf=\s!LMTypewriter12-Regular, - bf=\s!LMTypewriter10-Dark sa 1, - it=\s!LMTypewriter10-Italic sa 1, - sl=\s!LMTypewriter10-Oblique sa 1, - bi=\s!LMTypewriter10-DarkOblique sa 1, - bs=\s!LMTypewriter10-DarkOblique sa 1, - sc=\s!LMTypewriter10-CapsRegular sa 1] - - \definebodyfont [9pt] [\s!tt] - [tf=\s!LMTypewriter 9-Regular, - bf=\s!LMTypewriter10-Dark sa 1, - it=\s!LMTypewriter10-Italic sa 1, - sl=\s!LMTypewriter10-Oblique sa 1, - bi=\s!LMTypewriter10-DarkOblique sa 1, - bs=\s!LMTypewriter10-DarkOblique sa 1, - sc=\s!LMTypewriter10-CapsRegular sa 1] - - \definebodyfont [8pt] [\s!tt] - [tf=\s!LMTypewriter 8-Regular, - bf=\s!LMTypewriter10-Dark sa 1, - it=\s!LMTypewriter10-Italic sa 1, - sl=\s!LMTypewriter10-Oblique sa 1, - bi=\s!LMTypewriter10-DarkOblique sa 1, - bs=\s!LMTypewriter10-DarkOblique sa 1, - sc=\s!LMTypewriter10-CapsRegular sa 1] - - \definebodyfont [11pt,10pt,7pt,6pt,5pt,4pt] [\s!tt] - [tf=\s!LMTypewriter10-Regular sa 1, - bf=\s!LMTypewriter10-Dark sa 1, - it=\s!LMTypewriter10-Italic sa 1, - sl=\s!LMTypewriter10-Oblique sa 1, - bi=\s!LMTypewriter10-DarkOblique sa 1, - bs=\s!LMTypewriter10-DarkOblique sa 1, - sc=\s!LMTypewriter10-CapsRegular sa 1] - - \definebodyfont [14.4pt,17.3pt,20.7pt] [\s!tt] - [tf=\s!LMTypewriter12-Regular sa 1, - bf=\s!LMTypewriter10-Dark sa 1, - it=\s!LMTypewriter10-Italic sa 1, - sl=\s!LMTypewriter10-Oblique sa 1, - bi=\s!LMTypewriter10-DarkOblique sa 1, - bs=\s!LMTypewriter10-DarkOblique sa 1, - sc=\s!LMTypewriter10-CapsRegular sa 1] - -\stoptypescript - -\starttypescript [\s!math] [modern,computer-modern,latin-modern] [\s!size] - - \definebodyfont [12pt] [\s!mm] [mr=\s!LMMathRoman12-Regular sa 1,mb=\s!LMMathRoman12-Regular sa 1] - \definebodyfont [11pt] [\s!mm] [mr=\s!LMMathRoman10-Regular sa 1,mb=\s!LMMathRoman10-Regular sa 1] - \definebodyfont [10pt] [\s!mm] [mr=\s!LMMathRoman10-Regular sa 1,mb=\s!LMMathRoman10-Regular sa 1] - \definebodyfont [9pt] [\s!mm] [mr=\s!LMMathRoman 9-Regular sa 1,mb=\s!LMMathRoman 9-Regular sa 1] - \definebodyfont [8pt] [\s!mm] [mr=\s!LMMathRoman 8-Regular sa 1,mb=\s!LMMathRoman 8-Regular sa 1] - \definebodyfont [7pt] [\s!mm] [mr=\s!LMMathRoman 7-Regular sa 1,mb=\s!LMMathRoman 7-Regular sa 1] - \definebodyfont [6pt] [\s!mm] [mr=\s!LMMathRoman 6-Regular sa 1,mb=\s!LMMathRoman 6-Regular sa 1] - \definebodyfont [5pt] [\s!mm] [mr=\s!LMMathRoman 5-Regular sa 1,mb=\s!LMMathRoman 5-Regular sa 1] - \definebodyfont [4pt] [\s!mm] [mr=\s!LMMathRoman 5-Regular sa 1,mb=\s!LMMathRoman 5-Regular sa 1] - - \definebodyfont [14.4pt,17.3pt,20.7pt] [\s!mm] - [mr=\s!LMMathRoman12-Regular sa 1, - mb=\s!LMMathRoman12-Regular sa 1] - -\stoptypescript - -\stoptypescriptcollection - \protect \endinput diff --git a/tex/context/base/typo-prc.mkvi b/tex/context/base/typo-prc.mkvi index 9ad643fbb..eb56894e8 100644 --- a/tex/context/base/typo-prc.mkvi +++ b/tex/context/base/typo-prc.mkvi @@ -87,6 +87,6 @@ %D \applyprocessor{first}{hans} \applyprocessor{last}{hagen} %D \stopbuffer %D -%D \typebuffer \start \blank \getbuffer \blanl \stop +%D \typebuffer \start \blank \getbuffer \blank \stop \protect \endinput diff --git a/tex/context/base/typo-scr.mkiv b/tex/context/base/typo-scr.mkiv new file mode 100644 index 000000000..39f16537c --- /dev/null +++ b/tex/context/base/typo-scr.mkiv @@ -0,0 +1,104 @@ +%D \module +%D [ file=typo-scr, +%D version=2012.01.23, % very old ... 1995.10.10 .. moved from core-mis +%D title=\CONTEXT\ Typesetting Macros, +%D subtitle=Scripts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Typesetting Macros / Scripts} + +\unprotect + +%D I addition to the commands implemented here, we have alternative commands +%D \type {shiftup} and \type {shiftdown} that can work across paragraphs. + +%D \macros +%D {low, high, lohi, hilo} +%D +%D Although \TEX\ is pretty well aware of super- and subscripts, its mechanism +%D is mainly tuned for math mode. The next few commands take care of script +%D texts both modes. +%D +%D \startbuffer +%D The higher\high{one goes} the lower\low{one drops}, or\lohi{yes}{no}? +%D \stopbuffer +%D +%D \typebuffer +%D \getbuffer +%D +%D Note the different placement of \type {\lohi}, where we need a bit more +%D space. The implementation looks a bit fuzzy, since some \type {\fontdimen}'s +%D are involved to determine the optimal placement. + +% These might become parameters: \setupscripts but we need fo come up with +% nice keys. + +\def\highvfraction {0} +\def\lowvfraction {0} +\def\highlowvfraction{.1} +\def\highlowhfraction{.1} + +\unexpanded\def\low {\typo_scripts_high_low\lower\mathsubnormal{.48}\lowvfraction \t!sub} +\unexpanded\def\high{\typo_scripts_high_low\raise\mathsupnormal{.86}\highvfraction\t!sup} + +\def\typo_scripts_high_low#1#2#3#4#5#6% textscript mathscript fraction extra tag + {\dontleavehmode + \begingroup + \scratchdimen\dimexpr#3\exheight+#4\exheight\relax + \kern\highlowhfraction\exheight + \setbox\scratchbox\hbox{#1\scratchdimen\hbox + {\ifx\fontsize\empty\ifmmode\mr\else\tx\fi\else\tx\fi + \dostarttagged + #5\empty#6% + \dostoptagged}}% + \ht\scratchbox\strutheight + \dp\scratchbox\strutdepth + \box\scratchbox + \endgroup} + +%D You can provide an optional keyword \type {left}, in which case the super and +%D subscripts will be aligned in a way that permits placement at the left of a word +%D (which means that it will be right aligned). +%D +%D \startbuffer +%D \lohi{aha}{ah} test \lohi{aha}{ah} test +%D \lohi[left]{aha}{ah} test \lohi[left]{aha}{ah} test +%D \lohi{aha}{ah} test\lohi{aha}{ah} test +%D \lohi[left]{aha}{ah}test \lohi[left]{aha}{ah}test +%D \stopbuffer +%D +%D \typebuffer +%D \getbuffer + +\unexpanded\def\lohi{\dosingleempty\typo_scripts_lohi} +\unexpanded\def\hilo{\dosingleempty\typo_scripts_hilo} + +\def\typo_scripts_lohi[#1]#2#3% + {\dontleavehmode + \hbox + {\dostarttagged\t!subsup\empty + \setbox4\hbox{\typo_scripts_high_low\lower\mathsubnormal{.48}\highlowvfraction\t!sub{#2}}% + \setbox6\hbox{\typo_scripts_high_low\raise\mathsupnormal{.86}\highlowvfraction\t!sup{#3}}% + \doif{#1}{\v!left} + {\ifdim\wd4<\wd6 + \setbox4\hbox to \wd6{\hss\box4}% + \else + \setbox6\hbox to \wd4{\hss\box6}% + \fi}% + \ifdim\wd4<\wd6 + \wd4=\zeropoint\box4\box6 + \else + \wd6=\zeropoint\box6\box4 + \fi + \dostoptagged}} + +\def\typo_scripts_hilo[#1]#2#3% + {\typo_scripts_lohi[#1]{#3}{#2}} + +\unprotect \endinput diff --git a/tex/context/base/x-set-11.mkiv b/tex/context/base/x-set-11.mkiv index f55b63859..d7172a141 100644 --- a/tex/context/base/x-set-11.mkiv +++ b/tex/context/base/x-set-11.mkiv @@ -515,7 +515,7 @@ \doglobal\newcounter\currentSETUPargument %\blank[\v!line] % packed mode (we could do \startunpacked ...) \godown[.75\lineheight] - \switchtobodyfont[small] + \switchtobodyfont[\v!small] \ignorespaces\xmlfilter{#1}{/arguments/text()}\endgraf \egroup } diff --git a/tex/context/bib/backup/sample.bib b/tex/context/bib/backup-1/sample.bib index 3f8df623e..3f8df623e 100644 --- a/tex/context/bib/backup/sample.bib +++ b/tex/context/bib/backup-1/sample.bib diff --git a/tex/context/fonts/antykwapoltawskiego.lfg b/tex/context/fonts/antykwapoltawskiego.lfg index d5c902c6b..794b9f407 100644 --- a/tex/context/fonts/antykwapoltawskiego.lfg +++ b/tex/context/fonts/antykwapoltawskiego.lfg @@ -1,5 +1,5 @@ return { - name = "antykwapoltawskiego", + name = "antykwa-poltawskiego", version = "1.00", comment = "Goodies that complement Antykwa Poltawskiego, one of Mojca's favourites", author = "Hans & Mojca", diff --git a/tex/context/fonts/lm.lfg b/tex/context/fonts/lm.lfg new file mode 100644 index 000000000..0d082c051 --- /dev/null +++ b/tex/context/fonts/lm.lfg @@ -0,0 +1,192 @@ +return { + name = "latin modern", + version = "1.00", + comment = "Goodies that complement latin modern.", + author = "Hans Hagen", + copyright = "ConTeXt development team", + designsizes = { + ["LMMathRoman-Regular"] = { + ["4pt"] = "LMMath5-Regular@lmroman5-math", + ["5pt"] = "LMMath5-Regular@lmroman5-math", + ["6pt"] = "LMMath6-Regular@lmroman6-math", + ["7pt"] = "LMMath7-Regular@lmroman7-math", + ["8pt"] = "LMMath8-Regular@lmroman8-math", + ["9pt"] = "LMMath9-Regular@lmroman9-math", + ["10pt"] = "LMMath10-Regular@lmroman10-math", + ["11pt"] = "LMMath10-Regular@lmroman10-math", + ["12pt"] = "LMMath12-Regular@lmroman12-math", + default = "LMMath10-Regular@lmroman10-math" + }, + ["LMMathRoman-Bold"] = { -- not yet ready + ["4pt"] = "LMMath5-Regular@lmroman5-math", + ["5pt"] = "LMMath5-Regular@lmroman5-math", + ["6pt"] = "LMMath6-Regular@lmroman6-math", + ["7pt"] = "LMMath7-Regular@lmroman7-math", + ["8pt"] = "LMMath8-Regular@lmroman8-math", + ["9pt"] = "LMMath9-Regular@lmroman9-math", + ["10pt"] = "LMMath10-Regular@lmroman10-math", + ["11pt"] = "LMMath10-Regular@lmroman10-math", + ["12pt"] = "LMMath12-Regular@lmroman12-math", + default = "LMMath10-Regular@lmroman10-math" + }, + ["LMRoman-Regular"] = { + ["4pt"] = "file:lmroman5-regular", + ["5pt"] = "file:lmroman5-regular", + ["6pt"] = "file:lmroman6-regular", + ["7pt"] = "file:lmroman7-regular", + ["8pt"] = "file:lmroman8-regular", + ["9pt"] = "file:lmroman9-regular", + ["10pt"] = "file:lmroman10-regular", + ["11pt"] = "file:lmroman10-regular", + ["12pt"] = "file:lmroman12-regular", + default = "file:lmroman10-regular", + }, + ["LMRoman-Bold"] = { + ["4pt"] = "file:lmroman5-bold", + ["5pt"] = "file:lmroman5-bold", + ["6pt"] = "file:lmroman6-bold", + ["7pt"] = "file:lmroman7-bold", + ["8pt"] = "file:lmroman8-bold", + ["9pt"] = "file:lmroman9-bold", + ["10pt"] = "file:lmroman10-bold", + ["11pt"] = "file:lmroman10-bold", + ["12pt"] = "file:lmroman12-bold", + default = "file:lmroman10-bold", + }, + ["LMRoman-Demi"] = { + default = "file:lmromandemi10-regular", + }, + ["LMRoman-Italic"] = { + ["4pt"] = "file:lmroman7-italic", + ["5pt"] = "file:lmroman7-italic", + ["6pt"] = "file:lmroman7-italic", + ["7pt"] = "file:lmroman7-italic", + ["8pt"] = "file:lmroman8-italic", + ["9pt"] = "file:lmroman9-italic", + ["10pt"] = "file:lmroman10-italic", + ["11pt"] = "file:lmroman10-italic", + ["12pt"] = "file:lmroman12-italic", + default = "file:lmroman10-italic", + }, + ["LMRoman-Oblique"] = { + ["4pt"] = "file:lmromanslant8-regular", + ["5pt"] = "file:lmromanslant8-regular", + ["6pt"] = "file:lmromanslant8-regular", + ["7pt"] = "file:lmromanslant8-regular", + ["8pt"] = "file:lmromanslant8-regular", + ["9pt"] = "file:lmromanslant9-regular", + ["10pt"] = "file:lmromanslant10-regular", + ["11pt"] = "file:lmromanslant10-regular", + ["12pt"] = "file:lmromanslant12-regular", + default = "file:lmromanslant10-regular", + }, + ["LMRoman-BoldItalic"] = { + default = "file:lmroman10-bolditalic", + }, + ["LMRoman-BoldOblique"] = { + default = "file:lmromanslant10-bold", + }, + ["LMRoman-DemiOblique"] = { + default = "file:lmromandemi10-oblique", + }, + ["LMRoman-CapsRegular"] = { + default = "file:lmromancaps10-regular", + }, + ["LMRoman-CapsOblique"] = { + default = "file:lmromancaps10-oblique", + }, + ["LMRoman-Dunhill"] = { + default = "file:lmromandunh10-regular", + }, + ["LMRoman-DunhillOblique"] = { + default = "file:lmromandunh10-oblique", + }, + ["LMRoman-Unslanted"] = { + default = "file:lmromanunsl10-regular", + }, + ["LMSans-Regular"] = { + ["8pt"] = "file:lmsans8-regular", + ["9pt"] = "file:lmsans9-regular", + ["10pt"] = "file:lmsans10-regular", + ["11pt"] = "file:lmsans10-regular", + ["12pt"] = "file:lmsans12-regular", + default = "file:lmsans10-regular", + }, + ["LMSans-Oblique"] = { + ["8pt"] = "file:lmsans8-oblique", + ["9pt"] = "file:lmsans9-oblique", + ["10pt"] = "file:lmsans10-oblique", + ["11pt"] = "file:lmsans10-oblique", + ["12pt"] = "file:lmsans12-oblique", + default = "file:lmsans10-oblique", + }, + ["LMSans-Bold"] = { + default = "file:lmsans10-bold", + }, + ["LMSans-BoldOblique"] = { + default = "file:lmsans10-boldoblique", + }, + ["LMSans-DemiCondensed"] = { + default = "file:lmsansdemicond10-regular", + }, + ["LMSans-DemiCondensedOblique"] = { + default = "file:lmsansdemicond10-oblique", + }, + ["LMTypewriter-Regular"] = { + ["8pt"] = "file:lmmono8-regular", + ["9pt"] = "file:lmmono9-regular", + ["10pt"] = "file:lmmono10-regular", + ["11pt"] = "file:lmmono10-regular", + ["12pt"] = "file:lmmono12-regular", + default = "file:lmmono10-regular", + }, + ["LMTypewriter-Light"] = { + default = "file:lmmonolt10-regular", + }, + ["LMTypewriter-Dark"] = { + default = "file:lmmonolt10-bold", + }, + ["LMTypewriter-Italic"] = { + default = "file:lmmono10-italic", + }, + ["LMTypewriter-LightOblique"] = { + default = "file:lmmonolt10-oblique", + }, + ["LMTypewriter-Oblique"] = { + default = "file:lmmonoslant10-regular", + }, + ["LMTypewriter-DarkOblique"] = { + default = "file:lmmonolt10-boldoblique", + }, + ["LMTypewriter-LightCondensed"] = { + default = "file:lmmonoltcond10-regular", + }, + ["LMTypewriter-LightCondensedOblique"] = { + default = "file:lmmonoltcond10-oblique", + }, + ["LMTypewriterVarWd-Regular"] = { + default = "file:lmmonoproplt10-regular", + }, + ["LMTypewriterVarWd-Oblique"] = { + default = "file:lmmonoproplt10-oblique", + }, + ["LMTypewriterVarWd-Light"] = { + default = "file:lmmonoprop10-regular", + }, + ["LMTypewriterVarWd-LightOblique"] = { + default = "file:lmmonoprop10-oblique", + }, + ["LMTypewriterVarWd-Dark"] = { + default = "file:lmmonoproplt10-bold", + }, + ["LMTypewriterVarWd-DarkOblique"] = { + default = "file:lmmonoproplt10-boldoblique", + }, + ["LMTypewriter-CapsRegular"] = { + default = "file:lmmonocaps10-regular", + }, + ["LMTypewriter-CapsOblique"] = { + default = "file:lmmonocaps10-oblique", + }, + } +} diff --git a/tex/context/fonts/lucida-opentype-math.lfg b/tex/context/fonts/lucida-opentype-math.lfg new file mode 100644 index 000000000..38d54eee3 --- /dev/null +++ b/tex/context/fonts/lucida-opentype-math.lfg @@ -0,0 +1,12 @@ +return { + name = "lucida-opentype-math", + version = "1.00", + comment = "Goodies that complement lucida opentype.", + author = "Hans Hagen", + copyright = "ConTeXt development team", + mathematics = { + alternates = { + italic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Italic" }, + } + } +} diff --git a/tex/context/fonts/lucida-math.lfg b/tex/context/fonts/lucida-typeone-math.lfg index 82ba589cd..82ba589cd 100644 --- a/tex/context/fonts/lucida-math.lfg +++ b/tex/context/fonts/lucida-typeone-math.lfg diff --git a/tex/context/interface/keys-cs.xml b/tex/context/interface/keys-cs.xml index 17c1ee535..8561fb698 100644 --- a/tex/context/interface/keys-cs.xml +++ b/tex/context/interface/keys-cs.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='podtitulek'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index 457dfd73e..eb8faed5a 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='untertitel'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index 24ae37452..97f3ab0dc 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='subtitle'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index 356b83747..c83fcee1b 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='soustitre'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index b7bcdfeed..0d8f62ea9 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='sottotitolo'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index 5c0a70d60..638641a61 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='subtitel'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixscheider'/> + <cd:constant name='suffixstopper' value='suffixafsluiter'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-pe.xml b/tex/context/interface/keys-pe.xml index 3d9e0b2a2..64330dc06 100644 --- a/tex/context/interface/keys-pe.xml +++ b/tex/context/interface/keys-pe.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='زیرعنوان'/> <cd:constant name='suffix' value='پسوند'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index 8d4be42b6..0f2a6457d 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -989,6 +989,7 @@ <cd:constant name='subtitle' value='subtitlu'/> <cd:constant name='suffix' value='suffix'/> <cd:constant name='suffixseparator' value='suffixseparator'/> + <cd:constant name='suffixstopper' value='suffixstopper'/> <cd:constant name='surnamesep' value='surnamesep'/> <cd:constant name='sx' value='sx'/> <cd:constant name='sy' value='sy'/> diff --git a/tex/context/test/pdf-a1a-2005.mkiv b/tex/context/test/pdf-a1a-2005.mkiv index 4600e7a09..8f79d3f33 100644 --- a/tex/context/test/pdf-a1a-2005.mkiv +++ b/tex/context/test/pdf-a1a-2005.mkiv @@ -6,19 +6,16 @@ [format=PDF/A-1a:2005, intent=sRGB IEC61966-2.1, % use <info> entry here; otherwise problems with predefined default profile profile=sRGB.icc, % use <filename> here - level=0, - ] + level=0] -\setupstructure[state=start] +\setuptagging[state=start] \setupcolors[cmyk=no] \definecolor[rgbblack][b=0.01] \definecolor[transtest][r=1,g=1,t=.5] - \placebookmarks[chapter][all][force=yes] - \starttext \starttextcolor[rgbblack] diff --git a/tex/context/test/pdf-a1b-2005.mkiv b/tex/context/test/pdf-a1b-2005.mkiv index 8a032395c..f980e3148 100644 --- a/tex/context/test/pdf-a1b-2005.mkiv +++ b/tex/context/test/pdf-a1b-2005.mkiv @@ -6,17 +6,14 @@ [format=PDF/A-1a:2005, intent=sRGB IEC61966-2.1, % use <info> entry here; otherwise problems with predefined default profile profile=sRGB.icc, % use <filename> here - level=0, - ] + level=0] -\setupstructure[state=start] % needed even for 'b'-version +\setuptagging[state=start] % needed even for 'b'-version \setupcolors[cmyk=no] \definecolor[rgbblack][b=0.01] \definecolor[transtest][r=1,g=1,t=.5] - - \starttext \starttextcolor[rgbblack] % forced /DeviceGray causes problems; we need a trigger @@ -38,5 +35,4 @@ Text is needed, otherwise tagging base entries are not applied. \egroup %\stopTEXpage - \stoptext diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index dc872498a..a193bd3a9 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 01/16/12 18:33:15 +-- merge date : 01/24/12 11:11:05 do -- begin closure to overcome local limits and interference @@ -3352,7 +3352,7 @@ constructors.keys = { finalized = "boolean", }, parameters = { - mathsize = "scaledpoints", + mathsize = "number", scriptpercentage = "float", scriptscriptpercentage = "float", units = "cardinal", |