is there a way to achieve constant word spacing in paragraph using latex/ luatex/ xelatex/ context? I came across posts that mention Tex applies glue between words, but am not sure how to exactly control them, if at all it’s possible (am more hopeful that there is a lualatex way of doing that). I guess it can be achieved in InDesign by specifying same value for minimum, desirable, and maximum: https://creativepro.com/the-complete-guide-to-word-spacing/
Asked
Active
Viewed 385 times
1
1 Answers
1
Really constant word spacing seems very hard to get, but however, there is an aspect of how we observe the distance between the last letter of a word and the first of the following one.
In the picture below in the last or second last line the distance between »of« and »words« seems smaller compared to »match« and »the«.
I played around a bit with the rich options the fontspec package offers. The option OpticalSize has an effect, while the justifying and RaggedRight environments of the ragged2e package don't.
However, you will need a broad right margin, because the usual word wrap doesn't word, if the stretch and the shrink of the interword space become zero, as with WordSpace={1,0,0}.
\documentclass[english, fontsize=14pt, parskip=full, usegeometry]{scrartcl}
\usepackage{babel}
\usepackage{fontspec}
\usepackage{roboto-mono}
\usepackage[sfdefault]{FiraSans}
%\usepackage{ragged2e}
\usepackage{blindtext}
\usepackage[right=5cm]{geometry}
%\frenchspacing
\begin{document}
\fontspec{FiraSans-Regular.otf}[WordSpace={1,0,0}, PunctuationSpace=0, Kerning=Off,
OpticalSize=0]
\blindtext
\ttfamily{}
\fontspec{RobotoMono-Regular.otf}[WordSpace={.5,0,0}, PunctuationSpace=0,
%OpticalSize=0
]
%\fontspec{RobotoMono-Regular.otf}
\blindtext
\fontspec{RobotoMono-Regular.otf}[WordSpace={.5,0,0}, PunctuationSpace=0,
OpticalSize=0
]
%\begin{RaggedRight}
\blindtext{}
%\end{RaggedRight}
\end{document}
Keks Dose
- 30,892

ragged2epackage may help.\raggedrighttoo, but\RaggedRightfromragged2eis likely to find better-looking line breaks. – frougon Jul 13 '19 at 06:27\parfillskip,\emergencystretchand themicrotypepackage. – Fran Jul 13 '19 at 07:59