diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/meta-ini.mkii')
-rw-r--r-- | Master/texmf-dist/tex/context/base/meta-ini.mkii | 125 |
1 files changed, 44 insertions, 81 deletions
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.mkii b/Master/texmf-dist/tex/context/base/meta-ini.mkii index 932b99bf85a..f9d09704940 100644 --- a/Master/texmf-dist/tex/context/base/meta-ini.mkii +++ b/Master/texmf-dist/tex/context/base/meta-ini.mkii @@ -20,46 +20,6 @@ \unprotect -\startmessages dutch library: metapost - title: metapost - 1: metapost bibliotheek -- wordt geladen -\stopmessages - -\startmessages english library: metapost - title: metapost - 1: loading metapost library -- -\stopmessages - -\startmessages german library: metapost - title: metapost - 1: Lade metapost Bibliothek -- -\stopmessages - -\startmessages czech library: metapost - title: metapost - 1: loading metapost library -- -\stopmessages - -\startmessages italian library: metapost - title: metapost - 1: caricamento della libreria metapost -- -\stopmessages - -\startmessages norwegian library: metapost - title: metapost - 1: metapost bibliotek -- blir lest inn -\stopmessages - -\startmessages romanian library: metapost - title: metapost - 1: se incarca biblioteca metapost -- -\stopmessages - -\startmessages french library: metapost - title: metapost - 1: chargement de la bibliothèque metapost -- -\stopmessages - %D This module extends the functionality of the support module %D \type {supp-mps}, the module that is responsible for %D \METAPOST\ inclusion in \CONTEXT. Some basic macros will be @@ -69,49 +29,48 @@ \maxnofMPgraphics = 4000 % metafun disables the 4K boundary -\appendtoks \runMPgraphicsfalse \to \everyfastmode -\appendtoks \insertMPgraphicsfalse \to \everyfastmode -\appendtoks \flushMPgraphics \to \everygoodbye % \everylastshipout +\appendtoks \flushMPgraphics \to \everygoodbye % \everylastshipout \def\@@MPG{@MPG@} \startMPextensions - if unknown context_tool: input mp-tool; fi; - if unknown context_spec: input mp-spec; fi; - if unknown context_grph: input mp-grph; fi; + if unknown context_tool: input mp-tool; fi; + if unknown context_spec: input mp-spec; fi; + if unknown context_grph: input mp-grph; fi; \stopMPextensions %D Since we want lables to follow the document settings, we %D also set the font related variables. -\startMPinitializations % scale is not yet ok - defaultfont:="\truefontname{Regular}"; - defaultscale:=\the\bodyfontsize/10pt; -\stopMPinitializations - -\beginNEWTEX +\ifnum\texengine=\xetexengine \startMPinitializations % scale is not yet ok - defaultfont:="rm-lmtt10"; + defaultfont:="rm-lmtt10"; + defaultscale:=\the\bodyfontsize/10pt; \stopMPinitializations -\endNEWTEX +\else + \startMPinitializations % scale is not yet ok + defaultfont:="\truefontname{Regular}"; + defaultscale:=\the\bodyfontsize/10pt; + \stopMPinitializations +\fi %D In order to support fancy text features (like outline %D fonts), we set: \startMPextensions - graphictextformat:="context"; - graphictextdirective "\the\everyMPTEXgraphic"; + graphictextformat:="context"; + graphictextdirective "\the\everyMPTEXgraphic"; \stopMPextensions % \startMPextensions -% textextdirective "\the\everyMPTEXgraphic"; +% textextdirective "\the\everyMPTEXgraphic"; % \stopMPextensions %D A signal that we're in combines \CONTEXT||\METAFUN mode: \startMPextensions - string contextversion; - contextversion:="\contextversion"; + string contextversion; + contextversion:="\contextversion"; \stopMPextensions %D Some safeguards: @@ -165,33 +124,30 @@ \let\@@framed\s!unknown -% \def\MPvariable#1% -% {\getvalue{\ifundefined{\@@framed\@@meta#1}\else\@@framed\fi\@@meta#1}} - -\beginTEX - -\def\MPvariable#1% - {\csname - \@EA\ifx\csname\@@framed\@@meta#1\endcsname\relax\else\@@framed\fi\@@meta#1% - \endcsname} - -\endTEX - -\beginETEX \ifcsname - \def\MPvariable#1% {\csname \ifcsname\@@framed\@@meta#1\endcsname\@@framed\fi\@@meta#1% \endcsname} -\endETEX - \let\MPvar\MPvariable \let\setMPvariables\setupMPvariables \def\MPrawvar#1#2{\csname#1:#2\endcsname} +\def\presetMPvariable + {\dodoubleargument\dopresetMPvariable} + +\def\dopresetMPvariable[#1][#2=#3]% + {\doifundefined{#1:#2}{\setvalue{#1:#2}{#3}}} + +\def\useMPvariables + {\dodoubleargument\douseMPvariables} + +\def\douseMPvariables[#1][#2]% + {\def\@@meta{#1:}% + \prepareMPvariables{#2}} + %D \macros %D {startuniqueMPgraphic, uniqueMPgraphic} %D @@ -286,6 +242,9 @@ \elabelgroup} \let\stopuniqueMPcode \relax % so that we can use it in \expanded + +\def\includeMPgraphic#1% + {\executeifdefined{\@@MPG#1};} % ; if not found \long\def\handleuseMPgraphic#1#2#3% {\blabelgroup @@ -499,9 +458,9 @@ %D on the number of files it can handle. It's therefore %D better to collect all data in one file and filter it. -\def\MPdataMPDfile{\jobname-mp.mpd} -\def\MPdataMPOfile{\jobname-mp.mpo} -\def\MPdataMPYfile{\jobname-mp.mpy} +\def\MPdataMPDfile{\jobname-mpgraph.mpd} +\def\MPdataMPOfile{\jobname-mpgraph.mpo} +\def\MPdataMPYfile{\jobname-mpgraph.mpy} \startMPextensions boolean collapse_data; collapse_data:=true; @@ -513,9 +472,9 @@ \def\getMPdata {\long\def\MPdata##1##2{\ifnum##1=\currentMPgraphic\relax##2\fi}% \startreadingfile - \startnointerference + % \startnointerference % no, else we need to do all data global \readlocfile\MPdataMPDfile\donothing\donothing - \stopnointerference + % \stopnointerference \stopreadingfile} %D We have to enable this mechanism with: @@ -1064,7 +1023,11 @@ \resetlanguagespecifics \to \everyMPgraphic -% Done. +%D Goody for preventing overflows: + +\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax} + +%D Done. \protect \endinput |