summaryrefslogtreecommitdiff
path: root/graphics/mf2tex/mf2tex.tex
blob: 45dce3df242063c3e9eb57f0d7ebecbafa7f06c2 (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
46
47
48
49
50
51
52
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}}