From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com [209.85.213.174]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 95d26108; for ; Tue, 7 Jul 2015 12:31:02 -0500 (EST) Received: by igcqs7 with SMTP id qs7so37914685igc.0 for ; Tue, 07 Jul 2015 10:31:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :comments:mime-version:content-type:content-id :content-transfer-encoding:date:message-id; bh=U0cZAQ4MJxwWY5iXGux6bq9WoygY7UT5r5J+UlOq/mY=; b=j4tE0PWEuRaSqNpy6qS2o3uLNII6f+b7ArwsirsVwmCAMKNH8dGyLO6YCtxvm6Rc6Y bszfHKziGDlWoKNjdauajbe7b7L2drC/u2iNTaXQ5Un72VnYeR9mq4H1Nw1nvDI38uF5 962HYO05pUr4/eabpiegRUUzoguOdWo5zmR/Z2rVmRx8aGl7dmqj5jvw3/Fz8T+BZjly S7bCZAF+1FtLnJHj87T7kCAwi8QCwglSrgjN2EcsTSzRii8VmS8OMitQnqxf79z/tw7k MlByHs2jPIfOzuN4okLKJW93UKEobnGHulS11nxSrXR9N3oOjnAaIkyzzWeOpPjgPGNw 8RFg== X-Gm-Message-State: ALoCoQnv4ekJAzz7kuXK8gw8xwly6O4AUo94NkIULQPk+VEsKuWW7dLs+sZQZ1nRzo9ZIxHIfAMa X-Received: by 10.107.132.227 with SMTP id o96mr6103514ioi.52.1436290259198; Tue, 07 Jul 2015 10:30:59 -0700 (PDT) Received: from cathet.us. (75-161-121-227.albq.qwest.net. [75.161.121.227]) by mx.google.com with ESMTPSA id 191sm15020557iof.18.2015.07.07.10.30.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2015 10:30:58 -0700 (PDT) Sender: "Anthony J. Bentley" Received: from CATHET.us (localhost [127.0.0.1]) by cathet.us. (OpenSMTPD) with ESMTP id ba50c208 for ; Tue, 7 Jul 2015 11:30:57 -0600 (MDT) From: "Anthony J. Bentley" To: discuss@mdocml.bsd.lv Subject: Re: Identifying doc formats In-reply-to: References: Comments: In-reply-to Warren Block message dated "Tue, 07 Jul 2015 11:23:24 -0600." X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <22357.1436290257.1@CATHET.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Jul 2015 11:30:57 -0600 Message-ID: <15279.1436290257@CATHET.us> Warren Block writes: > Can mandoc just detect and display the input format? > = > file(1) says both tcpdump.1 and ls.1 in FreeBSD are "troff or = > preprocessor input, ASCII text", although one is man and the other is = > mdoc. Yes, in -mandoc mode it is automatically detected; see mandoc(1): A third option, -mandoc, which is also the default, determines encodi= ng on-the-fly: if the first non-comment macro is =E2=80=98Dd=E2=80=99 or= =E2=80=98Dt=E2=80=99, the mdoc(7) parser is used; otherwise, the man(7) parser is used. > In a related note, the mandoc man page is a bit confusing about the = > input format option. The synopsis says that input formats are > = > [-mformat] > = > That implies--to me, at least--that it would be used as > = > -mmdoc > = > or > = > -mman > = > But... > = > % mandoc -mman tcpdump.1 > man: Bad argument > % mandoc -man tcpdump.1 > (works) > = > This seems to imply that the input formats could really be "doc", "an", = > and "andoc", and that's obviously not right. This is exactly the case. Troff macro sets are specified to troff via the -m option. For example, if you look at a groff installation, the following files are used: /usr/local/share/groff/1.22.3/tmac/an.tmac /usr/local/share/groff/1.22.3/tmac/andoc.tmac /usr/local/share/groff/1.22.3/tmac/doc.tmac -- = Anthony J. Bentley -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv