diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:45:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:45:48 +0000 |
commit | 5dc602d16c5be2fd035b254ca23484a90aebd6dc (patch) | |
tree | 72efb15fba318cc2096a8cc6999ed3fa0bff317d /Master/texmf-dist/doc/metapost/latexmp | |
parent | b4fc5f639874db951177ec539299d20908adb654 (diff) |
doc 5
git-svn-id: svn://tug.org/texlive/trunk@81 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/latexmp')
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/README | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/examples.pdf | bin | 0 -> 126612 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf | bin | 0 -> 90561 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp | 34 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex | 23 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp | 34 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp | 41 |
8 files changed, 154 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/latexmp/README b/Master/texmf-dist/doc/metapost/latexmp/README new file mode 100644 index 00000000000..829eeb5943c --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/README @@ -0,0 +1,11 @@ +The MetaPost package latexMP implements a user-friendly +interface to access LaTeX-based typesetting capabilities in +MetaPost. +The text to be typeset is given as string. This allows even +dynamic text elements, for example counters, to be used in +labels. Compared to other implementations it is much more +flexible, since it can be used as direct replacement for +btex..etex, and much faster, compared for example to +the solution provided by tex.mp. + +All files of the package belong to the Public Domain. diff --git a/Master/texmf-dist/doc/metapost/latexmp/examples.pdf b/Master/texmf-dist/doc/metapost/latexmp/examples.pdf Binary files differnew file mode 100644 index 00000000000..2ef6cf299a2 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/examples.pdf diff --git a/Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf b/Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf Binary files differnew file mode 100644 index 00000000000..e96ff5a4e5a --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp new file mode 100644 index 00000000000..1602717b6ab --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp @@ -0,0 +1,34 @@ +input latexmp ; +input graph ; + +% create data file +write "10 2e-2" to "lmp-data.dat" ; +write "20 3e4" to "lmp-data.dat" ; +write "30 8e4" to "lmp-data.dat" ; +write "100 7e4" to "lmp-data.dat" ; +write "130 2e5" to "lmp-data.dat" ; +write "200 4e5" to "lmp-data.dat" ; +write "500 8e5" to "lmp-data.dat" ; +write "600 1e7" to "lmp-data.dat" ; +write "1000 2e7" to "lmp-data.dat" ; +write "2000 8e7" to "lmp-data.dat" ; +write EOF to "lmp-data.dat" ; +% + +setupLaTeXMP( + mode=normal,% 'graph' package does not work in rerun mode + packages="mathpazo") ; + + +init_numbers(textext("$-$"),textext("$1$"),textext("${\times}10$"), + textext("${}^-$"),textext("${}^2$")) ; +Fe_base:=textext("$10$") ; + +beginfig(1); + draw begingraph(6cm,4cm) + setcoords(linear,log); + gdraw "lmp-data.dat" ; + endgraph ; +endfig; + +end diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex new file mode 100644 index 00000000000..d9f2dd20aaf --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex @@ -0,0 +1,23 @@ +\textcolor[rgb]{0.9,0.65,0}{\bfseries Der Löwe und die Mücke} +\color[gray]{0.4}Eine Mücke forderte mit den übermütigsten Worten +einen Löwen zum Zweikampf heraus: \textcolor{blue}{Ich +fürchte dich nicht, du großes Ungeheuer}, rief sie ihm +zu, \textcolor{blue}{weil du gar keine Vorzüge vor mir hast; +oder nenne sie mir, wenn du solche zu haben glaubst; etwa +die, dass du deinen Raub mit Krallen zerreißest und +mit Zähnen zermalmest? Jedes andere feige Tier, wenn es +mit einem Tapfern kämpft, tut dasselbe, es beißt und +kratzt. \color[rgb]{0.7,0,0}Du sollst aber empfinden, +dass ich stärker bin als du!} +Mit diesen Worten flog sie in eines seiner +Nasenlöcher und stach ihn so sehr, dass er sich vor +Schmerz selbst zerfleischte und sich für überwunden +erklärte. + +\color[rgb]{0,0.6,0}Stolz auf diesen Sieg flog die Mücke davon, +um ihn aller Welt auszuposaunen, übersah aber das Gewebe einer Spinne +und verfing sich in demselben. Gierig umarmte die Spinne +sie und sog ihr das \textcolor{red}{Heldenblut} aus. Sterbend empfand +die Mücke ihre Nichtigkeit, indem sie, die Besiegerin des +Löwen, einem so verächtlichen Tiere, einer Spinne, +erliegen musste. diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp new file mode 100644 index 00000000000..3b75c270648 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp @@ -0,0 +1,11 @@ + +input latexmp ; + +setupLaTeXMP(mode=rerun, + fontencoding="T1",inputencoding="latin1",language="ngerman", + textextlabel=enable, multicolor=enable) ; + +beginfig(1); + label("\parbox{12cm}{\input{lmp-mc-text}}", origin) ; +endfig; +end diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp new file mode 100644 index 00000000000..a5b44f1b2be --- /dev/null +++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp @@ -0,0 +1,34 @@ +input metafun ; +cmykcolors:=true ;% enable cmyk-specials in MetaFun +input latexmp ; + +% - mode is set to 'normal' since MetaFun doesn't work in rerun-mode; +% please rerun manually +% - the file has to be converted in PDF using MPtoPDF in order +% to interpret the MP-specials generated by MetaFun + +setupLaTeXMP(packages="helvet", + preamble="\renewcommand{\familydefault}{\sfdefault}", + textextlabel=enable,multicolor=enable) ; + +beginfig(1); + save p,c ; pair p ; color c ; + + for i=1 upto 100: + p:= (uniformdeviate 8cm, uniformdeviate 5cm) ; + label.urt("\bfseries\transparent{0.2}{MetaFun}",p) ; + endfor; + + for i=1 upto 20: + c:= (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1) ; + p:= (-50pt+uniformdeviate 100pt, -50pt+uniformdeviate 100pt) ; + label("\bfseries\Huge\color[rgb]{" & + (decimal redpart c) & "," & (decimal greenpart c) & "," & + (decimal bluepart c) & "}" & + "\transparent{0.4}{MetaFun}",(5cm,2.5cm)+p) ; + endfor; + + label.top("two different greens: one in \textcolor[cmyk]{1,0,1,0}{cmyk} " & + "and one in \textcolor[rgb]{0,1,0}{rgb}", (5cm,2.5cm)) ; +endfig; +end 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 |