Aurélio,

Thanks for replying.

Tables are supported on every major Unix flavor with the tbl command.
It's a pretty common standard.

So far, I have solved the Solaris issue, as documented in the
man page for man(1):

     When formatting an nroff manual page, man examines the first
     line to determine whether it requires special processing. If
     the first line is a string of the form:

     '\" X

     where X is separated from the `"' by a  single  <SPACE>  and
     consists  of  any combination of characters in the following
     list, man pipes its input to troff(1)  or  nroff(1)  through
     the corresponding preprocessors.

     e        eqn(1), or neqn for nroff
     r        refer(1)
     t        tbl(1)
     v        vgrind(1)


What this means is that I had to inject the following code into the
first line of the nroff file (after txt2tags created it):

'\" et

To a Solaris system, this special first line will tell man(1) that
the document should be processed by tbl and eqn along the way.
Once I added this, the boxes/tables started to work!!!  Cool.

And to all other operating systems, this will be seen as a nroff
comment (and ignored), so that makes the solution elegant and scalable.

What that means to you is that you could possibly add this to the
first line of all of the man pages that txt2tags creates.  Then it
will work everywhere, no matter where the man file was created.
Right now I have a workable solution by running the output file
through ed(1) to create this line afterwards.  But that's a hack.

Now HP-UX does not support this, so I am looking for an alternate
solution there.  I'm still researching those alternatives.  I'll get
back to you if I find an answer.

BTW:  I also use the same ed(1) call afterwards to modify the man
section in one swoop -- I know I can do that with a postproc line
in my t2t file, but I found using ed(1) to be more scalable
because I can control the section number externally during the
build process...like in the Makefile that I use to generate man
pages.  Later, an improvement might be to add an option to control
the man section externally as a command line option rather than a
postproc regexp.

I'll be in touch once I find a HP-UX solution.  Let me know what
you think about the Solaris solution and the possibility of adding
a way to specify a man section from the command line.

-- Tom


In a previous message, Aurélio Jargas wrote:
> Hello Tom,
>
> Thanks for using my little program!
>
> I don't know much about the man/nroff format, but maybe tables are not
> supported at all in Solaris/HP-UX nroff? Or if they use a different tag
> for tables, which that could be? If you could send me an example of a
> working table on those systems, I can try to include in txt2tags.
>
> Bye
>
>
> On Thu, Dec 3, 2009 at 18:16, storm 9C1 <storm...@skymagik.net> wrote:
>>
>> Hello,
>>
>> I am a pretty hardcore user of txt2tags, mostly for Unix Man page
>> generation and subsequent HTML generation as well.
>>
>> I am a Unix Engineer who uses all of the major flavors of Unix and
>> often must write man pages for the software that I develop.  The
>> txt2tags tool is by far the best tool to help with that process.
>>  Other free tools don't even come close (aside from writing raw *roff
>> code by hand).
>>
>> I do have a question about using tables on Solaris 10.
>>
>> The following code does not render properly using Solaris man(1):
>>
>> || ATTRIBUTE TYPE | ATTRIBUTE VALUE |
>> | Availability | SUNWxyz |
>> | CSI | enabled |
>> | Interface Stability | Standard |
>>
>>
>> When using man(1) (or even nroff -man), it renders as:
>>
>>     allbox, tab(^); ll.
>>      ATTRIBUTE TYPE^ATTRIBUTE VALUE
>>      Availability^SUNWcsu
>>      CSI^enabled
>>      Interface Stability^Standard
>>
>>
>>
>>
>> And on HP-UX, it renders as:
>>
>>      ________________________________________
>>        ATTRIBUTE TYPE        ATTRIBUTE VALUE
>>      ________________________________________
>>        Availability          SUNWcsu
>>      ________________________________________
>>        CSI                   enabled
>>      ________________________________________
>>
>>
>> (With the rest of the man page following as really messed up).
>>
>>
>>
>>
>>
>> Yet on Linux, it renders OK:
>>
>>       +---------------------+-----------------+
>>       | ATTRIBUTE TYPE      | ATTRIBUTE VALUE |
>>       +---------------------+-----------------+
>>       | Availability        | SUNWcsu         |
>>       +---------------------+-----------------+
>>       | CSI                 | enabled         |
>>       +---------------------+-----------------+
>>       | Interface Stability | Standard        |
>>       +---------------------+-----------------+
>>
>>
>> The HTML rendering is fine too.
>>
>> I am thinking there is an issue with the .TS tbl code generated by
>> txt2tags.  Has anyone ever ran into this bug before?
>>
>> Thanks!
>>
>> -- Tom
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>> a free event focused on virtualization and cloud computing.
>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>> http://p.sf.net/sfu/redhat-sfdev2dev
>> _______________________________________________
>> txt2tags-list mailing list
>> https://lists.sourceforge.net/lists/listinfo/txt2tags-list
>
>
>
> --
> Aurélio | www.aurelio.net | @oreio
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> txt2tags-list mailing list
> https://lists.sourceforge.net/lists/listinfo/txt2tags-list




------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list

Reply via email to