File: tun.tex

package info (click to toggle)
texlive-lang 2012.20120611-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 531,364 kB
  • sloc: perl: 29,862; ansic: 3,234; sh: 1,324; makefile: 1,291; python: 824; ruby: 576; lisp: 485; awk: 431; sed: 138; xml: 57; cs: 2
file content (51 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (12)
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}%