summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/uspace/uspace.sty
blob: 2d98e86444ad49c212f3f495bbbaa4e5928f5049 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
% LaTeX package that defines meanings to several different Unicode space
% characters.
%
% © 2016 Václav Haisman
%
%% This program can be redistributed and/or modified under the terms of the
%% MIT license. See LICENSE file.
%

\NeedsTeXFormat{LaTeX2e}[1994/06/01]

\ProvidesPackage{uspace}
[2016/10/04 v0.01 LaTeX package that defines meanings to several different
Unicode space characters.]

\RequirePackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\RequirePackage[utf8]{inputenc}
\fi

\RequirePackage{newunicodechar}

% zero width space
\newunicodechar{​}{\hspace{0pt}}

% narrow no-break space
\newunicodechar{ }{\leavevmode\,}

% non-breaking space
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\relax
\else % if !pdftex
\newunicodechar{ }{~}
\fi

% soft hyphen
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\relax
\else % if !pdftex
\newunicodechar{­}{\-}
\fi

% en quad and en space
\newunicodechar{ }{\enskip}
\newunicodechar{ }{\enskip}

% em quad and em space
\newunicodechar{ }{\quad}
\newunicodechar{ }{\quad}

% three-per-em space
\newunicodechar{ }{\hspace{0.3333333333333em}}

% four-per-em space
\newunicodechar{ }{\hspace{0.25em}}

% six-per-em space
\newunicodechar{ }{\hspace{0.1666666666666em}}

% figure space
\newunicodechar{ }{\leavevmode\hphantom{0}}

% punctuation space
\newunicodechar{ }{\leavevmode\hphantom{.}}

% thin space
\newunicodechar{ }{\leavevmode\,\linebreak[0]}

% hair space
\newunicodechar{ }{\hspace{0.0833333333333em}}

\endinput

%%
%% End of file `uspace.sty'.