On Wednesday 09 January 2002 04:22, Paul A. Franz, P.E. wrote:
> I am real new to Lyx. My interest is in its potential for writing Linux
> documentation. specifically Howto's and man pages.
>
> I've gotten it installed. Read through the tutorial and spent a bunch of
> time using google trying to figure some things out.
>
> Here is what I think you need to do to use it to write a man page.
>
> 1) Start Lyx. Open using a template, I select Linuxdoc.
>
> I get a warning message:
>
> LyX: Unknown token `\cursor'. Inserting as text. [around line 45 of file
> /usr/share/lyx/templates/linuxdoctemplate.lyx]

  Oops, I did forget to update that file. That is done in the new version. 
Ignore this warning.

> 2) I try a few different templates. Some do the above error, some don't.

  That is fixed in cvs.

> 3) I understand that if the Linuxdoc template would work, (I believe it did
> yesterday) then I could create a man page, export it as a .DVI then use
> some program in SGML-tools to convert this to the man page format which is
> groff or nroff or troff that is gzipped. Anyway, that part is pretty
> unclear to me so far.

  I append an example of it.

> Questions.
>
> 1) How do I fix that startup problem?
>
> 2) What template should I be using. I believe this is called a text class.
> Correct?

  I don't need to use any template. The easier thing to do is start from a 
blank document and change it to manpage, in Layout->Document->Class.

  Since you are there change the Extra Options: to 
title="mytitle" sectnum="mysectnum"

where mytitle is the title of the man page and sectnum is the section number 
of the manpage.

> 3) what successive steps to I do to create the actual man page?

  I'm sure it can be done from inside LyX but for now export the document as 
linuxdoc and from the command line do:

sgml2txt -m myfile.sgml

> 4) Apparently, man pages must be rendered (formatted) for display. What is
> actually happening. I always just do this to print one "man -t manpage |
> lpr" which apparently sends the manpage through the troff filter to
> generate postscript for the printer.

  I don't get you here.

> 5) How does one generate a template file?

  That is a lyx file with some things from the preamble cutted.

> Thanks

  Tell me if this helps,

>   * L I N U X * .~.  Paul A. Franz, P.E.      Engineering Software
>    The Choice   /V\  Blackdog Software        Network Consulting and Sales
>    of the GNU  /( )\ <http://blackdog.bellevue.wa.us/> Custom Web Services
>    Generation  ^^-^^ (425) 641-8202, (425) 641-1773 FAX    Internet FAX

-- 
José Abílio
#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass manpage
\options title="linuxdoc" sectnum="5"
\language english
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize 10
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Section

Secret
\layout Standard

The last super hyper program.
 With lots of cool options that are senseless.
 Try it today, you will not regret the choice.
\layout Section

Public
\layout Standard

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
 blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
 blah blah blah blah blah blah blah.
\layout Section

Author
\layout Standard

Me.
 All rights reserved.
\the_end
<!doctype linuxdoc system>

<manpage title="linuxdoc" sectnum="5">
<!-- LyX 1.1 created this file. For more info see http://www.lyx.org/ -->
<sect1>
Secret
<p>
The last super hyper program. With lots of cool options that
 are senseless. Try it today, you will not regret the choice.
</p>
<sect1>
Public
<p>
Blah blah blah blah blah blah blah blah blah blah blah blah blah
 blah blah blah blah blah blah blah blah blah blah blah blah blah
 blah blah blah blah blah blah blah blah blah blah blah.
</p>
<sect1>
Author
<p>
Me. All rights reserved.
</p>


</manpage>

Attachment: manpage.man
Description: Troff document

Reply via email to