| 1 |
\PassOptionsToPackage{unicode}{hyperref} |
| 2 |
\documentclass[paper=B5,DIV=calc,parskip=half]{scrartcl} |
| 3 |
\usepackage{ifluatex} |
| 4 |
\ifluatex |
| 5 |
\usepackage{luatex85} |
| 6 |
\fi |
| 7 |
|
| 8 |
\usepackage{fontspec} |
| 9 |
\setmainfont[Ligatures={TeX,Common}]{Charis SIL} |
| 10 |
\setsansfont[Ligatures={TeX,Common}, Scale=MatchLowercase]{TeX Gyre Heros} |
| 11 |
\setmonofont[Ligatures=,Scale=MatchLowercase]{DejaVu Sans Mono} |
| 12 |
|
| 13 |
\usepackage{listings} |
| 14 |
\usepackage{enumitem} |
| 15 |
%\usepackage{enumitem-zref} |
| 16 |
\usepackage{polyglossia} |
| 17 |
\setmainlanguage[]{english} |
| 18 |
|
| 19 |
\usepackage{uspace} |
| 20 |
\usepackage[autostyle]{csquotes} |
| 21 |
|
| 22 |
\author{Václav Haisman\texorpdfstring{% |
| 23 |
\\{\small\href{mailto:[email protected]?subject=[uspace]}{[email protected]}}}{}} |
| 24 |
\date{\today} |
| 25 |
\title{\texttt{uspace} user manual} |
| 26 |
\subtitle{v0.05} |
| 27 |
|
| 28 |
\usepackage{xcolor} |
| 29 |
\usepackage{multicol} |
| 30 |
\usepackage{microtype} |
| 31 |
\usepackage{metalogo} |
| 32 |
\usepackage{hologo} |
| 33 |
|
| 34 |
\usepackage{bookmark} |
| 35 |
\hypersetup{ |
| 36 |
colorlinks, |
| 37 |
linkcolor={red!50!black}, |
| 38 |
citecolor={blue!50!black}, |
| 39 |
urlcolor={blue!80!black}, |
| 40 |
breaklinks=true} |
| 41 |
\urlstyle{same} % don't use monospace font for urls |
| 42 |
\usepackage{footnotehyper} |
| 43 |
\makesavenoteenv{labeling} |
| 44 |
|
| 45 |
\setlength{\emergencystretch}{3em} % prevent overfull lines |
| 46 |
|
| 47 |
\lstdefinestyle{myLatexStyle}{ |
| 48 |
language=[LaTeX]{Tex}, |
| 49 |
basicstyle=\ttfamily |
| 50 |
} |
| 51 |
|
| 52 |
\lstset{style=myLatexStyle} |
| 53 |
|
| 54 |
\newcommand{\zwsp}{\textsc{zero width space}} |
| 55 |
\newcommand{\nnbsp}{\textsc{narrow no-break space}} |
| 56 |
\newcommand{\nbsp}{\textsc{non-breaking space}} |
| 57 |
\newcommand{\shy}{\textsc{soft hyphen}} |
| 58 |
\newcommand{\enquad}{\textsc{en quad}} |
| 59 |
\newcommand{\enspaceC}{\textsc{en space}} |
| 60 |
\newcommand{\emquad}{\textsc{em quad}} |
| 61 |
\newcommand{\emspaceC}{\textsc{em space}} |
| 62 |
\newcommand{\threePerEm}{\textsc{three-per-em space}} |
| 63 |
\newcommand{\fourPerEm}{\textsc{four-per-em space}} |
| 64 |
\newcommand{\sixPerEm}{\textsc{six-per-em space}} |
| 65 |
\newcommand{\figuresp}{\textsc{figure space}} |
| 66 |
\newcommand{\punctsp}{\textsc{punctuation space}} |
| 67 |
\newcommand{\thinsp}{\textsc{thin space}} |
| 68 |
\newcommand{\hairsp}{\textsc{hair space}} |
| 69 |
\newcommand{\medmathsp}{\textsc{medium math space}} |
| 70 |
\newcommand{\linesep}{\textsc{line separator}} |
| 71 |
\newcommand{\nel}{\textsc{next line (nel)}} |
| 72 |
\newcommand{\parasep}{\textsc{paragraph separator}} |
| 73 |
|
| 74 |
\begin{document} |
| 75 |
\begin{titlepage} |
| 76 |
\maketitle |
| 77 |
\end{titlepage} |
| 78 |
|
| 79 |
\tableofcontents |
| 80 |
|
| 81 |
\section{Introduction}% |
| 82 |
% |
| 83 |
This \LaTeX{} package gives useful meaning to various Unicode space |
| 84 |
characters so that they fulfill their intended function when used in \LaTeX{} |
| 85 |
source. It uses \lstinline|\newunicodechar| macro to do it. Its source is |
| 86 |
hosted on GitHub in |
| 87 |
\texttt{\href{https://github.com/wilx/project-uspace}{wilx/project-uspace}} |
| 88 |
repository. |
| 89 |
|
| 90 |
Here is a list of the implemented characters |
| 91 |
and their implementations:\nobreak% |
| 92 |
\begin{labeling}[\quad]{\nnbsp{} (\texttt{U+202F})} |
| 93 |
\item[\zwsp{} (\texttt{U+200B})] \lstinline|\hspace{0pt}| |
| 94 |
\item[\nnbsp{} (\texttt{U+202F})] \lstinline|\leavevmode\,| |
| 95 |
\item[\nbsp{\footnotemark[1]} (\texttt{U+00A0})] \lstinline|~| |
| 96 |
\item[\shy{\footnotemark[1]} (\texttt{U+00AD})] \lstinline|\-| |
| 97 |
\item[\emquad{\footnotemark[2]} (\texttt{U+2001})] \lstinline|\quad| |
| 98 |
\item[\emspaceC{\footnotemark[2]} (\texttt{U+2003})] \lstinline|\quad| |
| 99 |
\item[\enquad{\footnotemark[3]} (\texttt{U+2000})] \lstinline|\enskip| |
| 100 |
\item[\enspaceC{\footnotemark[3]} (\texttt{U+2002})] \lstinline|\enskip| |
| 101 |
\item[\threePerEm{} (\texttt{U+2004})] \lstinline|\hspace{0.33333em}| |
| 102 |
\item[\fourPerEm{} (\texttt{U+2005})] \lstinline|\hspace{0.25em}| |
| 103 |
\item[\sixPerEm{} (\texttt{U+2006})] \lstinline|\hspace{0.16667em}| |
| 104 |
\item[\figuresp{} (\texttt{U+2007})] \lstinline|\leavevmode\hphantom{0}| |
| 105 |
\item[\punctsp{} (\texttt{U+2008})] \lstinline|\hspace{\fontcharwd \font `\,}| |
| 106 |
\item[\thinsp{} (\texttt{U+2009})] \lstinline|\leavevmode\allowbreak\,| |
| 107 |
\item[\hairsp{} (\texttt{U+200A})] \lstinline|\hspace{0.08333em}| |
| 108 |
\item[\medmathsp{} (\texttt{U+205F})] \lstinline|\hspace{0.22222em}| |
| 109 |
\item[\linesep{} (\texttt{U+2028})] \lstinline|\newline| |
| 110 |
\item[\nel{} (\texttt{U+0085})] \lstinline|\newline| |
| 111 |
\item[\parasep{} (\texttt{U+2029})] \lstinline|\csname par\endcsname| |
| 112 |
\end{labeling} |
| 113 |
\footnotetext[1]{This already defined for \hologo{pdfLaTeX} because we use |
| 114 |
\lstinline|inputenc| with \lstinline|utf8| option when compiling with |
| 115 |
\hologo{pdfLaTeX}, therefore this is only defined for \LuaLaTeX{} and |
| 116 |
\XeLaTeX{}.} |
| 117 |
\footnotetext[2]{According to Unicode, these two are canonically |
| 118 |
equivalent. See \url{http://unicode.org/notes/tn5/} |
| 119 |
for explanation of the term.} |
| 120 |
\footnotetext[3]{These two are also canonically equivalent. See previous |
| 121 |
footnote.} |
| 122 |
|
| 123 |
|
| 124 |
\section{History}% |
| 125 |
% |
| 126 |
This package would not be what it is without help and comments from people of |
| 127 |
\href{http://chat.stackexchange.com/rooms/41/tex-latex-and-friends}{\TeX{}, |
| 128 |
\LaTeX{} and Friends} StackExchange chat room and the |
| 129 |
\href{http://tex.stackexchange.com/}{\TeX.SE} site itself. |
| 130 |
|
| 131 |
\begin{description}[style=nextline, labelwidth=4.5em, leftmargin=!, |
| 132 |
labelindent=0em] |
| 133 |
\item[\texttt{v0.05}] Add implementation for \medmathsp{}. |
| 134 |
\item[\texttt{v0.04}] Add implementation for \linesep{}, \nel{} |
| 135 |
and \parasep{}. |
| 136 |
\item[\texttt{v0.03}] Change implementation for \punctsp{} and \thinsp{} to |
| 137 |
fix issues with line wrapping when using these characters. |
| 138 |
\item[\texttt{v0.02}] Round lengths to five digits after decimal |
| 139 |
point. List also Unicode code point values beside character names. |
| 140 |
\item[\texttt{v0.01}] First published version of this package. |
| 141 |
\end{description} |
| 142 |
|
| 143 |
\end{document} |