summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex')
-rw-r--r--Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex52
1 files changed, 42 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex b/Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex
index 373ccdfa787..73a3ac22b4c 100644
--- a/Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex
+++ b/Master/texmf-dist/doc/latex/mathpunctspace/mathpunctspace.tex
@@ -7,7 +7,7 @@
\title{Control the Space After Punctuation in Expressions}
\author{Yuwsuke Kieda}
-\date{2017/04/03 v1.0}
+\date{2018/02/27 v1.1}
\begin{document}
\maketitle
@@ -30,6 +30,7 @@ We provide a mechanism to control the space after the comma in the expressions.
\item unit: mu or other (default: mu)
\item comma: substitute keyword ``natural'' or skip (default: natural)
\item semicolon: substitute keyword ``natural'' or skip (default: natural)
+ \item colon: substitute keyword ``natural'' or skip (default: natural)
\item latexorg: original behavior of LaTeX
\end{itemize}
@@ -45,31 +46,53 @@ BSD 2-Clause License
\section{Samples}
+
+\subsection{Sources}
+
+\begin{verbatim}
+Lorem ipsum $(x, y)$, dolor sit amet.
+
+Lorem ipsum $\{x; x \in A\}$; dolor sit amet.
+
+Lorem ipsum $f\colon g \to h$: dolor sit amet.
+\end{verbatim}
+
+\subsection{Sample of Options and Results}
+
+\begin{verbatim}
+\usepackage[latexorg]{mathpunctspace}
+\end{verbatim}
+
+\includegraphics{latexorg.pdf}
+
\begin{verbatim}
\usepackage{mathpunctspace}
+% same: comma=natural,semicolon=natural,colon=natural
\end{verbatim}
-Lorem ipsum dolor sit amet $(x, y)$, consectetuer adipiscing elit.
+Lorem ipsum $(x, y)$, dolor sit amet.
+
+Lorem ipsum $\{x; x \in A\}$; dolor sit amet.
-Lorem ipsum dolor sit amet $\{x; x \in A\}$; consectetuer adipiscing elit.
+Lorem ipsum $f\colon g \to h$: dolor sit amet.
\begin{verbatim}
-\usepackage[comma=10mu,semicolon=20mu]{mathpunctspace}
+\usepackage[comma=10mu,semicolon=20mu,colon=30mu]{mathpunctspace}
\end{verbatim}
-\includegraphics{comma10mu-semicolon20mu.pdf}
+\includegraphics{comma10mu-semicolon20mu-colon30mu.pdf}
\begin{verbatim}
-\usepackage[unit=pt,comma=5pt,semicolon=5pt]{mathpunctspace}
+\usepackage[unit=pt,comma=5pt,semicolon=5pt,colon=5pt]{mathpunctspace}
\end{verbatim}
-\includegraphics{comma5pt-semicolon5pt.pdf}
+\includegraphics{comma5pt-semicolon5pt-colon5pt.pdf}
\begin{verbatim}
-\usepackage[comma=0mu,semicolon=natural]{mathpunctspace}
+\usepackage[comma=0mu,semicolon=natural,colon=natural]{mathpunctspace}
\end{verbatim}
-\includegraphics{comma0mu-semicolonnat.pdf}
+\includegraphics{comma0mu-semicolonnat-colonnat.pdf}
\section{Risks}
@@ -80,9 +103,18 @@ If the option (\texttt{comma=10mu}) is given as follows, ``right'' output can no
\end{verbatim}
\begin{center}
+ \makeatletter
+ \begingroup
+ \catcode`\,=\active
+ \def\@x@{\def,{\thinmuskip20mu\normalcomma}}%
+ \expandafter\endgroup\@x@%
+% \catcode`\,=\active
+% \def\@x@{\def,{\normalcomma\mskip10mu}}%
+% \expandafter\endgroup\@x@%
+ \makeatother
\setbox9\hbox{,}%
Input: \verb!$1{,}000$!\qquad
- Output: \raisebox{-\dp9}{\includegraphics{ordinary-comma.pdf}}
+ Output: $1{,}000$\quad $1,000$
\end{center}
\end{document}