1

Feeding

\documentclass{article}
\pagestyle{empty}
%\usepackage[slantedGreek,subscriptcorrection]{newtx}% this is what I use with many of other packages in a non-minimal example.
%% Text skips with glue being half of the value of the argument (cf. http://tex.stackexchange.com/q/657443, http://tex.stackexchange.com/a/657448, and http://tex.stackexchange.com/a/672701):
\newcommand{\flexibleHSkip}[1]{%
  \hskip#1
  plus.5\dimexpr\ifdim #1<0pt -\fi#1\relax
  minus.5\dimexpr\ifdim #1<0pt -\fi#1\relax
  \relax
}
\begin{document}\noindent
Consider the set \(Y\). Let \ldots\\
Consider the set \(Y\)\flexibleHSkip{-.1em}. \flexibleHSkip{.1em}Let \ldots\\
Consider the set \(Y\)\flexibleHSkip{-.1em}.\flexibleHSkip{.1em} Let \ldots\\
Consider the set \(Y\), and let \ldots\\
Consider the set \(Y\)\flexibleHSkip{-.1em}, \flexibleHSkip{.1em}and let \ldots\\
Consider the set \(Y\)\flexibleHSkip{-.1em},\flexibleHSkip{.1em} and let \ldots
\end{document}

to pdflatex yields

output with Computer Modern

with standard fonts (Computer Modern) and

output with NewTX

with NewTX. The versions with the reduced space between π‘Œ and the punctuation mark seem better to me (and, hopefully, to you). The macro \flexibleHSkip{…} allows for stretching and shrinking to allow for prettier lines and paragraphs; if you don't care, you can use simple \hskip-.1em and \hskip.1em instead, for instance.

  1. If we manually reduce white space before punctuation and add white space after punctuation, which version is correctβ„’, i.e., causes less issues (I might imagine that line breaking could be hypothetically affected): \flexibleHSkip{-.1em}PunctuationSymbol\flexibleHSkip{.1em} or \flexibleHSkip{-.1em}PunctuationSymbol \flexibleHSkip{.1em}. In other words, what should be the order of the regular space symbol and \flexibleHSkip{.1em} after the punctuation mark?

  2. How to get better spacing between β€œπ‘Œβ€ and [β€œ.” or β€œ,”] automatically, without manual space deletions and insertions in the source document?

1 Answer 1

1

I would simply pull the . in to the math, it will be taken from the mathrm font anyway and allows the font-specified kerns to take effect.

enter image description here

\documentclass{article}

\begin{document}

$Y$. ABC

$Y.$ ABC


\end{document}
1
  • Thank you! The kerning is reduced for Computer Modern but not for NewTX. But no negative kerning in math mode makes sense if the dot is the application operator, as in 𝑓.𝑔.β„Ž.π‘₯ = 𝑓(𝑔(β„Ž(π‘₯))). (Off topic: every time I typeset β„Ž, I have to search for Planck's constant. This drives me crazy.) I'm not sure about the cases where the dot is the separator, as in Ξ»-terms, such as Ξ» x. Ξ» 𝑦. π‘₯ 𝑦 π‘₯ 𝑦 .
    – AlMa1r
    Commented Jan 7 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .