Jean-Marc Lasgouttes wrote:
>
> >>>>> "José" == José Abílio de Oliveira Matos <[EMAIL PROTECTED]> writes:
>
> José> Hi, with this patch LyX now is capable to write manpages :-)
>
> José> First a linuxdoc file is produced from the lyx file, then
> José> using sgml-tools v1.0.9 + some simple patches, sgml2txt
> José> --manpage file, and there you have a manpage :-)
>
> José> As an example, I attach also the reLyX manpage, both the as
> José> the man outputs.
>
> José, I am about to commit your patch and have a question: does your
> explanation mean that people won't be able to use man pages directly?
The answer is two fold:
The manpage element in linuxdoc has an handicap, it doesn't support
[hyper|cross]references, and only supports a one level paragraph, i.e., it
doesn't enable subsections use.
This is a silly restriction, and comes from historical reasons. I have two
simple patches to solve this innability. They will not go directly in
sgmltools 1.0.x because the linuxdoc dtd is declared freezed, and Cees will
not change that anymore.
So as long as you don't use subsections, labels and
references/pagereferences, or url/htmlurl you don't need to change anything
and the support is ready. (*)
One example is the lyx manpage where none of this elements appear, so we
could translate the lyx manpage now to lyx.
The second part is this, sgml-tools v1.0.9 (the last from v1.0.x) has a
bug in the manpage support. Namely all the special entities like & -> &
>-> > and so on are not escaped and appear as [amp ] [gt ].
This is a bug, I also have a patch to solve that, and this will go in
sgml-tools v1.0.10. So until sgml-tools v1.0.10 is not out you have to apply
my patch.
> If so, we would need also a bit of doc to add to Extended Editing
> descibing how to use man pages...
I need that, and to solve other errors in documentation, I will solve that
this week and submit the changes to someone from the documentation team.
BTW, to have a manpage from lyx, you need to export it as linuxdoc:
File->Export->as linuxdoc.
And then sgml2txt -m file, and you will have a manpage file.man
> JMarc
(*) It is safe to add those features to manpages since they are normal in
all other documents and will be supported, as soon as sgmltools 2 is able to
support manpages again. After all [hyper|cross]references aren't exotic
features IMNSHO ;-)
--
José Abílio de Oliveira Matos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
According to the obituary notices, a mean and unimportant person never
dies.