LaTeX adds some space after the ellipsis \textellipsis
. This is enhanced by ellipsis
package, which only adds space before certain characters (and also gives the option to configure “easily” the spacing between the dots and after):
However the spacing is “wrong”, for instance …!
, …:
or …?
does not need the same amount (see :
versus ?
). However, I'm lost in the ellipsis.sty
and I don't understand half of it.
How can we set a certain amount to each different character?
It would be great to have something like
\SetEllipsisSpacing
{
. = .1em,
? = .08em,
! = .09em,
: = .1em,
}
\SetEllipsisSpacing
{
{ . } { .1em }
{ ? } { .08em }
{ ! } { .09em }
{ : } { .1em }
}
instead of the current (and only) option \def\ellipsispunctuation{,.:;!?}
.
Here is a minimal compilable example.
\documentclass{scrartcl}
\usepackage[LY1,T1]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage{lmodern} % Just here to be an example, I use a different font
\usepackage{ellipsis}
%\def\ellipsisgap{.1em}
%\DeclareTextCommandDefault{\textellipsis}
% {{\fontencoding{LY1}\selectfont\char133}}
\begin{document}
a…! …: …?
\end{document}
This comes because I discovered that the LY1 encoding has an ellipsis character, so I can define
\DeclareTextCommandDefault{\textellipsis}
{{\fontencoding{LY1}\selectfont\char133}}
but it needs some adjusting.
Best Answer
This might get you started:
Since it's difficult to have a comma as a key, I've added the key
comma
for it.