diff options
Diffstat (limited to 'Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp')
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp new file mode 100644 index 00000000000..fd6613cf884 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp @@ -0,0 +1,41 @@ + +input latexmp ; + +string OrdMacro, OoosMacro, otherDefs ; + +OrdMacro := +"\newcommand*{\Ord}[1]{\ifcase #1\relax" & + " #1\textsuperscript{th}\or" & + " #1\textsuperscript{st}\or" & + " #1\textsuperscript{nd}\or" & + " #1\textsuperscript{rd}\else" & + " #1\textsuperscript{th}\fi}" ; + +OoosMacro := + "\newcommand*{\Ooos}[1]{\setcounter{Ooos}{1}O\whiledo{\value{Ooos}<#1}" & + "{o\stepcounter{Ooos}}h}" ; + +otherDefs := "\newcounter{Ooos}\renewcommand{\familydefault}{\sfdefault}" ; + +setupLaTeXMP( + mode=rerun, + inputencoding="latin1", + fontencoding="T1", + packages="helvet,calc,ifthen,mflogo", + preamble=(OrdMacro & OoosMacro & otherDefs) , + textextlabel=enable ); + +beginfig(1); + for i=1 upto 5: + label.urt( "\Ord{" & (decimal i) & "} {\MP} label",(0,-10*i) ) ; + endfor; +endfig; + +beginfig(2); + for i=1 upto 50: + label( "\Ooos{" & (decimal i)& "}",(0,10*i) ) ; + endfor; + currentpicture:= (currentpicture slanted 0.5) yscaled 0.7 ; +endfig; + +bye |