diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/uspace')
-rw-r--r-- | Master/texmf-dist/tex/latex/uspace/uspace.sty | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/uspace/uspace.sty b/Master/texmf-dist/tex/latex/uspace/uspace.sty new file mode 100644 index 00000000000..2d98e86444a --- /dev/null +++ b/Master/texmf-dist/tex/latex/uspace/uspace.sty @@ -0,0 +1,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'. |