summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/uspace/uspace.sty
blob: 4856989a4127dee9dcd3714a71bbb7769eed9147 (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/30 v0.03 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.33333em}}

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

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

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

% punctuation space
\newunicodechar{ }{\hspace{\fontcharwd \font `\,}}

% thin space
\newunicodechar{ }{\leavevmode\allowbreak\,}

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

\endinput

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