diff options
Diffstat (limited to 'graphics/mf2tex/mf2tex.tex')
-rw-r--r-- | graphics/mf2tex/mf2tex.tex | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/graphics/mf2tex/mf2tex.tex b/graphics/mf2tex/mf2tex.tex new file mode 100644 index 0000000000..45dce3df24 --- /dev/null +++ b/graphics/mf2tex/mf2tex.tex @@ -0,0 +1,53 @@ +% these macros are for moving the starting point and setting the +% vertical justification +% the text will be inserted, but TeX will not move its pointer to the +% space +\def\vertD#1#2#3{% justify the bottom + \vbox to 0pt{\vskip -#2\vss% + \hbox to 0pt{\hskip #1% + #3% + \hskip -#1}% + \vskip #2}} +\def\vertU#1#2#3{% justify the top + \vbox to 0pt{\vskip -#2% + \hbox to 0pt{\hskip #1% + #3% + \hskip -#1}% + \vss\vskip #2}} +\def\vertB#1#2#3{% justify the baseline + \vbox to 0pt{\vskip -#2% + \smash{\hbox to 0pt{\hskip #1% + #3% + \hskip -#1}}% + \vskip #2}} +\def\vertM#1#2#3{% justify the middle + \vbox to 0pt{\vskip -#2\vss% + \hbox to 0pt{\hskip #1% + #3% + \hskip -#1}% + \vss\vskip #2}} + +% these macros are for horizontal justification +\def\horL#1{#1\hss} %justify the left +\def\horR#1{\hss#1} % right +\def\horM#1{\hss#1\hss} % middle + +% abbreciations for all justifications +% they get the coordinates and the inserted text +\def\moveLU(#1,#2,#3){\vertU{#1}{#2}{\horL{#3}}} +\def\moveRU(#1,#2,#3){\vertU{#1}{#2}{\horR{#3}}} +\def\moveMU(#1,#2,#3){\vertU{#1}{#2}{\horM{#3}}} +\def\moveLD(#1,#2,#3){\vertD{#1}{#2}{\horL{#3}}} +\def\moveRD(#1,#2,#3){\vertD{#1}{#2}{\horR{#3}}} +\def\moveMD(#1,#2,#3){\vertD{#1}{#2}{\horM{#3}}} +\def\moveLM(#1,#2,#3){\vertM{#1}{#2}{\horL{#3}}} +\def\moveRM(#1,#2,#3){\vertM{#1}{#2}{\horR{#3}}} +\def\moveMM(#1,#2,#3){\vertM{#1}{#2}{\horM{#3}}} +\def\moveLB(#1,#2,#3){\vertB{#1}{#2}{\horL{#3}}} +\def\moveRB(#1,#2,#3){\vertB{#1}{#2}{\horR{#3}}} +\def\moveMB(#1,#2,#3){\vertB{#1}{#2}{\horM{#3}}} + +% macro with 2 parameters: labels and the picture +% it creates the hbox and inserts it correctly to the text +\def\labels#1#2{% + \noindent\hbox{#1#2}} |