Re: missing interword spaces
The Thanh Han <[email protected]> Thu, 5 Jun 2025 11:50:41 +0200
| Newsgroups | gmane.comp.tex.pdftex |
|---|---|
| Message-ID | <CAESt4O9oDCY3UrEwpFc1ypBAM_aXBcQMFMwGtRBDEYdAFr1a5Q@mail.gmail.com> |
--0000000000001968070636d00e47
Content-Type: text/plain; charset="UTF-8"
Hi Ross,
thanks for the minimal example.
This is slightly different from identifying a glue/skip that might be an
interword space.
pdftex tries to insert interword spaces as follows (simplified):
- when it is in the middle of writing out a string, and
- sees a movement that looks like a space (v_move = 0, h_move >= some
threshold). At this moment there is no glue, only skip.
In your example, the interword spaces are missing because the \pdfliteral's
cause the end of the current string.
A workaround would be:
\pdfinterwordspaceon
The cat
\pdffakespace
\pdfliteral{/T<<>>BDC}%
sat on the %
\pdffakespace
\pdfliteral{EMC}%
\pdfliteral{/T<<>>BDC}%
mat%
\pdfliteral{EMC}%
Regards,
Thanh
--0000000000001968070636d00e47
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">Hi Ross,<div><br></div><=
div>thanks for the minimal example.</div><div><br></div><div>This is slight=
ly different from identifying a glue/skip that might be an interword space.=
</div><div><br></div><div>pdftex tries to insert interword spaces as follow=
s (simplified):</div><div>- when it is in the middle of writing out a strin=
g, and</div><div>- sees a movement that looks like a space (v_move =3D 0, h=
_move >=3D some threshold). At this moment there is no glue, only skip.<=
/div><div><br></div><div>In your example, the interword spaces are missing =
because the \pdfliteral's cause the end of the current string.</div><di=
v><br></div><div>A workaround would be:</div><div><br></div><div><font face=
=3D"monospace">\pdfinterwordspaceon<br>The cat <br>\pdffakespace<br>\pdflit=
eral{/T<<>>BDC}%<br>sat on the %<br>\pdffakespace<br>\pdflitera=
l{EMC}%<br>\pdfliteral{/T<<>>BDC}%<br>mat%<br>\pdfliteral{EMC}%=
<br></font></div><div><br></div><div><br></div><div>Regards,</div><div>Than=
h</div></div>
</div>
</div>
--0000000000001968070636d00e47--