From owner-freebsd-hackers Thu Aug 8 09:26:41 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA18344 for hackers-outgoing; Thu, 8 Aug 1996 09:26:41 -0700 (PDT) Received: from seagull.rtd.com (root@seagull.rtd.com [198.102.68.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA18329 for ; Thu, 8 Aug 1996 09:26:34 -0700 (PDT) Received: (from dgy@localhost) by seagull.rtd.com (8.7.5/8.7.3) id JAA18216; Thu, 8 Aug 1996 09:26:28 -0700 (MST) From: Don Yuniskis Message-Id: <199608081626.JAA18216@seagull.rtd.com> Subject: Re: problem while writing *roff man page To: sansig@freenet.hut.fi (Sandro Sigala) Date: Thu, 8 Aug 1996 09:26:28 -0700 (MST) Cc: freebsd-hackers@freebsd.org In-Reply-To: from "Sandro Sigala" at Aug 8, 96 05:47:50 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk It seems that Sandro Sigala said: > > Hi, i have a little problem writing a man page (Berkeley-style, mandoc) > for a my program. This is the header. > > .Dd August 7, 1996 > .Os > .Dt CINFOC 1 > .Sh NAME > .Nm cinfoc > .Nd cinfo database compiler > .Sh SYNOPSIS > .Nm cinfoc Just FYI... since you've already defined the "Nm", hereafter, you can use just "Nm" to insert the name where you want it... > .Op Fl dV <------ This is the problem dV is probably a macro. Precede it with "\&" (i.e. "\&dV") to prevent it being expanded as a macro. In general, you should routinely shove \& in front of any two letter sequence WITHIN A MACRO INVOCATION (e.g., within the .Op invocation as above). Likewise, precede any ".XX" (where X is any charater) with this... > .Op Ar > .Sh DESCRIPTION > [..snip..] > > The problem is that 'dV' is defined as a macro by the mandoc macro package, > so the *roff formatter doesn't print: > > SYNOPSIS > cinfoc [-dV] [file ...] > > but some crap/garbage/stuff/... :-) like: > > SYNOPSIS > cinfoc [-[]] [file ...] > > How to 'disable' the dV evaluation (need an escape like the '\' in C)? > I tried those lines but are not the solution. > > .Op Fl \Dv > .Op Fl 'Dv' > .Op Fl "Dv' > .... --don