n-t-roff / heirloom-doctools

The Heirloom Documentation Tools: troff, nroff, and related utilities
http://n-t-roff.github.io/heirloom/doctools.html
Other
126 stars 23 forks source link

A problem with a macro name (argument to the .lsm request) #68

Closed aksr closed 6 years ago

aksr commented 6 years ago

I think I encountered what is, seemingly, a problem with macro name as an argument to the .lsm request.

The lines (3, 4) should (also) be bold (as the lines 1 und 2).

For example:

.do xflag 3
.sp 5
.de first
.ft B
..
Ab odio enim unde cum.  
.sp
.first
 1 Itaque eos corrupti hic fugit laboriosam numquam.
 2 Itaque eos corrupti hic fugit laboriosam numquam.
.ft R
.lsm first
 3 Itaque eos corrupti hic fugit laboriosam numquam.
 4 Itaque eos corrupti hic fugit laboriosam numquam.
.sp
Vel sunt excepturi non tenetur et vitae et.  

(Note: there is a leading space in beginning of the sentences (1, 2, 3 and 4).)

If I'm not missing something, it seems as if .lsm request mixes between .fi and .first request, even though xflag is already set (.do xflag 3).

n-t-roff commented 6 years ago

The problem is, that skip() is used to eat the whitespace between .lsm and first. This is done in ligature mode. When skip() sees the fi it knows that the whitespace range is over and saves the ligature for fi as prefetch. the rest of the request name (rst) is read in no-ligature mode, but this does not help anymore. Switching ligatures of before the skip() call does help instead.

aksr commented 6 years ago

It seems it's fixed. However I think I found another problem with .lsm request.