summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/gustlib/map/tun.tex
blob: 275135adb97937bb0c381bd04ff7adf714b10dce (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
% TUN.TEX

% Marek Ry\'cko

% Macro \tun
% Text UNderline

% version 0.1,  9.10.94
% version 0.3,  1.5.1996
%   -- english description


% uses SPLIT
% uses MAP


\newbox\boxA
\newdimen\dimenA
\newdimen\dimenB


\def\tun
    %#1%
    {\map
        {\ifx\mapcur\space
            \space
        \else
            \tunel\mapcur
        \fi
        }%
        %{#1}%
    }
\def\tunel
    #1% what to underline
    {{%
    #1%
    \setbox\boxA\hbox{#1}%
    \dimenA-\tunsep
    \dimenB-\dimenA \advance\dimenB\tunwd
    \llap{\hbox to\wd\boxA{\hss
        \vrule height\dimenA depth\dimenB width\tunfac\wd\boxA
        \hss}}%
    }}

% default parameters:
% underline separator width
    \def\tunsep {.25ex}%
% underline width
    \def\tunwd  {.09ex}%
% underline factor of letter width:
    \def\tunfac  {1}%