File: tsp.tex

package info (click to toggle)
texlive-lang 2024.20250309-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,615,964 kB
  • sloc: xml: 69,499; perl: 62,533; python: 5,063; makefile: 4,836; sh: 4,456; ansic: 2,892; ruby: 1,031; lisp: 750; awk: 649; java: 159; sed: 142; csh: 25
file content (49 lines) | stat: -rw-r--r-- 1,130 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
% TSP.TEX

% Marek Ry\'cko

% Macro \tsp
% Text SPace

% uses SPLIT.TEX

% version 0.0 24.07.1993
% version 0.2,  8.10.1993
%   -- no \input map
% version 0.3 1.5.1996
%   -- english description


% uses SPLIT
% uses MAP


\def\tsp
    %#1%
    {\map
        {\ifx\mapcur\space
            \hskip\tspsp\relax
        \else
            \mapcur
            % if it is not the last element -- join using kern:
            \ifx\mappost\empty \else
                % ``future'' is nonempty;
                % we put interletter spacing only if
                % next character is not space:
                \split\mappost\tsptest\fool
                \ifx\tsptest\space
                    % will be space, don't put glue:
                \else
                    % not kern to make it streachable:
                    \nobreak\hskip\tsplet\relax
                \fi
            \fi
        \fi
        }% the end of first parameter
        %{#1}%
    }
% default parameters:
% the amount of space in place of the space character:
    \def\tspsp  {0.9em plus.3em minus.2em}
% distance between letters:
    \def\tsplet {.1666667em}%