groff
[Top][All Lists]
Advanced

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

Re: [Groff] how to format KWIC ptx index and .xx?


From: Werner LEMBERG
Subject: Re: [Groff] how to format KWIC ptx index and .xx?
Date: Sat, 27 Sep 2008 09:23:37 +0200 (CEST)

> .xx "" "yppoll -" "ask version of NIS map from NIS server" "" "yppoll(8)"
> 
> (By the way, I don't understand why the above is split this way.)

You should say `info ptx' to get the details:

  `-O'
  `--format=roff'
     Choose an output format suitable for `nroff' or `troff'
     processing.  Each output line will look like:

          .xx "TAIL" "BEFORE" "KEYWORD_AND_AFTER" "HEAD" "REF"

     so it will be possible to write a `.xx' roff macro to take care of
     the output typesetting.  This is the default output format when GNU
     extensions are disabled.  Option `-M' can be used to change `xx'
     to another macro name.

     In this output format, each non-graphical character, like newline
     and tab, is merely changed to exactly one space, with no special
     attempt to compress consecutive spaces.  Each quote character: `"'
     is doubled so it will be correctly processed by `nroff' or `troff'.

> $ groff -ms index.head J.permutted.2 > J.ps

It's clear now why you don't get any output.  First, the ptx output
uses `.xx', not `.XX'.  Second, even if you used `.XX', you wouldn't
get any output because .XX from index.head doesn't take any arguments.

What you need is a proper implementation of .xx: If you search for a
`tmac.ptx', you'll find possible implementations.

Attached is a version suitable for groff (with long register names).
Note that there are (similar to the original) some ^G characters in it.

You should say e.g.

  ...
  .so ptx.tmac
  .so J.permutted.2

in your document.


      Werner

Attachment: ptx.tmac
Description: Binary data


reply via email to

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