summaryrefslogtreecommitdiff
path: root/metapost/context/base/mpiv/minifun.mpiv
blob: 6d877fddb514790eef143b84daf78760d2975aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%D \module
%D   [       file=minifun.mp,
%D        version=2018.06.02,
%D          title=\CONTEXT\ \METAPOST\ graphics,
%D       subtitle=format generation file,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%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 is a minimal \METAFUN\ instance which can be handy for isolated
%D subruns.

prologues := 0 ;
mpprocset := 1 ;

input "mp-base.mpiv" ;
input "mp-tool.mpiv" ;
input "mp-mlib.mpiv" ;
input "mp-luas.mpiv" ;
input "mp-page.mpiv" ;

string minifunversion ; minifunversion =
    "minifun iv"                        & " " &
    decimal year                        & "-" &
    decimal month                       & "-" &
    decimal day                         & " " &
    if ((time div 60) < 10)           :   "0" & fi
    decimal (time div 60)               & ":" &
    if ((time-(time div 60)*60) < 10) :   "0" & fi
    decimal (time-(time div 60)*60)   ;

let normalend = end ;

if known mplib :
    def end = ; message "" ; message minifunversion ; message "" ; endinput  ; enddef ;
    def bye = ; message "" ; message minifunversion ; message "" ; endinput  ; enddef ;
else :
    def end = ; message "" ; message minifunversion ; message "" ; normalend ; enddef ;
fi ;

% dump ; % obsolete in mplib