groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Horizontal positioning, .nr vs \R


From: Tadziu Hoffmann
Subject: Re: [Groff] Horizontal positioning, .nr vs \R
Date: Fri, 2 Apr 2010 03:44:55 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

I don't have a solution to the space problem caused by your
solution to the toc-line-generation problem  :-)  (the one
which backspaces to the previous line), but I'd suggest an
entirely different approach, using a diversion but delaying
the generation of leaders until the diversion is replayed:


  .\"
  .\" ----------------------------------------------------------------
  .char \[..] \h'.5m'\Z'.'\h'.5m'
  .lc \[..]
  .\" ----------------------------------------------------------------
  .de TT
  .ll \\n[LL]u-.3i
  .fi
  .ad l
  .di tt
  \fB\\$*\fR\\a\fP\\t\\*[TOCpg]\fR
  .br
  .di
  .nf
  .ll \\n[LL]u
  .ta \w'\\*[TOCpg]'u%\w'\[..]'u+\\n[LL]u-\w'\\*[TOCpg]'u-\w'\[..]'u \\n[LL]uR
  .tt
  ..
  .\" ----------------------------------------------------------------
  .nr LL 6i
  .sp 3c
  .ps 10
  .vs 12
  \D'l \n[LL]u 0'
  .ds TOCpg 1
  .TT "Entries that require more than one line had a small but noticeable extra 
gap between the end of the text"
  .ds TOCpg 888
  .TT "That require more than one line had a small but noticeable extra gap 
between the end of the text entries"


(The extra arithmetic is needed to make the leader dots of
different toc lines stay vertically aligned.  You might also
wish to replace the \fB with \fB for level-1 headings and
\fR for all others.)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]