hilfe beim erstellen von manpage?

dettus

Bicycle User
hallo.

ich bin gerade dabei eine manpage zu schreiben.
jetzt moechte ich gerade einen ausschnitt von meiner config-datei in die page mit aufnehmen.

unter latex wuerde ich jetzt sowas coden
Code:
\begin{verbatim}
#DHEXCOLORSCHEME
#VERSION 0
#possible colors are: BLACK,GREEN,GREEN,YELLOW,BLUE,MAGENTA,CYAN,BLACK
#possible extra flags are: UNDERLINE,REVERSE,BLINK,DIM,BOLD

BRACKETS:       FG=BLACK,BG=BLACK,BOLD
HEXFIELD:       FG=WHITE,BG=BLACK
INPUT:          FG=BLACK,BG=WHITE
\end{verbatim}

aber wie mache ich das bei groff?
momentan habe ich leider noch keine gute zusammenstellung fuer groff kommandos gefunden. bis jetzt klaube ich mir einfach aus anderen pages immer das zusammen was ich benoetige. aber verbatim habe ich wie gesagt noch nicht gefunden.
 
Hier ist mal ein Beispiel aus der buildflags.conf(1) Manual-Page:
Code:
The intended way to use it is to add the following lines to
.Xr make.conf 5 .
.Bd -literal -offset indent
\&BUILDFLAGS=     %%DATADIR%%/buildflags.mk
\&.if exists(${BUILDFLAGS})
\&.include "${BUILDFLAGS}"
\&.endif
.Ed
Das ganze wird von nroff -mdoc so ausgegeben:
Code:
     The intended way to use it is to add the following lines to make.conf(5).

           BUILDFLAGS=     %%DATADIR%%/buildflags.mk
           .if exists(${BUILDFLAGS})
           .include "${BUILDFLAGS}"
           .endif
Das \& sorgt dafür, dass .if, .in und .en nicht als Anweisungen interpretiert werden. In der ersten Zeile ist es eigentlich überflüssig, da ist es nur stilistischer Zucker um die Sachen einheitlich zu halten.


Die Manual-Page, die dir am ehesten weiterhilft ist groff_mdoc(7).
 
Mion!

Eventl mag auch groff_mm(7) Dein Freund sein
(http://www.gsp.com/cgi-bin/man.cgi?section=7&topic=groff_mm).
VERBON [flag [pointsize [font]]]
Begin verbatim output using courier font. Usually for printing programs. All character has equal width. The pointsize can be changed with the second argument. By specifying the font-argument it is possible to use another font instead of courier. flag controls several special features. It contains the sum of all wanted features. Value

Description 1

Disable the escape-character (\). This is normally turned on during verbose output. 2

Add an empty line before the verbose text. 4

Add an empty line after the verbose text. 8

Print the verbose text with numbered lines. This adds four digitsized spaces in the beginning of each line. Finer control is available with the string-variable Verbnm. It contains all arguments to the troff-command .nm, normally ’1’. 16

Indent the verbose text with five ’n’:s. This is controlled by the number-variable Verbin (in units).
VERBOFF
End verbatim output.

Das nur als vorschlag, da a.) keine wirklich Ahnung, b.) on-the-fly Suche google. :)

Viele Grüße
swaf
 
Am besten einfach abgucken. Das habe ich für mein Zeug auch gemacht. Hat fast überhaupt keine Zeit gekostet, weil alle Man-Pages fast immer eine einzige Form haben.
 
Im guten, alten pod - Plain Old Documentation - schreiben und durch pod2man jagen... In meinen Augen der einfachste Weg,
 
groff_mm(7) war schonmal ein guter tipp. danke.
allerdings funktioniert verbon und verboff irgendwie so ueberhaupt nicht. :(

ich werde mir mal nachher doch den quelltext von groff zu gemuete fuehren.
 
groff_mm ist auch die falsche Seite. Manual Pages werden wie schon gesagt (zumindetst unter FreeBSD) mit groff_mdoc(7) gesetzt.
 
Zurück
Oben