From: millert Date: Sun, 9 Apr 2000 08:25:09 +0000 (+0000) Subject: groff 1.15 plus local changes (insomnia strikes): X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=79d7d4ad57273d6b713a69844c583b293d60c795;p=openbsd groff 1.15 plus local changes (insomnia strikes): o moved *.man to *.$section_in and generate *.$section not *.n for bsd.man.mk o modified groff Makefiles to not install man pages (we do it ourselves) o use mkstemp everywhere o don't install groff versions on mdoc macros, we want our own ones --- diff --git a/gnu/usr.bin/groff/Makefile.bsd-wrapper b/gnu/usr.bin/groff/Makefile.bsd-wrapper index 660a7048e5b..d38338a85ba 100644 --- a/gnu/usr.bin/groff/Makefile.bsd-wrapper +++ b/gnu/usr.bin/groff/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.15 2000/01/11 16:29:52 millert Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.16 2000/04/09 08:25:09 millert Exp $ # # groff config @@ -12,43 +12,23 @@ COMMON_WORDS= /usr/share/dict/eign GNUCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" GNUCXXFLAGS= CXX="${CXX}" CCFLAGS="${CXXFLAGS} ${COPTS}" -CLEANFILES= config.cache config.log pic/pic.cc eqn/eqn.cc \ - refer/label.cc pic/pic.tab.h eqn/eqn.tab.h ${MANALL} - -# All of groff's man pages have a .n extension. Sigh. -MANLOCALBUILD= yes - -MAN_SRC1= addftinfo/addftinfo.n groff/groff.n troff/troff.n \ - tbl/tbl.n pic/pic.n eqn/eqn.n grops/grops.n grotty/grotty.n \ - grodvi/grodvi.n tfmtodit/tfmtodit.n grolj4/grolj4.n \ - hpftodit/hpftodit.n refer/refer.n lookbib/lookbib.n \ - indxbib/indxbib.n lkbib/lkbib.n soelim/soelim.n \ - pfbtops/pfbtops.n psbb/psbb.n \ - afmtodit/afmtodit.n grog/grog.n nroff/nroff.n -MAN_SRC5= man/groff_font.n man/groff_out.n -MAN_SRC7= man/groff_char.n tmac/groff_ms.n tmac/me.n \ - tmac/msafer.n mm/groff_mm.n mm/groff_mmse.n - -MAN_BUILD1= ${MAN_SRC1:S/.n$/.cat1/g} -MAN_BUILD5= ${MAN_SRC5:S/.n$/.cat5/g} -MAN_BUILD7= ${MAN_SRC7:S/.n$/.cat7/g} - -# Used for cleaning, which is why it is independent of NOMAN -MANALL= ${MAN_BUILD1} ${MAN_BUILD5} ${MAN_BUILD7} -.ifndef NOMAN -MAN_BUILD= ${MANALL} -.endif - +CLEANFILES+= config.cache config.log pic/pic.cc eqn/eqn.cc \ + refer/label.cc pic/pic.tab.h eqn/eqn.tab.h -MLINKS= groff_ms.7 ms.7 groff_mm.7 mm.7 eqn.1 neqn.1 +MAN= addftinfo/addftinfo.1 afmtodit/afmtodit.1 eqn/eqn.1 \ + grodvi/grodvi.1 groff/groff.1 grog/grog.1 grohtml/grohtml.1 \ + grolj4/grolj4.1 grops/grops.1 grotty/grotty.1 hpftodit/hpftodit.1 \ + indxbib/indxbib.1 lkbib/lkbib.1 lookbib/lookbib.1 \ + man/groff_char.7 man/groff_font.5 man/groff_out.5 mm/groff_mm.7 \ + mm/groff_mmse.7 nroff/nroff.1 pfbtops/pfbtops.1 pic/pic.1 \ + psbb/psbb.1 refer/refer.1 soelim/soelim.1 tbl/tbl.1 \ + tfmtodit/tfmtodit.1 tmac/groff_man.7 tmac/groff_me.7 tmac/groff_ms.7 \ + tmac/groff_msafer.7 troff/troff.1 -.SUFFIXES: .n .cat1 .cat5 .cat7 +MLINKS= groff_man.7 man.7 groff_me.7 me.7 groff_mm.7 mm.7 groff_ms.7 ms.7 \ + eqn.1 neqn.1 -.n.cat1 .n.cat5 .n.cat7: - @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}" - @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false) - -all: config.status gnu_build ${MAN_BUILD} +all: config.status gnu_build .FORCE: .IGNORE @@ -92,14 +72,13 @@ install: maninstall fontdir=${DESTDIR}${FONTDIR} \ indexdir=${DESTDIR}${INDEXDIR} \ common_words_file=${DESTDIR}${COMMON_WORDS} \ - INSTALL_MAN= TMAC_AN= TMAC_ANDOC= MDOCFILES= tmac_an= \ install install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/tmac/tmac.an \ ${DESTDIR}${DATASUBDIR}/tmac/tmac.an.old clean cleandir: - rm -f ${CLEANFILES} -@if [ -e Makefile ]; then ${MAKE} distclean; fi + rm -f ${CLEANFILES} depend: # Nothing here so far... @@ -112,7 +91,7 @@ tags: .ifdef NOMAN maninstall: - # Dummy target for bootstrap... + @echo NOMAN is set .endif .include diff --git a/gnu/usr.bin/groff/Makefile.comm b/gnu/usr.bin/groff/Makefile.comm index ddbd1321228..34b828e7462 100644 --- a/gnu/usr.bin/groff/Makefile.comm +++ b/gnu/usr.bin/groff/Makefile.comm @@ -31,7 +31,6 @@ TOP=.. LIBGROFF=$(TOP)/libgroff/libgroff.a LIBBIB=$(TOP)/libbib/libbib.a LIBDRIVER=$(TOP)/libdriver/libdriver.a -LIBM=-lm MLIB= XLIBS= YTABH= @@ -50,18 +49,14 @@ MANPAGES=$(MAN1) $(MAN5) $(MAN7) MANCLEAN=$(MANPAGES) fontsubdir=$(fontdir)/dev$(DEV) -# Target to use for installing unformatted man-pages. Some systems may not -# want them installed. -INSTALL_MAN=install_man +all install install_bin install_data TAGS depend distfiles uninstall_sub: -all install install_bin install_data $(INSTALL_MAN) TAGS depend distfiles uninstall_sub: - -install: install_bin install_data $(INSTALL_MAN) +install: install_bin install_data uninstall: uninstall_sub pure: .PHONY: all clean distclean mostlyclean realclean extraclean depend distfiles -.PHONY: install install_bin install_data $(INSTALL_MAN) +.PHONY: install install_bin install_data .PHONY: uninstall uninstall_sub .PHONY: pure @@ -83,7 +78,7 @@ extraclean: \#* *~ =* core junk grot old temp tmp tem .SUFFIXES: -.SUFFIXES: .o .cc .c .y .man .n +.SUFFIXES: .o .cc .c .y .1_in .1 .5_in .5 .7_in .7 .cc.o: $(COMPILE.cc) $< @@ -108,7 +103,7 @@ extraclean: fi; \ fi -.man.n: +.1_in.1 .5_in.5 .7_in.7: @echo Making $@ from $< @-rm -f $@ @sed -e "s;@FONTDIR@;$(fontdir);g" \ @@ -125,6 +120,7 @@ extraclean: -e "s;@MAN7EXT@;$(man7ext);g" \ -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \ -e "s;@TMAC_M_PREFIX@;$(tmac_m_prefix);g" \ + -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \ -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \ -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \ -e "s;@VERSION@;`cat $(srcdir)/../VERSION`;g" \ @@ -135,11 +131,11 @@ extraclean: .PHONY: install_man install_man: - -test -d $(mandir) || mkdir $(mandir) + -test -d $(manroot) || mkdir $(manroot) -test -d $(man1dir) || mkdir $(man1dir) @-pages="$(MAN1)"; \ for p in $$pages; do \ - prog=`basename $$p .n`; \ + prog=`basename $$p .1`; \ target=$(man1dir)/$(NAMEPREFIX)$$prog.$(man1ext); \ rm -f $$target; \ echo $(INSTALL_DATA) $$p $$target; \ @@ -148,7 +144,7 @@ install_man: -test -d $(man5dir) || mkdir $(man5dir) @-pages="$(MAN5)"; \ for p in $$pages; do \ - target=$(man5dir)/`basename $$p .n`.$(man5ext); \ + target=$(man5dir)/`basename $$p .5`.$(man5ext); \ rm -f $$target; \ echo $(INSTALL_DATA) $$p $$target; \ $(INSTALL_DATA) $$p $$target; \ @@ -156,7 +152,7 @@ install_man: -test -d $(man7dir) || mkdir $(man7dir) @-pages="$(MAN7)"; \ for p in $$pages; do \ - target=$(man7dir)/`basename $$p .n`.$(man7ext); \ + target=$(man7dir)/`basename $$p .5`.$(man7ext); \ rm -f $$target; \ echo $(INSTALL_DATA) $$p $$target; \ $(INSTALL_DATA) $$p $$target; \ @@ -166,19 +162,19 @@ install_man: uninstall_man: @-pages="$(MAN1)"; \ for p in $$pages; do \ - target=$(man1dir)/$(NAMEPREFIX)`basename $$p .n`.$(man1ext); \ + target=$(man1dir)/$(NAMEPREFIX)`basename $$p .1`.$(man1ext); \ echo rm -f $$target; \ rm -f $$target; \ done @-pages="$(MAN5)"; \ for p in $$pages; do \ - target=$(man5dir)/`basename $$p .n`.$(man5ext); \ + target=$(man5dir)/`basename $$p .5`.$(man5ext); \ echo rm -f $$target; \ rm -f $$target; \ done @-pages="$(MAN7)"; \ for p in $$pages; do \ - target=$(man7dir)/`basename $$p .n`.$(man7ext); \ + target=$(man7dir)/`basename $$p .7`.$(man7ext); \ echo rm -f $$target; \ rm -f $$target; \ done diff --git a/gnu/usr.bin/groff/Makefile.in b/gnu/usr.bin/groff/Makefile.in index dda93617c98..dd0ef84a973 100644 --- a/gnu/usr.bin/groff/Makefile.in +++ b/gnu/usr.bin/groff/Makefile.in @@ -64,7 +64,7 @@ DVIPRINT=@DVIPRINT@ g=@g@ # Common prefix for installation directories. -# Used in definitions of exec_prefix, datasubdir, fontpath, mandir. +# Used in definitions of exec_prefix, datasubdir, fontpath, manroot. # This must already exist when you do make install. prefix=@prefix@ @@ -130,20 +130,20 @@ indexname=Ind # otherwise the supplied eign file will be used. common_words_file=$(datasubdir)/eign -# mandir is the root of the man page directory tree. -mandir=@mandir@ +# manroot is the root of the man page directory tree. +manroot=$(prefix)/man # man1ext is the man section for user commands. man1ext=1 -man1dir=$(mandir)/man$(man1ext) +man1dir=$(manroot)/man$(man1ext) # man5ext is the man section for file formats. man5ext=5 -man5dir=$(mandir)/man$(man5ext) +man5dir=$(manroot)/man$(man5ext) # man7ext is the man section for macros. man7ext=7 -man7dir=$(mandir)/man$(man7ext) +man7dir=$(manroot)/man$(man7ext) # DEFINES should include the following: # -DHAVE_MMAP if you have mmap() and @@ -166,8 +166,13 @@ man7dir=$(mandir)/man$(man7ext) # -DUNISTD_H_DECLARES_GETOPT if your C++ declares getopt() # -DSTDLIB_H_DECLARES_PUTENV if your C++ declares putenv() # -DSTDIO_H_DECLARES_POPEN if your C++ declares popen() +# -DSTDIO_H_DECLARES_PCLOSE if your C++ declares pclose() +# -DHAVE_SYS_NERR if you have sysnerr in or +# -DHAVE_SYS_ERRLIST if you have sys_errlist in or +# +# -DMATH_H_DECLARES_HYPOT if you have hypot() in # -DTRADITIONAL_CPP if your C++ compiler uses a traditional -# (Reiser) preprocessor. +# (Reiser) preprocessor # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t * # -DHAVE_STRUCT_EXCEPTION if defines struct exception # -DRETSIGTYPE=int if signal handlers return int not void @@ -187,11 +192,12 @@ CDEFINES=$(DEFINES) CCFLAGS=@CXXFLAGS@ CFLAGS=@CFLAGS@ -LDFLAGS= +LDFLAGS=@LDFLAGS@ YACC=@YACC@ YACCFLAGS=-v LIBS=@LIBS@ +LIBM=@LIBM@ RANLIB=@RANLIB@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ @@ -214,15 +220,6 @@ PURIFYCCFLAGS= #PURIFYCCFLAGS=-g++=yes \ # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld -# -# XXX - OpenBSD build mods -# -INSTALL_MAN=install_man -TMAC_AN=tmac.an -TMAC_ANDOC=tmac.andoc -TMAC_S=tmac.s -MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms - # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second # copy of $(MDEFINES) when making individual directories; this could # cause the argument list to become too long on some systems. @@ -235,7 +232,7 @@ MDEFINES="MAKEOVERRIDES=$(MAKEOVERRIDES)" \ "tmacdir=$(tmacdir)" "tmacpath=$(tmacpath)" \ "indexext=$(indexext)" "indexdir=$(indexdir)" \ "indexname=$(indexname)" "common_words_file=$(common_words_file)" \ - "mandir=$(mandir)" "man1ext=$(man1ext)" "man1dir=$(man1dir)" \ + "manroot=$(manroot)" "man1ext=$(man1ext)" "man1dir=$(man1dir)" \ "man5ext=$(man5ext)" "man5dir=$(man5dir)" \ "man7ext=$(man7ext)" "man7dir=$(man7dir)" \ "tmac_wrap=$(tmac_wrap)" "sys_tmac_prefix=$(sys_tmac_prefix)" \ @@ -243,29 +240,28 @@ MDEFINES="MAKEOVERRIDES=$(MAKEOVERRIDES)" \ "tmac_s_prefix=$(tmac_s_prefix)" "tmac_m_prefix=$(tmac_m_prefix)" \ "CCC=$(CCC)" "CC=$(CC)" "CCDEFINES=$(CCDEFINES)" "CDEFINES=$(CDEFINES)" \ "CCFLAGS=$(CCFLAGS)" "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" \ - "YACC=$(YACC)" "YACCFLAGS=$(YACCFLAGS)" \ + "YACC=$(YACC)" "YACCFLAGS=$(YACCFLAGS)" "LIBM=$(LIBM)" \ "LIBS=$(LIBS)" "LIBOBJS=$(LIBOBJS)" "RANLIB=$(RANLIB)" "AR=$(AR)" \ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_DATA=$(INSTALL_DATA)" \ "ETAGS=$(ETAGS)" "ETAGSFLAGS=$(ETAGSFLAGS)" "ETAGSCCFLAG=$(ETAGSCCFLAG)" \ "PERLPATH=$(PERLPATH)" "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \ - "PURIFY=$(PURIFY)" "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \ - "INSTALL_MAN=$(INSTALL_MAN)" "TMAC_AN=$(TMAC_AN)" "TMAC_ANDOC=$(TMAC_ANDOC)" \ - "TMAC_S=$(TMAC_S)" "MDOCFILES=$(MDOCFILES)" "tmac_m=$(tmac_m_prefix)m" + "PURIFY=$(PURIFY)" "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" SHELL=/bin/sh INCDIRS=include LIBDIRS=libgroff libdriver libbib CCPROGDIRS=groff troff tbl pic eqn grops grotty grodvi tfmtodit \ - grolj4 hpftodit refer lookbib indxbib lkbib soelim addftinfo + grolj4 hpftodit refer lookbib indxbib lkbib soelim addftinfo \ + grohtml CPROGDIRS=pfbtops psbb PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS) DEVDIRS=devps devdvi devascii devlatin1 devX75 devX75-12 devX100 devX100-12 \ - devlj4 + devlj4 devhtml OTHERDIRS=man tmac afmtodit grog nroff mm ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS) EXTRADIRS=devps/generate devdvi/generate xditview doc DISTDIRS=$(ALLDIRS) $(EXTRADIRS) -TARGETS=all install install_bin install_data $(INSTALL_MAN) clean distclean mostlyclean \ +TARGETS=all install install_bin install_data clean distclean mostlyclean \ realclean extraclean distfiles TAGS depend uninstall_sub do=all @@ -280,7 +276,7 @@ $(TARGETS): dot: FORCE @$(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \ -f $(srcdir)/Makefile.comm -f $(srcdir)/Makefile.sub $(do) - + $(LIBDIRS): FORCE @if test $(srcdir) = .; \ then srcdir=.; \ @@ -359,6 +355,7 @@ dist: rm -f Makefile; \ $(LN_S) $$srcdir/Makefile.init Makefile mv tmp groff-$(version) + rm -f groff-$(version).tar.gz tar cfh - groff-$(version) | gzip -c >groff-$(version).tar.gz rm -fr groff-$(version) @@ -395,7 +392,7 @@ uninstall: uninstall_sub uninstall_dirs .PHONY: uninstall_dirs uninstall_dirs: # Use rmdir here so that the directories are only removed if they're empty - -rmdir $(man1dir) $(man5dir) $(man7dir) $(mandir) \ + -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \ $(tmacdir) $(fontdir) $(bindir) $(datasubdir) $(datadir) diff --git a/gnu/usr.bin/groff/addftinfo/Makefile.sub b/gnu/usr.bin/groff/addftinfo/Makefile.sub index 95a8f5bf585..d48bf62f966 100644 --- a/gnu/usr.bin/groff/addftinfo/Makefile.sub +++ b/gnu/usr.bin/groff/addftinfo/Makefile.sub @@ -1,5 +1,5 @@ PROG=addftinfo -MAN1=addftinfo.n +MAN1=addftinfo.1 XLIBS=$(LIBGROFF) OBJS=addftinfo.o guess.o CCSRCS=addftinfo.cc guess.cc diff --git a/gnu/usr.bin/groff/addftinfo/addftinfo.1_in b/gnu/usr.bin/groff/addftinfo/addftinfo.1_in new file mode 100644 index 00000000000..6741c171f64 --- /dev/null +++ b/gnu/usr.bin/groff/addftinfo/addftinfo.1_in @@ -0,0 +1,102 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH ADDFTINFO @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +addftinfo \- add information to troff font files for use with groff +.SH SYNOPSIS +.B addftinfo +[ +.BI \- param\ value\fR.\|.\|. +] +.I res +.I unitwidth +.I font +.SH DESCRIPTION +.B addftinfo +reads a troff font file +and adds some additional font-metric information +that is used by the groff system. +The font file with the information added is written on the +standard output. +The information added is guessed using +some parametric information about the font +and assumptions +about the traditional troff names for characters. +The main information added is the heights and depths of characters. +The +.I res +and +.I unitwidth +arguments should be the same as the corresponding parameters +in the DESC file; +.I font +is the name of the file describing the font; +if +.I font +ends with +.B I +the font will be assumed to be italic. +.SH OPTIONS +Each of the options changes one of the parameters that is used +to derive the heights and depths. +Like the existing quantities in the font +file, each +.I value +is in +.RI inches/ res +for a font whose point size is +.IR unitwidth . +.I param +must be one of: +.TP +.B x-height +The height of lowercase letters without ascenders such as x. +.TP +.B fig-height +The height of figures (digits). +.TP +.B asc-height +The height of characters with ascenders, such as b, d or l. +.TP +.B body-height +The height of characters such as parentheses. +.TP +.B cap-height +The height of uppercase letters such as A. +.TP +.B comma-depth +The depth of a comma. +.TP +.B desc-depth +The depth of characters with descenders, such as p,q, or y. +.TP +.B body-depth +The depth of characters such as parentheses. +.LP +.B addftinfo +makes no attempt to use the specified parameters to guess +the unspecified parameters. +If a parameter is not specified the default will be used. +The defaults are chosen to have the reasonable values for +a Times font. +.SH "SEE ALSO" +.BR font (5) +.BR groff_font (@MAN5EXT@), +.BR groff (@MAN1EXT@), +.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/addftinfo/addftinfo.man b/gnu/usr.bin/groff/addftinfo/addftinfo.man deleted file mode 100644 index 6741c171f64..00000000000 --- a/gnu/usr.bin/groff/addftinfo/addftinfo.man +++ /dev/null @@ -1,102 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH ADDFTINFO @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -addftinfo \- add information to troff font files for use with groff -.SH SYNOPSIS -.B addftinfo -[ -.BI \- param\ value\fR.\|.\|. -] -.I res -.I unitwidth -.I font -.SH DESCRIPTION -.B addftinfo -reads a troff font file -and adds some additional font-metric information -that is used by the groff system. -The font file with the information added is written on the -standard output. -The information added is guessed using -some parametric information about the font -and assumptions -about the traditional troff names for characters. -The main information added is the heights and depths of characters. -The -.I res -and -.I unitwidth -arguments should be the same as the corresponding parameters -in the DESC file; -.I font -is the name of the file describing the font; -if -.I font -ends with -.B I -the font will be assumed to be italic. -.SH OPTIONS -Each of the options changes one of the parameters that is used -to derive the heights and depths. -Like the existing quantities in the font -file, each -.I value -is in -.RI inches/ res -for a font whose point size is -.IR unitwidth . -.I param -must be one of: -.TP -.B x-height -The height of lowercase letters without ascenders such as x. -.TP -.B fig-height -The height of figures (digits). -.TP -.B asc-height -The height of characters with ascenders, such as b, d or l. -.TP -.B body-height -The height of characters such as parentheses. -.TP -.B cap-height -The height of uppercase letters such as A. -.TP -.B comma-depth -The depth of a comma. -.TP -.B desc-depth -The depth of characters with descenders, such as p,q, or y. -.TP -.B body-depth -The depth of characters such as parentheses. -.LP -.B addftinfo -makes no attempt to use the specified parameters to guess -the unspecified parameters. -If a parameter is not specified the default will be used. -The defaults are chosen to have the reasonable values for -a Times font. -.SH "SEE ALSO" -.BR font (5) -.BR groff_font (@MAN5EXT@), -.BR groff (@MAN1EXT@), -.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/afmtodit/Makefile.sub b/gnu/usr.bin/groff/afmtodit/Makefile.sub index fb5daac6ce8..cc1b15bae9d 100644 --- a/gnu/usr.bin/groff/afmtodit/Makefile.sub +++ b/gnu/usr.bin/groff/afmtodit/Makefile.sub @@ -1,4 +1,4 @@ -MAN1=afmtodit.n +MAN1=afmtodit.1 CLEANADD=afmtodit all: afmtodit diff --git a/gnu/usr.bin/groff/afmtodit/afmtodit.1_in b/gnu/usr.bin/groff/afmtodit/afmtodit.1_in new file mode 100644 index 00000000000..84fe8f292c0 --- /dev/null +++ b/gnu/usr.bin/groff/afmtodit/afmtodit.1_in @@ -0,0 +1,221 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +afmtodit \- create font files for use with groff \-Tps +.SH SYNOPSIS +.B afmtodit +[ +.B \-ns +] +[ +.BI \-d desc_file +] +[ +.BI \-e enc_file +] +[ +.BI \-i n +] +[ +.BI \-a n +] +.I afm_file +.I map_file +.I font +.SH DESCRIPTION +.B afmtodit +creates a font file for use with groff and +.BR grops . +.B afmtodit +is written in perl; +you must have perl version 3 installed in order to run +.BR afmtodit . +.I afm_file +is the AFM (Adobe Font Metric) file for the font. +.I map_file +is a file that says which groff character names map onto +each PostScript character name; +this file should contain a sequence of lines of the form +.IP +.I +ps_char groff_char +.LP +where +.I ps_char +is the PostScript name of the character +and +.I groff_char +is the groff name of the character (as used in the groff font file.) +The same +.I ps_char +can occur multiple times in the file; +each +.I groff_char +must occur at most once. +.I font +is the groff name of the font. +If a PostScript character is in the encoding to be used for the font +but is not mentioned in +.I map_file +then +.B afmtodit +will put it in the groff font file as an unnamed character, +which can be accessed by the +.B \eN +escape sequence in +.BR troff . +The groff font file will be output to a file called +.IR font . +.LP +If there is a downloadable font file for the font, it may be listed in +the file +.BR @FONTDIR@/devps/download ; +see +.BR grops (@MAN1EXT@). +.LP +If the +.B \-i +option is used, +.B afmtodit +will automatically generate an italic correction, +a left italic correction and a subscript correction +for each character +(the significance of these parameters is explained in +.BR groff_font (@MAN5EXT@)); +these parameters may be specified for individual characters by +adding to the +.I afm_file +lines of the form: +.IP +.BI italicCorrection\ ps_char\ n +.br +.BI leftItalicCorrection\ ps_char\ n +.br +.BI subscriptCorrection\ ps_char\ n +.LP +where +.I ps_char +is the PostScript name of the character, +and +.I n +is the desired value of the corresponding parameter in thousandths of an em. +These parameters are normally needed only for italic (or oblique) fonts. +.SH OPTIONS +.TP +.B \-n +Don't output a +.B ligatures +command for this font. +Use this with constant-width fonts. +.TP +.B \-s +The font is special. +The effect of this option is to add the +.B special +command to the font file. +.TP +.BI \-d desc_file +The device description file is +.I desc_file +rather than the default +.BR DESC . +.TP +.BI \-e enc_file +The PostScript font should be reencoded to use the encoding described +in enc_file. +The format of +.I enc_file +is described in +.BR grops (@MAN1EXT@). +.TP +.BI \-a n +Use +.I n +as the slant parameter in the font file; +this is used by groff in the positioning of accents. +By default +.B afmtodit +uses the negative of the ItalicAngle specified in the afm file; +with true italic fonts it is sometimes desirable to use +a slant that is less than this. +If you find that characters from an italic font have accents +placed too far to the right over them, +then use the +.B \-a +option to give the font a smaller slant. +.TP +.BI \-i n +Generate an italic correction for each character so that +the character's width plus the character's italic correction +is equal to +.I n +thousandths of an em +plus the amount by which the right edge of the character's bounding +is to the right of the character's origin. +If this would result in a negative italic correction, use a zero +italic correction instead. +.IP +Also generate a subscript correction equal to the +product of the tangent of the slant of the font and +four fifths of the x-height of the font. +If this would result in a subscript correction greater than the italic +correction, use a subscript correction equal to the italic correction +instead. +.IP +Also generate a left italic correction for each character +equal to +.I n +thousandths of an em +plus the amount by which the left edge of the character's bounding box +is to the left of the character's origin. +The left italic correction may be negative. +.IP +This option is normally needed only with italic (or oblique) fonts. +The font files distributed with groff were created using an option of +.B \-i50 +for italic fonts. +.SH FILES +.Tp \w'\fB@FONTDIR@/devps/download'u+2n +.B @FONTDIR@/devps/DESC +Device description file. +.TP +.BI @FONTDIR@/devps/ F +Font description file for font +.IR F . +.TP +.B @FONTDIR@/devps/download +List of downloadable fonts. +.TP +.B @FONTDIR@/devps/text.enc +Encoding used for text fonts. +.TP +.B @FONTDIR@/devps/generate/textmap +Standard mapping. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR grops (@MAN1EXT@), +.BR groff_font (@MAN5EXT@), +.BR perl (1) diff --git a/gnu/usr.bin/groff/afmtodit/afmtodit.man b/gnu/usr.bin/groff/afmtodit/afmtodit.man deleted file mode 100644 index 84fe8f292c0..00000000000 --- a/gnu/usr.bin/groff/afmtodit/afmtodit.man +++ /dev/null @@ -1,221 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -afmtodit \- create font files for use with groff \-Tps -.SH SYNOPSIS -.B afmtodit -[ -.B \-ns -] -[ -.BI \-d desc_file -] -[ -.BI \-e enc_file -] -[ -.BI \-i n -] -[ -.BI \-a n -] -.I afm_file -.I map_file -.I font -.SH DESCRIPTION -.B afmtodit -creates a font file for use with groff and -.BR grops . -.B afmtodit -is written in perl; -you must have perl version 3 installed in order to run -.BR afmtodit . -.I afm_file -is the AFM (Adobe Font Metric) file for the font. -.I map_file -is a file that says which groff character names map onto -each PostScript character name; -this file should contain a sequence of lines of the form -.IP -.I -ps_char groff_char -.LP -where -.I ps_char -is the PostScript name of the character -and -.I groff_char -is the groff name of the character (as used in the groff font file.) -The same -.I ps_char -can occur multiple times in the file; -each -.I groff_char -must occur at most once. -.I font -is the groff name of the font. -If a PostScript character is in the encoding to be used for the font -but is not mentioned in -.I map_file -then -.B afmtodit -will put it in the groff font file as an unnamed character, -which can be accessed by the -.B \eN -escape sequence in -.BR troff . -The groff font file will be output to a file called -.IR font . -.LP -If there is a downloadable font file for the font, it may be listed in -the file -.BR @FONTDIR@/devps/download ; -see -.BR grops (@MAN1EXT@). -.LP -If the -.B \-i -option is used, -.B afmtodit -will automatically generate an italic correction, -a left italic correction and a subscript correction -for each character -(the significance of these parameters is explained in -.BR groff_font (@MAN5EXT@)); -these parameters may be specified for individual characters by -adding to the -.I afm_file -lines of the form: -.IP -.BI italicCorrection\ ps_char\ n -.br -.BI leftItalicCorrection\ ps_char\ n -.br -.BI subscriptCorrection\ ps_char\ n -.LP -where -.I ps_char -is the PostScript name of the character, -and -.I n -is the desired value of the corresponding parameter in thousandths of an em. -These parameters are normally needed only for italic (or oblique) fonts. -.SH OPTIONS -.TP -.B \-n -Don't output a -.B ligatures -command for this font. -Use this with constant-width fonts. -.TP -.B \-s -The font is special. -The effect of this option is to add the -.B special -command to the font file. -.TP -.BI \-d desc_file -The device description file is -.I desc_file -rather than the default -.BR DESC . -.TP -.BI \-e enc_file -The PostScript font should be reencoded to use the encoding described -in enc_file. -The format of -.I enc_file -is described in -.BR grops (@MAN1EXT@). -.TP -.BI \-a n -Use -.I n -as the slant parameter in the font file; -this is used by groff in the positioning of accents. -By default -.B afmtodit -uses the negative of the ItalicAngle specified in the afm file; -with true italic fonts it is sometimes desirable to use -a slant that is less than this. -If you find that characters from an italic font have accents -placed too far to the right over them, -then use the -.B \-a -option to give the font a smaller slant. -.TP -.BI \-i n -Generate an italic correction for each character so that -the character's width plus the character's italic correction -is equal to -.I n -thousandths of an em -plus the amount by which the right edge of the character's bounding -is to the right of the character's origin. -If this would result in a negative italic correction, use a zero -italic correction instead. -.IP -Also generate a subscript correction equal to the -product of the tangent of the slant of the font and -four fifths of the x-height of the font. -If this would result in a subscript correction greater than the italic -correction, use a subscript correction equal to the italic correction -instead. -.IP -Also generate a left italic correction for each character -equal to -.I n -thousandths of an em -plus the amount by which the left edge of the character's bounding box -is to the left of the character's origin. -The left italic correction may be negative. -.IP -This option is normally needed only with italic (or oblique) fonts. -The font files distributed with groff were created using an option of -.B \-i50 -for italic fonts. -.SH FILES -.Tp \w'\fB@FONTDIR@/devps/download'u+2n -.B @FONTDIR@/devps/DESC -Device description file. -.TP -.BI @FONTDIR@/devps/ F -Font description file for font -.IR F . -.TP -.B @FONTDIR@/devps/download -List of downloadable fonts. -.TP -.B @FONTDIR@/devps/text.enc -Encoding used for text fonts. -.TP -.B @FONTDIR@/devps/generate/textmap -Standard mapping. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR grops (@MAN1EXT@), -.BR groff_font (@MAN5EXT@), -.BR perl (1) diff --git a/gnu/usr.bin/groff/configure b/gnu/usr.bin/groff/configure index 2d20ce8ab2a..e6800ae4e81 100644 --- a/gnu/usr.bin/groff/configure +++ b/gnu/usr.bin/groff/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.10 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -49,6 +49,9 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -330,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.10" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -432,11 +435,14 @@ do done # NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -497,8 +503,11 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -512,54 +521,19 @@ else fi -if test "x$prefix" = xNONE; then -echo $ac_n "checking for prefix by ""... $ac_c" 1>&6 -# Extract the first word of "grops", so it can be a program name with args. -set dummy grops; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_path_GROPS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GROPS" in - /*) - ac_cv_path_GROPS="$GROPS" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GROPS="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -GROPS="$ac_cv_path_GROPS" -if test -n "$GROPS"; then - echo "$ac_t""$GROPS" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -n "$ac_cv_path_GROPS"; then - prefix=`echo $ac_cv_path_GROPS|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` - fi -fi - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:528: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -580,15 +554,17 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:558: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -623,10 +599,92 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:609: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 652 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:688: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -635,7 +693,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -643,48 +701,63 @@ fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:716: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes + ac_cv_prog_cc_g=yes else - ac_cv_prog_gcc_g=no + ac_cv_prog_cc_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi -for ac_prog in $CCC c++ g++ gcc CC cxx +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:752: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CXX="$ac_prog" @@ -706,7 +779,55 @@ done test -n "$CXX" || CXX="gcc" +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:784: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext << EOF + +#line 795 "configure" +#include "confdefs.h" + +int main(){return(0);} +EOF +if { (eval echo configure:800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:826: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:831: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -715,7 +836,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -723,60 +844,48 @@ fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + if test $ac_cv_prog_gxx = yes; then GXX=yes - if test "${CXXFLAGS+set}" != set; then - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then +else + GXX= +fi + +ac_test_CXXFLAGS="${CXXFLAGS+set}" +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS= +echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:859: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_gxx_g=yes + ac_cv_prog_cxx_g=yes else - ac_cv_prog_gxx_g=no + ac_cv_prog_cxx_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 - if test $ac_cv_prog_gxx_g = yes; then - CXXFLAGS="-g -O" - else - CXXFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" fi else - GXX= - test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" -fi - -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi fi -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross @@ -785,39 +894,45 @@ ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross if test "$cross_compiling" = no; then -echo $ac_n "checking that C++ compiler can compile simple program""... $ac_c" 1>&6 + echo $ac_n "checking that C++ compiler can compile simple program""... $ac_c" 1>&6 +echo "configure:903: checking that C++ compiler can compile simple program" >&5 fi if test "$cross_compiling" = yes; then : else -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then echo "$ac_t""yes" 1>&6 else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } -fi + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""no" 1>&6;{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } fi rm -fr conftest* +fi + if test "$cross_compiling" = no; then -echo $ac_n "checking that C++ static constructors and destructors are called""... $ac_c" 1>&6 + echo $ac_n "checking that C++ static constructors and destructors are called""... $ac_c" 1>&6 +echo "configure:930: checking that C++ static constructors and destructors are called" >&5 fi if test "$cross_compiling" = yes; then : else -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then echo "$ac_t""yes" 1>&6 else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } -fi + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""no" 1>&6;{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } fi rm -fr conftest* +fi + echo $ac_n "checking that header files support C++""... $ac_c" 1>&6 +echo "configure:968: checking that header files support C++" >&5 cat > conftest.$ac_ext < -int main() { return 0; } -int t() { +int main() { fopen(0, 0); ; return 0; } EOF -if { (eval echo configure:859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 -{ echo "configure: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" 1>&2; exit 1; } + echo "$ac_t""no" 1>&6;{ echo "configure: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" 1>&2; exit 1; } fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross -if test -z "$PSPRINT" -then +if test -z "$PSPRINT"; then for ac_prog in lpr do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1001: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LPR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LPR"; then ac_cv_prog_LPR="$LPR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_LPR="$ac_prog" @@ -911,14 +1031,16 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1035: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LP"; then ac_cv_prog_LP="$LP" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_LP="$ac_prog" @@ -938,8 +1060,7 @@ fi test -n "$LP" && break done - if test -n "$LPR" && test -n "$LP" - then + if test -n "$LPR" && test -n "$LP"; then # HP-UX provides an lpr command that emulates lpr using lp, # but it doesn't have lpq; in this case we want to use lp # rather than lpr. @@ -948,14 +1069,16 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1073: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LPQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LPQ"; then ac_cv_prog_LPQ="$LPQ" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_LPQ="$ac_prog" @@ -977,23 +1100,21 @@ done test -n "$LPQ" || LPR= fi - if test -n "$LPR" - then + if test -n "$LPR"; then PSPRINT="$LPR" - elif test -n "$LP" - then + elif test -n "$LP"; then PSPRINT="$LP" fi fi echo $ac_n "checking for command to use for printing PostScript files""... $ac_c" 1>&6 +echo "configure:1112: checking for command to use for printing PostScript files" >&5 echo "$ac_t""$PSPRINT" 1>&6 # Figure out DVIPRINT from PSPRINT. echo $ac_n "checking for command to use for printing dvi files""... $ac_c" 1>&6 -if test -n "$PSPRINT" && test -z "$DVIPRINT" -then - if test "X$PSPRINT" = "Xlpr" - then +echo "configure:1116: checking for command to use for printing dvi files" >&5 +if test -n "$PSPRINT" && test -z "$DVIPRINT"; then + if test "X$PSPRINT" = "Xlpr"; then DVIPRINT="lpr -d" else DVIPRINT="$PSPRINT" @@ -1004,6 +1125,7 @@ echo "$ac_t""$DVIPRINT" 1>&6 # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1129: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERLPATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1011,9 +1133,13 @@ else /*) ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PERLPATH="$ac_dir/$ac_word" @@ -1037,14 +1163,16 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1167: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" @@ -1068,14 +1196,16 @@ test -n "$YACC" || YACC="yacc" # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1200: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -1122,27 +1252,30 @@ ac_install_sh="$ac_dir/install-sh -c" # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1261: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -1153,7 +1286,7 @@ else ;; esac done - IFS="$ac_save_ifs" + IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then @@ -1172,9 +1305,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1314: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1195,6 +1331,7 @@ else fi echo $ac_n "checking for csh hash hack""... $ac_c" 1>&6 +echo "configure:1335: checking for csh hash hack" >&5 cat <conftest.sh #!/bin/sh true || exit 0 @@ -1202,16 +1339,15 @@ export PATH || exit 0 exit 1 EOF chmod +x conftest.sh -if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1 -then +if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then echo "$ac_t""yes" 1>&6; SH_SCRIPT_SED_CMD='1s/.*/:/' else echo "$ac_t""no" 1>&6; SH_SCRIPT_SED_CMD='' fi rm -f conftest.sh - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1351: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1226,38 +1362,61 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi +rm -f conftest* +fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi @@ -1269,24 +1428,27 @@ echo "$ac_t""$CPP" 1>&6 for ac_hdr in unistd.h dirent.h limits.h sys/dir.h stdlib.h do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1434: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1294,7 +1456,7 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:1471: checking for ISC 3.x or 4.x" >&5 if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 then echo "$ac_t""yes" 1>&6 @@ -1316,63 +1479,69 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking whether -D_POSIX_SOURCE is necessary""... $ac_c" 1>&6 +echo "configure:1483: checking whether -D_POSIX_SOURCE is necessary" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < extern "C" { void fileno(int); } -int main() { return 0; } -int t() { +int main() { ; return 0; } EOF -if { (eval echo configure:1337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking declaration of getopt in stdlib.h""... $ac_c" 1>&6 +echo "configure:1530: checking declaration of getopt in stdlib.h" >&5 cat > conftest.$ac_ext < extern "C" { void getopt(int); } -int main() { return 0; } -int t() { +int main() { ; return 0; } EOF -if { (eval echo configure:1373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define STDLIB_H_DECLARES_GETOPT 1 @@ -1380,23 +1549,24 @@ EOF fi rm -f conftest* - echo $ac_n "checking declaration of getopt in unistd.h""... $ac_c" 1>&6 +echo "configure:1554: checking declaration of getopt in unistd.h" >&5 cat > conftest.$ac_ext < #include extern "C" { void getopt(int); } -int main() { return 0; } -int t() { +int main() { ; return 0; } EOF -if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define UNISTD_H_DECLARES_GETOPT 1 @@ -1404,72 +1574,77 @@ EOF fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking declaration of putenv""... $ac_c" 1>&6 +echo "configure:1594: checking declaration of putenv" >&5 cat > conftest.$ac_ext < extern "C" { void putenv(int); } -int main() { return 0; } -int t() { +int main() { ; return 0; } EOF -if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""yes" 1>&6 -cat >> confdefs.h <<\EOF + echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define STDLIB_H_DECLARES_PUTENV 1 EOF fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking declaration of popen""... $ac_c" 1>&6 +echo "configure:1633: checking declaration of popen" >&5 cat > conftest.$ac_ext < extern "C" { void popen(int); } -int main() { return 0; } -int t() { +int main() { ; return 0; } EOF -if { (eval echo configure:1470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define STDIO_H_DECLARES_POPEN 1 @@ -1477,35 +1652,38 @@ EOF fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking declaration of pclose""... $ac_c" 1>&6 +echo "configure:1672: checking declaration of pclose" >&5 cat > conftest.$ac_ext < extern "C" { void pclose(int); } -int main() { return 0; } -int t() { +int main() { ; return 0; } EOF -if { (eval echo configure:1506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define STDIO_H_DECLARES_PCLOSE 1 @@ -1513,104 +1691,230 @@ EOF fi rm -f conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking for sys_nerr in or ""... $ac_c" 1>&6 +echo "configure:1711: checking for sys_nerr in or " >&5 +cat > conftest.$ac_ext < +#include +int main() { +int k; k = sys_nerr; +; return 0; } +EOF +if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF +#define HAVE_SYS_NERR 1 +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking for sys_errlist in or ""... $ac_c" 1>&6 +echo "configure:1750: checking for sys_errlist in or " >&5 +cat > conftest.$ac_ext < +#include +int main() { +int k; k = (int)sys_errlist[0]; +; return 0; } +EOF +if { (eval echo configure:1760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF +#define HAVE_SYS_ERRLIST 1 +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking declaration of hypot""... $ac_c" 1>&6 +echo "configure:1789: checking declaration of hypot" >&5 +cat > conftest.$ac_ext < +extern "C" { double hypot(double,double); } +int main() { + +; return 0; } +EOF +if { (eval echo configure:1799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""no" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF +#define MATH_H_DECLARES_HYPOT 1 +EOF + +fi +rm -f conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking C++ ""... $ac_c" 1>&6 +echo "configure:1828: checking C++ " >&5 cat > conftest.$ac_ext < -int main() { return 0; } -int t() { +int main() { read(0, 0, 0); open(0, 0); ; return 0; } EOF -if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define HAVE_CC_OSFCN_H 1 EOF else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking C++ ""... $ac_c" 1>&6 +echo "configure:1866: checking C++ " >&5 cat > conftest.$ac_ext < -int main() { return 0; } -int t() { +int main() { int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; ; return 0; } EOF -if { (eval echo configure:1576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define HAVE_CC_LIMITS_H 1 EOF else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for declaration of time_t""... $ac_c" 1>&6 +echo "configure:1904: checking for declaration of time_t" >&5 cat > conftest.$ac_ext < -int main() { return 0; } -int t() { +int main() { time_t t = time(0); struct tm *p = localtime(&t); ; return 0; } EOF -if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF #define LONG_FOR_TIME_T 1 @@ -1618,19 +1922,20 @@ EOF fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:1934: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1643,20 +1948,20 @@ extern "C" void (*signal (int, void (*)(int)))(int); void (*signal ()) (); #endif -int main() { return 0; } -int t() { +int main() { int i; ; return 0; } EOF -if { (eval echo configure:1652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* - fi echo "$ac_t""$ac_cv_type_signal" 1>&6 @@ -1666,35 +1971,119 @@ EOF echo $ac_n "checking struct exception""... $ac_c" 1>&6 +echo "configure:1975: checking struct exception" >&5 cat > conftest.$ac_ext < -int main() { return 0; } -int t() { +int main() { struct exception e; ; return 0; } EOF -if { (eval echo configure:1679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define HAVE_STRUCT_EXCEPTION 1 EOF else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* +echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 +echo "configure:1998: checking for sin in -lm" >&5 +ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" -for ac_func in valloc getpagesize +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBM=-lm +else + echo "$ac_t""no" 1>&6 +fi + + + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2043: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2082: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -1741,94 +2131,170 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then +echo "configure:2135: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - ac_cv_func_mmap=no + ac_cv_func_mmap_fixed_mapped=no else -cat > conftest.$ac_ext < conftest.$ac_ext < #include #include +/* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif -# else -# ifdef NBPC -# define getpagesize() NBPC -# else -# define getpagesize() PAGESIZE /* SVR4 */ -# endif -# endif +# ifdef HAVE_UNISTD_H +# include # endif -#endif -#ifndef HAVE_VALLOC -# define valloc malloc -#endif +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ #ifdef __cplusplus -extern "C" { void *valloc(unsigned), *malloc(unsigned); } +extern "C" { void *malloc(unsigned); } #else -char *valloc(), *malloc(); +char *malloc(); #endif int main() { - char *buf1, *buf2, *buf3; - int i = getpagesize(), j; - int i2 = i * 2; - int fd; - - buf1 = (char *)valloc(i2); - buf2 = (char *)valloc(i); - buf3 = (char *)malloc(i2); - for (j = 0; j < i2; ++j) - *(buf1 + j) = rand(); - fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); - write(fd, buf1, i2); - mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); - for (j = 0; j < i; ++j) - if (*(buf1 + j) != *(buf2 + j)) - exit(1); - lseek(fd, (long)i, 0); - read(fd, buf2, i); /* read into mapped memory -- file should not change */ - /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ - lseek(fd, (long)0, 0); - read(fd, buf3, i2); - for (j = 0; j < i2; ++j) - if (*(buf1 + j) != *(buf3 + j)) - exit(1); - exit(0); + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); } EOF -{ (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_mmap=yes +if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes else - ac_cv_func_mmap=no -fi + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no fi rm -fr conftest* fi -echo "$ac_t""$ac_cv_func_mmap" 1>&6 -if test $ac_cv_func_mmap = yes; then +fi + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF #define HAVE_MMAP 1 EOF @@ -1836,15 +2302,16 @@ EOF fi saved_libs="$LIBS" -LIBS="$LIBS -lm" +LIBS="$LIBS -lc $LIBM" for ac_func in fmod strtol getcwd strerror putenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2310: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.o" +LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi - done + LIBS="$saved_libs" for ac_func in rename mkstemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2368: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -1943,11 +2417,12 @@ fi done echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 +echo "configure:2421: checking for sys_siglist declaration in signal.h or unistd.h" >&5 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1955,20 +2430,20 @@ else #ifdef HAVE_UNISTD_H #include #endif -int main() { return 0; } -int t() { +int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:1964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_decl_sys_siglist=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 @@ -1984,22 +2459,25 @@ ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether ANSI array delete syntax supported""... $ac_c" 1>&6 +echo "configure:2467: checking whether ANSI array delete syntax supported" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF #define ARRAY_DELETE_NEEDS_SIZE 1 @@ -2007,56 +2485,59 @@ EOF fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking traditional preprocessor""... $ac_c" 1>&6 +echo "configure:2505: checking traditional preprocessor" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define TRADITIONAL_CPP 1 EOF else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* - ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking w_coredump""... $ac_c" 1>&6 +echo "configure:2535: checking w_coredump" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""no" 1>&6 else -cat > conftest.$ac_ext < conftest.$ac_ext < #include main() @@ -2069,56 +2550,52 @@ main() exit(i != 0200); #endif } - EOF -{ (eval echo configure:2075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF #define WCOREFLAG 0200 EOF else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* echo "$ac_t""no" 1>&6 fi -fi rm -fr conftest* +fi + echo $ac_n "checking default value for grops -b option""... $ac_c" 1>&6 +echo "configure:2571: checking default value for grops -b option" >&5 test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7 echo "$ac_t""$BROKEN_SPOOLER_FLAGS" 1>&6 echo $ac_n "checking default paper size""... $ac_c" 1>&6 -if test -z "$PAGE" -then +echo "configure:2576: checking default paper size" >&5 +if test -z "$PAGE"; then descfile= - if test -r $prefix/share/groff/font/devps/DESC - then + if test -r $prefix/share/groff/font/devps/DESC; then descfile=$prefix/share/groff/font/devps/DESC - elif test -r $prefix/lib/groff/font/devps/DESC - then + elif test -r $prefix/lib/groff/font/devps/DESC; then descfile=$prefix/lib/groff/font/devps/DESC fi if test -n "$descfile" \ - && grep "^paperlength 841890" $descfile >/dev/null 2>&1 - then + && grep "^paperlength 841890" $descfile >/dev/null 2>&1; then PAGE=A4 else PAGE=letter fi fi -if test -z "$PAGE" -then +if test -z "$PAGE"; then dom=`awk '($1 == "dom" || $1 == "search") { print $2; exit}' \ /etc/resolv.conf 2>/dev/null` - - if test -z "$dom" - then + if test -z "$dom"; then dom=`(domainname) 2>/dev/null | tr -d '+'` - if test -z "$dom" - then + if test -z "$dom"; then dom=`(hostname) 2>/dev/null | grep '\.'` fi fi - # If the top-level domain is two letters and it's not `us' or `ca' # then they probably use A4 paper. case "$dom" in @@ -2130,9 +2607,8 @@ test -n "$PAGE" || PAGE=letter echo "$ac_t""$PAGE" 1>&6 echo $ac_n "checking for existing troff installation""... $ac_c" 1>&6 -if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" \ - = x0 -then +echo "configure:2611: checking for existing troff installation" >&5 +if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then echo "$ac_t""yes" 1>&6 g=g else @@ -2141,21 +2617,17 @@ else fi - echo $ac_n "checking for prefix of system macro packages""... $ac_c" 1>&6 +echo "configure:2622: checking for prefix of system macro packages" >&5 sys_tmac_prefix= sys_tmac_file_prefix= -for d in /usr/share/lib/tmac /usr/lib/tmac -do - for t in "" tmac. - do - for m in an s m - do +for d in /usr/share/lib/tmac /usr/lib/tmac; do + for t in "" tmac.; do + for m in an s m; do f=$d/$t$m if test -z "$sys_tmac_prefix" \ && test -f $f \ - && grep '^\.if' $f >/dev/null 2>&1 - then + && grep '^\.if' $f >/dev/null 2>&1; then sys_tmac_prefix=$d/$t sys_tmac_file_prefix=$t fi @@ -2166,42 +2638,37 @@ echo "$ac_t""$sys_tmac_prefix" 1>&6 tmac_wrap= echo $ac_n "checking which system macro packages should be made available""... $ac_c" 1>&6 -if test "x$sys_tmac_file_prefix" = "xtmac." -then - for f in $sys_tmac_prefix* - do +echo "configure:2642: checking which system macro packages should be made available" >&5 +if test "x$sys_tmac_file_prefix" = "xtmac."; then + for f in $sys_tmac_prefix*; do suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` case "$suff" in - e);; + e) ;; *) - grep "Copyright.*Free Software Foundation" $f >/dev/null \ - || tmac_wrap="$tmac_wrap $suff" - ;; + grep "Copyright.*Free Software Foundation" $f >/dev/null \ + || tmac_wrap="$tmac_wrap $suff" ;; esac done -elif test -n "$sys_tmac_prefix" -then +elif test -n "$sys_tmac_prefix"; then files=`echo $sys_tmac_prefix*` grep "\\.so" $files >conftest.sol - for f in $files - do + for f in $files; do case "$f" in - ${sys_tmac_prefix}e) ;; + ${sys_tmac_prefix}e) ;; *.me) ;; */ms.*) ;; *) - b=`basename $f` - if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ - || grep -l "Copyright.*Free Software Foundation" $f >/dev/null - then - : - else - suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` - case "$suff" in - tmac.*);; - *) tmac_wrap="$tmac_wrap $suff" ;; - esac - fi + b=`basename $f` + if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ + || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then + : + else + suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` + case "$suff" in + tmac.*) ;; + *) tmac_wrap="$tmac_wrap $suff" ;; + esac + fi esac done rm -f conftest.sol @@ -2226,11 +2693,25 @@ cat > confcache <<\EOF # --recheck option to rerun configure. # EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache if cmp -s $cache_file confcache; then : else @@ -2297,7 +2778,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.10" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2317,9 +2798,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2338,7 +2821,6 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@GROPS@%$GROPS%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@LPR@%$LPR%g @@ -2350,10 +2832,12 @@ s%@PERLPATH@%$PERLPATH%g s%@YACC@%$YACC%g s%@RANLIB@%$RANLIB%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g s%@SH_SCRIPT_SED_CMD@%$SH_SCRIPT_SED_CMD%g s%@CPP@%$CPP%g +s%@LIBM@%$LIBM%g s%@LIBOBJS@%$LIBOBJS%g s%@BROKEN_SPOOLER_FLAGS@%$BROKEN_SPOOLER_FLAGS%g s%@PAGE@%$PAGE%g @@ -2363,20 +2847,56 @@ s%@tmac_wrap@%$tmac_wrap%g CEOF EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust relative srcdir, etc. for subdirectories. + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -2404,6 +2924,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -2412,16 +2933,22 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f conftest.subs +rm -f conftest.s* +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF diff --git a/gnu/usr.bin/groff/doc/groff.texinfo b/gnu/usr.bin/groff/doc/groff.texinfo index dafba18b604..0cf1c09d3d9 100644 --- a/gnu/usr.bin/groff/doc/groff.texinfo +++ b/gnu/usr.bin/groff/doc/groff.texinfo @@ -3920,7 +3920,7 @@ request can make a macro have more than one name. This would be called as @example -.vl $Id: groff.texinfo,v 1.1.1.1 2000/04/09 07:58:37 millert Exp $ +.vl $Id: groff.texinfo,v 1.2 2000/04/09 08:25:11 millert Exp $ @end example diff --git a/gnu/usr.bin/groff/doc/pic.ms b/gnu/usr.bin/groff/doc/pic.ms index fa6b2b97cd2..c20c346e26b 100644 --- a/gnu/usr.bin/groff/doc/pic.ms +++ b/gnu/usr.bin/groff/doc/pic.ms @@ -10,7 +10,7 @@ .\" This document was written for free use and redistribution by .\" Eric S. Raymond in August 1995. .\" -.\" $Id: pic.ms,v 1.1.1.2 2000/04/09 07:58:38 millert Exp $ +.\" $Id: pic.ms,v 1.2 2000/04/09 08:25:11 millert Exp $ .\" .\" Set a proper TeX .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X diff --git a/gnu/usr.bin/groff/eqn/Makefile.sub b/gnu/usr.bin/groff/eqn/Makefile.sub index 692bf42e4ef..df50b6e1958 100644 --- a/gnu/usr.bin/groff/eqn/Makefile.sub +++ b/gnu/usr.bin/groff/eqn/Makefile.sub @@ -1,5 +1,5 @@ PROG=eqn -MAN1=eqn.n +MAN1=eqn.1 XLIBS=$(LIBGROFF) OBJS=eqn.o main.o lex.o box.o limit.o list.o over.o text.o script.o \ mark.o other.o delim.o sqrt.o pile.o special.o diff --git a/gnu/usr.bin/groff/eqn/eqn.1_in b/gnu/usr.bin/groff/eqn/eqn.1_in new file mode 100644 index 00000000000..8c67b911e5a --- /dev/null +++ b/gnu/usr.bin/groff/eqn/eqn.1_in @@ -0,0 +1,879 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.ie \n(.V<\n(.v .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X +.el .ds tx TeX +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.\" The BSD man macros can't handle " in arguments to font change macros, +.\" so use \(ts instead of ". +.tr \(ts" +.TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@eqn \- format equations for troff +.SH SYNOPSIS +.B @g@eqn +[ +.B \-rvCNR +] +[ +.BI \-d cc +] +[ +.BI \-T name +] +[ +.BI \-M dir +] +[ +.BI \-f F +] +[ +.BI \-s n +] +[ +.BI \-p n +] +[ +.BI \-m n +] +[ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +This manual page describes the GNU version of +.BR eqn , +which is part of the groff document formatting system. +.B eqn +compiles descriptions of equations embedded within +.B troff +input files into commands that are understood by +.BR troff . +Normally, it should be invoked using the +.B \-e +option of +.BR groff . +The syntax is quite compatible with Unix eqn. +The output of GNU eqn cannot be processed with Unix troff; +it must be processed with GNU troff. +If no files are given on the command line, the standard input +will be read. +A filename of +.B \- +will cause the standard input to be read. +.LP +.B eqn +searches for the file +.B eqnrc +using the path +.BR @MACROPATH@ . +If it exists, eqn will process it before the other input files. +The +.B \-R +option prevents this. +.LP +GNU eqn does not provide the functionality of neqn: +it does not support low-resolution, typewriter-like devices +(although it may work adequately for very simple input). +.SH OPTIONS +.TP +.B \-C +Recognize +.B .EQ +and +.B .EN +even when followed by a character other than space or newline. +.TP +.B \-N +Don't allow newlines within delimiters. +This option allows +.B eqn +to recover better from missing closing delimiters. +.TP +.B \-v +Print the version number. +.TP +.B \-r +Only one size reduction. +.TP +.BI \-m n +The minimum point-size is +.IR n . +eqn will not reduce the size of subscripts or superscripts to +a smaller size than +.IR n . +.TP +.BI \-T name +The output is for device +.IR name . +The only effect of this is to define a macro +.I name +with a value of +.BR 1 . +Typically +.B eqnrc +will use this to provide definitions appropriate for the output device. +The default output device is +.BR @DEVICE@ . +.TP +.BI \-M dir +Search +.I dir +for +.B eqnrc +before the default directories. +.TP +.B \-R +Don't load +.BR eqnrc . +.TP +.BI \-f F +This is equivalent to a +.BI gfont\ F +command. +.TP +.BI \-s n +This is equivalent to a +.BI gsize\ n +command. +This option is deprecated. +eqn will normally set equations at whatever the current point size +is when the equation is encountered. +.TP +.BI \-p n +This says that subscripts and superscripts should be +.I n +points smaller than the surrounding text. +This option is deprecated. +Normally eqn makes sets subscripts and superscripts at 70% +of the size of the surrounding text. +.SH USAGE +Only the differences between GNU eqn and Unix eqn are described here. +.LP +Most of the new features of GNU eqn +are based on \*(tx. +There are some references to the differences between \*(tx and GNU eqn below; +these may safely be ignored if you do not know \*(tx. +.SS Automatic spacing +.LP +.B eqn +gives each component of an equation a type, and adjusts the spacing +between components using that type. +Possible types are: +.TP \w'punctuation'u+2n +ordinary +an ordinary character such as 1 or +.IR x ; +.TP +operator +a large operator such as +.ds Su \s+5\(*S\s0 +.if \n(.g .if !c\(*S .ds Su the summation operator +\*(Su; +.TP +binary +a binary operator such as +; +.TP +relation +a relation such as =; +.TP +opening +a opening bracket such as (; +.TP +closing +a closing bracket such as ); +.TP +punctuation +a punctuation character such as ,; +.TP +inner +a subformula contained within brackets; +.TP +suppress +spacing that suppresses automatic spacing adjustment. +.LP +Components of an equation get a type in one of two ways. +.TP +.BI type\ t\ e +This yields an equation component that contains +.I e +but that has type +.IR t , +where +.I t +is one of the types mentioned above. +For example, +.B times +is defined as +.RS +.IP +.B +type "binary" \e(mu +.RE +.IP +The name of the type doesn't have to be quoted, but quoting protects +from macro expansion. +.TP +.BI chartype\ t\ text +Unquoted groups of characters are split up into individual characters, +and the type of each character is looked up; +this changes the type that is stored for each character; +it says that the characters in +.I text +from now on have type +.IR t . +For example, +.RS +.IP +.B +chartype "punctuation" .,;: +.RE +.IP +would make the characters +.B .,;: +have type punctuation +whenever they subsequently appeared in an equation. +The type +.I t +can also be +.B letter +or +.BR digit ; +in these cases +.B chartype +changes the font type of the characters. +See the Fonts subsection. +.SS New primitives +.TP +.IB e1\ smallover\ e2 +This is similar to +.BR over ; +.B smallover +reduces the size of +.I e1 +and +.IR e2 ; +it also puts less vertical space between +.I e1 +or +.I e2 +and the fraction bar. +The +.B over +primitive corresponds to the \*(tx +.B \eover +primitive in display styles; +.B smallover +corresponds to +.B \eover +in non-display styles. +.TP +.BI vcenter\ e +This vertically centers +.I e +about the math axis. +The math axis is the vertical position about which characters +such as + and - are centered; also it is the vertical position +used for the bar of fractions. +For example, +.B sum +is defined as +.RS +.IP +.B +{ type "operator" vcenter size +5 \e(*S } +.RE +.TP +.IB e1\ accent\ e2 +This sets +.I e2 +as an accent over +.IR e1 . +.I e2 +is assumed to be at the correct height for a lowercase letter; +.I e2 +will be moved down according if +.I e1 +is taller or shorter than a lowercase letter. +For example, +.B hat +is defined as +.RS +.IP +.B +accent { "^" } +.RE +.IP +.BR dotdot , +.BR dot , +.BR tilde , +.B vec +and +.B dyad +are also defined using the +.B accent +primitive. +.TP +.IB e1\ uaccent\ e2 +This sets +.I e2 +as an accent under +.IR e1 . +.I e2 +is assumed to be at the correct height for a character without a descender; +.I e2 +will be moved down if +.I e1 +has a descender. +.B utilde +is pre-defined using +.B uaccent +as a tilde accent below the baseline. +.TP +.BI split\ \(ts text \(ts +This has the same effect as simply +.RS +.IP +.I text +.RE +.IP +but +.I text +is not subject to macro expansion because it is quoted; +.I text +will be split up and the spacing between individual characters +will be adjusted. +.TP +.BI nosplit\ text +This has the same effect as +.RS +.IP +.BI \(ts text \(ts +.RE +.IP +but because +.I text +is not quoted it will be subject to macro expansion; +.I text +will not be split up +and the spacing between individual characters will not be adjusted. +.TP +.IB e\ opprime +This is a variant of +.B prime +that acts as an operator on +.IR e . +It produces a different result from +.B prime +in a case such as +.BR A\ opprime\ sub\ 1 : +with +.B opprime +the +.B 1 +will be tucked under the prime as a subscript to the +.B A +(as is conventional in mathematical typesetting), +whereas with +.B prime +the +.B 1 +will be a subscript to the prime character. +The precedence of +.B opprime +is the same as that of +.B bar +and +.BR under , +which is higher than that of everything except +.B accent +and +.BR uaccent . +In unquoted text a +.B ' +that is not the first character will be treated like +.BR opprime . +.TP +.BI special\ text\ e +This constructs a new object from +.I e +using a +.BR @g@troff (@MAN1EXT@) +macro named +.IR text . +When the macro is called, +the string +.B 0s +will contain the output for +.IR e , +and the number registers +.BR 0w , +.BR 0h , +.BR 0d , +.BR 0skern +and +.BR 0skew +will contain the width, height, depth, subscript kern, and skew of +.IR e . +(The +.I "subscript kern" +of an object says how much a subscript on that object should be tucked in; +the +.I skew +of an object says how far to the right of the center of the object an +accent over the object should be placed.) +The macro must modify +.B 0s +so that it will output the desired result with its origin at the current +point, and increase the current horizontal position by the width +of the object. +The number registers must also be modified so that they correspond to the +result. +.RS +.LP +For example, suppose you wanted a construct that `cancels' an expression +by drawing a diagonal line through it. +.IP +.nf +.ft B +.ne 6+\n(.Vu +\&.EQ +define cancel 'special Ca' +\&.EN +\&.de Ca +\&.ds 0s \eZ'\e\e*(0s'\ev'\e\en(0du'\eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\ev'\e\en(0hu' +\&.. +.ft +.fi +.LP +Then you could cancel an expression +.I e +with +.BI cancel\ {\ e\ } +.LP +Here's a more complicated construct that draws a box round an expression: +.IP +.nf +.ft B +.ne 11+\n(.Vu +\&.EQ +define box 'special Bx' +\&.EN +\&.de Bx +\&.ds 0s \eZ'\eh'1n'\e\e*(0s'\e +\eZ'\ev'\e\en(0du+1n'\eD'l \e\en(0wu+2n 0'\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e +\eD'l -\e\en(0wu-2n 0'\eD'l 0 \e\en(0hu+\e\en(0du+2n''\eh'\e\en(0wu+2n' +\&.nr 0w +2n +\&.nr 0d +1n +\&.nr 0h +1n +\&.. +.ft +.fi +.RE +.SS Customization +The appearance of equations is controlled by +a large number of parameters. These can be set using +the +.B set +command. +.TP +.BI set\ p\ n +This sets parameter +.I p +to value +.I n ; +.I n +is an integer. +For example, +.RS +.IP +.B +set x_height 45 +.RE +.IP +says that +.B eqn +should assume an x height of 0.45 ems. +.RS +.LP +Possible parameters are as follows. +Values are in units of hundredths of an em unless otherwise stated. +These descriptions are intended to be expository rather than +definitive. +.TP \w'\fBdefault_rule_thickness'u+2n +.B minimum_size +.B eqn +will not set anything at a smaller point-size than this. +The value is in points. +.TP +.B fat_offset +The +.B fat +primitive emboldens an equation +by overprinting two copies of the equation +horizontally offset by this amount. +.TP +.B over_hang +A fraction bar will be longer by twice this amount than +the maximum of the widths of the numerator and denominator; +in other words, it will overhang the numerator and +denominator by at least this amount. +.TP +.B accent_width +When +.B bar +or +.B under +is applied to a single character, +the line will be this long. +Normally, +.B bar +or +.B under +produces a line whose length is the width of the object to which it applies; +in the case of a single character, +this tends to produce a line that looks too long. +.TP +.B delimiter_factor +Extensible delimiters produced with the +.B left +and +.B right +primitives will have a combined height and depth of at least this many +thousandths of twice the maximum amount by which the sub-equation that +the delimiters enclose extends away from the axis. +.TP +.B delimiter_shortfall +Extensible delimiters produced with the +.B left +and +.B right +primitives will have a combined height and depth +not less than the difference of +twice the maximum amount by which the sub-equation that +the delimiters enclose extends away from the axis +and this amount. +.TP +.B null_delimiter_space +This much horizontal space is inserted +on each side of a fraction. +.TP +.B script_space +The width of subscripts and superscripts is increased by this amount. +.TP +.B thin_space +This amount of space is automatically inserted after punctuation +characters. +.TP +.B medium_space +This amount of space is automatically inserted on either side +of binary operators. +.TP +.B thick_space +This amount of space is automatically inserted on either side of +relations. +.TP +.B x_height +The height of lowercase letters without ascenders such as x. +.TP +.B axis_height +The height above the baseline of the center of characters +such as \(pl and \(mi. +It is important that this value is correct for the font +you are using. +.TP +.B default_rule_thickness +This should set to the thickness of the +.B \e(ru +character, or the thickness of horizontal lines produced with the +.B \eD +escape sequence. +.TP +.B num1 +The +.B over +command will shift up the numerator by at least this amount. +.TP +.B num2 +The +.B smallover +command will shift up the numerator by at least this amount. +.TP +.B denom1 +The +.B over +command will shift down the denominator by at least this amount. +.TP +.B denom2 +The +.B smallover +command will shift down the denominator by at least this amount. +.TP +.B sup1 +Normally superscripts will be shifted up by at least this amount. +.TP +.B sup2 +Superscripts within superscripts or upper limits +or numerators of +.B smallover +fractions +will be shifted up by at least this amount. +This is usually less than sup1. +.TP +.B sup3 +Superscripts within denominators or square roots +or subscripts or lower limits will be shifted up by at least +this amount. +This is usually less than sup2. +.TP +.B sub1 +Subscripts will normally be shifted down by at least this amount. +.TP +.B sub2 +When there is both a subscript and a superscript, the subscript +will be shifted down by at least this amount. +.TP +.B sup_drop +The baseline of a superscript will be no more +than this much amount below the top of the object on +which the superscript is set. +.TP +.B sub_drop +The baseline of a subscript will be at least this much below +the bottom of the object on which the subscript is set. +.TP +.B big_op_spacing1 +The baseline of an upper limit will be at least this +much above the top of the object on which the limit is set. +.TP +.B big_op_spacing2 +The baseline of a lower limit will be at least this +much below the bottom of the object on which the limit is set. +.TP +.B big_op_spacing3 +The bottom of an upper limit will be at least this much above the +top of the object on which the limit is set. +.TP +.B big_op_spacing4 +The top of a lower limit will be at least this much below +the bottom of the object on which the limit is set. +.TP +.B big_op_spacing5 +This much vertical space will be added above and below limits. +.TP +.B baseline_sep +The baselines of the rows in a pile or matrix will normally be +this far apart. +In most cases this should be equal to the sum of +.B num1 +and +.BR denom1 . +.TP +.B shift_down +The midpoint between the top baseline and the bottom baseline +in a matrix or pile will be shifted down by this much from the axis. +In most cases this should be equal to +.BR axis_height . +.TP +.B column_sep +This much space will be added between columns in a matrix. +.TP +.B matrix_side_sep +This much space will be added at each side of a matrix. +.TP +.B draw_lines +If this is non-zero, lines will be drawn using the +.B \eD +escape sequence, rather than with the +.B \el +escape sequence and the +.B \e(ru +character. +.TP +.B body_height +The amount by which the height of the equation exceeds this +will be added as extra space before the line containing the equation +(using +.BR \ex .) +The default value is 85. +.TP +.B body_depth +The amount by which the depth of the equation exceeds this +will be added as extra space after the line containing the equation +(using +.BR \ex .) +The default value is 35. +.TP +.B nroff +If this is non-zero, +then +.B ndefine +will behave like +.B define +and +.B tdefine +will be ignored, +otherwise +.B tdefine +will behave like +.B define +and +.B ndefine +will be ignored. +The default value is 0 +(This is typically changed to 1 by the +.B eqnrc +file for the +.B ascii +and +.B latin1 +devices.) +.LP +A more precise description of the role of many of these +parameters can be found in Appendix H of +.IR The\ \*(txbook . +.RE +.SS Macros +Macros can take arguments. +In a macro body, +.BI $ n +where +.I n +is between 1 and 9, +will be replaced by the +.IR n-th +argument if the macro is called with arguments; +if there are fewer than +.I n +arguments, it will be replaced by nothing. +A word containing a left parenthesis where the part of the word +before the left parenthesis has been defined using the +.B define +command +will be recognized as a macro call with arguments; +characters following the left parenthesis +up to a matching right parenthesis will be treated as comma-separated +arguments; +commas inside nested parentheses do not terminate an argument. +.TP +.BI sdefine\ name\ X\ anything\ X +This is like the +.B define +command, but +.I name +will not be recognized if called with arguments. +.TP +.BI include\ \(ts file \(ts +Include the contents of +.IR file . +Lines of +.I file +beginning with +.B .EQ +or +.B .EN +will be ignored. +.TP +.BI ifdef\ name\ X\ anything\ X +If +.I name +has been defined by +.B define +(or has been automatically defined because +.I name +is the output device) +process +.IR anything ; +otherwise ignore +.IR anything . +.I X +can be any character not appearing in +.IR anything . +.SS Fonts +.B eqn +normally uses at least two fonts to set an equation: +an italic font for letters, +and a roman font for everything else. +The existing +.B gfont +command +changes the font that is used as the italic font. +By default this is +.BR I . +The font that is used as the roman font can be changed +using the new +.B grfont +command. +.TP +.BI grfont\ f +Set the roman font to +.IR f . +.LP +The +.B italic +primitive uses the current italic font set by +.BR gfont ; +the +.B roman +primitive uses the current roman font set by +.BR grfont . +There is also a new +.B gbfont +command, which changes the font used by the +.B bold +primitive. +If you only use the +.BR roman , +.B italic +and +.B bold +primitives to changes fonts within an equation, +you can change all the fonts used by your equations +just by using +.BR gfont , +.B grfont +and +.B gbfont +commands. +.LP +You can control which characters are treated as letters +(and therefore set in italics) by using the +.B chartype +command described above. +A type of +.B letter +will cause a character to be set in italic type. +A type of +.B digit +will cause a character to be set in roman type. +.SH FILES +.Tp \w'\fB@MACRODIR@/eqnrc'u+2n +.B @MACRODIR@/eqnrc +Initialization file. +.SH BUGS +Inline equations will be set at the point size that is current at the +beginning of the input line. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR groff_font (@MAN5EXT@), +.I The\ \*(txbook diff --git a/gnu/usr.bin/groff/eqn/eqn.man b/gnu/usr.bin/groff/eqn/eqn.man deleted file mode 100644 index 8c67b911e5a..00000000000 --- a/gnu/usr.bin/groff/eqn/eqn.man +++ /dev/null @@ -1,879 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.ie \n(.V<\n(.v .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X -.el .ds tx TeX -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.\" The BSD man macros can't handle " in arguments to font change macros, -.\" so use \(ts instead of ". -.tr \(ts" -.TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@eqn \- format equations for troff -.SH SYNOPSIS -.B @g@eqn -[ -.B \-rvCNR -] -[ -.BI \-d cc -] -[ -.BI \-T name -] -[ -.BI \-M dir -] -[ -.BI \-f F -] -[ -.BI \-s n -] -[ -.BI \-p n -] -[ -.BI \-m n -] -[ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -This manual page describes the GNU version of -.BR eqn , -which is part of the groff document formatting system. -.B eqn -compiles descriptions of equations embedded within -.B troff -input files into commands that are understood by -.BR troff . -Normally, it should be invoked using the -.B \-e -option of -.BR groff . -The syntax is quite compatible with Unix eqn. -The output of GNU eqn cannot be processed with Unix troff; -it must be processed with GNU troff. -If no files are given on the command line, the standard input -will be read. -A filename of -.B \- -will cause the standard input to be read. -.LP -.B eqn -searches for the file -.B eqnrc -using the path -.BR @MACROPATH@ . -If it exists, eqn will process it before the other input files. -The -.B \-R -option prevents this. -.LP -GNU eqn does not provide the functionality of neqn: -it does not support low-resolution, typewriter-like devices -(although it may work adequately for very simple input). -.SH OPTIONS -.TP -.B \-C -Recognize -.B .EQ -and -.B .EN -even when followed by a character other than space or newline. -.TP -.B \-N -Don't allow newlines within delimiters. -This option allows -.B eqn -to recover better from missing closing delimiters. -.TP -.B \-v -Print the version number. -.TP -.B \-r -Only one size reduction. -.TP -.BI \-m n -The minimum point-size is -.IR n . -eqn will not reduce the size of subscripts or superscripts to -a smaller size than -.IR n . -.TP -.BI \-T name -The output is for device -.IR name . -The only effect of this is to define a macro -.I name -with a value of -.BR 1 . -Typically -.B eqnrc -will use this to provide definitions appropriate for the output device. -The default output device is -.BR @DEVICE@ . -.TP -.BI \-M dir -Search -.I dir -for -.B eqnrc -before the default directories. -.TP -.B \-R -Don't load -.BR eqnrc . -.TP -.BI \-f F -This is equivalent to a -.BI gfont\ F -command. -.TP -.BI \-s n -This is equivalent to a -.BI gsize\ n -command. -This option is deprecated. -eqn will normally set equations at whatever the current point size -is when the equation is encountered. -.TP -.BI \-p n -This says that subscripts and superscripts should be -.I n -points smaller than the surrounding text. -This option is deprecated. -Normally eqn makes sets subscripts and superscripts at 70% -of the size of the surrounding text. -.SH USAGE -Only the differences between GNU eqn and Unix eqn are described here. -.LP -Most of the new features of GNU eqn -are based on \*(tx. -There are some references to the differences between \*(tx and GNU eqn below; -these may safely be ignored if you do not know \*(tx. -.SS Automatic spacing -.LP -.B eqn -gives each component of an equation a type, and adjusts the spacing -between components using that type. -Possible types are: -.TP \w'punctuation'u+2n -ordinary -an ordinary character such as 1 or -.IR x ; -.TP -operator -a large operator such as -.ds Su \s+5\(*S\s0 -.if \n(.g .if !c\(*S .ds Su the summation operator -\*(Su; -.TP -binary -a binary operator such as +; -.TP -relation -a relation such as =; -.TP -opening -a opening bracket such as (; -.TP -closing -a closing bracket such as ); -.TP -punctuation -a punctuation character such as ,; -.TP -inner -a subformula contained within brackets; -.TP -suppress -spacing that suppresses automatic spacing adjustment. -.LP -Components of an equation get a type in one of two ways. -.TP -.BI type\ t\ e -This yields an equation component that contains -.I e -but that has type -.IR t , -where -.I t -is one of the types mentioned above. -For example, -.B times -is defined as -.RS -.IP -.B -type "binary" \e(mu -.RE -.IP -The name of the type doesn't have to be quoted, but quoting protects -from macro expansion. -.TP -.BI chartype\ t\ text -Unquoted groups of characters are split up into individual characters, -and the type of each character is looked up; -this changes the type that is stored for each character; -it says that the characters in -.I text -from now on have type -.IR t . -For example, -.RS -.IP -.B -chartype "punctuation" .,;: -.RE -.IP -would make the characters -.B .,;: -have type punctuation -whenever they subsequently appeared in an equation. -The type -.I t -can also be -.B letter -or -.BR digit ; -in these cases -.B chartype -changes the font type of the characters. -See the Fonts subsection. -.SS New primitives -.TP -.IB e1\ smallover\ e2 -This is similar to -.BR over ; -.B smallover -reduces the size of -.I e1 -and -.IR e2 ; -it also puts less vertical space between -.I e1 -or -.I e2 -and the fraction bar. -The -.B over -primitive corresponds to the \*(tx -.B \eover -primitive in display styles; -.B smallover -corresponds to -.B \eover -in non-display styles. -.TP -.BI vcenter\ e -This vertically centers -.I e -about the math axis. -The math axis is the vertical position about which characters -such as + and - are centered; also it is the vertical position -used for the bar of fractions. -For example, -.B sum -is defined as -.RS -.IP -.B -{ type "operator" vcenter size +5 \e(*S } -.RE -.TP -.IB e1\ accent\ e2 -This sets -.I e2 -as an accent over -.IR e1 . -.I e2 -is assumed to be at the correct height for a lowercase letter; -.I e2 -will be moved down according if -.I e1 -is taller or shorter than a lowercase letter. -For example, -.B hat -is defined as -.RS -.IP -.B -accent { "^" } -.RE -.IP -.BR dotdot , -.BR dot , -.BR tilde , -.B vec -and -.B dyad -are also defined using the -.B accent -primitive. -.TP -.IB e1\ uaccent\ e2 -This sets -.I e2 -as an accent under -.IR e1 . -.I e2 -is assumed to be at the correct height for a character without a descender; -.I e2 -will be moved down if -.I e1 -has a descender. -.B utilde -is pre-defined using -.B uaccent -as a tilde accent below the baseline. -.TP -.BI split\ \(ts text \(ts -This has the same effect as simply -.RS -.IP -.I text -.RE -.IP -but -.I text -is not subject to macro expansion because it is quoted; -.I text -will be split up and the spacing between individual characters -will be adjusted. -.TP -.BI nosplit\ text -This has the same effect as -.RS -.IP -.BI \(ts text \(ts -.RE -.IP -but because -.I text -is not quoted it will be subject to macro expansion; -.I text -will not be split up -and the spacing between individual characters will not be adjusted. -.TP -.IB e\ opprime -This is a variant of -.B prime -that acts as an operator on -.IR e . -It produces a different result from -.B prime -in a case such as -.BR A\ opprime\ sub\ 1 : -with -.B opprime -the -.B 1 -will be tucked under the prime as a subscript to the -.B A -(as is conventional in mathematical typesetting), -whereas with -.B prime -the -.B 1 -will be a subscript to the prime character. -The precedence of -.B opprime -is the same as that of -.B bar -and -.BR under , -which is higher than that of everything except -.B accent -and -.BR uaccent . -In unquoted text a -.B ' -that is not the first character will be treated like -.BR opprime . -.TP -.BI special\ text\ e -This constructs a new object from -.I e -using a -.BR @g@troff (@MAN1EXT@) -macro named -.IR text . -When the macro is called, -the string -.B 0s -will contain the output for -.IR e , -and the number registers -.BR 0w , -.BR 0h , -.BR 0d , -.BR 0skern -and -.BR 0skew -will contain the width, height, depth, subscript kern, and skew of -.IR e . -(The -.I "subscript kern" -of an object says how much a subscript on that object should be tucked in; -the -.I skew -of an object says how far to the right of the center of the object an -accent over the object should be placed.) -The macro must modify -.B 0s -so that it will output the desired result with its origin at the current -point, and increase the current horizontal position by the width -of the object. -The number registers must also be modified so that they correspond to the -result. -.RS -.LP -For example, suppose you wanted a construct that `cancels' an expression -by drawing a diagonal line through it. -.IP -.nf -.ft B -.ne 6+\n(.Vu -\&.EQ -define cancel 'special Ca' -\&.EN -\&.de Ca -\&.ds 0s \eZ'\e\e*(0s'\ev'\e\en(0du'\eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\ev'\e\en(0hu' -\&.. -.ft -.fi -.LP -Then you could cancel an expression -.I e -with -.BI cancel\ {\ e\ } -.LP -Here's a more complicated construct that draws a box round an expression: -.IP -.nf -.ft B -.ne 11+\n(.Vu -\&.EQ -define box 'special Bx' -\&.EN -\&.de Bx -\&.ds 0s \eZ'\eh'1n'\e\e*(0s'\e -\eZ'\ev'\e\en(0du+1n'\eD'l \e\en(0wu+2n 0'\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e -\eD'l -\e\en(0wu-2n 0'\eD'l 0 \e\en(0hu+\e\en(0du+2n''\eh'\e\en(0wu+2n' -\&.nr 0w +2n -\&.nr 0d +1n -\&.nr 0h +1n -\&.. -.ft -.fi -.RE -.SS Customization -The appearance of equations is controlled by -a large number of parameters. These can be set using -the -.B set -command. -.TP -.BI set\ p\ n -This sets parameter -.I p -to value -.I n ; -.I n -is an integer. -For example, -.RS -.IP -.B -set x_height 45 -.RE -.IP -says that -.B eqn -should assume an x height of 0.45 ems. -.RS -.LP -Possible parameters are as follows. -Values are in units of hundredths of an em unless otherwise stated. -These descriptions are intended to be expository rather than -definitive. -.TP \w'\fBdefault_rule_thickness'u+2n -.B minimum_size -.B eqn -will not set anything at a smaller point-size than this. -The value is in points. -.TP -.B fat_offset -The -.B fat -primitive emboldens an equation -by overprinting two copies of the equation -horizontally offset by this amount. -.TP -.B over_hang -A fraction bar will be longer by twice this amount than -the maximum of the widths of the numerator and denominator; -in other words, it will overhang the numerator and -denominator by at least this amount. -.TP -.B accent_width -When -.B bar -or -.B under -is applied to a single character, -the line will be this long. -Normally, -.B bar -or -.B under -produces a line whose length is the width of the object to which it applies; -in the case of a single character, -this tends to produce a line that looks too long. -.TP -.B delimiter_factor -Extensible delimiters produced with the -.B left -and -.B right -primitives will have a combined height and depth of at least this many -thousandths of twice the maximum amount by which the sub-equation that -the delimiters enclose extends away from the axis. -.TP -.B delimiter_shortfall -Extensible delimiters produced with the -.B left -and -.B right -primitives will have a combined height and depth -not less than the difference of -twice the maximum amount by which the sub-equation that -the delimiters enclose extends away from the axis -and this amount. -.TP -.B null_delimiter_space -This much horizontal space is inserted -on each side of a fraction. -.TP -.B script_space -The width of subscripts and superscripts is increased by this amount. -.TP -.B thin_space -This amount of space is automatically inserted after punctuation -characters. -.TP -.B medium_space -This amount of space is automatically inserted on either side -of binary operators. -.TP -.B thick_space -This amount of space is automatically inserted on either side of -relations. -.TP -.B x_height -The height of lowercase letters without ascenders such as x. -.TP -.B axis_height -The height above the baseline of the center of characters -such as \(pl and \(mi. -It is important that this value is correct for the font -you are using. -.TP -.B default_rule_thickness -This should set to the thickness of the -.B \e(ru -character, or the thickness of horizontal lines produced with the -.B \eD -escape sequence. -.TP -.B num1 -The -.B over -command will shift up the numerator by at least this amount. -.TP -.B num2 -The -.B smallover -command will shift up the numerator by at least this amount. -.TP -.B denom1 -The -.B over -command will shift down the denominator by at least this amount. -.TP -.B denom2 -The -.B smallover -command will shift down the denominator by at least this amount. -.TP -.B sup1 -Normally superscripts will be shifted up by at least this amount. -.TP -.B sup2 -Superscripts within superscripts or upper limits -or numerators of -.B smallover -fractions -will be shifted up by at least this amount. -This is usually less than sup1. -.TP -.B sup3 -Superscripts within denominators or square roots -or subscripts or lower limits will be shifted up by at least -this amount. -This is usually less than sup2. -.TP -.B sub1 -Subscripts will normally be shifted down by at least this amount. -.TP -.B sub2 -When there is both a subscript and a superscript, the subscript -will be shifted down by at least this amount. -.TP -.B sup_drop -The baseline of a superscript will be no more -than this much amount below the top of the object on -which the superscript is set. -.TP -.B sub_drop -The baseline of a subscript will be at least this much below -the bottom of the object on which the subscript is set. -.TP -.B big_op_spacing1 -The baseline of an upper limit will be at least this -much above the top of the object on which the limit is set. -.TP -.B big_op_spacing2 -The baseline of a lower limit will be at least this -much below the bottom of the object on which the limit is set. -.TP -.B big_op_spacing3 -The bottom of an upper limit will be at least this much above the -top of the object on which the limit is set. -.TP -.B big_op_spacing4 -The top of a lower limit will be at least this much below -the bottom of the object on which the limit is set. -.TP -.B big_op_spacing5 -This much vertical space will be added above and below limits. -.TP -.B baseline_sep -The baselines of the rows in a pile or matrix will normally be -this far apart. -In most cases this should be equal to the sum of -.B num1 -and -.BR denom1 . -.TP -.B shift_down -The midpoint between the top baseline and the bottom baseline -in a matrix or pile will be shifted down by this much from the axis. -In most cases this should be equal to -.BR axis_height . -.TP -.B column_sep -This much space will be added between columns in a matrix. -.TP -.B matrix_side_sep -This much space will be added at each side of a matrix. -.TP -.B draw_lines -If this is non-zero, lines will be drawn using the -.B \eD -escape sequence, rather than with the -.B \el -escape sequence and the -.B \e(ru -character. -.TP -.B body_height -The amount by which the height of the equation exceeds this -will be added as extra space before the line containing the equation -(using -.BR \ex .) -The default value is 85. -.TP -.B body_depth -The amount by which the depth of the equation exceeds this -will be added as extra space after the line containing the equation -(using -.BR \ex .) -The default value is 35. -.TP -.B nroff -If this is non-zero, -then -.B ndefine -will behave like -.B define -and -.B tdefine -will be ignored, -otherwise -.B tdefine -will behave like -.B define -and -.B ndefine -will be ignored. -The default value is 0 -(This is typically changed to 1 by the -.B eqnrc -file for the -.B ascii -and -.B latin1 -devices.) -.LP -A more precise description of the role of many of these -parameters can be found in Appendix H of -.IR The\ \*(txbook . -.RE -.SS Macros -Macros can take arguments. -In a macro body, -.BI $ n -where -.I n -is between 1 and 9, -will be replaced by the -.IR n-th -argument if the macro is called with arguments; -if there are fewer than -.I n -arguments, it will be replaced by nothing. -A word containing a left parenthesis where the part of the word -before the left parenthesis has been defined using the -.B define -command -will be recognized as a macro call with arguments; -characters following the left parenthesis -up to a matching right parenthesis will be treated as comma-separated -arguments; -commas inside nested parentheses do not terminate an argument. -.TP -.BI sdefine\ name\ X\ anything\ X -This is like the -.B define -command, but -.I name -will not be recognized if called with arguments. -.TP -.BI include\ \(ts file \(ts -Include the contents of -.IR file . -Lines of -.I file -beginning with -.B .EQ -or -.B .EN -will be ignored. -.TP -.BI ifdef\ name\ X\ anything\ X -If -.I name -has been defined by -.B define -(or has been automatically defined because -.I name -is the output device) -process -.IR anything ; -otherwise ignore -.IR anything . -.I X -can be any character not appearing in -.IR anything . -.SS Fonts -.B eqn -normally uses at least two fonts to set an equation: -an italic font for letters, -and a roman font for everything else. -The existing -.B gfont -command -changes the font that is used as the italic font. -By default this is -.BR I . -The font that is used as the roman font can be changed -using the new -.B grfont -command. -.TP -.BI grfont\ f -Set the roman font to -.IR f . -.LP -The -.B italic -primitive uses the current italic font set by -.BR gfont ; -the -.B roman -primitive uses the current roman font set by -.BR grfont . -There is also a new -.B gbfont -command, which changes the font used by the -.B bold -primitive. -If you only use the -.BR roman , -.B italic -and -.B bold -primitives to changes fonts within an equation, -you can change all the fonts used by your equations -just by using -.BR gfont , -.B grfont -and -.B gbfont -commands. -.LP -You can control which characters are treated as letters -(and therefore set in italics) by using the -.B chartype -command described above. -A type of -.B letter -will cause a character to be set in italic type. -A type of -.B digit -will cause a character to be set in roman type. -.SH FILES -.Tp \w'\fB@MACRODIR@/eqnrc'u+2n -.B @MACRODIR@/eqnrc -Initialization file. -.SH BUGS -Inline equations will be set at the point size that is current at the -beginning of the input line. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR groff_font (@MAN5EXT@), -.I The\ \*(txbook diff --git a/gnu/usr.bin/groff/grodvi/Makefile.sub b/gnu/usr.bin/groff/grodvi/Makefile.sub index a63905df938..40f46eabf1b 100644 --- a/gnu/usr.bin/groff/grodvi/Makefile.sub +++ b/gnu/usr.bin/groff/grodvi/Makefile.sub @@ -1,5 +1,5 @@ PROG=grodvi -MAN1=grodvi.n +MAN1=grodvi.1 XLIBS=$(LIBDRIVER) $(LIBGROFF) MLIB=$(LIBM) OBJS=dvi.o diff --git a/gnu/usr.bin/groff/grodvi/grodvi.1_in b/gnu/usr.bin/groff/grodvi/grodvi.1_in new file mode 100644 index 00000000000..aeb894cd409 --- /dev/null +++ b/gnu/usr.bin/groff/grodvi/grodvi.1_in @@ -0,0 +1,171 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X +.el .ds tx TeX +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH GRODVI @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grodvi \- convert groff output to TeX dvi format +.SH SYNOPSIS +.B grodvi +[ +.B \-dv +] [ +.BI \-w n +] [ +.BI \-F dir +] [ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +.B grodvi +is a driver for +.B groff +that produces \*(tx dvi format. +Normally it should be run by +.BR groff\ \-Tdvi . +This will run +.BR @g@troff\ \-Tdvi ; +it will also input the macros +.BR @MACRODIR@/tmac.dvi ; +if the input is being preprocessed with +.B @g@eqn +it will also input +.BR @FONTDIR@/devdvi/eqnchar . +.LP +The dvi file generated by +.B grodvi +can be printed by any correctly-written dvi driver. +The troff drawing primitives are implemented +using the tpic version 2 specials. +If the driver does not support these, the +.B \eD +commands will not produce any output. +.LP +There is an additional drawing command available: +.TP +.BI \eD'R\ dh\ dv ' +Draw a rule (solid black rectangle), with one corner +at the current position, and the diagonally opposite corner +at the current position +.RI +( dh , dv ). +Afterwards the current position will be at the opposite corner. This +produces a rule in the dvi file and so can be printed even with a +driver that does not support the tpic specials unlike the other +.B \eD +commands. +.LP +The groff command +.BI \eX' anything ' +is translated into the same command in the dvi file as would be +produced by +.BI \especial{ anything } +in \*(tx; +.I anything may not contain a newline. +.LP +Font files for +.B grodvi +can be created from tfm files using +.BR tfmtodit (@MAN1EXT@). +The font description file should contain the following +additional commands: +.Tp \w'\fBinternalname'u+2n +.BI internalname\ name +The name of the tfm file (without the +.B .tfm +extension) is +.IR name . +.TP +.BI checksum\ n +The checksum in the tfm file is +.IR n . +.TP +.BI designsize\ n +The designsize in the tfm file is +.IR n . +.LP +These are automatically generated by +.B tfmtodit. +.LP +In +.B troff +the +.B \eN +escape sequence can be used to access characters by their position +in the corresponding tfm file; +all characters in the tfm file can be accessed this way. +.SH OPTIONS +.TP +.B \-d +Do not use tpic specials to implement drawing commands. +Horizontal and vertical lines will be implemented by rules. +Other drawing commands will be ignored. +.TP +.B \-v +Print the version number. +.TP +.BI \-w n +Set the default line thickness to +.I n +thousandths of an em. +.TP +.BI \-F dir +Search directory +.IB dir /devdvi +for font and device description files. +.SH FILES +.TP +.B @FONTDIR@/devdvi/DESC +Device description file. +.TP +.B @FONTDIR@/devdvi/ F +Font description file for font +.IR F . +.TP +.B @MACRODIR@/tmac.dvi +Macros for use with +.BR grodvi . +.SH BUGS +Dvi files produced by +.B grodvi +use a different resolution (57816 units per inch) to those produced by +\*(tx. +Incorrectly written drivers which assume the resolution used by \*(tx, +rather than using the resolution specified in the dvi file will not +work with grodvi. +.LP +When using the +.B \-d +option with boxed tables, +vertical and horizontal lines can sometimes protrude by one pixel. +This is a consequence of the way \*(tx requires that the heights +and widths of rules be rounded. +.SH "SEE ALSO" +.BR tfmtodit (@MAN1EXT@), +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@), +.BR groff_out (@MAN5EXT@), +.BR groff_font (@MAN5EXT@), +.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grodvi/grodvi.man b/gnu/usr.bin/groff/grodvi/grodvi.man deleted file mode 100644 index aeb894cd409..00000000000 --- a/gnu/usr.bin/groff/grodvi/grodvi.man +++ /dev/null @@ -1,171 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X -.el .ds tx TeX -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH GRODVI @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grodvi \- convert groff output to TeX dvi format -.SH SYNOPSIS -.B grodvi -[ -.B \-dv -] [ -.BI \-w n -] [ -.BI \-F dir -] [ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -.B grodvi -is a driver for -.B groff -that produces \*(tx dvi format. -Normally it should be run by -.BR groff\ \-Tdvi . -This will run -.BR @g@troff\ \-Tdvi ; -it will also input the macros -.BR @MACRODIR@/tmac.dvi ; -if the input is being preprocessed with -.B @g@eqn -it will also input -.BR @FONTDIR@/devdvi/eqnchar . -.LP -The dvi file generated by -.B grodvi -can be printed by any correctly-written dvi driver. -The troff drawing primitives are implemented -using the tpic version 2 specials. -If the driver does not support these, the -.B \eD -commands will not produce any output. -.LP -There is an additional drawing command available: -.TP -.BI \eD'R\ dh\ dv ' -Draw a rule (solid black rectangle), with one corner -at the current position, and the diagonally opposite corner -at the current position -.RI +( dh , dv ). -Afterwards the current position will be at the opposite corner. This -produces a rule in the dvi file and so can be printed even with a -driver that does not support the tpic specials unlike the other -.B \eD -commands. -.LP -The groff command -.BI \eX' anything ' -is translated into the same command in the dvi file as would be -produced by -.BI \especial{ anything } -in \*(tx; -.I anything may not contain a newline. -.LP -Font files for -.B grodvi -can be created from tfm files using -.BR tfmtodit (@MAN1EXT@). -The font description file should contain the following -additional commands: -.Tp \w'\fBinternalname'u+2n -.BI internalname\ name -The name of the tfm file (without the -.B .tfm -extension) is -.IR name . -.TP -.BI checksum\ n -The checksum in the tfm file is -.IR n . -.TP -.BI designsize\ n -The designsize in the tfm file is -.IR n . -.LP -These are automatically generated by -.B tfmtodit. -.LP -In -.B troff -the -.B \eN -escape sequence can be used to access characters by their position -in the corresponding tfm file; -all characters in the tfm file can be accessed this way. -.SH OPTIONS -.TP -.B \-d -Do not use tpic specials to implement drawing commands. -Horizontal and vertical lines will be implemented by rules. -Other drawing commands will be ignored. -.TP -.B \-v -Print the version number. -.TP -.BI \-w n -Set the default line thickness to -.I n -thousandths of an em. -.TP -.BI \-F dir -Search directory -.IB dir /devdvi -for font and device description files. -.SH FILES -.TP -.B @FONTDIR@/devdvi/DESC -Device description file. -.TP -.B @FONTDIR@/devdvi/ F -Font description file for font -.IR F . -.TP -.B @MACRODIR@/tmac.dvi -Macros for use with -.BR grodvi . -.SH BUGS -Dvi files produced by -.B grodvi -use a different resolution (57816 units per inch) to those produced by -\*(tx. -Incorrectly written drivers which assume the resolution used by \*(tx, -rather than using the resolution specified in the dvi file will not -work with grodvi. -.LP -When using the -.B \-d -option with boxed tables, -vertical and horizontal lines can sometimes protrude by one pixel. -This is a consequence of the way \*(tx requires that the heights -and widths of rules be rounded. -.SH "SEE ALSO" -.BR tfmtodit (@MAN1EXT@), -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@), -.BR groff_out (@MAN5EXT@), -.BR groff_font (@MAN5EXT@), -.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/groff/Makefile.sub b/gnu/usr.bin/groff/groff/Makefile.sub index 0acd882b455..a2cd083a112 100644 --- a/gnu/usr.bin/groff/groff/Makefile.sub +++ b/gnu/usr.bin/groff/groff/Makefile.sub @@ -1,5 +1,5 @@ PROG=groff -MAN1=groff.n +MAN1=groff.1 XLIBS=$(LIBGROFF) MLIB=$(LIBM) OBJS=groff.o pipeline.o diff --git a/gnu/usr.bin/groff/groff/groff.1_in b/gnu/usr.bin/groff/groff/groff.1_in new file mode 100644 index 00000000000..545f0a0c663 --- /dev/null +++ b/gnu/usr.bin/groff/groff/groff.1_in @@ -0,0 +1,429 @@ +.ig \"-*- nroff -*- +Copyright (C) 1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.de TQ +.br +.ns +.TP \\$1 +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH GROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff \- front end for the groff document formatting system +.SH SYNOPSIS +.B groff +[ +.B \-abehilpstvzCENRSUVXZ +] +[ +.BI \-w name +] +[ +.BI \-W name +] +[ +.BI \-m name +] +[ +.BI \-F dir +] +[ +.BI \-I dir +] +[ +.BI \-T dev +] +[ +.BI \-f fam +] +[ +.BI \-M dir +] +[ +.BI \-d cs +] +[ +.BI \-r cn +] +[ +.BI \-n num +] +[ +.BI \-o list +] +[ +.BI \-P arg +] +[ +.BI \-L arg +] +[ +.IR files \|.\|.\|.\| +] +.SH DESCRIPTION +.B groff +is a front-end to the groff document formatting system. +Normally it runs the +.B @g@troff +program and a postprocessor appropriate for the selected +device. +Available devices are: +.TP +.B ps +For PostScript printers and previewers +.TP +.B dvi +For TeX dvi format. +.TP +.B X75 +For a 75 dpi X11 previewer. +.TP +.B X100 +For a 100dpi X11 previewer. +.TP +.B ascii +For typewriter-like devices. +.TP +.B latin1 +For typewriter-like devices using the ISO Latin-1 character set. +.TP +.B lj4 +For an HP LaserJet4-compatible (or other PCL5-compatible) printer. +.TP +.B html +To produce HTML output. +.LP +The postprocessor to be used for a device is specified by the +.B postpro +command in the device description file. +This can be overridden with the +.B \-X +option. +.LP +The default device is +.BR @DEVICE@ . +It can optionally preprocess with any of +.BR @g@pic , +.BR @g@eqn , +.BR @g@tbl , +.BR @g@refer , +or +.B @g@soelim. +.LP +Options without an argument can be grouped behind a single +.BR \- . +A filename of +.B \- +denotes the standard input. +.LP +The +.B grog +command can be used to guess the correct groff command to use to +format a file. +.SH OPTIONS +.TP +.B \-h +Print a help message. +.TP +.B \-e +Preprocess with @g@eqn. +.TP +.B \-t +Preprocess with @g@tbl. +.TP +.B \-p +Preprocess with @g@pic. +.TP +.B \-s +Preprocess with @g@soelim. +.TP +.BI \-I dir +This option is as described in +.BR @g@soelim (@MAN1EXT@) . +This option implies the +.B \-s +option. +.TP +.B \-R +Preprocess with @g@refer. +No mechanism is provided for passing arguments to +.B @g@refer +because most @g@refer options have equivalent commands +which can be included in the file. +See +.BR @g@refer (@MAN1EXT@) +for more details. +.TP +.B \-v +Make programs run by +.B groff +print out their version number. +.TP +.B \-V +Print the pipeline on stdout instead of executing it. +.TP +.B \-z +Suppress output from +.BR @g@troff . +Only error messages will be printed. +.TP +.B \-Z +Do not postprocess the output of +.BR @g@troff . +Normally +.B groff +will automatically run the appropriate postprocessor. +.TP +.BI \-P arg +Pass +.I arg +to the postprocessor. +Each argument should be passed with a separate +.B \-P +option. +Note that +.B groff +does not prepend +.B \- +to +.I arg +before passing it to the postprocessor. +.TP +.B \-l +Send the output to a printer. +The command used for this is specified by the +.B print +command in the device description file. +.TP +.BI \-L arg +Pass +.I arg +to the spooler. +Each argument should be passed with a separate +.B \-L +option. +Note that +.B groff +does not prepend +.B \- +to +.I arg +before passing it to the postprocessor. +.TP +.BI \-T dev +Prepare output for device +.IR dev . +The default device is +.BR @DEVICE@ . +.TP +.B \-X +Preview with +.B gxditview +instead of using the usual postprocessor. +.B Groff +passes +.B gxditview +a +.B -printCommand +option which will make the +.B Print +action do what +.B groff +would have done if the +.B -l +option had been given. +This is unlikely to produce good results except with +.BR \-Tps . +.TP +.B \-N +Don't allow newlines with eqn delimiters. +This is the same as the +.B \-N +option in +.BR @g@eqn . +.TP +.B \-S +Safer mode. Pass the +.B \-S +option to +.B @g@pic +and use the +.B \%\-msafer +macros with +.BR @g@troff . +(enabled by default) +.TP +.B \-U +Unsafe mode. Reverts to the old unsafe behaviour. +.TP +.B \-a +.TQ +.B \-b +.TQ +.B \-i +.TQ +.B \-C +.TQ +.B \-E +.TQ +.BI \-w name +.TQ +.BI \-W name +.TQ +.BI \-m name +.TQ +.BI \-o list +.TQ +.BI \-d cs +.TQ +.BI \-r cn +.TQ +.BI \-F dir +.TQ +.BI \-M dir +.TQ +.BI \-f fam +.TQ +.BI \-n num +These are as described in +.BR @g@troff (@MAN1EXT@) . +.SH ENVIRONMENT +.TP +.SM +.B GROFF_COMMAND_PREFIX +If this is set +.IR X , +then +.B groff +will run +.IB X troff +instead of +.BR @g@troff . +This also applies to +.BR tbl , +.BR pic , +.BR eqn , +.BR refer , +and +.BR soelim . +It does not apply to +.BR grops , +.BR grodvi , +.BR grotty , +.BR grolj4 , +.BR grohtml , +and +.BR gxditview . +.TP +.SM +.B GROFF_TMAC_PATH +A colon separated list of directories in which to search for +macro files. +.TP +.SM +.B GROFF_TYPESETTER +Default device. +.TP +.SM +.B GROFF_FONT_PATH +A colon separated list of directories in which to search for the +.BI dev name +directory. +.TP +.SM +.B PATH +The search path for commands executed by +.BR groff . +.TP +.SM +.B GROFF_TMPDIR +The directory in which temporary files will be created. +If this is not set and +.B +.SM TMPDIR +is set, temporary files will be created in that directory. +Otherwise temporary files will be created in +.BR /tmp . +The +.BR grops (@MAN1EXT@) +and +.BR @g@refer (@MAN1EXT@) +commands can create temporary files. +.SH FILES +.Tp \w'\fB@FONTDIR@/dev\fIname\fB/DESC'u+3n +.BI @FONTDIR@/dev name /DESC +Device description file for device +.IR name . +.TP +.BI @FONTDIR@/dev name / F +Font file for font +.I F +of device +.IR name . +.SH AUTHOR +James Clark +.SH BUGS +Report bugs to bug-groff@gnu.org. +Include a complete, self-contained example +that will allow the bug to be reproduced, +and say which version of groff you are using. +.SH COPYRIGHT +Copyright \(co 1989, 1990, 1991, 1992, 1999 Free Software Foundation, Inc. +.LP +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. +.LP +groff is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. +.LP +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. If not, write to the Free Software +Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.SH AVAILABILITY +The most recent released version of groff is always available for +anonymous ftp from ftp.gnu.org in the directory gnu/groff. +.SH "SEE ALSO" +.BR grog (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@tbl (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@), +.BR @g@soelim (@MAN1EXT@) , +.BR @g@refer (@MAN1EXT@), +.BR grops (@MAN1EXT@), +.BR grodvi (@MAN1EXT@), +.BR grotty (@MAN1EXT@), +.BR grohtml (@MAN1EXT@), +.BR gxditview (@MAN1EXT@), +.BR deroff (@MAN1EXT@), +.BR groff_font (@MAN5EXT@), +.BR groff_out (@MAN5EXT@), +.BR groff_man (@MAN7EXT@), +.BR groff_ms (@MAN7EXT@), +.BR groff_me (@MAN7EXT@), +.BR groff_char (@MAN7EXT@), +.BR groff_msafer (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/groff/groff.cc b/gnu/usr.bin/groff/groff/groff.cc index d4bb8033ae3..c5f55e02d6f 100644 --- a/gnu/usr.bin/groff/groff/groff.cc +++ b/gnu/usr.bin/groff/groff/groff.cc @@ -107,13 +107,14 @@ int main(int argc, char **argv) int zflag = 0; int iflag = 0; int Xflag = 0; + int safer_flag = 1; int opt; const char *command_prefix = getenv("GROFF_COMMAND_PREFIX"); if (!command_prefix) command_prefix = PROG_PREFIX; commands[TROFF_INDEX].set_name(command_prefix, "troff"); while ((opt = getopt(argc, argv, - "itpeRsSzavVhblCENXZF:m:T:f:w:W:M:d:r:n:o:P:L:")) + "abCd:eEf:F:hiI:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ")) != EOF) { char buf[3]; buf[0] = '-'; @@ -123,6 +124,10 @@ int main(int argc, char **argv) case 'i': iflag = 1; break; + case 'I': + commands[SOELIM_INDEX].set_name(command_prefix, "soelim"); + commands[SOELIM_INDEX].append_arg(buf, optarg); + break; case 't': commands[TBL_INDEX].set_name(command_prefix, "tbl"); break; @@ -170,8 +175,10 @@ int main(int argc, char **argv) commands[TROFF_INDEX].append_arg(buf); break; case 'S': - commands[PIC_INDEX].append_arg(buf); - commands[TROFF_INDEX].insert_arg("-msafer"); + safer_flag = 1; + break; + case 'U': + safer_flag = 0; break; case 'T': if (strcmp(optarg, "Xps") == 0) { @@ -223,6 +230,12 @@ int main(int argc, char **argv) break; } } + if (safer_flag) { + commands[PIC_INDEX].append_arg("-S"); + commands[TROFF_INDEX].insert_arg("-msafer"); + } else { + commands[TROFF_INDEX].insert_arg("-U"); + } font::set_unknown_desc_command_handler(handle_unknown_desc_command); if (!font::load_desc()) fatal("invalid device `%1'", device); @@ -534,8 +547,8 @@ char **possible_command::get_argv() void synopsis() { fprintf(stderr, -"usage: %s [-abehilpstvzCENRSVXZ] [-Fdir] [-mname] [-Tdev] [-ffam] [-wname]\n" -" [-Wname] [ -Mdir] [-dcs] [-rcn] [-nnum] [-olist] [-Parg] [-Larg]\n" +"usage: %s [-abehilpstvzCENRSUVXZ] [-Fdir] [-mname] [-Tdev] [-ffam] [-wname]\n" +" [-Wname] [-Mdir] [-dcs] [-rcn] [-nnum] [-olist] [-Parg] [-Larg]\n" " [files...]\n", program_name); } @@ -575,7 +588,8 @@ void help() "-Parg\tpass arg to the postprocessor\n" "-Larg\tpass arg to the spooler\n" "-N\tdon't allow newlines within eqn delimiters\n" -"-S\tenable safer mode\n" +"-S\tenable safer mode (the default)\n" +"-U\tenable unsafe mode\n" "\n", stderr); exit(0); diff --git a/gnu/usr.bin/groff/groff/groff.man b/gnu/usr.bin/groff/groff/groff.man deleted file mode 100644 index 0344f0fdff4..00000000000 --- a/gnu/usr.bin/groff/groff/groff.man +++ /dev/null @@ -1,406 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.de TQ -.br -.ns -.TP \\$1 -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH GROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff \- front end for the groff document formatting system -.SH SYNOPSIS -.B groff -[ -.B \-tpeszaivhblCENRSVXZ -] -[ -.BI \-w name -] -[ -.BI \-W name -] -[ -.BI \-m name -] -[ -.BI \-F dir -] -[ -.BI \-T dev -] -[ -.BI \-f fam -] -[ -.BI \-M dir -] -[ -.BI \-d cs -] -[ -.BI \-r cn -] -[ -.BI \-n num -] -[ -.BI \-o list -] -[ -.BI \-P arg -] -[ -.IR files \|.\|.\|.\| -] -.SH DESCRIPTION -.B groff -is a front-end to the groff document formatting system. -Normally it runs the -.B @g@troff -program and a postprocessor appropriate for the selected -device. -Available devices are: -.TP -.B ps -For PostScript printers and previewers -.TP -.B dvi -For TeX dvi format -.TP -.B X75 -For a 75 dpi X11 previewer -.TP -.B X100 -For a 100dpi X11 previewer -.TP -.B ascii -For typewriter-like devices -.TP -.B latin1 -For typewriter-like devices using the ISO Latin-1 character set. -.TP -.B lj4 -For an HP LaserJet4-compatible (or other PCL5-compatible) printer. -.LP -The postprocessor to be used for a device is specified by the -.B postpro -command in the device description file. -This can be overridden with the -.B \-X -option. -.LP -The default device is -.BR @DEVICE@ . -It can optionally preprocess with any of -.BR @g@pic , -.BR @g@eqn , -.BR @g@tbl , -.BR @g@refer , -or -.B @g@soelim. -.LP -Options without an argument can be grouped behind a single -.BR \- . -A filename of -.B \- -denotes the standard input. -.LP -The -.B grog -command can be used to guess the correct groff command to use to -format a file. -.SH OPTIONS -.TP -.B \-h -Print a help message. -.TP -.B \-e -Preprocess with @g@eqn. -.TP -.B \-t -Preprocess with @g@tbl. -.TP -.B \-p -Preprocess with @g@pic. -.TP -.B \-s -Preprocess with @g@soelim. -.TP -.B \-R -Preprocess with @g@refer. -No mechanism is provided for passing arguments to -.B @g@refer -because most @g@refer options have equivalent commands -which can be included in the file. -See -.BR @g@refer (@MAN1EXT@) -for more details. -.TP -.B \-v -Make programs run by -.B groff -print out their version number. -.TP -.B \-V -Print the pipeline on stdout instead of executing it. -.TP -.B \-z -Suppress output from -.BR @g@troff . -Only error messages will be printed. -.TP -.B \-Z -Do not postprocess the output of -.BR @g@troff . -Normally -.B groff -will automatically run the appropriate postprocessor. -.TP -.BI \-P arg -Pass -.I arg -to the postprocessor. -Each argument should be passed with a separate -.B \-P -option. -Note that -.B groff -does not prepend -.B \- -to -.I arg -before passing it to the postprocessor. -.TP -.B \-l -Send the output to a printer. -The command used for this is specified by the -.B print -command in the device description file. -.TP -.BI \-L arg -Pass -.I arg -to the spooler. -Each argument should be passed with a separate -.B \-L -option. -Note that -.B groff -does not prepend -.B \- -to -.I arg -before passing it to the postprocessor. -.TP -.BI \-T dev -Prepare output for device -.IR dev . -The default device is -.BR @DEVICE@ . -.TP -.B \-X -Preview with -.B gxditview -instead of using the usual postprocessor. -.B Groff -passes -.B gxditview -a -.B -printCommand -option which will make the -.B Print -action do what -.B groff -would have done if the -.B -l -option had been given. -This is unlikely to produce good results except with -.BR \-Tps . -.TP -.B \-N -Don't allow newlines with eqn delimiters. -This is the same as the -.B \-N -option in -.BR @g@eqn . -.TP -.B \-S -Safer mode. Pass the -.B \-S -option to -.B @g@pic -and use the -.B \%\-msafer -macros with -.BR @g@troff . -.TP -.B \-a -.TQ -.B \-b -.TQ -.B \-i -.TQ -.B \-C -.TQ -.B \-E -.TQ -.BI \-w name -.TQ -.BI \-W name -.TQ -.BI \-m name -.TQ -.BI \-o list -.TQ -.BI \-d cs -.TQ -.BI \-r cn -.TQ -.BI \-F dir -.TQ -.BI \-M dir -.TQ -.BI \-f fam -.TQ -.BI \-n num -These are as described in -.BR @g@troff (@MAN1EXT@) . -.SH ENVIRONMENT -.TP -.SM -.B GROFF_COMMAND_PREFIX -If this is set -.IR X , -then -.B groff -will run -.IB X troff -instead of -.BR @g@troff . -This also applies to -.BR tbl , -.BR pic , -.BR eqn , -.B refer -and -.BR soelim . -It does not apply to -.BR grops , -.BR grodvi , -.BR grotty -and -.BR gxditview . -.TP -.SM -.B GROFF_TMAC_PATH -A colon separated list of directories in which to search for -macro files. -.TP -.SM -.B GROFF_TYPESETTER -Default device. -.TP -.SM -.B GROFF_FONT_PATH -A colon separated list of directories in which to search for the -.BI dev name -directory. -.TP -.SM -.B PATH -The search path for commands executed by -.BR groff . -.TP -.SM -.B GROFF_TMPDIR -The directory in which temporary files will be created. -If this is not set and -.B -.SM TMPDIR -is set, temporary files will be created in that directory. -Otherwise temporary files will be created in -.BR /tmp . -The -.BR grops (@MAN1EXT@) -and -.BR @g@refer (@MAN1EXT@) -commands can create temporary files. -.SH FILES -.Tp \w'\fB@FONTDIR@/dev\fIname\fB/DESC'u+3n -.BI @FONTDIR@/dev name /DESC -Device description file for device -.IR name . -.TP -.BI @FONTDIR@/dev name / F -Font file for font -.I F -of device -.IR name . -.SH AUTHOR -James Clark -.SH BUGS -Report bugs to bug-groff@prep.ai.mit.edu. -Include a complete, self-contained example -that will allow the bug to be reproduced, -and say which version of groff you are using. -.SH COPYRIGHT -Copyright \(co 1989, 1990, 1991, 1992 Free Software Foundation, Inc. -.LP -groff is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2, or (at your option) any later -version. -.LP -groff is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. -.LP -You should have received a copy of the GNU General Public License along -with groff; see the file COPYING. If not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -.SH AVAILABILITY -The most recent released version of groff is always available for -anonymous ftp from prep.ai.mit.edu (18.71.0.38) in the directory -pub/gnu. -.SH "SEE ALSO" -.BR grog (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@tbl (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@), -.BR @g@soelim (@MAN1EXT@) , -.BR @g@refer (@MAN1EXT@), -.BR grops (@MAN1EXT@), -.BR grodvi (@MAN1EXT@), -.BR grotty (@MAN1EXT@), -.BR gxditview (@MAN1EXT@), -.BR deroff (@MAN1EXT@), -.BR groff_font (@MAN5EXT@), -.BR groff_out (@MAN5EXT@), -.BR groff_ms (@MAN7EXT@), -.BR me (@MAN7EXT@), -.BR groff_char (@MAN7EXT@), -.BR msafer (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grog/Makefile.sub b/gnu/usr.bin/groff/grog/Makefile.sub index 5b8f089f683..b0a2525e67b 100644 --- a/gnu/usr.bin/groff/grog/Makefile.sub +++ b/gnu/usr.bin/groff/grog/Makefile.sub @@ -1,4 +1,4 @@ -MAN1=grog.n +MAN1=grog.1 CLEANADD=grog all: grog diff --git a/gnu/usr.bin/groff/grog/grog.1_in b/gnu/usr.bin/groff/grog/grog.1_in new file mode 100644 index 00000000000..8e92657309c --- /dev/null +++ b/gnu/usr.bin/groff/grog/grog.1_in @@ -0,0 +1,72 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH GROG @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grog \- guess options for groff command +.SH SYNOPSIS +.B grog +[ +.BI \- option +\|.\|.\|. +] +[ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +.B grog +reads +.I files +and guesses which of the +.BR groff (@MAN1EXT@) +options +.BR \-e , +.BR \-man , +.BR \-me , +.BR \-mm , +.BR \-ms , +.BR \-p , +.BR \-s , +and +.BR \-t +are required for printing +.IR files , +and prints the groff command including those options on the standard output. +A filename of +.B \- +is taken to refer to the standard input. +If no files are specified the standard input will be read. +Any specified options will be included in the printed command. +No space is allowed between options and their arguments. +For example, +.IP +.B `grog \-Tdvi paper.ms` +.LP +will guess the appropriate command to print +.B paper.ms +and then run it after adding the +.B \-Tdvi +option. +.SH "SEE ALSO" +.BR doctype (1), +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@tbl (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@), +.BR @g@soelim (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/grog/grog.man b/gnu/usr.bin/groff/grog/grog.man deleted file mode 100644 index 8e92657309c..00000000000 --- a/gnu/usr.bin/groff/grog/grog.man +++ /dev/null @@ -1,72 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH GROG @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grog \- guess options for groff command -.SH SYNOPSIS -.B grog -[ -.BI \- option -\|.\|.\|. -] -[ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -.B grog -reads -.I files -and guesses which of the -.BR groff (@MAN1EXT@) -options -.BR \-e , -.BR \-man , -.BR \-me , -.BR \-mm , -.BR \-ms , -.BR \-p , -.BR \-s , -and -.BR \-t -are required for printing -.IR files , -and prints the groff command including those options on the standard output. -A filename of -.B \- -is taken to refer to the standard input. -If no files are specified the standard input will be read. -Any specified options will be included in the printed command. -No space is allowed between options and their arguments. -For example, -.IP -.B `grog \-Tdvi paper.ms` -.LP -will guess the appropriate command to print -.B paper.ms -and then run it after adding the -.B \-Tdvi -option. -.SH "SEE ALSO" -.BR doctype (1), -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@tbl (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@), -.BR @g@soelim (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/grohtml/Makefile.sub b/gnu/usr.bin/groff/grohtml/Makefile.sub index 3faa1e30125..d75c98a0a5a 100644 --- a/gnu/usr.bin/groff/grohtml/Makefile.sub +++ b/gnu/usr.bin/groff/grohtml/Makefile.sub @@ -1,5 +1,5 @@ PROG=grohtml -MAN1=grohtml.n +MAN1=grohtml.1 XLIBS=$(LIBDRIVER) $(LIBGROFF) MLIB=$(LIBM) OBJS=html.o diff --git a/gnu/usr.bin/groff/grohtml/grohtml.1_in b/gnu/usr.bin/groff/grohtml/grohtml.1_in new file mode 100644 index 00000000000..63b05edd358 --- /dev/null +++ b/gnu/usr.bin/groff/grohtml/grohtml.1_in @@ -0,0 +1,173 @@ +.ig \"-*- nroff -*- +Copyright (C) 1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grohtml \- html driver for groff +.SH SYNOPSIS +.B grohtml +[ +.B \-atvdgm? +] [ +.BI \-F dir +] [ +.BI \-I imagetype +] [ +.BI \-r resolution +] [ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +.B grohtml +translates the output of GNU +.B troff +to html. +Normally +.B grohtml +should be invoked by using the groff command with a +.B \-Thtml +option. +If no files are given, +.B grohtml +will read the standard input. +A filename of +.B \- +will also cause +.B grohtml +to read the standard input. +Html output is written to the standard output. +When +.B grohtml +is run by +.B groff +options can be passed to +.B grohtml +using the +.B groff +.B \-P +option. +.SH OPTIONS +.TP +.B \-a +force +.B grohtml +to generate html line breaks in the same position as troff dictates. +Without this option +.B grohtml +generates text in paragraphs which is formatted by the html browser. +.TP +.B \-d +turn on internal debugging. +.TP +.B \-g +tell +.B grohtml +not to try and guess titles and headings. +By using this flag together with the -m and -a flag +.B grohtml +will treat the html browser as a printer, not as a formatter. +.TP +.B \-m +leave margins alone. +.B grohtml +will not remove left margins. +.TP +.B \-t +forbids +.B grohtml +from generating html tables when implementing indentation and tabular text. +.B grohtml +can implement .IP by tables or html indents. +However if .2C is used it can only be sensibly converted to html using a +table structure. +As a few known bugs still exist with the html table code this option is +present to supress execution of this development code. +The default in +.B grohtml +is that html tables are generated when appropriate. +.TP +.BI \-F dir +Search the directory +.IB dir /dev name +for font and device description files; +.I name +is the name of the device, usually +.BR html . +.TP +.BI \-I imagetype +select the type of image generated when grohtml encounters an equation, +table, or picture. +By default this is png256. +Legal image types are: gif and any of the png formats which are supported by +ghostscript gs(1). +.TP +.BI \-r resolution +select the resolution for all images. +By default this is 80 pixels per inch. +Example: -r100 indicates 100 pixels per inch. +.TP +.B \-v +Print the version number. +.TP +.B \-? +Display usage. +.SH USAGE +There are styles called +.BR R , +.BR I , +.BR B , +and +.B BI +mounted at font positions 1 to 4. +It is advisable to invoke groff with the -mhtml macro set, which turns off +headers, footers, and hyphenation; additionally, it will right justify text. +.SH DEPENDENCIES +.B grohtml +is dependent upon grops and gs. +If +.B grohtml +has been configured to generate gif files then it is further dependent upon, +ppmtogif, and ppmquant. +However if it has been configured to generate png files (the default) then +it is dependent upon gs having a png output device. +Images are generated whenever a table, picture, equation or line is +encountered. +.SH BUGS +This is still very alpha. +At least three major bugs remain: +Firstly, +.B grohtml +sometimes miscalculates the end of an html table resulting in text which +appears twice. +Secondly equation numbers are not handled correctly. +Thirdly equation macros and pic macros can confuse +.BR grohtml . +.SH "SEE ALSO" +.BR afmtodit (@MAN1EXT@), +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR psbb (@MAN1EXT@), +.BR groff_out (@MAN5EXT@), +.BR groff_font (@MAN5EXT@), +.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grohtml/grohtml.man b/gnu/usr.bin/groff/grohtml/grohtml.man deleted file mode 100644 index 63b05edd358..00000000000 --- a/gnu/usr.bin/groff/grohtml/grohtml.man +++ /dev/null @@ -1,173 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grohtml \- html driver for groff -.SH SYNOPSIS -.B grohtml -[ -.B \-atvdgm? -] [ -.BI \-F dir -] [ -.BI \-I imagetype -] [ -.BI \-r resolution -] [ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -.B grohtml -translates the output of GNU -.B troff -to html. -Normally -.B grohtml -should be invoked by using the groff command with a -.B \-Thtml -option. -If no files are given, -.B grohtml -will read the standard input. -A filename of -.B \- -will also cause -.B grohtml -to read the standard input. -Html output is written to the standard output. -When -.B grohtml -is run by -.B groff -options can be passed to -.B grohtml -using the -.B groff -.B \-P -option. -.SH OPTIONS -.TP -.B \-a -force -.B grohtml -to generate html line breaks in the same position as troff dictates. -Without this option -.B grohtml -generates text in paragraphs which is formatted by the html browser. -.TP -.B \-d -turn on internal debugging. -.TP -.B \-g -tell -.B grohtml -not to try and guess titles and headings. -By using this flag together with the -m and -a flag -.B grohtml -will treat the html browser as a printer, not as a formatter. -.TP -.B \-m -leave margins alone. -.B grohtml -will not remove left margins. -.TP -.B \-t -forbids -.B grohtml -from generating html tables when implementing indentation and tabular text. -.B grohtml -can implement .IP by tables or html indents. -However if .2C is used it can only be sensibly converted to html using a -table structure. -As a few known bugs still exist with the html table code this option is -present to supress execution of this development code. -The default in -.B grohtml -is that html tables are generated when appropriate. -.TP -.BI \-F dir -Search the directory -.IB dir /dev name -for font and device description files; -.I name -is the name of the device, usually -.BR html . -.TP -.BI \-I imagetype -select the type of image generated when grohtml encounters an equation, -table, or picture. -By default this is png256. -Legal image types are: gif and any of the png formats which are supported by -ghostscript gs(1). -.TP -.BI \-r resolution -select the resolution for all images. -By default this is 80 pixels per inch. -Example: -r100 indicates 100 pixels per inch. -.TP -.B \-v -Print the version number. -.TP -.B \-? -Display usage. -.SH USAGE -There are styles called -.BR R , -.BR I , -.BR B , -and -.B BI -mounted at font positions 1 to 4. -It is advisable to invoke groff with the -mhtml macro set, which turns off -headers, footers, and hyphenation; additionally, it will right justify text. -.SH DEPENDENCIES -.B grohtml -is dependent upon grops and gs. -If -.B grohtml -has been configured to generate gif files then it is further dependent upon, -ppmtogif, and ppmquant. -However if it has been configured to generate png files (the default) then -it is dependent upon gs having a png output device. -Images are generated whenever a table, picture, equation or line is -encountered. -.SH BUGS -This is still very alpha. -At least three major bugs remain: -Firstly, -.B grohtml -sometimes miscalculates the end of an html table resulting in text which -appears twice. -Secondly equation numbers are not handled correctly. -Thirdly equation macros and pic macros can confuse -.BR grohtml . -.SH "SEE ALSO" -.BR afmtodit (@MAN1EXT@), -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR psbb (@MAN1EXT@), -.BR groff_out (@MAN5EXT@), -.BR groff_font (@MAN5EXT@), -.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grolj4/Makefile.sub b/gnu/usr.bin/groff/grolj4/Makefile.sub index 83b57127586..37ccc927bd0 100644 --- a/gnu/usr.bin/groff/grolj4/Makefile.sub +++ b/gnu/usr.bin/groff/grolj4/Makefile.sub @@ -1,5 +1,5 @@ PROG=grolj4 -MAN1=grolj4.n +MAN1=grolj4.1 XLIBS=$(LIBDRIVER) $(LIBGROFF) MLIB=$(LIBM) OBJS=lj4.o diff --git a/gnu/usr.bin/groff/grolj4/grolj4.1_in b/gnu/usr.bin/groff/grolj4/grolj4.1_in new file mode 100644 index 00000000000..9a7c7fde70e --- /dev/null +++ b/gnu/usr.bin/groff/grolj4/grolj4.1_in @@ -0,0 +1,119 @@ +.ig \"-*- nroff -*- +Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH GROLJ4 @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grolj4 \- groff driver for HP Laserjet 4 family +.SH SYNOPSIS +.B grolj4 +[ +.B \-lv +] [ +.B \-d +[\c +.IR n ] +] [ +.BI \-c n +] [ +.BI \-p paper_size +] [ +.BI \-w n +] [ +.BI \-F dir +] [ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +.B grolj4 +is a driver for +.B groff +that produces output in PCL5 format suitable for an HP Laserjet 4 printer. +.LP +There is an additional drawing command available: +.TP +.BI \eD'R\ dh\ dv ' +Draw a rule (solid black rectangle), with one corner +at the current position, and the diagonally opposite corner +at the current position +.RI +( dh , dv ). +Afterwards the current position will be at the opposite corner. This +generates a PCL fill rectangle command, and so will work on +printers that do not support HPGL/2 unlike the other +.B \eD +commands. +.SH OPTIONS +.TP +.BI \-c n +Print +.I n +copies of each page. +.TP +.B \-l +Print the document with a landscape orientation. +.TP +.BI "\-d [" n ] +Use duplex mode +.IR n : +1\ is long-side binding; 2\ is short-side binding; +default is\ 1. +.TP +.BI \-p size +Set the paper size to +.IR size , +which must be one of +letter, legal, executive, a4, com10, monarch, c5, b5, dl. +.TP +.B \-v +Print the version number. +.TP +.BI \-w n +Set the default line thickness to +.I n +thousandths of an em. +.TP +.BI \-F dir +Search directory +.IB dir /devlj4 +for font and device description files. +.SH FILES +.TP +.B @FONTDIR@/devlj4/DESC +Device description file. +.TP +.B @FONTDIR@/devlj4/ F +Font description file for font +.IR F . +.TP +.B @MACRODIR@/tmac.lj4 +Macros for use with +.BR grolj4 . +.SH BUGS +Small dots. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@), +.BR groff_out (@MAN5EXT@), +.BR groff_font (@MAN5EXT@), +.BR groff_char (@MAN7EXT@), diff --git a/gnu/usr.bin/groff/grolj4/grolj4.man b/gnu/usr.bin/groff/grolj4/grolj4.man deleted file mode 100644 index 9a7c7fde70e..00000000000 --- a/gnu/usr.bin/groff/grolj4/grolj4.man +++ /dev/null @@ -1,119 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH GROLJ4 @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grolj4 \- groff driver for HP Laserjet 4 family -.SH SYNOPSIS -.B grolj4 -[ -.B \-lv -] [ -.B \-d -[\c -.IR n ] -] [ -.BI \-c n -] [ -.BI \-p paper_size -] [ -.BI \-w n -] [ -.BI \-F dir -] [ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -.B grolj4 -is a driver for -.B groff -that produces output in PCL5 format suitable for an HP Laserjet 4 printer. -.LP -There is an additional drawing command available: -.TP -.BI \eD'R\ dh\ dv ' -Draw a rule (solid black rectangle), with one corner -at the current position, and the diagonally opposite corner -at the current position -.RI +( dh , dv ). -Afterwards the current position will be at the opposite corner. This -generates a PCL fill rectangle command, and so will work on -printers that do not support HPGL/2 unlike the other -.B \eD -commands. -.SH OPTIONS -.TP -.BI \-c n -Print -.I n -copies of each page. -.TP -.B \-l -Print the document with a landscape orientation. -.TP -.BI "\-d [" n ] -Use duplex mode -.IR n : -1\ is long-side binding; 2\ is short-side binding; -default is\ 1. -.TP -.BI \-p size -Set the paper size to -.IR size , -which must be one of -letter, legal, executive, a4, com10, monarch, c5, b5, dl. -.TP -.B \-v -Print the version number. -.TP -.BI \-w n -Set the default line thickness to -.I n -thousandths of an em. -.TP -.BI \-F dir -Search directory -.IB dir /devlj4 -for font and device description files. -.SH FILES -.TP -.B @FONTDIR@/devlj4/DESC -Device description file. -.TP -.B @FONTDIR@/devlj4/ F -Font description file for font -.IR F . -.TP -.B @MACRODIR@/tmac.lj4 -Macros for use with -.BR grolj4 . -.SH BUGS -Small dots. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@), -.BR groff_out (@MAN5EXT@), -.BR groff_font (@MAN5EXT@), -.BR groff_char (@MAN7EXT@), diff --git a/gnu/usr.bin/groff/grops/Makefile.sub b/gnu/usr.bin/groff/grops/Makefile.sub index 891472b746e..b452ea6cd25 100644 --- a/gnu/usr.bin/groff/grops/Makefile.sub +++ b/gnu/usr.bin/groff/grops/Makefile.sub @@ -1,5 +1,5 @@ PROG=grops -MAN1=grops.n +MAN1=grops.1 XLIBS=$(LIBDRIVER) $(LIBGROFF) MLIB=$(LIBM) OBJS=ps.o psrm.o diff --git a/gnu/usr.bin/groff/grops/grops.1_in b/gnu/usr.bin/groff/grops/grops.1_in new file mode 100644 index 00000000000..6ac082f3677 --- /dev/null +++ b/gnu/usr.bin/groff/grops/grops.1_in @@ -0,0 +1,837 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grops \- PostScript driver for groff +.SH SYNOPSIS +.B grops +[ +.B \-glmv +] [ +.BI \-b n +] [ +.BI \-c n +] [ +.BI \-w n +] [ +.BI \-F dir +] [ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +.B grops +translates the output of GNU +.B troff +to PostScript. +Normally +.B grops +should be invoked by using the groff command +with a +.B \-Tps +option. +.if '@DEVICE@'ps' (Actually, this is the default for groff.) +If no files are given, +.B grops +will read the standard input. +A filename of +.B \- +will also cause +.B grops +to read the standard input. +PostScript output is written to the standard output. +When +.B grops +is run by +.B groff +options can be passed to +.B grops +using the +.B groff +.B \-P +option. +.SH OPTIONS +.TP +.BI \-b n +Workaround broken spoolers and previewers. +Normally +.B grops +produces output that conforms +the Document Structuring Conventions version 3.0. +Unfortunately some spoolers and previewers can't handle such output. +The value of +.I n +controls what +.B grops +does to its output acceptable to such programs. +A value of 0 will cause grops not to employ any workarounds. +Add 1 if no +.B %%BeginDocumentSetup +and +.B %%EndDocumentSetup +comments should be generated; +this is needed for early versions of TranScript that get confused by +anything between the +.B %%EndProlog +comment and the first +.B %%Page +comment. +Add 2 if lines in included files beginning with +.B %! +should be stripped out; this is needed for Sun's pageview previewer. +Add 4 if +.BR %%Page , +.BR %%Trailer +and +.B %%EndProlog +comments should be +stripped out of included files; this is needed for spoolers that +don't understand the +.B %%BeginDocument +and +.B %%EndDocument +comments. +Add 8 if the first line of the PostScript output should be +.B %!PS-Adobe-2.0 +rather than +.BR %!PS-Adobe-3.0 ; +this is needed when using Sun's Newsprint with a printer that requires +page reversal. +The default value can be specified by a +.RS +.IP +.BI broken\ n +.LP +command in the DESC file. +Otherwise the default value is 0. +.RE +.TP +.BI \-c n +Print +.I n +copies of each page. +.TP +.BI \-g +Guess the page length. +This generates PostScript code that guesses the page length. +The guess will be correct only if the imageable area is vertically +centered on the page. +This option allows you to generate documents that can be printed +both on letter (8.5\(mu11) paper and on A4 paper without change. +.TP +.B \-l +Print the document in landscape format. +.TP +.B \-m +Turn manual feed on for the document. +.TP +.BI \-F dir +Search the directory +.IB dir /dev name +for font and device description files; +.I name +is the name of the device, usually +.BR ps . +.TP +.BI \-w n +Lines should be drawn using a thickness of +.I n +thousandths of an em. +.TP +.B \-v +Print the version number. +.SH USAGE +There are styles called +.BR R , +.BR I , +.BR B , +and +.B BI +mounted at font positions 1 to 4. +The fonts are grouped into families +.BR A , +.BR BM , +.BR C , +.BR H , +.BR HN , +.BR N , +.B P +and +.B T +having members in each of these styles: +.de FT +.if '\\*(.T'ps' .ft \\$1 +.. +.TP +.B AR +.FT AR +AvantGarde-Book +.FT +.TP +.B AI +.FT AI +AvantGarde-BookOblique +.FT +.TP +.B AB +.FT AB +AvantGarde-Demi +.FT +.TP +.B ABI +.FT ABI +AvantGarde-DemiOblique +.FT +.TP +.B BMR +.FT BMR +Bookman-Light +.FT +.TP +.B BMI +.FT BMI +Bookman-LightItalic +.FT +.TP +.B BMB +.FT BMB +Bookman-Demi +.FT +.TP +.B BMBI +.FT BMBI +Bookman-DemiItalic +.FT +.TP +.B CR +.FT CR +Courier +.FT +.TP +.B CI +.FT CI +Courier-Oblique +.FT +.TP +.B CB +.FT CB +Courier-Bold +.FT +.TP +.B CBI +.FT CBI +Courier-BoldOblique +.FT +.TP +.B HR +.FT HR +Helvetica +.FT +.TP +.B HI +.FT HI +Helvetica-Oblique +.FT +.TP +.B HB +.FT HB +Helvetica-Bold +.FT +.TP +.B HBI +.FT HBI +Helvetica-BoldOblique +.FT +.TP +.B HNR +.FT HNR +Helvetica-Narrow +.FT +.TP +.B HNI +.FT HNI +Helvetica-Narrow-Oblique +.FT +.TP +.B HNB +.FT HNB +Helvetica-Narrow-Bold +.FT +.TP +.B HNBI +.FT HNBI +Helvetica-Narrow-BoldOblique +.FT +.TP +.B NR +.FT NR +NewCenturySchlbk-Roman +.FT +.TP +.B NI +.FT NI +NewCenturySchlbk-Italic +.FT +.TP +.B NB +.FT NB +NewCenturySchlbk-Bold +.FT +.TP +.B NBI +.FT NBI +NewCenturySchlbk-BoldItalic +.FT +.TP +.B PR +.FT PR +Palatino-Roman +.FT +.TP +.B PI +.FT PI +Palatino-Italic +.FT +.TP +.B PB +.FT PB +Palatino-Bold +.FT +.TP +.B PBI +.FT PBI +Palatino-BoldItalic +.FT +.TP +.B TR +.FT TR +Times-Roman +.FT +.TP +.B TI +.FT TI +Times-Italic +.FT +.TP +.B TB +.FT TB +Times-Bold +.FT +.TP +.B TBI +.FT TBI +Times-BoldItalic +.FT +.LP +There is also the following font which is not a member of a family: +.TP +.B ZCMI +.FT ZCMI +ZapfChancery-MediumItalic +.FT +.LP +There are also some special fonts called +.B SS +and +.BR S . +Zapf Dingbats is available as +.BR ZD +and a reversed version of ZapfDingbats (with symbols pointing in the opposite +direction) is available as +.BR ZDR ; +most characters in these fonts are unnamed and must be accessed using +.BR \eN . +.LP +.B grops +understands various X commands produced using the +.B \eX +escape sequence; +.B grops +will only interpret commands that begin with a +.B ps: +tag. +.TP +.BI \eX'ps:\ exec\ code ' +This executes the arbitrary PostScript commands in +.IR code . +The PostScript currentpoint will be set to the position of the +.B \eX +command before executing +.IR code . +The origin will be at the top left corner of the page, +and y coordinates will increase down the page. +A procedure +.B u +will be defined that converts groff units +to the coordinate system in effect. +For example, +.RS +.IP +.B +\&.nr x 1i +.br +.B +\eX'ps: exec \enx u 0 rlineto stroke' +.br +.RE +.IP +will draw a horizontal line one inch long. +.I code +may make changes to the graphics state, +but any changes will persist only to the +end of the page. +A dictionary containing the definitions specified by the +.B def +and +.B mdef +will be on top of the dictionary stack. +If your code adds definitions to this dictionary, +you should allocate space for them using +.BI \eX'ps\ mdef \ n '\fR. +Any definitions will persist only until the end of the page. +If you use the +.B \eY +escape sequence with an argument that names a macro, +.I code +can extend over multiple lines. +For example, +.RS +.IP +.nf +.ft B +\&.nr x 1i +\&.de y +\&ps: exec +\&\enx u 0 rlineto +\&stroke +\&.. +\&\eYy +.fi +.ft R +.LP +is another way to draw a horizontal line one inch long. +.RE +.TP +.BI \eX'ps:\ file\ name ' +This is the same as the +.B exec +command except that the PostScript code is read from file +.IR name . +.TP +.BI \eX'ps:\ def\ code ' +Place a PostScript definition contained in +.I code +in the prologue. +There should be at most one definition per +.B \eX +command. +Long definitions can be split over several +.B \eX +commands; +all the +.I code +arguments are simply joined together separated by newlines. +The definitions are placed in a dictionary which is automatically +pushed on the dictionary stack when an +.B exec +command is executed. +If you use the +.B \eY +escape sequence with an argument that names a macro, +.I code +can extend over multiple lines. +.TP +.BI \eX'ps:\ mdef\ n\ code ' +Like +.BR def , +except that +.I code +may contain up to +.I n +definitions. +.B grops +needs to know how many definitions +.I code +contains +so that it can create an appropriately sized PostScript dictionary +to contain them. +.TP +.BI \eX'ps:\ import\ file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP ' +Import a PostScript graphic from +.IR file . +The arguments +.IR llx , +.IR lly , +.IR urx , +and +.I ury +give the bounding box of the graphic in the default PostScript +coordinate system; they should all be integers; +.I llx +and +.I lly +are the x and y coordinates of the lower left +corner of the graphic; +.I urx +and +.I ury +are the x and y coordinates of the upper right corner of the graphic; +.I width +and +.I height +are integers that give the desired width and height in groff +units of the graphic. +The graphic will be scaled so that it has this width and height +and translated so that the lower left corner of the graphic is +located at the position associated with +.B \eX +command. +If the height argument is omitted it will be scaled uniformly in the +x and y directions so that it has the specified width. +Note that the contents of the +.B \eX +command are not interpreted by +.BR troff ; +so vertical space for the graphic is not automatically added, +and the +.I width +and +.I height +arguments are not allowed to have attached scaling indicators. +If the PostScript file complies with the Adobe Document Structuring +Conventions and contains a +.B %%BoundingBox +comment, then the bounding box can be automatically +extracted from within groff by using the +.B sy +request to run the +.B psbb +command. +.RS +.LP +The +.B \-mps +macros (which are automatically loaded when +.B grops +is run by the groff command) include a +.B PSPIC +macro which allows a picture to be easily imported. +This has the format +.IP +\&\fB.PSPIC\fP [ \fB\-L\fP | \fB-R\fP | \fB\-I\fP \fIn\fP ]\ \" +\fI\|file\fP [ \fIwidth\fP [ \fIheight\fP ]] +.LP +.I file +is the name of the file containing the illustration; +.I width +and +.I height +give the desired width and height of the graphic. +The +.I width +and +.I height +arguments may have scaling indicators attached; +the default scaling indicator is +.BR i . +This macro will scale the graphic uniformly +in the x and y directions so that it is no more than +.I width +wide +and +.I height +high. +By default, the graphic will be horizontally centered. +The +.BI \-L +and +.BI \-R +cause the graphic to be left-aligned and right-aligned +respectively. +The +.B \-I +option causes the graphic to be indented by +.IR n . +.RE +.TP +.B \eX'ps:\ invis' +.br +.ns +.TP +.B \eX'ps:\ endinvis' +No output will be generated for text and drawing commands +that are bracketed with these +.B \eX +commands. +These commands are intended for use when output from +.B troff +will be previewed before being processed with +.BR grops ; +if the previewer is unable to display certain characters +or other constructs, then other substitute characters or constructs +can be used for previewing by bracketing them with these +.B \eX +commands. +.RS +.LP +For example, +.B gxditview +is not able to display a proper +.B \e(em +character because the standard X11 fonts do not provide it; +this problem can be overcome by executing the following +request +.IP +.ft B +.nf +\&.char \e(em \eX'ps: invis'\e +\eZ'\ev'-.25m'\eh'.05m'\eD'l .9m 0'\eh'.05m''\e +\eX'ps: endinvis'\e(em +.ft +.fi +.LP +In this case, +.B gxditview +will be unable to display the +.B \e(em +character and will draw the line, +whereas +.B grops +will print the +.B \e(em +character +and ignore the line. +.RE +.LP +The input to +.B grops +must be in the format output by +.BR @g@troff (@MAN1EXT@). +This is described in +.BR groff_out (@MAN1EXT@). +In addition the device and font description files for the device used +must meet certain requirements. +The device and font description files supplied for +.B ps +device meet all these requirements. +.BR afmtodit (@MAN1EXT@) +can be used to create font files from AFM files. +The resolution must be an integer multiple of 72 times the +.BR sizescale . +The +.B ps +device uses a resolution of 72000 and a sizescale of 1000. +The device description file should contain a command +.IP +.BI paperlength\ n +.LP +which says that output should be generated which is suitable for +printing on a page whose length is +.I n +machine units. +Each font description file must contain a command +.IP +.BI internalname\ psname +.LP +which says that the PostScript name of the font is +.IR psname . +It may also contain a command +.IP +.BI encoding\ enc_file +.LP +which says that +the PostScript font should be reencoded using the encoding described in +.IR enc_file ; +this file should consist of a sequence of lines of the form: +.IP +.I +pschar code +.LP +where +.I pschar +is the PostScript name of the character, +and +.I code +is its position in the encoding expressed as a decimal integer. +The code for each character given in the font file must correspond +to the code for the character in encoding file, or to the code in the default +encoding for the font if the PostScript font is not to be reencoded. +This code can be used with the +.B \eN +escape sequence in +.B troff +to select the character, +even if the character does not have a groff name. +Every character in the font file must exist in the PostScript font, and +the widths given in the font file must match the widths used +in the PostScript font. +.B grops +will assume that a character with a groff name of +.B space +is blank (makes no marks on the page); +it can make use of such a character to generate more efficient and +compact PostScript output. +.LP +.B grops +can automatically include the downloadable fonts necessary +to print the document. +Any downloadable fonts which should, when required, be included by +.B grops +must be listed in the file +.BR @FONTDIR@/devps/download ; +this should consist of lines of the form +.IP +.I +font filename +.LP +where +.I font +is the PostScript name of the font, +and +.I filename +is the name of the file containing the font; +lines beginning with +.B # +and blank lines are ignored; +fields may be separated by tabs or spaces; +.I filename +will be searched for using the same mechanism that is used +for groff font metric files. +The +.B download +file itself will also be searched for using this mechanism. +.LP +If the file containing a downloadable font or imported document +conforms to the Adobe Document Structuring Conventions, +then +.B grops +will interpret any comments in the files sufficiently to ensure that its +own output is conforming. +It will also supply any needed font resources that are listed in the +.B download +file +as well as any needed file resources. +It is also able to handle inter-resource dependencies. +For example, suppose that you have a downloadable font called Garamond, +and also a downloadable font called Garamond-Outline +which depends on Garamond +(typically it would be defined to copy Garamond's font dictionary, +and change the PaintType), +then it is necessary for Garamond to be appear before Garamond-Outline +in the PostScript document. +.B grops +will handle this automatically +provided that the downloadable font file for Garamond-Outline +indicates its dependence on Garamond by means of +the Document Structuring Conventions, +for example by beginning with the following lines +.IP +.B +%!PS-Adobe-3.0 Resource-Font +.br +.B +%%DocumentNeededResources: font Garamond +.br +.B +%%EndComments +.br +.B +%%IncludeResource: font Garamond +.LP +In this case both Garamond and Garamond-Outline would need to be listed +in the +.B download +file. +A downloadable font should not include its own name in a +.B %%DocumentSuppliedResources +comment. +.LP +.B grops +will not interpret +.B %%DocumentFonts +comments. +The +.BR %%DocumentNeededResources , +.BR %%DocumentSuppliedResources , +.BR %%IncludeResource , +.BR %%BeginResource +and +.BR %%EndResource +comments +(or possibly the old +.BR %%DocumentNeededFonts , +.BR %%DocumentSuppliedFonts , +.BR %%IncludeFont , +.BR %%BeginFont +and +.BR %%EndFont +comments) +should be used. +.SH FILES +.Tp \w'\fB@FONTDIR@/devps/download'u+2n +.B @FONTDIR@/devps/DESC +Device description file. +.TP +.BI @FONTDIR@/devps/ F +Font description file for font +.IR F . +.TP +.B @FONTDIR@/devps/download +List of downloadable fonts. +.TP +.B @FONTDIR@/devps/text.enc +Encoding used for text fonts. +.TP +.B @MACRODIR@/tmac.ps +Macros for use with +.BR grops ; +automatically loaded by +.BR troffrc +.TP +.B @MACRODIR@/tmac.pspic +Definition of +.B PSPIC +macro, +automatically loaded by +.BR tmac.ps . +.TP +.B @MACRODIR@/tmac.psold +Macros to disable use of characters not present in older +PostScript printers; automatically loaded by +.BR tmac.ps . +.TP +.B @MACRODIR@/tmac.psnew +Macros to undo the effect of +.BR tmac.psold . +.TP +.BI /tmp/grops XXXXXX +Temporary file. +.SH "SEE ALSO" +.BR afmtodit (@MAN1EXT@), +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR psbb (@MAN1EXT@), +.BR groff_out (@MAN5EXT@), +.BR groff_font (@MAN5EXT@), +.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grops/grops.man b/gnu/usr.bin/groff/grops/grops.man deleted file mode 100644 index 6ac082f3677..00000000000 --- a/gnu/usr.bin/groff/grops/grops.man +++ /dev/null @@ -1,837 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grops \- PostScript driver for groff -.SH SYNOPSIS -.B grops -[ -.B \-glmv -] [ -.BI \-b n -] [ -.BI \-c n -] [ -.BI \-w n -] [ -.BI \-F dir -] [ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -.B grops -translates the output of GNU -.B troff -to PostScript. -Normally -.B grops -should be invoked by using the groff command -with a -.B \-Tps -option. -.if '@DEVICE@'ps' (Actually, this is the default for groff.) -If no files are given, -.B grops -will read the standard input. -A filename of -.B \- -will also cause -.B grops -to read the standard input. -PostScript output is written to the standard output. -When -.B grops -is run by -.B groff -options can be passed to -.B grops -using the -.B groff -.B \-P -option. -.SH OPTIONS -.TP -.BI \-b n -Workaround broken spoolers and previewers. -Normally -.B grops -produces output that conforms -the Document Structuring Conventions version 3.0. -Unfortunately some spoolers and previewers can't handle such output. -The value of -.I n -controls what -.B grops -does to its output acceptable to such programs. -A value of 0 will cause grops not to employ any workarounds. -Add 1 if no -.B %%BeginDocumentSetup -and -.B %%EndDocumentSetup -comments should be generated; -this is needed for early versions of TranScript that get confused by -anything between the -.B %%EndProlog -comment and the first -.B %%Page -comment. -Add 2 if lines in included files beginning with -.B %! -should be stripped out; this is needed for Sun's pageview previewer. -Add 4 if -.BR %%Page , -.BR %%Trailer -and -.B %%EndProlog -comments should be -stripped out of included files; this is needed for spoolers that -don't understand the -.B %%BeginDocument -and -.B %%EndDocument -comments. -Add 8 if the first line of the PostScript output should be -.B %!PS-Adobe-2.0 -rather than -.BR %!PS-Adobe-3.0 ; -this is needed when using Sun's Newsprint with a printer that requires -page reversal. -The default value can be specified by a -.RS -.IP -.BI broken\ n -.LP -command in the DESC file. -Otherwise the default value is 0. -.RE -.TP -.BI \-c n -Print -.I n -copies of each page. -.TP -.BI \-g -Guess the page length. -This generates PostScript code that guesses the page length. -The guess will be correct only if the imageable area is vertically -centered on the page. -This option allows you to generate documents that can be printed -both on letter (8.5\(mu11) paper and on A4 paper without change. -.TP -.B \-l -Print the document in landscape format. -.TP -.B \-m -Turn manual feed on for the document. -.TP -.BI \-F dir -Search the directory -.IB dir /dev name -for font and device description files; -.I name -is the name of the device, usually -.BR ps . -.TP -.BI \-w n -Lines should be drawn using a thickness of -.I n -thousandths of an em. -.TP -.B \-v -Print the version number. -.SH USAGE -There are styles called -.BR R , -.BR I , -.BR B , -and -.B BI -mounted at font positions 1 to 4. -The fonts are grouped into families -.BR A , -.BR BM , -.BR C , -.BR H , -.BR HN , -.BR N , -.B P -and -.B T -having members in each of these styles: -.de FT -.if '\\*(.T'ps' .ft \\$1 -.. -.TP -.B AR -.FT AR -AvantGarde-Book -.FT -.TP -.B AI -.FT AI -AvantGarde-BookOblique -.FT -.TP -.B AB -.FT AB -AvantGarde-Demi -.FT -.TP -.B ABI -.FT ABI -AvantGarde-DemiOblique -.FT -.TP -.B BMR -.FT BMR -Bookman-Light -.FT -.TP -.B BMI -.FT BMI -Bookman-LightItalic -.FT -.TP -.B BMB -.FT BMB -Bookman-Demi -.FT -.TP -.B BMBI -.FT BMBI -Bookman-DemiItalic -.FT -.TP -.B CR -.FT CR -Courier -.FT -.TP -.B CI -.FT CI -Courier-Oblique -.FT -.TP -.B CB -.FT CB -Courier-Bold -.FT -.TP -.B CBI -.FT CBI -Courier-BoldOblique -.FT -.TP -.B HR -.FT HR -Helvetica -.FT -.TP -.B HI -.FT HI -Helvetica-Oblique -.FT -.TP -.B HB -.FT HB -Helvetica-Bold -.FT -.TP -.B HBI -.FT HBI -Helvetica-BoldOblique -.FT -.TP -.B HNR -.FT HNR -Helvetica-Narrow -.FT -.TP -.B HNI -.FT HNI -Helvetica-Narrow-Oblique -.FT -.TP -.B HNB -.FT HNB -Helvetica-Narrow-Bold -.FT -.TP -.B HNBI -.FT HNBI -Helvetica-Narrow-BoldOblique -.FT -.TP -.B NR -.FT NR -NewCenturySchlbk-Roman -.FT -.TP -.B NI -.FT NI -NewCenturySchlbk-Italic -.FT -.TP -.B NB -.FT NB -NewCenturySchlbk-Bold -.FT -.TP -.B NBI -.FT NBI -NewCenturySchlbk-BoldItalic -.FT -.TP -.B PR -.FT PR -Palatino-Roman -.FT -.TP -.B PI -.FT PI -Palatino-Italic -.FT -.TP -.B PB -.FT PB -Palatino-Bold -.FT -.TP -.B PBI -.FT PBI -Palatino-BoldItalic -.FT -.TP -.B TR -.FT TR -Times-Roman -.FT -.TP -.B TI -.FT TI -Times-Italic -.FT -.TP -.B TB -.FT TB -Times-Bold -.FT -.TP -.B TBI -.FT TBI -Times-BoldItalic -.FT -.LP -There is also the following font which is not a member of a family: -.TP -.B ZCMI -.FT ZCMI -ZapfChancery-MediumItalic -.FT -.LP -There are also some special fonts called -.B SS -and -.BR S . -Zapf Dingbats is available as -.BR ZD -and a reversed version of ZapfDingbats (with symbols pointing in the opposite -direction) is available as -.BR ZDR ; -most characters in these fonts are unnamed and must be accessed using -.BR \eN . -.LP -.B grops -understands various X commands produced using the -.B \eX -escape sequence; -.B grops -will only interpret commands that begin with a -.B ps: -tag. -.TP -.BI \eX'ps:\ exec\ code ' -This executes the arbitrary PostScript commands in -.IR code . -The PostScript currentpoint will be set to the position of the -.B \eX -command before executing -.IR code . -The origin will be at the top left corner of the page, -and y coordinates will increase down the page. -A procedure -.B u -will be defined that converts groff units -to the coordinate system in effect. -For example, -.RS -.IP -.B -\&.nr x 1i -.br -.B -\eX'ps: exec \enx u 0 rlineto stroke' -.br -.RE -.IP -will draw a horizontal line one inch long. -.I code -may make changes to the graphics state, -but any changes will persist only to the -end of the page. -A dictionary containing the definitions specified by the -.B def -and -.B mdef -will be on top of the dictionary stack. -If your code adds definitions to this dictionary, -you should allocate space for them using -.BI \eX'ps\ mdef \ n '\fR. -Any definitions will persist only until the end of the page. -If you use the -.B \eY -escape sequence with an argument that names a macro, -.I code -can extend over multiple lines. -For example, -.RS -.IP -.nf -.ft B -\&.nr x 1i -\&.de y -\&ps: exec -\&\enx u 0 rlineto -\&stroke -\&.. -\&\eYy -.fi -.ft R -.LP -is another way to draw a horizontal line one inch long. -.RE -.TP -.BI \eX'ps:\ file\ name ' -This is the same as the -.B exec -command except that the PostScript code is read from file -.IR name . -.TP -.BI \eX'ps:\ def\ code ' -Place a PostScript definition contained in -.I code -in the prologue. -There should be at most one definition per -.B \eX -command. -Long definitions can be split over several -.B \eX -commands; -all the -.I code -arguments are simply joined together separated by newlines. -The definitions are placed in a dictionary which is automatically -pushed on the dictionary stack when an -.B exec -command is executed. -If you use the -.B \eY -escape sequence with an argument that names a macro, -.I code -can extend over multiple lines. -.TP -.BI \eX'ps:\ mdef\ n\ code ' -Like -.BR def , -except that -.I code -may contain up to -.I n -definitions. -.B grops -needs to know how many definitions -.I code -contains -so that it can create an appropriately sized PostScript dictionary -to contain them. -.TP -.BI \eX'ps:\ import\ file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP ' -Import a PostScript graphic from -.IR file . -The arguments -.IR llx , -.IR lly , -.IR urx , -and -.I ury -give the bounding box of the graphic in the default PostScript -coordinate system; they should all be integers; -.I llx -and -.I lly -are the x and y coordinates of the lower left -corner of the graphic; -.I urx -and -.I ury -are the x and y coordinates of the upper right corner of the graphic; -.I width -and -.I height -are integers that give the desired width and height in groff -units of the graphic. -The graphic will be scaled so that it has this width and height -and translated so that the lower left corner of the graphic is -located at the position associated with -.B \eX -command. -If the height argument is omitted it will be scaled uniformly in the -x and y directions so that it has the specified width. -Note that the contents of the -.B \eX -command are not interpreted by -.BR troff ; -so vertical space for the graphic is not automatically added, -and the -.I width -and -.I height -arguments are not allowed to have attached scaling indicators. -If the PostScript file complies with the Adobe Document Structuring -Conventions and contains a -.B %%BoundingBox -comment, then the bounding box can be automatically -extracted from within groff by using the -.B sy -request to run the -.B psbb -command. -.RS -.LP -The -.B \-mps -macros (which are automatically loaded when -.B grops -is run by the groff command) include a -.B PSPIC -macro which allows a picture to be easily imported. -This has the format -.IP -\&\fB.PSPIC\fP [ \fB\-L\fP | \fB-R\fP | \fB\-I\fP \fIn\fP ]\ \" -\fI\|file\fP [ \fIwidth\fP [ \fIheight\fP ]] -.LP -.I file -is the name of the file containing the illustration; -.I width -and -.I height -give the desired width and height of the graphic. -The -.I width -and -.I height -arguments may have scaling indicators attached; -the default scaling indicator is -.BR i . -This macro will scale the graphic uniformly -in the x and y directions so that it is no more than -.I width -wide -and -.I height -high. -By default, the graphic will be horizontally centered. -The -.BI \-L -and -.BI \-R -cause the graphic to be left-aligned and right-aligned -respectively. -The -.B \-I -option causes the graphic to be indented by -.IR n . -.RE -.TP -.B \eX'ps:\ invis' -.br -.ns -.TP -.B \eX'ps:\ endinvis' -No output will be generated for text and drawing commands -that are bracketed with these -.B \eX -commands. -These commands are intended for use when output from -.B troff -will be previewed before being processed with -.BR grops ; -if the previewer is unable to display certain characters -or other constructs, then other substitute characters or constructs -can be used for previewing by bracketing them with these -.B \eX -commands. -.RS -.LP -For example, -.B gxditview -is not able to display a proper -.B \e(em -character because the standard X11 fonts do not provide it; -this problem can be overcome by executing the following -request -.IP -.ft B -.nf -\&.char \e(em \eX'ps: invis'\e -\eZ'\ev'-.25m'\eh'.05m'\eD'l .9m 0'\eh'.05m''\e -\eX'ps: endinvis'\e(em -.ft -.fi -.LP -In this case, -.B gxditview -will be unable to display the -.B \e(em -character and will draw the line, -whereas -.B grops -will print the -.B \e(em -character -and ignore the line. -.RE -.LP -The input to -.B grops -must be in the format output by -.BR @g@troff (@MAN1EXT@). -This is described in -.BR groff_out (@MAN1EXT@). -In addition the device and font description files for the device used -must meet certain requirements. -The device and font description files supplied for -.B ps -device meet all these requirements. -.BR afmtodit (@MAN1EXT@) -can be used to create font files from AFM files. -The resolution must be an integer multiple of 72 times the -.BR sizescale . -The -.B ps -device uses a resolution of 72000 and a sizescale of 1000. -The device description file should contain a command -.IP -.BI paperlength\ n -.LP -which says that output should be generated which is suitable for -printing on a page whose length is -.I n -machine units. -Each font description file must contain a command -.IP -.BI internalname\ psname -.LP -which says that the PostScript name of the font is -.IR psname . -It may also contain a command -.IP -.BI encoding\ enc_file -.LP -which says that -the PostScript font should be reencoded using the encoding described in -.IR enc_file ; -this file should consist of a sequence of lines of the form: -.IP -.I -pschar code -.LP -where -.I pschar -is the PostScript name of the character, -and -.I code -is its position in the encoding expressed as a decimal integer. -The code for each character given in the font file must correspond -to the code for the character in encoding file, or to the code in the default -encoding for the font if the PostScript font is not to be reencoded. -This code can be used with the -.B \eN -escape sequence in -.B troff -to select the character, -even if the character does not have a groff name. -Every character in the font file must exist in the PostScript font, and -the widths given in the font file must match the widths used -in the PostScript font. -.B grops -will assume that a character with a groff name of -.B space -is blank (makes no marks on the page); -it can make use of such a character to generate more efficient and -compact PostScript output. -.LP -.B grops -can automatically include the downloadable fonts necessary -to print the document. -Any downloadable fonts which should, when required, be included by -.B grops -must be listed in the file -.BR @FONTDIR@/devps/download ; -this should consist of lines of the form -.IP -.I -font filename -.LP -where -.I font -is the PostScript name of the font, -and -.I filename -is the name of the file containing the font; -lines beginning with -.B # -and blank lines are ignored; -fields may be separated by tabs or spaces; -.I filename -will be searched for using the same mechanism that is used -for groff font metric files. -The -.B download -file itself will also be searched for using this mechanism. -.LP -If the file containing a downloadable font or imported document -conforms to the Adobe Document Structuring Conventions, -then -.B grops -will interpret any comments in the files sufficiently to ensure that its -own output is conforming. -It will also supply any needed font resources that are listed in the -.B download -file -as well as any needed file resources. -It is also able to handle inter-resource dependencies. -For example, suppose that you have a downloadable font called Garamond, -and also a downloadable font called Garamond-Outline -which depends on Garamond -(typically it would be defined to copy Garamond's font dictionary, -and change the PaintType), -then it is necessary for Garamond to be appear before Garamond-Outline -in the PostScript document. -.B grops -will handle this automatically -provided that the downloadable font file for Garamond-Outline -indicates its dependence on Garamond by means of -the Document Structuring Conventions, -for example by beginning with the following lines -.IP -.B -%!PS-Adobe-3.0 Resource-Font -.br -.B -%%DocumentNeededResources: font Garamond -.br -.B -%%EndComments -.br -.B -%%IncludeResource: font Garamond -.LP -In this case both Garamond and Garamond-Outline would need to be listed -in the -.B download -file. -A downloadable font should not include its own name in a -.B %%DocumentSuppliedResources -comment. -.LP -.B grops -will not interpret -.B %%DocumentFonts -comments. -The -.BR %%DocumentNeededResources , -.BR %%DocumentSuppliedResources , -.BR %%IncludeResource , -.BR %%BeginResource -and -.BR %%EndResource -comments -(or possibly the old -.BR %%DocumentNeededFonts , -.BR %%DocumentSuppliedFonts , -.BR %%IncludeFont , -.BR %%BeginFont -and -.BR %%EndFont -comments) -should be used. -.SH FILES -.Tp \w'\fB@FONTDIR@/devps/download'u+2n -.B @FONTDIR@/devps/DESC -Device description file. -.TP -.BI @FONTDIR@/devps/ F -Font description file for font -.IR F . -.TP -.B @FONTDIR@/devps/download -List of downloadable fonts. -.TP -.B @FONTDIR@/devps/text.enc -Encoding used for text fonts. -.TP -.B @MACRODIR@/tmac.ps -Macros for use with -.BR grops ; -automatically loaded by -.BR troffrc -.TP -.B @MACRODIR@/tmac.pspic -Definition of -.B PSPIC -macro, -automatically loaded by -.BR tmac.ps . -.TP -.B @MACRODIR@/tmac.psold -Macros to disable use of characters not present in older -PostScript printers; automatically loaded by -.BR tmac.ps . -.TP -.B @MACRODIR@/tmac.psnew -Macros to undo the effect of -.BR tmac.psold . -.TP -.BI /tmp/grops XXXXXX -Temporary file. -.SH "SEE ALSO" -.BR afmtodit (@MAN1EXT@), -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR psbb (@MAN1EXT@), -.BR groff_out (@MAN5EXT@), -.BR groff_font (@MAN5EXT@), -.BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grops/ps.cc b/gnu/usr.bin/groff/grops/ps.cc index 6f14a223008..053161a4168 100644 --- a/gnu/usr.bin/groff/grops/ps.cc +++ b/gnu/usr.bin/groff/grops/ps.cc @@ -502,7 +502,7 @@ class ps_printer : public printer { public: ps_printer(); ~ps_printer(); - void set_char(int i, font *f, const environment *env, int w); + void set_char(int i, font *f, const environment *env, int w, const char *name); void draw(int code, int *p, int np, const environment *env); void begin_page(int); void end_page(int); @@ -565,7 +565,7 @@ int ps_printer::set_encoding_index(ps_font *f) return f->encoding_index = next_encoding_index++; } -void ps_printer::set_char(int i, font *f, const environment *env, int w) +void ps_printer::set_char(int i, font *f, const environment *env, int w, const char *name) { if (i == space_char_index || invis_count > 0) return; @@ -1480,7 +1480,7 @@ int main(int argc, char **argv) } case 'c': if (sscanf(optarg, "%d", &ncopies) != 1 || ncopies <= 0) { - error("bad number of copies `%1'", optarg); + error("bad number of copies `%s'", optarg); ncopies = 1; } break; diff --git a/gnu/usr.bin/groff/grotty/Makefile.sub b/gnu/usr.bin/groff/grotty/Makefile.sub index b0002cb88f3..0f9f834bb21 100644 --- a/gnu/usr.bin/groff/grotty/Makefile.sub +++ b/gnu/usr.bin/groff/grotty/Makefile.sub @@ -1,5 +1,5 @@ PROG=grotty -MAN1=grotty.n +MAN1=grotty.1 XLIBS=$(LIBDRIVER) $(LIBGROFF) MLIB=$(LIBM) OBJS=tty.o diff --git a/gnu/usr.bin/groff/grotty/grotty.1_in b/gnu/usr.bin/groff/grotty/grotty.1_in new file mode 100644 index 00000000000..d8d6ebdeb0a --- /dev/null +++ b/gnu/usr.bin/groff/grotty/grotty.1_in @@ -0,0 +1,221 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grotty \- groff driver for typewriter-like devices +.SH SYNOPSIS +.B grotty +[ +.B \-hfbuodBUv +] [ +.BI \-F dir +] [ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +.B grotty +translates the output of GNU +.B troff +into a form suitable for typewriter-like devices. +Normally +.B grotty +should invoked by using the +.B groff +command +with a +.B \-Tascii +or +.B \-Tlatin1 +option. +If no files are given, +.B grotty +will read the standard input. +A filename of +.B \- +will also cause +.B grotty +to read the standard input. +Output is written to the standard output. +.LP +Normally +.B grotty +prints a bold character +.I c +using the sequence +.RI ` c +.SM BACKSPACE +.IR c ' +and a italic character +.I c +by the sequence +.RB ` _ +.SM BACKSPACE +.IR c '. +These sequences can be displayed on a terminal +by piping through +.BR ul (1). +Pagers such as +.BR more (1) +or +.BR less (1) +are also able to display these sequences. +Use either +.B \-B +or +.B \-U +when piping into +.BR less (1); +use +.B \-b +when piping into +.BR more (1). +There is no need to filter the output through +.BR col (1) +since +.B grotty +never outputs reverse line feeds. +.LP +The font description file may contain a command +.IP +.BI internalname\ n +.LP +where +.I n +is a decimal integer. +If the 01 bit in +.I n +is set, +then the font will be treated as an italic font; +if the 02 bit is set, +then it will be treated as a bold font. +The code field in the font description field gives the +code which will be used to output the character. +This code can also be used in the +.B \eN +escape sequence in +.BR troff . +.SH OPTIONS +.TP +.BI \-F dir +Search the directory +.IB dir /dev name +for font and device description files; +.I name +is the name of the device, usually +.B ascii +or +.BR latin1 . +.TP +.B \-h +Use horizontal tabs in the output. +Tabs are assumed to be set every 8 columns. +.TP +.B \-f +Use form feeds in the output. +A form feed will be output at the end of each page that has no output +on its last line. +.TP +.B \-b +Suppress the use of overstriking for bold characters. +.TP +.B \-u +Suppress the use of underlining for italic characters. +.TP +.B \-B +Use only overstriking for bold-italic characters. +.TP +.B \-U +Use only underlining for bold-italic characters. +.TP +.B \-o +Suppress overstriking (other than for bold or underlined characters). +.TP +.B \-d +Ignore all +.B \eD +commands. +Without this +.B grotty +will render +.B \eD'l\|.\|.\|.' +commands that have at least at least one zero argument +(and so are either horizontal or vertical) +using +.BR \- , +.B | +and +.B + +characters. +.TP +.B \-v +Print the version number. +.SH FILES +.TP +.B @FONTDIR@/devascii/DESC +Device description file for +.B ascii +device. +.TP +.B @FONTDIR@/devascii/ F +Font description file for font +.I F +of +.B ascii device. +.TP +.B @FONTDIR@/devlatin1/DESC +Device description file for +.B latin1 +device. +.TP +.B @FONTDIR@/devlatin1/ F +Font description file for font +.I F +of +.B latin1 device. +.TP +.B @MACRODIR@/tmac.tty +Macros for use with +.BR grotty . +.TP +.B @MACRODIR@/tmac.tty-char +Additional klugey character definitions for use with +.BR grotty . +.SH BUGS +.LP +.B grotty +is intended only for simple documents. +.LP +There is no support for fractional horizontal or vertical motions. +.LP +There is no support for +.B \eD +commands +other than horizontal and vertical lines. +.LP +Characters above the first line (ie with a vertical position of 0) +cannot be printed. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR groff_out (@MAN5EXT@), +.BR groff_font (@MAN5EXT@), +.BR groff_char (@MAN7EXT@), +.BR ul (1), +.BR more (1), +.BR less (1) diff --git a/gnu/usr.bin/groff/grotty/grotty.man b/gnu/usr.bin/groff/grotty/grotty.man deleted file mode 100644 index d8d6ebdeb0a..00000000000 --- a/gnu/usr.bin/groff/grotty/grotty.man +++ /dev/null @@ -1,221 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grotty \- groff driver for typewriter-like devices -.SH SYNOPSIS -.B grotty -[ -.B \-hfbuodBUv -] [ -.BI \-F dir -] [ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -.B grotty -translates the output of GNU -.B troff -into a form suitable for typewriter-like devices. -Normally -.B grotty -should invoked by using the -.B groff -command -with a -.B \-Tascii -or -.B \-Tlatin1 -option. -If no files are given, -.B grotty -will read the standard input. -A filename of -.B \- -will also cause -.B grotty -to read the standard input. -Output is written to the standard output. -.LP -Normally -.B grotty -prints a bold character -.I c -using the sequence -.RI ` c -.SM BACKSPACE -.IR c ' -and a italic character -.I c -by the sequence -.RB ` _ -.SM BACKSPACE -.IR c '. -These sequences can be displayed on a terminal -by piping through -.BR ul (1). -Pagers such as -.BR more (1) -or -.BR less (1) -are also able to display these sequences. -Use either -.B \-B -or -.B \-U -when piping into -.BR less (1); -use -.B \-b -when piping into -.BR more (1). -There is no need to filter the output through -.BR col (1) -since -.B grotty -never outputs reverse line feeds. -.LP -The font description file may contain a command -.IP -.BI internalname\ n -.LP -where -.I n -is a decimal integer. -If the 01 bit in -.I n -is set, -then the font will be treated as an italic font; -if the 02 bit is set, -then it will be treated as a bold font. -The code field in the font description field gives the -code which will be used to output the character. -This code can also be used in the -.B \eN -escape sequence in -.BR troff . -.SH OPTIONS -.TP -.BI \-F dir -Search the directory -.IB dir /dev name -for font and device description files; -.I name -is the name of the device, usually -.B ascii -or -.BR latin1 . -.TP -.B \-h -Use horizontal tabs in the output. -Tabs are assumed to be set every 8 columns. -.TP -.B \-f -Use form feeds in the output. -A form feed will be output at the end of each page that has no output -on its last line. -.TP -.B \-b -Suppress the use of overstriking for bold characters. -.TP -.B \-u -Suppress the use of underlining for italic characters. -.TP -.B \-B -Use only overstriking for bold-italic characters. -.TP -.B \-U -Use only underlining for bold-italic characters. -.TP -.B \-o -Suppress overstriking (other than for bold or underlined characters). -.TP -.B \-d -Ignore all -.B \eD -commands. -Without this -.B grotty -will render -.B \eD'l\|.\|.\|.' -commands that have at least at least one zero argument -(and so are either horizontal or vertical) -using -.BR \- , -.B | -and -.B + -characters. -.TP -.B \-v -Print the version number. -.SH FILES -.TP -.B @FONTDIR@/devascii/DESC -Device description file for -.B ascii -device. -.TP -.B @FONTDIR@/devascii/ F -Font description file for font -.I F -of -.B ascii device. -.TP -.B @FONTDIR@/devlatin1/DESC -Device description file for -.B latin1 -device. -.TP -.B @FONTDIR@/devlatin1/ F -Font description file for font -.I F -of -.B latin1 device. -.TP -.B @MACRODIR@/tmac.tty -Macros for use with -.BR grotty . -.TP -.B @MACRODIR@/tmac.tty-char -Additional klugey character definitions for use with -.BR grotty . -.SH BUGS -.LP -.B grotty -is intended only for simple documents. -.LP -There is no support for fractional horizontal or vertical motions. -.LP -There is no support for -.B \eD -commands -other than horizontal and vertical lines. -.LP -Characters above the first line (ie with a vertical position of 0) -cannot be printed. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR groff_out (@MAN5EXT@), -.BR groff_font (@MAN5EXT@), -.BR groff_char (@MAN7EXT@), -.BR ul (1), -.BR more (1), -.BR less (1) diff --git a/gnu/usr.bin/groff/hpftodit/Makefile.sub b/gnu/usr.bin/groff/hpftodit/Makefile.sub index 16744d9f5f4..ff1c4492f3b 100644 --- a/gnu/usr.bin/groff/hpftodit/Makefile.sub +++ b/gnu/usr.bin/groff/hpftodit/Makefile.sub @@ -1,5 +1,5 @@ PROG=hpftodit -MAN1=hpftodit.n +MAN1=hpftodit.1 XLIBS=$(LIBGROFF) MLIB=$(LIBM) OBJS=hpftodit.o diff --git a/gnu/usr.bin/groff/hpftodit/hpftodit.1_in b/gnu/usr.bin/groff/hpftodit/hpftodit.1_in new file mode 100644 index 00000000000..75af154e219 --- /dev/null +++ b/gnu/usr.bin/groff/hpftodit/hpftodit.1_in @@ -0,0 +1,151 @@ +.ig \"-*- nroff -*- +Copyright (C) 1994, 1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +hpftodit \- create font description files for use with groff \-Tlj4 +.SH SYNOPSIS +.B hpftodit +[ +.B \-sv +] +[ +.BI \-i n +] +.I tfm_file +.I map_file +.I font +.SH DESCRIPTION +.B hpftodit +creates a font file for use with +.B +groff \-Tlj4\fR +from an HP tagged font metric file. +.I tfm_file +is the name of the tagged font metric file for the font. +.I map_file +is a file giving the groff names for characters in the font; +this file should consist of a sequence of lines of the form: +.IP +.I +n c1 c2 \fR.\|.\|. +.LP +where +.I n +is a decimal integer giving the MSL number of the character, +and +.IR c1 , +.IR c2 ,.\|.\|. +are the groff names of the character. +.I font +is the name of the groff font file. +The groff font file is written to +.IR font . +.LP +The +.B \-s +option should be given if the font is special +(a font is +.I special +if +.B troff +should search it whenever +a character is not found in the current font.) +If the font is special, +it should be listed in the +.B fonts +command in the DESC file; +if it is not special, there is no need to list it, since +.B troff +can automatically mount it when it's first used. +.LP +If the +.B \-i +option is used, +.B hpftodit +will automatically generate an italic correction, +a left italic correction and a subscript correction +for each character +(the significance of these parameters is explained in +.BR groff_font (@MAN5EXT@)). +.SH OPTIONS +.TP +.B \-v +Print the version number. +.TP +.B \-s +The font is special. +The effect of this option is to add the +.B special +command to the font file. +.TP +.BI \-i n +Generate an italic correction for each character so that +the character's width plus the character's italic correction +is equal to +.I n +design units +plus the amount by which the right edge of the character's bounding +is to the right of the character's origin. +If this would result in a negative italic correction, use a zero +italic correction instead. +There are 8782 design units per em for Intellifont fonts. +.IP +Also generate a subscript correction equal to the +product of the tangent of the slant of the font and +four fifths of the x-height of the font. +If this would result in a subscript correction greater than the italic +correction, use a subscript correction equal to the italic correction +instead. +.IP +Also generate a left italic correction for each character +equal to +.I n +design units +plus the amount by which the left edge of the character's bounding box +is to the left of the character's origin. +The left italic correction may be negative. +.IP +This option is normally needed only with italic (or oblique) fonts. +.SH FILES +.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n +.B @FONTDIR@/devlj4/DESC +Device description file. +.TP +.BI @FONTDIR@/devlj4/ F +Font description file for font +.IR F . +.SH BUGS +.LP +This program was written without the benefit of complete, official +documentation on the tagged font metric format. +It is therefore likely that it will fail to work on tfm files that are +dissimilar to those for the internal fonts on the Laserjet 4, +with which it was tested: +.LP +TrueType tfm files are not supported. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR grolj4 (@MAN1EXT@), +.BR groff_font (@MAN5EXT@) diff --git a/gnu/usr.bin/groff/hpftodit/hpftodit.man b/gnu/usr.bin/groff/hpftodit/hpftodit.man deleted file mode 100644 index 75af154e219..00000000000 --- a/gnu/usr.bin/groff/hpftodit/hpftodit.man +++ /dev/null @@ -1,151 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1994, 1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -hpftodit \- create font description files for use with groff \-Tlj4 -.SH SYNOPSIS -.B hpftodit -[ -.B \-sv -] -[ -.BI \-i n -] -.I tfm_file -.I map_file -.I font -.SH DESCRIPTION -.B hpftodit -creates a font file for use with -.B -groff \-Tlj4\fR -from an HP tagged font metric file. -.I tfm_file -is the name of the tagged font metric file for the font. -.I map_file -is a file giving the groff names for characters in the font; -this file should consist of a sequence of lines of the form: -.IP -.I -n c1 c2 \fR.\|.\|. -.LP -where -.I n -is a decimal integer giving the MSL number of the character, -and -.IR c1 , -.IR c2 ,.\|.\|. -are the groff names of the character. -.I font -is the name of the groff font file. -The groff font file is written to -.IR font . -.LP -The -.B \-s -option should be given if the font is special -(a font is -.I special -if -.B troff -should search it whenever -a character is not found in the current font.) -If the font is special, -it should be listed in the -.B fonts -command in the DESC file; -if it is not special, there is no need to list it, since -.B troff -can automatically mount it when it's first used. -.LP -If the -.B \-i -option is used, -.B hpftodit -will automatically generate an italic correction, -a left italic correction and a subscript correction -for each character -(the significance of these parameters is explained in -.BR groff_font (@MAN5EXT@)). -.SH OPTIONS -.TP -.B \-v -Print the version number. -.TP -.B \-s -The font is special. -The effect of this option is to add the -.B special -command to the font file. -.TP -.BI \-i n -Generate an italic correction for each character so that -the character's width plus the character's italic correction -is equal to -.I n -design units -plus the amount by which the right edge of the character's bounding -is to the right of the character's origin. -If this would result in a negative italic correction, use a zero -italic correction instead. -There are 8782 design units per em for Intellifont fonts. -.IP -Also generate a subscript correction equal to the -product of the tangent of the slant of the font and -four fifths of the x-height of the font. -If this would result in a subscript correction greater than the italic -correction, use a subscript correction equal to the italic correction -instead. -.IP -Also generate a left italic correction for each character -equal to -.I n -design units -plus the amount by which the left edge of the character's bounding box -is to the left of the character's origin. -The left italic correction may be negative. -.IP -This option is normally needed only with italic (or oblique) fonts. -.SH FILES -.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n -.B @FONTDIR@/devlj4/DESC -Device description file. -.TP -.BI @FONTDIR@/devlj4/ F -Font description file for font -.IR F . -.SH BUGS -.LP -This program was written without the benefit of complete, official -documentation on the tagged font metric format. -It is therefore likely that it will fail to work on tfm files that are -dissimilar to those for the internal fonts on the Laserjet 4, -with which it was tested: -.LP -TrueType tfm files are not supported. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR grolj4 (@MAN1EXT@), -.BR groff_font (@MAN5EXT@) diff --git a/gnu/usr.bin/groff/indxbib/Makefile.sub b/gnu/usr.bin/groff/indxbib/Makefile.sub index b23b425c566..fbfad859d2f 100644 --- a/gnu/usr.bin/groff/indxbib/Makefile.sub +++ b/gnu/usr.bin/groff/indxbib/Makefile.sub @@ -1,5 +1,5 @@ PROG=indxbib -MAN1=indxbib.n +MAN1=indxbib.1 XLIBS=$(LIBBIB) $(LIBGROFF) MLIB=$(LIBM) OBJS=indxbib.o dirnamemax.o signal.o diff --git a/gnu/usr.bin/groff/indxbib/indxbib.1_in b/gnu/usr.bin/groff/indxbib/indxbib.1_in new file mode 100644 index 00000000000..914cb698048 --- /dev/null +++ b/gnu/usr.bin/groff/indxbib/indxbib.1_in @@ -0,0 +1,204 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH @G@INDXBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@indxbib \- make inverted index for bibliographic databases +.SH SYNOPSIS +.nr a \n(.j +.ad l +.nr i \n(.i +.in +\w'\fB@g@indxbib 'u +.ti \niu +.B @g@indxbib +.de OP +.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +.el .RB "[\ " "\\$1" "\ ]" +.. +.OP \-vw +.OP \-c file +.OP \-d dir +.OP \-f file +.OP \-h n +.OP \-i string +.OP \-k n +.OP \-l n +.OP \-n n +.OP \-o file +.OP \-t n +.RI [\ filename \|.\|.\|.\ ] +.ad \na +.SH DESCRIPTION +.B @g@indxbib +makes an inverted index for the bibliographic databases in +.IR filename \|.\|.\|. +for use with +.BR @g@refer (@MAN1EXT@), +.BR @g@lookbib (@MAN1EXT@), +and +.BR lkbib (@MAN1EXT@). +The index will be named +.IB filename @INDEX_SUFFIX@\fR; +the index is written to a temporary file which is then renamed to this. +If no filenames are given on the command line because the +.B \-f +option has been used, and no +.B \-o +option is given, the index will be named +.BR @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ . +.LP +Bibliographic databases are divided into records by blank lines. +Within a record, each fields starts with a +.B % +character at the beginning of a line. +Fields have a one letter name which follows the +.B % +character. +.LP +The values set by the +.BR \-c , +.BR \-n , +.BR \-l +and +.B \-t +options are stored in the index; +when the index is searched, keys will be discarded and truncated in a +manner appropriate to these options; +the original keys will be used for verifying that any record +found using the index actually contains the keys. +This means that a user of an index need not know whether these +options were used in the creation of the index, +provided that not all the keys to be searched for +would have been discarded during indexing +and that the user supplies at least the part of each key +that would have remained after being truncated during indexing. +The value set by the +.B \-i +option is also stored in the index +and will be used in verifying records found using the index. +.SH OPTIONS +.TP +.B \-v +Print the version number. +.TP +.B \-w +Index whole files. +Each file is a separate record. +.TP +.BI \-c file +Read the list of common words from +.I file +instead of +.BR @COMMON_WORDS_FILE@ . +.TP +.BI \-d dir +Use +.I dir +as the pathname of the current working directory to store in the index, +instead of the path printed by +.BR pwd (1). +Usually +.I dir +will be a symbolic link that points to the directory printed by +.BR pwd (1). +.TP +.BI \-f file +Read the files to be indexed from +.IR file . +If +.I file +is +.BR \- , +files will be read from the standard input. +The +.B \-f +option can be given at most once. +.TP +.BI \-i string +Don't index the contents of fields whose names are in +.IR string . +Initially +.I string +is +.BR XYZ . +.TP +.BI \-h n +Use the first prime greater than or equal to +.I n +for the size of the hash table. +Larger values of +.I n +will usually make searching faster, +but will make the index larger +and +.B @g@indxbib +use more memory. +Initially +.I n +is 997. +.TP +.BI \-k n +Use at most +.I n +keys per input record. +Initially +.I n +is 100. +.TP +.BI \-l n +Discard keys that are shorter than +.IR n . +Initially +.I n +is 3. +.TP +.BI \-n n +Discard the +.I n +most common words. +Initially +.I n +is 100. +.TP +.BI \-o basename +The index should be named +.IB basename @INDEX_SUFFIX@\fR. +.TP +.BI \-t n +Truncate keys to +.IR n . +Initially +.I n +is 6. +.SH FILES +.TP \w'\fBindxbib\fIXXXXXX'u+2n +.IB filename @INDEX_SUFFIX@ +Index. +.TP +.B @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ +Default index name. +.TP +.B @COMMON_WORDS_FILE@ +List of common words. +.TP +.BI indxbib XXXXXX +Temporary file. +.SH "SEE ALSO" +.BR @g@refer (@MAN1EXT@), +.BR lkbib (@MAN1EXT@), +.BR @g@lookbib (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/indxbib/indxbib.cc b/gnu/usr.bin/groff/indxbib/indxbib.cc index 289bec1376b..e55d75a54c6 100644 --- a/gnu/usr.bin/groff/indxbib/indxbib.cc +++ b/gnu/usr.bin/groff/indxbib/indxbib.cc @@ -38,6 +38,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { // Sun's stdlib.h fails to declare this. char *mktemp(char *); + int mkstemp(char *); } #define DEFAULT_HASH_TABLE_SIZE 997 @@ -220,11 +221,15 @@ int main(int argc, char **argv) temp_index_file = strsave(TEMP_INDEX_TEMPLATE); } catch_fatal_signals(); +#ifdef HAVE_MKSTEMP int fd = mkstemp(temp_index_file); - if (fd == -1 || !temp_index_file[0]) +#else /* not HAVE_MKSTEMP */ + if (!mktemp(temp_index_file) || !temp_index_file[0]) fatal("cannot create file name for temporary file"); - if (fchmod(fd, S_IRUSR|S_IRGRP|S_IROTH) < 0) - fatal("cannot change permissions for temporary file"); + int fd = open(temp_index_file, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR); +#endif /* not HAVE_MKSTEMP */ + if (fd < 0) + fatal("can't create temporary index file: %1", strerror(errno)); indxfp = fdopen(fd, "w"); if (indxfp == 0) fatal("fdopen failed"); diff --git a/gnu/usr.bin/groff/indxbib/indxbib.man b/gnu/usr.bin/groff/indxbib/indxbib.man deleted file mode 100644 index 914cb698048..00000000000 --- a/gnu/usr.bin/groff/indxbib/indxbib.man +++ /dev/null @@ -1,204 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH @G@INDXBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@indxbib \- make inverted index for bibliographic databases -.SH SYNOPSIS -.nr a \n(.j -.ad l -.nr i \n(.i -.in +\w'\fB@g@indxbib 'u -.ti \niu -.B @g@indxbib -.de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" -.. -.OP \-vw -.OP \-c file -.OP \-d dir -.OP \-f file -.OP \-h n -.OP \-i string -.OP \-k n -.OP \-l n -.OP \-n n -.OP \-o file -.OP \-t n -.RI [\ filename \|.\|.\|.\ ] -.ad \na -.SH DESCRIPTION -.B @g@indxbib -makes an inverted index for the bibliographic databases in -.IR filename \|.\|.\|. -for use with -.BR @g@refer (@MAN1EXT@), -.BR @g@lookbib (@MAN1EXT@), -and -.BR lkbib (@MAN1EXT@). -The index will be named -.IB filename @INDEX_SUFFIX@\fR; -the index is written to a temporary file which is then renamed to this. -If no filenames are given on the command line because the -.B \-f -option has been used, and no -.B \-o -option is given, the index will be named -.BR @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ . -.LP -Bibliographic databases are divided into records by blank lines. -Within a record, each fields starts with a -.B % -character at the beginning of a line. -Fields have a one letter name which follows the -.B % -character. -.LP -The values set by the -.BR \-c , -.BR \-n , -.BR \-l -and -.B \-t -options are stored in the index; -when the index is searched, keys will be discarded and truncated in a -manner appropriate to these options; -the original keys will be used for verifying that any record -found using the index actually contains the keys. -This means that a user of an index need not know whether these -options were used in the creation of the index, -provided that not all the keys to be searched for -would have been discarded during indexing -and that the user supplies at least the part of each key -that would have remained after being truncated during indexing. -The value set by the -.B \-i -option is also stored in the index -and will be used in verifying records found using the index. -.SH OPTIONS -.TP -.B \-v -Print the version number. -.TP -.B \-w -Index whole files. -Each file is a separate record. -.TP -.BI \-c file -Read the list of common words from -.I file -instead of -.BR @COMMON_WORDS_FILE@ . -.TP -.BI \-d dir -Use -.I dir -as the pathname of the current working directory to store in the index, -instead of the path printed by -.BR pwd (1). -Usually -.I dir -will be a symbolic link that points to the directory printed by -.BR pwd (1). -.TP -.BI \-f file -Read the files to be indexed from -.IR file . -If -.I file -is -.BR \- , -files will be read from the standard input. -The -.B \-f -option can be given at most once. -.TP -.BI \-i string -Don't index the contents of fields whose names are in -.IR string . -Initially -.I string -is -.BR XYZ . -.TP -.BI \-h n -Use the first prime greater than or equal to -.I n -for the size of the hash table. -Larger values of -.I n -will usually make searching faster, -but will make the index larger -and -.B @g@indxbib -use more memory. -Initially -.I n -is 997. -.TP -.BI \-k n -Use at most -.I n -keys per input record. -Initially -.I n -is 100. -.TP -.BI \-l n -Discard keys that are shorter than -.IR n . -Initially -.I n -is 3. -.TP -.BI \-n n -Discard the -.I n -most common words. -Initially -.I n -is 100. -.TP -.BI \-o basename -The index should be named -.IB basename @INDEX_SUFFIX@\fR. -.TP -.BI \-t n -Truncate keys to -.IR n . -Initially -.I n -is 6. -.SH FILES -.TP \w'\fBindxbib\fIXXXXXX'u+2n -.IB filename @INDEX_SUFFIX@ -Index. -.TP -.B @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ -Default index name. -.TP -.B @COMMON_WORDS_FILE@ -List of common words. -.TP -.BI indxbib XXXXXX -Temporary file. -.SH "SEE ALSO" -.BR @g@refer (@MAN1EXT@), -.BR lkbib (@MAN1EXT@), -.BR @g@lookbib (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/libgroff/tmpfile.cc b/gnu/usr.bin/groff/libgroff/tmpfile.cc index 280d87c5e22..43d75f3b4df 100644 --- a/gnu/usr.bin/groff/libgroff/tmpfile.cc +++ b/gnu/usr.bin/groff/libgroff/tmpfile.cc @@ -69,18 +69,18 @@ FILE *xtmpfile() int fd = mkstemp(templ); if (fd < 0) fatal("cannot create temporary file: %1", strerror(errno)); - errno = 0; - FILE *fp = fdopen(fd, "w+"); - if (!fp) - fatal("fdopen: %1", strerror(errno)); #else /* not HAVE_MKSTEMP */ if (!mktemp(templ) || !templ[0]) fatal("cannot create file name for temporary file"); errno = 0; - FILE *fp = fopen(templ, "w+"); - if (!fp) + int fd = open(templ, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR); + if (fd < 0) fatal("cannot open `%1': %2", templ, strerror(errno)); #endif /* not HAVE_MKSTEMP */ + errno = 0; + FILE *fp = fdopen(fd, "w+"); + if (!fp) + fatal("fdopen: %1", strerror(errno)); if (unlink(templ) < 0) error("cannot unlink `%1': %2", templ, strerror(errno)); a_delete templ; diff --git a/gnu/usr.bin/groff/lkbib/Makefile.sub b/gnu/usr.bin/groff/lkbib/Makefile.sub index 30035bcf051..bd9a72b4414 100644 --- a/gnu/usr.bin/groff/lkbib/Makefile.sub +++ b/gnu/usr.bin/groff/lkbib/Makefile.sub @@ -1,5 +1,5 @@ PROG=lkbib -MAN1=lkbib.n +MAN1=lkbib.1 XLIBS=$(LIBBIB) $(LIBGROFF) MLIB=$(LIBM) OBJS=lkbib.o diff --git a/gnu/usr.bin/groff/lkbib/lkbib.1_in b/gnu/usr.bin/groff/lkbib/lkbib.1_in new file mode 100644 index 00000000000..f16a77ec694 --- /dev/null +++ b/gnu/usr.bin/groff/lkbib/lkbib.1_in @@ -0,0 +1,107 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.ds g \" empty +.ds G \" empty +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH LKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +lkbib \- search bibliographic databases +.SH SYNOPSIS +.B lkbib +[ +.B \-v +] +[ +.BI \-i fields +] +[ +.BI \-p filename +] +[ +.BI \-t n +] +.IR key \|.\|.\|. +.SH DESCRIPTION +.B lkbib +searches bibliographic databases for references that contain the keys +.IR key \|.\|.\|. +and prints any references found on the standard output. +.B lkbib +will search any databases given by +.B \-p +options, and then a default database. +The default database is taken from the +.SB REFER +environment variable if it is set, +otherwise it is +.BR @DEFAULT_INDEX@ . +For each database +.I filename +to be searched, +if an index +.IB filename @INDEX_SUFFIX@ +created by +.BR @g@indxbib (@MAN1EXT@) +exists, then it will be searched instead; +each index can cover multiple databases. +.SH OPTIONS +.TP +.B \-v +Print the version number. +.TP +.BI \-p filename +Search +.IR filename . +Multiple +.B \-p +options can be used. +.TP +.BI \-i string +When searching files for which no index exists, +ignore the contents of fields whose names are in +.IR string . +.TP +.BI \-t n +Only require the first +.I n +characters of keys to be given. +Initially +.I n +is 6. +.SH ENVIRONMENT +.TP \w'\fBREFER'u+2n +.SB REFER +Default database. +.SH FILES +.Tp \w'\fB@DEFAULT_INDEX@'u+2n +.B @DEFAULT_INDEX@ +Default database to be used if the +.SB REFER +environment variable is not set. +.IB filename @INDEX_SUFFIX@ +Index files. +.SH "SEE ALSO" +.BR @g@refer (@MAN1EXT@), +.BR @g@lookbib (@MAN1EXT@), +.BR @g@indxbib (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/lkbib/lkbib.man b/gnu/usr.bin/groff/lkbib/lkbib.man deleted file mode 100644 index f16a77ec694..00000000000 --- a/gnu/usr.bin/groff/lkbib/lkbib.man +++ /dev/null @@ -1,107 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.ds g \" empty -.ds G \" empty -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH LKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -lkbib \- search bibliographic databases -.SH SYNOPSIS -.B lkbib -[ -.B \-v -] -[ -.BI \-i fields -] -[ -.BI \-p filename -] -[ -.BI \-t n -] -.IR key \|.\|.\|. -.SH DESCRIPTION -.B lkbib -searches bibliographic databases for references that contain the keys -.IR key \|.\|.\|. -and prints any references found on the standard output. -.B lkbib -will search any databases given by -.B \-p -options, and then a default database. -The default database is taken from the -.SB REFER -environment variable if it is set, -otherwise it is -.BR @DEFAULT_INDEX@ . -For each database -.I filename -to be searched, -if an index -.IB filename @INDEX_SUFFIX@ -created by -.BR @g@indxbib (@MAN1EXT@) -exists, then it will be searched instead; -each index can cover multiple databases. -.SH OPTIONS -.TP -.B \-v -Print the version number. -.TP -.BI \-p filename -Search -.IR filename . -Multiple -.B \-p -options can be used. -.TP -.BI \-i string -When searching files for which no index exists, -ignore the contents of fields whose names are in -.IR string . -.TP -.BI \-t n -Only require the first -.I n -characters of keys to be given. -Initially -.I n -is 6. -.SH ENVIRONMENT -.TP \w'\fBREFER'u+2n -.SB REFER -Default database. -.SH FILES -.Tp \w'\fB@DEFAULT_INDEX@'u+2n -.B @DEFAULT_INDEX@ -Default database to be used if the -.SB REFER -environment variable is not set. -.IB filename @INDEX_SUFFIX@ -Index files. -.SH "SEE ALSO" -.BR @g@refer (@MAN1EXT@), -.BR @g@lookbib (@MAN1EXT@), -.BR @g@indxbib (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/lookbib/Makefile.sub b/gnu/usr.bin/groff/lookbib/Makefile.sub index 1183812c561..f899908430e 100644 --- a/gnu/usr.bin/groff/lookbib/Makefile.sub +++ b/gnu/usr.bin/groff/lookbib/Makefile.sub @@ -1,5 +1,5 @@ PROG=lookbib -MAN1=lookbib.n +MAN1=lookbib.1 XLIBS=$(LIBBIB) $(LIBGROFF) MLIB=$(LIBM) OBJS=lookbib.o diff --git a/gnu/usr.bin/groff/lookbib/lookbib.1_in b/gnu/usr.bin/groff/lookbib/lookbib.1_in new file mode 100644 index 00000000000..465990bae47 --- /dev/null +++ b/gnu/usr.bin/groff/lookbib/lookbib.1_in @@ -0,0 +1,75 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH @G@LOOKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@lookbib \- search bibliographic databases +.SH SYNOPSIS +.B @g@lookbib +[ +.B \-v +] +[ +.BI \-i string +] +[ +.BI \-t n +] +.IR filename \|.\|.\|. +.SH DESCRIPTION +@g@lookbib prints a prompt on the standard error (unless the standard input is not a terminal), +reads from the standard input a line containing a set of keywords, +searches the bibliographic databases +.IR filename \|.\|.\|. +for references containing those keywords, +prints any references found on the standard output, +and repeats this process until the end of input. +For each database +.I filename +to be searched, +if an index +.IB filename @INDEX_SUFFIX@ +created by +.BR @g@indxbib (@MAN1EXT@) +exists, then it will be searched instead; +each index can cover multiple databases. +.SH OPTIONS +.TP +.B \-v +Print the version number. +.TP +.BI \-i string +When searching files for which no index exists, +ignore the contents of fields whose names are in +.IR string . +.TP +.BI \-t n +Only require the first +.I n +characters of keys to be given. +Initially +.I n +is 6. +.SH FILES +.TP \w'\fIfilename\fB@INDEX_SUFFIX@'u+2n +.IB filename @INDEX_SUFFIX@ +Index files. +.SH "SEE ALSO" +.BR @g@refer (@MAN1EXT@), +.BR lkbib (@MAN1EXT@), +.BR @g@indxbib (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/lookbib/lookbib.man b/gnu/usr.bin/groff/lookbib/lookbib.man deleted file mode 100644 index 465990bae47..00000000000 --- a/gnu/usr.bin/groff/lookbib/lookbib.man +++ /dev/null @@ -1,75 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH @G@LOOKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@lookbib \- search bibliographic databases -.SH SYNOPSIS -.B @g@lookbib -[ -.B \-v -] -[ -.BI \-i string -] -[ -.BI \-t n -] -.IR filename \|.\|.\|. -.SH DESCRIPTION -@g@lookbib prints a prompt on the standard error (unless the standard input is not a terminal), -reads from the standard input a line containing a set of keywords, -searches the bibliographic databases -.IR filename \|.\|.\|. -for references containing those keywords, -prints any references found on the standard output, -and repeats this process until the end of input. -For each database -.I filename -to be searched, -if an index -.IB filename @INDEX_SUFFIX@ -created by -.BR @g@indxbib (@MAN1EXT@) -exists, then it will be searched instead; -each index can cover multiple databases. -.SH OPTIONS -.TP -.B \-v -Print the version number. -.TP -.BI \-i string -When searching files for which no index exists, -ignore the contents of fields whose names are in -.IR string . -.TP -.BI \-t n -Only require the first -.I n -characters of keys to be given. -Initially -.I n -is 6. -.SH FILES -.TP \w'\fIfilename\fB@INDEX_SUFFIX@'u+2n -.IB filename @INDEX_SUFFIX@ -Index files. -.SH "SEE ALSO" -.BR @g@refer (@MAN1EXT@), -.BR lkbib (@MAN1EXT@), -.BR @g@indxbib (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/man/Makefile.sub b/gnu/usr.bin/groff/man/Makefile.sub index 9b871148e85..fb7abbbb984 100644 --- a/gnu/usr.bin/groff/man/Makefile.sub +++ b/gnu/usr.bin/groff/man/Makefile.sub @@ -1,2 +1,2 @@ -MAN5=groff_font.n groff_out.n -MAN7=groff_char.n +MAN5=groff_font.5 groff_out.5 +MAN7=groff_char.7 diff --git a/gnu/usr.bin/groff/man/groff_char.7_in b/gnu/usr.bin/groff/man/groff_char.7_in new file mode 100644 index 00000000000..18085dce7ab --- /dev/null +++ b/gnu/usr.bin/groff/man/groff_char.7_in @@ -0,0 +1,563 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" For best results, print this with groff. +.ds aq \(aq +.ie !\n(.g .if '\(aq'' .ds aq \' +.el \{\ +. tr \(aq\(aq +. if !c\(aq .ds aq \' +.\} +.if !\n(.g .ig +.\" .Ac accented-char accent char +.de Ac +.char \\$1 \\$3\ +\k[acc]\ +\h'(u;-\w'\\$2'-\w'\\$3'/2+\\\\n[skw]+(\w'x'*0)-\\\\n[skw])'\ +\v'(u;\w'x'*0+\\\\n[rst]+(\w'\\$3'*0)-\\\\n[rst])'\ +\\$2\ +\v'(u;\w'x'*0-\\\\n[rst]+(\w'\\$3'*0)+\\\\n[rst])'\ +\h'|\\\\n[acc]u' +.hcode \\$1\\$3 +.. +.Ac \(vc \(ah c +.Ac \(vC \(ah C +.TH GROFF_CHAR @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_char \- groff character names +.SH DESCRIPTION +This manual page lists the standard +.B groff +input characters. +Only the characters that are available for the device that +is being used to print this manual page will be displayed. +The +.I "Input code" +column applies to characters which can be +input with a single character, and gives the ISO Latin-1 code +of that input character. +The +.I "PostScript name\" +column gives the usual PostScript name of the output character. +.LP +The ISO Latin-1 no-break space (code 0240 octal) is equivalent to +.BR \e (space). +All other ISO Latin-1 characters print as themselves with the following +exceptions: +.B \` +prints as `, +.B \*(aq +prints as '; +the corresponding ISO Latin-1 characters can be obtained with +.B \e` +and +.BR \e(aq . +The ISO Latin-1 `Hyphen, Minus Sign' (code 45) prints as a hyphen; +a minus sign can be obtained with +.BR \e- . +The ISO Latin-1 `Tilde' (code 126) prints as ~; +the larger glyph can be obtained with +.BR \e(ti . +The ISO Latin-1 `Circumflex Accent' (code 94) prints as ^; +a larger glyph can be obtained with +.BR \e(ha . +.sp +'nf +.nr Sp 3n +.ta \w'\fIOutput'u+\n(Spu +\w'\fIInput'u+\n(Spu +\w'\fIInput'u+\n(Spu \ ++\w'periodcentered'u+\n(Spu +.de C0 +.C \\$1 "" \\$1 \\$2 "\\$3" +.. +.de C1 +.C \e\\$1 "" \\\\\\$1 \\$2 "\\$3" +.. +.de C2 +.C \e(\\$1 "" \\(\\$1 \\$2 "\\$3" +.. +.if !\n(.g .ig +.de CD +.C \[char\\$1] \\$1 \[char\\$1] \\$2 "\\$3" +.. +.do fspecial CR R +.\" input-name decimal-code output-name ps-name description +.if !\n(.g .ig +.de C +.if c\\$3 \{\ +.ft CR +.tr `\`'\*(aq +.in 0 +.di CH +\&\\$1 +.br +.di +.in +.ft +.ds CH \\*(CH\ +.tr ``'' +\&\\$3\t\\*(CH\t\\$2\t\\$4\t\\$5 +.\} +.. +.if \n(.g .ig +.de C +.if !'\\$3'' \{\ +.ft B +.tr `\`'\*(aq +.in 0 +.di CH +\&\\$1 +.br +.di +.in +.ft +.ds CH \\*(CH\ +.tr ``'' +\&\\$3\t\\*(CH\t\\$2\t\\$4\t\\$5 +.\} +.. +.wh \n(nlu+\n(.tu-\n(.Vu Fo +.de Fo +'bp +.He +.. +.de He +.ft I +Output Input Input PostScript Notes + name code name +.ft +.LP +'nf +.. +.He +.CD 33 exclam +.CD 34 quotedbl +.CD 35 numbersign +.CD 36 dollar +.CD 37 percent +.CD 38 ampersand +.CD 39 quoteright +.CD 40 parenleft +.CD 41 parenright +.CD 42 asterisk +.CD 43 plus +.CD 44 comma +.CD 45 hyphen +.CD 46 period +.CD 47 slash +.CD 58 colon +.CD 59 semicolon +.CD 60 less +.CD 61 equal +.CD 62 greater +.CD 63 question +.CD 64 at +.CD 91 bracketleft +.CD 92 backslash +.CD 93 bracketright +.CD 94 circumflex "circumflex accent" +.CD 95 underscore +.CD 96 quoteleft +.CD 123 braceleft +.CD 124 bar +.CD 125 braceright +.CD 126 tilde "tilde accent" +.CD 161 exclamdown +.CD 162 cent +.CD 163 sterling +.CD 164 currency +.CD 165 yen +.CD 166 brokenbar +.CD 167 section +.CD 168 dieresis +.CD 169 copyright +.CD 170 ordfeminine +.CD 171 guillemotleft +.CD 172 logicalnot +.CD 173 hyphen +.CD 174 registered +.CD 175 macron +.CD 176 degree +.CD 177 plusminus +.CD 178 twosuperior +.CD 179 threesuperior +.CD 180 acute "acute accent" +.CD 181 mu +.CD 182 paragraph +.CD 183 periodcentered +.CD 184 cedilla +.CD 185 onesuperior +.CD 186 ordmasculine +.CD 187 guillemotright +.CD 188 onequarter +.CD 189 onehalf +.CD 190 threequarters +.CD 191 questiondown +.CD 192 Agrave +.CD 193 Aacute +.CD 194 Acircumflex +.CD 195 Atilde +.CD 196 Adieresis +.CD 197 Aring +.CD 198 AE +.CD 199 Ccedilla +.CD 200 Egrave +.CD 201 Eacute +.CD 202 Ecircumflex +.CD 203 Edieresis +.CD 204 Igrave +.CD 205 Iacute +.CD 206 Icircumflex +.CD 207 Idieresis +.CD 208 Eth +.CD 209 Ntilde +.CD 210 Ograve +.CD 211 Oacute +.CD 212 Ocircumflex +.CD 213 Otilde +.CD 214 Odieresis +.CD 215 multiply +.CD 216 Oslash +.CD 217 Ugrave +.CD 218 Uacute +.CD 219 Ucircumflex +.CD 220 Udieresis +.CD 221 Yacute +.CD 222 Thorn +.CD 223 germandbls +.CD 224 agrave +.CD 225 aacute +.CD 226 acircumflex +.CD 227 atilde +.CD 228 adieresis +.CD 229 aring +.CD 230 ae +.CD 231 ccedilla +.CD 232 egrave +.CD 233 eacute +.CD 234 ecircumflex +.CD 235 edieresis +.CD 236 igrave +.CD 237 iacute +.CD 238 icircumflex +.CD 239 idieresis +.CD 240 eth +.CD 241 ntilde +.CD 242 ograve +.CD 243 oacute +.CD 244 ocircumflex +.CD 245 otilde +.CD 246 odieresis +.CD 247 divide +.CD 248 oslash +.CD 249 ugrave +.CD 250 uacute +.CD 251 ucircumflex +.CD 252 udieresis +.CD 253 yacute +.CD 254 thorn +.CD 255 ydieresis +.C2 -D Eth "Icelandic uppercase eth" +.C2 Sd eth "Icelandic lowercase eth" +.C2 TP Thorn "Icelandic uppercase thorn" +.C2 Tp thorn "Icelandic lowercase thorn" +.C2 AE AE +.C2 ae ae +.C2 OE OE +.C2 oe oe +.C2 IJ IJ "Dutch IJ ligature" +.C2 ij ij "Dutch ij ligature" +.C2 ss germandbls +.C2 'A Aacute +.C2 'C Cacute +.C2 'E Eacute +.C2 'I Iacute +.C2 'O Oacute +.C2 'U Uacute +.C2 'a aacute +.C2 'c cacute +.C2 'e eacute +.C2 'i iacute +.C2 'o oacute +.C2 'u uacute +.C2 :A Adieresis +.C2 :E Edieresis +.C2 :I Idieresis +.C2 :O Odieresis +.C2 :U Udieresis +.C2 :Y Ydieresis +.C2 :a adieresis +.C2 :e edieresis +.C2 :i idieresis +.C2 :o odieresis +.C2 :u udieresis +.C2 :y ydieresis +.C2 ^A Acircumflex +.C2 ^E Ecircumflex +.C2 ^I Icircumflex +.C2 ^O Ocircumflex +.C2 ^U Ucircumflex +.C2 ^a acircumflex +.C2 ^e ecircumflex +.C2 ^i icircumflex +.C2 ^o ocircumflex +.C2 ^u ucircumflex +.C2 `A Agrave +.C2 `E Egrave +.C2 `I Igrave +.C2 `O Ograve +.C2 `U Ugrave +.C2 `a agrave +.C2 `e egrave +.C2 `i igrave +.C2 `o ograve +.C2 `u ugrave +.C2 ~A Atilde +.C2 ~N Ntilde +.C2 ~O Otilde +.C2 ~a atilde +.C2 ~n ntilde +.C2 ~o otilde +.C2 vS Scaron +.C2 vs scaron +.C2 vZ Zcaron +.C2 vz zcaron +.C2 ,C Ccedilla +.C2 ,c ccedilla +.C2 /L Lslash "Polish L with a slash" +.C2 /l lslash "Polish l with a slash" +.C2 /O Oslash +.C2 /o oslash +.C2 oA Aring +.C2 oa aring +.C2 a" hungarumlaut "Hungarian umlaut" +.C2 a- macron "macron or bar accent" +.C2 a. dotaccent "dot accent" +.C2 a^ circumflex "circumflex accent" +.C2 aa acute "acute accent" +.C2 ga grave "grave accent" +.C2 ab breve "breve accent" +.C2 ac cedilla "cedilla accent" +.C2 ad dieresis "umlaut or dieresis" +.C2 ah caron "h\('a\(vcek accent" +.C2 ao ring "ring or circle accent" +.C2 a~ tilde "tilde accent" +.C2 ho ogonek "hook or ogonek accent" +.C2 .i dotlessi "i without a dot" +.C2 .j dotlessj "j without a dot" +.C2 Cs currency "Scandinavian currency sign" +.C2 Do dollar +.C2 Po sterling +.C2 Ye yen +.C2 Fn florin +.C2 ct cent +.C2 Fo guillemotleft +.C2 Fc guillemotright +.C2 fo guilsinglleft +.C2 fc guilsinglright +.C2 r! exclamdown +.C2 r? questiondown +.C2 ff ff "ff ligature" +.C2 fi fi "fi ligature" +.C2 fl fl "fl ligature" +.C2 Fi ffi "ffi ligature" +.C2 Fl ffl "ffl ligature" +.C2 OK \& "check mark, tick" +.C2 Of ordfeminine +.C2 Om ordmasculine +.C2 S1 onesuperior +.C2 S2 twosuperior +.C2 S3 threesuperior +.C2 <- arrowleft +.C2 -> arrowright +.C2 <> arrowboth "horizontal double-headed arrow" +.C2 da arrowdown +.C2 ua arrowup +.C2 va \& "vertical double-headed arrow" +.C2 lA arrowdblleft +.C2 rA arrowdblright +.C2 hA arrowdblboth "horizontal double-headed double arrow" +.C2 dA arrowdbldown +.C2 uA arrowdblup +.C2 vA \& "vertical double-headed double arrow" +.C2 ba bar +.C2 bb brokenbar +.C2 br br "box rule with traditional troff metrics" +.C2 ru ru "baseline rule" +.C2 ul ul "underline with traditional troff metrics" +.C2 bv bv "bold vertical" +.C2 bs bell +.C2 ci circle +.C2 bu bullet +.C2 co copyright +.C2 rg registered +.C2 tm trademark +.C2 dd daggerdbl "double dagger sign" +.C2 dg dagger +.C2 ps paragraph +.C2 sc section +.C2 de degree +.C2 em emdash "em dash" +.C2 en endash "en dash" +.C2 %0 perthousand "per thousand, per mille sign" +.C2 12 onehalf +.C2 14 onequarter +.C2 34 threequarters +.C2 f/ fraction "bar for fractions" +.C2 fm minute "footmark, prime" +.C2 sd second +.C2 ha asciicircum "\s-2ASCII\s+2 circumflex, hat, caret" +.C2 ti asciitilde "\s-2ASCII\s0 tilde, large tilde" +.C2 hy hyphen +.C2 lB bracketleft +.C2 rB bracketright +.C2 lC braceleft +.C2 rC braceright +.C2 la angleleft "left angle bracket" +.C2 ra angleright "right angle bracket" +.C2 lh handleft +.C2 rh handright +.C2 Bq quotedblbase "low double comma quote" +.C2 bq quotesinglbase "low single comma quote" +.C2 lq quotedblleft +.C2 rq quotedblright +.C2 oq quoteleft "single open quote" +.C2 aq quotesingle "apostrophe quote" +.C2 or bar +.C2 at at +.C1 - minus "minus sign from current font" +.C2 sh numbersign +.C2 sl slash +.C2 rs backslash +.C2 sq square +.C2 3d therefore +.C2 tf therefore +.C2 *A Alpha +.C2 *B Beta +.C2 *C Xi +.C2 *D Delta +.C2 *E Epsilon +.C2 *F Phi +.C2 *G Gamma +.C2 *H Theta +.C2 *I Iota +.C2 *K Kappa +.C2 *L Lambda +.C2 *M Mu +.C2 *N Nu +.C2 *O Omicron +.C2 *P Pi +.C2 *Q Psi +.C2 *R Rho +.C2 *S Sigma +.C2 *T Tau +.C2 *U Upsilon +.C2 *W Omega +.C2 *X Chi +.C2 *Y Eta +.C2 *Z Zeta +.C2 *a alpha +.C2 *b beta +.C2 *c xi +.C2 *d delta +.C2 *e epsilon +.C2 *f phi +.C2 +f phi1 "variant phi" +.C2 *g gamma +.C2 *h theta +.C2 +h theta1 "variant theta" +.C2 *i iota +.C2 *k kappa +.C2 *l lambda +.C2 *m mu +.C2 *n nu +.C2 *o omicron +.C2 *p pi +.C2 +p omega1 "variant pi, looking like omega" +.C2 *q psi +.C2 *r rho +.C2 *s sigma +.C2 *t tau +.C2 *u upsilon +.C2 *w omega +.C2 *x chi +.C2 *y eta +.C2 *z zeta +.C2 ts sigma1 "terminal sigma" +.C2 ~~ approxequal +.C2 ~= approxequal +.C2 != notequal +.C2 ** asteriskmath +.C2 -+ minusplus +.C2 +- plusminus +.C2 <= lessequal +.C2 == equivalence +.C2 =~ congruent +.C2 >= greaterequal +.C2 AN logicaland +.C2 OR logicalor +.C2 no logicalnot +.C2 te existential "there exists, existential quantifier" +.C2 fa universal "for all, universal quantifier" +.C2 Ah aleph +.C2 Im Ifraktur "Fraktur I, imaginary" +.C2 Re Rfraktur "Fraktur R, real" +.C2 if infinity +.C2 md dotmath +.C2 mo element +.C2 mu multiply +.C2 nb notsubset +.C2 nc notpropersuperset +.C2 ne notequivalence +.C2 nm notelement +.C2 pl plusmath "plus sign in special font" +.C2 eq equalmath "equals sign in special font" +.C2 pt proportional +.C2 pp perpendicular +.C2 sb propersubset +.C2 sp propersuperset +.C2 ib reflexsubset +.C2 ip reflexsuperset +.C2 ap similar +.C2 pd partialdiff "partial differentiation sign" +.C2 c* circlemultiply "multiply sign in a circle" +.C2 c+ circleplus "plus sign in a circle" +.C2 ca intersection "intersection, cap" +.C2 cu union "union, cup" +.C2 di divide "division sign" +.C2 -h hbar +.C2 gr gradient +.C2 es emptyset +.C2 CL club "club suit" +.C2 SP spade "spade suit" +.C2 HE heart "heart suit" +.C2 DI diamond "diamond suit" +.C2 CR carriagereturn "carriage return symbol" +.C2 st suchthat +.C2 /_ angle +.C2 << "" "much less" +.C2 >> "" "much greater" +.C2 wp weierstrass "Weierstrass p" +.C2 lz lozenge +.C2 an arrowhorizex "horizontal arrow extension" +.ch Fo +.SH "SEE ALSO" +.BR groff (@MAN1EXT@) +.br +.IR "An extension to the troff character set for Europe" , +E.G. Keizer, K.J. Simonsen, J. Akkerhuis, +EUUG Newsletter, Volume 9, No. 2, Summer 1989 diff --git a/gnu/usr.bin/groff/man/groff_char.man b/gnu/usr.bin/groff/man/groff_char.man deleted file mode 100644 index 18085dce7ab..00000000000 --- a/gnu/usr.bin/groff/man/groff_char.man +++ /dev/null @@ -1,563 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" For best results, print this with groff. -.ds aq \(aq -.ie !\n(.g .if '\(aq'' .ds aq \' -.el \{\ -. tr \(aq\(aq -. if !c\(aq .ds aq \' -.\} -.if !\n(.g .ig -.\" .Ac accented-char accent char -.de Ac -.char \\$1 \\$3\ -\k[acc]\ -\h'(u;-\w'\\$2'-\w'\\$3'/2+\\\\n[skw]+(\w'x'*0)-\\\\n[skw])'\ -\v'(u;\w'x'*0+\\\\n[rst]+(\w'\\$3'*0)-\\\\n[rst])'\ -\\$2\ -\v'(u;\w'x'*0-\\\\n[rst]+(\w'\\$3'*0)+\\\\n[rst])'\ -\h'|\\\\n[acc]u' -.hcode \\$1\\$3 -.. -.Ac \(vc \(ah c -.Ac \(vC \(ah C -.TH GROFF_CHAR @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_char \- groff character names -.SH DESCRIPTION -This manual page lists the standard -.B groff -input characters. -Only the characters that are available for the device that -is being used to print this manual page will be displayed. -The -.I "Input code" -column applies to characters which can be -input with a single character, and gives the ISO Latin-1 code -of that input character. -The -.I "PostScript name\" -column gives the usual PostScript name of the output character. -.LP -The ISO Latin-1 no-break space (code 0240 octal) is equivalent to -.BR \e (space). -All other ISO Latin-1 characters print as themselves with the following -exceptions: -.B \` -prints as `, -.B \*(aq -prints as '; -the corresponding ISO Latin-1 characters can be obtained with -.B \e` -and -.BR \e(aq . -The ISO Latin-1 `Hyphen, Minus Sign' (code 45) prints as a hyphen; -a minus sign can be obtained with -.BR \e- . -The ISO Latin-1 `Tilde' (code 126) prints as ~; -the larger glyph can be obtained with -.BR \e(ti . -The ISO Latin-1 `Circumflex Accent' (code 94) prints as ^; -a larger glyph can be obtained with -.BR \e(ha . -.sp -'nf -.nr Sp 3n -.ta \w'\fIOutput'u+\n(Spu +\w'\fIInput'u+\n(Spu +\w'\fIInput'u+\n(Spu \ -+\w'periodcentered'u+\n(Spu -.de C0 -.C \\$1 "" \\$1 \\$2 "\\$3" -.. -.de C1 -.C \e\\$1 "" \\\\\\$1 \\$2 "\\$3" -.. -.de C2 -.C \e(\\$1 "" \\(\\$1 \\$2 "\\$3" -.. -.if !\n(.g .ig -.de CD -.C \[char\\$1] \\$1 \[char\\$1] \\$2 "\\$3" -.. -.do fspecial CR R -.\" input-name decimal-code output-name ps-name description -.if !\n(.g .ig -.de C -.if c\\$3 \{\ -.ft CR -.tr `\`'\*(aq -.in 0 -.di CH -\&\\$1 -.br -.di -.in -.ft -.ds CH \\*(CH\ -.tr ``'' -\&\\$3\t\\*(CH\t\\$2\t\\$4\t\\$5 -.\} -.. -.if \n(.g .ig -.de C -.if !'\\$3'' \{\ -.ft B -.tr `\`'\*(aq -.in 0 -.di CH -\&\\$1 -.br -.di -.in -.ft -.ds CH \\*(CH\ -.tr ``'' -\&\\$3\t\\*(CH\t\\$2\t\\$4\t\\$5 -.\} -.. -.wh \n(nlu+\n(.tu-\n(.Vu Fo -.de Fo -'bp -.He -.. -.de He -.ft I -Output Input Input PostScript Notes - name code name -.ft -.LP -'nf -.. -.He -.CD 33 exclam -.CD 34 quotedbl -.CD 35 numbersign -.CD 36 dollar -.CD 37 percent -.CD 38 ampersand -.CD 39 quoteright -.CD 40 parenleft -.CD 41 parenright -.CD 42 asterisk -.CD 43 plus -.CD 44 comma -.CD 45 hyphen -.CD 46 period -.CD 47 slash -.CD 58 colon -.CD 59 semicolon -.CD 60 less -.CD 61 equal -.CD 62 greater -.CD 63 question -.CD 64 at -.CD 91 bracketleft -.CD 92 backslash -.CD 93 bracketright -.CD 94 circumflex "circumflex accent" -.CD 95 underscore -.CD 96 quoteleft -.CD 123 braceleft -.CD 124 bar -.CD 125 braceright -.CD 126 tilde "tilde accent" -.CD 161 exclamdown -.CD 162 cent -.CD 163 sterling -.CD 164 currency -.CD 165 yen -.CD 166 brokenbar -.CD 167 section -.CD 168 dieresis -.CD 169 copyright -.CD 170 ordfeminine -.CD 171 guillemotleft -.CD 172 logicalnot -.CD 173 hyphen -.CD 174 registered -.CD 175 macron -.CD 176 degree -.CD 177 plusminus -.CD 178 twosuperior -.CD 179 threesuperior -.CD 180 acute "acute accent" -.CD 181 mu -.CD 182 paragraph -.CD 183 periodcentered -.CD 184 cedilla -.CD 185 onesuperior -.CD 186 ordmasculine -.CD 187 guillemotright -.CD 188 onequarter -.CD 189 onehalf -.CD 190 threequarters -.CD 191 questiondown -.CD 192 Agrave -.CD 193 Aacute -.CD 194 Acircumflex -.CD 195 Atilde -.CD 196 Adieresis -.CD 197 Aring -.CD 198 AE -.CD 199 Ccedilla -.CD 200 Egrave -.CD 201 Eacute -.CD 202 Ecircumflex -.CD 203 Edieresis -.CD 204 Igrave -.CD 205 Iacute -.CD 206 Icircumflex -.CD 207 Idieresis -.CD 208 Eth -.CD 209 Ntilde -.CD 210 Ograve -.CD 211 Oacute -.CD 212 Ocircumflex -.CD 213 Otilde -.CD 214 Odieresis -.CD 215 multiply -.CD 216 Oslash -.CD 217 Ugrave -.CD 218 Uacute -.CD 219 Ucircumflex -.CD 220 Udieresis -.CD 221 Yacute -.CD 222 Thorn -.CD 223 germandbls -.CD 224 agrave -.CD 225 aacute -.CD 226 acircumflex -.CD 227 atilde -.CD 228 adieresis -.CD 229 aring -.CD 230 ae -.CD 231 ccedilla -.CD 232 egrave -.CD 233 eacute -.CD 234 ecircumflex -.CD 235 edieresis -.CD 236 igrave -.CD 237 iacute -.CD 238 icircumflex -.CD 239 idieresis -.CD 240 eth -.CD 241 ntilde -.CD 242 ograve -.CD 243 oacute -.CD 244 ocircumflex -.CD 245 otilde -.CD 246 odieresis -.CD 247 divide -.CD 248 oslash -.CD 249 ugrave -.CD 250 uacute -.CD 251 ucircumflex -.CD 252 udieresis -.CD 253 yacute -.CD 254 thorn -.CD 255 ydieresis -.C2 -D Eth "Icelandic uppercase eth" -.C2 Sd eth "Icelandic lowercase eth" -.C2 TP Thorn "Icelandic uppercase thorn" -.C2 Tp thorn "Icelandic lowercase thorn" -.C2 AE AE -.C2 ae ae -.C2 OE OE -.C2 oe oe -.C2 IJ IJ "Dutch IJ ligature" -.C2 ij ij "Dutch ij ligature" -.C2 ss germandbls -.C2 'A Aacute -.C2 'C Cacute -.C2 'E Eacute -.C2 'I Iacute -.C2 'O Oacute -.C2 'U Uacute -.C2 'a aacute -.C2 'c cacute -.C2 'e eacute -.C2 'i iacute -.C2 'o oacute -.C2 'u uacute -.C2 :A Adieresis -.C2 :E Edieresis -.C2 :I Idieresis -.C2 :O Odieresis -.C2 :U Udieresis -.C2 :Y Ydieresis -.C2 :a adieresis -.C2 :e edieresis -.C2 :i idieresis -.C2 :o odieresis -.C2 :u udieresis -.C2 :y ydieresis -.C2 ^A Acircumflex -.C2 ^E Ecircumflex -.C2 ^I Icircumflex -.C2 ^O Ocircumflex -.C2 ^U Ucircumflex -.C2 ^a acircumflex -.C2 ^e ecircumflex -.C2 ^i icircumflex -.C2 ^o ocircumflex -.C2 ^u ucircumflex -.C2 `A Agrave -.C2 `E Egrave -.C2 `I Igrave -.C2 `O Ograve -.C2 `U Ugrave -.C2 `a agrave -.C2 `e egrave -.C2 `i igrave -.C2 `o ograve -.C2 `u ugrave -.C2 ~A Atilde -.C2 ~N Ntilde -.C2 ~O Otilde -.C2 ~a atilde -.C2 ~n ntilde -.C2 ~o otilde -.C2 vS Scaron -.C2 vs scaron -.C2 vZ Zcaron -.C2 vz zcaron -.C2 ,C Ccedilla -.C2 ,c ccedilla -.C2 /L Lslash "Polish L with a slash" -.C2 /l lslash "Polish l with a slash" -.C2 /O Oslash -.C2 /o oslash -.C2 oA Aring -.C2 oa aring -.C2 a" hungarumlaut "Hungarian umlaut" -.C2 a- macron "macron or bar accent" -.C2 a. dotaccent "dot accent" -.C2 a^ circumflex "circumflex accent" -.C2 aa acute "acute accent" -.C2 ga grave "grave accent" -.C2 ab breve "breve accent" -.C2 ac cedilla "cedilla accent" -.C2 ad dieresis "umlaut or dieresis" -.C2 ah caron "h\('a\(vcek accent" -.C2 ao ring "ring or circle accent" -.C2 a~ tilde "tilde accent" -.C2 ho ogonek "hook or ogonek accent" -.C2 .i dotlessi "i without a dot" -.C2 .j dotlessj "j without a dot" -.C2 Cs currency "Scandinavian currency sign" -.C2 Do dollar -.C2 Po sterling -.C2 Ye yen -.C2 Fn florin -.C2 ct cent -.C2 Fo guillemotleft -.C2 Fc guillemotright -.C2 fo guilsinglleft -.C2 fc guilsinglright -.C2 r! exclamdown -.C2 r? questiondown -.C2 ff ff "ff ligature" -.C2 fi fi "fi ligature" -.C2 fl fl "fl ligature" -.C2 Fi ffi "ffi ligature" -.C2 Fl ffl "ffl ligature" -.C2 OK \& "check mark, tick" -.C2 Of ordfeminine -.C2 Om ordmasculine -.C2 S1 onesuperior -.C2 S2 twosuperior -.C2 S3 threesuperior -.C2 <- arrowleft -.C2 -> arrowright -.C2 <> arrowboth "horizontal double-headed arrow" -.C2 da arrowdown -.C2 ua arrowup -.C2 va \& "vertical double-headed arrow" -.C2 lA arrowdblleft -.C2 rA arrowdblright -.C2 hA arrowdblboth "horizontal double-headed double arrow" -.C2 dA arrowdbldown -.C2 uA arrowdblup -.C2 vA \& "vertical double-headed double arrow" -.C2 ba bar -.C2 bb brokenbar -.C2 br br "box rule with traditional troff metrics" -.C2 ru ru "baseline rule" -.C2 ul ul "underline with traditional troff metrics" -.C2 bv bv "bold vertical" -.C2 bs bell -.C2 ci circle -.C2 bu bullet -.C2 co copyright -.C2 rg registered -.C2 tm trademark -.C2 dd daggerdbl "double dagger sign" -.C2 dg dagger -.C2 ps paragraph -.C2 sc section -.C2 de degree -.C2 em emdash "em dash" -.C2 en endash "en dash" -.C2 %0 perthousand "per thousand, per mille sign" -.C2 12 onehalf -.C2 14 onequarter -.C2 34 threequarters -.C2 f/ fraction "bar for fractions" -.C2 fm minute "footmark, prime" -.C2 sd second -.C2 ha asciicircum "\s-2ASCII\s+2 circumflex, hat, caret" -.C2 ti asciitilde "\s-2ASCII\s0 tilde, large tilde" -.C2 hy hyphen -.C2 lB bracketleft -.C2 rB bracketright -.C2 lC braceleft -.C2 rC braceright -.C2 la angleleft "left angle bracket" -.C2 ra angleright "right angle bracket" -.C2 lh handleft -.C2 rh handright -.C2 Bq quotedblbase "low double comma quote" -.C2 bq quotesinglbase "low single comma quote" -.C2 lq quotedblleft -.C2 rq quotedblright -.C2 oq quoteleft "single open quote" -.C2 aq quotesingle "apostrophe quote" -.C2 or bar -.C2 at at -.C1 - minus "minus sign from current font" -.C2 sh numbersign -.C2 sl slash -.C2 rs backslash -.C2 sq square -.C2 3d therefore -.C2 tf therefore -.C2 *A Alpha -.C2 *B Beta -.C2 *C Xi -.C2 *D Delta -.C2 *E Epsilon -.C2 *F Phi -.C2 *G Gamma -.C2 *H Theta -.C2 *I Iota -.C2 *K Kappa -.C2 *L Lambda -.C2 *M Mu -.C2 *N Nu -.C2 *O Omicron -.C2 *P Pi -.C2 *Q Psi -.C2 *R Rho -.C2 *S Sigma -.C2 *T Tau -.C2 *U Upsilon -.C2 *W Omega -.C2 *X Chi -.C2 *Y Eta -.C2 *Z Zeta -.C2 *a alpha -.C2 *b beta -.C2 *c xi -.C2 *d delta -.C2 *e epsilon -.C2 *f phi -.C2 +f phi1 "variant phi" -.C2 *g gamma -.C2 *h theta -.C2 +h theta1 "variant theta" -.C2 *i iota -.C2 *k kappa -.C2 *l lambda -.C2 *m mu -.C2 *n nu -.C2 *o omicron -.C2 *p pi -.C2 +p omega1 "variant pi, looking like omega" -.C2 *q psi -.C2 *r rho -.C2 *s sigma -.C2 *t tau -.C2 *u upsilon -.C2 *w omega -.C2 *x chi -.C2 *y eta -.C2 *z zeta -.C2 ts sigma1 "terminal sigma" -.C2 ~~ approxequal -.C2 ~= approxequal -.C2 != notequal -.C2 ** asteriskmath -.C2 -+ minusplus -.C2 +- plusminus -.C2 <= lessequal -.C2 == equivalence -.C2 =~ congruent -.C2 >= greaterequal -.C2 AN logicaland -.C2 OR logicalor -.C2 no logicalnot -.C2 te existential "there exists, existential quantifier" -.C2 fa universal "for all, universal quantifier" -.C2 Ah aleph -.C2 Im Ifraktur "Fraktur I, imaginary" -.C2 Re Rfraktur "Fraktur R, real" -.C2 if infinity -.C2 md dotmath -.C2 mo element -.C2 mu multiply -.C2 nb notsubset -.C2 nc notpropersuperset -.C2 ne notequivalence -.C2 nm notelement -.C2 pl plusmath "plus sign in special font" -.C2 eq equalmath "equals sign in special font" -.C2 pt proportional -.C2 pp perpendicular -.C2 sb propersubset -.C2 sp propersuperset -.C2 ib reflexsubset -.C2 ip reflexsuperset -.C2 ap similar -.C2 pd partialdiff "partial differentiation sign" -.C2 c* circlemultiply "multiply sign in a circle" -.C2 c+ circleplus "plus sign in a circle" -.C2 ca intersection "intersection, cap" -.C2 cu union "union, cup" -.C2 di divide "division sign" -.C2 -h hbar -.C2 gr gradient -.C2 es emptyset -.C2 CL club "club suit" -.C2 SP spade "spade suit" -.C2 HE heart "heart suit" -.C2 DI diamond "diamond suit" -.C2 CR carriagereturn "carriage return symbol" -.C2 st suchthat -.C2 /_ angle -.C2 << "" "much less" -.C2 >> "" "much greater" -.C2 wp weierstrass "Weierstrass p" -.C2 lz lozenge -.C2 an arrowhorizex "horizontal arrow extension" -.ch Fo -.SH "SEE ALSO" -.BR groff (@MAN1EXT@) -.br -.IR "An extension to the troff character set for Europe" , -E.G. Keizer, K.J. Simonsen, J. Akkerhuis, -EUUG Newsletter, Volume 9, No. 2, Summer 1989 diff --git a/gnu/usr.bin/groff/man/groff_font.5_in b/gnu/usr.bin/groff/man/groff_font.5_in new file mode 100644 index 00000000000..97b6480274b --- /dev/null +++ b/gnu/usr.bin/groff/man/groff_font.5_in @@ -0,0 +1,368 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.de TQ +.br +.ns +.TP \\$1 +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_font \- format of groff device and font description files +.SH DESCRIPTION +The groff font format is roughly a superset of the ditroff +font format. +Unlike the ditroff font format, there is no associated binary +format. +The font files for device +.I name +are stored in a directory +.BI dev name. +There are two types of file: a +device description file called +.B DESC +and for each font +.I F +a font file called +.IR F . +These are text files; +there is no associated binary format. +.SS DESC file format +The DESC file can contain the following types of line: +.TP +.BI res\ n +There are +.I n +machine units per inch. +.TP +.BI hor\ n +The horizontal resolution is +.I n +machine units. +.TP +.BI vert\ n +The vertical resolution is +.I n +machine units. +.TP +.BI sizescale\ n +The scale factor for pointsizes. +By default this has a value of 1. +One +.I +scaled point +is equal to +one +.RI point/ n . +The arguments to the +.B unitwidth +and +.B sizes +commands are given in scaled points. +.TP +.BI unitwidth\ n +Quantities in the font files are given in machine units +for fonts whose point size is +.I n +scaled points. +.TP +.B tcommand +This means that the postprocessor can handle the +.B t +and +.B u +output commands. +.TP +.BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0 +This means that the device has fonts at +.IR s1 , +.IR s2 ,\|.\|.\|.\| sn +scaled points. +The list of sizes must be terminated by a +.BR 0 . +Each +.BI s i +can also be a range of sizes +.IR m \- n . +The list can extend over more than one line. +.TP +.BI styles\ S1\ S2\|.\|.\|.\|Sm +The first +.I m +font positions will be associated with styles +.IR S1\|.\|.\|.\|Sm . +.TP +.BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn +Fonts +.I F1\|.\|.\|.\|Fn +will be mounted in the font positions +.IR m +1,\|.\|.\|., m + n +where +.I m +is the number of styles. +This command may extend over more than one line. +A font name of +.B 0 +will cause no font to be mounted on the corresponding font position. +.TP +.BI family\ fam +The default font family is +.IR fam . +.TP +.B charset +This line and everything following in the file are ignored. +It is allowed for the sake of backwards compatibility. +.LP +The res, unitwidth, fonts and sizes lines are compulsory. +Other commands are ignored by +.B troff +but may be used by postprocessors to store arbitrary information +about the device in the DESC file. +.SS Font file format +A font file has two sections. The first section is a sequence +of lines each containing a sequence of blank delimited +words; the first word in the line is a key, and subsequent +words give a value for that key. +.TP +.BI name\ F +The name of the font is +.IR F . +.TP +.BI spacewidth\ n +The normal width of a space is +.IR n . +.TP +.BI slant\ n +The characters of the font have a slant of +.I n +degrees. (Positive means forward.) +.TP +.BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR] +Characters +.IR lig1 , +.IR lig2 ,\|.\|.\|., lign +are ligatures; possible ligatures are +.BR ff , +.BR fi , +.BR fl +and +.BR ffl . +For backwards compatibility, the list of ligatures may be terminated +with a +.BR 0. +The list of ligatures may not extend over more than one line. +.TP +.B special +The font is +.IR special ; +this means that when a character is requested that is not present in +the current font, it will be searched for in any special fonts that +are mounted. +.LP +Other commands are ignored by +.B troff +but may be used by postprocessors to store arbitrary information +about the font in the font file. +.LP +The first section can contain comments which start with the +.B # +character and extend to the end of a line. +.LP +The second section contains one or two subsections. +It must contain a +.I charset +subsection +and it may also contain a +.I kernpairs +subsection. +These subsections can appear in any order. +Each subsection starts with a word on a line by itself. +.LP +The word +.B charset +starts the charset subsection. +The +.B charset +line is followed by a sequence of lines. +Each line gives information for one character. +A line comprises a number of fields separated +by blanks or tabs. The format is +.IP +.I +name metrics type code comment +.LP +.I name +identifies the character: +if +.I name +is a single character +.I c +then it corresponds to the groff input character +.IR c ; +if it is of the form +.BI \e c +where c is a single character, then it +corresponds to the groff input character +.BI \e c\fR; +otherwise it corresponds to the groff input character +.BI \e[ name ] +(if it is exactly two characters +.I xx +it can be entered as +.BI \e( xx\fR.) +Groff supports eight bit characters; however some utilities +has difficulties with eight bit characters. +For this reason, there is a convention that the name +.BI char n +is equivalent to the single character whose code is +.I n . +For example, +.B char163 +would be equivalent to the character with code 163 +which is the pounds sterling sign in ISO Latin-1. +The name +.B \-\-\- +is special and indicates that the character is unnamed; +such characters can only be used by means of the +.B \eN +escape sequence in +.BR troff . +.LP +The +.I type +field gives the character type: +.TP +1 +means the character has an descender, for example, p; +.TP +2 +means the character has an ascender, for example, b; +.TP +3 +means the character has both an ascender and a descender, for example, +(. +.LP +The +.I code +field gives the code which the postprocessor uses to print the character. +The character can also be input to groff using this code by means of the +.B \eN +escape sequence. +The code can be any integer. +If it starts with a +.B 0 +it will be interpreted as octal; +if it starts with +.B 0x +or +.B 0X +it will be intepreted as hexadecimal. +.LP +Anything on the line after the code field will be ignored. +.LP +The +.I metrics +field has the form: +.IP +.IR width [\fB, height [\fB, depth [\fB, italic_correction [\fB, \ +left_italic_correction [\fB, subscript_correction ]]]]] +.LP +There must not be any spaces between these subfields. +Missing subfields are assumed to be 0. +The subfields are all decimal integers. +Since there is no associated binary format, these +values are not required to fit into a variable of type +.B char +as they are in ditroff. +The +.I width +subfields gives the width of the character. +The +.I height +subfield gives the height of the character (upwards is positive); +if a character does not extend above the baseline, it should be +given a zero height, rather than a negative height. +The +.I depth +subfield gives the depth of the character, that is, the distance +below the lowest point below the baseline to which the +character extends (downwards is positive); +if a character does not extend below above the baseline, it should be +given a zero depth, rather than a negative depth. +The +.I italic_correction +subfield gives the amount of space that should be added after the +character when it is immediately to be followed by a character +from a roman font. +The +.I left_italic_correction +subfield gives the amount of space that should be added before the +character when it is immediately to be preceded by a character +from a roman font. +The +.I subscript_correction +gives the amount of space that should be added after a character +before adding a subscript. +This should be less than the italic correction. +.LP +A line in the charset section can also have the format +.IP +.I +name \fB" +.LP +This indicates that +.I name +is just another name for the character mentioned in the +preceding line. +.LP +The word +.B kernpairs +starts the kernpairs section. +This contains a sequence of lines of the form: +.IP +.I +c1 c2 n +.LP +This means that when character +.I c1 +appears next to character +.I c2 +the space between them should be increased by +.IR n . +Most entries in kernpairs section will have a negative value for +.IR n . +.SH FILES +.Tp \w'@FONTDIR@/devname/DESC'u+3n +.BI @FONTDIR@/dev name /DESC +Device description file for device +.IR name . +.TP +.BI @FONTDIR@/dev name / F +Font file for font +.I F +of device +.IR name . +.SH "SEE ALSO" +.BR groff_out (@MAN5EXT@), +.BR @g@troff (@MAN1EXT@). diff --git a/gnu/usr.bin/groff/man/groff_font.man b/gnu/usr.bin/groff/man/groff_font.man deleted file mode 100644 index 97b6480274b..00000000000 --- a/gnu/usr.bin/groff/man/groff_font.man +++ /dev/null @@ -1,368 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.de TQ -.br -.ns -.TP \\$1 -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_font \- format of groff device and font description files -.SH DESCRIPTION -The groff font format is roughly a superset of the ditroff -font format. -Unlike the ditroff font format, there is no associated binary -format. -The font files for device -.I name -are stored in a directory -.BI dev name. -There are two types of file: a -device description file called -.B DESC -and for each font -.I F -a font file called -.IR F . -These are text files; -there is no associated binary format. -.SS DESC file format -The DESC file can contain the following types of line: -.TP -.BI res\ n -There are -.I n -machine units per inch. -.TP -.BI hor\ n -The horizontal resolution is -.I n -machine units. -.TP -.BI vert\ n -The vertical resolution is -.I n -machine units. -.TP -.BI sizescale\ n -The scale factor for pointsizes. -By default this has a value of 1. -One -.I -scaled point -is equal to -one -.RI point/ n . -The arguments to the -.B unitwidth -and -.B sizes -commands are given in scaled points. -.TP -.BI unitwidth\ n -Quantities in the font files are given in machine units -for fonts whose point size is -.I n -scaled points. -.TP -.B tcommand -This means that the postprocessor can handle the -.B t -and -.B u -output commands. -.TP -.BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0 -This means that the device has fonts at -.IR s1 , -.IR s2 ,\|.\|.\|.\| sn -scaled points. -The list of sizes must be terminated by a -.BR 0 . -Each -.BI s i -can also be a range of sizes -.IR m \- n . -The list can extend over more than one line. -.TP -.BI styles\ S1\ S2\|.\|.\|.\|Sm -The first -.I m -font positions will be associated with styles -.IR S1\|.\|.\|.\|Sm . -.TP -.BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn -Fonts -.I F1\|.\|.\|.\|Fn -will be mounted in the font positions -.IR m +1,\|.\|.\|., m + n -where -.I m -is the number of styles. -This command may extend over more than one line. -A font name of -.B 0 -will cause no font to be mounted on the corresponding font position. -.TP -.BI family\ fam -The default font family is -.IR fam . -.TP -.B charset -This line and everything following in the file are ignored. -It is allowed for the sake of backwards compatibility. -.LP -The res, unitwidth, fonts and sizes lines are compulsory. -Other commands are ignored by -.B troff -but may be used by postprocessors to store arbitrary information -about the device in the DESC file. -.SS Font file format -A font file has two sections. The first section is a sequence -of lines each containing a sequence of blank delimited -words; the first word in the line is a key, and subsequent -words give a value for that key. -.TP -.BI name\ F -The name of the font is -.IR F . -.TP -.BI spacewidth\ n -The normal width of a space is -.IR n . -.TP -.BI slant\ n -The characters of the font have a slant of -.I n -degrees. (Positive means forward.) -.TP -.BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR] -Characters -.IR lig1 , -.IR lig2 ,\|.\|.\|., lign -are ligatures; possible ligatures are -.BR ff , -.BR fi , -.BR fl -and -.BR ffl . -For backwards compatibility, the list of ligatures may be terminated -with a -.BR 0. -The list of ligatures may not extend over more than one line. -.TP -.B special -The font is -.IR special ; -this means that when a character is requested that is not present in -the current font, it will be searched for in any special fonts that -are mounted. -.LP -Other commands are ignored by -.B troff -but may be used by postprocessors to store arbitrary information -about the font in the font file. -.LP -The first section can contain comments which start with the -.B # -character and extend to the end of a line. -.LP -The second section contains one or two subsections. -It must contain a -.I charset -subsection -and it may also contain a -.I kernpairs -subsection. -These subsections can appear in any order. -Each subsection starts with a word on a line by itself. -.LP -The word -.B charset -starts the charset subsection. -The -.B charset -line is followed by a sequence of lines. -Each line gives information for one character. -A line comprises a number of fields separated -by blanks or tabs. The format is -.IP -.I -name metrics type code comment -.LP -.I name -identifies the character: -if -.I name -is a single character -.I c -then it corresponds to the groff input character -.IR c ; -if it is of the form -.BI \e c -where c is a single character, then it -corresponds to the groff input character -.BI \e c\fR; -otherwise it corresponds to the groff input character -.BI \e[ name ] -(if it is exactly two characters -.I xx -it can be entered as -.BI \e( xx\fR.) -Groff supports eight bit characters; however some utilities -has difficulties with eight bit characters. -For this reason, there is a convention that the name -.BI char n -is equivalent to the single character whose code is -.I n . -For example, -.B char163 -would be equivalent to the character with code 163 -which is the pounds sterling sign in ISO Latin-1. -The name -.B \-\-\- -is special and indicates that the character is unnamed; -such characters can only be used by means of the -.B \eN -escape sequence in -.BR troff . -.LP -The -.I type -field gives the character type: -.TP -1 -means the character has an descender, for example, p; -.TP -2 -means the character has an ascender, for example, b; -.TP -3 -means the character has both an ascender and a descender, for example, -(. -.LP -The -.I code -field gives the code which the postprocessor uses to print the character. -The character can also be input to groff using this code by means of the -.B \eN -escape sequence. -The code can be any integer. -If it starts with a -.B 0 -it will be interpreted as octal; -if it starts with -.B 0x -or -.B 0X -it will be intepreted as hexadecimal. -.LP -Anything on the line after the code field will be ignored. -.LP -The -.I metrics -field has the form: -.IP -.IR width [\fB, height [\fB, depth [\fB, italic_correction [\fB, \ -left_italic_correction [\fB, subscript_correction ]]]]] -.LP -There must not be any spaces between these subfields. -Missing subfields are assumed to be 0. -The subfields are all decimal integers. -Since there is no associated binary format, these -values are not required to fit into a variable of type -.B char -as they are in ditroff. -The -.I width -subfields gives the width of the character. -The -.I height -subfield gives the height of the character (upwards is positive); -if a character does not extend above the baseline, it should be -given a zero height, rather than a negative height. -The -.I depth -subfield gives the depth of the character, that is, the distance -below the lowest point below the baseline to which the -character extends (downwards is positive); -if a character does not extend below above the baseline, it should be -given a zero depth, rather than a negative depth. -The -.I italic_correction -subfield gives the amount of space that should be added after the -character when it is immediately to be followed by a character -from a roman font. -The -.I left_italic_correction -subfield gives the amount of space that should be added before the -character when it is immediately to be preceded by a character -from a roman font. -The -.I subscript_correction -gives the amount of space that should be added after a character -before adding a subscript. -This should be less than the italic correction. -.LP -A line in the charset section can also have the format -.IP -.I -name \fB" -.LP -This indicates that -.I name -is just another name for the character mentioned in the -preceding line. -.LP -The word -.B kernpairs -starts the kernpairs section. -This contains a sequence of lines of the form: -.IP -.I -c1 c2 n -.LP -This means that when character -.I c1 -appears next to character -.I c2 -the space between them should be increased by -.IR n . -Most entries in kernpairs section will have a negative value for -.IR n . -.SH FILES -.Tp \w'@FONTDIR@/devname/DESC'u+3n -.BI @FONTDIR@/dev name /DESC -Device description file for device -.IR name . -.TP -.BI @FONTDIR@/dev name / F -Font file for font -.I F -of device -.IR name . -.SH "SEE ALSO" -.BR groff_out (@MAN5EXT@), -.BR @g@troff (@MAN1EXT@). diff --git a/gnu/usr.bin/groff/man/groff_out.5_in b/gnu/usr.bin/groff/man/groff_out.5_in new file mode 100644 index 00000000000..203f2d476d8 --- /dev/null +++ b/gnu/usr.bin/groff/man/groff_out.5_in @@ -0,0 +1,232 @@ +'\" e +.ig \"-*- nroff -*- +Copyright (C) 1989-1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" This man page must be preprocessed with eqn. +.ie \n(.g .ds ic \/ +.el .ds ic \^ +.TH GROFF_OUT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_out \- groff intermediate output format +.SH DESCRIPTION +This manual page describes the format output by GNU troff. +The output format used by GNU troff is very similar to that used +by Unix device-independent troff. Only the differences are documented +here. +.LP +The argument to the +.B s +command is in scaled points (units of +.IR points/ n , +where +.I n +is the argument to the +.B sizescale +command in the DESC file.) +The argument to the +.B x\ Height +command is also in scaled points. +.LP +The first three output commands are guaranteed to be: +.IP +.BI x\ T\ device +.br +.BI x\ res\ n\ h\ v +.br +.B x init +.LP +If the +.B tcommand +line is present in the DESC file, troff will use the following +two commands +.TP +.BI t xxx +.I xxx +is any sequence of characters terminated by a space or a newline; +the first character should be printed at the current position, +the current horizontal position should be increased by +the width of the first character, and so on for each character. +The width of the character is that given in the font file, +appropriately scaled for the current point size, and rounded +so that it is a multiple of the horizontal resolution. +Special characters cannot be printed using this command. +.TP +.BI u n\ xxx +This is same as the +.B t +command except that after printing each character, the current horizontal +position is increased by the sum of the width of that character +and +.IR n . +.LP +Note that single characters can have the eighth bit set, as can the +names of fonts and special characters. +.LP +The names of characters and fonts can be of arbitrary length; drivers +should not assume that they will be only two characters long. +.LP +When a character is to be printed, that character will always be +in the current font. +Unlike device-independent troff, it is not necessary +for drivers to search special fonts to find a character. +.LP +The +.B D +drawing command has been extended. +These extensions will not be used by GNU pic if the +.B \-n +option is given. +.TP +\fBDf \fIn\fR\*(ic\en +Set the shade of gray to be used for filling solid objects to +.IR n ; +.I n +must be an integer between 0 and 1000, where 0 corresponds solid white +and 1000 to solid black, and values in between correspond to +intermediate shades of gray. +This applies only to solid circles, solid ellipses and solid +polygons. +By default, a level of 1000 will be used. +Whatever color a solid object has, it should completely obscure +everything beneath it. +A value greater than 1000 or less than 0 can also be used: +this means fill with the shade of gray that is currently being used +for lines and text. +Normally this will be black, but some drivers may provide +a way of changing this. +.TP +\fBDC \fId\fR\*(ic\en +Draw a solid circle with a diameter of +.I d +with the leftmost point at the current position. +.TP +\fBDE \fIdx dy\fR\*(ic\en +Draw a solid ellipse with a horizontal diameter of +.I dx +and a vertical diameter of +.I dy +with the leftmost point at the current position. +.EQ +delim $$ +.EN +.TP +\fBDp\fR $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\en +Draw a polygon with, +for $i = 1 ,..., n+1$, the +.IR i -th +vertex at the current position +$+ sum from j=1 to i-1 ( dx sub j , dy sub j )$. +At the moment, +GNU pic only uses this command to generate triangles and rectangles. +.TP +\fBDP\fR $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\en +Like +.B Dp +but draw a solid rather than outlined polygon. +.TP +\fBDt \fIn\fR\*(ic\en +Set the current line thickness to +.I n +machine units. +Traditionally Unix troff drivers use a line thickness proportional to the current +point size; drivers should continue to do this if no +.B Dt +command has been given, or if a +.B Dt +command has been given with a negative value of +.IR n . +A zero value of +.I n +selects the smallest available line thickness. +.LP +A difficulty arises in how the current position should be changed after +the execution of these commands. +This is not of great importance since the code generated by GNU pic +does not depend on this. +Given a drawing command of the form +.IP +\fB\eD\(fm\fIc\fR $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\(fm +.LP +where +.I c +is not one of +.BR c , +.BR e , +.BR l , +.B a +or +.BR ~ , +Unix troff will treat each of the $x sub i$ as a horizontal quantity, +and each of the $y sub i$ as a vertical quantity and will assume that +the width of the drawn object is $sum from i=1 to n x sub i$, +and that the height is $sum from i=1 to n y sub i$. +(The assumption about the height can be seen by examining the +.B st +and +.B sb +registers after using such a +.B D +command in a \ew escape sequence.) +This rule also holds for all the original drawing commands +with the exception of +.BR De . +For the sake of compatibility GNU troff also follows this rule, +even though it produces an ugly result in the case of the +.BR Df , +.BR Dt , +and, to a lesser extent, +.B DE +commands. +Thus after executing a +.B D +command of the form +.IP +\fBD\fIc\fR $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\en +.LP +the current position should be increased by +$( sum from i=1 to n x sub i , sum from i=1 to n y sub i )$. +.LP +There is a continuation convention which permits the argument to the +.B x\ X +command to contain newlines: +when outputting the argument to the +.B x\ X +command, GNU troff +will follow each newline in the argument with a +.B + +character +(as usual, it will terminate the entire argument with a newline); +thus if the line after the line containing the +.B x\ X +command starts with +.BR + , +then the newline ending the line containing the +.B x\ X +command should be treated as part of the argument to the +.B x\ X +command, +the +.B + +should be ignored, +and the part of the line following the +.B + +should be treated like the part of the line following the +.B x\ X +command. +.SH "SEE ALSO" +.BR groff_font (@MAN5EXT@) diff --git a/gnu/usr.bin/groff/man/groff_out.man b/gnu/usr.bin/groff/man/groff_out.man deleted file mode 100644 index 9b421aeeac8..00000000000 --- a/gnu/usr.bin/groff/man/groff_out.man +++ /dev/null @@ -1,232 +0,0 @@ -'\" e -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" This man page must be preprocessed with eqn. -.ie \n(.g .ds ic \/ -.el .ds ic \^ -.TH GROFF_OUT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_out \- groff intermediate output format -.SH DESCRIPTION -This manual page describes the format output by GNU troff. -The output format used by GNU troff is very similar to that used -by Unix device-independent troff. Only the differences are documented -here. -.LP -The argument to the -.B s -command is in scaled points (units of -.IR points/ n , -where -.I n -is the argument to the -.B sizescale -command in the DESC file.) -The argument to the -.B x\ Height -command is also in scaled points. -.LP -The first three output commands are guaranteed to be: -.IP -.BI x\ T\ device -.br -.BI x\ res\ n\ h\ v -.br -.B x init -.LP -If the -.B tcommand -line is present in the DESC file, troff will use the following -two commands -.TP -.BI t xxx -.I xxx -is any sequence of characters terminated by a space or a newline; -the first character should be printed at the current position, -the current horizontal position should be increased by -the width of the first character, and so on for each character. -The width of the character is that given in the font file, -appropriately scaled for the current point size, and rounded -so that it is a multiple of the horizontal resolution. -Special characters cannot be printed using this command. -.TP -.BI u n\ xxx -This is same as the -.B t -command except that after printing each character, the current horizontal -position is increased by the sum of the width of that character -and -.IR n . -.LP -Note that single characters can have the eighth bit set, as can the -names of fonts and special characters. -.LP -The names of characters and fonts an be of arbitrary length; drivers -should not assume that they will be only two characters long. -.LP -When a character is to be printed, that character will always be -in the current font. -Unlike device-independent troff, it is not necessary -for drivers to search special fonts to find a character. -.LP -The -.B D -drawing command has been extended. -These extensions will not be used by GNU pic if the -.B \-n -option is given. -.TP -\fBDf \fIn\fR\*(ic\en -Set the shade of gray to be used for filling solid objects to -.IR n ; -.I n -must be an integer between 0 and 1000, where 0 corresponds solid white -and 1000 to solid black, and values in between correspond to -intermediate shades of gray. -This applies only to solid circles, solid ellipses and solid -polygons. -By default, a level of 1000 will be used. -Whatever color a solid object has, it should completely obscure -everything beneath it. -A value greater than 1000 or less than 0 can also be used: -this means fill with the shade of gray that is currently being used -for lines and text. -Normally this will be black, but some drivers may provide -a way of changing this. -.TP -\fBDC \fId\fR\*(ic\en -Draw a solid circle with a diameter of -.I d -with the leftmost point at the current position. -.TP -\fBDE \fIdx dy\fR\*(ic\en -Draw a solid ellipse with a horizontal diameter of -.I dx -and a vertical diameter of -.I dy -with the leftmost point at the current position. -.EQ -delim $$ -.EN -.TP -\fBDp\fR $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\en -Draw a polygon with, -for $i = 1 ,..., n+1$, the -.IR i -th -vertex at the current position -$+ sum from j=1 to i-1 ( dx sub j , dy sub j )$. -At the moment, -GNU pic only uses this command to generate triangles and rectangles. -.TP -\fBDP\fR $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\en -Like -.B Dp -but draw a solid rather than outlined polygon. -.TP -\fBDt \fIn\fR\*(ic\en -Set the current line thickness to -.I n -machine units. -Traditionally Unix troff drivers use a line thickness proportional to the current -point size; drivers should continue to do this if no -.B Dt -command has been given, or if a -.B Dt -command has been given with a negative value of -.IR n . -A zero value of -.I n -selects the smallest available line thickness. -.LP -A difficulty arises in how the current position should be changed after -the execution of these commands. -This is not of great importance since the code generated by GNU pic -does not depend on this. -Given a drawing command of the form -.IP -\fB\eD\(fm\fIc\fR $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\(fm -.LP -where -.I c -is not one of -.BR c , -.BR e , -.BR l , -.B a -or -.BR ~ , -Unix troff will treat each of the $x sub i$ as a horizontal quantity, -and each of the $y sub i$ as a vertical quantity and will assume that -the width of the drawn object is $sum from i=1 to n x sub i$, -and that the height is $sum from i=1 to n y sub i$. -(The assumption about the height can be seen by examining the -.B st -and -.B sb -registers after using such a -.B D -command in a \ew escape sequence.) -This rule also holds for all the original drawing commands -with the exception of -.BR De . -For the sake of compatibility GNU troff also follows this rule, -even though it produces an ugly result in the case of the -.BR Df , -.BR Dt , -and, to a lesser extent, -.B DE -commands. -Thus after executing a -.B D -command of the form -.IP -\fBD\fIc\fR $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\en -.LP -the current position should be increased by -$( sum from i=1 to n x sub i , sum from i=1 to n y sub i )$. -.LP -There is a continuation convention which permits the argument to the -.B x\ X -command to contain newlines: -when outputting the argument to the -.B x\ X -command, GNU troff -will follow each newline in the argument with a -.B + -character -(as usual, it will terminate the entire argument with a newline); -thus if the line after the line containing the -.B x\ X -command starts with -.BR + , -then the newline ending the line containing the -.B x\ X -command should be treated as part of the argument to the -.B x\ X -command, -the -.B + -should be ignored, -and the part of the line following the -.B + -should be treated like the part of the line following the -.B x\ X -command. -.SH "SEE ALSO" -.BR groff_font (@MAN5EXT@) diff --git a/gnu/usr.bin/groff/mm/ChangeLog b/gnu/usr.bin/groff/mm/ChangeLog index 5320294ae44..fb0d4fe1db2 100644 --- a/gnu/usr.bin/groff/mm/ChangeLog +++ b/gnu/usr.bin/groff/mm/ChangeLog @@ -1,3 +1,114 @@ +Mon Mar 15 22:22:42 1999 Jörgen Hägg (jh at axis.com) + + * OK, let's release this as a beta, 1.33 will be better. :-) + * version 1.32 + * fixed .el-error + * Added number variable Hss + * Changed Hps1 and Hps2 to units + * added hd*h1-text to be used in user defined macro TP. + * -U needed for SETR (I really need 'mv', 'echo', 'rm' + and 'test' builtin!) + * Rewritten the reference system, SETR now prints to stderr + if the number register Qrf > 0. Store in the filename + that is the argument to .INITR + The old behaviour is returned if number register Initr > 0. + * Fixed bug with List of XXXX, long lines messed up the result. + * added number register H1dot. + * added string variable H1txt + * added string variable Tcst + * added number register Dsp. + * added alias APPX for user-defined appendix title. + * added string variable Apptxt + * added H1h for use in TP in headers + * added macro EPIC + * added macro PIC (safe replacement for PSPIC) + * fixed Hps-bug, should be 1, not 1v. + * fixed bug with APPSK, variable not set. + +Wed Feb 4 15:46:04 1998 Jörgen Hägg (jh at axis.se) + + * version 1.31 + * .LI will now honor a space mark. + * Another fix for .AU to let it be used without arguments. + * uninitialized eq*label fixed + +Fri Sep 6 07:13:07 1996 Jörgen Hägg (jh at axis.se) + + * version 1.30 + * This is more like a beta-release, bugs might pop up. :-) + * last line in TOC was not correctly terminated (missing .br) + * changed the indentation for displays, it will now + indent to the current indent, not the one at the definition + of the display. + * Equation marks should now work better, indentation also. + * included these bug fixes from Larry Jones: + * The documentation for the argument to .AS was incorrect for MT 4. + * \*(EM should be a double-dash for nroff. + * \nS is in points, not units. + * If \nO isn't set, the default page offset should be .75i for nroff + and .963i for troff. + * .S D should set the point size to \nS, not 10. + * .S was setting the vertical spacing based on the old point size + instead of the new point size. + * Got rid of a spurrious .br that prevented run-in headings from + working. + * Reset the .SP counters in pg@header so that spacing on one page + won't affect spacing on subsequent pages. + * Allow .AU and .AF with no arguments (real mm does, even though it + isn't documented). + * Do .init@reset first thing to initialize the default environment. + * For MT 4, the title should be 4 points larger than the default size, + not 12 point. + * The cover environment needs to be initialized. + * Printing the abstract on the first page needs to be controlled by + the .AS argument. + * Heading eject should be suppressed if the heading immediately + follows the first page stuff (title, author, etc.). + * support for table of contents numbering style (.nr Oc) + * changes the troff empty line height from .25v to .5v + * fixed section page numbering + * fixed a really nasty bug in footnotes that could cause you + to lose the page footer completely if the very first + footnote on the page occurred at just the wrong place + + +Wed May 15 07:39:32 1996 Jörgen Hägg (jh at axis.se) + + * version 1.29 + * Syntax and scaling errror fixed, (thanks to Frazer Williams) + * DF/DE will now do a line-break before printing the display. + * Updated the manual for TB,FG,EX and EC. + * Added support for the ms- (and mgs-)macro .IX + * Added indexmacro IX, INITI, IND and INDP, support for + TXIND, TYIND and TZIND. + * PGFORM will now always really reset to the default + values for unspecified arguments. + * Floating displays tested and repaired, it should + now (finanlly) work exactly as the original (I hope :-). + * Should now set year correctly even after 2000. + * Stupid bug in PGNH fixed. + * Corrected line length for figure caption (FG and friends) + + +Mon Apr 24 07:37:52 1995 Jörgen Hägg (jh at axis.se) + + * version 1.28 + * Added AVL (AV without date) + * Fixed nroff scaling for W and L. + * Added support for register E and roman/bold + for all Subject/Date/From strings. + * Added support for register C (1-4), (for DRAFTs and other types) + * Will protest if not used with groff. + * Change of the internal number registers @ps and @vs, they + are now in units, and is set in the new macros .@ps and .@vs. + @ps and @vs is now corrected to the real point and vertical size. + * Macro EQ has now correct pointsize. + * Figures should now get the right page number in the index. + * User-defined macros can now be defined for list of + figures, tables, equations and exhibits (T{X,Y}{FG,TB,EC,EX}. + * Space may be omitted between prefix and mark in automatic lists (.AL) + See .LI + Tue Jan 10 07:51:37 1995 Jörgen Hägg (jh at axis.se) * version 1.27 diff --git a/gnu/usr.bin/groff/mm/Makefile.sub b/gnu/usr.bin/groff/mm/Makefile.sub index f3e3421659e..264e1a54b03 100644 --- a/gnu/usr.bin/groff/mm/Makefile.sub +++ b/gnu/usr.bin/groff/mm/Makefile.sub @@ -1,11 +1,12 @@ # -# $Id: Makefile.sub,v 1.3 1998/01/19 00:40:11 etheisen Exp $ +# $Id: Makefile.sub,v 1.4 2000/04/09 08:25:18 millert Exp $ # -MAN7=groff_mm.n groff_mmse.n +MAN7=groff_mm.7 groff_mmse.7 FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov # Local configuration files with default values. LOCALE = locale se_locale CLEANADD=temp +tmac_m=m install: install_mm install_mm: install_m @@ -20,10 +21,10 @@ install_mm: install_m install_m: -test -d $(tmacdir) || mkdir $(tmacdir) - -rm -f $(tmacdir)/tmac.$(tmac_m_prefix)m - $(INSTALL_DATA) $(srcdir)/tmac.m $(tmacdir)/tmac.$(tmac_m_prefix)m - @sed -e "s;^.mso tmac.m;.mso $(tmac_m_prefix)m;g" $(srcdir)/tmac.mse \ - > $(tmacdir)/tmac.$(tmac_m_prefix)mse + -rm -f $(tmacdir)/tmac.$(tmac_m) + $(INSTALL_DATA) $(srcdir)/tmac.m $(tmacdir)/tmac.$(tmac_m) + @sed -e "s;^.mso tmac.m;.mso $(tmac_m);g" $(srcdir)/tmac.mse \ + > $(tmacdir)/tmac.$(tmac_m)se @@ -32,6 +33,6 @@ uninstall_sub: -for f in $(LOCALE); do \ test -s $(tmacdir)/mm/$$f || rm -f $(tmacdir)/mm/$$f; \ done - -rm -f $(tmacdir)/tmac.$(tmac_m_prefix)m - -rm -f $(tmacdir)/tmac.$(tmac_m_prefix)mse + -rm -f $(tmacdir)/tmac.$(tmac_m) + -rm -f $(tmacdir)/tmac.$(tmac_m)se -rmdir $(tmacdir)/mm diff --git a/gnu/usr.bin/groff/mm/README b/gnu/usr.bin/groff/mm/README index f08f68d4820..a720f07054f 100644 --- a/gnu/usr.bin/groff/mm/README +++ b/gnu/usr.bin/groff/mm/README @@ -13,7 +13,8 @@ of tmac.m) and the version of groff. Any new ideas or improvements are welcome. Newest version is available with anonymous FTP -at ftp.efd.lth.se [130.235.48.11], as pub/groff/mm.Z +at ftp://ftp.efd.lth.se/pub/groff/mm.gz +or ftp://ftp.axis.se/pub/groff/mm.gz You can install mgm as a separate package without the configure in groff with the following command: diff --git a/gnu/usr.bin/groff/mm/groff_mm.7_in b/gnu/usr.bin/groff/mm/groff_mm.7_in new file mode 100644 index 00000000000..cef92f10a31 --- /dev/null +++ b/gnu/usr.bin/groff/mm/groff_mm.7_in @@ -0,0 +1,1876 @@ +.\" +.\" $Id: groff_mm.7_in,v 1.1 2000/04/09 08:25:18 millert Exp $ +.\" +.de T2 +.ne 2v +.ti -.5i +\\$1 +.sp -1 +.. +.de T3 +.ne 2v +.ti -.5i +\fB\\$1\fP +.br +.. +.TH GROFF_MM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_mm \- groff mm macros +.SH SYNOPSIS +.B groff +.B \-m@TMAC_M@ +[ +.IR options .\|.\|. +] +[ +.IR files .\|.\|. +] +.SH DESCRIPTION +The groff mm macros are intended to be compatible with the DWB mm macros +with the following limitations: +.TP +.B \(bu +no Bell Labs localisms implemented. +.TP +.B \(bu +the macros OK and PM is not implemented. +.TP +.B \(bu +groff mm does not support cut marks +.LP +\fBm@TMAC_M@\fP is intended to be international. Therefore it is +possible to write short national macrofiles which change all +english text to the preferred language. Use \fBm@TMAC_M@se\fP as an example. +.\"######################################################################## +.LP +A file called \fBlocale\fP or \fIlang\fP\fB_locale\fP is read +after the initiation of the global variables. It is therefore +possible to localize the macros with companyname and so on. +.sp +In this manual square brackets is used to show optional arguments. +.sp 3 +\fBNumber registers and strings\fP +.br +Many macros can be controlled by number registers and strings. +A number register is assigned with the \fBnr\fP command: +.br +\fB\&.nr\fP \fIXXX\fP \fI[+-]n [i]\fP +.br +\fBXXX\fP is the name of the register, \fBn\fP is the value to +be assigned, and \fBi\fP is increment value for auto-increment. +\fBn\fP can have a plus or minus sign as prefix if an increment +or decrement of the current value is wanted. (Auto-increment or decrement +occurs if the number register is used with a plus or minus sign, +\fB\en+[XXX]\fP or \fB\en-[XXX]\fP.) +.sp +Strings is defined with \fBds\fP. +.br +\fB\&.ds\fP \fIYYY string\fP +.br +The string is assigned everything to the end of the line, even blanks. +Initial blanks in \fIstring\fP should be prefixed with +a double-quote. (Strings are used in the text as \fB\e*[YYY]\fP.) +.sp +\fBSpecial formatting of number registers\fP +A number register is printed with normal digits if no format has been +given. +Set the format with \fBaf\fP: +.br +\fB\&.af\fP \fIR c\fP +.br +\fIR\fP is the name of the register, \fIc\fP is the format. +.in +.5i +.T2 \fBForm\fP +\fBSequence\fP +.T2 1 +0, 1, 2, 3, ... +.T2 001 +000, 001, 002, 003, ... +.T2 i +0, i, ii, iii, iv, ... +.T2 I +0, I, II, III, IV, ... +.T2 a +0, a, b, c, ..., z, aa, ab, ... +.T2 A +0, A, B, C, ..., Z, AA, AB, ... +.in + +.LP +\fBMacros:\fP +.TP +.B ")E level text" +Adds \fBtext\fP (heading-text) to the table of contents +with \fBlevel\fP either 0 +or between 1-7. See also \fB.H\fP. This macro is used for customized +table of contents. +.TP +.B "1C [1]" +Begin one column processing. An \fB1\fP as argument disables the page-break. +Use wide footnotes, small footnotes may be overprinted. +.TP +.B 2C +Begin two column processing. Splits the page in two columns. It is +a special case of \fBMC\fP. See also \fB1C\fP. +.TP +.B AE +Abstract end, see \fBAS\fP. +.TP +.B "AF [name of firm]" +Authors firm, should be called before \fBAU\fP, see also \fBCOVER\fP. +.TP +.B "AL [type [text-indent [1]]]]" +Start autoincrement list. Items are numbered beginning on one. +The \fItype\fP argument controls the type of numbers. +.in +.5i +.T2 Arg +Description +.T2 1 +Arabic (the default) +.T2 A +Upper-case letters (A-Z) +.T2 a +Lower-case letters (a-z) +.T2 I +Upper-case roman +.T2 i +Lower-case roman +.in +\fIText-indent\fP sets the indent and overrides \fBLi\fP. +A third argument will prohibit printing of a blank line before each +item. +.TP +.B "APP name text" +Begin an appendix with name \fIname\fP. Automatic naming occurs if +\fIname\fP is "". The appendixes starts with \fBA\fP if auto is used. +An new page is ejected, and a header is also produced if the number +variable \fBAph\fP is non-zero. This is the default. +The appendix always appear in the 'List of contents' with correct +pagenumber. The name \fIAPPENDIX\fP can be changed by setting +the string \fBApp\fP to the desired text. +The string \fBApptxt\fP contains the current appendix text. +.TP +.B "APPSK name pages text" +Same as \fB.APP\fP, but the pagenr is incremented with \fIpages\fP. +This is used when diagrams or other non-formatted documents are +included as appendixes. +.TP +.B "AS [arg [indent]]" +Abstract start. Indent is specified in 'ens', but scaling is allowed. +Argument \fIarg\fP controls where the abstract is printed. +.in +.5i +.T2 Arg +Placement +.T2 0 +Abstract will be printed on page 1 and on the cover sheet if +used in the released-paper style (\fBMT 4\fP), otherwise +it will be printed on page 1 without a cover sheet. +.T2 1 +Abstract will only be printed on the cover sheet (\fBMT 4\fP only). +.T2 2 +Abstract will be printed only on the cover sheet (other than \fBMT 4\fP only). +The cover sheet is printed without need for \fBCS\fP. +.in +Abstract is not printed at all in external letters (\fBMT 5\fP). +The \fIindent\fP controls the indentation of both margins, otherwise +will normal text indent be used. +.TP +.B "AST [title]" +Abstract title. Default is \fBABSTRACT\fP. +Sets the text above the abstract text. +.TP +.B "AT title1 [title2 ...]" +Authors title. \fBAT\fP must appear just after each \fBAU\fP. +The title will show up after the name in the signature block. +.TP +.B "AU [name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]]" +Author information, specifies the author of the memo or paper, and +will be printed on the cover sheet and on other similar places. +\fBAU\fP must appear before \fBTL\fP. The author information +can contain intials, location, department, telephone extension, +room number or name and up to three extra arguments. +.TP +.B "AV [name [1]]" +Approval signature, generates an approval line with place for +signature and date. The string \fBAPPROVED:\fP can be changed +with variable \fBLetapp\fP, and the string \fBDate\fP in \fBLetdate\fP. +.TP +.B "AVL [name]" +Letter signature, generates a line with place for signature. +.TP +.B "B [bold-text [prev-font-tex [bold...]]]" +Begin boldface +No limit on the number of arguments. +All arguments will be concatenated to one word, the first, third and so +on will be printed in boldface. +.TP +.B B1 +Begin box (as the ms macro) +Draws a box around the text. The text will be indented one character, +and the right margin will be one character shorter. +.TP +.B B2 +End box. Finish the box started by \fBB1\fP. +.TP +.B BE +End bottom block, see \fBBS\fP. +.TP +.B "BI [bold-text [italic-text [bold-text [...]]]" +Bold-italic. +No limit on the number of arguments, see \fBB\fP. +.TP +.B "BL [text-indent [1]]" +Start bullet list, initialize a list with a bullet and a space +in the beginning of each list item (see \fBLI\fP). +\fIText-indent\fP +overrides the default indentation of the list items set by +number register \fBPi\fP. +A third argument will prohibit printing of a blank line before each +item. +.TP +.B "BR [bold-text [roman-text [bold-text [...]]]" +Bold-roman. +No limit on the number of arguments. +.TP +.B BS +Bottom block start. Begins the definition of a text block wich is +printed at the bottom of each page. Block ends with \fBBE\fP. +.TP +.B BVL +Start of +broken variable-item list. +Broken variable-item list has no fixed mark, it assumes that +every \fBLI\fP has a mark instead. +The text will always begin at the next line after the mark. +\fIText-indent\fP sets the indent to the text, and \fImark-indent\fP +the distance from the current indent to the mark. +A third argument will prohibit printing of a blank line before each +item. +.TP +.B "COVER [arg]" +\&\fBCOVER\fP begins a coversheet definition. It is important +that \fB.COVER\fP appears before any normal text. +\&\fB.COVER\fP uses \fIarg\fP to build the filename +@TMAC_MDIR@/\fIarg\fP.cov. Therefore it is possible to create unlimited +types of coversheets. +\fIms.cov\fP is supposed to look like the \fBms\fP coversheet. +\&\fB.COVER\fP requires a \fB.COVEND\fP at the end of the coverdefinition. +Always use this order of the covermacros: +.nf +\&.COVER +\&.TL +\&.AF +\&.AU +\&.AT +\&.AS +\&.AE +\&.COVEND +.fi +However, only \fB.TL\fP and \fB.AU\fP are required. +.TP +.B COVEND +This finish the cover description and prints the cover-page. +It is defined in the cover file. +.TP +.B DE +Display end. Ends a block of text, display, that begins +with \fBDS\fP or \fBDF\fP. +.TP +.B "DF [format [fill [rindent]]]" +Begin floating display (no nesting allowed). +A floating display is saved in a queue and is printed in the +order entered. \fIFormat\fP, \fIfill\fP and \fIrindent\fP is the same +as in \fBDS\fP. +Floating displays are controlled by the two number registers \fBDe\fP +and \fBDf\fP. +.sp +\fBDe register\fP +.in +.5i +.T2 0 +Nothing special, this is the default. +.T2 1 +A page eject will occur after each printed display, giving only +one display per page and no text following it. +.in +.sp +\fBDf register\fP +.in +.5i +.T2 0 +Displays are printed at the end of each section (when section-page +numbering is active) or at the end of the document. +.T2 1 +A new display will be printed on the current page is there is enough +space, otherwise it will be printed at the end of the document. +.T2 2 +One display will be printed at the top of each page or column +(in multi-column mode). +.T2 3 +Print one display if there is enough space for it, otherwise it will +be printed at the top of the next page or column. +.T2 4 +Print as many displays that will fit in a new page or column. +A page break will occur between each display if \fBDe\fP is not zero. +.T2 5 +Fill the current page with displays and the rest beginning at a new page +or column. (This is the default.) +A page break will occur between each display +if \fBDe\fP is not zero. +.in +.TP +.B "DL [text-indent [1]]" +Dash list start. Begins a list where each item is printed +after a dash. \fIText-indent\fP changes the default indentation +of the list items set by +number register \fBPi\fP. +A third argument will prohibit printing of a blank line before each +item. +A second argument prevents the empty line between each list item +to be printed. See \fBLI\fP. +.TP +.B "DS [format [fill [rindent]]]" +Static display start. +Begins collection of text until \fBDE\fP. +The text is printed together on the same page, unless it is longer +than the height of the page. +\fBDS\fP can be nested to a unlimited depth (reasonably :-). +.sp +\fBformat\fP +.in +.5i +.ds x " +.T2 """""" +No indentation. +.T2 none +No indentation. +.T2 L +No indentation. +.T2 I +Indent text with the value of number register \fBSi\fP. +.T2 C +Center each line +.T2 CB +Center the whole display as a block. +.T2 R +Right adjust the lines. +.T2 RB +Right adjust the whole display as a block +.in +.sp +L, I, C and CB can also be specified as 0, 1, 2 or 3 for compatibility +reasons. (Don't use it. :-) +.sp +\fBfill\fP +.in +.5i +.T2 """""" +Line-filling turned off. +.T2 none +Line-filling turned off. +.T2 N +Line-filling turned off. +.T2 F +Line-filling turned on. +.in +.sp +N and F can also be specified as 0 or 1. +An empty line will normally be printed before and after the +display. Setting number register \fBDs\fP to 0 will prevent this. +\fIRindent\fP shortens the line length by that amount. +.TP +.B "EC [title [override [flag [refname]]]]" +Equation title. +Sets a title for an equation. The \fIoverride\fP argument +change the numbering. +.sp +\fBflag\fP +.in +.5i +.T2 none +\fIoverride\fP is a prefix to the number. +.T2 0 +\fIoverride\fP is a prefix to the number. +.T2 1 +\fIoverride\fP is a suffix to the number. +.T2 2 +\fIoverride\fP replaces the number. +.in +\fBEC\fP uses the number register \fBEc\fP as counter. +It is possible to use \fB.af\fP to change the format of the number. +If number register \fBOf\fP is 1, then the format of title +will use a dash instead of a dot after the number. +.br +The string \fBLe\fP controls the title of the +List of Equations, default is \fILIST OF EQUATIONS\fP. +The List of Equations will only be printed if number register \fBLe\fP +is 1, default 0. +The string \fBLiec\fP contains the word \fIEquation\fP, wich +is printed before the number. +If \fIrefname\fP is used, then the equation number is saved with +\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +.br +Special handling of the title will occur if +\fBEC\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. +.TP +.B "EF [arg]" +Even-page footer, printed just above the normal page footer +on even pages, see \fBPF\fP. +.TP +.B "EH [arg]" +Even-page header, printed just below the normal page header +on even pages, see \fBPH\fP. +.TP +.B EN +Equation end, see \fBEQ\fP. +.TP +.B EOP +End of page user-defined macro. This macro will be called +instead of the normal printing of the footer. The macro +will be executed in a separate environment, without any +trap active. See \fBTP\fP. +.sp +\fBStrings available to EOP\fP +.in +.5i +.T2 EOPf +Argument from \fBPF\fP. +.T2 EOPef +Argument from \fBEF\fP. +.T2 EOPof +Argument from \fBOF\fP. +.in +.TP +.B "EPIC width height [name]" +\fBEPIC\fP draws a box with the given \fIwidth\fP and \fIheight\fP, it will +also print the text \fIname\fP or a default string if +\fIname\fP is not specified.. +This is used to include external pictures, just give the size +of the picture. +See \fBPIC\fP +.TP +.B "EQ [label]" +Equation start. +\fBEQ\fP/\fBEN\fP are the delimiters for equations written for \fBeqn\fP. +\fBEQ\fP/\fBEN\fP must be inside a \fBDS\fP/\fBDE\fP-pair, except +when \fBEQ\fP is only used to set options in \fBeqn\fP. +The \fIlabel\fP will appear at the right margin of the equation, unless +number register \fBEq\fP is 1. Then the label will appear at the +left margin. +.TP +.B "EX [title [override [flag [refname]]]]" +Exhibit title, arguments are the same as for \fBEC\fP. +\fBEX\fP uses the number register \fBEx\fP as counter. +The string \fBLx\fP controls the title of the +List of Exhibits, default is \fILIST OF EXHIBITS\fP. +The List of Exhibits will only be printed if number register \fBLx\fP +is 1, default 1. +The string \fBLiex\fP contains the word \fIExhibit\fP, wich +is printed before the number. +If \fIrefname\fP is used, then the exhibit number is saved with +\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +.br +Special handling of the title will occur if +\fBEX\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. +.TP +.B "FC [closing]" +Prints \fIYours\ very\ truly,\fP as a formal closing of a letter or +memorandum. The argument replaces the defualt string. +The default is stored in string variable \fBLetfc\fP. +.TP +.B "FD [arg [1]]" +Footnote default format. +Controls the hyphenation (hyphen), right margin justification (adjust), +indentation of footnote text (indent). It can also change the label +justification (ljust). +.sp +.ne 14v +.nf +.ta .5i +.8i +.8i +.8i +.8i +\fBarg hyphen adjust indent ljust\fP +0 no yes yes left +1 yes yes yes left +2 no no yes left +3 yes no yes left +4 no yes no left +5 yes yes no left +6 no no no left +7 yes no no left +8 no yes yes right +9 yes yes yes right +10 no no yes right +11 yes no yes right +.sp +.fi +.DT +Argument greater than or equal to 11 is considered as arg 0. +Default for m@TMAC_M@m is 10. +.TP +.B FE +Footnote end. +.TP +.B "FG [title [override [flag [refname]]]]" +Figure title, arguments are the same as for \fBEC\fP. +\fBFG\fP uses the number register \fBFg\fP as counter. +The string \fBLf\fP controls the title of the +List of Figures, default is \fILIST OF FIGURES\fP. +The List of Figures will only be printed if number register \fBLf\fP +is 1, default 1. +The string \fBLifg\fP contains the word \fIFigure\fP, wich +is printed before the number. +If \fIrefname\fP is used, then the figure number is saved with +\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +.br +Special handling of the title will occur if +\fBFG\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. +.TP +.B "FS [label]" +Footnote start. +The footnote is ended by \fBFE\fP. Footnotes is normally automatically +numbered, the number is available in string \fBF\fP. +Just add \fB\e*F\fP in the text. By adding \fIlabel\fP, it is possible +to have other number or names on the footnotes. +Footnotes in displays is now possible. +An empty line separates footnotes, the height of the line +is controlled by number register \fBFs\fP, default value is 1. +.TP +.B "GETHN refname [varname]" +Includes the headernumber where the corresponding \fBSETR\fP \fIrefname\fP +was placed. Will be X.X.X. in pass 1. See \fBINITR\fP. +If varname is used, \fBGETHN\fP sets the stringvariable \fIvarname\fP to the +headernumber. +.TP +.B "GETPN refname [varname]" +Includes the pagenumber where the corresponding \fBSETR\fP \fIrefname\fP +was placed. Will be 9999 in pass 1. See \fBINITR\fP. +If varname is used, \fBGETPN\fP sets the stringvariable \fIvarname\fP +to the pagenumber. +.TP +.B "GETR refname" +Combines \fBGETHN\fP and \fBGETPN\fP with the text 'chapter' and ', page'. +The string \fIQrf\fP contains the text for reference: +.ti +.5i +\&.ds Qrf See chapter \e\e*[Qrfh], page \e\e*[Qrfp]. +.br +\fIQrf\fP may be changed to support other languages. +Strings \fIQrfh\fP and \fIQrfp\fP are set by \fBGETR\fP +and contains the page and headernumber. +.TP +.B "GETST refname [varname]" +Includes the string saved with the second argument to \fB.SETR\fP. +Will be dummystring in pass 1. +If varname is used, \fBGETST\fP sets the stringvariable \fIvarname\fP to the +saved string. See \fBINITR\fP. +.TP +.B "H level [heading-text [heading-suffix]]" +Numbered section heading. +Section headers can have a level between 1 and 7, level 1 is the +top level. The text is given in \fIheading-text\fP, and must be +surrounded by double quotes if it contains spaces. +\fBHeading-suffix\fP is added to the header in the text but not in +the table of contents. This is normally used for footnote marks +and similar things. Don't use \fB\e*F\fP in \fIheading-suffix\fP, it won't +work. A manual label must be used, see \fBFS\fP. +.sp +An eventual paragraph, \fBP\fP, directly after \fBH\fP will be +ignored, \fBH\fP is taking care of spacing and indentation. +.sp +\fBPage ejection before heading\fP +.br +Number register \fBEj\fP controls page ejection before the heading. +Normally, a level one heading gets two blank lines before it, higher levels +gets only one. A new page is ejected before each +first-level heading if number register \fBEj\fP is 1. +All levels below or equal the value of \fBEj\fP gets a new page. +Default value for \fBEj\fP is 0. +.sp +\fBHeading break level\fP +.br +A line break occurs after the heading if the heading level is less +or equal to number register \fBHb\fP. +Default value 2. +.sp +\fBHeading space level\fP +.br +A blank line is inserted after the heading if the heading level is less +or equal to number register \fBHs\fP. +Default value 2. +.sp +Text will follow the heading on the same line if the level is greater +than both \fBHb\fP and \fBHs\fP. +.sp +\fBPost-heading indent\fP +.br +Indentation of the text after the heading is controlled by number +register \fBHi\fP, default value 0. +\fBHi\fP +.in +.5i +.T2 0 +The text will be left-justified. +.T2 1 +Indentation of the text will follow the value of number register \fBPt\fP, +see \fBP\fP. +.T2 2 +The text will be lined up with the first word of the heading. +.in +.sp +\fBCentered section headings\fP +.br +All headings whose level is equal or below number register \fBHc\fP +and also less than or equal to \fBHb\fP or \fBHs\fP +is centerered. +.sp +\fBFont control of the heading\fP +.br +The font of each heading level is controlled by string \fBHF\fP. +It contains a fontnumber or fontnam for each level. Default +is \fB2\ 2\ 2\ 2\ 2\ 2\ 2\fP (all headings in italic). +Could also be written as \fBI\ I\ I\ I\ I\ I\ I\fP. +All omitted values are presumed to be a 1. +.sp +\fBPoint size control\fP. +.br +String \fBHP\fP controls the pointsize of each heading, in the +same way as \fBHF\fP controls the font. +A value of 0 selects the default point size. +Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\fP. Beware that only the +point size changes, not the vertical size. +That can be controlled by the user specified macro \fBHX\fP and/or +\fBHZ\fP. +.sp +\fBHeading counters\fP +.br +Seven number registers, named \fBH1\fP thru \fBH7\fP contains +the counter for each heading level. +The values are printed using arabic numerals, this can be changed +with the macro \fBHM\fP (see below). +All marks ar concatenated before printing. To avoid this, set +number register \fBHt\fP to 1. That will only print the current +heading counter at each heading. +.sp +\fBAutomatic table of contents\fP +.br +All headings whose level is equal or below number register \fBCl\fP +is saved to be printed in the table of contents. Default value is 2. +.sp +\fBSpecial control of the heading, user-defined macros\fP. +.br +These macros can be defined by the user to get a finer control +of vertical spacing, fonts or other features. +Argument \fIlevel\fP is the level-argument to \fBH\fP, but +0 for unnumbered headings (see \fBHU\fP). +Argument \fIrlevel\fP is the real level, it is +set to number register \fBHu\fP for unnumbered headings. +Argument \fIheading-text\fP is the text argument to \fBH\fP and \fBHU\fP. +.sp +\fBHX\ \fP\fIlevel\ rlevel\ heading-text\fP +.br +\fBHX\fP is called just before the printing of the heading. +The following register is available for \fBHX\fP. +\fBHX\fP may alter \fB}0\fP, \fB}2\fP and \fB;3\fP. +.in +.5i +.T3 "string }0" +Contains the heading mark plus two spaces if \fIrlevel\fP is non-zero, +otherwise empty. +.T3 "register ;0" +Contains the position of the text after the heading. +0 means that the text should follow the heading on the same line, 1 +means that a line break should occur before the text and +2 means that a blank line should separate the heading and the text. +.T3 "string }2" +Contains two spaces if register \fB;0\fP is 0. It is used to +separate the heading from the text. The string +is empty if \fB;0\fP is non-zero. +.T3 "register ;3" +Contains the needed space in units after the heading. +Default is 2v. + +Can be used to change things like numbering (\fB}0\fP), +vertical spacing (\fB}2\fP) +and the needed space after the heading. +.in +.sp +\fBHY\ \fP\fIdlevel\ rlevel\ heading-text\fP +.br +\fBHY\fP is called after size and font calculations and +might be used to change indentation. +.sp +\fBHZ\ \fP\fIdlevel\ rlevel\ heading-text\fP +\fBHZ\fP is called after the printing of the heading, just before +\fBH\fP or \fBHU\fP exits. +Could be used to change the page header according to the section heading. +.TP +.B "HC [hyphenation-character]" +Set hyphenation character. +Default value is \e%. +Resets to the default if called without argument. +Hyphenation can be turned by setting number +register \fBHy\fP to 0 in the beginning of the file. +.TP +.B "HM [arg1 [arg2 [... [arg7]]]]" +Heading mark style. +Controls the type of marking for printing of the heading counters. +Default is 1 for all levels. +.sp +\fBArgument\fP +.in +.5i +.T2 1 +Arabic numerals. +.T2 0001 +Arabic numerals with leading zeroes, one or more. +.T2 A +Upper-case alphabetic +.T2 a +Lower-case alphabetic +.T2 I +Upper-case roman numerals +.T2 i +lower-case roman numerals +.T2 \fIempty\fP +Arabic numerals. +.in +.TP +.B "HU heading-text" +Unnumbered section header. +\fBHU\fP behavies like \fBH\fP at the level in number register \fBHu\fP. +See \fBH\fP. +.TP +.B "HX dlevel rlevel heading-text" +Userdefined heading exit. +Called just before printing the header. +See \fBH\fP. +.TP +.B "HY dlevel rlevel heading-text" +Userdefined heading exit. +Called just before printing the header. +See \fBH\fP. +.TP +.B "HZ dlevel rlevel heading-text" +Userdefined heading exit. +Called just after printing the header. +See \fBH\fP. +.TP +.B "I [italic-text [prev-font-text [italic-text [...]]]" +Italic. +Changes the font to italic if called without arguments. +With one argument it will set the word in italic. +With two argument it will concatenate them and set the first +word in italic and the second in the previous font. +There is no limit on the number of argument, all will be concatenated. +.TP +.B "IA [addressee-name [title]] +Begins specification of the addressee and addressee's address in +letter style. +Several names can be specified with empty \fBIA\fP/\fBIE\fP-pairs, but +only one address. +See \fBLT\fP. +.TP +.B "IB [italic-text [bold-text [italic-text [...]]]" +Italic-bold +Even arguments is printed in italic, odd in boldface. +See \fBI\fP. +.TP +.B IE +Ends the address-specification after \fPIA\fP. +.TP +.B "INITI filename [type]" +Initialize the new index system, sets the filename to collect +index lines in with \fBIND\fP. Argument \fItype\fP selects +teh type of index, page number, header marks or both. +The default is \fIN\fP. +.sp +\fBtype\fP +.in +.5i +.T2 N +Page numbers +.T2 H +Header marks +.T2 B +Both page numbers and header marks, tab separated +.in +.TP +.B "IND arg1 [arg2 [...]]" +\fBIND\fP writes a line in the index file selected by \fBINITI\fP +with all arguments and the page number or header mark separated by tabs. +.in +.5i +\fBExamples\fP +.br +arg1\etpage number +.br +arg1\etarg2\etpage number +.br +arg1\etheader mark +.br +arg1\etpage number\etheader mark +.in +.TP +.B "INDP" +\fBINDP\fP prints the index by running the command specified +by string variable \fBIndcmd\fP, normally \fIsort\ -t\et\fP. +\fBINDP\fP reads the output from the command to form +the index, normally in two columns (can be changed by defining \fBTYIND\fP). +The index is printed with string variable \fBIndex\fP as header, +default is \fBINDEX\fP. One-column processing is +returned after the list. \fBINDP\fP will call the +user-defined macros \fBTXIND\fP, \fBTYIND\fP and \fBTZIND\fP if defined. +\fBTXIND\fP is called before printing \fBINDEX\fP, \fBTYIND\fP +is called instead of printing \fBINDEX\fP. \fBTZIND\fP is called +after the printing and should take care of restoring to normal +operation again. + +.TP +.B "INITR filename" +Initialize the refencemacros. References will be written to +\fIfilename.tmp\fP and \fIfilename.qrf\fP. Requires two passes with groff. +The first looks for references and the second includes them. +\fBINITR\fP can be used several times, but it is only the first +occurrence of \fBINITR\fP that is active. +Option \fB-U\fP might be needed if \fBunsafe\fP-errors occur. +See also \fBSETR\fP, \fBGETPN\fP and \fBGETHN\fP. +.TP +.B "IR [italic-text [roman-text [italic-text [...]]]" +Italic-roman +Even arguments is printed in italic, odd in roman. +See \fBI\fP. +.TP +.B "LB text-indent mark-indent pad type [mark [LI-space [LB-space]]]" +List begin macro. +This is the common macro used for all lists. +\fIText-indent\fP is the number of spaces to indent the text from the +current indent. +.sp +\fIPad\fP and \fImark-indent\fP controls where to put the mark. +The mark is placed within the mark area, and \fImark-indent\fP +sets the number of spaces before this area. It is normally 0. +The mark area ends where the text begins. The start of the text +is still controlled by \fItext-indent\fP. +.sp +The mark is left justified whitin the mark area if \fIpad\fP is 0. +If \fIpad\fP is greater than 0, then \fImark-indent\fP is ignored, and +the mark is placed \fIpad\fP spaces before the text. +This will right justify the mark. +.sp +If \fItype\fP is 0 the list will have either a hanging indent or, if +argument \fImark\fP is given, the string \fImark\fP as mark. +.sp +If \fItype\fP is greater than 0 automatic numbering will occur, arabic +if \fImark\fP is empty. \fIMark\fP can then be any of \fB1\fP, \fBA\fP, +\fBa\fP, \fBI\fP or \fBi\fP. +.sp +\fIType\fP selects one of six possible ways to display the mark. +.br +\fBtype\fP +.in +.6i +.T2 1 +x. +.T2 2 +x) +.T2 3 +(x) +.T2 4 +[x] +.T2 5 + +.T2 6 +{x} +.in +.sp +Every item in the list will get \fILI-space\fP number of blank lines +before them. Default is 1. +.sp +\fBLB\fP itself will print \fILB-space\fP blank lines. Default is 0. +.TP +.B "LC [list-level]" +List-status clear +Terminates all current active lists down to \fIlist-level\fP, or 0 +if no argmuent is given. This is used by \fBH\fP to clear any +active list. +.TP +.B "LE [1]" +List end. +Terminate the current list. \fBLE\fP outputs a blank line +if an argument is given. +.TP +.B "LI [mark [1]]" +List item precedes every item in a list. Without argument \fBLS\fP +will print the mark determined by the current list type. By giving +\fBLI\fP one argument, it will use that as the mark instead. +Two arguments to \fBLI\fP will make \fImark\fP a prefix to +the current mark. +There will be no separating space between the prefix +and the mark if the second argument is \fB2\fP instead of \fB1\fP. +This behaviour can also be achieved by setting number register +\fBLimsp\fP to zero. +A zero length \fImark\fP will make a hanging +indent instead. +.sp +A blank line is normally printed before the list item. This behaviour +can be controlled by number register \fBLs\fP. Pre-spacing +will occur for each list-level less than or equal to \fBLs\fP. +Default value is 99. (Nesting of lists is unlimited. :-) +.sp +The indentation can be changed thru number register \fBLi\fP. +Default is 6. +.sp +All lists begins with a list initialization macro, \fBLB\fP. +There are, however, seven predefined listtypes to +make lists easier to use. They all call \fBLB\fP with different +default values. +.in +.5i +.T2 \fBAL\fP +Automatically Incremented List +.T2 \fBML\fP +Marked List +.T2 \fBVL\fP +Variable-Item List +.T2 \fBBL\fP +Bullet List +.T2 \fBDL\fP +Dash List +.T2 \fBRL\fP +Reference List +.T2 \fBBVL\fP +Broken Varable List. +.in +These lists are described at other places in this manual. See also \fBLB\fP. +.TP +.B "LT [arg]" +Formats a letter in one of four different styles depending +on the argument. +See also \fBINTERNALS\fP. +.in +.5i +.T2 \fBArg +Style\fP +.T2 BL +Blocked. Date line, return address, writer's address and closing +begins at the center of the line. All other lines begins at the left margin. +.T2 SB +Semi-blocked. Same as blocked, except that the first line in every +paragraph is indented five spaces. +.T2 FB +Full-blocked. All lines begin at the left margin. +.T2 SP +Simplified. Almost the same as the full-blocked style. Subject and +the writer'sidentification is printed in all-capital. +.in +.TP +.B "LO type [arg]" +Specify options in letter (see \fB.LT\fP). +This is a list of the standard options: +.in +.5i +.T2 CN +Confidential notation. Prints \fBRESTRICTED\fP on the second line +below the date line. Any argument replaces \fBRESTRICTED\fP. +See also string variable \fBLetCN\fP. +.T2 RN +Reference notation. Prints \fBIn reference to:\fP and the argument +two lines below the date line. +See also string variable \fBLetRN\fP. +.T2 AT +Attention. Prints \fBATTENTION:\fP and the argument below the inside address. +See also string variable \fBLetAT\fP. +.T2 SA +Salutation. Prints \fBTo Whom It May Concern:\fP or the argument if +it was present. The salutation is printed two lines below the inside address. +See also string variable \fBLetSA\fP. +.T2 SJ +Subject line. Prints the argument as subject prefixed with \fBSUBJECT:\fP +two lines below the inside address, except in letter type \fBSP\fP. +Then the subject is printed in all-captial without any prefix. +See also string variable \fBLetSJ\fP. +.in +.TP +.B "MC column-size [column-separation] " +Begin multiple columns. Return to normal with \fB1C\fP. +\fBMC\fP will create as many columns as the current line length permits. +\fIColumn-size\fP is the width of each column, and \fIcolumn-separation\fP +is the space between two columns. Default separation is the +column-size/15. +See also \fB1C\fP. +.TP +.B "ML mark [text-indent [1]]" +Marked list start. The \fImark\fP argument will be printed before +each list item. +\fIText-indent\fP sets the indent and overrides \fBLi\fP. +A third argument will prohibit printing of a blank line before each +item. +.TP +.B "MT [arg [addressee]]" +Memorandum type. +The \fIarg\fP is part of a filename in \fI@TMAC_MDIR@/*.MT\fP. +Memorandum type 0 thru 5 are supported, including \fI"string"\fP. +\fIAddresse\fP just sets a variable, used in the AT&T macros. +.br +\fBarg\fP +.in +.5i +.T2 0 +Normal memorandum, no type printed +.T2 1 +Memorandum with \fIMEMORANDUM FOR FILE\fP printed +.T2 2 +Memorandum with \fIPROGRAMMER'S NOTES\fP printed +.T2 3 +Memorandum with \fIENGINEER'S NOTES\fP printed +.T2 4 +Released paper style +.T2 5 +External letter style +.in +See also \fBCOVER\fP/\fBCOVEND\fP, a more flexible type of front page. +.TP +.B "MOVE y-pos [x-pos [line-length]]" +Move to a position, pageoffset set to \fIx-pos\fP. +If \fIline-length\fP is not given, the difference between +current and new pageoffset is used. +Use \fBPGFORM\fP without arguments to return to normal. +.TP +.B "MULB cw1 space1 [cw2 space2 [cw3 ...]]" +Begin a special multi-column mode. Every columns width must be specified. +Also the space between the columns must be specified. The last column +does not need any space-definition. MULB starts a diversion and MULE +ends the diversion and prints the columns. +The unit for width and space is 'n', but MULB accepts all +normal unitspecifications like 'c' and 'i'. +MULB operates in a separate environment. +.TP +.B "MULN" +Begin the next column. This is the only way to switch column. +.TP +.B "MULE" +End the multi-column mode and print the columns. +.TP +.B "nP [type]" +Print numbered paragraph with header level two. Se \fB.P\fP. +.TP +.B "NS [arg [1]]" +Prints different types of notations. The argument selects between +the predefined type of notations. If the second argument is available, +then the argument becomes the entire notation. +If the argument doesn't exist in the predefined, it will be +printed as \fBCopy (\fP\fIarg\fP\fB) to\fP. +It is possible to add more standard notations, see the string variable +\fBLetns\fP and \fBLetnsdef\fP. +.nf +.in +.5i +.T2 \fBArg +Notation\fP +.T2 \fInone\fP +Copy To +.T2 """"" +Copy To +.T2 1 +Copy To (with att.) to +.T2 2 +Copy To (without att.) to +.T2 3 +Att. +.T2 4 +Atts. +.T2 5 +Enc. +.T2 6 +Encs. +.T2 7 +Under separate cover +.T2 8 +Letter to +.T2 9 +Memorandum to +.T2 10 +Copy (with atts.) to +.T2 11 +Copy (without atts.) to +.T2 12 +Abstract Only to +.T2 13 +Complete Memorandum to +.T2 14 +CC +.in +.fi +.TP +.B "ND new-date" +New date. Override the current date. Date is not +printed if \fInew-date\fP is an empty string. +.TP +.B "OF [arg]" +Odd-page footer, a line printed just above the normal footer. +See \fBEF\fP and \fBPF\fP. +.TP +.B "OH [arg]" +Odd-page header, a line printed just below the normal header. +See \fBEH\fP and \fBPH\fP. +.TP +.B OP +Make sure that the following text is printed at the top +of an odd-numbered page. Will not output an empty page +if currently at the top of an odd page. +.TP +.B "P [type]" +Begin new paragraph. +\fBP\fP without argument will produce left justified text, even +the first line of the paragraph. This is the same as setting +\fItype\fP to 0. If the argument is 1, then the first line +of text following \fBP\fP will be indented by the number of +spaces in number register \fBPi\fP, normally 5. +.sp +Instead of giving 1 as argument to \fBP\fP it is possible to set the +paragraph type in number register \fBPt\fP. Using 0 and 1 +will be the same as adding that value to \fBP\fP. +A value of 2 will indent all paragraphs, except after +headings, lists and displays. +.sp +The space between two paragraphs is controlled by number register \fBPs\fP, +and is 1 by default (one blank line). +.TP +.B "PGFORM [linelength [pagelength [pageoffset [1]]]]" +Sets linelength, pagelength and/or pageoffset. +This macro can be used for special formatting, like letterheads +and other. +It is normally the first command in a file, though it's not necessary. +\fBPGFORM\fP can be used without arguments +to reset everything after a \fBMOVE\fP. +A line-break is done unless the fourth argument is given. +This can be used to avoid the pagenumber on the first page while setting +new width and length. +(It seems as if this macro sometimes doesn't work too well. +Use the command line arguments +to change linelength, pagelength and pageoffset instead. Sorry.) +.TP +.B PGNH +No header is printed on the next page. Used to get rid off +the header in letters or other special texts +This macro must be used before any text to inhibit the pageheader +on the first page. +.TP +.B PIC [-L] [-C] [-R] [-I n] filename [width [height]] +\fBPIC\fP includes a Postscript file in the document. +The macro depends on \fBmgm_ref\fP and \fBINITR\fP. +\fB-L\fP, \fB-C\fP, \fB-R\fP and \fB-I n\fP adjusts the picture +or indents it. The optionally \fIwidth\fP and \fIheight\fP +can also be given to resize the picture. +.TP +.B PE +Picture end. +Ends a picture for \fB@TMAC_M@pic\fP, see the manual for \fB@TMAC_M@pic\fP. +.TP +.B "PF [arg]" +Page footer. +\fBPF\fP sets the line to be printed at the bottom of each page. +Normally empty. See \fBPH\fP for the argument specification. +.TP +.B "PH [arg]" +Page header, a line printed at the top of each page. +The argument should be specified as "'left-part'center-part'right-part'", +where left-, center- and right-part is printed left-justified, centered +and right justified. The character \fB%\fP is changed to the current +page number. The default page-header is "''- % -''", the page +number between two dashes. +.TP +.B PS +Picture start (from pic). Begins a picture for \fB@TMAC@pic\fP, see +the manual. +.TP +.B PX +Page-header user-defined exit. +\fBPX\fP is called just after the printing of the page header +in \fIno-space\fP mode. +.TP +.B R +Roman. +Return to roman font, see also \fBI\fP. +.TP +.B "RB [roman-text [bold-text [roman-text [...]]]" +Roman-bold. +Even arguments is printed in roman, odd in boldface. +See \fBI\fP. +.TP +.B "RD [prompt [diversion [string]]]" +Read from standard input to diversion and/or string. +The text will be saved in a diversion named \fIdiversion\fP. +Recall the text by writing the name of the diversion after a dot +on an empty line. A string will also be defined if +\fIstring\fP is given. \fIDiversion\fP and/or \fIprompt\fP can +be empty (""). +.TP +.B RF +Reference end. Ends a reference definition and returns to normal +processing. See \fBRS\fP. +.TP +.B "RI [roman-text [italic-text [roman-text [...]]]" +Even arguments is printed in roman, odd in italic. +See \fBI\fP. +.TP +.B "RL [text-indent [1]]" +Reference list start +Begins a list where each item is preceded with a automatically +incremented number between +square brackets. +\fIText-indent\fP changes the default indentation +.TP +.B "RP [arg1 [arg2]]" +Produce reference page. +\fBRP\fP can be used if a reference page is wanted somewhere in the +document. It is not needed if \fBTC\fP is used to produce +a table of content. The reference page will then be printed automatically. +.sp +The reference counter will not be resetted if \fIarg1\fP is 1. +.sp +\fIArg2\fP tells \fBRP\fP whether to eject a page or not. +.br +\fBArg2\fP +.in +.5i +.T2 0 +The reference page will be printed on a separate page. +This is +the default. +.T2 1 +Do not eject page after the list. +.T2 2 +Do not eject page before the list. +.T2 3 +Do not eject page before and after the list. +.in +The reference items will be separated by a blank line. +Setting number register \fBLs\fP to 0 will suppress the line. +.sp +The string \fBRp\fP contains the reference page title and +is normally set to \fIREFERENCES\fP. +.TP +.B "RS [string-name]" +\fBRS\fP begins an automatically numbered reference definition. +Put the string \fB\e*(Rf\fP where the reference mark +should be and write the reference between \fBRS\fP/\fBRF\fP +at next new line after the reference mark. The reference number +is stored in number register \fB:R\fP. +If \fIstring-name\fP is given, a string with that name +will be defined and contain the current reference mark. +The string can be referenced as \fB\e*[\fIstring-name\fP]\fP later in +the text. +.TP +.B "S [size [spacing]]" +Set point size and vertical spacing. If any argument is equal 'P', then +the previous value is used. A 'C' means current value, and 'D' default value. +If '+' or '-' is used before the value, then increment or decrement of +the current value will be done. +.TP +.B "SA [arg]" +Set right-margin justification. +Justification is normally turned on. +No argumenent or \fB0\fP turns off justification, a \fB1\fP turns on +justification. +.TP +.B "SETR refname [string]" +Remember the current header and page-number as refname. +Saves \fIstring\fP if \fIstring\fP is defined. \fIstring\fP is retrieved +with \fB.GETST\fP. +See \fBINITR\fP. +.TP +.B "SG [arg [1]]" +Signature line. Prints the authors name(s) after the formal closing. +The argument will be appended to the reference data, printed +at either the first or last author. The reference data is the location, +department and initials specified with \fB.AU\fP. +It will be printed at the first author, otherwise at the last. +No reference data will be printed if the author(s) is specifed +thru \fB.WA\fP/\fB.WE\fP. +See \fBLetter internals\fP. +.TP +.B "SK [pages]" +Skip pages. +If \fIpages\fP is \fB0\fP or omitted, a skip to the next page +will occur unless it is already at the top of a page. +Otherwise it will skip \fIpages\fP pages. +.TP +.B "SM string1 [string2 [string3]]" +Make a string smaller. +If \fIstring2\fP is given, \fIstring1\fP will be smaller and \fIstring2\fP +normal, concatenated with \fIstring1\fP. With three argument, all is +concatenated, but only \fIstring2\fP is made smaller. +.TP +.B "SP [lines]" +Space vertically. \fIlines\fP can have any scalingfactor, like \fI3i\fP or +\fI8v\fP. Several \fBSP\fP in a line will only produce the +maximum number of lines, not the sum. \fBSP\fP will also be ignored +until the first textline in a page. Add a \fB\e&\fP before \fBSP\fP +to avoid this. +.TP +.B TAB +reset tabs to every 5n. Normally used to reset any previous tabpositions. +.TP +.B "TB [title [override [flag [refname]]]]" +Table title, arguments are the same as for \fBEC\fP. +\fBTB\fP uses the number register \fBTb\fP as counter. +The string \fBLt\fP controls the title of the +List of Tables, default is \fILIST OF TABLES\fP. +The List of Tables will only be printed if number register \fBLt\fP +is 1, default 1. +The string \fBLitb\fP contains the word \fITABLE\fP, wich +is printed before the number. +.br +Special handling of the title will occur if +\fBTB\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. +.TP +.B "TC [slevel [spacing [tlevel [tab [h1 [h2 [h3 [h4 [h5]]]]]]]]]" +Table of contents. +This macro is normally used at the last line of the document. +It generates a table of contents with headings up to the level +controlled by number register \fBCl\fP. Note that \fBCl\fP controls +the saving of headings, it has nothing to do with \fBTC\fP. +Headings with level less than or equal to \fIslevel\fP will get +\fIspacing\fP number of lines before them. +Headings with level less than or equal to \fItlevel\fP will have +their page numbers right justified with dots or spaces separating +the text and the page number. Spaces is used if \fItab\fP +is greater than zero, otherwise dots. +Other headings will have the +page number directly at the end of the heading text (\fIragged right\fP). +.sp +The rest of the arguments will be printed, centered, before the +table of contents. +.sp +The user-defined macros \fBTX\fP and \fBTY\fP are used if \fBTC\fP is called +with at most four arguments. \fBTX\fP is called before the printing +of \fICONTENTS\fP, and \fBTY\fP is called instead of printing \fICONTENTS\fP. +.sp +Equivalent macros can be defined for list of figures, tables, equations +and excibits by defining \fBTXxx\fP or \fBTYxx\fP, where \fBxx\fP +is \fBFg\fP, \fBTB\fP, \fBEC\fP or \fBEX\fP. +.sp +String \fBCi\fP can be set to control the indentations for each heading-level. +It must be scaled, like \fB.ds\ Ci\ .25i\ .5i\ .75i\ 1i\ 1i\fP. +The indentation is normally controlled by the maxlength of headings +in each level. +.sp +All texts can be redefined, new stringvariables +\fILifg\fP, \fILitb\fP, \fILiex\fP, \fILiec\fP and \fILicon\fP contains +"Figure", "TABLE", "Exhibit", "Equation" and "CONTENTS". +These can be redefined to other languages. +.TP +.B TE +Table end. See \fBTS\fP. +.TP +.B "TH [N]" +Table header. See \fBTS\fP. +\fBTH\fP ends the header of the table. This header will +be printed again if a page-break occurs. +Argument \fIN\fP isn't implemented yet. +.TP +.B TL [charging-case number(s) [filing-case number(s)] +Begin title of memorandum. +All text up to the next \fBAU\fP is included in the title. +\fICharging-case number\fP and \fIfiling-case\fP is saved +for use in the front page processing. +.TP +.B TM [num1 [num2 [...]]] +Technical memorandumnumbers used in \fB.MT\fP. Unlimited number +of arguments may be given. +.TP +.B TP +Top of page user-defined macro. +This macro is called instead of the normal page header. It is +possible to get complete control over the header. +Note that header and footer is printed in a separate environment. +Linelength is preserved though. +.TP +.B "TS [H]" +Table start. This is the start of a table specification +to \fB@TMAC@tbl\fP. See separate manual for \fB@TMAC@tbl\fP. +\fBTS\fP ends with \fBTE\fP. +Argument \fIH\fP tells \fBm@TMAC@m\fP that the table +has a header. See \fBTH\fP. +.TP +.B TX +Userdefined table of contents exit. +This macro is called just before \fBTC\fP prints the word \fICONTENTS\fP. +See \fBTC\fP. +.TP +.B TY +Userdefined table of contents exit (no "CONTENTS"). +This macro is called instead of printing \fICONTENTS\fP. +See \fBTC\fP. +.TP +.B 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. +\fIflag\fP control several special features. +It contains the sum of all wanted features. +.in +.5i +.T2 Value +Description +.T2 1 +Disable the escape-character (\e). This is normally turned on during +verbose output. +.T2 2 +Add en empty line before the verbose text. +.T2 4 +Add en empty line after the verbose text. +.T2 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 \fBVerbnm\fP. It contains all arguments to the +\fBtroff\fP-command \fB.nm\fP, normally '1'. +.T2 16 +Indent the verbose text with five 'n':s. This is controlled by the +number-variable \fBVerbin\fP (in units). +.in +.TP +.B VERBOFF +End verbatim output. +.TP +.B "VL text-indent [mark-indent [1]]" +Variable-item list has no fixed mark, it assumes that +every \fBLI\fP have a mark instead. +\fIText-indent\fP sets the indent to the text, and \fImark-indent\fP +the distance from the current indent to the mark. +A third argument will prohibit printing of a blank line before each +item. +.TP +.B "VM [top [bottom]]" +Vertical margin. +.TP +.B "WA [writer-name [title]] +Begins specification of the writer and writer's address. +Several names can be specified with empty \fBWA\fP/\fBWE\fP-pairs, but +only one address. +.TP +.B WE +Ends the address-specification after \fP.WA\fP. +.TP +.B "WC [format]" +Footnote and display width control. +.in +.5i +.T2 N +Set default mode, \fB-WF\fP, \fB-FF\fP, \fB-WD\fP and \fBFB\fP. +.T2 WF +Wide footnotes, wide also in two-column mode. +.T2 -WF +Normal footnote width, follow column mode. +.T2 FF +All footnotes gets the same width as the first footnote encountered. +.T2 -FF +Normal footnotes, width follows \fBWF\fP and \fB-WF\fP. +.T2 WD +Wide displays, wide also in two-column mode. +.T2 -WD +Normal display width, follow column mode. +.T2 FB +Floating displays generates a line break when printed on the current page. +.T2 -FB +Floating displays does not generate line break. +.in +.sp 3 +.LP +.\"######################################################################## +.LP +.B "Strings used in m@TMAC_M@:" +.TP +.B App +A string containing the word "APPENDIX". +.TP +.B Apptxt +.TP +The current appendix text. +.B "EM" +Em dash string +.TP +.B H1txt +Will be updated by \fB.H\fP and \fB.HU\fP to the current heading text. +Also updated in table of contents & friends. +.TP +.B HF +Fontlist for headings, normally "2 2 2 2 2 2 2". +Nonnumeric fontnames may also be used. +.TP +.B HP +Pointsize list for headings. Normally "0 0 0 0 0 0 0" which is the same as +"10 10 10 10 10 10 10". +.TP +.B Index +.TP +Contains \fIINDEX\fP. +.B Indcmd +.TP +Contains the index command, \fIsort\ -t\et\fP. +.B Lifg +String containing \fIFigure\fP. +.TP +.B Litb +String containing \fITABLE\fP. +.TP +.B Liex +String containing \fIExhibit\fP. +.TP +.B Liec +String containing \fIEquation\fP. +.TP +.B Licon +String containing \fICONTENTS\fP. +.TP +.B Lf +Contains "LIST OF FIGURES". +.TP +.B Lt +Contains "LIST OF TABLES". +.TP +.B Lx +Contains "LIST OF EXHIBITS". +.TP +.B Le +Contains "LIST OF EQUATIONS". +.TP +.B Letfc +Contains "Yours very truly,", used in \fB.FC\fP. +.TP +.B Letapp +Contains "APPROVED:", used in \fB.AV.\fP. +.TP +.B Letdate +Contains "Date", used in \fB.AV.\fP. +.TP +.B LetCN +Contains "CONFIDENTIAL", used in \fB.LO CN\fP. +.TP +.B LetSA +Contains "To Whom It May Concern:", used in \fB.LO SA\fP. +.TP +.B LetAT +Contains "ATTENTION:", used in \fB.LO AT\fP. +.TP +.B LetSJ +Contains "SUBJECT:", used in \fB.LO SJ\fP. +.TP +.B LetRN +Contains "In reference to:", used in \fB.LO RN\fP. +.TP +.B Letns +is an array containing the different strings used in \fB.NS\fP. +It is really a number of stringvariables prefixed with \fBLetns!\fP. +If the argument doesn't exist, it will be included +between \fB()\fP with \fBLetns!copy\fP as prefix and \fBLetns!to\fP as suffix. +Observe the space after \fBcopy\fP and before \fBto\fP. +.nf +.ta 1.5i +\fBName Value\fP +Letns!0 Copy to +Letns!1 Copy (with att.) to +Letns!2 Copy (without att.) to +Letns!3 Att. +Letns!4 Atts. +Letns!5 Enc. +Letns!6 Encs. +Letns!7 Under separate cover +Letns!8 Letter to +Letns!9 Memorandum to +Letns!10 Copy (with atts.) to +Letns!11 Copy (without atts.) to +Letns!12 Abstract Only to +Letns!13 Complete Memorandum to +Letns!14 CC +Letns!copy Copy " +Letns!to " to +.fi +.TP +.B Letnsdef +Defines the standard-notation used when no argument is given +to \fB.NS\fP. Default is \fB0\fP. +.TP +.B "MO1 - MO12" +Strings containing \fIJanuary\fP thru \fIDecember\fP. +.TP +.B Qrf +String containing "See chapter \e\e*[Qrfh], page \e\en[Qrfp].". +.TP +.B Rp +Contains "REFERENCES". +.TP +.B Tcst +Contains current status of table of contents and list of XXXX. +Empty outside \fB.TC\fP. +Useful in user-defined macros like \fB.TP\fP. +.nf +.ta 1.5i +\fBValue Meaning\fP +co Table of contents +fg List of figures +tb List of tables +ec List of equations +ex List of exhibits +ap Appendix +.fi +.ta +.TP +.B Tm +Contains \e(tm, trade mark. +.TP +.B Verbnm +Argument to \fB.nm\fP in \fB.VERBON\fP, default: \fB1\fP. +.\"----------------------------------- +.LP +.B "Number variables used in m@TMAC_M@:" +.TP +.B Aph +Print an appendix-page for every new appendix +if this numbervariable is non-zero. +No output will occur if \fBAph\fP is zero, but there will always +be an appendix-entry in the 'List of contents'. +.TP +.B Cl +Contents level [0:7], contents saved if heading level <= Cl, default 2. +.TP +.B Cp +Eject page between LIST OF XXXX if Cp == 0, default 0. +.TP +.B D +Debugflag, values >0 produces varying degree of debug. A value of 1 +gives information about the progress of formatting, default 0. +.TP +.B De +Eject after floating display is output [0:1], default 0. +.TP +.B Dsp +Controls the space output before and after static displays +if defined. Otherwise is the value of Lsp used. +.TP +.B Df +Floating keep output [0:5], default 5. +.TP +.B Ds +\fBLsp\fP space before and after display if == 1 [0:1], default 1. +.TP +.B Ej +Eject page, default 0. +.TP +.B Eq +Equation lable adjust 0=left, 1=right. Default 0. +.TP +.B Fs +Footnote spacing, default 1. +.TP +.B "H1-H7" +Heading counters +.TP +.B H1dot +Append a dot after the level one heading number if > 0. Default is 1. +.TP +.B H1h +.TP +Copy of number register \fBH1\fP, but it is incremented +just before the page break. Useful in user defined header macros. +.B Hb +Heading break level [0:7], default 2. +.TP +.B Hc +Heading centering level, [0:7]. Default 0. +.TP +.B Hi +Heading temporary indent [0:2], default 1. +.br +0\ ->\ 0 indent, left margin +.br +1\ ->\ indent to right , like .P 1 +.br +2\ ->\ indent to line up with text part of preceding heading +.TP +.B Hps +Numbervariable with the heading pre-space level. If the heading-level +is less than or equal to \fBHps\fP, then two lines will precede the +section heading instead of one. Default is first level only. +The real amount of lines is controlled by the variables \fBHps1\fP and +\fBHps2\fP. +.TP +.B Hps1 +This is the number of lines preceding \fB.H\fP when the heading-level +is greater than \fBHps\fP. Value is in units, normally 0.5. +.TP +.B Hps2 +This is the number of lines preceding \fB.H\fP when the heading-level +is less than or equal to \fBHps\fP. Value is in units, normally 1. +.TP +.B Hs +Heading space level [0:7], default 2. +.TP +.B Hss +This is the number of lines that follows \fB.H\fP when the heading-level +is less than or equal to \fBHs\fP. Value is in units, normally 1. +.TP +.B Ht +Heading numbering type, default 0. +0 -> multiple (1.1.1 ...) +.br +1 -> single +.TP +.B Hu +Unnumbered heading level, default 2. +.TP +.B Hy +Hyphenation in body, default 1. +.br +0\ ->\ no hyphenation +.br +1\ ->\ hyphenation 14 on +.TP +.B Letwam +Max lines in return-address, used in \fB.WA\fP/\fB.WE\fP. Default 14. +.TP +.B "Lf, Lt, Lx, Le" +Enables (1) or disables (0) the printing of List of figures, +List of tables, List of exhibits and List of equations. +Default: Lf=1, Lt=1, Lx=1, Le=0. +.TP +.B Li +List indent, used by .AL, default 6. +.TP +.B Limsp +Flag for space between prefix and mark in automatic lists (.AL). +.br +0\ ==\ no space +.br +1\ ==\ space +.TP +.B Ls +List space, if current listlevel > Ls then no spacing will occur around lists. +Default 99. +.TP +.B Lsp +.TP +The size of an empty line. Normally 0.5v, but it is 1v +if \fBn\fP is set (\fB.nroff\fP). +.TP +.B N +Numbering style [0:5], default 0. +.br +0\ ==\ (default) normal header for all pages. +.br +1\ ==\ header replaces footer on first page, header is empty. +.br +2\ ==\ page header is removed on the first page. +.br +3\ ==\ "section-page" numbering enabled. +.br +4\ ==\ page header is removed on the first page. +.br +5\ ==\ "section-page" and "section-figure" numbering enabled. +Se also the number-register Sectf and Sectp. +.TP +.B Np +Numbered paragraphs, default 0. +.br +0\ ==\ not numbered +.br +1\ ==\ numbered in first level headings. +.TP +.B Of +Format of figure,table,exhibit,equation titles, default 0. +.br +0\ =\ ". " +.br +1\ =\ " - " +.TP +.B P +Current page-number, normally the same as % unless "section-page" numbering +is enabled. +.TP +.B Pi +paragraph indent, default 5. +.TP +.B Pgps +Controls whether header and footer pointsize should follow the current +setting or just change when the header and footer is defined. +.in +.5i +.ti -.5i +.T2 Value +Description +.T2 0 +Pointsize will only change to the current setting when \fB.PH\fP, \fB.PF\fP, +\&\fB.OH\fP, \fP.EH\fP, \fB.OF\fP or \fB.OE\fP is executed. +.T2 1 +Pointsize will change after every \fB.S\fP. This is the default. +.in +.TP +.B Ps +paragraph spacing, default 1. +.TP +.B Pt +Paragraph type, default 0. +.br +0\ ==\ left-justified +.br +1\ ==\ indented .P +.br +2\ ==\ indented .P except after .H, .DE or .LE. +.TP +.B Sectf +Flag controlling "section-figures". A non-zero value enables this. +Se also register N. +.TP +.B Sectp +Flag controlling "section-page-numbers". A non-zero value enables this. +Se also register N. +.TP +.B Si +Display indent, default 5. +.TP +.B Verbin +Indent for \fB.VERBON\fP, default 5n. +.TP +.B .mgm +Always 1. +.LP +.SH INTERNALS +The letter macros is using different submacros depending on +the letter type. The name of the submacro has the letter type +as suffix. It is therefore possible to define other letter types, either +in the national macro-file, or as local additions. +\&\fB.LT\fP will set the number variables \fBPt\fP and \fBPi\fP to 5 and 0. +The following strings and macros must be defined for a new letter type: +.TP +\fBlet@init_\fP\fItype\fP +This macro is called directly by \fB.LT\fP. It is supposed to initialize +variables and other stuff. +.TP +\fBlet@head_\fP\fItype\fP +This macro prints the letter head, and is called instead of the +normal page header. It is supposed to remove the alias \fBlet@header\fP, +otherwise it will be called for all pages. +.TP +\fBlet@sg_\fP\fItype\ name\ title\ n\ flag\ [arg1\ [arg2\ [...]]]\fP +\&\fB.SG\fP is calling this macro only for letters, memorandums has +its own processing. \fIname\fP and \fItitle\fP is specified +thru \fB.WA\fP/\fB.WB\fP. \fIn\fP is the counter, 1-max, and +\fIflag\fP is true for the last name. Any other argument to \fB.SG\fP +is appended. +.TP +\fBlet@fc_\fP\fItype\ closing\fP +This macro is called by \fB.FC\fP, and has the +formal closing as argument. +.LP +\&\fB.LO\fP is implemented as a general option-macro. \fB.LO\fP demands +that a string named \fBLet\fP\fItype\fP is defined, where \fItype\fP +is the letter type. +\&\fB.LO\fP will then assign the argument to the string +variable \fBlet*lo-\fP\fItype\fP. +.LP +.\".SH BUGS +.SH AUTHOR +Jörgen Hägg, Lund, Sweden . +.SH FILES +.TP +.B @MACRODIR@/tmac.@TMAC_M@ +.TP +.B @TMAC_MDIR@/*.cov +.TP +.B @TMAC_MDIR@/*.MT +.TP +.B @TMAC_MDIR@/locale +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@tbl (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@) +.br +.BR mm (@MAN7EXT@) +.BR m@TMAC_M@se (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/mm/groff_mm.man b/gnu/usr.bin/groff/mm/groff_mm.man deleted file mode 100644 index c2fa055cf24..00000000000 --- a/gnu/usr.bin/groff/mm/groff_mm.man +++ /dev/null @@ -1,1732 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1991-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" $Id: groff_mm.man,v 1.3 1998/01/19 00:40:12 etheisen Exp $ -.\" -.de T2 -.ne 2v -.ti -.5i -\\$1 -.sp -1 -.. -.de T3 -.ne 2v -.ti -.5i -\fB\\$1\fP -.br -.. -.TH GROFF_MM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_mm \- groff mm macros -.SH SYNOPSIS -.B groff -.B \-m@TMAC_M_PREFIX@m -[ -.IR options .\|.\|. -] -[ -.IR files .\|.\|. -] -.SH DESCRIPTION -The groff mm macros are intended to be compatible with the DWB mm macros -with the following limitations: -.TP -.B \(bu -no Bell Labs localisms implemented. -.TP -.B \(bu -the macros OK and PM is not implemented. -.TP -.B \(bu -groff mm does not support cut marks -.LP -\fBm@TMAC_M_PREFIX@m\fP is intended to be international. Therefore it is -possible to write short national macrofiles which change all -english text to the preferred language. Use \fBm@TMAC_M_PREFIX@mse\fP as an example. -.LP -New macros: \fBAPP\fP, \fBAPPSK\fP, \fBB1\fP, \fBB2\fP, \fBBVL\fP, -\fBCOVER\fP, \fBCOVEND\fP, \fBGETHN\fP, \fBGETPN\fP, \fBGETR\fP, -\fBGETST\fP, \fBINITR\fP, \fBMC\fP, \fBMOVE\fP, \fBMULB\fP, -\fBMULN\fP, \fBMULE\fP, \fBPGFORM\fP, \fBPGNH\fP, \fBSETR\fP, -\fBTAB\fP, \fBVERBON\fP, \fBVERBOFF\fP. -.LP -.\"######################################################################## -.LP -A file called \fBlocale\fP or \fIlang\fP\fB_locale\fP is read -after the initiation of the global variables. It is therefore -possible to localize the macros with companyname and so on. -.sp -In this manual square brackets is used to show optional arguments. -.sp 3 -\fBNumber registers and strings\fP -.br -Many macros can be controlled by number registers and strings. -A number register is assigned with the \fBnr\fP command: -.br -\fB\&.nr\fP \fIXXX\fP \fI[+-]n [i]\fP -.br -\fBXXX\fP is the name of the register, \fBn\fP is the value to -be assigned, and \fBi\fP is increment value for auto-increment. -\fBn\fP can have a plus or minus sign as prefix if an increment -or decrement of the current value is wanted. (Auto-increment or decrement -occurs if the number register is used with a plus or minus sign, -\fB\en+[XXX]\fP or \fB\en-[XXX]\fP.) -.sp -Strings is defined with \fBds\fP. -.br -\fB\&.ds\fP \fIYYY string\fP -.br -The string is assigned everything to the end of the line, even blanks. -Initial blanks in \fIstring\fP should be prefixed with -a double-quote. (Strings are used in the text as \fB\e*[YYY]\fP.) -.sp -\fBSpecial formatting of number registers\fP -A number register is printed with normal digits if no format has been -given. -Set the format with \fBaf\fP: -.br -\fB\&.af\fP \fIR c\fP -.br -\fIR\fP is the name of the register, \fIc\fP is the format. -.in +.5i -.T2 \fBForm\fP -\fBSequence\fP -.T2 1 -0, 1, 2, 3, ... -.T2 001 -000, 001, 002, 003, ... -.T2 i -0, i, ii, iii, iv, ... -.T2 I -0, I, II, III, IV, ... -.T2 a -0, a, b, c, ..., z, aa, ab, ... -.T2 A -0, A, B, C, ..., Z, AA, AB, ... -.in - -.LP -\fBMacros:\fP -.TP -.B "1C [1]" -Begin one column processing. An \fB1\fP as argument disables the page-break. -Use wide footnotes, small footnotes may be overprinted. -.TP -.B 2C -Begin two column processing. Splits the page in two columns. It is -a special case of \fBMC\fP. See also \fB1C\fP. -.TP -.B AE -Abstract end, see \fBAS\fP. -.TP -.B "AF [name of firm]" -Authors firm, should be called before \fBAU\fP, see also \fBCOVER\fP. -.TP -.B "AL [type [text-indent [1]]]]" -Start autoincrement list. Items are numbered beginning on one. -The \fItype\fP argument controls the type of numbers. -.in +.5i -.T2 Arg -Description -.T2 1 -Arabic (the default) -.T2 A -Upper-case letters (A-Z) -.T2 a -Lower-case letters (a-z) -.T2 I -Upper-case roman -.T2 i -Lower-case roman -.in -\fIText-indent\fP sets the indent and overrides \fBLi\fP. -A third argument will prohibit printing of a blank line before each -item. -.TP -.B "APP name text" -Begin an appendix with name \fIname\fP. Automatic naming occurs if -\fIname\fP is "". The appendixes starts with \fBA\fP if auto is used. -An new page is ejected, and a header is also produced if the number -variable \fBAph\fP is non-zero. This is the default. -The appendix always appear in the 'List of contents' with correct -pagenumber. The name \fIAPPENDIX\fP can be changed by setting -the string \fBApp\fP to the desired text. -.TP -.B "APPSK name pages text" -Same as \fB.APP\fP, but the pagenr is incremented with \fIpages\fP. -This is used when diagrams or other non-formatted documents are -included as appendixes. -.TP -.B "AS [arg [indent]]" -Abstract start. Indent is specified in 'ens', but scaling is allowed. -Argument \fIarg\fP controls where the abstract is printed. -.in +.5i -.T2 Arg -Placement -.T2 0 -Abstract will be printed on page 1 and con the cover sheet if -used in the released-paper style (\fBMT 4\fP), otherwise -it will be printed on page 1 without a cover sheet. -.T2 1 -Abstract will only be printed on page 1 (\fBMT 4\fP only). -.T2 2 -Abstract will be printed only on the cover sheet. The cover sheet -is printed without need for \fBCS\fP. -.in -Abstract is not printed at all in external letters (\fBMT 5\fP). -The \fIindent\fP controls the indentation of both margins, otherwise -will normal text indent be used. -.TP -.B "AST [title]" -Abstract title. Default is \fBABSTRACT\fP. -Sets the text above the abstract text. -.TP -.B "AT title1 [title2 ...]" -Authors title. \fBAT\fP must appear just after each \fBAU\fP. -The title will show up after the name in the signature block. -.TP -.B "AU name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]" -Author information, specifies the author of the memo or paper, and -will be printed on the cover sheet and on other similar places. -\fBAU\fP must appear before \fBTL\fP. The author information -can contain intials, location, department, telephone extension, -room number or name and up to three extra arguments. -.TP -.B "AV [name [1]]" -Approval signature, generates an approval line with place for -signature and date. The string \fBAPPROVED:\fP can be changed -with variable \fBLetapp\fP, and the string \fBDate\fP in \fBLetdate\fP. -.TP -.B "B [bold-text [prev-font-tex [bold...]]]" -Begin boldface -No limit on the number of arguments. -All arguments will be concatenated to one word, the first, third and so -on will be printed in boldface. -.TP -.B B1 -Begin box (as the ms macro) -Draws a box around the text. The text will be indented one character, -and the right margin will be one character shorter. -.TP -.B B2 -End box. Finish the box started by \fBB1\fP. -.TP -.B BE -End bottom block, see \fBBS\fP. -.TP -.B "BI [bold-text [italic-text [bold-text [...]]]" -Bold-italic. -No limit on the number of arguments, see \fBB\fP. -.TP -.B "BL [text-indent [1]]" -Start bullet list, initialize a list with a bullet and a space -in the beginning of each list item (see \fBLI\fP). -\fIText-indent\fP -overrides the default indentation of the list items set by -number register \fBPi\fP. -A third argument will prohibit printing of a blank line before each -item. -.TP -.B "BR [bold-text [roman-text [bold-text [...]]]" -Bold-roman. -No limit on the number of arguments. -.TP -.B BS -Bottom block start. Begins the definition of a text block wich is -printed at the bottom of each page. Block ends with \fBBE\fP. -.TP -.B BVL -Start of -broken variable-item list. -Broken variable-item list has no fixed mark, it assumes that -every \fBLI\fP has a mark instead. -The text will always begin at the next line after the mark. -\fIText-indent\fP sets the indent to the text, and \fImark-indent\fP -the distance from the current indent to the mark. -A third argument will prohibit printing of a blank line before each -item. -.TP -.B "COVER [arg]" -\&\fBCOVER\fP begins a coversheet definition. It is important -that \fB.COVER\fP appears before any normal text. -\&\fB.COVER\fP uses \fIarg\fP to build the filename -@TMAC_MDIR@/\fIarg\fP.cov. Therefore it is possible to create unlimited -types of coversheets. -\fIms.cov\fP is supposed to look like the \fBms\fP coversheet. -\&\fB.COVER\fP requires a \fB.COVEND\fP at the end of the coverdefinition. -Always use this order of the covermacros: -.nf -\&.COVER -\&.TL -\&.AF -\&.AU -\&.AT -\&.AS -\&.AE -\&.COVEND -.fi -However, only \fB.TL\fP and \fB.AU\fP are required. -.TP -.B COVEND -This finish the cover description and prints the cover-page. -It is defined in the cover file. -.TP -.B DE -Display end. Ends a block of text, display, that begins -with \fBDS\fP or \fBDF\fP. -.TP -.B "DF [format [fill [rindent]]]" -Begin floating display (no nesting allowed). -A floating display is saved in a queue and is printed in the -order entered. \fIFormat\fP, \fIfill\fP and \fIrindent\fP is the same -as in \fBDS\fP. -Floating displays are controlled by the two number registers \fBDe\fP -and \fBDf\fP. -.sp -\fBDe register\fP -.in +.5i -.T2 0 -Nothing special, this is the default. -.T2 1 -A page eject will occur after each printed display, giving only -one display per page and no text following it. -.in -.sp -\fBDf register\fP -.in +.5i -.T2 0 -Displays are printed at the end of each section (when section-page -numbering is active) or at the end of the document. -.T2 1 -A new display will be printed on the current page is there is enough -space, otherwise it will be printed at the end of the document. -.T2 2 -One display will be printed at the top of each page or column -(in multi-column mode). -.T2 3 -Print one display if there is enough space for it, otherwise it will -be printed at the top of the next page or column. -.T2 4 -Print as many displays that will fit in a new page or column. -A page break will occur between each display if \fBDe\fP is not zero. -.T2 5 -Fill the current page with displays and the rest beginning at a new page -or column. (This is the default.) -A page break will occur between each display -if \fBDe\fP is not zero. -.in -.TP -.B "DL [text-indent [1]]" -Dash list start. Begins a list where each item is printed -after a dash. \fIText-indent\fP changes the default indentation -of the list items set by -number register \fBPi\fP. -A third argument will prohibit printing of a blank line before each -item. -A second argument prevents the empty line between each list item -to be printed. See \fBLI\fP. -.TP -.B "DS [format [fill [rindent]]]" -Static display start. -Begins collection of text until \fBDE\fP. -The text is printed together on the same page, unless it is longer -than the height of the page. -\fBDS\fP can be nested to a unlimited depth (reasonably :-). -.sp -\fBformat\fP -.in +.5i -.ds x " -.T2 """""" -No indentation. -.T2 none -No indentation. -.T2 L -No indentation. -.T2 I -Indent text with the value of number register \fBSi\fP. -.T2 C -Center each line -.T2 CB -Center the whole display as a block. -.T2 R -Right adjust the lines. -.T2 RB -Right adjust the whole display as a block -.in -.sp -L, I, C and CB can also be specified as 0, 1, 2 or 3 for compatibility -reasons. (Don't use it. :-) -.sp -\fBfill\fP -.in +.5i -.T2 """""" -Line-filling turned off. -.T2 none -Line-filling turned off. -.T2 N -Line-filling turned off. -.T2 F -Line-filling turned on. -.in -.sp -N and F can also be specified as 0 or 1. -An empty line will normally be printed before and after the -display. Setting number register \fBDs\fP to 0 will prevent this. -\fIRindent\fP shortens the line length by that amount. -.TP -.B "EC [title [override [flag [refname]]]]" -Equation title. -Sets a title for an equation. The \fIoverride\fP argument -change the numbering. -.sp -\fBflag\fP -.in +.5i -.T2 none -\fIoverride\fP is a prefix to the number. -.T2 0 -\fIoverride\fP is a prefix to the number. -.T2 1 -\fIoverride\fP is a suffix to the number. -.T2 2 -\fIoverride\fP replaces the number. -.in -\fBEC\fP uses the number register \fBEc\fP as counter. -It is possible to use \fB.af\fP to change the format of the number. -If number register \fBOf\fP is 1, then the format of title -will use a dash instead of a dot after the number. -The string \fBLe\fP controls the title of the -List of Equations, default is \fILIST OF EQUATIONS\fP. -The string \fBLiec\fP contains the word \fIEquation\fP, wich -is printed before the number. -If \fIrefname\fP is used, then the equationnumber is saved with -\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. -.TP -.B "EF [arg]" -Even-page footer, printed just above the normal page footer -on even pages, see \fBPF\fP. -.TP -.B "EH [arg]" -Even-page header, printed just below the normal page header -on even pages, see \fBPH\fP. -.TP -.B EN -Equation end, see \fBEQ\fP. -.TP -.B EOP -End of page user-defined macro. This macro will be called -instead of the normal printing of the footer. The macro -will be executed in a separate environment, without any -trap active. See \fBTP\fP. -.sp -\fBStrings available to EOP\fP -.in +.5i -.T2 EOPf -Argument from \fBPF\fP. -.T2 EOPef -Argument from \fBEF\fP. -.T2 EOPof -Argument from \fBOF\fP. -.in -.TP -.B "EQ [label]" -Equation start. -\fBEQ\fP/\fBEN\fP are the delimiters for equations written for \fBeqn\fP. -\fBEQ\fP/\fBEN\fP must be inside a \fBDS\fP/\fBDE\fP-pair, except -when \fBEQ\fP is only used to set options in \fBeqn\fP. -The \fIlabel\fP will appear at the right margin of the equation, unless -number register \fBEq\fP is 1. Then the label will appear at the -left margin. -.TP -.B "EX [title [override [flag [refname]]]]" -Exhibit title, arguments are the same as for \fBEC\fP -\fBEX\fP uses the number register \fBEx\fP as counter. -The string \fBLx\fP controls the title of the -List of Exhibits, default is \fILIST OF EXHIBITS\fP. -The string \fBLiex\fP contains the word \fIExhibit\fP, wich -is printed before the number. -If \fIrefname\fP is used, then the exhibitnumber is saved with -\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. -.TP -.B "FC [closing]" -Prints \fIYours\ very\ truly,\fP as a formal closing of a letter or -memorandum. The argument replaces the defualt string. -The default is stored in string variable \fBLetfc\fP. -.TP -.B "FD [arg [1]]" -Footnote default format. -Controls the hyphenation (hyphen), right margin justification (adjust), -indentation of footnote text (indent). It can also change the label -justification (ljust). -.sp -.ne 14v -.nf -.ta .5i +.8i +.8i +.8i +.8i -\fBarg hyphen adjust indent ljust\fP -0 no yes yes left -1 yes yes yes left -2 no no yes left -3 yes no yes left -4 no yes no left -5 yes yes no left -6 no no no left -7 yes no no left -8 no yes yes right -9 yes yes yes right -10 no no yes right -11 yes no yes right -.sp -.fi -.DT -Argument greater than or equal to 11 is considered as arg 0. -Default for m@TMAC_M_PREFIX@mm is 10. -.TP -.B FE -Footnote end. -.TP -.B "FG [title [override [flag [refname]]]]" -Figure title. -If \fIrefname\fP is used, then the figurenumber is saved with -\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. -.TP -.B "FS [label]" -Footnote start. -The footnote is ended by \fBFE\fP. Footnotes is normally automatically -numbered, the number is available in string \fBF\fP. -Just add \fB\e*F\fP in the text. By adding \fIlabel\fP, it is possible -to have other number or names on the footnotes. -Footnotes in displays is now possible. -An empty line separates footnotes, the height of the line -is controlled by number register \fBFs\fP, default value is 1. -.TP -.B "GETHN refname [varname]" -Includes the headernumber where the corresponding \fBSETR\fP \fIrefname\fP -was placed. Will be X.X.X. in pass 1. See \fBINITR\fP. -If varname is used, \fBGETHN\fP sets the stringvariable \fIvarname\fP to the -headernumber. -.TP -.B "GETPN refname [varname]" -Includes the pagenumber where the corresponding \fBSETR\fP \fIrefname\fP -was placed. Will be 9999 in pass 1. See \fBINITR\fP. -If varname is used, \fBGETPN\fP sets the stringvariable \fIvarname\fP -to the pagenumber. -.TP -.B "GETR refname" -Combines \fBGETHN\fP and \fBGETPN\fP with the text 'chapter' and ', page'. -The string \fIQrf\fP contains the text for reference: -.ti +.5i -\&.ds Qrf See chapter \e\e*[Qrfh], page \e\e*[Qrfp]. -.br -\fIQrf\fP may be changed to support other languages. -Strings \fIQrfh\fP and \fIQrfp\fP are set by \fBGETR\fP -and contains the page and headernumber. -.TP -.B "GETST refname [varname]" -Includes the string saved with the second argument to \fB.SETR\fP. -Will be dummystring in pass 1. -If varname is used, \fBGETST\fP sets the stringvariable \fIvarname\fP to the -saved string. See \fBINITR\fP. -.TP -.B "H level [heading-text [heading-suffix]]" -Numbered section heading. -Section headers can have a level between 1 and 7, level 1 is the -top level. The text is given in \fIheading-text\fP, and must be -surrounded by double quotes if it contains spaces. -\fBHeading-suffix\fP is added to the header in the text but not in -the table of contents. This is normally used for footnote marks -and similar things. Don't use \fB\e*F\fP in \fIheading-suffix\fP, it won't -work. A manual label must be used, see \fBFS\fP. -.sp -An eventual paragraph, \fBP\fP, directly after \fBH\fP will be -ignored, \fBH\fP is taking care of spacing and indentation. -.sp -\fBPage ejection before heading\fP -.br -Number register \fBEj\fP controls page ejection before the heading. -Normally, a level one heading gets two blank lines before it, higher levels -gets only one. A new page is ejected before each -first-level heading if number register \fBEj\fP is 1. -All levels below or equal the value of \fBEj\fP gets a new page. -Default value for \fBEj\fP is 0. -.sp -\fBHeading break level\fP -.br -A line break occurs after the heading if the heading level is less -or equal to number register \fBHb\fP. -Default value 2. -.sp -\fBHeading space level\fP -.br -A blank line is inserted after the heading if the heading level is less -or equal to number register \fBHs\fP. -Default value 2. -.sp -Text will follow the heading on the same line if the level is greater -than both \fBHb\fP and \fBHs\fP. -.sp -\fBPost-heading indent\fP -.br -Indentation of the text after the heading is controlled by number -register \fBHi\fP, default value 0. -\fBHi\fP -.in +.5i -.T2 0 -The text will be left-justified. -.T2 1 -Indentation of the text will follow the value of number register \fBPt\fP, -see \fBP\fP. -.T2 2 -The text will be lined up with the first word of the heading. -.in -.sp -\fBCentered section headings\fP -.br -All headings whose level is equal or below number register \fBHc\fP -and also less than or equal to \fBHb\fP or \fBHs\fP -is centerered. -.sp -\fBFont control of the heading\fP -.br -The font of each heading level is controlled by string \fBHF\fP. -It contains a fontnumber or fontnam for each level. Default -is \fB2\ 2\ 2\ 2\ 2\ 2\ 2\fP (all headings in italic). -Could also be written as \fBI\ I\ I\ I\ I\ I\ I\fP. -All omitted values are presumed to be a 1. -.sp -\fBPoint size control\fP. -.br -String \fBHP\fP controls the pointsize of each heading, in the -same way as \fBHF\fP controls the font. -A value of 0 selects the default point size. -Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\fP. Beware that only the -point size changes, not the vertical size. -That can be controlled by the user specified macro \fBHX\fP and/or -\fBHZ\fP. -.sp -\fBHeading counters\fP -.br -Seven number registers, named \fBH1\fP thru \fBH7\fP contains -the counter for each heading level. -The values are printed using arabic numerals, this can be changed -with the macro \fBHM\fP (see below). -All marks ar concatenated before printing. To avoid this, set -number register \fBHt\fP to 1. That will only print the current -heading counter at each heading. -.sp -\fBAutomatic table of contents\fP -.br -All headings whose level is equal or below number register \fBCl\fP -is saved to be printed in the table of contents. Default value is 2. -.sp -\fBSpecial control of the heading, user-defined macros\fP. -.br -These macros can be defined by the user to get a finer control -of vertical spacing, fonts or other features. -Argument \fIlevel\fP is the level-argument to \fBH\fP, but -0 for unnumbered headings (see \fBHU\fP). -Argument \fIrlevel\fP is the real level, it is -set to number register \fBHu\fP for unnumbered headings. -Argument \fIheading-text\fP is the text argument to \fBH\fP and \fBHU\fP. -.sp -\fBHX\ \fP\fIlevel\ rlevel\ heading-text\fP -.br -\fBHX\fP is called just before the printing of the heading. -The following register is available for \fBHX\fP. -\fBHX\fP may alter \fB}0\fP, \fB}2\fP and \fB;3\fP. -.in +.5i -.T3 "string }0" -Contains the heading mark plus two spaces if \fIrlevel\fP is non-zero, -otherwise empty. -.T3 "register ;0" -Contains the position of the text after the heading. -0 means that the text should follow the heading on the same line, 1 -means that a line break should occur before the text and -2 means that a blank line should separate the heading and the text. -.T3 "string }2" -Contains two spaces if register \fB;0\fP is 0. It is used to -separate the heading from the text. The string -is empty if \fB;0\fP is non-zero. -.T3 "register ;3" -Contains the needed space in units after the heading. -Default is 2v. - -Can be used to change things like numbering (\fB}0\fP), -vertical spacing (\fB}2\fP) -and the needed space after the heading. -.in -.sp -\fBHY\ \fP\fIdlevel\ rlevel\ heading-text\fP -.br -\fBHY\fP is called after size and font calculations and -might be used to change indentation. -.sp -\fBHZ\ \fP\fIdlevel\ rlevel\ heading-text\fP -\fBHZ\fP is called after the printing of the heading, just before -\fBH\fP or \fBHU\fP exits. -Could be used to change the page header according to the section heading. -.TP -.B "HC [hyphenation-character]" -Set hyphenation character. -Default value is \e%. -Resets to the default if called without argument. -Hyphenation can be turned by setting number -register \fBHy\fP to 0 in the beginning of the file. -.TP -.B "HM [arg1 [arg2 [... [arg7]]]]" -Heading mark style. -Controls the type of marking for printing of the heading counters. -Default is 1 for all levels. -.sp -\fBArgument\fP -.in +.5i -.T2 1 -Arabic numerals. -.T2 0001 -Arabic numerals with leading zeroes, one or more. -.T2 A -Upper-case alphabetic -.T2 a -Lower-case alphabetic -.T2 I -Upper-case roman numerals -.T2 i -lower-case roman numerals -.T2 \fIempty\fP -Arabic numerals. -.in -.TP -.B "HU heading-text" -Unnumbered section header. -\fBHU\fP behavies like \fBH\fP at the level in number register \fBHu\fP. -See \fBH\fP. -.TP -.B "HX dlevel rlevel heading-text" -Userdefined heading exit. -Called just before printing the header. -See \fBH\fP. -.TP -.B "HY dlevel rlevel heading-text" -Userdefined heading exit. -Called just before printing the header. -See \fBH\fP. -.TP -.B "HZ dlevel rlevel heading-text" -Userdefined heading exit. -Called just after printing the header. -See \fBH\fP. -.TP -.B "I [italic-text [prev-font-text [italic-text [...]]]" -Italic. -Changes the font to italic if called without arguments. -With one argument it will set the word in italic. -With two argument it will concatenate them and set the first -word in italic and the second in the previous font. -There is no limit on the number of argument, all will be concatenated. -.TP -.B "IA [addressee-name [title]] -Begins specification of the addressee and addressee's address in -letter style. -Several names can be specified with empty \fBIA\fP/\fBIE\fP-pairs, but -only one address. -See \fBLT\fP. -.TP -.B "IB [italic-text [bold-text [italic-text [...]]]" -Italic-bold -Even arguments is printed in italic, odd in boldface. -See \fBI\fP. -.TP -.B IE -Ends the address-specification after \fPIA\fP. -.TP -.B "INITR filename" -Initialize the refencemacros. References will be written to -\fIfilename.tmp\fP and \fIfilename.qrf\fP. Requires two passes with groff. -The first looks for references and the second includes them. -\fBINITR\fP can be used several times, but it is only the first -occurrence of \fBINITR\fP that is active. -See also \fBSETR\fP, \fBGETPN\fP and \fBGETHN\fP. -.TP -.B "IR [italic-text [roman-text [italic-text [...]]]" -Italic-roman -Even arguments is printed in italic, odd in roman. -See \fBI\fP. -.TP -.B "LB text-indent mark-indent pad type [mark [LI-space [LB-space]]]" -List begin macro. -This is the common macro used for all lists. -\fIText-indent\fP is the number of spaces to indent the text from the -current indent. -.sp -\fIPad\fP and \fImark-indent\fP controls where to put the mark. -The mark is placed within the mark area, and \fImark-indent\fP -sets the number of spaces before this area. It is normally 0. -The mark area ends where the text begins. The start of the text -is still controlled by \fItext-indent\fP. -.sp -The mark is left justified whitin the mark area if \fIpad\fP is 0. -If \fIpad\fP is greater than 0, then \fImark-indent\fP is ignored, and -the mark is placed \fIpad\fP spaces before the text. -This will right justify the mark. -.sp -If \fItype\fP is 0 the list will have either a hanging indent or, if -argument \fImark\fP is given, the string \fImark\fP as mark. -.sp -If \fItype\fP is greater than 0 automatic numbering will occur, arabic -if \fImark\fP is empty. \fIMark\fP can then be any of \fB1\fP, \fBA\fP, -\fBa\fP, \fBI\fP or \fBi\fP. -.sp -\fIType\fP selects one of six possible ways to display the mark. -.br -\fBtype\fP -.in +.6i -.T2 1 -x. -.T2 2 -x) -.T2 3 -(x) -.T2 4 -[x] -.T2 5 - -.T2 6 -{x} -.in -.sp -Every item in the list will get \fILI-space\fP number of blank lines -before them. Default is 1. -.sp -\fBLB\fP itself will print \fILB-space\fP blank lines. Default is 0. -.TP -.B "LC [list-level]" -List-status clear -Terminates all current active lists down to \fIlist-level\fP, or 0 -if no argmuent is given. This is used by \fBH\fP to clear any -active list. -.TP -.B "LE [1]" -List end. -Terminate the current list. \fBLE\fP outputs a blank line -if an argument is given. -.TP -.B "LI [mark [1]]" -List item precedes every item in a list. Without argument \fBLS\fP -will print the mark determined by the current list type. By giving -\fBLI\fP one argument, it will use that as the mark instead. -Two arguments to \fBLI\fP will make \fImark\fP a prefix to -the current mark. A zero length \fImark\fP will make a hanging -indent instead. -.sp -A blank line is normally printed before the list item. This behaviour -can be controlled by number register \fBLs\fP. Pre-spacing -will occur for each list-level less than or equal to \fBLs\fP. -Default value is 99. (Nesting of lists is unlimited. :-) -.sp -The indentation can be changed thru number register \fBLi\fP. -Default is 6. -.sp -All lists begins with a list initialization macro, \fBLB\fP. -There are, however, seven predefined listtypes to -make lists easier to use. They all call \fBLB\fP with different -default values. -.in +.5i -.T2 \fBAL\fP -Automatically Incremented List -.T2 \fBML\fP -Marked List -.T2 \fBVL\fP -Variable-Item List -.T2 \fBBL\fP -Bullet List -.T2 \fBDL\fP -Dash List -.T2 \fBRL\fP -Reference List -.T2 \fBBVL\fP -Broken Varable List. -.in -These lists are described at other places in this manual. See also \fBLB\fP. -.TP -.B "LT [arg]" -Formats a letter in one of four different styles depending -on the argument. -See also \fBINTERNALS\fP. -.in +.5i -.T2 \fBArg -Style\fP -.T2 BL -Blocked. Date line, return address, writer's address and closing -begins at the center of the line. All other lines begins at the left margin. -.T2 SB -Semi-blocked. Same as blocked, except that the first line in every -paragraph is indented five spaces. -.T2 FB -Full-blocked. All lines begin at the left margin. -.T2 SP -Simplified. Almost the same as the full-blocked style. Subject and -the writer'sidentification is printed in all-capital. -.in -.TP -.B "LO type [arg]" -Specify options in letter (see \fB.LT\fP). -This is a list of the standard options: -.in +.5i -.T2 CN -Confidential notation. Prints \fBRESTRICTED\fP on the second line -below the date line. Any argument replaces \fBRESTRICTED\fP. -See also string variable \fBLetCN\fP. -.T2 RN -Reference notation. Prints \fBIn reference to:\fP and the argument -two lines below the date line. -See also string variable \fBLetRN\fP. -.T2 AT -Attention. Prints \fBATTENTION:\fP and the argument below the inside address. -See also string variable \fBLetAT\fP. -.T2 SA -Salutation. Prints \fBTo Whom It May Concern:\fP or the argument if -it was present. The salutation is printed two lines below the inside address. -See also string variable \fBLetSA\fP. -.T2 SJ -Subject line. Prints the argument as subject prefixed with \fBSUBJECT:\fP -two lines below the inside address, except in letter type \fBSP\fP. -Then the subject is printed in all-captial without any prefix. -See also string variable \fBLetSJ\fP. -.in -.TP -.B "MC column-size [column-separation] " -Begin multiple columns. Return to normal with \fB1C\fP. -\fBMC\fP will create as many columns as the current line length permits. -\fIColumn-size\fP is the width of each column, and \fIcolumn-separation\fP -is the space between two columns. Default separation is the -column-size/15. -See also \fB1C\fP. -.TP -.B "ML mark [text-indent [1]]" -Marked list start. The \fImark\fP argument will be printed before -each list item. -\fIText-indent\fP sets the indent and overrides \fBLi\fP. -A third argument will prohibit printing of a blank line before each -item. -.TP -.B "MT [arg [addressee]]" -Memorandum type. -The \fIarg\fP is part of a filename in \fI@TMAC_MDIR@/*.MT\fP. -Memorandum type 0 thru 5 are supported, including \fI"string"\fP. -\fIAddresse\fP just sets a variable, used in the AT&T macros. -.br -\fBarg\fP -.in +.5i -.T2 0 -Normal memorandum, no type printed -.T2 1 -Memorandum with \fIMEMORANDUM FOR FILE\fP printed -.T2 2 -Memorandum with \fIPROGRAMMER'S NOTES\fP printed -.T2 3 -Memorandum with \fIENGINEER'S NOTES\fP printed -.T2 4 -Released paper style -.T2 5 -External letter style -.in -See also \fBCOVER\fP/\fBCOVEND\fP, a more flexible type of front page. -.TP -.B "MOVE y-pos [x-pos [line-length]]" -Move to a position, pageoffset set to \fIx-pos\fP. -If \fIline-length\fP is not given, the difference between -current and new pageoffset is used. -Use \fBPGFORM\fP without arguments to return to normal. -.TP -.B "MULB cw1 space1 [cw2 space2 [cw3 ...]]" -Begin a special multi-column mode. Every columns width must be specified. -Also the space between the columns must be specified. The last column -does not need any space-definition. MULB starts a diversion and MULE -ends the diversion and prints the columns. -The unit for width and space is 'n', but MULB accepts all -normal unitspecifications like 'c' and 'i'. -MULB operates in a separate environment. -.TP -.B "MULN" -Begin the next column. This is the only way to switch column. -.TP -.B "MULE" -End the multi-column mode and print the columns. -.TP -.B "nP [type]" -Print numbered paragraph with header level two. Se \fB.P\fP. -.TP -.B "NS [arg [1]]" -Prints different types of notations. The argument selects between -the predefined type of notations. If the second argument is available, -then the argument becomes the entire notation. -If the argument doesn't exist in the predefined, it will be -printed as \fBCopy (\fP\fIarg\fP\fB) to\fP. -It is possible to add more standard notations, see the string variable -\fBLetns\fP and \fBLetnsdef\fP. -.nf -.in +.5i -.T2 \fBArg -Notation\fP -.T2 \fInone\fP -Copy To -.T2 """"" -Copy To -.T2 1 -Copy To (with att.) to -.T2 2 -Copy To (without att.) to -.T2 3 -Att. -.T2 4 -Atts. -.T2 5 -Enc. -.T2 6 -Encs. -.T2 7 -Under separate cover -.T2 8 -Letter to -.T2 9 -Memorandum to -.T2 10 -Copy (with atts.) to -.T2 11 -Copy (without atts.) to -.T2 12 -Abstract Only to -.T2 13 -Complete Memorandum to -.T2 14 -CC -.in -.fi -.TP -.B "ND new-date" -New date. Override the current date. Date is not -printed if \fInew-date\fP is an empty string. -.TP -.B "OF [arg]" -Odd-page footer, a line printed just above the normal footer. -See \fBEF\fP and \fBPF\fP. -.TP -.B "OH [arg]" -Odd-page header, a line printed just below the normal header. -See \fBEH\fP and \fBPH\fP. -.TP -.B OP -Make sure that the following text is printed at the top -of an odd-numbered page. Will not output an empty page -if currently at the top of an odd page. -.TP -.B "P [type]" -Begin new paragraph. -\fBP\fP without argument will produce left justified text, even -the first line of the paragraph. This is the same as setting -\fItype\fP to 0. If the argument is 1, then the first line -of text following \fBP\fP will be indented by the number of -spaces in number register \fBPi\fP, normally 5. -.sp -Instead of giving 1 as argument to \fBP\fP it is possible to set the -paragraph type in number register \fBPt\fP. Using 0 and 1 -will be the same as adding that value to \fBP\fP. -A value of 2 will indent all paragraphs, except after -headings, lists and displays. -.sp -The space between two paragraphs is controlled by number register \fBPs\fP, -and is 1 by default (one blank line). -.TP -.B "PGFORM [linelength [pagelength [pageoffset [1]]]]" -Sets linelength, pagelength and/or pageoffset. -This macro can be used for special formatting, like letterheads -and other. -It is normally the first command in a file, though it's not necessary. -\fBPGFORM\fP can be used without arguments -to reset everything after a \fBMOVE\fP. -A line-break is done unless the fourth argument is given. -This can be used to avoid the pagenumber on the first page while setting -new width and length. -.TP -.B PGNH -No header is printed on the next page. Used to get rid off -the header in letters or other special texts -This macro must be used before any text to inhibit the pageheader -on the first page. -.TP -.B PE -Picture end. -Ends a picture for \fB@g@pic\fP, see the manual for \fB@g@pic\fP. -.TP -.B "PF [arg]" -Page footer. -\fBPF\fP sets the line to be printed at the bottom of each page. -Normally empty. See \fBPH\fP for the argument specification. -.TP -.B "PH [arg]" -Page header, a line printed at the top of each page. -The argument should be specified as "'left-part'center-part'right-part'", -where left-, center- and right-part is printed left-justified, centered -and right justified. The character \fB%\fP is changed to the current -page number. The default page-header is "''- % -''", the page -number between two dashes. -.TP -.B PS -Picture start (from pic). Begins a picture for \fB@TMAC@pic\fP, see -the manual. -.TP -.B PX -Page-header user-defined exit. -\fBPX\fP is called just after the printing of the page header -in \fIno-space\fP mode. -.TP -.B R -Roman. -Return to roman font, see also \fBI\fP. -.TP -.B "RB [roman-text [bold-text [roman-text [...]]]" -Roman-bold. -Even arguments is printed in roman, odd in boldface. -See \fBI\fP. -.TP -.B "RD [prompt [diversion [string]]]" -Read from standard input to diversion and/or string. -The text will be saved in a diversion named \fIdiversion\fP. -Recall the text by writing the name of the diversion after a dot -on an empty line. A string will also be defined if -\fIstring\fP is given. \fIDiversion\fP and/or \fIprompt\fP can -be empty (""). -.TP -.B RF -Reference end. Ends a reference definition and returns to normal -processing. See \fBRS\fP. -.TP -.B "RI [roman-text [italic-text [roman-text [...]]]" -Even arguments is printed in roman, odd in italic. -See \fBI\fP. -.TP -.B "RL [text-indent [1]]" -Reference list start -Begins a list where each item is preceded with a automatically -incremented number between -square brackets. -\fIText-indent\fP changes the default indentation -.TP -.B "RP [arg1 [arg2]]" -Produce reference page. -\fBRP\fP can be used if a reference page is wanted somewhere in the -document. It is not needed if \fBTC\fP is used to produce -a table of content. The reference page will then be printed automatically. -.sp -The reference counter will not be resetted if \fIarg1\fP is 1. -.sp -\fIArg2\fP tells \fBRP\fP whether to eject a page or not. -.br -\fBArg2\fP -.in +.5i -.T2 0 -The reference page will be printed on a separate page. -This is -the default. -.T2 1 -Do not eject page after the list. -.T2 2 -Do not eject page before the list. -.T2 3 -Do not eject page before and after the list. -.in -The reference items will be separated by a blank line. -Setting number register \fBLs\fP to 0 will suppress the line. -.sp -The string \fBRp\fP contains the reference page title and -is normally set to \fIREFERENCES\fP. -.TP -.B "RS [string-name]" -\fBRS\fP begins an automatically numbered reference definition. -Put the string \fB\e*(Rf\fP where the reference mark -should be and write the reference between \fBRS\fP/\fBRF\fP -at next new line after the reference mark. The reference number -is stored in number register \fB:R\fP. -If \fIstring-name\fP is given, a string with that name -will be defined and contain the current reference mark. -The string can be referenced as \fB\e*[\fIstring-name\fP]\fP later in -the text. -.TP -.B "S [size [spacing]]" -Set point size and vertical spacing. If any argument is equal 'P', then -the previous value is used. A 'C' means current value, and 'D' default value. -If '+' or '-' is used before the value, then increment or decrement of -the current value will be done. -.TP -.B "SA [arg]" -Set right-margin justification. -Justification is normally turned on. -No argumenent or \fB0\fP turns off justification, a \fB1\fP turns on -justification. -.TP -.B "SETR refname [string]" -Remember the current header and page-number as refname. -Saves \fIstring\fP if \fIstring\fP is defined. \fIstring\fP is retrieved -with \fB.GETST\fP. -See \fBINITR\fP. -.TP -.B "SG [arg [1]]" -Signature line. Prints the authors name(s) after the formal closing. -The argument will be appended to the reference data, printed -at either the first or last author. The reference data is the location, -department and initials specified with \fB.AU\fP. -It will be printed at the first author, otherwise at the last. -No reference data will be printed if the author(s) is specifed -thru \fB.WA\fP/\fB.WE\fP. -See \fBLetter internals\fP. -.TP -.B "SK [pages]" -Skip pages. -If \fIpages\fP is \fB0\fP or omitted, a skip to the next page -will occur unless it is already at the top of a page. -Otherwise it will skip \fIpages\fP pages. -.TP -.B "SM string1 [string2 [string3]]" -Make a string smaller. -If \fIstring2\fP is given, \fIstring1\fP will be smaller and \fIstring2\fP -normal, concatenated with \fIstring1\fP. With three argument, all is -concatenated, but only \fIstring2\fP is made smaller. -.TP -.B "SP [lines]" -Space vertically. \fIlines\fP can have any scalingfactor, like \fI3i\fP or -\fI8v\fP. Several \fBSP\fP in a line will only produce the -maximum number of lines, not the sum. \fBSP\fP will also be ignored -until the first textline in a page. Add a \fB\e&\fP before \fBSP\fP -to avoid this. -.TP -.B TAB -reset tabs to every 5n. Normally used to reset any previous tabpositions. -.TP -.B "TB [title [override [flag [refname]]]]" -Table title. -If \fIrefname\fP is used, then the tablenumber is saved with -\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. -.TP -.B "TC [slevel [spacing [tlevel [tab [h1 [h2 [h3 [h4 [h5]]]]]]]]]" -Table of contents. -This macro is normally used at the last line of the document. -It generates a table of contents with headings up to the level -controlled by number register \fBCl\fP. Note that \fBCl\fP controls -the saving of headings, it has nothing to do with \fBTC\fP. -Headings with level less than or equal to \fIslevel\fP will get -\fIspacing\fP number of lines before them. -Headings with level less than or equal to \fItlevel\fP will have -their page numbers right justified with dots or spaces separating -the text and the page number. Spaces is used if \fItab\fP -is greater than zero, otherwise dots. -Other headings will have the -page number directly at the end of the heading text (\fIragged right\fP). -.sp -The rest of the arguments will be printed, centered, before the -table of contents. -.sp -The user-defined macros \fBTX\fP and \fBTY\fP are used if \fBTC\fP is called -with at most four arguments. \fBRX\fP is called before the printing -of \fICONTENTS\fP, and \fBTY\fP is called instead of printing \fICONTENTS\fP. -.sp -String \fBCi\fP can be set to control the indentations for each heading-level. -It must be scaled, like \fB.ds\ Ci\ .25i\ .5i\ .75i\ 1i\ 1i\fP. -The indentation is normally controlled by the maxlength of headings -in each level. -.sp -All texts can be redefined, new stringvariables -\fILifg\fP, \fILitb\fP, \fILiex\fP, \fILiec\fP and \fILicon\fP contains -"Figure", "TABLE", "Exhibit", "Equation" and "CONTENTS". -These can be redefined to other languages. -.TP -.B TE -Table end. See \fBTS\fP. -.TP -.B "TH [N]" -Table header. See \fBTS\fP. -\fBTH\fP ends the header of the table. This header will -be printed again if a page-break occurs. -Argument \fIN\fP isn't implemented yet. -.TP -.B TL [charging-case number(s) [filing-case number(s)] -Begin title of memorandum. -All text up to the next \fBAU\fP is included in the title. -\fICharging-case number\fP and \fIfiling-case\fP is saved -for use in the front page processing. -.TP -.B TM [num1 [num2 [...]]] -Technical memorandumnumbers used in \fB.MT\fP. Unlimited number -of arguments may be given. -.TP -.B TP -Top of page user-defined macro. -This macro is called instead of the normal page header. It is -possible to get complete control over the header. -Note that header and footer is printed in a separate environment. -Linelength is preserved though. -.TP -.B "TS [H]" -Table start. This is the start of a table specification -to \fB@TMAC@tbl\fP. See separate manual for \fB@TMAC@tbl\fP. -\fBTS\fP ends with \fBTE\fP. -Argument \fIH\fP tells \fBm@TMAC@m\fP that the table -has a header. See \fBTH\fP. -.TP -.B TX -Userdefined table of contents exit. -This macro is called just before \fBTC\fP prints the word \fICONTENTS\fP. -See \fBTC\fP. -.TP -.B TY -Userdefined table of contents exit (no "CONTENTS"). -This macro is called instead of printing \fICONTENTS\fP. -See \fBTC\fP. -.TP -.B 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. -\fIflag\fP control several special features. -It contains the sum of all wanted features. -.in +.5i -.T2 Value -Description -.T2 1 -Disable the escape-character (\e). This is normally turned on during -verbose output. -.T2 2 -Add en empty line before the verbose text. -.T2 4 -Add en empty line after the verbose text. -.T2 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 \fBVerbnm\fP. It contains all arguments to the -\fBtroff\fP-command \fB.nm\fP, normally '1'. -.T2 16 -Indent the verbose text with five 'n':s. This is controlled by the -number-variable \fBVerbin\fP (in units). -.in -.TP -.B VERBOFF -End verbatim output. -.TP -.B "VL text-indent [mark-indent [1]]" -Variable-item list has no fixed mark, it assumes that -every \fBLI\fP have a mark instead. -\fIText-indent\fP sets the indent to the text, and \fImark-indent\fP -the distance from the current indent to the mark. -A third argument will prohibit printing of a blank line before each -item. -.TP -.B "VM [top [bottom]]" -Vertical margin. -.TP -.B "WA [writer-name [title]] -Begins specification of the writer and writer's address. -Several names can be specified with empty \fBWA\fP/\fBWE\fP-pairs, but -only one address. -.TP -.B WE -Ends the address-specification after \fP.WA\fP. -.TP -.B "WC [format]" -Footnote and display width control. -.in +.5i -.T2 N -Set default mode, \fB-WF\fP, \fB-FF\fP, \fB-WD\fP and \fBFB\fP. -.T2 WF -Wide footnotes, wide also in two-column mode. -.T2 -WF -Normal footnote width, follow column mode. -.T2 FF -All footnotes gets the same width as the first footnote encountered. -.T2 -FF -Normal footnotes, width follows \fBWF\fP and \fB-WF\fP. -.T2 WD -Wide displays, wide also in two-column mode. -.T2 -WD -Normal display width, follow column mode. -.T2 FB -Floating displays generates a line break when printed on the current page. -.T2 -FB -Floating displays does not generate line break. -.in -.sp 3 -.LP -.\"######################################################################## -.LP -.B "Strings used in m@TMAC_M_PREFIX@m:" -.TP -.B App -A string containing the word "APPENDIX". -.TP -.B "EM" -Em dash string -.TP -.B HF -Fontlist for headings, normally "2 2 2 2 2 2 2". -Nonnumeric fontnames may also be used. -.TP -.B HP -Pointsize list for headings. Normally "0 0 0 0 0 0 0" which is the same as -"10 10 10 10 10 10 10". -.TP -.B Lifg -String containing \fIFigure\fP. -.TP -.B Litb -String containing \fITABLE\fP. -.TP -.B Liex -String containing \fIExhibit\fP. -.TP -.B Liec -String containing \fIEquation\fP. -.TP -.B Licon -String containing \fICONTENTS\fP. -.TP -.B Lf -Contains "LIST OF FIGURES". -.TP -.B Lt -Contains "LIST OF TABLES". -.TP -.B Lx -Contains "LIST OF EXHIBITS". -.TP -.B Le -Contains "LIST OF EQUATIONS". -.TP -.B Letfc -Contains "Yours very truly,", used in \fB.FC\fP. -.TP -.B Letapp -Contains "APPROVED:", used in \fB.AV.\fP. -.TP -.B Letdate -Contains "Date", used in \fB.AV.\fP. -.TP -.B LetCN -Contains "CONFIDENTIAL", used in \fB.LO CN\fP. -.TP -.B LetSA -Contains "To Whom It May Concern:", used in \fB.LO SA\fP. -.TP -.B LetAT -Contains "ATTENTION:", used in \fB.LO AT\fP. -.TP -.B LetSJ -Contains "SUBJECT:", used in \fB.LO SJ\fP. -.TP -.B LetRN -Contains "In reference to:", used in \fB.LO RN\fP. -.TP -.B Letns -is an array containing the different strings used in \fB.NS\fP. -It is really a number of stringvariables prefixed with \fBLetns!\fP. -If the argument doesn't exist, it will be included -between \fB()\fP with \fBLetns!copy\fP as prefix and \fBLetns!to\fP as suffix. -Observe the space after \fBcopy\fP and before \fBto\fP. -.nf -.ta 1.5i -\fBName Value\fP -Letns!0 Copy to -Letns!1 Copy (with att.) to -Letns!2 Copy (without att.) to -Letns!3 Att. -Letns!4 Atts. -Letns!5 Enc. -Letns!6 Encs. -Letns!7 Under separate cover -Letns!8 Letter to -Letns!9 Memorandum to -Letns!10 Copy (with atts.) to -Letns!11 Copy (without atts.) to -Letns!12 Abstract Only to -Letns!13 Complete Memorandum to -Letns!14 CC -Letns!copy Copy " -Letns!to " to -.fi -.TP -.B Letnsdef -Defines the standard-notation used when no argument is given -to \fB.NS\fP. Default is \fB0\fP. -.TP -.B "MO1 - MO12" -Strings containing \fIJanuary\fP thru \fIDecember\fP. -.TP -.B Qrf -String containing "See chapter \e\e*[Qrfh], page \e\en[Qrfp].". -.TP -.B Rp -Contains "REFERENCES". -.TP -.B Tm -Contains \e(tm, trade mark. -.TP -.B Verbnm -Argument to \fB.nm\fP in \fB.VERBON\fP, default: \fB1\fP. -.\"----------------------------------- -.LP -.B "Number variables used in m@TMAC_M_PREFIX@m:" -.TP -.B Aph -Print an appendix-page for every new appendix -if this numbervariable is non-zero. -No output will occur if \fBAph\fP is zero, but there will always -be an appendix-entry in the 'List of contents'. -.TP -.B Cl -Contents level [0:7], contents saved if heading level <= Cl, default 2. -.TP -.B Cp -Eject page between LIST OF XXXX if Cp == 0, default 0. -.TP -.B D -Debugflag, values >0 produces varying degree of debug. A value of 1 -gives information about the progress of formatting, default 0. -.TP -.B De -Eject after floating display is output [0:1], default 0. -.TP -.B Df -Floating keep output [0:5], default 5. -.TP -.B Ds -space before and after display if == 1 [0:1], default 1. -.TP -.B Ej -Eject page, default 0. -.TP -.B Eq -Equation lable adjust 0=left, 1=right. Default 0. -.TP -.B Fs -Footnote spacing, default 1. -.TP -.B "H1-H7" -Heading counters -.TP -.B Hb -Heading break level [0:7], default 2. -.TP -.B Hc -Heading centering level, [0:7]. Default 0. -.TP -.B Hi -Heading temporary indent [0:2], default 1. -.br -0\ ->\ 0 indent, left margin -.br -1\ ->\ indent to right , like .P 1 -.br -2\ ->\ indent to line up with text part of preceding heading -.TP -.B Hps -Numbervariable with the heading pre-space level. If the heading-level -is less than or equal to \fBHps\fP, then two lines will precede the -section heading instead of one. Default is first level only. -The real amount of lines is controlled by the variables \fBHps1\fP and -\fBHps2\fP. -.TP -.B Hps1 -This is the number of lines preceding \fB.H\fP when the heading-level -is greater than \fBHps\fP. Value is in units, normally 0.5v. -.TP -.B Hps2 -This is the number of lines preceding \fB.H\fP when the heading-level -is less than or equal to \fBHps\fP. Value is in units, normally 1v. -.TP -.B Hs -Heading space level [0:7], default 2. -.TP -.B Ht -Heading numbering type, default 0. -0 -> multiple (1.1.1 ...) -.br -1 -> single -.TP -.B Hu -Unnumbered heading level, default 2. -.TP -.B Hy -Hyphenation in body, default 1. -.br -0\ ->\ no hyphenation -.br -1\ ->\ hyphenation 14 on -.TP -.B Letwam -Max lines in return-address, used in \fB.WA\fP/\fB.WE\fP. Default 14. -.TP -.B "Lf, Lt, Lx, Le" -Enables (1) or disables (0) the printing of List of figures, -List of tables, List of exhibits and List of equations. -Default: Lf=1, Lt=1, Lx=1, Le=0. -.TP -.B Li -List indent, used by .AL, default 6. -.TP -.B Ls -List space, if current listlevel > Ls then no spacing will occur around lists. -Default 99. -.TP -.B Lsp -.TP -The size of an empty line. Normally 0.5v, but it is 1v -if \fBn\fP is set (\fB.nroff\fP). -.TP -.B N -Numbering style [0:5], default 0. -.br -0\ ==\ (default) normal header for all pages. -.br -1\ ==\ header replaces footer on first page, header is empty. -.br -2\ ==\ page header is removed on the first page. -.br -3\ ==\ "section-page" numbering enabled. -.br -4\ ==\ page header is removed on the first page. -.br -5\ ==\ "section-page" and "section-figure" numbering enabled. -Se also the number-register Sectf and Sectp. -.TP -.B Np -Numbered paragraphs, default 0. -.br -0\ ==\ not numbered -.br -1\ ==\ numbered in first level headings. -.TP -.B Of -Format of figure,table,exhibit,equation titles, default 0. -.br -0\ =\ ". " -.br -1\ =\ " - " -.TP -.B P -Current page-number, normally the same as % unless "section-page" numbering -is enabled. -.TP -.B Pi -paragraph indent, default 5. -.TP -.B Pgps -Controls whether header and footer pointsize should follow the current -setting or just change when the header and footer is defined. -.in +.5i -.ti -.5i -.T2 Value -Description -.T2 0 -Pointsize will only change to the current setting when \fB.PH\fP, \fB.PF\fP, -\&\fB.OH\fP, \fP.EH\fP, \fB.OF\fP or \fB.OE\fP is executed. -.T2 1 -Pointsize will change after every \fB.S\fP. This is the default. -.in -.TP -.B Ps -paragraph spacing, default 1. -.TP -.B Pt -Paragraph type, default 0. -.br -0\ ==\ left-justified -.br -1\ ==\ indented .P -.br -2\ ==\ indented .P except after .H, .DE or .LE. -.TP -.B Sectf -Flag controlling "section-figures". A non-zero value enables this. -Se also register N. -.TP -.B Sectp -Flag controlling "section-page-numbers". A non-zero value enables this. -Se also register N. -.TP -.B Si -Display indent, default 5. -.TP -.B Verbin -Indent for \fB.VERBON\fP, default 5n. -.TP -.B .mgm -Always 1. -.LP -.SH INTERNALS -The letter macros is using different submacros depending on -the letter type. The name of the submacro has the letter type -as suffix. It is therefore possible to define other letter types, either -in the national macro-file, or as local additions. -\&\fB.LT\fP will set the number variables \fBPt\fP and \fBPi\fP to 5 and 0. -The following strings and macros must be defined for a new letter type: -.TP -\fBlet@init_\fP\fItype\fP -This macro is called directly by \fB.LT\fP. It is supposed to initialize -variables and other stuff. -.TP -\fBlet@head_\fP\fItype\fP -This macro prints the letter head, and is called instead of the -normal page header. It is supposed to remove the alias \fBlet@header\fP, -otherwise it will be called for all pages. -.TP -\fBlet@sg_\fP\fItype\ name\ title\ n\ flag\ [arg1\ [arg2\ [...]]]\fP -\&\fB.SG\fP is calling this macro only for letters, memorandums has -its own processing. \fIname\fP and \fItitle\fP is specified -thru \fB.WA\fP/\fB.WB\fP. \fIn\fP is the counter, 1-max, and -\fIflag\fP is true for the last name. Any other argument to \fB.SG\fP -is appended. -.TP -\fBlet@fc_\fP\fItype\ closing\fP -This macro is called by \fB.FC\fP, and has the -formal closing as argument. -.LP -\&\fB.LO\fP is implemented as a general option-macro. \fB.LO\fP demands -that a string named \fBLet\fP\fItype\fP is defined, where \fItype\fP -is the letter type. -\&\fB.LO\fP will then assign the argument to the string -variable \fBlet*lo-\fP\fItype\fP. -.LP -.\".SH BUGS -.SH AUTHOR -Jörgen Hägg, Lund, Sweden . -.SH FILES -.TP -.B @MACRODIR@/tmac.@TMAC_M_PREFIX@m -.TP -.B @TMAC_MDIR@/*.cov -.TP -.B @TMAC_MDIR@/*.MT -.TP -.B @TMAC_MDIR@/locale -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@tbl (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@) -.br -.BR mm (@MAN7EXT@) -.BR m@TMAC_M_PREFIX@mse (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/mm/groff_mmse.7_in b/gnu/usr.bin/groff/mm/groff_mmse.7_in new file mode 100644 index 00000000000..ab5830766fa --- /dev/null +++ b/gnu/usr.bin/groff/mm/groff_mmse.7_in @@ -0,0 +1,82 @@ +.\" +.\" $Id: groff_mmse.7_in,v 1.1 2000/04/09 08:25:19 millert Exp $ +.\" Skrivet av Jörgen Hägg, Lund, Sverige +.\" +.TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAMN +groff_mmse \- svenska mm makro för groff +.SH SYNTAX +.B groff +.B \-m@TMAC_M@se +[ +.IR flaggor .\|.\|. +] +[ +.IR filer .\|.\|. +] +.SH BESKRIVNING +\fBm@TMAC_M@se\fP är en svensk variant av \fBm@TMAC_M@\fP. Alla texter +är översatta. En A4 sida fÃ¥r text som är 13 cm bred, 3.5 cm indragning +samt är 28.5 cm hög. +Det finns stöd för brevuppställning enligt svensk standard +för vänster och högerjusterad text. +.LP +\fBCOVER\fP kan använda \fIse_ms\fP som argument. Detta ger ett +svenskt försättsblad. +Se \fBgroff_mm(@MAN7EXT@)\fP för övriga detaljer. +.SH BREV +Tillgängliga brevtyper: +.TP +.B ".LT SVV" +Vänsterställd löptext med adressat i position T0 (vänsterställt). +.TP +.B ".LT SVH" +Högerställd löptext med adressat i position T4 (passar +fönsterkuvert). +.LP +Följande extra LO-variabler används. +.TP +.B ".LO DNAMN\fI namn\fP" +Anger dokumentets namn. +.TP +.br +.B ".LO MDAT\fI datum\fP" +Mottagarens datum, anges under \fBErt datum:\fP (\fBLetMDAT\fP). +.TP +.br +.B ".LO BIL\fI sträng\fP" +Anger bilaga, nummer eller sträng med \fBBilaga\fP (\fBLetBIL\fP) +som prefix. +.TP +.br +.B ".LO KOMP\fI text\fP" +Anger kompletteringsuppgift. +.TP +.br +.B ".LO DBET\fI beteckning\fP" +Anger dokumentbeteckning eller dokumentnummer. +.TP +.br +.B ".LO BET\fI beteckning\fP" +Anger beteckning (ärendebeteckning i form av diarienummer eller liknande). +.TP +.br +.B ".LO SIDOR\fI antal\fP" +Anger totala antalet sidor och skrivs ut efter sidnumret inom +parenteser. +.LP +Om makrot \fB.TP\fP är definierat anropas det efter utskrift av brevhuvudet. +Där lägger man lämpligen in postadress och annat som brevfot. +.SH "SKRIVET AV" +Jörgen Hägg, Lund, Sweden +.SH FILER +.B @MACRODIR@/tmac.@TMAC_M@se +.B @TMAC_MDIR@/se_*.cov +.SH "SE OCKSÃ…" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@tbl (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@) +.br +.BR m@TMAC_M@ (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/mm/groff_mmse.man b/gnu/usr.bin/groff/mm/groff_mmse.man deleted file mode 100644 index 01eefd958b4..00000000000 --- a/gnu/usr.bin/groff/mm/groff_mmse.man +++ /dev/null @@ -1,82 +0,0 @@ -.\" -*- nroff -*- -.\" $Id: groff_mmse.man,v 1.3 1998/01/19 00:40:13 etheisen Exp $ -.\" Skrivet av Jörgen Hägg, Lund, Sverige -.\" -.TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAMN -groff_mmse \- svenska mm makro för groff -.SH SYNTAX -.B groff -.B \-m@TMAC_M_PREFIX@mse -[ -.IR flaggor .\|.\|. -] -[ -.IR filer .\|.\|. -] -.SH BESKRIVNING -\fBm@TMAC_M_PREFIX@mse\fP är en svensk variant av \fBm@TMAC_M_PREFIX@m\fP. Alla texter -är översatta. En A4 sida fÃ¥r text som är 13 cm bred, 3.5 cm indragning -samt är 28.5 cm hög. -Det finns stöd för brevuppställning enligt svensk standard -för vänster och högerjusterad text. -.LP -\fBCOVER\fP kan använda \fIse_ms\fP som argument. Detta ger ett -svenskt försättsblad. -Se \fBgroff_mm(@MAN7EXT@)\fP för övriga detaljer. -.SH BREV -Tillgängliga brevtyper: -.TP -.B ".LT SVV" -Vänsterställd löptext med adressat i position T0 (vänsterställt). -.TP -.B ".LT SVH" -Högerställd löptext med adressat i position T4 (passar -fönsterkuvert). -.LP -Följande extra LO-variabler används. -.TP -.B ".LO DNAMN\fI namn\fP" -Anger dokumentets namn. -.TP -.br -.B ".LO MDAT\fI datum\fP" -Mottagarens datum, anges under \fBErt datum:\fP (\fBLetMDAT\fP). -.TP -.br -.B ".LO BIL\fI sträng\fP" -Anger bilaga, nummer eller sträng med \fBBilaga\fP (\fBLetBIL\fP) -som prefix. -.TP -.br -.B ".LO KOMP\fI text\fP" -Anger kompletteringsuppgift. -.TP -.br -.B ".LO DBET\fI beteckning\fP" -Anger dokumentbeteckning eller dokumentnummer. -.TP -.br -.B ".LO BET\fI beteckning\fP" -Anger beteckning (ärendebeteckning i form av diarienummer eller liknande). -.TP -.br -.B ".LO SIDOR\fI antal\fP" -Anger totala antalet sidor och skrivs ut efter sidnumret inom -parenteser. -.LP -Om makrot \fB.TP\fP är definierat anropas det efter utskrift av brevhuvudet. -Där lägger man lämpligen in postadress och annat som brevfot. -.SH "SKRIVET AV" -Jörgen Hägg, Lund, Sweden -.SH FILER -.B @MACRODIR@/tmac.@TMAC_M_PREFIX@mse -.B @TMAC_MDIR@/se_*.cov -.SH "SE OCKSÃ…" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@tbl (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@) -.br -.BR m@TMAC_M_PREFIX@m (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/mm/mm/0.MT b/gnu/usr.bin/groff/mm/mm/0.MT index 548c4a8bfca..a8564a0d826 100644 --- a/gnu/usr.bin/groff/mm/mm/0.MT +++ b/gnu/usr.bin/groff/mm/mm/0.MT @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: 0.MT,v 1.3 1998/01/19 00:40:18 etheisen Exp $ +.\" $Id: 0.MT,v 1.4 2000/04/09 08:25:19 millert Exp $ .\" Cover sheet. Memorandum type 0-3 and "string". .\"------------ .if !r Au .nr Au 1 @@ -11,11 +11,11 @@ subject: .sp -1.1 .S .PGFORM -.B +.ft \\*[@sdf_font] .ll 9c .fi .cov*title -.R +.ft .ll .nf .if d cov*title-charge-case \fBCharge Case \\*[cov*title-charge-case]\fP @@ -32,7 +32,7 @@ subject: .S .sp -1 .in 0.8c -.B +.ft \\*[@sdf_font] .nr cov*i 0 1 .while \\n+[cov*i]<=\\n[cov*au] \{\ . cov@print-au1 \\n[cov*i] 1 @@ -45,17 +45,17 @@ subject: . \} . if \\n[cov*i]<\\n[cov*au] .SP 1 .\} -.R +.ft .if r cov*mt-tm-max \{\ . SP 1 . nr cov*i 0 1 -. B +. ft \\*[@sdf_font] TM . in 1.5c . sp -1 . while \\n+[cov*i]<\\n[cov*mt-tm-max] \\*[cov*mt-tm!\\n[cov*i]] . in -. R +. ft .\} .fi .PGFORM @@ -83,7 +83,7 @@ TM .S .sp -1 .in 0.8c -.B "\\*[cov*new-date]" +\f[\\*[@sdf_font]]\\*[cov*new-date]\fP .br .fi .PGFORM diff --git a/gnu/usr.bin/groff/mm/mm/4.MT b/gnu/usr.bin/groff/mm/mm/4.MT index 232f4331843..73f6a534ade 100644 --- a/gnu/usr.bin/groff/mm/mm/4.MT +++ b/gnu/usr.bin/groff/mm/mm/4.MT @@ -1,11 +1,11 @@ .\"------------ -.\" $Id: 4.MT,v 1.3 1998/01/19 00:40:19 etheisen Exp $ +.\" $Id: 4.MT,v 1.4 2000/04/09 08:25:19 millert Exp $ .\" Cover sheet. Memorandum type 4 .\"------------ .de cov@print-title .if !d cov*title .@error title (.TL) not defined! .MOVE 2.4c -.S 12 +.S +4 .ad c .fi .B @@ -41,6 +41,7 @@ .SP 2 .if d cov*abstract \{\ . misc@ev-keep cov*ev +. init@reset . if \\n[cov*abs-ind]>0 \{\ . in +\\n[cov*abs-ind]u . ll -\\n[cov*abs-ind]u @@ -60,9 +61,19 @@ . cov@print-title . cov@print-authors . cov@print-firm -. cov@print-abstract +. if !\n[cov*abs-arg] .cov@print-abstract . SP 3 +. nr hd*cur-bline \n[nl] . ds cov*mt-printed . pg@enable-top-trap . pg@enable-trap .\} +.de CS +.pg@disable-top-trap +.SK +.cov@print-title +.cov@print-authors +.cov@print-firm +.cov@print-abstract +.. + diff --git a/gnu/usr.bin/groff/mm/mm/5.MT b/gnu/usr.bin/groff/mm/mm/5.MT index 157bb74e389..7bc565a5e94 100644 --- a/gnu/usr.bin/groff/mm/mm/5.MT +++ b/gnu/usr.bin/groff/mm/mm/5.MT @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: 5.MT,v 1.3 1998/01/19 00:40:20 etheisen Exp $ +.\" $Id: 5.MT,v 1.4 2000/04/09 08:25:20 millert Exp $ .\" Cover sheet. Memorandum type 5 .\"------------ .nr cov*mt0-ind 1.1c @@ -18,7 +18,7 @@ .\"------------ .de cov@print-date .rj 1 -.B "\\*[cov*new-date]" +\f[\\*[@sdf_font]]\\*[cov*new-date]\fP .br .. .\"------------ diff --git a/gnu/usr.bin/groff/mm/mm/ms.cov b/gnu/usr.bin/groff/mm/mm/ms.cov index dc110011a35..2e0f21baff4 100644 --- a/gnu/usr.bin/groff/mm/mm/ms.cov +++ b/gnu/usr.bin/groff/mm/mm/ms.cov @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: ms.cov,v 1.3 1998/01/19 00:40:20 etheisen Exp $ +.\" $Id: ms.cov,v 1.4 2000/04/09 08:25:20 millert Exp $ .\" Cover sheet. Mostly like ms cover. .\"------------ .de cov@print-title @@ -62,7 +62,7 @@ .\"------------ .de cov@print-date .SP 2 -\\*[cov*new-date] +\f[\\*[@sdf_font]]\\*[cov*new-date]\fP .. .\"----------------- .de COVEND diff --git a/gnu/usr.bin/groff/mm/mm/se_ms.cov b/gnu/usr.bin/groff/mm/mm/se_ms.cov index 11a6b53431d..d472d101117 100644 --- a/gnu/usr.bin/groff/mm/mm/se_ms.cov +++ b/gnu/usr.bin/groff/mm/mm/se_ms.cov @@ -1,3 +1,3 @@ -.\" $Id: se_ms.cov,v 1.3 1998/01/19 00:40:21 etheisen Exp $ +.\" $Id: se_ms.cov,v 1.4 2000/04/09 08:25:20 millert Exp $ .mso mm/ms.cov .nr cur*abstract-ll 11c diff --git a/gnu/usr.bin/groff/mm/tmac.m b/gnu/usr.bin/groff/mm/tmac.m index 4491e24c0df..3cbba6e0610 100644 --- a/gnu/usr.bin/groff/mm/tmac.m +++ b/gnu/usr.bin/groff/mm/tmac.m @@ -3,11 +3,11 @@ .ds RE \\$2 .. .\" -.\" $Id: tmac.m,v 1.4 1998/01/19 00:40:14 etheisen Exp $ -.@revision $Revision: 1.4 $ +.\" $Id: tmac.m,v 1.5 2000/04/09 08:25:19 millert Exp $ +.@revision $Revision: 1.5 $ .ig -Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1991-1998 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under @@ -22,13 +22,9 @@ for more details. You should have received a copy of the GNU General Public License along with groff; see the file COPYING. If not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -Almost complete. The letter format is not included. -Maybe as a separate package. -Should be better as time goes. - -Please send bugreports with examples to jh@axis.se. +Please send bugreports with examples to jh@axis.com. Naming convention stolen from mgs. Local names module*name @@ -36,6 +32,8 @@ Extern names module@name Env.var environ:name Index array!index .. +.if !\n(.g .ab These mm macros require groff. +.if \n(.C .ab The groff mm macros do not work in compatibility mode. .warn .\" ######## init ####### .\" Contents level [0:7], contents saved if heading level <= Cl @@ -52,10 +50,11 @@ Index array!index .nr Ds 1 .\" Eject page .nr Ej 0 -.\" Equation lable adjust 0=left, 1=right +.\" Equation label adjust 0=left, 1=right .nr Eq 0 .\" Em dash string -.ds EM \- +.ie n .ds EM " -- +.el .ds EM \(em .\" Footnote spacing .nr Fs 1 .\" H1-H7 heading counters @@ -113,6 +112,8 @@ Index array!index .\" Format of figure,table,exhibit,equation titles. .\" 0= ". ", 1=" - " .nr Of 0 +.\" Table of contents page numbering style +.nr Oc 0 .\" Page-number, normally same as %. .nr P 0 .\" paragraph indent @@ -129,6 +130,10 @@ Index array!index .\" Display indent .nr Si 5 .\" +.\" Current state of TOC, empty outside TC, inside +.\" it will be set to co,fg,tb,ec,ex or ap. +.ds Tcst +.\" .ds Tm \(tm .\" .\"--------------------------------------------- @@ -137,32 +142,57 @@ Index array!index .\" This is for cover macro .MT .\" .ds @language .\" -.\" Current pointsize and vertical space, always in points. -.ie r S \{\ -. nr @ps \n[S] -. nr @vs \n[S]+2 +.nr @copy_type 0 +.if r C .nr @copy_type \n[C] +.\" >0 if Subject/Date/From should be bold, roman otherwise +.ie n .ds @sdf_font R +.el .ds @sdf_font B +.if \n[@copy_type]=4 \{\ +. ls 2 +. nr Pi 10 +. nr Pt 1 .\} -.el \{\ -. nr @ps 10 -. nr @vs 12 +.\" +.\" +.if r E \{\ +. ie \n[E] .ds @sdf_font B +. el .ds @sdf_font R .\} .\" +.\" Current pointsize and vertical space, always in points. +.if !r S .nr S 10 +.ps \n[S] +.vs \n[S]+2 +.\" +.nr @ps \n[.ps] +.nr @vs \n[.v] +.if \n[D]>1 .tm @ps=\n[@ps], @vs=\n[@vs] +.\" .\" Page length -.ie r L .nr @pl \n[L] -.el .nr @pl \n[.p] +.if r L \{\ +. ie n .pl \n[L]u +. el .pl \n[L]u +.\} +.nr @pl \n[.p] +.\" .\" page width -.ie r W .nr @ll \n[W] -.el .nr @ll 6i +.ie r W \{\ +. ie n .ll \n[W]u +. el .ll \n[W]u +.\} +.el .ll 6i +.nr @ll \n[.l] +.nr @cur-ll \n[@ll] +.lt \n[@ll]u +.\" .\" page offset -.ie r O .nr @po \n[O] -.el .nr @po \n(.o +.ie r O .po \n[O] +.el \{\ +. ie n .po .75i +. el .po .963i +.\} .\" -.\" cheating... -.pl \n[@pl]u -.ll \n[@ll]u -.lt \n[@ll]u -.po \n[@po]u -.nr @cur-ll \n[@ll] +.nr @po \n[.o] .\" .\" non-zero if escape mechanism is turned off. Used by VERBON/OFF .nr @verbose-flag 0 @@ -174,18 +204,40 @@ Index array!index .\" print appendixheader, 0 == don't .nr Aph 1 .\" +.\" Current appendix text +.ds Apptext +.\" Controls the space before and after static displays if defined. +.\" Lsp is used otherwise +.\" .nr Dsp 1v +.\" +.\" Add a dot after level one heading number if >0 +.nr H1dot 1 +.\" .\" header prespace level. If level <= Hps, then two lines will be printed .\" before the header instead of one. .nr Hps 1 .\" .\" These variables controls the number of lines preceding .H. .\" Hps1 is the number of lines when level > Hps -.nr Hps1 0.5v -.if n .nr Hps1 1v +.nr Hps1 0.5 +.if n .nr Hps1 1 +.\" +.\" Hps2 is the number of lines when level <= Hps +.nr Hps2 1 +.if n .nr Hps2 2 +.\" +.\" Hss is the number of lines (Lsp) after the header. +.nr Hss 1 +.\" +.\" H1txt will be updated by .H and .HU, containing the heading text. +.\" Will also be updated in table of contents & friends .\" -.\" Hps2 is the number of lines when level >= Hps -.nr Hps2 1v -.if n .nr Hps2 2v +.ds H1txt +.\" +.\" header text for the index +.ds Index INDEX +.\" command to sort the index +.ds Indcmd sort .\" .\" flag for mkindex .if !r Idxf .nr Idxf 0 @@ -195,6 +247,9 @@ Index array!index .ds Liex Exhibit .ds Liec Equation .ds Licon CONTENTS +.\" Flag for space between mark and prefix 1==space, 0==no space +.\" Can also be controlled by using '.LI mark 2' +.nr Limsp 1 .\" .\" Lsp controls the height of an empty line. Normally 0.5v .\" Normally used for nroff compatibility. @@ -269,6 +324,12 @@ Index array!index .ds Letns!13 Complete Memorandum to .ds Letns!14 CC: .\" +.\" Text printed below the footer. Controlled by @copy_type (C). +.ds Pg_type!0 +.ds Pg_type!1 OFFICIAL FILE COPY +.ds Pg_type!2 DATE FILE COPY +.ds Pg_type!3 D\ R\ A\ F\ T +.ds Pg_type!4 D\ R\ A\ F\ T .\" Max lines in return address .nr Letwam 14 .\"-------------------------- @@ -276,9 +337,20 @@ Index array!index .\" what macros is used. .nr .mgm 1 .\" +.\" Due to security problems with groff I had to rewrite +.\" the reference system. It's not as elegant as before, you +.\" have to run groff with '-z -rRef=1' and put stderr into the filename +.\" for .INITR +.\" +.\" Output references to stderr if non-zero +.ie !r Ref \{\ +. nr Ref 0 +.\} +.el .warn 0 +.\" .\"--------------------------------------------- .\" set local variables. -.ie d @language .mso mm/\\*[@language]_locale +.ie d @language .mso mm/\*[@language]_locale .el .mso mm/locale .\"--------------------------------------------- .if \n[D] .tm Groff mm, version \*[RE]. @@ -291,8 +363,8 @@ Index array!index .el 'nh 'in 0 'ti 0 -'ps \\n[@ps] -'vs \\n[@vs] +.ps \\n[@ps]u +.vs \\n[@vs]u .. .de @warning 'tm WARNING:(\\n[.F]) input line \\n[.c]:\\$* @@ -345,12 +417,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de P .\" skip P if previous heading .ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* . if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c .\} .el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* . if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c .\} @@ -360,12 +432,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de nP .\" skip P if previous heading .ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* \\n[H2].\\n+[par*number2]\ \ \c .\} .el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* \\n[H2].\\n+[par*number2]\ \ \c .\} @@ -468,14 +540,28 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" Hope this doesn't break anything else :-) .\" Don't break if arg_4 is a '1'. .if ''\\$4' .br -.if !''\\$1' .nr @ll \\$1 -.if !''\\$2' .nr @pl \\$2 -.if !''\\$3' .nr @po \\$3 -.ll \\n[@ll]u -.lt \\n[@ll]u -.po \\n[@po]u -.pl \\n[@pl]u -.nr @cur-ll \\n[@ll] +.ie !''\\$1' \{\ +. ll \\$1 +. nr @ll \n[.l] +. nr @cur-ll \\n[@ll] +. lt \\n[@ll]u +.\} +.el \{\ +. ll \\n[@ll]u +. lt \\n[@ll]u +.\} +.\" +.ie !''\\$2' \{\ +. pl \\$2 +. nr @pl \n[.p] +.\} +.el .pl \\n[@pl]u +.\" +.ie !''\\$3' \{\ +. po \\$3 +. nr @po \n[.o] +.\} +.el .po \\n[@po]u 'in 0 .pg@move-trap .. @@ -529,28 +615,32 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" .\" set point size .if !'\\*[misc*a]'C' \{\ -. ie '\\*[misc*a]'P' .nr @ps \\n[misc*S-ps] +. ie '\\*[misc*a]'P' .ps \\n[misc*S-ps]u . el \{\ -. ie '\\*[misc*a]'D' .nr @ps 10 -. el .nr @ps \\*[misc*a] +. ie '\\*[misc*a]'D' .ps \\n[@ps]u +. el .ps \\*[misc*a] +. if \\n[D]>2 .tm S: .ps \\*[misc*a] . \} .\} .\" .\" set vertical spacing .if !'\\*[misc*b]'C' \{\ -. ie '\\*[misc*b]'P' .nr @vs \\n[misc*S-vs] +. ie '\\*[misc*b]'P' .vs \\n[misc*S-vs]u . el \{\ -. ie '\\*[misc*b]'D' .nr @vs \\n[@ps]+2 -. el .nr @vs \\*[misc*b] +. ie '\\*[misc*b]'D' .vs \\n[.ps]u+2p +. el .vs \\*[misc*b] +. if \\n[D]>2 .tm S: .vs \\*[misc*b] . \} .\} -'ps \\n[@ps] -'vs \\n[@vs] -.if \\n[D]>1 .tm point-size \\n[@ps] (\\n[.s]), vertical spacing \\n[@vs] (\\n[.v]) +.nr @ps \\n[.ps] +.nr @vs \\n[.v] +.\" +.if \\n[D]>1 .tm S(\\$*): ma:\\*[misc*a], mb:\\*[misc*b] => ps:\\n[@ps]u, vs:\\n[@vs]u .nr misc*S-ps \\n[misc*S-ps1] .nr misc*S-vs \\n[misc*S-vs1] .nr misc*S-ps1 \\n[@ps] .nr misc*S-vs1 \\n[@vs] +.pg@move-trap .. .\"------------ .de HC @@ -620,6 +710,140 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ev .nr @verbose-flag 0 .. +.\" ######## module pict ################# +.nr pict*width 0 +.nr pict*height 0 +.nr pict*mode 0 +.nr pict*ind 0 +.nr pict*id 0 1 +.\" I assume that the number variable pict*id is the same +.\" between two runs. +.de PIC +.br +.nr pict*ind 0 +.nr pict*box 0 +.while \\n[.$]>0 \{\ +. if '-B'\\$1' \{\ +. nr pict*box 1 +. shift +. continue +. \} +. if '-L'\\$1' \{\ +. nr pict*mode 0 +. shift +. continue +. \} +. if '-R'\\$1' \{\ +. nr pict*mode 1 +. shift +. continue +. \} +. if '-I'\\$1' \{\ +. nr pict*ind (m;\\$2) +. nr pict*mode 2 +. shift 2 +. continue +. \} +. if '-C'\\$1' \{\ +. nr pict*mode 3 +. shift +. continue +. \} +. ds pict*f \\$1 +. nr pict*id +1 +. shift +. if \\n[.$]>0 \{\ +. nr pict*width (i;\\$1) +. shift +. \} +. if \\n[.$]>0 \{\ +. nr pict*height (i;\\$1) +. shift +. \} +.\} +.if \\n[Ref]>0 \{\ +. tm .\\\\" PIC id \\n[pict*id] +. tm .\\\\" PIC file \\*[pict*f] +.\} +.if d pict*file!\\n[pict*id] \{\ +. ds pict*f \\*[pict*file!\\n[pict*id]] +. nr pict*llx \\n[pict*llx!\\n[pict*id]] +. nr pict*lly \\n[pict*lly!\\n[pict*id]] +. nr pict*urx \\n[pict*urx!\\n[pict*id]] +. nr pict*ury \\n[pict*ury!\\n[pict*id]] +. \" +. nr pict*w (p;\\n[pict*urx]-\\n[pict*llx]) +. if \\n[pict*w]<0 .nr pict*w 0-\\n[pict*w] +. nr pict*h (p;\\n[pict*ury]-\\n[pict*lly]) +. if \\n[pict*h]<0 .nr pict*h 0-\\n[pict*h] +. if \\n[pict*width]>0 \{\ +. nr pict*rs (u;1000*\\n[pict*width]/\\n[pict*w]) +. nr pict*w (u;\\n[pict*w]*\\n[pict*rs]/1000) +. nr pict*h (u;\\n[pict*h]*\\n[pict*rs]/1000) +. \} +. if \\n[pict*height]>0 \{\ +. nr pict*rs (u;1000*\\n[pict*height]/\\n[pict*h]) +. nr pict*h (u;\\n[pict*h]*\\n[pict*rs]/1000) +. \} +. if '0'\\n[pict*mode]' \{\ +. nr pict*in \\n[.i]u +. \} +. if '1'\\n[pict*mode]' \{\ +. nr pict*in (u;\\n[.l]-\\n[.i]-\\n[pict*w]) +. \} +. if '2'\\n[pict*mode]' \{\ +. nr pict*in \\n[pict*ind]u +. \} +. if '3'\\n[pict*mode]' \{\ +. nr pict*in (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2) +. \} +. ds pict*h " +. if \\n[pict*h]>0 .ds pict*h \\n[pict*h] +. \" +. ne \\n[pict*h]u +. \" +. \" these lines are copied and modified from tmac.pspic. +. \" Originally written by James Clark +. br +. ie \\n[pict*box]>0 \{\ +\h'\\n[pict*in]u'\ +\Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\ +\v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \ +\\n[pict*llx] \\n[pict*lly] \\n[pict*urx] \\n[pict*ury] \\n[pict*w] \\n[pict*h]' +.\} +. el \{\ +\h'\\n[pict*in]u'\ +\X'ps: invis'\ +\Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\ +\X'ps: endinvis'\ +\v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \ +\\n[pict*llx] \\n[pict*lly] \\n[pict*urx] \\n[pict*ury] \\n[pict*w] \\n[pict*h]' +. \} +. br +. sp \\n[pict*h]u +.\} +.. +.\" external picture +.de EPIC +.if \\n[.$]< 2 .@error "EPIC: Not enough arguments" +.nr pict*w \\$1 +.nr pict*h \\$2 +.ds pict*name "External picture +.if !''$3' .ds pict*name \\$3 +\& +.br +.ne \\n[pict*h]u +.sp \\n[pict*h]u +.nr pict*ind (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2) +.in +\\n[pict*ind]u +\D'l \\n[pict*w]u 0'\ +\D'l 0 -\\n[pict*h]u'\ +\D'l -\\n[pict*w]u 0'\ +\D'l 0 \\n[pict*h]u'\ +\v'-(u;\\n[pict*h]/2)'\ +\h'(u;(\\n[pict*w]-\w'\\*[pict*name]'/2))'\\*[pict*name] +.in +.. .\" ######## module acc ################# .\"----------- .\" accents. These are copied from mgs, written by James Clark. @@ -683,6 +907,14 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr hd*i 1 1 .while \\n+[hd*i]<8 .if \\n[hd*level]<\\n[hd*i] .nr H\\n[hd*i] 0 1 .\" +.\" save last text for use in TP +.if \\n[hd*level]=1 .ds H1txt \\$2\\$3 +.\" +.\" This is a little fix to be able to get correct H1 heading number +.\" in page headers. +.nr H1h \\n[H1] 1 +.if \\n[hd*level]=1 .nr H1h +1 +.\" .\" Check if it's time for new page. Only if text has .\" appeared before. .if \\n[Ej]&(\\n[Ej]>=\\n[hd*level])&(\\n[nl]>\\n[hd*cur-bline]) .pg@next-page @@ -691,8 +923,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr H\\n[hd*level] +1 .\" .\" update pagenumber if section-page is used -.if \\n[hd*level]=1 .hd@set-page \\n[%] -.\" +.if (\\n[hd*level]=1)&(\\n[Sectp]>0) .hd@set-page 1 .\" .\" hd*mark is the text written to the left of the header. .ds hd*mark \\n[H1]. @@ -703,15 +934,13 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .while \\n+[hd*i]<8 .if \\n[hd*level]>(\\n[hd*i]-1) .as hd*mark .\\n[H\\n[hd*i]] .if \\n[Ht] .ds hd*mark \\n[H\\n[hd*level]]. .\" -.\" toc-mark is sent to the table of contents -.ds hd*toc-mark \\*[hd*mark] +.\" special case, no dot after level one heading if not H1dot true +.if (\\n[hd*level]=1)&(\\n[H1dot]=0) .ds hd*mark \\n[H1] +.\" .as hd*mark \ \ \" add spaces between mark and heading -.if !\\n[hd*arg1] \{\ -. ds hd*mark\" no mark for unnumbered -. ds hd*toc-mark -.\} +.if !\\n[hd*arg1] .ds hd*mark\" no mark for unnumbered .\" -.if \\n[D]>1 .tm At header \\*[hd*toc-mark] "\\$2" +.if \\n[D]>1 .tm At header \\*[hd*mark] "\\$2" .nr hd*htype 0 \" hd*htype = check break and space . \" 0 = run-in, 1 = break only, 2 = space .if \\n[hd*level]<=\\n[Hb] .nr hd*htype 1 @@ -720,7 +949,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ie (\\n[hd*htype]=0)&(\w@\\$2@) .ds hd*suf-space " \" .el .ds hd*suf-space .nr hd*need 2v \" hd*need = header need space -.if \\n[hd*htype]<2 .nr hd*need +\\n[Lsp]u \" add some extra space .\"---------- user macro HX ------------ .\" User exit macro to override numbering. .\" May change hd*mark (}0), hd*suf-space (}2) and hd*need (;3) @@ -728,8 +956,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if d HX .HX \\n[hd*level] \\n[hd*arg1] "\\$2\\$3" .\"-------------------------------------- .\" pre-space -.ie \\n[hd*level]<=\\n[Hps] .SP \\n[Hps2]u -.el .SP \\n[Hps1]u +.ie \\n[hd*level]<=\\n[Hps] .SP (u;\\n[Hps2]) +.el .SP (u;\\n[Hps1]) .\" .par@reset-num \\n[hd*level]\" reset numbered paragraph .\" start diversion to measure size of header @@ -738,8 +966,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .br .di .rm hd*div -.ne \\n[hd*need]u+\\n[dn]u+.5p \" this is the needed space for a header .if \\n[hd*htype] .na \" no adjust if run-in +.if \\n[hd*htype]<2 .nr hd*need +\\n[Lsp]u \" add some extra space +.ne \\n[hd*need]u+\\n[dn]u+.5p-1v \" this is the needed space for a header .\" .\" size and font calculations .hd@split hd*font \\n[hd*level] HF \\*[HF]\" get font for this level @@ -779,21 +1008,16 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .el \\$2\\$3\\*[hd*suf-space]\&\c .ft 1 .\" restore pointsize and vertical size. -.ps \\n[@ps] -.vs \\n[@vs] +.ps \\n[@ps]u +.vs \\n[@vs]u .\" .\" table of contents -.if (\\n[hd*level]<=\\n[Cl])&\w@\\$2@ \{\ -. ie \\n[Sectp] \{\ -. toc@save \\n[hd*level] "\\*[hd*toc-mark]" "\\$2" \\*[hd*sect-pg] -. \} -. el .toc@save \\n[hd*level] "\\*[hd*toc-mark]" "\\$2" \\n[%] -.\} +.if (\\n[hd*level]<=\\n[Cl])&\w@\\$2@ .toc@entry \\n[hd*level] "\\$2" .\" set adjust to previous value .SA .\" do break or space .if \\n[hd*htype] .br -.if \\n[hd*htype]>1 .SP \\n[Lsp]u +.if \\n[hd*htype]>1 .SP (u;\\n[Lsp]*\\n[Hss]) .if \\n[hd*htype] \{\ . \" indent if Hi=1 and Pt=1 . if (\\n[Hi]=1)&(\\n[Pt]=1) .ti +\\n[Pi]n @@ -827,11 +1051,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" set page-nr, called from header .\" .de hd@set-page -.if \\n[.$]>0 .nr hd*h1-page \\$1 -.\" -.ie \\n[Sectp] .nr P \\n[%]-\\n[hd*h1-page]+1 -.el .nr P \\n[%] .\" +.ie \\n[.$]>0 .nr P \\$1 +.el .nr P +1 .\" Set section-page-string .ds hd*sect-pg \\n[H1]-\\n[P] .if \\n[Sectp]>1 .if '\\n[H1]'0' .ds hd*sect-pg " @@ -841,10 +1063,10 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .wh 0 pg@header .em pg@end-of-text .\" -.ds pg*header ''- % -'' +.ds pg*header ''- \\nP -'' .ds pg*footer .if \n[N]=4 .ds pg*header '''' -.if \n[N]=5 \{\ +.if (\n[N]=3):(\n[N]=5) \{\ . ds pg*header '''' . ds pg*footer ''\\*[hd*sect-pg]'' .\} @@ -869,15 +1091,16 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr pg*ps \n[@ps] .nr pg*vs \n[@vs] .\"------------------------- -.\" footer traps: set, enable and disable +.\" footer TRAPS: set, enable and disable .de pg@set-new-trap .nr pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v+\\n[pg*extra-footer-size]u) .\" -.if \\n[D]>2 .tm pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v) = \\n[pg*foot-trap] +.if \\n[D]>2 .tm pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v+\\n[pg*extra-footer-size]u) = \\n[pg*foot-trap] .\" .\" last-pos points to the position of the footer and bottom .\" block below foot-notes. .nr pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v) +.if \\n[D]>2 .tm pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v) = \\n[pg*last-pos] .. .de pg@enable-trap .wh \\n[pg*foot-trap]u pg@footer @@ -902,7 +1125,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .. .\" no header on the next page .de PGNH -.nr pg*top-enabled -1 +.nr pg*top-enabled (-1) .. .\" set first trap for pagefooter .pg@enable-top-trap @@ -936,6 +1159,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\} .\" assign current page-number to P .hd@set-page +.\" reset spacing +.nr line*lp\\n[.z] 0 +.nr line*ac\\n[.z] 0 .\" .\" suppress pageheader if pagenumber == 1 and N == [124] .if \\n[pg*top-enabled] \{\ @@ -1024,6 +1250,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . el .tl \\*[pg*even-footer] . ie (\\n[%]=1)&(\\n[N]=1) .tl \\*[pg*header] . el .tl \\*[pg*footer] +. tl ''\\*[Pg_type!\\n[@copy_type]]'' .\} .ev .\" be sure that floating displays and footnotes will be @@ -1044,12 +1271,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] 'in 0 'ti 0 .ie \\n[Pgps] \{\ -. ps \\n[@ps] -. vs \\n[@vs] +. ps \\n[@ps]u +. vs \\n[@vs]u .\} .el \{\ -. ps \\n[pg*ps] -. vs \\n[pg*vs] +. ps \\n[pg*ps]u +. vs \\n[pg*vs]u .\} .lt \\n[@ll]u .. @@ -1258,8 +1485,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ds pg*mul-fam \\n[.fam] .nr pg*mul-font \\n[.f] .ev pg*mul-ev -.ps \\n[@ps] -.vs \\n[@vs] +.ps \\n[@ps]u +.vs \\n[@vs]u .fam \\*[pg*mul-fam] .ft \\n[pg*mul-font] .fi @@ -1328,8 +1555,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .el 'hy 0 .ll \\n[@cur-ll]u .lt \\n[@cur-ll]u -.ps (\\n[@ps]-2) -.vs (\\n[@vs]-1) +.ps (p;\\n[@ps]u-2) +.vs (p;\\n[@vs]u-1) .. .\"----------------- .\" set footnote format @@ -1390,6 +1617,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .. .\"----------------- .\" begin footnote +.\" Change environment, switch to diversion and print the foot-note mark. .de FS .if \\n[ft*busy] .@error "FS: missing FE" .nr ft*busy 1 @@ -1418,6 +1646,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .. .\"----------------- .\" end footnote +.\" End the diversion, back to previous environment, and adjust +.\" the trap to the new foot-note size. .de FE .nr ft*busy 0 .br @@ -1425,6 +1655,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] 'in 0 'nf .if \\n[@pl]u<\\n[dn]u .@error "FE: too big footnote" +.if !d ft*div .nr dn +1v +.if \\n[D]>3 .tm FE: foot-trap=\\n[pg*foot-trap] .d=\\n[.d] dn=\\n[dn] .ie (\\n[pg*foot-trap]u-\\n[.d]u)<\\n[dn]u \{\ . da ft*next-div . ft*tmp-div @@ -1496,14 +1728,13 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ds@set-format \\$@ .\" .nr df*old-ll \\n[.l] -.nr ds*i \\n[.i] .nr ds*ftmp \\n[.f] .misc@ev-keep df*ev .ft \\n[ds*ftmp] .\" .init@reset .di df*div -'in \\n[ds*i]u +'in 0 .\" .ds@set-new-ev \\n[df*old-ll] .SP \\n[Lsp]u @@ -1533,6 +1764,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"------------- .\" called by end-of-text .de df@eot-print +.br .if \\n[df*o-fnr]<=\\n[df*fnr] \{\ . if \\n[D]>2 .tm Print remaining displays. .\" still some floats left, make non-empty environment @@ -1557,16 +1789,34 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if !\\n[ds*float-busy] \{\ . nr ds*float-busy 1 .\" at .DE -. if (\\$1=1)&((\\n[Df]%2)=1) \{\ +. if \\n[D]>3 .tm print-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] +. \" Df = 1 or 5 +. if (\\$1=1)&((\\n[Df]=1):(\\n[Df]=5)) \{\ +. if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\ +. \" Print only new displays. +. if \\n[df*o-fnr]=\\n[df*fnr] \{\ +. br +. ds@print-one-float +. \} +. \} +. \} +. \" Df = 3 +. if (\\$1=1)&(\\n[Df]=3) \{\ . if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\ -. \" Df = 1,3 or 5 +. br . ds@print-one-float . \} . \} .\" print all if Df<2 and end of section -. if (\\$1=2)&(\\n[Df]<2) .ds@print-all-floats +. if (\\$1=2)&(\\n[Sectp]>0)&(\\n[Df]<2) \{\ +. br +. ds@print-all-floats +. \} .\" print all if end of document. Where should they go instead? -. if \\$1=3 .ds@print-all-floats +. if \\$1=3 \{\ +. br +. ds@print-all-floats +.\} .\" new page . if (\\$1=4)&(\\n[Df]>1) \{\ . if \\n[Df]=2 .ds@print-one-float @@ -1580,19 +1830,24 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\} .. .\"--------------- +.\" DF out .\" print a floating diversion -.de ds@output-div +.de ds@output-float .nr df*old-ll \\n[.l] +.nr df*old-in \\n[.i] .ev ds*fev -.in 0 .nf .nr df*i \\n[df*o-fnr] .nr df*f \\n[df*format!\\n[df*i]] .\" +.in \\n[df*old-in]u +.if \\n[df*f]=1 'in +\\n[Si]n +.if \\n[df*f]>=2 'in 0 .if \\n[df*f]=2 'ce 9999 -.if \\n[df*f]=3 'in (u;(\\n[df*old-ll]-\\n[df*width!\\n[df*i]])/2) +.if \\n[df*f]=3 'in (u;(\\n[.l]-\\n[df*width!\\n[df*i]])/2) .if \\n[df*f]=4 'rj 9999 -.if \\n[df*f]=5 'in (u;\\n[df*old-ll]-\\n[df*width!\\n[df*i]]) +.if \\n[df*f]=5 'in (u;\\n[.l]-\\n[df*width!\\n[df*i]]) +.\" .\" .df*fdiv!\\n[df*o-fnr] .\" @@ -1609,8 +1864,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" print one floating display if there is one. .de ds@print-one-float .if \\n[df*o-fnr]<=\\n[df*fnr] \{\ +. if \\n[D]>3 .tm print-one-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] . if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page -. ds@output-div +. ds@output-float . if \\n[De] .pg@next-page .\} .. @@ -1619,8 +1875,11 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" if De>0 do a page eject between the floats. .de ds@print-all-floats .while \\n[df*o-fnr]<=\\n[df*fnr] \{\ +. if \\n[D]>3 .tm print-all-floats: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] . if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page -. ds@output-div +. br +\c +. ds@output-float . if \\n[De] .pg@next-page .\} .. @@ -1628,8 +1887,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" print as many floats as will fit on the current page .de ds@print-this-page .while \\n[df*o-fnr]<=\\n[df*fnr] \{\ +. if \\n[D]>3 .tm print-this-page: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] . if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .break -. ds@output-div +. ds@output-float .\} .. .\"--------------------------------------------------- @@ -1668,13 +1928,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" .ie \\n[ds*fill] 'fi .el 'nf -.\" -.if \\n[ds*format]=1 \{\ -. ll -\\n[Si]n -. lt -\\n[Si]n -' in +\\n[Si]n -.\} -.if (\\n[ds*format]=3):(\\n[ds*format]=5) 'in 0 .. .\"-------------------------------------------------------- .nr ds*format 0\" dummy value for .En/.EQ @@ -1706,6 +1959,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ds@set-format \\$@ .\" .nr ds*old-ll \\n[.l] +.nr ds*old-in \\n[.i] .misc@push ds-ll \\n[.l] .misc@push ds-form \\n[ds*format] .nr ds*i \\n[.i] @@ -1714,7 +1968,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ft \\n[ds*ftmp] .\" .init@reset -'in \\n[ds*i]u +.\" indent in a diversion doesn't seem like a good idea. +'in 0 .di ds*div!\\n[ds*snr] .\" .ds@set-new-ev \\n[ds*old-ll] @@ -1725,30 +1980,41 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n-[ds*lvl]<0 .@error "DE: no corresponding DS" .br .di +.\" ********** .nr ds*width \\n[dl] .nr ds*height \\n[dn] .misc@pop-nr ds-ll ds*old-ll .misc@pop-nr ds-form ds*format -.if (\\n[ds*format]>=2)&(\\n[ds*width]>\\n[ds*old-ll]) \{\ -. @error "DE: display too wide for current line-length" -.\} .\" -'in 0 +.\" ********** 'nf +.\" calculate needed space +.nr ds*need \\n[ds*height] +.nr ds*i \\n[pg*foot-trap]-\\n[pg*header-size]v-\\n[pg*extra-header-size]v +.if (\\n[ds*height]>\\n[ds*i])&(\\n[.t]<(\\n[ds*i]/2)) .nr ds*need \\n[.t]u+1v +.if (\\n[ds*height]<\\n[ds*i])&(\\n[.t]<(\\n[ds*height])) .nr ds*need \\n[.t]u+1v +.\" Eject page if display will fit one page and +.\" there are less than half of the page left. +.if \\n[ds*need] .ne \\n[ds*need]u +.\" +.\" check if pending equation label +.eq@check \\n[ds*need] +'in \\n[ds*old-in]u +.if \\n[ds*format]=1 'in \\n[ds*old-in]u+\\n[Si]n +.if \\n[ds*format]>=2 'in 0 .if \\n[ds*format]=2 'ce 9999 -.if \\n[ds*format]=3 'in (u;(\\n[ds*old-ll]-\\n[ds*width])/2) +.if \\n[ds*format]=3 'in (u;(\\n[.l]-\\n[ds*width])/2) .if \\n[ds*format]=4 'rj 9999 -.if \\n[ds*format]=5 'in (u;\\n[ds*old-ll]-\\n[ds*width]) +.if \\n[ds*format]=5 'in (u;\\n[.l]-\\n[ds*width]) +.\" ********** .\" .\" Print static display -.\" Eject page if display will fit one page and -.\" there are less than half of the page left. -.nr ds*i \\n[pg*foot-trap]-\\n[pg*header-size]v-\\n[pg*extra-header-size]v -.if (\\n[ds*height]>\\n[ds*i])&(\\n[.t]<(\\n[ds*i]/2)) .ne \\n[.t]u+1v -.if (\\n[ds*height]<\\n[ds*i])&(\\n[.t]<(\\n[ds*height])) .ne \\n[.t]u+1v -.if \\n[Ds] .SP \\n[Lsp]u +.nr ds*i \\n[Lsp] +.if r Dsp .nr ds*i \\n[Dsp] +.\" +.if \\n[Ds] .SP \\n[ds*i]u .ds*div!\\n[ds*snr] -.if \\n[Ds] .SP \\n[Lsp]u +.if \\n[Ds] .SP \\n[ds*i]u .\" .if \\n[ds*format]=2 'ce 0 .if \\n[ds*format]=4 'rj 0 @@ -1816,8 +2082,10 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[li*type]=5 .ds li*c-mark <\\n[li*cnt!\\n[li*lvl]]> .if \\n[li*type]=6 .ds li*c-mark {\\n[li*cnt!\\n[li*lvl]]} .if \\n[.$]=1 .ds li*c-mark \\$1 -.if \\n[.$]=2 .ds li*c-mark \\$1\ \\*[li*c-mark] -.if '\\*[li*c-mark]'\ ' .ds li*c-mark +.ie \\n[.$]=2 \{\ +. ie (\\$2=2):(\\n[Limsp]=0) .ds li*c-mark \\$1\\*[li*c-mark] +. el .ds li*c-mark \\$1\ \\*[li*c-mark] +.\} .\" .\" determine where the text begins .nr li*text-begin \\n[li*tind]>?\w@\\*[li*c-mark]\ @ @@ -2016,54 +2284,27 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" ####### module eq ####################################### .\" .nr eq*number 0 1 +.ds eq*label .de EQ -.ds eq*lable "\\$1 -.di eq*div -.misc@ev-keep eq*ev -.in 0 -.nf +.ds eq*label "\\$1 .. -.de EN -.br -.di -.ta -.\" equation with lable. -.if \\n[dl] \{\ -. br -. chop eq*div +.de eq@check +.if !'\\*[eq*label]'' \{\ +. mk +' sp (u;\\$1/2-.45v) . ie (\\n[Eq]%2) \{\ -. \" lable to the left -. if \\n[ds*format]<2 \{\ -. ta (u;(\\n[.l]/7)+\\n[.i]) \\n[.l]u\" L -\\*[eq*lable]\t\\*[eq*div]\t\& -. \} -. if (\\n[ds*format]=2):(\\n[ds*format]=3) \{\ -. ta (u;(\\n[.l]-\\n[.i])/2+\\n[.i])C \\n[.l]u\" C -\\*[eq*lable]\t\\*[eq*div]\t\& -. \} -. if \\n[ds*format]>3 \{\ -. ta \\n[.l]uR\" R -\\*[eq*lable]\t\\*[eq*div] -. \} +. \" label to the left +\h'|0'\\*[eq*label]\c . \} . el \{\ -. \" lable to the right -. if \\n[ds*format]<2 \{\ -. ta \\n[.l]uR\" L -\\*[eq*div]\t\\*[eq*lable] -. \} -. if (\\n[ds*format]=2):(\\n[ds*format]=3) \{\ -. ta (u;(\\n[.l]-\\n[.i])/2+\\n[.i])C \\n[.l]uR\" C -\t\\*[eq*div]\t\\*[eq*lable] -. \} -. if \\n[ds*format]>3 \{\ -. ta (\\n[.l]u-\w@\\*[eq*lable]@u-1m)R \\n[.l]uR\" R -\t\\*[eq*div]\t\\*[eq*lable] -. \} +. \" label to the right +\h'|\\n[.l]u'\\*[eq*label] . \} +. rt .\} -.TAB -.ev +.ds eq*label +.. +.de EN .. .\"########### module toc ################### .\" table of contents @@ -2084,16 +2325,26 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \w@\\$3@>0 .nr toc*tlevel \\$3 .if \w@\\$4@>0 .nr toc*tab \\$4 .if \\n[pg*cols-per-page]>1 .1C +.ds H1txt \\*[Licon] +.ds Tcst co .pg@clear-hd +.EF "" +.OF "" .pg@next-page -.pg@clear-ft .\"------------- .if d Ci .toc@read-Ci \\*[Ci] .nf .in 0 -.nr toc*pn 0 1 -.af toc*pn i -.PF "''\\\\\\\\n+[toc*pn]''" +.ie \\n[Oc] .hd@set-page 1 +.el \{\ +. nr toc*pn 1 1 +. af toc*pn i +. aln ;g toc*pn +. PF "''\\\\\\\\n[toc*pn]''" +. am pg@header +. nr toc*pn +1 +\\.. +.\} .nr toc*i 4 1 .while \\n+[toc*i]<10 \{\ . if !'\\$\\n[toc*i]'' \{\ @@ -2111,11 +2362,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . SP 3 .\} .if d toc*list .toc*list +.br .\" print LIST OF XXX -.if d lix*dsfg .lix@print-ds fg "\\*[Lf]" -.if d lix*dstb .lix@print-ds tb "\\*[Lt]" -.if d lix*dsec .lix@print-ds ec "\\*[Le]" -.if d lix*dsex .lix@print-ds ex "\\*[Lx]" +.if d lix*dsfg .lix@print-ds fg FG "\\*[Lf]" \\n[.$] +.if d lix*dstb .lix@print-ds tb TB "\\*[Lt]" \\n[.$] +.if d lix*dsec .lix@print-ds ec EC "\\*[Le]" \\n[.$] +.if d lix*dsex .lix@print-ds ex EX "\\*[Lx]" \\n[.$] .. .\"----------- .\" .toc@read-Ci lev1 lev2 lev3 lev4 ... lev7 @@ -2126,12 +2378,20 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\} .. .\"----------- +.de toc@entry +.ie \\n[Sectp] \{\ +. toc@save \\$1 "\\*[hd*mark]" "\\$2" \\*[hd*sect-pg] +.\} +.el .toc@save \\$1 "\\*[hd*mark]" "\\$2" \\n[%] +.. +.als )E toc@entry +.\"----------- .de toc@save .\" collect maxsize of mark if string Ci don't exist. .if !d Ci \{\ . if !r toc*hl!\\$1 .nr toc*hl!\\$1 0 . if \\n[toc*hl!\\$1]<=\w@\\$2@ \{\ -. nr toc*hl!\\$1 \w@\\$2@u+1m +. nr toc*hl!\\$1 \w@\\$2@u . \} .\} .am toc*list @@ -2143,7 +2403,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" level mark text pagenumber .de toc@set .if \\$1<=\\n[toc*slevel] .SP \\n[toc*spacing]u -.ne 2v .na .fi .nr toc*ind 0 @@ -2164,6 +2423,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr toc*i \\n[toc*hl!\\$1]-\w@\\$2@ .\" .ll \\n[@ll]u-\w@\\$4@u-2m +.ne 2v .\" ragged right --------------------------------- .ie \\$1>\\n[toc*tlevel] \{\ \\$2 @@ -2225,26 +2485,26 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ie !\\n[Of] .ds lix*ds-form .\ \ \" .el .ds lix*ds-form "\ \(em\ \" .nr lix*in \\n[.i] -.ds lix*lable \\*[Li\\$1]\ \\*[lix*numb]\\*[lix*ds-form] +.ds lix*label \\*[Li\\$1]\ \\*[lix*numb]\\*[lix*ds-form] .if !'\\$5'' \{\ -. if !0\\$6 .ds lix*lable \\*[Li\\$1]\ \\$5\\*[lix*numb]\\*[lix*ds-form] -. if 0\\$6=1 .ds lix*lable \\*[Li\\$1]\ \\*[lix*numb]\\$5\\*[lix*ds-form] -. if 0\\$6=2 .ds lix*lable \\*[Li\\$1]\ \\$5\\*[lix*ds-form] +. if !0\\$6 .ds lix*label \\*[Li\\$1]\ \\$5\\*[lix*numb]\\*[lix*ds-form] +. if 0\\$6=1 .ds lix*label \\*[Li\\$1]\ \\*[lix*numb]\\$5\\*[lix*ds-form] +. if 0\\$6=2 .ds lix*label \\*[Li\\$1]\ \\$5\\*[lix*ds-form] .\} -.ie \\n[Sectp] .ds lix*pgnr \\*[hd*sect-pg] -.el .ds lix*pgnr \\n[%] .\" print line if not between DS/DE -.ie \\n[ds*lvl]<1 .lix@print-text "\\*[lix*lable]" "\\*[lix*text]" -.el .lix@embedded-text "\\*[lix*lable]" "\\*[lix*text]" +.ie \\n[ds*lvl]<1&\\n[df*float]=0 \{\ +. lix@print-text "\\*[lix*label]" "\\*[lix*text]" \\$1 \\$2 \\$7 +.\} +.el \{\ +. lix@embedded-text "\\*[lix*label]" "\\*[lix*text]" \\$1 \\$2 \\$7 +.\} .\" -.\" save line for LIST OF XXX -.if !r lix*wth\\$1 .nr lix*wth\\$1 0 -.if \w@\\*[lix*lable]@>\\n[lix*wth\\$1] .nr lix*wth\\$1 \w@\\*[lix*lable]@ -.if \\n[\\$2] .lix@ds-save \\$1 \\*[lix*pgnr] "\\$4" "\\*[lix*lable]" -.if !'\\$7'' .SETR \\$7 \\*[lix*numb] .. .\"----------- +.\" label text type stringvar refname .de lix@print-text +.ie \\n[Sectp] .ds lix*pgnr \\*[hd*sect-pg] +.el .ds lix*pgnr \\n[%] .SP \\n[Lsp]u .misc@ev-keep lix .init@reset @@ -2257,31 +2517,58 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] \fB\\$1\fP\\$2 .br .ev +.\" save line for LIST OF XXX, wth is the width of the label +.if !r lix*wth\\$3 .nr lix*wth\\$3 0 +.\" find the maximum width +.if \w@\\*[lix*label]@>\\n[lix*wth\\$3] .nr lix*wth\\$3 \w@\\*[lix*label]@ +.if \\n[\\$4] .lix@ds-save \\$3 \\*[lix*pgnr] "\\*[lix*text]" "\\*[lix*label]" +.\" save reference to the figure +.if !'\\$5'' .SETR \\$5 \\*[lix*numb] .. .\" hide printout until diversion is evaluated .de lix@embedded-text -\!.SP \\n[Lsp]u +\!.ie \\\\n[Sectp] .ds lix*pgnr \\\\*[hd*sect-pg] +\!.el .ds lix*pgnr \\\\n[%] +\!.SP \\\\n[Lsp]u \!.misc@ev-keep lix +\!.ll \\n[.l]u \!.init@reset -\!.br -\!.ie (\w@\\$1\\$2@)>(\\n[.l]-\\n[.i]) \{\ +\!.fi +\!.ie (\w@\\$1\\$2@)>(\\\\n[.l]-\\\\n[.i]) \{\ . in +\w@\\$1@u \!. ti 0 +\!\fB\\$1\fP\\$2 \!.\} -\!.el .ce 1 +\!.el \{\ +. ce 1 \!\fB\\$1\fP\\$2 +\!.\} \!.br \!.ev +.\" save line for LIST OF XXX, wth is the width of the label +\!.if !r lix*wth\\$3 .nr lix*wth\\$3 0 +.\" find the maximum width +\!.if \w@\\*[lix*label]@>\\\\n[lix*wth\\$3] .nr lix*wth\\$3 \w@\\*[lix*label]@ +\!.if \\\\n[\\$4] .lix@ds-save \\$3 \\\\*[lix*pgnr] "\\*[lix*text]" "\\*[lix*label]" +.\" save reference to the figure +\!.if !'\\$5'' .SETR \\$5 \\*[lix*numb] .. .\"------------ .\" print complete list of XXXX .de lix@print-ds .\" arg: fg,tb,ec,ex text +.ds H1txt \\$3 +.ds Tcst \\$1 .if !\\n[Cp] .pg@next-page .\" print LIST OF XXXX -.ce -\\$2 -.SP 3 +.\" execute user-defined macros +.if \\$4<=4 .if d TX\\$2 .TX\\$2 +.ie d TY\\$2 .if \\$4<=4 .TY\\$2 +.el \{\ +. ce +\\$3 +. SP 3 +.\} .in \\n[lix*wth\\$1]u .fi .lix*ds\\$1 @@ -2299,9 +2586,16 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" lix@dsln type pagenumber text headernr .de lix@dsln .nr lix*i \\n[lix*wth\\$1]-\w@\\$4@ -.ne 2v -.nr lix*sep \\n[.l]-\\n[lix*i]-\w'\\$4\\$3\\$2'-1m-1n-\\n[.i] -\h'\\n[lix*i]u'\\$4\\$3\h'1n'\l'\\n[lix*sep]u.'\h'1m'\\$2 +.ne 4v +.ll \\n[@ll]u-\w@\\$4@u-\w@\\$2@u-2m +.ti -\\n[lix*wth\\$1]u +\\$4 +.sp -1 +\\$3\h'1m' +.sp -1 +.ll +.nr lix*sep (u;\\n[.l]-\\n[.n]-\\n[.i]-\w@\\$2@)-1m +\h'|\\n[.n]u'\l'\\n[lix*sep]u.'\h'1m'\\$2 .SP \\n[toc*spacing]u .. .\"########################### module fnt ############################ @@ -2366,8 +2660,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" jump to new environment. .ev box*ev .di box*div -.ps \\n[@ps] -.vs \\n[@vs] +.ps \\n[@ps]u +.vs \\n[@vs]u .in 1n .ll (u;\\n[box*wid]-1n) .hy \\n[.hy] @@ -2490,6 +2784,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr app*nr 0 1 .af app*nr A .nr app*dnr 0 1 +.nr app*flag 0 .\"------------ .\" .APP name text .\" name == "" -> autonumber @@ -2497,6 +2792,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" .if \\n[.$]<2 .@error "APP: too few arguments" .app@set-ind "\\$1" .\" +.ds Tcst ap +.ds Apptxt \\$2 +.\" .ie \\n[Aph] .app@header \\*[app*ind] "\\$2" .el .bp .app@index "\\*[app*ind]" "\\$2" @@ -2508,6 +2806,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[.$]<2 .@error "APPSK: too few arguments" .app@set-ind "\\$1" .\" +.ds Tcst ap +.ds Apptxt \\$3 +.\" .ie \\n[Aph] .app@header \\*[app*ind] "\\$3" .el .bp .app@index "\\*[app*ind]" "\\$3" @@ -2517,12 +2818,15 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de app@set-ind .ie \w@\\$1@ .ds app*ind \\$1 .el \{\ -. if !\\n[app*dnr] \{\ +. if !\\n[app*flag] \{\ . nr H1 0 1 . af H1 A +. af H1h A +. nr app*flag 1 . \} . ds app*ind \\n+[app*nr] . nr H1 \\n+[app*dnr] +. nr H1h \\n[app*dnr] .\} .\" clear lower counters .nr app*i 1 1 @@ -2544,6 +2848,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] \fB\s+2\\$2\s0\fP .SP (u;\\n[Lsp]*4) .. +.als APPX app@header .\"########################### module cov ############################ .\" title stored in diversion cov*title .\" abstract stored in diversion cov*abstract @@ -2577,9 +2882,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de AU .cov@title-end .pg@disable-top-trap -.if \\n[.$]<1 .@error "AU: no arguments" .nr cov*au +1 .nr cov*i 0 1 +.ds cov*au!\\n[cov*au]!1 .while \\n[.$]>=\\n+[cov*i] \{\ . ds cov*au!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]] .\} @@ -2603,7 +2908,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"------------------- .de AF .cov@title-end -.if \\n[.$]<1 .@error "AF: no arguments" .ds cov*firm \\$1 .. .de AST @@ -2619,9 +2923,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .. .de AE .. -.\" I am planning to use mgm some time :-) -.ie \\n[yr]<50 .ds cov*new-date \\*[MO\\n[mo]] \\n[dy], 20\\n[yr] -.el .ds cov*new-date \\*[MO\\n[mo]] \\n[dy], 19\\n[yr] +.\" I am planning to use mgm for some time :-) +.nr cov*year 1900+\n[yr] +.ds cov*new-date \*[MO\n[mo]] \n[dy], \n[cov*year] .als DT cov*new-date .de ND .ds cov*new-date \\$1 @@ -2670,30 +2974,20 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"########################### module qrf ############################ .\" forward and backward reference thru special files. .\" +.\" check if stderr-method is wanted +.\" This was needed when I discovered that groff was considered unsafe +.\" and groff -U didn't work. It's a workaround like the original +.\" index method, but not in my view elegant enough. +.\" .\" init reference system .de INITR -.if \\n[.$]<1 .@error "INITR:filename missing" -.\" ignore if INITR has already been used -.if !r qrf*pass \{\ -.\" -. ds qrf*file \\$1 -. sy test -f \\*[qrf*file].tmp -. ie \\n[systat] \{\ -. \" PASS 1 -. if \\n[D]=1 .tm PASS 1 -. if \\n[D]>1 .tm INITR: file \\*[qrf*file].tmp, PASS 1 -. nr qrf*pass 1 -. open qrf*stream \\*[qrf*file].tmp -. write qrf*stream .\\\\" references for \\*[qrf*file] -. close qrf*stream -. \} -. el \{\ -. nr qrf*pass 2 -. if \\n[D]=1 .tm PASS 2 -. if \\n[D]>1 .tm INITR: file \\*[qrf*file].tmp, PASS 2 -. sy mv \\*[qrf*file].tmp \\*[qrf*file].qrf -' so \\*[qrf*file].qrf -. \} +.ds qrf*file \\$1 +.nr qrf*pass 2 +.if \\n[D]>1 .tm INITR: source \\*[qrf*file] +.if \\n[Ref] \{\ +. tm .\\\\" Filename: \\$1 +.\} +'so \\*[qrf*file] .\} .. .\"--------------- @@ -2703,20 +2997,16 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ie !r qrf*pass .tm "SETR: No .INITR in this file" .el \{\ . ds qrf*name qrf*ref-\\$1 -.\" probably pass two if already defined -. if \\n[qrf*pass]<2 \{\ -. if \\n[D]>2 .tm SETR: ref \\*[qrf*name]=\\*[hd*toc-mark],\\n[%] -. \" heading-number -. ds \\*[qrf*name]-hn \\*[hd*toc-mark] -. \" page-number -. ds \\*[qrf*name]-pn \\n[%] -. \" -. \" append to file -. opena qrf*stream \\*[qrf*file].tmp -. write qrf*stream .ds \\*[qrf*name]-hn \\*[hd*toc-mark] -. write qrf*stream .ds \\*[qrf*name]-pn \\n[%] -. if !'\\$2'' .write qrf*stream .ds \\*[qrf*name]-xx \\$2 -. close qrf*stream +. if \\n[D]>2 .tm SETR: ref \\*[qrf*name]=\\*[hd*mark],\\n[%] +. \" heading-number +. ds \\*[qrf*name]-hn \\*[hd*mark] +. \" page-number +. ds \\*[qrf*name]-pn \\n[%] +. \" +. if \\n[Ref] \{\ +. tm .ds \\*[qrf*name]-hn \\*[hd*mark] +. tm .ds \\*[qrf*name]-pn \\n[%] +. if !'\\$2'' .tm .ds \\*[qrf*name]-xx \\$2 . \} .\} .. @@ -2727,15 +3017,11 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[.$]<1 .@error "GETST:reference name missing" .if !r qrf*pass .tm "GETST: No .INITR in this file" .ds qrf*name qrf*ref-\\$1 -.ie \\n[qrf*pass]=2 \{\ -. ie !d \\*[qrf*name]-xx .tm "GETHN:\\$1 not defined" -. el \{\ +. if d \\*[qrf*name]-xx \{\ . ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-xx] . el \\*[\\*[qrf*name]-xx]\c . \} .\} -.\" The answer... -.el <->42<->\c .. .\"--------------- .\" get header-number, output X.X.X. in pass 1 @@ -2744,14 +3030,10 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[.$]<1 .@error "GETHN:reference name missing" .if !r qrf*pass .tm "GETHN: No .INITR in this file" .ds qrf*name qrf*ref-\\$1 -.ie \\n[qrf*pass]=2 \{\ -. ie !d \\*[qrf*name]-hn .tm "GETHN:\\$1 not defined" -. el \{\ -. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-hn] -. el \\*[\\*[qrf*name]-hn]\c -. \} +.if d \\*[qrf*name]-hn \{\ +. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-hn] +. el \\*[\\*[qrf*name]-hn]\c .\} -.el X.X.X.\c .. .\"--------------- .\" get page-number, output 9999 in pass 1 @@ -2760,14 +3042,10 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[.$]<1 .@error "GETPN:reference name missing" .if !r qrf*pass .tm "GETPN: No .INITR in this file" .ds qrf*name qrf*ref-\\$1 -.ie \\n[qrf*pass]=2 \{\ -. ie !d \\*[qrf*name]-pn .tm "GETPN:\\$1 not defined" -. el \{\ -. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-pn] -. el \\*[\\*[qrf*name]-pn]\c -. \} +.if d \\*[qrf*name]-pn +. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-pn] +. el \\*[\\*[qrf*name]-pn]\c .\} -.el 9999\c .. .\"---------- .de GETR @@ -2776,11 +3054,64 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . tm "GETR: No .INITR in this file" .\} .el \{\ -. if \\n[qrf*pass]=2 \{\ -. GETHN \\$1 Qrfh -. GETPN \\$1 Qrfp +. GETHN \\$1 Qrfh +. GETPN \\$1 Qrfp \\*[Qrf] -. \} +.\} +.. +.\"########################### module ind ############################ +.\" Support for mgs-style indexing, borrowed from mgs. +.de IX +.tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[%] +.. +.\"-------------------- +.\" Another type of index system +.\" INITI filename [type] +.de INITI +.if \\n[.$]<1 .@error "INITI:filename missing" +.\" ignore if INITI has already been used +.if r ind*pass .@error "INITI:already initialyzed" +.nr ind*pass 1 +.ds ind*file \\$1.ind +.ie \\n[.$]<2 .ds ind*type N +.el .ds ind*type \\$2 +.. +.\"--------------- +.de IND +.if !r ind*pass .@error "IND: No .INITI in this file" +.if '\\*[ind*type]'N' .ds ind*ref \\n[%] +.if '\\*[ind*type]'H' .ds ind*ref \\*[hd*mark] +.if '\\*[ind*type]'B' .ds ind*ref \\*[hd*mark]\t\\n[%] +.\" +.if \\n[.$] .ds ind*line \\$1 +.while \\n[.$]>0 \{\ +. shift +. as ind*line \t\\$1 +.\} +.as ind*line \\*[ind*ref] +.tm \\*[ind*line] +.. +.\" print index +.de INDP +.\" sort the index +.if !\\n[Cp] .pg@next-page +.\" print INDEX +.\" execute user-defined macros +.if d TXIND .TXIND +.ie d TYIND .TYIND +.el \{\ +. SK +. ce +\\*[Index] +. SP 3 +. 2C +. nf +.\} +.pso \\*[Indcmd] \\*[ind*file] +.ie d TZIND .TZIND +.el \{\ +. fi +. 1C .\} .. .\"########################### module let ############################ @@ -2857,7 +3188,18 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .sp 2 .ie n ______________________________ ______________ .el \D'l 25m 0'\h'4m'\D'l 12m 0' -\Z'\\$1'\h'29m'\\*[Letdate] +\Z'\\$1'\h'29m'\f[\\*[@sdf_font]]\\*[Letdate]\fP +.fi +.. +.\"------------------------ +.\" Letter signature +.de AVL +.ne 6v +.nf +.sp 3 +.ie n ______________________________ +.el \D'l 25m 0' +\Z'\\$1' .fi .. .\"------------------------ @@ -3007,7 +3349,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . el \{\ . sp . if '\\*[let*type]'SB' .ti +5m -\\*[LetSJ] \\*[let*lo-SJ] +\\*[LetSJ] \f[\\*[@sdf_font]]\\*[let*lo-SJ]\fP . \} .\} .. @@ -3084,3 +3426,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ds let*lo-\\$1 \\$2 .if \n[D]>1 .tm Letter option \\$1 \\$2 .. +.\"-------------------- +.\" Start with a clean slate +.init@reset diff --git a/gnu/usr.bin/groff/mm/tmac.mse b/gnu/usr.bin/groff/mm/tmac.mse index 522600ea7df..323299c2061 100644 --- a/gnu/usr.bin/groff/mm/tmac.mse +++ b/gnu/usr.bin/groff/mm/tmac.mse @@ -1,10 +1,11 @@ -.\" $Id: tmac.mse,v 1.4 1998/01/19 00:40:16 etheisen Exp $ +.\" $Id: tmac.mse,v 1.5 2000/04/09 08:25:19 millert Exp $ .\" .\" swedish version of mm .\" See tmac.m for version-information. -.mso tmac.m .ds @language se +.mso tmac.m .\" +.ds App Bilaga .ds Lf Figurer .ds Lt Tabeller .ds Lx Uppställningar @@ -44,7 +45,7 @@ .ds Letns!4 Atts. .ds Letns!5 Enc. .ds Letns!6 Encs. -.ds Letns!7 Under separate cover +.ds Letns!7 Annat försättsblad .ds Letns!8 Brev till .ds Letns!9 Dokument till .ds Letns!10 Kopia (med atts.) till @@ -65,8 +66,8 @@ .ds MO10 oktober .ds MO11 november .ds MO12 december -.ie \\n[yr]<50 .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] 20\\n[yr] -.el .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] 19\\n[yr] +.nr cov*year 1900+\n[yr] +.ds cov*new-date \n[dy] \*[MO\n[mo]] \n[cov*year] .nr pg*footer-size 4\" 1v+footer+even/odd footer+1v .\"------------------------------------------------ .\" Dokumentnamn diff --git a/gnu/usr.bin/groff/nroff/Makefile.sub b/gnu/usr.bin/groff/nroff/Makefile.sub index 096c046c81c..29abee542f5 100644 --- a/gnu/usr.bin/groff/nroff/Makefile.sub +++ b/gnu/usr.bin/groff/nroff/Makefile.sub @@ -1,4 +1,4 @@ -MAN1=nroff.n +MAN1=nroff.1 NAMEPREFIX=$(g) CLEANADD=nroff diff --git a/gnu/usr.bin/groff/nroff/nroff.1_in b/gnu/usr.bin/groff/nroff/nroff.1_in new file mode 100644 index 00000000000..4087ebe53a5 --- /dev/null +++ b/gnu/usr.bin/groff/nroff/nroff.1_in @@ -0,0 +1,94 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@nroff \- emulate nroff command with groff +.SH SYNOPSIS +.B @g@nroff +[ +.B \-h +] +[ +.B \-i +] +[ +.BI \-m name +] +[ +.BI \-n num +] +[ +.BI \-o list +] +[ +.BI \-r cn +] +[ +.BI \-T name +] +[ +.I file\|.\|.\|. +] +.SH DESCRIPTION +The +.B @g@nroff +script emulates the +.B nroff +command using groff. +The +.B \-T +option with an argument other than +.B ascii +and +.B latin1 +will be ignored. +The +.B \-h +option +is equivalent to the +.B grotty +.B \-h +option. +The +.BR \-i , +.BR \-n , +.BR \-m , +.B \-o +and +.B \-r +options have the effect described in +.BR @g@troff (@MAN1EXT@). +In addition +.B @g@nroff +silently ignores options of +.BR \-e , +.B \-q +or +.BR \-s . +Options +.B \-S +(safer) and +.B \-U +(unsafe) are passed to groff. +.B \-S +is passed by default. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR grotty (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/nroff/nroff.man b/gnu/usr.bin/groff/nroff/nroff.man deleted file mode 100644 index 4087ebe53a5..00000000000 --- a/gnu/usr.bin/groff/nroff/nroff.man +++ /dev/null @@ -1,94 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@nroff \- emulate nroff command with groff -.SH SYNOPSIS -.B @g@nroff -[ -.B \-h -] -[ -.B \-i -] -[ -.BI \-m name -] -[ -.BI \-n num -] -[ -.BI \-o list -] -[ -.BI \-r cn -] -[ -.BI \-T name -] -[ -.I file\|.\|.\|. -] -.SH DESCRIPTION -The -.B @g@nroff -script emulates the -.B nroff -command using groff. -The -.B \-T -option with an argument other than -.B ascii -and -.B latin1 -will be ignored. -The -.B \-h -option -is equivalent to the -.B grotty -.B \-h -option. -The -.BR \-i , -.BR \-n , -.BR \-m , -.B \-o -and -.B \-r -options have the effect described in -.BR @g@troff (@MAN1EXT@). -In addition -.B @g@nroff -silently ignores options of -.BR \-e , -.B \-q -or -.BR \-s . -Options -.B \-S -(safer) and -.B \-U -(unsafe) are passed to groff. -.B \-S -is passed by default. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR grotty (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/nroff/nroff.sh b/gnu/usr.bin/groff/nroff/nroff.sh index 080f04bde82..ee4e332c910 100644 --- a/gnu/usr.bin/groff/nroff/nroff.sh +++ b/gnu/usr.bin/groff/nroff/nroff.sh @@ -10,6 +10,7 @@ else T=-Tascii fi opts= +safer=-S for i do @@ -24,7 +25,7 @@ do echo "$prog: option $1 requires an argument" >&2 exit 1 ;; - -i|-S|-[mrno]*) + -i|-[mrno]*) opts="$opts $1"; ;; @@ -34,6 +35,14 @@ do -T*) # ignore other devices ;; + -S) + # safer behaviour + safer=-S + ;; + -U) + # unsafe behaviour + safer=-U + ;; -u*) # Solaris 2.2 `man' uses -u0; ignore it, # since `less' and `more' can use the emboldening info. @@ -58,4 +67,4 @@ done # This shell script is intended for use with man, so warnings are # probably not wanted. Also load nroff-style character definitions. -exec groff -S -Wall -mtty-char $T $opts ${1+"$@"} +exec groff $safer -Wall -mtty-char $T $opts ${1+"$@"} diff --git a/gnu/usr.bin/groff/pfbtops/Makefile.sub b/gnu/usr.bin/groff/pfbtops/Makefile.sub index aa464ddd2b3..206f4ee0bb7 100644 --- a/gnu/usr.bin/groff/pfbtops/Makefile.sub +++ b/gnu/usr.bin/groff/pfbtops/Makefile.sub @@ -1,5 +1,5 @@ PROG=pfbtops -MAN1=pfbtops.n +MAN1=pfbtops.1 OBJS=pfbtops.o CSRCS=pfbtops.c XLIBS=$(LIBGROFF) diff --git a/gnu/usr.bin/groff/pfbtops/pfbtops.1_in b/gnu/usr.bin/groff/pfbtops/pfbtops.1_in new file mode 100644 index 00000000000..cfef3e0a103 --- /dev/null +++ b/gnu/usr.bin/groff/pfbtops/pfbtops.1_in @@ -0,0 +1,44 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +pfbtops \- translate a PostScript font in .pfb format to ASCII +.SH SYNOPSIS +.B pfbtops +[ +.I pfb_file +] +.SH DESCRIPTION +.B pfbtops +translates a PostScript font in +.B .pfb +format to ASCII. +If +.I pfb_file +is omitted the pfb file will be read from the standard input. +The ASCII format PostScript font will be written on the standard output. +PostScript fonts for MS-DOS are normally supplied in +.B .pfb +format. +.LP +The resulting ASCII format PostScript font can be used with groff. +It must first be listed in +.BR @FONTDIR@/devps/download . +.SH "SEE ALSO" +.BR grops (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/pfbtops/pfbtops.man b/gnu/usr.bin/groff/pfbtops/pfbtops.man deleted file mode 100644 index cfef3e0a103..00000000000 --- a/gnu/usr.bin/groff/pfbtops/pfbtops.man +++ /dev/null @@ -1,44 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -pfbtops \- translate a PostScript font in .pfb format to ASCII -.SH SYNOPSIS -.B pfbtops -[ -.I pfb_file -] -.SH DESCRIPTION -.B pfbtops -translates a PostScript font in -.B .pfb -format to ASCII. -If -.I pfb_file -is omitted the pfb file will be read from the standard input. -The ASCII format PostScript font will be written on the standard output. -PostScript fonts for MS-DOS are normally supplied in -.B .pfb -format. -.LP -The resulting ASCII format PostScript font can be used with groff. -It must first be listed in -.BR @FONTDIR@/devps/download . -.SH "SEE ALSO" -.BR grops (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/pic/Makefile.sub b/gnu/usr.bin/groff/pic/Makefile.sub index 06d19750dff..b36033cf449 100644 --- a/gnu/usr.bin/groff/pic/Makefile.sub +++ b/gnu/usr.bin/groff/pic/Makefile.sub @@ -1,5 +1,5 @@ PROG=pic -MAN1=pic.n +MAN1=pic.1 XLIBS=$(LIBGROFF) MLIB=$(LIBM) OBJS=pic.o lex.o main.o object.o common.o troff.o tex.o # fig.o diff --git a/gnu/usr.bin/groff/pic/pic.1_in b/gnu/usr.bin/groff/pic/pic.1_in new file mode 100644 index 00000000000..70ab94631bb --- /dev/null +++ b/gnu/usr.bin/groff/pic/pic.1_in @@ -0,0 +1,759 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X +.el .ds tx TeX +.ie \n(.g .ds ic \/ +.el .ds ic \^ +.\" The BSD man macros can't handle " in arguments to font change macros, +.\" so use \(ts instead of ". +.tr \(ts" +.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@pic \- compile pictures for troff or TeX +.SH SYNOPSIS +.B @g@pic +[ +.B \-nvCSU +] +[ +.I filename +\&.\|.\|. +] +.br +.B @g@pic +.B \-t +[ +.B \-cvzCSU +] +[ +.I filename +\&.\|.\|. +] +.SH DESCRIPTION +.LP +This manual page describes the GNU version of +.BR pic , +which is part of the groff document formatting system. +.B pic +compiles descriptions of pictures embedded within +.B troff +or \*(tx input files into commands that are understood by \*(tx or +.BR troff . +Each picture starts with a line beginning with +.B .PS +and ends with a line beginning with +.BR .PE . +Anything outside of +.B .PS +and +.B .PE +is passed through without change. +.LP +It is the user's responsibility to provide appropriate definitions of the +.B PS +and +.B PE +macros. +When the macro package being used does not supply such definitions +(for example, old versions of \-ms), +appropriate definitions can be obtained with +.BR \-mpic : +these will center each picture. +.SH OPTIONS +.LP +Options that do not take arguments may be grouped behind a single +.BR \- . +The special option +.B \-\^\- +can be used to mark the end of the options. +A filename of +.B \- +refers to the standard input. +.TP +.B \-C +Recognize +.B .PS +and +.B .PE +even when followed by a character other than space or newline. +.TP +.B \-S +Safer mode; do not execute +.B sh +commands. +This can be useful when operating on untrustworthy input. +(enabled by default) +.TP +.B \-U +Unsafe mode; revert the default option +.BR \-S . +.TP +.B \-n +Don't use the groff extensions to the troff drawing commands. +You should use this if you are using a postprocessor that doesn't support +these extensions. +The extensions are described in +.BR groff_out (@MAN5EXT@). +The +.B \-n +option also causes pic +not to use zero-length lines to draw dots in troff mode. +.TP +.B \-t +\*(tx mode. +.TP +.B \-c +Be more compatible with +.BR tpic . +Implies +.BR \-t . +Lines beginning with +.B \e +are not passed through transparently. +Lines beginning with +.B . +are passed through with the initial +.B . +changed to +.BR \e . +A line beginning with +.B .ps +is given special treatment: +it takes an optional integer argument specifying +the line thickness (pen size) in milliinches; +a missing argument restores the previous line thickness; +the default line thickness is 8 milliinches. +The line thickness thus specified takes effect only +when a non-negative line thickness has not been +specified by use of the +.B thickness +attribute or by setting the +.B linethick +variable. +.TP +.B \-v +Print the version number. +.TP +.B \-z +In \*(tx mode draw dots using zero-length lines. +.LP +The following options supported by other versions of +.B pic +are ignored: +.TP +.B \-D +Draw all lines using the \eD escape sequence. +.B pic +always does this. +.TP +.BI \-T \ dev +Generate output for the +.B troff +device +.IR dev . +This is unnecessary because the +.B troff +output generated by +.B pic +is device-independent. +.SH USAGE +This section describes only the differences between GNU pic and the original +version of pic. +Many of these differences also apply to newer versions of Unix pic. +.SS \*(tx mode +.LP +\*(tx mode is enabled by the +.B \-t +option. +In \*(tx mode, pic will define a vbox called +.B \egraph +for each picture. +You must yourself print that vbox using, for example, the command +.RS +.LP +.B +\ecenterline{\ebox\egraph} +.RE +.LP +Actually, since the vbox has a height of zero this will produce +slightly more vertical space above the picture than below it; +.RS +.LP +.B +\ecenterline{\eraise 1em\ebox\egraph} +.RE +.LP +would avoid this. +.LP +You must use a \*(tx driver that supports the +.B tpic +specials, version 2. +.LP +Lines beginning with +.B \e +are passed through transparently; a +.B % +is added to the end of the line to avoid unwanted spaces. +You can safely use this feature to change fonts or to +change the value of +.BR \ebaselineskip . +Anything else may well produce undesirable results; use at your own risk. +Lines beginning with a period are not given any special treatment. +.SS Commands +.TP +\fBfor\fR \fIvariable\fR \fB=\fR \fIexpr1\fR \fBto\fR \fIexpr2\fR \ +[\fBby\fR [\fB*\fR]\fIexpr3\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR +Set +.I variable +to +.IR expr1 . +While the value of +.I variable +is less than or equal to +.IR expr2 , +do +.I body +and increment +.I variable +by +.IR expr3 ; +if +.B by +is not given, increment +.I variable +by 1. +If +.I expr3 +is prefixed by +.B * +then +.I variable +will instead be multiplied by +.IR expr3 . +.I X +can be any character not occurring in +.IR body . +.TP +\fBif\fR \fIexpr\fR \fBthen\fR \fIX\fR \fIif-true\fR \fIX\fR \ +[\fBelse\fR \fIY\fR \fIif-false\fR \fIY\fR] +Evaluate +.IR expr ; +if it is non-zero then do +.IR if-true , +otherwise do +.IR if-false . +.I X +can be any character not occurring in +.IR if-true . +.I Y +can be any character not occurring in +.IR if-false . +.TP +\fBprint\fR \fIarg\fR\|.\|.\|. +Concatenate the arguments and print as a line on stderr. +Each +.I arg +must be an expression, a position, or text. +This is useful for debugging. +.TP +\fBcommand\fR \fIarg\fR\|.\|.\|. +Concatenate the arguments +and pass them through as a line to troff or\*(tx. +Each +.I arg +must be an expression, a position, or text. +This has a similar effect to a line beginning with +.B . +or +.BR \e , +but allows the values of variables to be passed through. +.TP +\fBsh\fR \fIX\fR \fIcommand\fR \fIX\fR +Pass +.I command +to a shell. +.I X +can be any character not occurring in +.IR command . +.TP +\fBcopy\fR \fB"\fIfilename\fB"\fR +Include +.I filename +at this point in the file. +.TP +\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \ +[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] +.ns +.TP +\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fImacro\fR \ +[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] +This construct does +.I body +once for each line of +.IR filename ; +the line is split into blank-delimited words, +and occurrences of +.BI $ i +in +.IR body , +for +.I i +between 1 and 9, +are replaced by the +.IR i -th +word of the line. +If +.I filename +is not given, lines are taken from the current input up to +.BR .PE . +If an +.B until +clause is specified, +lines will be read only until a line the first word of which is +.IR word ; +that line will then be discarded. +.I X +can be any character not occurring in +.IR body . +For example, +.RS +.IP +.ft B +.nf +\&.PS +copy thru % circle at ($1,$2) % until "END" +1 2 +3 4 +5 6 +END +box +\&.PE +.ft +.fi +.RE +.IP +is equivalent to +.RS +.IP +.ft B +.nf +\&.PS +circle at (1,2) +circle at (3,4) +circle at (5,6) +box +\&.PE +.ft +.fi +.RE +.IP +The commands to be performed for each line can also be taken +from a macro defined earlier by giving the name of the macro +as the argument to +.BR thru . +.LP +.B reset +.br +.ns +.TP +\fBreset\fI variable1\fB,\fI variable2 .\^.\^. +Reset pre-defined variables +.IR variable1 , +.I variable2 +\&.\^.\^. to their default values. +If no arguments are given, reset all pre-defined variables +to their default values. +Note that assigning a value to +.B scale +also causes all pre-defined variables that control dimensions +to be reset to their default values times the new value of scale. +.TP +\fBplot\fR \fIexpr\fR [\fB"\fItext\*(ic\fB"\fR] +This is a text object which is constructed by using +.I text +as a format string for sprintf +with an argument of +.IR expr . +If +.I text +is omitted a format string of +.B "\(ts%g\(ts" +is used. +Attributes can be specified in the same way as for a normal text +object. +Be very careful that you specify an appropriate format string; +pic does only very limited checking of the string. +This is deprecated in favour of +.BR sprintf . +.TP +.IB variable := expr +This is similar to +.B = +except +.I variable +must already be defined, +and the value of +.I variable +will be changed only in the innermost block in which it is defined. +(By contrast, +.B = +defines the variable in the current block if it is not already defined there, +and then changes the value in the current block.) +.LP +Arguments of the form +.IP +.IR X\ anything\ X +.LP +are also allowed to be of the form +.IP +.BI {\ anything\ } +.LP +In this case +.I anything +can contain balanced occurrences of +.B { +and +.BR } . +Strings may contain +.I X +or imbalanced occurrences of +.B { +and +.BR } . +.SS Expressions +The syntax for expressions has been significantly extended: +.LP +.IB x\ ^\ y +(exponentiation) +.br +.BI sin( x ) +.br +.BI cos( x ) +.br +.BI atan2( y , \ x ) +.br +.BI log( x ) +(base 10) +.br +.BI exp( x ) +(base 10, ie 10\v'-.4m'\fIx\*(ic\fR\v'.4m') +.br +.BI sqrt( x ) +.br +.BI int( x ) +.br +.B rand() +(return a random number between 0 and 1) +.br +.BI rand( x ) +(return a random number between 1 and +.IR x ; +deprecated) +.br +.BI max( e1 , \ e2 ) +.br +.BI min( e1 , \ e2 ) +.br +.BI ! e +.br +\fIe1\fB && \fIe2\fR +.br +\fIe1\fB || \fIe2\fR +.br +\fIe1\fB == \fIe2\fR +.br +\fIe1\fB != \fIe2\fR +.br +\fIe1\fB >= \fIe2\fR +.br +\fIe1\fB > \fIe2\fR +.br +\fIe1\fB <= \fIe2\fR +.br +\fIe1\fB < \fIe2\fR +.br +\fB"\fIstr1\*(ic\fB" == "\fIstr2\*(ic\fB"\fR +.br +\fB"\fIstr1\*(ic\fB" != "\fIstr2\*(ic\fB"\fR +.br +.LP +String comparison expressions must be parenthesised in some contexts +to avoid ambiguity. +.SS Other Changes +.LP +A bare expression, +.IR expr , +is acceptable as an attribute; +it is equivalent to +.IR dir\ expr , +where +.I dir +is the current direction. +For example +.IP +.B line 2i +.LP +means draw a line 2 inches long in the current direction. +.LP +The maximum width and height of the picture are taken from the variables +.B maxpswid +and +.BR maxpsht . +Initially these have values 8.5 and 11. +.LP +Scientific notation is allowed for numbers. +For example +.RS +.B +x = 5e\-2 +.RE +.LP +Text attributes can be compounded. +For example, +.RS +.B +"foo" above ljust +.RE +is legal. +.LP +There is no limit to the depth to which blocks can be examined. +For example, +.RS +.B +[A: [B: [C: box ]]] with .A.B.C.sw at 1,2 +.br +.B +circle at last [\^].A.B.C +.RE +is acceptable. +.LP +Arcs now have compass points +determined by the circle of which the arc is a part. +.LP +Circles and arcs can be dotted or dashed. +In \*(tx mode splines can be dotted or dashed. +.LP +Boxes can have rounded corners. +The +.B rad +attribute specifies the radius of the quarter-circles at each corner. +If no +.B rad +or +.B diam +attribute is given, a radius of +.B boxrad +is used. +Initially, +.B boxrad +has a value of 0. +A box with rounded corners can be dotted or dashed. +.LP +The +.B .PS +line can have a second argument specifying a maximum height for +the picture. +If the width of zero is specified the width will be ignored in computing +the scaling factor for the picture. +Note that GNU pic will always scale a picture by the same amount +vertically as horizontally. +This is different from the +.SM DWB +2.0 pic which may scale a picture by a +different amount vertically than horizontally if a height is +specified. +.LP +Each text object has an invisible box associated with it. +The compass points of a text object are determined by this box. +The implicit motion associated with the object is also determined +by this box. +The dimensions of this box are taken from the width and height attributes; +if the width attribute is not supplied then the width will be taken to be +.BR textwid ; +if the height attribute is not supplied then the height will be taken to be +the number of text strings associated with the object +times +.BR textht . +Initially +.B textwid +and +.B textht +have a value of 0. +.LP +In places where a quoted text string can be used, +an expression of the form +.IP +.BI sprintf(\(ts format \(ts,\ arg ,\fR.\|.\|.\fB) +.LP +can also be used; +this will produce the arguments formatted according to +.IR format , +which should be a string as described in +.BR printf (3) +appropriate for the number of arguments supplied, +using only the +.BR e , +.BR f , +.B g +or +.B % +format characters. +.LP +The thickness of the lines used to draw objects is controlled by the +.B linethick +variable. +This gives the thickness of lines in points. +A negative value means use the default thickness: +in \*(tx output mode, this means use a thickness of 8 milliinches; +in \*(tx output mode with the +.B -c +option, this means use the line thickness specified by +.B .ps +lines; +in troff output mode, this means use a thickness proportional +to the pointsize. +A zero value means draw the thinnest possible line supported by +the output device. +Initially it has a value of -1. +There is also a +.BR thick [ ness ] +attribute. +For example, +.RS +.LP +.B circle thickness 1.5 +.RE +.LP +would draw a circle using a line with a thickness of 1.5 points. +The thickness of lines is not affected by the +value of the +.B scale +variable, nor by the width or height given in the +.B .PS +line. +.LP +Boxes (including boxes with rounded corners), +circles and ellipses can be filled by giving then an attribute of +.BR fill [ ed ]. +This takes an optional argument of an expression with a value between +0 and 1; 0 will fill it with white, 1 with black, values in between +with a proportionally gray shade. +A value greater than 1 can also be used: +this means fill with the +shade of gray that is currently being used for text and lines. +Normally this will be black, but output devices may provide +a mechanism for changing this. +Without an argument, then the value of the variable +.B fillval +will be used. +Initially this has a value of 0.5. +The invisible attribute does not affect the filling of objects. +Any text associated with a filled object will be added after the +object has been filled, so that the text will not be obscured +by the filling. +.LP +Arrow heads will be drawn as solid triangles if the variable +.B arrowhead +is non-zero and either \*(tx mode is enabled or +the +.B \-x +option has been given. +Initially +.B arrowhead +has a value of 1. +.LP +The troff output of pic is device-independent. +The +.B \-T +option is therefore redundant. +All numbers are taken to be in inches; numbers are never interpreted +to be in troff machine units. +.LP +Objects can have an +.B aligned +attribute. +This will only work when the postprocessor is +.BR grops . +Any text associated with an object having the +.B aligned +attribute will be rotated about the center of the object +so that it is aligned in the direction from the start point +to the end point of the object. +Note that this attribute will have no effect for objects whose start and +end points are coincident. +.LP +In places where +.IB n th +is allowed +.BI ` expr 'th +is also allowed. +Note that +.B 'th +is a single token: no space is allowed between the +.B ' +and the +.BR th . +For example, +.IP +.B +.nf +for i = 1 to 4 do { + line from `i'th box.nw to `i+1'th box.se +} +.fi +.SH FILES +.Tp \w'\fB@MACRODIR@/tmac.pic'u+3n +.B +@MACRODIR@/tmac.pic +Example definitions of the +.B PS +and +.B PE +macros. +.SH "SEE ALSO" +.BR @g@troff (@MAN1EXT@), +.BR groff_out (@MAN5EXT@), +.BR tex (1) +.br +Tpic: Pic for \*(tx +.br +Brian W. Kernighan, +PIC \(em A Graphics Language for Typesetting (User Manual). +AT&T Bell Laboratories, Computing Science Technical Report No.\ 116 + +(revised May, 1991). +.SH BUGS +.LP +Input characters that are illegal for +.B groff +(ie those with +.SM ASCII +code 0 or between 013 and 037 octal or between 0200 and 0237 octal) +are rejected even in \*(tx mode. +.LP +The interpretation of +.B fillval +is incompatible with the pic in 10th edition Unix, +which interprets 0 as black and 1 as white. diff --git a/gnu/usr.bin/groff/pic/pic.man b/gnu/usr.bin/groff/pic/pic.man deleted file mode 100644 index 70ab94631bb..00000000000 --- a/gnu/usr.bin/groff/pic/pic.man +++ /dev/null @@ -1,759 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X -.el .ds tx TeX -.ie \n(.g .ds ic \/ -.el .ds ic \^ -.\" The BSD man macros can't handle " in arguments to font change macros, -.\" so use \(ts instead of ". -.tr \(ts" -.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@pic \- compile pictures for troff or TeX -.SH SYNOPSIS -.B @g@pic -[ -.B \-nvCSU -] -[ -.I filename -\&.\|.\|. -] -.br -.B @g@pic -.B \-t -[ -.B \-cvzCSU -] -[ -.I filename -\&.\|.\|. -] -.SH DESCRIPTION -.LP -This manual page describes the GNU version of -.BR pic , -which is part of the groff document formatting system. -.B pic -compiles descriptions of pictures embedded within -.B troff -or \*(tx input files into commands that are understood by \*(tx or -.BR troff . -Each picture starts with a line beginning with -.B .PS -and ends with a line beginning with -.BR .PE . -Anything outside of -.B .PS -and -.B .PE -is passed through without change. -.LP -It is the user's responsibility to provide appropriate definitions of the -.B PS -and -.B PE -macros. -When the macro package being used does not supply such definitions -(for example, old versions of \-ms), -appropriate definitions can be obtained with -.BR \-mpic : -these will center each picture. -.SH OPTIONS -.LP -Options that do not take arguments may be grouped behind a single -.BR \- . -The special option -.B \-\^\- -can be used to mark the end of the options. -A filename of -.B \- -refers to the standard input. -.TP -.B \-C -Recognize -.B .PS -and -.B .PE -even when followed by a character other than space or newline. -.TP -.B \-S -Safer mode; do not execute -.B sh -commands. -This can be useful when operating on untrustworthy input. -(enabled by default) -.TP -.B \-U -Unsafe mode; revert the default option -.BR \-S . -.TP -.B \-n -Don't use the groff extensions to the troff drawing commands. -You should use this if you are using a postprocessor that doesn't support -these extensions. -The extensions are described in -.BR groff_out (@MAN5EXT@). -The -.B \-n -option also causes pic -not to use zero-length lines to draw dots in troff mode. -.TP -.B \-t -\*(tx mode. -.TP -.B \-c -Be more compatible with -.BR tpic . -Implies -.BR \-t . -Lines beginning with -.B \e -are not passed through transparently. -Lines beginning with -.B . -are passed through with the initial -.B . -changed to -.BR \e . -A line beginning with -.B .ps -is given special treatment: -it takes an optional integer argument specifying -the line thickness (pen size) in milliinches; -a missing argument restores the previous line thickness; -the default line thickness is 8 milliinches. -The line thickness thus specified takes effect only -when a non-negative line thickness has not been -specified by use of the -.B thickness -attribute or by setting the -.B linethick -variable. -.TP -.B \-v -Print the version number. -.TP -.B \-z -In \*(tx mode draw dots using zero-length lines. -.LP -The following options supported by other versions of -.B pic -are ignored: -.TP -.B \-D -Draw all lines using the \eD escape sequence. -.B pic -always does this. -.TP -.BI \-T \ dev -Generate output for the -.B troff -device -.IR dev . -This is unnecessary because the -.B troff -output generated by -.B pic -is device-independent. -.SH USAGE -This section describes only the differences between GNU pic and the original -version of pic. -Many of these differences also apply to newer versions of Unix pic. -.SS \*(tx mode -.LP -\*(tx mode is enabled by the -.B \-t -option. -In \*(tx mode, pic will define a vbox called -.B \egraph -for each picture. -You must yourself print that vbox using, for example, the command -.RS -.LP -.B -\ecenterline{\ebox\egraph} -.RE -.LP -Actually, since the vbox has a height of zero this will produce -slightly more vertical space above the picture than below it; -.RS -.LP -.B -\ecenterline{\eraise 1em\ebox\egraph} -.RE -.LP -would avoid this. -.LP -You must use a \*(tx driver that supports the -.B tpic -specials, version 2. -.LP -Lines beginning with -.B \e -are passed through transparently; a -.B % -is added to the end of the line to avoid unwanted spaces. -You can safely use this feature to change fonts or to -change the value of -.BR \ebaselineskip . -Anything else may well produce undesirable results; use at your own risk. -Lines beginning with a period are not given any special treatment. -.SS Commands -.TP -\fBfor\fR \fIvariable\fR \fB=\fR \fIexpr1\fR \fBto\fR \fIexpr2\fR \ -[\fBby\fR [\fB*\fR]\fIexpr3\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR -Set -.I variable -to -.IR expr1 . -While the value of -.I variable -is less than or equal to -.IR expr2 , -do -.I body -and increment -.I variable -by -.IR expr3 ; -if -.B by -is not given, increment -.I variable -by 1. -If -.I expr3 -is prefixed by -.B * -then -.I variable -will instead be multiplied by -.IR expr3 . -.I X -can be any character not occurring in -.IR body . -.TP -\fBif\fR \fIexpr\fR \fBthen\fR \fIX\fR \fIif-true\fR \fIX\fR \ -[\fBelse\fR \fIY\fR \fIif-false\fR \fIY\fR] -Evaluate -.IR expr ; -if it is non-zero then do -.IR if-true , -otherwise do -.IR if-false . -.I X -can be any character not occurring in -.IR if-true . -.I Y -can be any character not occurring in -.IR if-false . -.TP -\fBprint\fR \fIarg\fR\|.\|.\|. -Concatenate the arguments and print as a line on stderr. -Each -.I arg -must be an expression, a position, or text. -This is useful for debugging. -.TP -\fBcommand\fR \fIarg\fR\|.\|.\|. -Concatenate the arguments -and pass them through as a line to troff or\*(tx. -Each -.I arg -must be an expression, a position, or text. -This has a similar effect to a line beginning with -.B . -or -.BR \e , -but allows the values of variables to be passed through. -.TP -\fBsh\fR \fIX\fR \fIcommand\fR \fIX\fR -Pass -.I command -to a shell. -.I X -can be any character not occurring in -.IR command . -.TP -\fBcopy\fR \fB"\fIfilename\fB"\fR -Include -.I filename -at this point in the file. -.TP -\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \ -[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] -.ns -.TP -\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fImacro\fR \ -[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] -This construct does -.I body -once for each line of -.IR filename ; -the line is split into blank-delimited words, -and occurrences of -.BI $ i -in -.IR body , -for -.I i -between 1 and 9, -are replaced by the -.IR i -th -word of the line. -If -.I filename -is not given, lines are taken from the current input up to -.BR .PE . -If an -.B until -clause is specified, -lines will be read only until a line the first word of which is -.IR word ; -that line will then be discarded. -.I X -can be any character not occurring in -.IR body . -For example, -.RS -.IP -.ft B -.nf -\&.PS -copy thru % circle at ($1,$2) % until "END" -1 2 -3 4 -5 6 -END -box -\&.PE -.ft -.fi -.RE -.IP -is equivalent to -.RS -.IP -.ft B -.nf -\&.PS -circle at (1,2) -circle at (3,4) -circle at (5,6) -box -\&.PE -.ft -.fi -.RE -.IP -The commands to be performed for each line can also be taken -from a macro defined earlier by giving the name of the macro -as the argument to -.BR thru . -.LP -.B reset -.br -.ns -.TP -\fBreset\fI variable1\fB,\fI variable2 .\^.\^. -Reset pre-defined variables -.IR variable1 , -.I variable2 -\&.\^.\^. to their default values. -If no arguments are given, reset all pre-defined variables -to their default values. -Note that assigning a value to -.B scale -also causes all pre-defined variables that control dimensions -to be reset to their default values times the new value of scale. -.TP -\fBplot\fR \fIexpr\fR [\fB"\fItext\*(ic\fB"\fR] -This is a text object which is constructed by using -.I text -as a format string for sprintf -with an argument of -.IR expr . -If -.I text -is omitted a format string of -.B "\(ts%g\(ts" -is used. -Attributes can be specified in the same way as for a normal text -object. -Be very careful that you specify an appropriate format string; -pic does only very limited checking of the string. -This is deprecated in favour of -.BR sprintf . -.TP -.IB variable := expr -This is similar to -.B = -except -.I variable -must already be defined, -and the value of -.I variable -will be changed only in the innermost block in which it is defined. -(By contrast, -.B = -defines the variable in the current block if it is not already defined there, -and then changes the value in the current block.) -.LP -Arguments of the form -.IP -.IR X\ anything\ X -.LP -are also allowed to be of the form -.IP -.BI {\ anything\ } -.LP -In this case -.I anything -can contain balanced occurrences of -.B { -and -.BR } . -Strings may contain -.I X -or imbalanced occurrences of -.B { -and -.BR } . -.SS Expressions -The syntax for expressions has been significantly extended: -.LP -.IB x\ ^\ y -(exponentiation) -.br -.BI sin( x ) -.br -.BI cos( x ) -.br -.BI atan2( y , \ x ) -.br -.BI log( x ) -(base 10) -.br -.BI exp( x ) -(base 10, ie 10\v'-.4m'\fIx\*(ic\fR\v'.4m') -.br -.BI sqrt( x ) -.br -.BI int( x ) -.br -.B rand() -(return a random number between 0 and 1) -.br -.BI rand( x ) -(return a random number between 1 and -.IR x ; -deprecated) -.br -.BI max( e1 , \ e2 ) -.br -.BI min( e1 , \ e2 ) -.br -.BI ! e -.br -\fIe1\fB && \fIe2\fR -.br -\fIe1\fB || \fIe2\fR -.br -\fIe1\fB == \fIe2\fR -.br -\fIe1\fB != \fIe2\fR -.br -\fIe1\fB >= \fIe2\fR -.br -\fIe1\fB > \fIe2\fR -.br -\fIe1\fB <= \fIe2\fR -.br -\fIe1\fB < \fIe2\fR -.br -\fB"\fIstr1\*(ic\fB" == "\fIstr2\*(ic\fB"\fR -.br -\fB"\fIstr1\*(ic\fB" != "\fIstr2\*(ic\fB"\fR -.br -.LP -String comparison expressions must be parenthesised in some contexts -to avoid ambiguity. -.SS Other Changes -.LP -A bare expression, -.IR expr , -is acceptable as an attribute; -it is equivalent to -.IR dir\ expr , -where -.I dir -is the current direction. -For example -.IP -.B line 2i -.LP -means draw a line 2 inches long in the current direction. -.LP -The maximum width and height of the picture are taken from the variables -.B maxpswid -and -.BR maxpsht . -Initially these have values 8.5 and 11. -.LP -Scientific notation is allowed for numbers. -For example -.RS -.B -x = 5e\-2 -.RE -.LP -Text attributes can be compounded. -For example, -.RS -.B -"foo" above ljust -.RE -is legal. -.LP -There is no limit to the depth to which blocks can be examined. -For example, -.RS -.B -[A: [B: [C: box ]]] with .A.B.C.sw at 1,2 -.br -.B -circle at last [\^].A.B.C -.RE -is acceptable. -.LP -Arcs now have compass points -determined by the circle of which the arc is a part. -.LP -Circles and arcs can be dotted or dashed. -In \*(tx mode splines can be dotted or dashed. -.LP -Boxes can have rounded corners. -The -.B rad -attribute specifies the radius of the quarter-circles at each corner. -If no -.B rad -or -.B diam -attribute is given, a radius of -.B boxrad -is used. -Initially, -.B boxrad -has a value of 0. -A box with rounded corners can be dotted or dashed. -.LP -The -.B .PS -line can have a second argument specifying a maximum height for -the picture. -If the width of zero is specified the width will be ignored in computing -the scaling factor for the picture. -Note that GNU pic will always scale a picture by the same amount -vertically as horizontally. -This is different from the -.SM DWB -2.0 pic which may scale a picture by a -different amount vertically than horizontally if a height is -specified. -.LP -Each text object has an invisible box associated with it. -The compass points of a text object are determined by this box. -The implicit motion associated with the object is also determined -by this box. -The dimensions of this box are taken from the width and height attributes; -if the width attribute is not supplied then the width will be taken to be -.BR textwid ; -if the height attribute is not supplied then the height will be taken to be -the number of text strings associated with the object -times -.BR textht . -Initially -.B textwid -and -.B textht -have a value of 0. -.LP -In places where a quoted text string can be used, -an expression of the form -.IP -.BI sprintf(\(ts format \(ts,\ arg ,\fR.\|.\|.\fB) -.LP -can also be used; -this will produce the arguments formatted according to -.IR format , -which should be a string as described in -.BR printf (3) -appropriate for the number of arguments supplied, -using only the -.BR e , -.BR f , -.B g -or -.B % -format characters. -.LP -The thickness of the lines used to draw objects is controlled by the -.B linethick -variable. -This gives the thickness of lines in points. -A negative value means use the default thickness: -in \*(tx output mode, this means use a thickness of 8 milliinches; -in \*(tx output mode with the -.B -c -option, this means use the line thickness specified by -.B .ps -lines; -in troff output mode, this means use a thickness proportional -to the pointsize. -A zero value means draw the thinnest possible line supported by -the output device. -Initially it has a value of -1. -There is also a -.BR thick [ ness ] -attribute. -For example, -.RS -.LP -.B circle thickness 1.5 -.RE -.LP -would draw a circle using a line with a thickness of 1.5 points. -The thickness of lines is not affected by the -value of the -.B scale -variable, nor by the width or height given in the -.B .PS -line. -.LP -Boxes (including boxes with rounded corners), -circles and ellipses can be filled by giving then an attribute of -.BR fill [ ed ]. -This takes an optional argument of an expression with a value between -0 and 1; 0 will fill it with white, 1 with black, values in between -with a proportionally gray shade. -A value greater than 1 can also be used: -this means fill with the -shade of gray that is currently being used for text and lines. -Normally this will be black, but output devices may provide -a mechanism for changing this. -Without an argument, then the value of the variable -.B fillval -will be used. -Initially this has a value of 0.5. -The invisible attribute does not affect the filling of objects. -Any text associated with a filled object will be added after the -object has been filled, so that the text will not be obscured -by the filling. -.LP -Arrow heads will be drawn as solid triangles if the variable -.B arrowhead -is non-zero and either \*(tx mode is enabled or -the -.B \-x -option has been given. -Initially -.B arrowhead -has a value of 1. -.LP -The troff output of pic is device-independent. -The -.B \-T -option is therefore redundant. -All numbers are taken to be in inches; numbers are never interpreted -to be in troff machine units. -.LP -Objects can have an -.B aligned -attribute. -This will only work when the postprocessor is -.BR grops . -Any text associated with an object having the -.B aligned -attribute will be rotated about the center of the object -so that it is aligned in the direction from the start point -to the end point of the object. -Note that this attribute will have no effect for objects whose start and -end points are coincident. -.LP -In places where -.IB n th -is allowed -.BI ` expr 'th -is also allowed. -Note that -.B 'th -is a single token: no space is allowed between the -.B ' -and the -.BR th . -For example, -.IP -.B -.nf -for i = 1 to 4 do { - line from `i'th box.nw to `i+1'th box.se -} -.fi -.SH FILES -.Tp \w'\fB@MACRODIR@/tmac.pic'u+3n -.B -@MACRODIR@/tmac.pic -Example definitions of the -.B PS -and -.B PE -macros. -.SH "SEE ALSO" -.BR @g@troff (@MAN1EXT@), -.BR groff_out (@MAN5EXT@), -.BR tex (1) -.br -Tpic: Pic for \*(tx -.br -Brian W. Kernighan, -PIC \(em A Graphics Language for Typesetting (User Manual). -AT&T Bell Laboratories, Computing Science Technical Report No.\ 116 - -(revised May, 1991). -.SH BUGS -.LP -Input characters that are illegal for -.B groff -(ie those with -.SM ASCII -code 0 or between 013 and 037 octal or between 0200 and 0237 octal) -are rejected even in \*(tx mode. -.LP -The interpretation of -.B fillval -is incompatible with the pic in 10th edition Unix, -which interprets 0 as black and 1 as white. diff --git a/gnu/usr.bin/groff/psbb/Makefile.sub b/gnu/usr.bin/groff/psbb/Makefile.sub index 106721a678e..7e2b262b335 100644 --- a/gnu/usr.bin/groff/psbb/Makefile.sub +++ b/gnu/usr.bin/groff/psbb/Makefile.sub @@ -1,5 +1,5 @@ PROG=psbb -MAN1=psbb.n +MAN1=psbb.1 OBJS=psbb.o CSRCS=psbb.c XLIBS= diff --git a/gnu/usr.bin/groff/psbb/psbb.1_in b/gnu/usr.bin/groff/psbb/psbb.1_in new file mode 100644 index 00000000000..4c6ac8c16d2 --- /dev/null +++ b/gnu/usr.bin/groff/psbb/psbb.1_in @@ -0,0 +1,43 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH PSBB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +psbb \- extract bounding box from PostScript document +.SH SYNOPSIS +.B psbb +.I file +.SH DESCRIPTION +psbb reads +.I file +which should be a PostScript document conforming to +the Document Structuring conventions +and looks for a +.B %%BoundingBox +comment. +If it finds one, +it prints a line +.IP +.I +llx lly urx ury +.LP +on the standard output and exits with zero status. +If it doesn't find such a line or if the line is invalid +it prints a message and exits with non-zero status. +.SH "SEE ALSO" +.BR grops (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/psbb/psbb.man b/gnu/usr.bin/groff/psbb/psbb.man deleted file mode 100644 index 4c6ac8c16d2..00000000000 --- a/gnu/usr.bin/groff/psbb/psbb.man +++ /dev/null @@ -1,43 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH PSBB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -psbb \- extract bounding box from PostScript document -.SH SYNOPSIS -.B psbb -.I file -.SH DESCRIPTION -psbb reads -.I file -which should be a PostScript document conforming to -the Document Structuring conventions -and looks for a -.B %%BoundingBox -comment. -If it finds one, -it prints a line -.IP -.I -llx lly urx ury -.LP -on the standard output and exits with zero status. -If it doesn't find such a line or if the line is invalid -it prints a message and exits with non-zero status. -.SH "SEE ALSO" -.BR grops (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/refer/Makefile.sub b/gnu/usr.bin/groff/refer/Makefile.sub index 28734624586..d8e4d58cfd3 100644 --- a/gnu/usr.bin/groff/refer/Makefile.sub +++ b/gnu/usr.bin/groff/refer/Makefile.sub @@ -1,5 +1,5 @@ PROG=refer -MAN1=refer.n +MAN1=refer.1 XLIBS=$(LIBBIB) $(LIBGROFF) MLIB=$(LIBM) OBJS=command.o label.o ref.o refer.o token.o diff --git a/gnu/usr.bin/groff/refer/refer.1_in b/gnu/usr.bin/groff/refer/refer.1_in new file mode 100644 index 00000000000..6b09c973a93 --- /dev/null +++ b/gnu/usr.bin/groff/refer/refer.1_in @@ -0,0 +1,1299 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.de TQ +.br +.ns +.TP \\$1 +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.\" The BSD man macros can't handle " in arguments to font change macros, +.\" so use \(ts instead of ". +.tr \(ts" +.TH @G@REFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@refer \- preprocess bibliographic references for groff +.SH SYNOPSIS +.nr a \n(.j +.ad l +.nr i \n(.i +.in +\w'\fB@g@refer 'u +.ti \niu +.B @g@refer +.de OP +.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +.el .RB "[\ " "\\$1" "\ ]" +.. +.OP \-benvCPRS +.OP \-a n +.OP \-c fields +.OP \-f n +.OP \-i fields +.OP \-k field +.OP \-l m,n +.OP \-p filename +.OP \-s fields +.OP \-t n +.OP \-B field.macro +.RI [\ filename \|.\|.\|.\ ] +.br +.ad \na +.SH DESCRIPTION +This file documents the GNU version of +.BR refer , +which is part of the groff document formatting system. +.B refer +copies the contents of +.IR filename \|.\|.\|. +to the standard output, +except that lines between +.B .[ +and +.B .] +are interpreted as citations, +and lines between +.B .R1 +and +.B .R2 +are interpreted as commands about how citations are to be processed. +.LP +Each citation specifies a reference. +The citation can specify a reference that is contained in +a bibliographic database by giving a set of keywords +that only that reference contains. +Alternatively it can specify a reference by supplying a database +record in the citation. +A combination of these alternatives is also possible. +.LP +For each citation, +.B refer +can produce a mark in the text. +This mark consists of some label which can be separated from +the text and from other labels in various ways. +For each reference it also outputs +.B groff +commands that can be used by a macro package to produce a formatted +reference for each citation. +The output of +.B refer +must therefore be processed using a suitable macro package. +The +.B \-ms +and +.B \-me +macros are both suitable. +The commands to format a citation's reference can be output immediately after +the citation, +or the references may be accumulated, +and the commands output at some later point. +If the references are accumulated, then multiple citations of the same +reference will produce a single formatted reference. +.LP +The interpretation of lines between +.B .R1 +and +.B .R2 +as commands is a new feature of GNU refer. +Documents making use of this feature can still be processed by +Unix refer just by adding the lines +.RS +.LP +.nf +.ft B +\&.de R1 +\&.ig R2 +\&.. +.ft +.fi +.RE +to the beginning of the document. +This will cause +.B troff +to ignore everything between +.B .R1 +and +.BR .R2 . +The effect of some commands can also be achieved by options. +These options are supported mainly for compatibility with Unix refer. +It is usually more convenient to use commands. +.LP +.B refer +generates +.B .lf +lines so that filenames and line numbers in messages produced +by commands that read +.B refer +output will be correct; +it also interprets lines beginning with +.B .lf +so that filenames and line numbers in the messages and +.B .lf +lines that it produces will be accurate even if the input has been +preprocessed by a command such as +.BR @g@soelim (@MAN1EXT@). +.SH OPTIONS +.LP +Most options are equivalent to commands +(for a description of these commands see the +.B Commands +subsection): +.TP +.B \-b +.B +no-label-in-text; no-label-in-reference +.TP +.B \-e +.B accumulate +.TP +.B \-n +.B no-default-database +.TP +.B \-C +.B compatible +.TP +.B \-P +.B move-punctuation +.TP +.B \-S +.B +label "(A.n|Q) ', ' (D.y|D)"; bracket-label " (" ) "; " +.TP +.BI \-a n +.B reverse +.BI A n +.TP +.BI \-c fields +.B capitalize +.I fields +.TP +.BI \-f n +.B label +.BI % n +.TP +.BI \-i fields +.B search-ignore +.I fields +.TP +.B \-k +.B label +.B L\(ti%a +.TP +.BI \-k field +.B label +.IB field \(ti%a +.TP +.B \-l +.B label +.BI A.nD.y%a +.TP +.BI \-l m +.B label +.BI A.n+ m D.y%a +.TP +.BI \-l, n +.B label +.BI A.nD.y\- n %a +.TP +.BI \-l m , n +.B label +.BI A.n+ m D.y\- n %a +.TP +.BI \-p filename +.B database +.I filename +.TP +.BI \-s spec +.B sort +.I spec +.TP +.BI \-t n +.B search-truncate +.I n +.LP +These options are equivalent to the following commands with the +addition that the filenames specified on the command line are +processed as if they were arguments to the +.B bibliography +command instead of in the normal way: +.TP +.B \-B +.B +annotate X AP; no-label-in-reference +.TP +.BI \-B field . macro +.B annotate +.I field +.IB macro ; +.B no-label-in-reference +.LP +The following options have no equivalent commands: +.TP +.B \-v +Print the version number. +.TP +.B \-R +Don't recognize lines beginning with +.BR .R1 / .R2 . +.SH USAGE +.SS Bibliographic databases +The bibliographic database is a text file consisting of records +separated by one or more blank lines. +Within each record fields start with a +.B % +at the beginning of a line. +Each field has a one character name that immediately follows the +.BR % . +It is best to use only upper and lower case letters for the names +of fields. +The name of the field should be followed by exactly one space, +and then by the contents of the field. +Empty fields are ignored. +The conventional meaning of each field is as follows: +.TP +.B A +The name of an author. +If the name contains a title such as +.B Jr. +at the end, +it should be separated from the last name by a comma. +There can be multiple occurrences of the +.B A +field. +The order is significant. +It is a good idea always to supply an +.B A +field or a +.B Q +field. +.TP +.B B +For an article that is part of a book, the title of the book +.TP +.B C +The place (city) of publication. +.TP +.B D +The date of publication. +The year should be specified in full. +If the month is specified, the name rather than the number of the month +should be used, but only the first three letters are required. +It is a good idea always to supply a +.B D +field; +if the date is unknown, a value such as +.B in press +or +.B unknown +can be used. +.TP +.B E +For an article that is part of a book, the name of an editor of the book. +Where the work has editors and no authors, +the names of the editors should be given as +.B A +fields and +.B ,\ (ed) +or +.B ,\ (eds) +should be appended to the last author. +.TP +.B G +US Government ordering number. +.TP +.B I +The publisher (issuer). +.TP +.B J +For an article in a journal, the name of the journal. +.TP +.B K +Keywords to be used for searching. +.TP +.B L +Label. +.TP +.B N +Journal issue number. +.TP +.B O +Other information. +This is usually printed at the end of the reference. +.TP +.B P +Page number. +A range of pages can be specified as +.IB m \- n\fR. +.TP +.B Q +The name of the author, if the author is not a person. +This will only be used if there are no +.B A +fields. +There can only be one +.B Q +field. +.TP +.B R +Technical report number. +.TP +.B S +Series name. +.TP +.B T +Title. +For an article in a book or journal, +this should be the title of the article. +.TP +.B V +Volume number of the journal or book. +.TP +.B X +Annotation. +.LP +For all fields except +.B A +and +.BR E , +if there is more than one occurrence of a particular field in a record, +only the last such field will be used. +.LP +If accent strings are used, they should follow the character to be accented. +This means that the +.B AM +macro must be used with the +.B \-ms +macros. +Accent strings should not be quoted: +use one +.B \e +rather than two. +.SS Citations +The format of a citation is +.RS +.BI .[ opening-text +.br +.I +flags keywords +.br +.I fields +.br +.BI .] closing-text +.RE +.LP +The +.IR opening-text , +.IR closing-text +and +.I flags +components are optional. +Only one of the +.I keywords +and +.I fields +components need be specified. +.LP +The +.I keywords +component says to search the bibliographic databases for a reference +that contains all the words in +.IR keywords . +It is an error if more than one reference if found. +.LP +The +.I fields +components specifies additional fields to replace or supplement +those specified in the reference. +When references are being accumulated and the +.I keywords +component is non-empty, +then additional fields should be specified only on the first +occasion that a particular reference is cited, +and will apply to all citations of that reference. +.LP +The +.I opening-text +and +.I closing-text +component specifies strings to be used to bracket the label instead +of the strings specified in the +.B bracket-label +command. +If either of these components is non-empty, +the strings specified in the +.B bracket-label +command will not be used; +this behaviour can be altered using the +.B [ +and +.B ] +flags. +Note that leading and trailing spaces are significant for these components. +.LP +The +.I flags +component is a list of +non-alphanumeric characters each of which modifies the treatment +of this particular citation. +Unix refer will treat these flags as part of the keywords and +so will ignore them since they are non-alphanumeric. +The following flags are currently recognized: +.TP +.B # +This says to use the label specified by the +.B short-label +command, +instead of that specified by the +.B label +command. +If no short label has been specified, the normal label will be used. +Typically the short label is used with author-date labels +and consists of only the date and possibly a disambiguating letter; +the +.B # +is supposed to be suggestive of a numeric type of label. +.TP +.B [ +Precede +.I opening-text +with the first string specified in the +.B bracket-label +command. +.TP +.B ] +Follow +.I closing-text +with the second string specified in the +.B bracket-label +command. +.LP +One advantages of using the +.B [ +and +.B ] +flags rather than including the brackets in +.I opening-text +and +.I closing-text +is that +you can change the style of bracket used in the document just by changing the +.B bracket-label +command. +Another advantage is that sorting and merging of citations +will not necessarily be inhibited if the flags are used. +.LP +If a label is to be inserted into the text, +it will be attached to the line preceding the +.B .[ +line. +If there is no such line, then an extra line will be inserted before the +.B .[ +line and a warning will be given. +.LP +There is no special notation for making a citation to multiple references. +Just use a sequence of citations, one for each reference. +Don't put anything between the citations. +The labels for all the citations will be attached to the line preceding +the first citation. +The labels may also be sorted or merged. +See the description of the +.B <> +label expression, and of the +.B sort-adjacent-labels +and +.B abbreviate-label-ranges +command. +A label will not be merged if its citation has a non-empty +.I opening-text +or +.IR closing-text . +However, the labels for a citation using the +.B ] +flag and without any +.I closing-text +immediately followed by a citation using the +.B [ +flag and without any +.I opening-text +may be sorted and merged +even though the first citation's +.I opening-text +or the second citation's +.I closing-text +is non-empty. +(If you wish to prevent this just make the first citation's +.I closing-text +.BR \e& .) +.SS Commands +Commands are contained between lines starting with +.B .R1 +and +.BR .R2 . +Recognition of these lines can be prevented by the +.B \-R +option. +When a +.B .R1 +line is recognized any accumulated references are flushed out. +Neither +.B .R1 +nor +.B .R2 +lines, +nor anything between them +is output. +.LP +Commands are separated by newlines or +.BR ; s. +.B # +introduces a comment that extends to the end of the line +(but does not conceal the newline). +Each command is broken up into words. +Words are separated by spaces or tabs. +A word that begins with +.B \(ts +extends to the next +.B \(ts +that is not followed by another +.BR \(ts . +If there is no such +.B \(ts +the word extends to the end of the line. +Pairs of +.B \(ts +in a word beginning with +.B \(ts +collapse to a single +.BR \(ts . +Neither +.B # +nor +.B ; +are recognized inside +.BR \(ts s. +A line can be continued by ending it with +.BR \e ; +this works everywhere except after a +.BR # . +.LP +.ds n \fR* +Each command +.I name +that is marked with \*n has an associated negative command +.BI no- name +that undoes the effect of +.IR name . +For example, the +.B no-sort +command specifies that references should not be sorted. +The negative commands take no arguments. +.LP +In the following description each argument must be a single word; +.I field +is used for a single upper or lower case letter naming a field; +.I fields +is used for a sequence of such letters; +.I m +and +.I n +are used for a non-negative numbers; +.I string +is used for an arbitrary string; +.I filename +is used for the name of a file. +.Tp \w'\fBabbreviate-label-ranges'u+2n +.BI abbreviate\*n\ fields\ string1\ string2\ string3\ string4 +Abbreviate the first names of +.IR fields . +An initial letter will be separated from another initial letter by +.IR string1 , +from the last name by +.IR string2 , +and from anything else +(such as a +.B von +or +.BR de ) +by +.IR string3 . +These default to a period followed by a space. +In a hyphenated first name, +the initial of the first part of the name will be separated from the hyphen by +.IR string4 ; +this defaults to a period. +No attempt is made to handle any ambiguities that might +result from abbreviation. +Names are abbreviated before sorting and before +label construction. +.TP +.BI abbreviate-label-ranges\*n\ string +Three or more adjacent labels that refer to consecutive references +will be abbreviated to a label consisting +of the first label, followed by +.I string +followed by the last label. +This is mainly useful with numeric labels. +If +.I string +is omitted it defaults to +.BR \- . +.TP +.B accumulate\*n +Accumulate references instead of writing out each reference +as it is encountered. +Accumulated references will be written out whenever a reference +of the form +.RS +.IP +.B .[ +.br +.B $LIST$ +.br +.B .] +.LP +is encountered, +after all input files hve been processed, +and whenever +.B .R1 +line is recognized. +.RE +.TP +.BI annotate\*n\ field\ string +.I field +is an annotation; +print it at the end of the reference as a paragraph preceded by the line +.RS +.IP +.BI . string +.LP +If +.I macro +is omitted it will default to +.BR AP ; +if +.I field +is also omitted it will default to +.BR X . +Only one field can be an annotation. +.RE +.TP +.BI articles\ string \fR\|.\|.\|. +.IR string \|.\|.\|. +are definite or indefinite articles, and should be ignored at the beginning of +.B T +fields when sorting. +Initially, +.BR the , +.B a +and +.B an +are recognized as articles. +.TP +.BI bibliography\ filename \fR\|.\|.\|. +Write out all the references contained in the bibliographic databases +.IR filename \|.\|.\|. +.TP +.BI bracket-label\ string1\ string2\ string3 +In the text, bracket each label +with +.I string1 +and +.IR string2 . +An occurrence of +.I string2 +immediately followed by +.I string1 +will be turned into +.IR string3 . +The default behaviour is +.RS +.IP +.B +bracket-label \e*([. \e*(.] ", " +.RE +.TP +.BI capitalize\ fields +Convert +.I fields +to caps and small caps. +.TP +.B compatible\*n +Recognize +.B .R1 +and +.B .R2 +even when followed by a character other than space or newline. +.TP +.BI database\ filename \fR\|.\|.\|. +Search the bibliographic databases +.IR filename \|.\|.\|. +For each +.I filename +if an index +.IB filename @INDEX_SUFFIX@ +created by +.BR @g@indxbib (@MAN1EXT@) +exists, then it will be searched instead; +each index can cover multiple databases. +.TP +.BI date-as-label\*n\ string +.I string +is a label expression that specifies a string with which to replace the +.B D +field after constructing the label. +See the +.B "Label expressions" +subsection for a description of label expressions. +This command is useful if you do not want explicit labels in the +reference list, but instead want to handle any necessary +disambiguation by qualifying the date in some way. +The label used in the text would typically be some combination of the +author and date. +In most cases you should also use the +.B no-label-in-reference +command. +For example, +.RS +.IP +.B +date-as-label D.+yD.y%a*D.-y +.LP +would attach a disambiguating letter to the year part of the +.B D +field in the reference. +.RE +.TP +.B default-database\*n +The default database should be searched. +This is the default behaviour, so the negative version of +this command is more useful. +refer determines whether the default database should be searched +on the first occasion that it needs to do a search. +Thus a +.B no-default-database +command must be given before then, +in order to be effective. +.TP +.BI discard\*n\ fields +When the reference is read, +.I fields +should be discarded; +no string definitions for +.I fields +will be output. +Initially, +.I fields +are +.BR XYZ . +.TP +.BI et-al\*n\ string\ m\ n +Control use of +.B +et al +in the evaluation of +.B @ +expressions in label expressions. +If the number of authors needed to make the author sequence +unambiguous is +.I u +and the total number of authors is +.I t +then the last +.IR t \|\-\| u +authors will be replaced by +.I string +provided that +.IR t \|\-\| u +is not less than +.I m +and +.I t +is not less than +.IR n . +The default behaviour is +.RS +.IP +.B +et-al " et al" 2 3 +.RE +.TP +.BI include\ filename +Include +.I filename +and interpret the contents as commands. +.TP +.BI join-authors\ string1\ string2\ string3 +This says how authors should be joined together. +When there are exactly two authors, they will be joined with +.IR string1 . +When there are more than two authors, all but the last two will +be joined with +.IR string2 , +and the last two authors will be joined with +.IR string3 . +If +.I string3 +is omitted, +it will default to +.IR string1 ; +if +.I string2 +is also omitted it will also default to +.IR string1 . +For example, +.RS +.IP +.B +join-authors " and " ", " ", and " +.LP +will restore the default method for joining authors. +.RE +.TP +.B label-in-reference\*n +When outputting the reference, +define the string +.B [F +to be the reference's label. +This is the default behaviour; so the negative version +of this command is more useful. +.TP +.B label-in-text\*n +For each reference output a label in the text. +The label will be separated from the surrounding text as described in the +.B bracket-label +command. +This is the default behaviour; so the negative version +of this command is more useful. +.TP +.BI label\ string +.I string +is a label expression describing how to label each reference. +.TP +.BI separate-label-second-parts\ string +When merging two-part labels, separate the second part of the second +label from the first label with +.IR string . +See the description of the +.B <> +label expression. +.TP +.B move-punctuation\*n +In the text, move any punctuation at the end of line past the label. +It is usually a good idea to give this command unless you are using +superscripted numbers as labels. +.TP +.BI reverse\*n\ string +Reverse the fields whose names +are in +.IR string . +Each field name can be followed by a number which says +how many such fields should be reversed. +If no number is given for a field, all such fields will be reversed. +.TP +.BI search-ignore\*n\ fields +While searching for keys in databases for which no index exists, +ignore the contents of +.IR fields . +Initially, fields +.B XYZ +are ignored. +.TP +.BI search-truncate\*n\ n +Only require the first +.I n +characters of keys to be given. +In effect when searching for a given key +words in the database are truncated to the maximum of +.I n +and the length of the key. +Initially +.I n +is 6. +.TP +.BI short-label\*n\ string +.I string +is a label expression that specifies an alternative (usually shorter) +style of label. +This is used when the +.B # +flag is given in the citation. +When using author-date style labels, the identity of the author +or authors is sometimes clear from the context, and so it +may be desirable to omit the author or authors from the label. +The +.B short-label +command will typically be used to specify a label containing just +a date and possibly a disambiguating letter. +.TP +.BI sort\*n\ string +Sort references according to +.BR string . +References will automatically be accumulated. +.I string +should be a list of field names, each followed by a number, +indicating how many fields with the name should be used for sorting. +.B + +can be used to indicate that all the fields with the name should be used. +Also +.B . +can be used to indicate the references should be sorted using the +(tentative) label. +(The +.B +Label expressions +subsection describes the concept of a tentative label.) +.TP +.B sort-adjacent-labels\*n +Sort labels that are adjacent in the text according to their +position in the reference list. +This command should usually be given if the +.B abbreviate-label-ranges +command has been given, +or if the label expression contains a +.B <> +expression. +This will have no effect unless references are being accumulated. +.SS Label expressions +.LP +Label expressions can be evaluated both normally and tentatively. +The result of normal evaluation is used for output. +The result of tentative evaluation, called the +.I +tentative label, +is used to gather the information +that normal evaluation needs to disambiguate the label. +Label expressions specified by the +.B date-as-label +and +.B short-label +commands are not evaluated tentatively. +Normal and tentative evaluation are the same for all types +of expression other than +.BR @ , +.BR * , +and +.B % +expressions. +The description below applies to normal evaluation, +except where otherwise specified. +.TP +.I field +.TQ +.I field\ n +The +.IR n -th +part of +.IR field . +If +.I n +is omitted, it defaults to 1. +.TP +.BI ' string ' +The characters in +.I string +literally. +.TP +.B @ +All the authors joined as specified by the +.B join-authors +command. +The whole of each author's name will be used. +However, if the references are sorted by author +(that is the sort specification starts with +.BR A+ ), +then authors' last names will be used instead, provided that this does +not introduce ambiguity, +and also an initial subsequence of the authors may be used +instead of all the authors, again provided that this does not +introduce ambiguity. +The use of only the last name for the +.IR i -th +author of some reference +is considered to be ambiguous if +there is some other reference, +such that the first +.IR i \|-\|1 +authors of the references are the same, +the +.IR i -th +authors are not the same, +but the +.IR i -th +authors' last names are the same. +A proper initial subsequence of the sequence +of authors for some reference is considered to be ambiguous if there is +a reference with some other sequence of authors which also has +that subsequence as a proper initial subsequence. +When an initial subsequence of authors is used, the remaining +authors are replaced by the string specified by the +.B et-al +command; +this command may also specify additional requirements that must be +met before an initial subsequence can be used. +.B @ +tentatively evaluates to a canonical representation of the authors, +such that authors that compare equally for sorting purpose +will have the same representation. +.TP +.BI % n +.TQ +.B %a +.TQ +.B %A +.TQ +.B %i +.TQ +.B %I +The serial number of the reference formatted according to the character +following the +.BR % . +The serial number of a reference is 1 plus the number of earlier references +with same tentative label as this reference. +These expressions tentatively evaluate to an empty string. +.TP +.IB expr * +If there is another reference with the same tentative label as +this reference, then +.IR expr , +otherwise an empty string. +It tentatively evaluates to an empty string. +.TP +.IB expr + n +.TQ +.IB expr \- n +The first +.RB ( + ) +or last +.RB ( \- ) +.I n +upper or lower case letters or digits of +.IR expr . +Troff special characters (such as +.BR \e('a ) +count as a single letter. +Accent strings are retained but do not count towards the total. +.TP +.IB expr .l +.I expr +converted to lowercase. +.TP +.IB expr .u +.I expr +converted to uppercase. +.TP +.IB expr .c +.I expr +converted to caps and small caps. +.TP +.IB expr .r +.I expr +reversed so that the last name is first. +.TP +.IB expr .a +.I expr +with first names abbreviated. +Note that fields specified in the +.B abbreviate +command are abbreviated before any labels are evaluated. +Thus +.B .a +is useful only when you want a field to be abbreviated in a label +but not in a reference. +.TP +.IB expr .y +The year part of +.IR expr . +.TP +.IB expr .+y +The part of +.I expr +before the year, or the whole of +.I expr +if it does not contain a year. +.TP +.IB expr .\-y +The part of +.I expr +after the year, or an empty string if +.I expr +does not contain a year. +.TP +.IB expr .n +The last name part of +.IR expr . +.TP +.IB expr1 \(ti expr2 +.I expr1 +except that if the last character of +.I expr1 +is +.B \- +then it will be replaced by +.IR expr2 . +.TP +.I expr1\ expr2 +The concatenation of +.I expr1 +and +.IR expr2 . +.TP +.IB expr1 | expr2 +If +.I expr1 +is non-empty then +.I expr1 +otherwise +.IR expr2 . +.TP +.IB expr1 & expr2 +If +.I expr1 +is non-empty +then +.I expr2 +otherwise an empty string. +.TP +.IB expr1 ? expr2 : expr3 +If +.I expr1 +is non-empty +then +.I expr2 +otherwise +.IR expr3 . +.TP +.BI < expr > +The label is in two parts, which are separated by +.IR expr . +Two adjacent two-part labels which have the same first part will be +merged by appending the second part of the second label onto the first +label separated by the string specified in the +.B separate-label-second-parts +command (initially, a comma followed by a space); the resulting label +will also be a two-part label with the same first part as before +merging, and so additional labels can be merged into it. +Note that it is permissible for the first part to be empty; +this maybe desirable for expressions used in the +.B short-label +command. +.TP +.BI ( expr ) +The same as +.IR expr . +Used for grouping. +.LP +The above expressions are listed in order of precedence +(highest first); +.B & +and +.B | +have the same precedence. +.SS Macro interface +Each reference starts with a call to the macro +.BR ]- . +The string +.B [F +will be defined to be the label for this reference, +unless the +.B no-label-in-reference +command has been given. +There then follows a series of string definitions, +one for each field: +string +.BI [ X +corresponds to field +.IR X . +The number register +.B [P +is set to 1 if the +.B P +field contains a range of pages. +The +.BR [T , +.B [A +and +.B [O +number registers are set to 1 according as the +.BR T , +.B A +and +.B O +fields end with one of the characters +.BR .?! . +The +.B [E +number register will be set to 1 if the +.B [E +string contains more than one name. +The reference is followed by a call to the +.B ][ +macro. +The first argument to this macro gives a number representing +the type of the reference. +If a reference contains a +.B J +field, it will be classified as type 1, +otherwise if it contains a +.B B +field, it will type 3, +otherwise if it contains a +.B G +or +.B R +field it will be type 4, +otherwise if contains a +.B I +field it will be type 2, +otherwise it will be type 0. +The second argument is a symbolic name for the type: +.BR other , +.BR journal-article , +.BR book , +.B article-in-book +or +.BR tech-report . +Groups of references that have been accumulated +or are produced by the +.B bibliography +command are preceded by a call to the +.B ]< +macro and followed by a call to the +.B ]> +macro. +.SH FILES +.Tp \w'\fB@DEFAULT_INDEX@'u+2n +.B @DEFAULT_INDEX@ +Default database. +.TP +.IB file @INDEX_SUFFIX@ +Index files. +.SH "SEE ALSO" +.BR @g@indxbib (@MAN1EXT@), +.BR @g@lookbib (@MAN1EXT@), +.BR lkbib (@MAN1EXT@) +.br +.SH BUGS +In label expressions, +.B <> +expressions are ignored inside +.BI . char +expressions. diff --git a/gnu/usr.bin/groff/refer/refer.man b/gnu/usr.bin/groff/refer/refer.man deleted file mode 100644 index 6b09c973a93..00000000000 --- a/gnu/usr.bin/groff/refer/refer.man +++ /dev/null @@ -1,1299 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.de TQ -.br -.ns -.TP \\$1 -.. -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.\" The BSD man macros can't handle " in arguments to font change macros, -.\" so use \(ts instead of ". -.tr \(ts" -.TH @G@REFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@refer \- preprocess bibliographic references for groff -.SH SYNOPSIS -.nr a \n(.j -.ad l -.nr i \n(.i -.in +\w'\fB@g@refer 'u -.ti \niu -.B @g@refer -.de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" -.. -.OP \-benvCPRS -.OP \-a n -.OP \-c fields -.OP \-f n -.OP \-i fields -.OP \-k field -.OP \-l m,n -.OP \-p filename -.OP \-s fields -.OP \-t n -.OP \-B field.macro -.RI [\ filename \|.\|.\|.\ ] -.br -.ad \na -.SH DESCRIPTION -This file documents the GNU version of -.BR refer , -which is part of the groff document formatting system. -.B refer -copies the contents of -.IR filename \|.\|.\|. -to the standard output, -except that lines between -.B .[ -and -.B .] -are interpreted as citations, -and lines between -.B .R1 -and -.B .R2 -are interpreted as commands about how citations are to be processed. -.LP -Each citation specifies a reference. -The citation can specify a reference that is contained in -a bibliographic database by giving a set of keywords -that only that reference contains. -Alternatively it can specify a reference by supplying a database -record in the citation. -A combination of these alternatives is also possible. -.LP -For each citation, -.B refer -can produce a mark in the text. -This mark consists of some label which can be separated from -the text and from other labels in various ways. -For each reference it also outputs -.B groff -commands that can be used by a macro package to produce a formatted -reference for each citation. -The output of -.B refer -must therefore be processed using a suitable macro package. -The -.B \-ms -and -.B \-me -macros are both suitable. -The commands to format a citation's reference can be output immediately after -the citation, -or the references may be accumulated, -and the commands output at some later point. -If the references are accumulated, then multiple citations of the same -reference will produce a single formatted reference. -.LP -The interpretation of lines between -.B .R1 -and -.B .R2 -as commands is a new feature of GNU refer. -Documents making use of this feature can still be processed by -Unix refer just by adding the lines -.RS -.LP -.nf -.ft B -\&.de R1 -\&.ig R2 -\&.. -.ft -.fi -.RE -to the beginning of the document. -This will cause -.B troff -to ignore everything between -.B .R1 -and -.BR .R2 . -The effect of some commands can also be achieved by options. -These options are supported mainly for compatibility with Unix refer. -It is usually more convenient to use commands. -.LP -.B refer -generates -.B .lf -lines so that filenames and line numbers in messages produced -by commands that read -.B refer -output will be correct; -it also interprets lines beginning with -.B .lf -so that filenames and line numbers in the messages and -.B .lf -lines that it produces will be accurate even if the input has been -preprocessed by a command such as -.BR @g@soelim (@MAN1EXT@). -.SH OPTIONS -.LP -Most options are equivalent to commands -(for a description of these commands see the -.B Commands -subsection): -.TP -.B \-b -.B -no-label-in-text; no-label-in-reference -.TP -.B \-e -.B accumulate -.TP -.B \-n -.B no-default-database -.TP -.B \-C -.B compatible -.TP -.B \-P -.B move-punctuation -.TP -.B \-S -.B -label "(A.n|Q) ', ' (D.y|D)"; bracket-label " (" ) "; " -.TP -.BI \-a n -.B reverse -.BI A n -.TP -.BI \-c fields -.B capitalize -.I fields -.TP -.BI \-f n -.B label -.BI % n -.TP -.BI \-i fields -.B search-ignore -.I fields -.TP -.B \-k -.B label -.B L\(ti%a -.TP -.BI \-k field -.B label -.IB field \(ti%a -.TP -.B \-l -.B label -.BI A.nD.y%a -.TP -.BI \-l m -.B label -.BI A.n+ m D.y%a -.TP -.BI \-l, n -.B label -.BI A.nD.y\- n %a -.TP -.BI \-l m , n -.B label -.BI A.n+ m D.y\- n %a -.TP -.BI \-p filename -.B database -.I filename -.TP -.BI \-s spec -.B sort -.I spec -.TP -.BI \-t n -.B search-truncate -.I n -.LP -These options are equivalent to the following commands with the -addition that the filenames specified on the command line are -processed as if they were arguments to the -.B bibliography -command instead of in the normal way: -.TP -.B \-B -.B -annotate X AP; no-label-in-reference -.TP -.BI \-B field . macro -.B annotate -.I field -.IB macro ; -.B no-label-in-reference -.LP -The following options have no equivalent commands: -.TP -.B \-v -Print the version number. -.TP -.B \-R -Don't recognize lines beginning with -.BR .R1 / .R2 . -.SH USAGE -.SS Bibliographic databases -The bibliographic database is a text file consisting of records -separated by one or more blank lines. -Within each record fields start with a -.B % -at the beginning of a line. -Each field has a one character name that immediately follows the -.BR % . -It is best to use only upper and lower case letters for the names -of fields. -The name of the field should be followed by exactly one space, -and then by the contents of the field. -Empty fields are ignored. -The conventional meaning of each field is as follows: -.TP -.B A -The name of an author. -If the name contains a title such as -.B Jr. -at the end, -it should be separated from the last name by a comma. -There can be multiple occurrences of the -.B A -field. -The order is significant. -It is a good idea always to supply an -.B A -field or a -.B Q -field. -.TP -.B B -For an article that is part of a book, the title of the book -.TP -.B C -The place (city) of publication. -.TP -.B D -The date of publication. -The year should be specified in full. -If the month is specified, the name rather than the number of the month -should be used, but only the first three letters are required. -It is a good idea always to supply a -.B D -field; -if the date is unknown, a value such as -.B in press -or -.B unknown -can be used. -.TP -.B E -For an article that is part of a book, the name of an editor of the book. -Where the work has editors and no authors, -the names of the editors should be given as -.B A -fields and -.B ,\ (ed) -or -.B ,\ (eds) -should be appended to the last author. -.TP -.B G -US Government ordering number. -.TP -.B I -The publisher (issuer). -.TP -.B J -For an article in a journal, the name of the journal. -.TP -.B K -Keywords to be used for searching. -.TP -.B L -Label. -.TP -.B N -Journal issue number. -.TP -.B O -Other information. -This is usually printed at the end of the reference. -.TP -.B P -Page number. -A range of pages can be specified as -.IB m \- n\fR. -.TP -.B Q -The name of the author, if the author is not a person. -This will only be used if there are no -.B A -fields. -There can only be one -.B Q -field. -.TP -.B R -Technical report number. -.TP -.B S -Series name. -.TP -.B T -Title. -For an article in a book or journal, -this should be the title of the article. -.TP -.B V -Volume number of the journal or book. -.TP -.B X -Annotation. -.LP -For all fields except -.B A -and -.BR E , -if there is more than one occurrence of a particular field in a record, -only the last such field will be used. -.LP -If accent strings are used, they should follow the character to be accented. -This means that the -.B AM -macro must be used with the -.B \-ms -macros. -Accent strings should not be quoted: -use one -.B \e -rather than two. -.SS Citations -The format of a citation is -.RS -.BI .[ opening-text -.br -.I -flags keywords -.br -.I fields -.br -.BI .] closing-text -.RE -.LP -The -.IR opening-text , -.IR closing-text -and -.I flags -components are optional. -Only one of the -.I keywords -and -.I fields -components need be specified. -.LP -The -.I keywords -component says to search the bibliographic databases for a reference -that contains all the words in -.IR keywords . -It is an error if more than one reference if found. -.LP -The -.I fields -components specifies additional fields to replace or supplement -those specified in the reference. -When references are being accumulated and the -.I keywords -component is non-empty, -then additional fields should be specified only on the first -occasion that a particular reference is cited, -and will apply to all citations of that reference. -.LP -The -.I opening-text -and -.I closing-text -component specifies strings to be used to bracket the label instead -of the strings specified in the -.B bracket-label -command. -If either of these components is non-empty, -the strings specified in the -.B bracket-label -command will not be used; -this behaviour can be altered using the -.B [ -and -.B ] -flags. -Note that leading and trailing spaces are significant for these components. -.LP -The -.I flags -component is a list of -non-alphanumeric characters each of which modifies the treatment -of this particular citation. -Unix refer will treat these flags as part of the keywords and -so will ignore them since they are non-alphanumeric. -The following flags are currently recognized: -.TP -.B # -This says to use the label specified by the -.B short-label -command, -instead of that specified by the -.B label -command. -If no short label has been specified, the normal label will be used. -Typically the short label is used with author-date labels -and consists of only the date and possibly a disambiguating letter; -the -.B # -is supposed to be suggestive of a numeric type of label. -.TP -.B [ -Precede -.I opening-text -with the first string specified in the -.B bracket-label -command. -.TP -.B ] -Follow -.I closing-text -with the second string specified in the -.B bracket-label -command. -.LP -One advantages of using the -.B [ -and -.B ] -flags rather than including the brackets in -.I opening-text -and -.I closing-text -is that -you can change the style of bracket used in the document just by changing the -.B bracket-label -command. -Another advantage is that sorting and merging of citations -will not necessarily be inhibited if the flags are used. -.LP -If a label is to be inserted into the text, -it will be attached to the line preceding the -.B .[ -line. -If there is no such line, then an extra line will be inserted before the -.B .[ -line and a warning will be given. -.LP -There is no special notation for making a citation to multiple references. -Just use a sequence of citations, one for each reference. -Don't put anything between the citations. -The labels for all the citations will be attached to the line preceding -the first citation. -The labels may also be sorted or merged. -See the description of the -.B <> -label expression, and of the -.B sort-adjacent-labels -and -.B abbreviate-label-ranges -command. -A label will not be merged if its citation has a non-empty -.I opening-text -or -.IR closing-text . -However, the labels for a citation using the -.B ] -flag and without any -.I closing-text -immediately followed by a citation using the -.B [ -flag and without any -.I opening-text -may be sorted and merged -even though the first citation's -.I opening-text -or the second citation's -.I closing-text -is non-empty. -(If you wish to prevent this just make the first citation's -.I closing-text -.BR \e& .) -.SS Commands -Commands are contained between lines starting with -.B .R1 -and -.BR .R2 . -Recognition of these lines can be prevented by the -.B \-R -option. -When a -.B .R1 -line is recognized any accumulated references are flushed out. -Neither -.B .R1 -nor -.B .R2 -lines, -nor anything between them -is output. -.LP -Commands are separated by newlines or -.BR ; s. -.B # -introduces a comment that extends to the end of the line -(but does not conceal the newline). -Each command is broken up into words. -Words are separated by spaces or tabs. -A word that begins with -.B \(ts -extends to the next -.B \(ts -that is not followed by another -.BR \(ts . -If there is no such -.B \(ts -the word extends to the end of the line. -Pairs of -.B \(ts -in a word beginning with -.B \(ts -collapse to a single -.BR \(ts . -Neither -.B # -nor -.B ; -are recognized inside -.BR \(ts s. -A line can be continued by ending it with -.BR \e ; -this works everywhere except after a -.BR # . -.LP -.ds n \fR* -Each command -.I name -that is marked with \*n has an associated negative command -.BI no- name -that undoes the effect of -.IR name . -For example, the -.B no-sort -command specifies that references should not be sorted. -The negative commands take no arguments. -.LP -In the following description each argument must be a single word; -.I field -is used for a single upper or lower case letter naming a field; -.I fields -is used for a sequence of such letters; -.I m -and -.I n -are used for a non-negative numbers; -.I string -is used for an arbitrary string; -.I filename -is used for the name of a file. -.Tp \w'\fBabbreviate-label-ranges'u+2n -.BI abbreviate\*n\ fields\ string1\ string2\ string3\ string4 -Abbreviate the first names of -.IR fields . -An initial letter will be separated from another initial letter by -.IR string1 , -from the last name by -.IR string2 , -and from anything else -(such as a -.B von -or -.BR de ) -by -.IR string3 . -These default to a period followed by a space. -In a hyphenated first name, -the initial of the first part of the name will be separated from the hyphen by -.IR string4 ; -this defaults to a period. -No attempt is made to handle any ambiguities that might -result from abbreviation. -Names are abbreviated before sorting and before -label construction. -.TP -.BI abbreviate-label-ranges\*n\ string -Three or more adjacent labels that refer to consecutive references -will be abbreviated to a label consisting -of the first label, followed by -.I string -followed by the last label. -This is mainly useful with numeric labels. -If -.I string -is omitted it defaults to -.BR \- . -.TP -.B accumulate\*n -Accumulate references instead of writing out each reference -as it is encountered. -Accumulated references will be written out whenever a reference -of the form -.RS -.IP -.B .[ -.br -.B $LIST$ -.br -.B .] -.LP -is encountered, -after all input files hve been processed, -and whenever -.B .R1 -line is recognized. -.RE -.TP -.BI annotate\*n\ field\ string -.I field -is an annotation; -print it at the end of the reference as a paragraph preceded by the line -.RS -.IP -.BI . string -.LP -If -.I macro -is omitted it will default to -.BR AP ; -if -.I field -is also omitted it will default to -.BR X . -Only one field can be an annotation. -.RE -.TP -.BI articles\ string \fR\|.\|.\|. -.IR string \|.\|.\|. -are definite or indefinite articles, and should be ignored at the beginning of -.B T -fields when sorting. -Initially, -.BR the , -.B a -and -.B an -are recognized as articles. -.TP -.BI bibliography\ filename \fR\|.\|.\|. -Write out all the references contained in the bibliographic databases -.IR filename \|.\|.\|. -.TP -.BI bracket-label\ string1\ string2\ string3 -In the text, bracket each label -with -.I string1 -and -.IR string2 . -An occurrence of -.I string2 -immediately followed by -.I string1 -will be turned into -.IR string3 . -The default behaviour is -.RS -.IP -.B -bracket-label \e*([. \e*(.] ", " -.RE -.TP -.BI capitalize\ fields -Convert -.I fields -to caps and small caps. -.TP -.B compatible\*n -Recognize -.B .R1 -and -.B .R2 -even when followed by a character other than space or newline. -.TP -.BI database\ filename \fR\|.\|.\|. -Search the bibliographic databases -.IR filename \|.\|.\|. -For each -.I filename -if an index -.IB filename @INDEX_SUFFIX@ -created by -.BR @g@indxbib (@MAN1EXT@) -exists, then it will be searched instead; -each index can cover multiple databases. -.TP -.BI date-as-label\*n\ string -.I string -is a label expression that specifies a string with which to replace the -.B D -field after constructing the label. -See the -.B "Label expressions" -subsection for a description of label expressions. -This command is useful if you do not want explicit labels in the -reference list, but instead want to handle any necessary -disambiguation by qualifying the date in some way. -The label used in the text would typically be some combination of the -author and date. -In most cases you should also use the -.B no-label-in-reference -command. -For example, -.RS -.IP -.B -date-as-label D.+yD.y%a*D.-y -.LP -would attach a disambiguating letter to the year part of the -.B D -field in the reference. -.RE -.TP -.B default-database\*n -The default database should be searched. -This is the default behaviour, so the negative version of -this command is more useful. -refer determines whether the default database should be searched -on the first occasion that it needs to do a search. -Thus a -.B no-default-database -command must be given before then, -in order to be effective. -.TP -.BI discard\*n\ fields -When the reference is read, -.I fields -should be discarded; -no string definitions for -.I fields -will be output. -Initially, -.I fields -are -.BR XYZ . -.TP -.BI et-al\*n\ string\ m\ n -Control use of -.B -et al -in the evaluation of -.B @ -expressions in label expressions. -If the number of authors needed to make the author sequence -unambiguous is -.I u -and the total number of authors is -.I t -then the last -.IR t \|\-\| u -authors will be replaced by -.I string -provided that -.IR t \|\-\| u -is not less than -.I m -and -.I t -is not less than -.IR n . -The default behaviour is -.RS -.IP -.B -et-al " et al" 2 3 -.RE -.TP -.BI include\ filename -Include -.I filename -and interpret the contents as commands. -.TP -.BI join-authors\ string1\ string2\ string3 -This says how authors should be joined together. -When there are exactly two authors, they will be joined with -.IR string1 . -When there are more than two authors, all but the last two will -be joined with -.IR string2 , -and the last two authors will be joined with -.IR string3 . -If -.I string3 -is omitted, -it will default to -.IR string1 ; -if -.I string2 -is also omitted it will also default to -.IR string1 . -For example, -.RS -.IP -.B -join-authors " and " ", " ", and " -.LP -will restore the default method for joining authors. -.RE -.TP -.B label-in-reference\*n -When outputting the reference, -define the string -.B [F -to be the reference's label. -This is the default behaviour; so the negative version -of this command is more useful. -.TP -.B label-in-text\*n -For each reference output a label in the text. -The label will be separated from the surrounding text as described in the -.B bracket-label -command. -This is the default behaviour; so the negative version -of this command is more useful. -.TP -.BI label\ string -.I string -is a label expression describing how to label each reference. -.TP -.BI separate-label-second-parts\ string -When merging two-part labels, separate the second part of the second -label from the first label with -.IR string . -See the description of the -.B <> -label expression. -.TP -.B move-punctuation\*n -In the text, move any punctuation at the end of line past the label. -It is usually a good idea to give this command unless you are using -superscripted numbers as labels. -.TP -.BI reverse\*n\ string -Reverse the fields whose names -are in -.IR string . -Each field name can be followed by a number which says -how many such fields should be reversed. -If no number is given for a field, all such fields will be reversed. -.TP -.BI search-ignore\*n\ fields -While searching for keys in databases for which no index exists, -ignore the contents of -.IR fields . -Initially, fields -.B XYZ -are ignored. -.TP -.BI search-truncate\*n\ n -Only require the first -.I n -characters of keys to be given. -In effect when searching for a given key -words in the database are truncated to the maximum of -.I n -and the length of the key. -Initially -.I n -is 6. -.TP -.BI short-label\*n\ string -.I string -is a label expression that specifies an alternative (usually shorter) -style of label. -This is used when the -.B # -flag is given in the citation. -When using author-date style labels, the identity of the author -or authors is sometimes clear from the context, and so it -may be desirable to omit the author or authors from the label. -The -.B short-label -command will typically be used to specify a label containing just -a date and possibly a disambiguating letter. -.TP -.BI sort\*n\ string -Sort references according to -.BR string . -References will automatically be accumulated. -.I string -should be a list of field names, each followed by a number, -indicating how many fields with the name should be used for sorting. -.B + -can be used to indicate that all the fields with the name should be used. -Also -.B . -can be used to indicate the references should be sorted using the -(tentative) label. -(The -.B -Label expressions -subsection describes the concept of a tentative label.) -.TP -.B sort-adjacent-labels\*n -Sort labels that are adjacent in the text according to their -position in the reference list. -This command should usually be given if the -.B abbreviate-label-ranges -command has been given, -or if the label expression contains a -.B <> -expression. -This will have no effect unless references are being accumulated. -.SS Label expressions -.LP -Label expressions can be evaluated both normally and tentatively. -The result of normal evaluation is used for output. -The result of tentative evaluation, called the -.I -tentative label, -is used to gather the information -that normal evaluation needs to disambiguate the label. -Label expressions specified by the -.B date-as-label -and -.B short-label -commands are not evaluated tentatively. -Normal and tentative evaluation are the same for all types -of expression other than -.BR @ , -.BR * , -and -.B % -expressions. -The description below applies to normal evaluation, -except where otherwise specified. -.TP -.I field -.TQ -.I field\ n -The -.IR n -th -part of -.IR field . -If -.I n -is omitted, it defaults to 1. -.TP -.BI ' string ' -The characters in -.I string -literally. -.TP -.B @ -All the authors joined as specified by the -.B join-authors -command. -The whole of each author's name will be used. -However, if the references are sorted by author -(that is the sort specification starts with -.BR A+ ), -then authors' last names will be used instead, provided that this does -not introduce ambiguity, -and also an initial subsequence of the authors may be used -instead of all the authors, again provided that this does not -introduce ambiguity. -The use of only the last name for the -.IR i -th -author of some reference -is considered to be ambiguous if -there is some other reference, -such that the first -.IR i \|-\|1 -authors of the references are the same, -the -.IR i -th -authors are not the same, -but the -.IR i -th -authors' last names are the same. -A proper initial subsequence of the sequence -of authors for some reference is considered to be ambiguous if there is -a reference with some other sequence of authors which also has -that subsequence as a proper initial subsequence. -When an initial subsequence of authors is used, the remaining -authors are replaced by the string specified by the -.B et-al -command; -this command may also specify additional requirements that must be -met before an initial subsequence can be used. -.B @ -tentatively evaluates to a canonical representation of the authors, -such that authors that compare equally for sorting purpose -will have the same representation. -.TP -.BI % n -.TQ -.B %a -.TQ -.B %A -.TQ -.B %i -.TQ -.B %I -The serial number of the reference formatted according to the character -following the -.BR % . -The serial number of a reference is 1 plus the number of earlier references -with same tentative label as this reference. -These expressions tentatively evaluate to an empty string. -.TP -.IB expr * -If there is another reference with the same tentative label as -this reference, then -.IR expr , -otherwise an empty string. -It tentatively evaluates to an empty string. -.TP -.IB expr + n -.TQ -.IB expr \- n -The first -.RB ( + ) -or last -.RB ( \- ) -.I n -upper or lower case letters or digits of -.IR expr . -Troff special characters (such as -.BR \e('a ) -count as a single letter. -Accent strings are retained but do not count towards the total. -.TP -.IB expr .l -.I expr -converted to lowercase. -.TP -.IB expr .u -.I expr -converted to uppercase. -.TP -.IB expr .c -.I expr -converted to caps and small caps. -.TP -.IB expr .r -.I expr -reversed so that the last name is first. -.TP -.IB expr .a -.I expr -with first names abbreviated. -Note that fields specified in the -.B abbreviate -command are abbreviated before any labels are evaluated. -Thus -.B .a -is useful only when you want a field to be abbreviated in a label -but not in a reference. -.TP -.IB expr .y -The year part of -.IR expr . -.TP -.IB expr .+y -The part of -.I expr -before the year, or the whole of -.I expr -if it does not contain a year. -.TP -.IB expr .\-y -The part of -.I expr -after the year, or an empty string if -.I expr -does not contain a year. -.TP -.IB expr .n -The last name part of -.IR expr . -.TP -.IB expr1 \(ti expr2 -.I expr1 -except that if the last character of -.I expr1 -is -.B \- -then it will be replaced by -.IR expr2 . -.TP -.I expr1\ expr2 -The concatenation of -.I expr1 -and -.IR expr2 . -.TP -.IB expr1 | expr2 -If -.I expr1 -is non-empty then -.I expr1 -otherwise -.IR expr2 . -.TP -.IB expr1 & expr2 -If -.I expr1 -is non-empty -then -.I expr2 -otherwise an empty string. -.TP -.IB expr1 ? expr2 : expr3 -If -.I expr1 -is non-empty -then -.I expr2 -otherwise -.IR expr3 . -.TP -.BI < expr > -The label is in two parts, which are separated by -.IR expr . -Two adjacent two-part labels which have the same first part will be -merged by appending the second part of the second label onto the first -label separated by the string specified in the -.B separate-label-second-parts -command (initially, a comma followed by a space); the resulting label -will also be a two-part label with the same first part as before -merging, and so additional labels can be merged into it. -Note that it is permissible for the first part to be empty; -this maybe desirable for expressions used in the -.B short-label -command. -.TP -.BI ( expr ) -The same as -.IR expr . -Used for grouping. -.LP -The above expressions are listed in order of precedence -(highest first); -.B & -and -.B | -have the same precedence. -.SS Macro interface -Each reference starts with a call to the macro -.BR ]- . -The string -.B [F -will be defined to be the label for this reference, -unless the -.B no-label-in-reference -command has been given. -There then follows a series of string definitions, -one for each field: -string -.BI [ X -corresponds to field -.IR X . -The number register -.B [P -is set to 1 if the -.B P -field contains a range of pages. -The -.BR [T , -.B [A -and -.B [O -number registers are set to 1 according as the -.BR T , -.B A -and -.B O -fields end with one of the characters -.BR .?! . -The -.B [E -number register will be set to 1 if the -.B [E -string contains more than one name. -The reference is followed by a call to the -.B ][ -macro. -The first argument to this macro gives a number representing -the type of the reference. -If a reference contains a -.B J -field, it will be classified as type 1, -otherwise if it contains a -.B B -field, it will type 3, -otherwise if it contains a -.B G -or -.B R -field it will be type 4, -otherwise if contains a -.B I -field it will be type 2, -otherwise it will be type 0. -The second argument is a symbolic name for the type: -.BR other , -.BR journal-article , -.BR book , -.B article-in-book -or -.BR tech-report . -Groups of references that have been accumulated -or are produced by the -.B bibliography -command are preceded by a call to the -.B ]< -macro and followed by a call to the -.B ]> -macro. -.SH FILES -.Tp \w'\fB@DEFAULT_INDEX@'u+2n -.B @DEFAULT_INDEX@ -Default database. -.TP -.IB file @INDEX_SUFFIX@ -Index files. -.SH "SEE ALSO" -.BR @g@indxbib (@MAN1EXT@), -.BR @g@lookbib (@MAN1EXT@), -.BR lkbib (@MAN1EXT@) -.br -.SH BUGS -In label expressions, -.B <> -expressions are ignored inside -.BI . char -expressions. diff --git a/gnu/usr.bin/groff/soelim/Makefile.sub b/gnu/usr.bin/groff/soelim/Makefile.sub index 7c873a6a9c2..c6696375ac3 100644 --- a/gnu/usr.bin/groff/soelim/Makefile.sub +++ b/gnu/usr.bin/groff/soelim/Makefile.sub @@ -1,5 +1,5 @@ PROG=soelim -MAN1=soelim.n +MAN1=soelim.1 XLIBS=$(LIBGROFF) OBJS=soelim.o CCSRCS=soelim.cc diff --git a/gnu/usr.bin/groff/soelim/soelim.1_in b/gnu/usr.bin/groff/soelim/soelim.1_in new file mode 100644 index 00000000000..7026f3ee381 --- /dev/null +++ b/gnu/usr.bin/groff/soelim/soelim.1_in @@ -0,0 +1,72 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH @G@SOELIM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@soelim \- interpret .so requests in groff input +.SH SYNOPSIS +.B @g@soelim +[ +.B \-Cv +] +[ +.BI \-I dir +] +[ +.IR files \|.\|.\|.\| +] +.SH DESCRIPTION +.B @g@soelim +reads +.I files +and replaces lines of the form +.IP +.BI .so\ file +.LP +by the contents of +.IR file . +It is useful if files included with +.B so +need to be preprocessed. +Normally, +.B @g@soelim +should be invoked with the +.B \-s +option of +.BR groff . +.SH OPTIONS +.TP +.B \-C +Recognize +.B .so +even when followed by a character other than space or newline. +.TP +.BI \-I dir +This option may be used to specify a directory to search for +files (both those on the command line and those named in +.B \&.so +lines). +The current directory is always searched first. +This option may be specified more than once, +the directories will be searched in the order specified. +No directory search is performed for files specified using an absolute path. +.TP +.B \-v +Print the version number. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/soelim/soelim.man b/gnu/usr.bin/groff/soelim/soelim.man deleted file mode 100644 index 7026f3ee381..00000000000 --- a/gnu/usr.bin/groff/soelim/soelim.man +++ /dev/null @@ -1,72 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH @G@SOELIM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@soelim \- interpret .so requests in groff input -.SH SYNOPSIS -.B @g@soelim -[ -.B \-Cv -] -[ -.BI \-I dir -] -[ -.IR files \|.\|.\|.\| -] -.SH DESCRIPTION -.B @g@soelim -reads -.I files -and replaces lines of the form -.IP -.BI .so\ file -.LP -by the contents of -.IR file . -It is useful if files included with -.B so -need to be preprocessed. -Normally, -.B @g@soelim -should be invoked with the -.B \-s -option of -.BR groff . -.SH OPTIONS -.TP -.B \-C -Recognize -.B .so -even when followed by a character other than space or newline. -.TP -.BI \-I dir -This option may be used to specify a directory to search for -files (both those on the command line and those named in -.B \&.so -lines). -The current directory is always searched first. -This option may be specified more than once, -the directories will be searched in the order specified. -No directory search is performed for files specified using an absolute path. -.TP -.B \-v -Print the version number. -.SH "SEE ALSO" -.BR groff (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/tbl/Makefile.sub b/gnu/usr.bin/groff/tbl/Makefile.sub index 8ab4a74785e..209ebb75208 100644 --- a/gnu/usr.bin/groff/tbl/Makefile.sub +++ b/gnu/usr.bin/groff/tbl/Makefile.sub @@ -1,5 +1,5 @@ PROG=tbl -MAN1=tbl.n +MAN1=tbl.1 XLIBS=$(LIBGROFF) OBJS=main.o table.o CCSRCS=main.cc table.cc diff --git a/gnu/usr.bin/groff/tbl/tbl.1_in b/gnu/usr.bin/groff/tbl/tbl.1_in new file mode 100644 index 00000000000..6016ddf35f8 --- /dev/null +++ b/gnu/usr.bin/groff/tbl/tbl.1_in @@ -0,0 +1,178 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH @G@TBL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@tbl \- format tables for troff +.SH SYNOPSIS +.B @g@tbl +[ +.B \-Cv +] +[ +.IR files \|.\|.\|. +] +.SH DESCRIPTION +This manual page describes the GNU version of +.BR tbl , +which is part of the groff document formatting system. +.B tbl +compiles descriptions of tables embedded within +.B troff +input files into commands that are understood by +.BR troff . +Normally, it should be invoked using the +.B \-t +option of +.B groff. +It is highly compatible with Unix +.BR tbl . +The output generated by GNU +.B tbl +cannot be processed with Unix +.BR troff ; +it must be processed with GNU +.BR troff . +If no files are given on the command line, the standard input +will be read. +A filename of +.B \- +will cause the standard input to be read. +.SH OPTIONS +.TP +.B \-C +Recognize +.B .TS +and +.B .TE +even when followed by a character other than space or newline. +.TP +.B \-v +Print the version number. +.SH USAGE +Only the differences between GNU +.B tbl +and Unix +.B tbl +are described here. +.LP +Normally +.B tbl +attempts to prevent undesirable breaks in the table by using diversions. +This can sometimes interact badly with macro packages' own use of diversions, +when footnotes, for example, are used. +The +.B nokeep +option tells +.B tbl +not to try and prevent breaks in this way. +.LP +The +.B decimalpoint +option specifies the character to be recognized as the decimal +point character in place of the default period. +It takes an argument in parentheses, which must be a single +character, as for the +.B tab +option. +.LP +The +.B f +format modifier can be followed by an arbitrary length +font name in parentheses. +.LP +There is a +.B d +format modifier which means that a vertically spanning entry +should be aligned at the bottom of its range. +.LP +There is no limit on the number of columns in a table, nor any limit +on the number of text blocks. +All the lines of a table are considered in deciding column +widths, not just the first 200. +Table continuation +.RB ( .T& ) +lines are not restricted to the first 200 lines. +.LP +Numeric and alphabetic items may appear in the same column. +.LP +Numeric and alphabetic items may span horizontally. +.LP +.B tbl +uses register, string, macro and diversion names beginning with +.BR 3 . +When using +.B tbl +you should avoid using any names beginning with a +.BR 3 . +.SH BUGS +You should use +.BR .TS\ H / .TH +in conjunction with a supporting macro package for +.I all +multi-page boxed tables. +If there is no header that you wish to appear at the top of each page +of the table, place the +.B .TH +line immediately after the format section. +Do not enclose a multi-page table within keep/release macros, +or divert it in any other way. +.LP +A text block within a table must be able to fit on one page. +.LP +The +.B bp +request cannot be used to force a page-break in a multi-page table. +Instead, define +.B BP +as follows +.IP +.B .de BP +.br +.B .ie '\e\en(.z'' .bp \e\e$1 +.br +.B .el \e!.BP \e\e$1 +.br +.B .. +.br +.LP +and use +.B BP +instead of +.BR bp . +.LP +Using \ea directly in a table to get leaders will not work. +This is correct behaviour: \ea is a +.B uninterpreted +leader. +To get leaders use a real leader, either by using a control A or like +this: +.IP +.nf +.ft B +\&.ds a \ea +\&.TS +tab(;); +lw(1i) l. +A\e*a;B +\&.TE +.ft +.fi +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/tbl/tbl.man b/gnu/usr.bin/groff/tbl/tbl.man deleted file mode 100644 index 6016ddf35f8..00000000000 --- a/gnu/usr.bin/groff/tbl/tbl.man +++ /dev/null @@ -1,178 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH @G@TBL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@tbl \- format tables for troff -.SH SYNOPSIS -.B @g@tbl -[ -.B \-Cv -] -[ -.IR files \|.\|.\|. -] -.SH DESCRIPTION -This manual page describes the GNU version of -.BR tbl , -which is part of the groff document formatting system. -.B tbl -compiles descriptions of tables embedded within -.B troff -input files into commands that are understood by -.BR troff . -Normally, it should be invoked using the -.B \-t -option of -.B groff. -It is highly compatible with Unix -.BR tbl . -The output generated by GNU -.B tbl -cannot be processed with Unix -.BR troff ; -it must be processed with GNU -.BR troff . -If no files are given on the command line, the standard input -will be read. -A filename of -.B \- -will cause the standard input to be read. -.SH OPTIONS -.TP -.B \-C -Recognize -.B .TS -and -.B .TE -even when followed by a character other than space or newline. -.TP -.B \-v -Print the version number. -.SH USAGE -Only the differences between GNU -.B tbl -and Unix -.B tbl -are described here. -.LP -Normally -.B tbl -attempts to prevent undesirable breaks in the table by using diversions. -This can sometimes interact badly with macro packages' own use of diversions, -when footnotes, for example, are used. -The -.B nokeep -option tells -.B tbl -not to try and prevent breaks in this way. -.LP -The -.B decimalpoint -option specifies the character to be recognized as the decimal -point character in place of the default period. -It takes an argument in parentheses, which must be a single -character, as for the -.B tab -option. -.LP -The -.B f -format modifier can be followed by an arbitrary length -font name in parentheses. -.LP -There is a -.B d -format modifier which means that a vertically spanning entry -should be aligned at the bottom of its range. -.LP -There is no limit on the number of columns in a table, nor any limit -on the number of text blocks. -All the lines of a table are considered in deciding column -widths, not just the first 200. -Table continuation -.RB ( .T& ) -lines are not restricted to the first 200 lines. -.LP -Numeric and alphabetic items may appear in the same column. -.LP -Numeric and alphabetic items may span horizontally. -.LP -.B tbl -uses register, string, macro and diversion names beginning with -.BR 3 . -When using -.B tbl -you should avoid using any names beginning with a -.BR 3 . -.SH BUGS -You should use -.BR .TS\ H / .TH -in conjunction with a supporting macro package for -.I all -multi-page boxed tables. -If there is no header that you wish to appear at the top of each page -of the table, place the -.B .TH -line immediately after the format section. -Do not enclose a multi-page table within keep/release macros, -or divert it in any other way. -.LP -A text block within a table must be able to fit on one page. -.LP -The -.B bp -request cannot be used to force a page-break in a multi-page table. -Instead, define -.B BP -as follows -.IP -.B .de BP -.br -.B .ie '\e\en(.z'' .bp \e\e$1 -.br -.B .el \e!.BP \e\e$1 -.br -.B .. -.br -.LP -and use -.B BP -instead of -.BR bp . -.LP -Using \ea directly in a table to get leaders will not work. -This is correct behaviour: \ea is a -.B uninterpreted -leader. -To get leaders use a real leader, either by using a control A or like -this: -.IP -.nf -.ft B -\&.ds a \ea -\&.TS -tab(;); -lw(1i) l. -A\e*a;B -\&.TE -.ft -.fi -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/tfmtodit/Makefile.sub b/gnu/usr.bin/groff/tfmtodit/Makefile.sub index aa430e2daf8..618283a99f9 100644 --- a/gnu/usr.bin/groff/tfmtodit/Makefile.sub +++ b/gnu/usr.bin/groff/tfmtodit/Makefile.sub @@ -1,5 +1,5 @@ PROG=tfmtodit -MAN1=tfmtodit.n +MAN1=tfmtodit.1 XLIBS=$(LIBGROFF) MLIB=$(LIBM) OBJS=tfmtodit.o diff --git a/gnu/usr.bin/groff/tfmtodit/tfmtodit.1_in b/gnu/usr.bin/groff/tfmtodit/tfmtodit.1_in new file mode 100644 index 00000000000..f17c4414ada --- /dev/null +++ b/gnu/usr.bin/groff/tfmtodit/tfmtodit.1_in @@ -0,0 +1,167 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X +.el .ds tx TeX +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +tfmtodit \- create font files for use with groff \-Tdvi +.SH SYNOPSIS +.B tfmtodit +[ +.B \-sv +] +[ +.BI \-g gf_file +] +[ +.BI \-k skewchar +] +.I tfm_file +.I map_file +.I font +.SH DESCRIPTION +.B tfmtodit +creates a font file for use with +.B +groff \-Tdvi\fR. +.I tfm_file +is the name of the \*(tx font metric file for the font. +.I map_file +is a file giving the groff names for characters in the font; +this file should consist of a sequence of lines of the form: +.IP +.I +n c1 c2 \fR.\|.\|. +.LP +where +.I n +is a decimal integer giving the position of the character in the font, +and +.IR c1 , +.IR c2 ,.\|.\|. +are the groff names of the character. +If a character has no groff names but exists in the tfm file, +then it will be put in the groff font file as an unnamed character. +.I font +is the name of the groff font file. +The groff font file is written to +.IR font . +.LP +The +.B \-s +option should be given if the font is special +(a font is +.I special +if +.B troff +should search it whenever +a character is not found in the current font.) +If the font is special, +it should be listed in the +.B fonts +command in the DESC file; +if it is not special, there is no need to list it, since +.B troff +can automatically mount it when it's first used. +.LP +To do a good job of math typesetting, groff requires +font metric information not present in the tfm file. +The reason for this is that \*(tx has separate math italic fonts +whereas groff uses normal italic fonts for math. +The additional information required by groff is given by the +two arguments to the +.B math_fit +macro in the Metafont programs for the Computer Modern fonts. +In a text font (a font for which +.B math_fitting +is false), Metafont normally ignores these two arguments. +Metafont can be made to put this information in the gf file +by loading the following definition after +.B cmbase +when creating +.BR cm.base : +.IP +.nf +.ft B +def ignore_math_fit(expr left_adjustment,right_adjustment) = + special "adjustment"; + numspecial left_adjustment*16/designsize; + numspecial right_adjustment*16/designsize; + enddef; +.fi +.ft R +.LP +The gf file created using this modified +.B cm.base +should be specified with the +.B \-g +option. +The +.B \-g +option should not be given for a font for which +.B math_fitting +is true. +.SH OPTIONS +.TP +.B \-v +Print the version number. +.TP +.B \-s +The font is special. +The effect of this option is to add the +.B special +command to the font file. +.TP +.BI \-k n +The skewchar of this font is at position +.IR n . +.I n +should be an integer; +it may be given in decimal, +or with a leading +.B 0 +in octal, +or with a leading +.B 0x +in hexadecimal. +The effect of this option is to ignore any kerns whose second component +is the specified character. +.TP +.BI \-g gf_file +.I gf_file +is a gf file produced by Metafont containing special and numspecial +commands giving additional font metric information. +.SH FILES +.Tp \w'\fB@FONTDIR@/devdvi/DESC'u+2n +.B @FONTDIR@/devdvi/DESC +Device description file. +.TP +.BI @FONTDIR@/devdvi/ F +Font description file for font +.IR F . +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR grodvi (@MAN1EXT@), +.BR groff_font (@MAN5EXT@) diff --git a/gnu/usr.bin/groff/tfmtodit/tfmtodit.man b/gnu/usr.bin/groff/tfmtodit/tfmtodit.man deleted file mode 100644 index f17c4414ada..00000000000 --- a/gnu/usr.bin/groff/tfmtodit/tfmtodit.man +++ /dev/null @@ -1,167 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X -.el .ds tx TeX -.\" Like TP, but if specified indent is more than half -.\" the current line-length - indent, use the default indent. -.de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -tfmtodit \- create font files for use with groff \-Tdvi -.SH SYNOPSIS -.B tfmtodit -[ -.B \-sv -] -[ -.BI \-g gf_file -] -[ -.BI \-k skewchar -] -.I tfm_file -.I map_file -.I font -.SH DESCRIPTION -.B tfmtodit -creates a font file for use with -.B -groff \-Tdvi\fR. -.I tfm_file -is the name of the \*(tx font metric file for the font. -.I map_file -is a file giving the groff names for characters in the font; -this file should consist of a sequence of lines of the form: -.IP -.I -n c1 c2 \fR.\|.\|. -.LP -where -.I n -is a decimal integer giving the position of the character in the font, -and -.IR c1 , -.IR c2 ,.\|.\|. -are the groff names of the character. -If a character has no groff names but exists in the tfm file, -then it will be put in the groff font file as an unnamed character. -.I font -is the name of the groff font file. -The groff font file is written to -.IR font . -.LP -The -.B \-s -option should be given if the font is special -(a font is -.I special -if -.B troff -should search it whenever -a character is not found in the current font.) -If the font is special, -it should be listed in the -.B fonts -command in the DESC file; -if it is not special, there is no need to list it, since -.B troff -can automatically mount it when it's first used. -.LP -To do a good job of math typesetting, groff requires -font metric information not present in the tfm file. -The reason for this is that \*(tx has separate math italic fonts -whereas groff uses normal italic fonts for math. -The additional information required by groff is given by the -two arguments to the -.B math_fit -macro in the Metafont programs for the Computer Modern fonts. -In a text font (a font for which -.B math_fitting -is false), Metafont normally ignores these two arguments. -Metafont can be made to put this information in the gf file -by loading the following definition after -.B cmbase -when creating -.BR cm.base : -.IP -.nf -.ft B -def ignore_math_fit(expr left_adjustment,right_adjustment) = - special "adjustment"; - numspecial left_adjustment*16/designsize; - numspecial right_adjustment*16/designsize; - enddef; -.fi -.ft R -.LP -The gf file created using this modified -.B cm.base -should be specified with the -.B \-g -option. -The -.B \-g -option should not be given for a font for which -.B math_fitting -is true. -.SH OPTIONS -.TP -.B \-v -Print the version number. -.TP -.B \-s -The font is special. -The effect of this option is to add the -.B special -command to the font file. -.TP -.BI \-k n -The skewchar of this font is at position -.IR n . -.I n -should be an integer; -it may be given in decimal, -or with a leading -.B 0 -in octal, -or with a leading -.B 0x -in hexadecimal. -The effect of this option is to ignore any kerns whose second component -is the specified character. -.TP -.BI \-g gf_file -.I gf_file -is a gf file produced by Metafont containing special and numspecial -commands giving additional font metric information. -.SH FILES -.Tp \w'\fB@FONTDIR@/devdvi/DESC'u+2n -.B @FONTDIR@/devdvi/DESC -Device description file. -.TP -.BI @FONTDIR@/devdvi/ F -Font description file for font -.IR F . -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR grodvi (@MAN1EXT@), -.BR groff_font (@MAN5EXT@) diff --git a/gnu/usr.bin/groff/tmac/Makefile.sub b/gnu/usr.bin/groff/tmac/Makefile.sub index 8ce46437682..0528ad76fc9 100644 --- a/gnu/usr.bin/groff/tmac/Makefile.sub +++ b/gnu/usr.bin/groff/tmac/Makefile.sub @@ -1,16 +1,14 @@ -MAN7=groff_ms.n me.n msafer.n +MAN7=groff_ms.7 groff_man.7 groff_me.7 groff_msafer.7 -NORMALFILES=$(TMAC_ANDOC) tmac.pic tmac.ps tmac.psnew tmac.psold tmac.pspic \ +NORMALFILES=tmac.pic tmac.ps tmac.psnew tmac.psold tmac.pspic \ tmac.psatk tmac.dvi tmac.tty tmac.tty-char tmac.X tmac.Xps tmac.latin1 \ - tmac.lj4 eqnrc troffrc tmac.safer -SPECIALFILES=$(TMAC_AN) tmac.s -STRIPFILES=tmac.e tmac.doc tmac.doc.old -# MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms + tmac.lj4 eqnrc troffrc tmac.safer tmac.html tmac.arkup +SPECIALFILES=tmac.s +STRIPFILES=tmac.e mdocdir=$(tmacdir)/mdoc CLEANADD=stamp-strip stamp-wrap tmac.e-s tmac.doc-s tmac.doc.old-s \ - doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s *-wrap + doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s *-wrap tmac_s_prefix= -tmac_an_prefix= tmac_wrap= sys_tmac_prefix= @@ -19,7 +17,7 @@ all: stamp-strip stamp-wrap install_data: $(NORMALFILES) $(SPECIALFILES) stamp-wrap stamp-strip man.local -test -d $(tmacdir) || mkdir $(tmacdir) if test -n "$(tmac_wrap)"; then \ - for m in $(tmac_wrap); do \ + for m in ""$(tmac_wrap); do \ $(INSTALL_DATA) $$m-wrap $(tmacdir)/tmac.$$m; \ done; \ fi @@ -27,23 +25,12 @@ install_data: $(NORMALFILES) $(SPECIALFILES) stamp-wrap stamp-strip man.local rm -f $(tmacdir)/$$f; \ $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \ done - if test -n "$(TMAC_S)"; then \ - rm -f $(tmacdir)/tmac.$(tmac_s_prefix)s ; \ - $(INSTALL_DATA) $(srcdir)/tmac.s $(tmacdir)/tmac.$(tmac_s_prefix)s ; \ - fi - if test -n "$(TMAC_AN)"; then \ - rm -f $(tmacdir)/tmac.$(tmac_an_prefix)an ; \ - $(INSTALL_DATA) $(srcdir)/tmac.an $(tmacdir)/tmac.$(tmac_an_prefix)an ; \ - fi + -rm -f $(tmacdir)/tmac.$(tmac_s_prefix)s + $(INSTALL_DATA) $(srcdir)/tmac.s $(tmacdir)/tmac.$(tmac_s_prefix)s for f in $(STRIPFILES); do \ rm -f $(tmacdir)/$$f; \ $(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \ done - -test -d $(mdocdir) || mkdir $(mdocdir) - for f in $(MDOCFILES); do \ - rm -f $(mdocdir)/$$f; \ - $(INSTALL_DATA) $$f-s $(mdocdir)/$$f; \ - done -test -f $(tmacdir)/man.local || \ $(INSTALL_DATA) $(srcdir)/man.local $(tmacdir)/man.local -rm -f temp @@ -57,7 +44,7 @@ stamp-strip: $(STRIPFILES) $(MDOCFILES) stamp-wrap: if test -n "$(tmac_wrap)"; then \ - for m in $(tmac_wrap); do \ + for m in ""$(tmac_wrap); do \ rm -f $$m-wrap; \ echo .cp 1 >$$m-wrap; \ echo .so $(sys_tmac_prefix)$$m >>$$m-wrap; \ @@ -67,11 +54,12 @@ stamp-wrap: uninstall_sub: -if test -n "$(tmac_wrap)"; then \ - for m in $(tmac_wrap); do rm -f $(tmacdir)/tmac.$$m; done; \ + for m in ""$(tmac_wrap); do \ + rm -f $(tmacdir)/tmac.$$m; \ + done; \ fi -for f in $(NORMALFILES) $(STRIPFILES); do rm -f $(tmacdir)/$$f; done -rm -f $(tmacdir)/tmac.$(tmac_s_prefix)s - -rm -f $(tmacdir)/tmac.$(tmac_an_prefix)an -if cmp -s $(tmacdir)/man.local $(srcdir)/man.local; then \ rm -f $(tmacdir)/man.local; \ fi diff --git a/gnu/usr.bin/groff/tmac/doc-common b/gnu/usr.bin/groff/tmac/doc-common index eb5e87570e3..1be195979fa 100644 --- a/gnu/usr.bin/groff/tmac/doc-common +++ b/gnu/usr.bin/groff/tmac/doc-common @@ -118,6 +118,7 @@ .nr Xc 3 .nr Xo 1 .nr Xr 10n +.nr Yr \n(yr+1900 .ds sV \& \& .ds hV \&\ \& .ds iV \& \& @@ -157,9 +158,9 @@ . ds cH \\$2 .\" . if "\\$3"" \{\ . if \\$2>=1 .if \\$2<=8 \{\ -. ds vT UNIX Reference Manual -. if \\$2>1 .if \\$2<6 .ds vT UNIX Programmer's Manual -. if "\\$2"8" .ds vT UNIX System Manager's Manual +. ds vT System Reference Manual +. if \\$2>1 .if \\$2<6 .ds vT System Programmer's Manual +. if "\\$2"8" .ds vT System Manager's Manual . nr sN \\$2 . \} . if "\\$2"unass" .ds vT DRAFT @@ -168,17 +169,17 @@ .\" . \} .\} .if !"\\$3"" \{\ -. if "\\$3"USD" .ds vT UNIX User's Supplementary Documents -. if "\\$3"PS1" .ds vT UNIX Programmers's Supplementary Documents -. if "\\$3"AMD" .ds vT UNIX Ancestral Manual Documents -. if "\\$3"SMM" .ds vT UNIX System Manager's Manual -. if "\\$3"URM" .ds vT UNIX Reference Manual -. if "\\$3"PRM" .ds vT UNIX Programmers's Manual -. if "\\$3"IND" .ds vT UNIX Manual Master Index -.\" . if "\\$3"CON" .ds vT UNIX Contributed Software Manual -.\" . if "\\$3"IMP" .ds vT UNIX Implementation Notes -.\" . if "\\$3"HOW" .ds vT UNIX How Pocket Manual -. if "\\$3"LOCAL" .ds vT UNIX Local Manual +. if "\\$3"USD" .ds vT User's Supplementary Documents +. if "\\$3"PS1" .ds vT Programmers's Supplementary Documents +. if "\\$3"AMD" .ds vT Ancestral Manual Documents +. if "\\$3"SMM" .ds vT System Manager's Manual +. if "\\$3"URM" .ds vT Reference Manual +. if "\\$3"PRM" .ds vT Programmers's Manual +. if "\\$3"IND" .ds vT Manual Master Index +.\" . if "\\$3"CON" .ds vT Contributed Software Manual +.\" . if "\\$3"IMP" .ds vT Implementation Notes +.\" . if "\\$3"HOW" .ds vT How Pocket Manual +. if "\\$3"LOCAL" .ds vT Local Manual . if "\\$3"tahoe" .as vT \ (Tahoe Architecture) . if "\\$3"vax" .as vT \ (VAX Architecture) . if "\\$3"hp300" .as vT \ (HP300 Architecture) @@ -245,8 +246,7 @@ . if "\\n(mo"10" .ds dD October . if "\\n(mo"11" .ds dD November . if "\\n(mo"12" .ds dD December -. nr *year \\n(yr+1900 -. as dD \&\ \\n(dy, \\n([*year] +. as dD \&\ \\n(dy, \\n(Yr . \} .\} .el \{\ diff --git a/gnu/usr.bin/groff/tmac/groff_man.7_in b/gnu/usr.bin/groff/tmac/groff_man.7_in new file mode 100644 index 00000000000..57eb9ec4555 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_man.7_in @@ -0,0 +1,171 @@ +.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +. +.SH NAME +. +groff_man \- groff `an' macros to support generation of man pages +.SH SYNOPSIS +.B groff +.B \-m@TMAC_AN_PREFIX@an +[ +.IR options .\|.\|. +] +[ +.IR files .\|.\|. +] +. +.SH DESCRIPTION +. +The +.B tmac.an +macros used to generate man pages with +.I groff +were written by James Clark. +This document provides a brief summary of the use of each macro in that +package. +.TP +.BI .TP " title section " [ extra1 "] [" extra2 "] [" extra3 ] +Sets the title of the man page to +.I title +and the section to +.IR section , +which must take on a value between 1 and\ 8. +The value +.I section +may also have a string appended, e.g. `.pm', to indicate a specific +subsection of the man pages. +.TP +.BI .SH " text for a heading" +Sets up an unindented and unnumbered section heading. +Prints out all the text following `.SH' up to the end of the line in bold +face, with a size slightly smaller than that for indented section headings. +.TP +.BI .SS " text for a heading" +Sets up an indented section heading. +Prints out all the text following `.SS' up to the end of the line in bold +face, with a size slightly larger than that for unindented section headings. +.TP +.BI ".TP [" nnn ] +Sets up an indented paragraph. +The indentation is set to +.I nnn +if that argument is supplied. +The first line of text following this macro is interpreted as a string to be +printed flush-left, as it is appropriate for a label. +It is not interpreted as part of a paragraph, so there is no attempt to fill +the first line with text from the following input lines. +Nevertheless, if the label is not as wide as the indentation, then the +paragraph starts at the same line (but indented), continuing on the +following lines. +If the label is wider than the indentation, then the descriptive part of the +paragraph begins on the line following the label, entirely indented. +The `.TP' macro is the macro used for the explanations you are just reading. +.TP +.BR ".LP " or " .PP " or " .P" +These macros are mutual aliases. +Any of them causes a line break at the current position, followed by a +vertical space downwards by the amount that is set in the `PD' counter. +.TP +.BI ".IP [" designator "] [" nnn ] +Sets up an indented paragraph, using +.I designator +as a tag to mark its beginning. +The indentation is permanently set to +.I nnn +if that argument is supplied. +To set the indentation back to the previous level, one must call some other +macro that uses indented paragraphs, and explicitly provide it with the +value of the previous indentation. +.IP +For example, the following paragraphs were all set up with bullets as the +designator, using `.IP \\(bu 4': +.IP \(bu 4 +`IP' is one of the three macros used in +.B tmac.an +to format lists. +.IP \(bu 4 +`HP' is another. +This macro produces a paragraph with a left hanging indentation. +.IP \(bu 4 +`TP' is another. +This macro produces an unindented label (given by the text on the first line +following `TP'), followed by an indented paragraph with appropriately +descriptive text. +.TP +.BI ".HP [" nnn ] +Sets up paragraphs with hanging left indentation. +The indentation is set to +.I nnn +if that argument is supplied. +The following pargraph illustrates the effect of this macro with the hanging +indentation set to\ 2: +.HP 2 +This is a pagraph following an invocation of the `.HP' macro. +As you can see, it produces a paragraph where all lines but the first are +flushed right and are shorter than the preceding lines. +. +.SH "MACROS TO SET FONTS" +. +.TP +.BI .SM +Causes the text on the same line or the text on the next line to appear in a +font that is one point size smaller than the default font. +.TP +.BI .SB +Causes the text on the same line or the text on the next line to appear in +small boldface font. +.TP +.BI ".BI " text +Causes text on the same line to appear alternately in bold face and italic. +The text must be on the same line as the macro call. +Thus `.BI this word and that' would cause `this' and `and' to appear in bold +face, while `word' and `that' appear in italics. +.TP +.BI ".IB " text +Causes text to appear alternately in italic and bold face. +The text must be on the same line as the macro call. +.TP +.BI ".BR " text +Causes text on the same line to appear alternately in bold face and roman. +The text must be on the same line as the macro call. +.TP +.BI ".RB " text +Causes text on the same line to appear alternately in roman and bold face. +The text must be on the same line as the macro call. +.TP +.BI ".R " text +Causes text to appear in roman font. +If no text is present on the line where the macro is called, then the text +of the next line appears in roman. +This is the default font to which text is returned at the end of processing +of the other macros. +.TP +.BI ".B " text +Causes text to appear in bold face. +If no text is present on the line where the macro is called, then the text +of the next line appears in bold face. +.TP +.BI ".I " text +Causes text to appear in italic. +If no text is present on the line where the macro is called, then the text +of the next line appears in italic. +. +.SH "SEE ALSO" +. +Since the +.B tmac.an +macros consist of groups of +.I groff +requests, one can, in principle, supplement the functionality of the +.B tmac.an +macros with individual +.I groff +requests where necessary. +A complete list of these requests is available on the WWW at +.ce 1 +http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html +. +.SH AUTHOR +. +This manual page was originally written for the Debian GNU/Linux system by +Susan G. Kleinmann , corrected by Werner Lemberg +, and is now part of the GNU troff distribution. diff --git a/gnu/usr.bin/groff/tmac/groff_man.man b/gnu/usr.bin/groff/tmac/groff_man.man deleted file mode 100644 index 57eb9ec4555..00000000000 --- a/gnu/usr.bin/groff/tmac/groff_man.man +++ /dev/null @@ -1,171 +0,0 @@ -.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -.SH NAME -. -groff_man \- groff `an' macros to support generation of man pages -.SH SYNOPSIS -.B groff -.B \-m@TMAC_AN_PREFIX@an -[ -.IR options .\|.\|. -] -[ -.IR files .\|.\|. -] -. -.SH DESCRIPTION -. -The -.B tmac.an -macros used to generate man pages with -.I groff -were written by James Clark. -This document provides a brief summary of the use of each macro in that -package. -.TP -.BI .TP " title section " [ extra1 "] [" extra2 "] [" extra3 ] -Sets the title of the man page to -.I title -and the section to -.IR section , -which must take on a value between 1 and\ 8. -The value -.I section -may also have a string appended, e.g. `.pm', to indicate a specific -subsection of the man pages. -.TP -.BI .SH " text for a heading" -Sets up an unindented and unnumbered section heading. -Prints out all the text following `.SH' up to the end of the line in bold -face, with a size slightly smaller than that for indented section headings. -.TP -.BI .SS " text for a heading" -Sets up an indented section heading. -Prints out all the text following `.SS' up to the end of the line in bold -face, with a size slightly larger than that for unindented section headings. -.TP -.BI ".TP [" nnn ] -Sets up an indented paragraph. -The indentation is set to -.I nnn -if that argument is supplied. -The first line of text following this macro is interpreted as a string to be -printed flush-left, as it is appropriate for a label. -It is not interpreted as part of a paragraph, so there is no attempt to fill -the first line with text from the following input lines. -Nevertheless, if the label is not as wide as the indentation, then the -paragraph starts at the same line (but indented), continuing on the -following lines. -If the label is wider than the indentation, then the descriptive part of the -paragraph begins on the line following the label, entirely indented. -The `.TP' macro is the macro used for the explanations you are just reading. -.TP -.BR ".LP " or " .PP " or " .P" -These macros are mutual aliases. -Any of them causes a line break at the current position, followed by a -vertical space downwards by the amount that is set in the `PD' counter. -.TP -.BI ".IP [" designator "] [" nnn ] -Sets up an indented paragraph, using -.I designator -as a tag to mark its beginning. -The indentation is permanently set to -.I nnn -if that argument is supplied. -To set the indentation back to the previous level, one must call some other -macro that uses indented paragraphs, and explicitly provide it with the -value of the previous indentation. -.IP -For example, the following paragraphs were all set up with bullets as the -designator, using `.IP \\(bu 4': -.IP \(bu 4 -`IP' is one of the three macros used in -.B tmac.an -to format lists. -.IP \(bu 4 -`HP' is another. -This macro produces a paragraph with a left hanging indentation. -.IP \(bu 4 -`TP' is another. -This macro produces an unindented label (given by the text on the first line -following `TP'), followed by an indented paragraph with appropriately -descriptive text. -.TP -.BI ".HP [" nnn ] -Sets up paragraphs with hanging left indentation. -The indentation is set to -.I nnn -if that argument is supplied. -The following pargraph illustrates the effect of this macro with the hanging -indentation set to\ 2: -.HP 2 -This is a pagraph following an invocation of the `.HP' macro. -As you can see, it produces a paragraph where all lines but the first are -flushed right and are shorter than the preceding lines. -. -.SH "MACROS TO SET FONTS" -. -.TP -.BI .SM -Causes the text on the same line or the text on the next line to appear in a -font that is one point size smaller than the default font. -.TP -.BI .SB -Causes the text on the same line or the text on the next line to appear in -small boldface font. -.TP -.BI ".BI " text -Causes text on the same line to appear alternately in bold face and italic. -The text must be on the same line as the macro call. -Thus `.BI this word and that' would cause `this' and `and' to appear in bold -face, while `word' and `that' appear in italics. -.TP -.BI ".IB " text -Causes text to appear alternately in italic and bold face. -The text must be on the same line as the macro call. -.TP -.BI ".BR " text -Causes text on the same line to appear alternately in bold face and roman. -The text must be on the same line as the macro call. -.TP -.BI ".RB " text -Causes text on the same line to appear alternately in roman and bold face. -The text must be on the same line as the macro call. -.TP -.BI ".R " text -Causes text to appear in roman font. -If no text is present on the line where the macro is called, then the text -of the next line appears in roman. -This is the default font to which text is returned at the end of processing -of the other macros. -.TP -.BI ".B " text -Causes text to appear in bold face. -If no text is present on the line where the macro is called, then the text -of the next line appears in bold face. -.TP -.BI ".I " text -Causes text to appear in italic. -If no text is present on the line where the macro is called, then the text -of the next line appears in italic. -. -.SH "SEE ALSO" -. -Since the -.B tmac.an -macros consist of groups of -.I groff -requests, one can, in principle, supplement the functionality of the -.B tmac.an -macros with individual -.I groff -requests where necessary. -A complete list of these requests is available on the WWW at -.ce 1 -http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html -. -.SH AUTHOR -. -This manual page was originally written for the Debian GNU/Linux system by -Susan G. Kleinmann , corrected by Werner Lemberg -, and is now part of the GNU troff distribution. diff --git a/gnu/usr.bin/groff/tmac/groff_mdoc.7_in b/gnu/usr.bin/groff/tmac/groff_mdoc.7_in new file mode 100644 index 00000000000..2112eba4eba --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_mdoc.7_in @@ -0,0 +1,422 @@ +.\" $NetBSD: mdoc.7,v 1.14 1999/08/30 00:41:28 ross Exp $ +.\" +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)mdoc.7 8.2 (Berkeley) 12/30/93 +.\" +.Dd November 24, 1997 +.Os +.Dt MDOC 7 +.Sh NAME +.Nm mdoc +.Nd quick reference guide for the +.Nm \-mdoc +macro package +.Sh SYNOPSIS +.Nm groff +.Fl m Ns Ar doc +.Ar files ... +.Sh DESCRIPTION +The +.Nm \-mdoc +package is a set of content-based and domain-based macros +used to format the +.Bx +man pages. +The macro names and their meanings are +listed below for quick reference; for +a detailed explanation on using the package, +see the tutorial sampler +.Xr mdoc.samples 7 . +.Pp +The macros are described in two groups, the first +includes the structural and physical page layout macros. +The second contains the manual and general text domain +macros which differentiate the +.Nm -\mdoc +package from other +.Xr troff +formatting packages. +.Sh PAGE STRUCTURE DOMAIN +.Ss Title Macros +To create a valid manual page, these three macros, in this order, +are required: +.Bl -tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact +.It Li "\&.Dd " Ar "Month day, year" +Document date. +.It Li "\&.Dt " Ar "DOCUMENT_TITLE [section] [volume]" +Title, in upper case. +.It Li "\&.Os " Ar "OPERATING_SYSTEM [version/release]" +Operating system +.Pq Tn BSD . +.El +.Ss Page Layout Macros +Section headers, paragraph breaks, lists and displays. +.Bl -tag -width flag -compact +.It Li \&.Sh +Section Headers. +Valid headers, in the order of presentation: +.Bl -tag -width "RETURN VALUES" -compact +.It Ar NAME +Name section, should include the +.Ql \&.Nm +or +.Ql \&.Fn +and the +.Ql \&.Nd +macros. +.It Ar SYNOPSIS +Usage. +.It Ar DESCRIPTION +General description, should include +options and parameters. +.It Ar RETURN VALUES +Sections two and three function calls. +.It Ar ENVIRONMENT +Describe environment variables. +.It Ar FILES +Files associated with the subject. +.It Ar EXAMPLES +Examples and suggestions. +.It Ar DIAGNOSTICS +Normally used for section four device interface diagnostics. +.It Ar ERRORS +Sections two and three error and signal +handling. +.It Ar SEE ALSO +Cross references and citations. +.It Ar STANDARDS +Conformance to standards if applicable. +.It Ar HISTORY +If a standard is not applicable, the history +of the subject should be given. +.It Ar BUGS +Gotchas and caveats. +.It Ar SECURITY CONSIDERATIONS +Security issues to be aware of. +.It Ar other +Customized headers may be added at +the authors discretion. +.El +.It Li \&.Ss +Subsection Headers. +.It Li \&.Pp +Paragraph Break. +Vertical space (one line). +.It Li \&.D1 +(D-one) Display-one +Indent and display one text line. +.It Li \&.Dl +(D-ell) Display-one literal. +Indent and display one line of literal text. +.It Li \&.Bd +Begin-display block. +Display options: +.Bl -tag -width "xoffset string " -compact +.It Fl ragged +Unjustified (ragged edges). +.It Fl filled +Filled, and if +.Xr troff 1 , +also justified. +.It Fl unfilled +Unfilled, unjustified. +.It Fl literal +Literal text or code. +.It Fl file Ar name +Read in named +.Ar file +and display. +.It Fl offset Ar string +Offset display. +Acceptable +.Ar string +values: +.Bl -tag -width indent-two -compact +.It Ar left +Align block on left (default). +.It Ar center +Approximate center margin. +.It Ar indent +Six constant width spaces (a tab). +.It Ar indent-two +Two tabs. +.It Ar right +Left aligns block 2 inches from +right. +.It Ar xx Ns Cm n +Where +.Ar xx +is a number from +.No \&4 Ns Cm n +to +.No \&9\&9 Ns Cm n . +.It Ar Aa +Where +.Ar Aa +is a callable macro name. +.It Ar string +The width of +.Ar string +is used. +.El +.El +.It Li \&.Ed +End-display (matches \&.Bd). +.It Li \&.Bl +Begin-list. +Create lists or columns. Options: +.Bl -tag -width flag -compact +.It Em List-types +.Bl -column "xbullet " -compact +.It Fl bullet Ta "Bullet Item List" +.It Fl dash Ta "Dash Item List" +.It Fl hyphen Ta "(as per" Fl dash ")" +.It Fl item Ta "Unlabeled List" +.It Fl enum Ta "Enumerated List" +.It Fl tag Ta "Tag Labeled List" +.It Fl diag Ta "Diagnostic List" +.It Fl hang Ta "Hanging Labeled List" +.It Fl ohang Ta "Overhanging Labeled List" +.It Fl inset Ta "Inset or Run-on Labeled List" +.It Fl column Ta "Multiple Columns" +.El +.It Em List-parameters +.Bl -tag -width "xcompact " -compact +.It Fl offset +(All lists.) See +.Ql \&.Bd +begin-display above. +.It Fl width +.Pf ( Fl tag +and +.Fl hang +lists only.) +See +.Ql \&.Bd . +This parameter is effectively required for +.Fl tag +lists. +.It Fl compact +(All lists.) +Suppresses blank lines. +.El +.El +.It Li \&.El +End-list. +.It Li \&.It +List item. +.El +.Sh MANUAL AND GENERAL TEXT DOMAIN MACROS +The manual and general text domain macros are special in that +most of them are parsed for callable macros +for example: +.Bl -tag -width ".Op Fl s Ar filex" -offset indent +.It Li "\&.Op Fl s Ar file" +Produces +.Op Fl s Ar file +.El +.Pp +In this example, the option enclosure macro +.Ql \&.Op +is parsed, and calls the callable content macro +.Ql \&Fl +which operates on the argument +.Ql s +and then calls the callable content macro +.Ql \&Ar +which operates on the argument +.Ql file . +Some macros may be callable, but are not parsed and vice versa. +These macros are indicated in the +.Em parsed +and +.Em callable +columns below. +.Pp +Unless stated, manual domain macros share a common syntax: +.Pp +.Dl \&.Va argument [\ .\ ,\ ;\ :\ (\ )\ [\ ]\ argument \...\ ] +.Pp +.Sy Note : +Opening and closing +punctuation characters are only recognized as such if they are presented +one at a time. +The string +.Ql ")," +is not recognized as punctuation and will be output with a leading white +space and in what ever font the calling macro uses. +The +argument list +.Ql "] ) ," +is recognized as three sequential closing punctuation characters +and a leading white space is not output between the characters +and the previous argument (if any). +The special meaning of a punctuation character may be escaped +with the string +.Ql \e& . +For example the following string, +.Bl -tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent +.It Li "\&.Ar file1\ , file2\ , file3\ )\ ." +Produces +.Ar file1 , file2 , file3 ) . +.El +.ne 1i +.Ss Manual Domain Macros +.Bl -column "Name" "Parsed" "Callable" -compact +.It Em Name Parsed Callable Description +.It Li \&Ad Ta Yes Ta Yes Ta Address. "(This macro may be deprecated.)" +.It Li \&Ar Ta Yes Ta Yes Ta "Command line argument." +.It Li \&Cd Ta \&No Ta \&No Ta "Configuration declaration (section four only)." +.It Li \&Cm Ta Yes Ta Yes Ta "Command line argument modifier." +.It Li \&Dv Ta Yes Ta Yes Ta "Defined variable (source code)." +.It Li \&Er Ta Yes Ta Yes Ta "Error number (source code)." +.It Li \&Ev Ta Yes Ta Yes Ta "Environment variable." +.It Li \&Fa Ta Yes Ta Yes Ta "Function argument." +.It Li \&Fd Ta \&No Ta \&No Ta "Function declaration." +.It Li \&Fl Ta Yes Ta Yes Ta "Command line flag." +.It Li \&Fn Ta Yes Ta Yes Ta "Function call (also .Fo and .Fc)." +.It Li \&Ic Ta Yes Ta Yes Ta "Interactive command." +.It Li \&Li Ta Yes Ta Yes Ta "Literal text." +.It Li \&Nm Ta Yes Ta Yes Ta "Command name." +.It Li \&Op Ta Yes Ta Yes Ta "Option (also .Oo and .Oc)." +.It Li \&Ot Ta Yes Ta Yes Ta "Old style function type (Fortran only)." +.It Li \&Pa Ta Yes Ta Yes Ta "Pathname or file name." +.It Li \&St Ta Yes Ta Yes Ta "Standards (-p1003.2, -p1003.1 or -ansiC)" +.It Li \&Va Ta Yes Ta Yes Ta "Variable name." +.It Li \&Vt Ta Yes Ta Yes Ta "Variable type (Fortran only)." +.It Li \&Xr Ta Yes Ta Yes Ta "Manual Page Cross Reference." +.El +.Ss General Text Domain Macros +.Bl -column "Name" "Parsed" "Callable" -compact +.It Em "Name Parsed Callable Description" +.It Li \&%A Ta Yes Ta \&No Ta "Reference author." +.It Li \&%B Ta Yes Ta Yes Ta "Reference book title." +.It Li \&%\&C Ta \&No Ta \&No Ta "Reference place of publishing (city)." +.It Li \&%\&D Ta \&No Ta \&No Ta "Reference date." +.It Li \&%J Ta Yes Ta Yes Ta "Reference journal title." +.It Li \&%N Ta \&No Ta \&No Ta "Reference issue number." +.It Li \&%\&O Ta \&No Ta \&No Ta "Reference optional information." +.It Li \&%P Ta \&No Ta \&No Ta "Reference page number(s)." +.It Li \&%R Ta \&No Ta \&No Ta "Reference report Name." +.It Li \&%T Ta Yes Ta Yes Ta "Reference article title." +.It Li \&%V Ta \&No Ta \&No Ta "Reference volume." +.It Li \&Ac Ta Yes Ta Yes Ta "Angle close quote." +.It Li \&Ao Ta Yes Ta Yes Ta "Angle open quote." +.It Li \&Ap Ta Yes Ta Yes Ta "Insert apostrophe; switch to .No mode " +.It Li \&Aq Ta Yes Ta Yes Ta "Angle quote." +.It Li \&At Ta \&No Ta \&No Ta Tn "AT&T UNIX." +.It Li \&Bc Ta Yes Ta Yes Ta "Bracket close quote." +.It Li \&Bf Ta \&No Ta \&No Ta "Begin font mode." +.It Li \&Bo Ta Yes Ta Yes Ta "Bracket open quote." +.It Li \&Bq Ta Yes Ta Yes Ta "Bracket quote." +.It Li \&Bx Ta Yes Ta Yes Ta "BSD" . +.It Li \&Db Ta \&No Ta \&No Ta "Debug (default is \\*qoff\\*q)." +.It Li \&Dc Ta Yes Ta Yes Ta "Double close quote." +.It Li \&Do Ta Yes Ta Yes Ta "Double open quote." +.It Li \&Dq Ta Yes Ta Yes Ta "Double quote." +.It Li \&Ec Ta Yes Ta Yes Ta "Enclose string close quote." +.It Li \&Ef Ta \&No Ta \&No Ta "End font mode." +.It Li \&Em Ta Yes Ta Yes Ta "Emphasis (traditional English)." +.It Li \&Eo Ta Yes Ta Yes Ta "Enclose string open quote." +.It Li \&Fx Ta \&No Ta \&No Ta "FreeBSD." +.It Li \&No Ta Yes Ta Yes Ta "Normal text (no-op)." +.It Li \&Ns Ta Yes Ta Yes Ta "No space." +.It Li \&Nx Ta \&No Ta \&No Ta "NetBSD." +.It Li \&Pc Ta Yes Ta Yes Ta "Parenthesis close quote." +.It Li \&Pf Ta Yes Ta \&No Ta "Prefix string." +.It Li \&Po Ta Yes Ta Yes Ta "Parenthesis open quote." +.It Li \&Pq Ta Yes Ta Yes Ta "Parentheses quote." +.It Li \&Qc Ta Yes Ta Yes Ta "Strait Double close quote." +.It Li \&Ql Ta Yes Ta Yes Ta "Quoted literal." +.It Li \&Qo Ta Yes Ta Yes Ta "Strait Double open quote." +.It Li \&Qq Ta Yes Ta Yes Ta "Strait Double quote." +.It Li \&Re Ta \&No Ta \&No Ta "Reference end." +.It Li \&Rs Ta \&No Ta \&No Ta "Reference start." +.It Li \&Sc Ta Yes Ta Yes Ta "Single close quote." +.It Li \&So Ta Yes Ta Yes Ta "Single open quote." +.It Li \&Sq Ta Yes Ta Yes Ta "Single quote." +.It Li \&Sm Ta \&No Ta \&No Ta "Space mode (default is \\*qon\\*q)." +.It Li \&Sx Ta Yes Ta Yes Ta "Section Cross Reference." +.It Li \&Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)." +.It Li \&Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)." +.It Li \&Ux Ta Yes Ta Yes Ta "UNIX." +.It Li \&Xc Ta Yes Ta Yes Ta "Extend argument list close." +.It Li \&Xo Ta Yes Ta Yes Ta "Extend argument list open." +.El +.\" .It Sy \&Hf Ta \&No Ta \&No Ta "Include file with header" +.Pp +Macro names ending in +.Ql q +quote remaining items on the argument list. +Macro names ending in +.Ql o +begin a quote which may span more than one line of input and +are close quoted with the matching macro name ending in +.Ql c . +Enclosure macros may be nested and are limited to +eight arguments. +.Pp +Note: the extended argument list macros +.Pf ( Ql \&.Xo , +.Ql \&.Xc ) +and the function enclosure macros +.Pf ( Ql \&.Fo , +.Ql \&.Fc ) +are irregular. +The extended list macros are used when the number of macro arguments +would exceed the +.Xr troff +limitation of nine arguments. +.Sh CONFIGURATION +For site specific configuration of the macro package, +see the file +.Pa /usr/src/share/tmac/README . +.Sh FILES +.Bl -tag -width "tmac.doc-ditroff" -compact +.It Pa tmac.doc +Manual and general text domain macros. +.It Pa tmac.doc-common +Common structural macros and definitions. +.It Pa tmac.doc-nroff +Site dependent +.Xr nroff +style file. +.It Pa tmac.doc-ditroff +Site dependent +.Xr troff +style file. +.It Pa tmac.doc-syms +Special defines (such as the standards macro). +.El +.Sh SEE ALSO +.Xr mdoc.samples 7 diff --git a/gnu/usr.bin/groff/tmac/groff_mdoc.man b/gnu/usr.bin/groff/tmac/groff_mdoc.man deleted file mode 100644 index 2112eba4eba..00000000000 --- a/gnu/usr.bin/groff/tmac/groff_mdoc.man +++ /dev/null @@ -1,422 +0,0 @@ -.\" $NetBSD: mdoc.7,v 1.14 1999/08/30 00:41:28 ross Exp $ -.\" -.\" Copyright (c) 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)mdoc.7 8.2 (Berkeley) 12/30/93 -.\" -.Dd November 24, 1997 -.Os -.Dt MDOC 7 -.Sh NAME -.Nm mdoc -.Nd quick reference guide for the -.Nm \-mdoc -macro package -.Sh SYNOPSIS -.Nm groff -.Fl m Ns Ar doc -.Ar files ... -.Sh DESCRIPTION -The -.Nm \-mdoc -package is a set of content-based and domain-based macros -used to format the -.Bx -man pages. -The macro names and their meanings are -listed below for quick reference; for -a detailed explanation on using the package, -see the tutorial sampler -.Xr mdoc.samples 7 . -.Pp -The macros are described in two groups, the first -includes the structural and physical page layout macros. -The second contains the manual and general text domain -macros which differentiate the -.Nm -\mdoc -package from other -.Xr troff -formatting packages. -.Sh PAGE STRUCTURE DOMAIN -.Ss Title Macros -To create a valid manual page, these three macros, in this order, -are required: -.Bl -tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact -.It Li "\&.Dd " Ar "Month day, year" -Document date. -.It Li "\&.Dt " Ar "DOCUMENT_TITLE [section] [volume]" -Title, in upper case. -.It Li "\&.Os " Ar "OPERATING_SYSTEM [version/release]" -Operating system -.Pq Tn BSD . -.El -.Ss Page Layout Macros -Section headers, paragraph breaks, lists and displays. -.Bl -tag -width flag -compact -.It Li \&.Sh -Section Headers. -Valid headers, in the order of presentation: -.Bl -tag -width "RETURN VALUES" -compact -.It Ar NAME -Name section, should include the -.Ql \&.Nm -or -.Ql \&.Fn -and the -.Ql \&.Nd -macros. -.It Ar SYNOPSIS -Usage. -.It Ar DESCRIPTION -General description, should include -options and parameters. -.It Ar RETURN VALUES -Sections two and three function calls. -.It Ar ENVIRONMENT -Describe environment variables. -.It Ar FILES -Files associated with the subject. -.It Ar EXAMPLES -Examples and suggestions. -.It Ar DIAGNOSTICS -Normally used for section four device interface diagnostics. -.It Ar ERRORS -Sections two and three error and signal -handling. -.It Ar SEE ALSO -Cross references and citations. -.It Ar STANDARDS -Conformance to standards if applicable. -.It Ar HISTORY -If a standard is not applicable, the history -of the subject should be given. -.It Ar BUGS -Gotchas and caveats. -.It Ar SECURITY CONSIDERATIONS -Security issues to be aware of. -.It Ar other -Customized headers may be added at -the authors discretion. -.El -.It Li \&.Ss -Subsection Headers. -.It Li \&.Pp -Paragraph Break. -Vertical space (one line). -.It Li \&.D1 -(D-one) Display-one -Indent and display one text line. -.It Li \&.Dl -(D-ell) Display-one literal. -Indent and display one line of literal text. -.It Li \&.Bd -Begin-display block. -Display options: -.Bl -tag -width "xoffset string " -compact -.It Fl ragged -Unjustified (ragged edges). -.It Fl filled -Filled, and if -.Xr troff 1 , -also justified. -.It Fl unfilled -Unfilled, unjustified. -.It Fl literal -Literal text or code. -.It Fl file Ar name -Read in named -.Ar file -and display. -.It Fl offset Ar string -Offset display. -Acceptable -.Ar string -values: -.Bl -tag -width indent-two -compact -.It Ar left -Align block on left (default). -.It Ar center -Approximate center margin. -.It Ar indent -Six constant width spaces (a tab). -.It Ar indent-two -Two tabs. -.It Ar right -Left aligns block 2 inches from -right. -.It Ar xx Ns Cm n -Where -.Ar xx -is a number from -.No \&4 Ns Cm n -to -.No \&9\&9 Ns Cm n . -.It Ar Aa -Where -.Ar Aa -is a callable macro name. -.It Ar string -The width of -.Ar string -is used. -.El -.El -.It Li \&.Ed -End-display (matches \&.Bd). -.It Li \&.Bl -Begin-list. -Create lists or columns. Options: -.Bl -tag -width flag -compact -.It Em List-types -.Bl -column "xbullet " -compact -.It Fl bullet Ta "Bullet Item List" -.It Fl dash Ta "Dash Item List" -.It Fl hyphen Ta "(as per" Fl dash ")" -.It Fl item Ta "Unlabeled List" -.It Fl enum Ta "Enumerated List" -.It Fl tag Ta "Tag Labeled List" -.It Fl diag Ta "Diagnostic List" -.It Fl hang Ta "Hanging Labeled List" -.It Fl ohang Ta "Overhanging Labeled List" -.It Fl inset Ta "Inset or Run-on Labeled List" -.It Fl column Ta "Multiple Columns" -.El -.It Em List-parameters -.Bl -tag -width "xcompact " -compact -.It Fl offset -(All lists.) See -.Ql \&.Bd -begin-display above. -.It Fl width -.Pf ( Fl tag -and -.Fl hang -lists only.) -See -.Ql \&.Bd . -This parameter is effectively required for -.Fl tag -lists. -.It Fl compact -(All lists.) -Suppresses blank lines. -.El -.El -.It Li \&.El -End-list. -.It Li \&.It -List item. -.El -.Sh MANUAL AND GENERAL TEXT DOMAIN MACROS -The manual and general text domain macros are special in that -most of them are parsed for callable macros -for example: -.Bl -tag -width ".Op Fl s Ar filex" -offset indent -.It Li "\&.Op Fl s Ar file" -Produces -.Op Fl s Ar file -.El -.Pp -In this example, the option enclosure macro -.Ql \&.Op -is parsed, and calls the callable content macro -.Ql \&Fl -which operates on the argument -.Ql s -and then calls the callable content macro -.Ql \&Ar -which operates on the argument -.Ql file . -Some macros may be callable, but are not parsed and vice versa. -These macros are indicated in the -.Em parsed -and -.Em callable -columns below. -.Pp -Unless stated, manual domain macros share a common syntax: -.Pp -.Dl \&.Va argument [\ .\ ,\ ;\ :\ (\ )\ [\ ]\ argument \...\ ] -.Pp -.Sy Note : -Opening and closing -punctuation characters are only recognized as such if they are presented -one at a time. -The string -.Ql ")," -is not recognized as punctuation and will be output with a leading white -space and in what ever font the calling macro uses. -The -argument list -.Ql "] ) ," -is recognized as three sequential closing punctuation characters -and a leading white space is not output between the characters -and the previous argument (if any). -The special meaning of a punctuation character may be escaped -with the string -.Ql \e& . -For example the following string, -.Bl -tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent -.It Li "\&.Ar file1\ , file2\ , file3\ )\ ." -Produces -.Ar file1 , file2 , file3 ) . -.El -.ne 1i -.Ss Manual Domain Macros -.Bl -column "Name" "Parsed" "Callable" -compact -.It Em Name Parsed Callable Description -.It Li \&Ad Ta Yes Ta Yes Ta Address. "(This macro may be deprecated.)" -.It Li \&Ar Ta Yes Ta Yes Ta "Command line argument." -.It Li \&Cd Ta \&No Ta \&No Ta "Configuration declaration (section four only)." -.It Li \&Cm Ta Yes Ta Yes Ta "Command line argument modifier." -.It Li \&Dv Ta Yes Ta Yes Ta "Defined variable (source code)." -.It Li \&Er Ta Yes Ta Yes Ta "Error number (source code)." -.It Li \&Ev Ta Yes Ta Yes Ta "Environment variable." -.It Li \&Fa Ta Yes Ta Yes Ta "Function argument." -.It Li \&Fd Ta \&No Ta \&No Ta "Function declaration." -.It Li \&Fl Ta Yes Ta Yes Ta "Command line flag." -.It Li \&Fn Ta Yes Ta Yes Ta "Function call (also .Fo and .Fc)." -.It Li \&Ic Ta Yes Ta Yes Ta "Interactive command." -.It Li \&Li Ta Yes Ta Yes Ta "Literal text." -.It Li \&Nm Ta Yes Ta Yes Ta "Command name." -.It Li \&Op Ta Yes Ta Yes Ta "Option (also .Oo and .Oc)." -.It Li \&Ot Ta Yes Ta Yes Ta "Old style function type (Fortran only)." -.It Li \&Pa Ta Yes Ta Yes Ta "Pathname or file name." -.It Li \&St Ta Yes Ta Yes Ta "Standards (-p1003.2, -p1003.1 or -ansiC)" -.It Li \&Va Ta Yes Ta Yes Ta "Variable name." -.It Li \&Vt Ta Yes Ta Yes Ta "Variable type (Fortran only)." -.It Li \&Xr Ta Yes Ta Yes Ta "Manual Page Cross Reference." -.El -.Ss General Text Domain Macros -.Bl -column "Name" "Parsed" "Callable" -compact -.It Em "Name Parsed Callable Description" -.It Li \&%A Ta Yes Ta \&No Ta "Reference author." -.It Li \&%B Ta Yes Ta Yes Ta "Reference book title." -.It Li \&%\&C Ta \&No Ta \&No Ta "Reference place of publishing (city)." -.It Li \&%\&D Ta \&No Ta \&No Ta "Reference date." -.It Li \&%J Ta Yes Ta Yes Ta "Reference journal title." -.It Li \&%N Ta \&No Ta \&No Ta "Reference issue number." -.It Li \&%\&O Ta \&No Ta \&No Ta "Reference optional information." -.It Li \&%P Ta \&No Ta \&No Ta "Reference page number(s)." -.It Li \&%R Ta \&No Ta \&No Ta "Reference report Name." -.It Li \&%T Ta Yes Ta Yes Ta "Reference article title." -.It Li \&%V Ta \&No Ta \&No Ta "Reference volume." -.It Li \&Ac Ta Yes Ta Yes Ta "Angle close quote." -.It Li \&Ao Ta Yes Ta Yes Ta "Angle open quote." -.It Li \&Ap Ta Yes Ta Yes Ta "Insert apostrophe; switch to .No mode " -.It Li \&Aq Ta Yes Ta Yes Ta "Angle quote." -.It Li \&At Ta \&No Ta \&No Ta Tn "AT&T UNIX." -.It Li \&Bc Ta Yes Ta Yes Ta "Bracket close quote." -.It Li \&Bf Ta \&No Ta \&No Ta "Begin font mode." -.It Li \&Bo Ta Yes Ta Yes Ta "Bracket open quote." -.It Li \&Bq Ta Yes Ta Yes Ta "Bracket quote." -.It Li \&Bx Ta Yes Ta Yes Ta "BSD" . -.It Li \&Db Ta \&No Ta \&No Ta "Debug (default is \\*qoff\\*q)." -.It Li \&Dc Ta Yes Ta Yes Ta "Double close quote." -.It Li \&Do Ta Yes Ta Yes Ta "Double open quote." -.It Li \&Dq Ta Yes Ta Yes Ta "Double quote." -.It Li \&Ec Ta Yes Ta Yes Ta "Enclose string close quote." -.It Li \&Ef Ta \&No Ta \&No Ta "End font mode." -.It Li \&Em Ta Yes Ta Yes Ta "Emphasis (traditional English)." -.It Li \&Eo Ta Yes Ta Yes Ta "Enclose string open quote." -.It Li \&Fx Ta \&No Ta \&No Ta "FreeBSD." -.It Li \&No Ta Yes Ta Yes Ta "Normal text (no-op)." -.It Li \&Ns Ta Yes Ta Yes Ta "No space." -.It Li \&Nx Ta \&No Ta \&No Ta "NetBSD." -.It Li \&Pc Ta Yes Ta Yes Ta "Parenthesis close quote." -.It Li \&Pf Ta Yes Ta \&No Ta "Prefix string." -.It Li \&Po Ta Yes Ta Yes Ta "Parenthesis open quote." -.It Li \&Pq Ta Yes Ta Yes Ta "Parentheses quote." -.It Li \&Qc Ta Yes Ta Yes Ta "Strait Double close quote." -.It Li \&Ql Ta Yes Ta Yes Ta "Quoted literal." -.It Li \&Qo Ta Yes Ta Yes Ta "Strait Double open quote." -.It Li \&Qq Ta Yes Ta Yes Ta "Strait Double quote." -.It Li \&Re Ta \&No Ta \&No Ta "Reference end." -.It Li \&Rs Ta \&No Ta \&No Ta "Reference start." -.It Li \&Sc Ta Yes Ta Yes Ta "Single close quote." -.It Li \&So Ta Yes Ta Yes Ta "Single open quote." -.It Li \&Sq Ta Yes Ta Yes Ta "Single quote." -.It Li \&Sm Ta \&No Ta \&No Ta "Space mode (default is \\*qon\\*q)." -.It Li \&Sx Ta Yes Ta Yes Ta "Section Cross Reference." -.It Li \&Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)." -.It Li \&Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)." -.It Li \&Ux Ta Yes Ta Yes Ta "UNIX." -.It Li \&Xc Ta Yes Ta Yes Ta "Extend argument list close." -.It Li \&Xo Ta Yes Ta Yes Ta "Extend argument list open." -.El -.\" .It Sy \&Hf Ta \&No Ta \&No Ta "Include file with header" -.Pp -Macro names ending in -.Ql q -quote remaining items on the argument list. -Macro names ending in -.Ql o -begin a quote which may span more than one line of input and -are close quoted with the matching macro name ending in -.Ql c . -Enclosure macros may be nested and are limited to -eight arguments. -.Pp -Note: the extended argument list macros -.Pf ( Ql \&.Xo , -.Ql \&.Xc ) -and the function enclosure macros -.Pf ( Ql \&.Fo , -.Ql \&.Fc ) -are irregular. -The extended list macros are used when the number of macro arguments -would exceed the -.Xr troff -limitation of nine arguments. -.Sh CONFIGURATION -For site specific configuration of the macro package, -see the file -.Pa /usr/src/share/tmac/README . -.Sh FILES -.Bl -tag -width "tmac.doc-ditroff" -compact -.It Pa tmac.doc -Manual and general text domain macros. -.It Pa tmac.doc-common -Common structural macros and definitions. -.It Pa tmac.doc-nroff -Site dependent -.Xr nroff -style file. -.It Pa tmac.doc-ditroff -Site dependent -.Xr troff -style file. -.It Pa tmac.doc-syms -Special defines (such as the standards macro). -.El -.Sh SEE ALSO -.Xr mdoc.samples 7 diff --git a/gnu/usr.bin/groff/tmac/groff_mdoc.samples.7_in b/gnu/usr.bin/groff/tmac/groff_mdoc.samples.7_in new file mode 100644 index 00000000000..cdbbc21c4f6 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_mdoc.samples.7_in @@ -0,0 +1,2925 @@ +.\" $NetBSD: mdoc.samples.7,v 1.21 1999/08/23 21:54:20 ross Exp $ +.\" +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93 +.\" +.\" This tutorial sampler invokes every macro in the package several +.\" times and is guaranteed to give a worst case performance +.\" for an already extremely slow package. +.\" +.Dd November 24, 1997 +.Os +.Dt MDOC.SAMPLES 7 +.Sh NAME +.Nm mdoc.samples +.Nd tutorial sampler for writing +.Bx +manuals with +.Nm \-mdoc +.Sh SYNOPSIS +.Nm man mdoc.samples +.Sh DESCRIPTION +A tutorial sampler for writing +.Bx +manual pages with the +.Nm \-mdoc +macro package, a +.Em content Ns \-based +and +.Em domain Ns \-based +formatting +package for +.Xr troff 1 . +Its predecessor, the +.Xr \-man 7 +package, +addressed page layout leaving the +manipulation of fonts and other +typesetting details to the individual author. +In +.Nm \-mdoc , +page layout macros +make up the +.Em "page structure domain" +which consists of macros for titles, section headers, displays +and lists. Essentially items which affect the physical position +of text on a formatted page. +In addition to the page structure domain, there are two more domains, +the manual domain and the general text domain. +The general text domain is defined as macros which +perform tasks such as quoting or emphasizing pieces of text. +The manual domain is defined as macros that are a subset of the +day to day informal language used to describe commands, routines +and related +.Bx +files. +Macros in the manual domain handle +command names, command line arguments and options, function names, +function parameters, pathnames, variables, cross +references to other manual pages, and so on. +These domain +items have value +for both the author and the future user of the manual page. +It is hoped the consistency gained +across the manual set will provide easier +translation to future documentation tools. +.Pp +Throughout the +.Ux +manual pages, a manual entry +is simply referred +to as a man page, regardless of actual length and without +sexist intention. +.Sh GETTING STARTED +Since a tutorial document is normally read when a person +desires to use the material immediately, the assumption has +been made that the user of this document may be impatient. +The material presented in the remained of this document is +outlined as follows: +.Bl -enum -offset indent +.It +.Tn "TROFF IDIOSYNCRASIES" +.Bl -tag -width flag -compact -offset indent +.It "Macro Usage" . +.It "Passing Space Characters in an Argument" . +.It "Trailing Blank Space Characters (a warning)" . +.It "Escaping Special Characters" . +.El +.It +.Tn "THE ANATOMY OF A MAN PAGE" +.Bl -tag -width flag -compact -offset indent +.It "A manual page template" . +.El +.It +.Tn "INTRODUCTION OF TITLE MACROS" . +.It +.Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS" . +.Bl -tag -width flag -compact -offset indent +.It "What's in a name..." . +.It "General Syntax" . +.El +.It +.Tn "MANUAL DOMAIN" +.Bl -tag -width flag -compact -offset indent +.It "Addresses" . +.It "Arguments" . +.It "Configuration Declarations (section four only)" . +.It "Command Modifier" . +.It "Defined Variables" . +.It "Errno's (Section two only)" . +.It "Environment Variables" . +.It "Function Argument" . +.It "Function Declaration" . +.It "Flags" . +.It "Functions (library routines)" . +.It "Function Types" . +.\" .It "Header File (including source code)" . +.It "Interactive Commands" . +.It "Literals" . +.It "Names" . +.It "Options" . +.It "Pathnames" . +.It "Variables" . +.It "Cross References" . +.El +.It +.Tn "GENERAL TEXT DOMAIN" +.Bl -tag -width flag -compact -offset indent +.It "AT&T Macro" . +.It "BSD Macro" . +.It "UNIX Macro" . +.It "Emphasis Macro" . +.It "Enclosure/Quoting Macros" +.Bl -tag -width flag -compact -offset indent +.It "Angle Bracket Quote/Enclosure" . +.It "Bracket Quotes/Enclosure" . +.It "Double Quote macro/Enclosure" . +.It "Parenthesis Quote/Enclosure" . +.It "Single Quotes/Enclosure" . +.It "Prefix Macro" . +.El +.It "Extended Arguments" . +.It "No\-Op or Normal Text Macro" . +.It "No Space Macro" . +.It "Section Cross References" . +.It "Symbolic Macro" . +.It "References and Citations" . +.It "Trade Names (Acronyms and Type Names)" . +.El +.It +.Tn "PAGE STRUCTURE DOMAIN" +.Bl -tag -width flag -compact -offset indent +.It "Section Headers" . +.It "Paragraphs and Line Spacing" . +.It "Keeps" . +.It "Displays" . +.It "Lists and Columns" . +.El +.It +.Tn "PREDEFINED STRINGS" +.It +.Tn "DIAGNOSTICS" +.It +.Tn "FORMATTING WITH GROFF, TROFF AND NROFF" +.It +.Tn "BUGS" +.El +.ne 7 +.Sh TROFF IDIOSYNCRASIES +The +.Nm \-mdoc +package attempts to simplify the process of writing a man page. +Theoretically, one should not have to learn the dirty details of +.Xr troff 1 +to use +.Nm \-mdoc ; +however, there are a few +limitations which are unavoidable and best gotten out +of the way. +And, too, be forewarned, this package is +.Em not +fast. +.Ss Macro Usage +As in +.Xr troff 1 , +a macro is called by placing a +.Ql \&\. +(dot character) +at the beginning of +a line followed by the two character name for the macro. +Arguments may follow the macro separated by spaces. +It is the dot character at the beginning of the line which causes +.Xr troff 1 +to interpret the next two characters as a macro name. +To place a +.Ql \&\. +(dot character) +at the beginning of a line in some context other than +a macro invocation, precede the +.Ql \&\. +(dot) with the +.Ql \e& +escape sequence. +The +.Ql \e& +translates literally to a zero width space, and is never displayed in the +output. +.Pp +In general, +.Xr troff 1 +macros accept up to nine arguments, any +extra arguments are ignored. +Most macros in +.Nm \-mdoc +accept nine arguments and, +in limited cases, arguments may be continued or extended +on the +next line (See +.Sx Extended Arguments ) . +A few macros handle quoted arguments (see +.Sx Passing Space Characters in an Argument +below). +.Pp +Most of the +.Nm \-mdoc +general text domain and manual domain macros are special +in that their argument lists are +.Em parsed +for callable macro names. +This means an argument on the argument list which matches +a general text or manual domain macro name and is determined +to be callable will be executed +or called when it is processed. +In this case +the argument, although the name of a macro, +is not preceded by a +.Ql \&\. +(dot). +It is in this manner that many macros are nested; for +example +the option macro, +.Ql \&.Op , +may +.Em call +the flag and argument macros, +.Ql \&Fl +and +.Ql \&Ar , +to specify an optional flag with an argument: +.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent +.It Op Fl s Ar bytes +is produced by +.Li \&.Op \&Fl s \&Ar bytes +.El +.Pp +To prevent a two character +string from being interpreted as a macro name, precede +the string with the +escape sequence +.Ql \e& : +.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent +.It Op \&Fl s \&Ar bytes +is produced by +.Li \&.Op \e&Fl s \e&Ar bytes +.El +.Pp +Here the strings +.Ql \&Fl +and +.Ql \&Ar +are not interpreted as macros. +Macros whose argument lists are parsed for callable arguments +are referred to +as parsed and macros which may be called from an argument +list are referred to as callable +throughout this document and in the companion quick reference +manual +.Xr mdoc 7 . +This is a technical +.Em faux pas +as almost all of the macros in +.Nm \-mdoc +are parsed, but as it was cumbersome to constantly refer to macros +as being callable and being able to call other macros, +the term parsed has been used. +.Ss Passing Space Characters in an Argument +Sometimes it is desirable to give as one argument a string +containing one or more blank space characters. +This may be necessary +to defeat the nine argument limit or to specify arguments to macros +which expect particular arrangement of items in the argument list. +For example, +the function macro +.Ql \&.Fn +expects the first argument to be the name of a function and any +remaining arguments to be function parameters. +As +.Tn "ANSI C" +stipulates the declaration of function parameters in the +parenthesized parameter list, each parameter is guaranteed +to be at minimum a two word string. +For example, +.Fa int foo . +.Pp +There are two possible ways to pass an argument which contains +an embedded space. +.Em Implementation note : +Unfortunately, the most convenient way +of passing spaces in between quotes by reassigning individual +arguments before parsing was fairly expensive speed wise +and space wise to implement in all the macros for +.Tn AT&T +.Xr troff . +It is not expensive for +.Xr groff +but for the sake of portability, has been limited +to the following macros which need +it the most: +.Pp +.Bl -tag -width 4n -offset indent -compact +.It Li \&Cd +Configuration declaration (section 4 +.Sx SYNOPSIS ) +.It Li \&Bl +Begin list (for the width specifier). +.It Li \&Em +Emphasized text. +.It Li \&Fn +Functions (sections two and four). +.It Li \&It +List items. +.It Li \&Li +Literal text. +.It Li \&Sy +Symbolic text. +.It Li \&%B +Book titles. +.It Li \&%J +Journal names. +.It Li \&%O +Optional notes for a reference. +.It Li \&%R +Report title (in a reference). +.It Li \&%T +Title of article in a book or journal. +.El +.Pp +One way of passing a string +containing blank spaces is to use the hard or unpaddable space character +.Ql \e\ , +that is, a blank space preceded by the escape character +.Ql \e . +This method may be used with any macro but has the side effect +of interfering with the adjustment of text +over the length of a line. +.Xr Troff +sees the hard space as if it were any other printable character and +cannot split the string into blank or newline separated pieces as one +would expect. +The method is useful for strings which are not expected +to overlap a line boundary. +For example: +.Bl -tag -width "fetch(char *str)" -offset indent +.It Fn fetch char\ *str +is created by +.Ql \&.Fn fetch char\e *str +.It Fn fetch "char *str" +can also be created by +.Ql \&.Fn fetch "\\*q*char *str\\*q" +.El +.Pp +If the +.Ql \e +or quotes +were omitted, +.Ql \&.Fn +would see three arguments and +the result would be: +.Pp +.Dl Fn fetch char *str +.Pp +For an example of what happens when the parameter list overlaps +a newline boundary, see the +.Sx BUGS +section. +.Ss Trailing Blank Space Characters +.Xr Troff +can be confused by blank space characters at the end of a line. +It +is a wise preventive measure to globally remove all blank spaces +from character sequences. +Should the need +arise to force a blank character at the end of a line, +it may be forced with an unpaddable space and the +.Ql \e& +escape character. +For example, +.Ql string\e\ \e& . +.Ss Escaping Special Characters +Special characters +like the newline character +.Ql \en , +are handled by replacing the +.Ql \e +with +.Ql \ee +(e.g. +.Ql \een ) +to preserve +the backslash. +.Sh THE ANATOMY OF A MAN PAGE +The body of a man page is easily constructed from a basic +template found in the file: +.Bd -literal -offset indent +\&.\e" /usr/share/misc/mdoc.template: +\&.\e" The following six lines are required. +\&.Dd Month day, year +\&.Os OPERATING_SYSTEM [version/release] +\&.Dt DOCUMENT_TITLE [section number] [volume] +\&.Sh NAME +\&.Sh SYNOPSIS +\&.Sh DESCRIPTION +\&.\e" The following requests should be uncommented and +\&.\e" used where appropriate. This next request is +\&.\e" for sections 2 and 3 function return values only. +\&.\e" .Sh RETURN VALUES +\&.\e" This next request is for sections 1, 6, 7 & 8 only +\&.\e" .Sh ENVIRONMENT +\&.\e" .Sh FILES +\&.\e" .Sh EXAMPLES +\&.\e" This next request is for sections 1, 6, 7 & 8 only +\&.\e" (command return values (to shell) and +\&.\e" fprintf/stderr type diagnostics) +\&.\e" .Sh DIAGNOSTICS +\&.\e" The next request is for sections 2 and 3 error +\&.\e" and signal handling only. +\&.\e" .Sh ERRORS +\&.\e" .Sh SEE ALSO +\&.\e" .Sh STANDARDS +\&.\e" .Sh HISTORY +\&.\e" .Sh AUTHORS +\&.\e" .Sh BUGS +.Ed +.Pp +The first items in the template are the macros +.Pq Li \&.Dd , \&.Os , \&.Dt ; +the document date, +the operating system the man page or subject source is developed +or modified for, +and the man page title +.Pq Em in upper case +along with the section of the manual the page +belongs in. +These macros identify the page, +and are discussed below in +.Sx TITLE MACROS . +.Pp +The remaining items in the template are section headers +.Pq Li \&.Sh ; +of which +.Sx NAME , +.Sx SYNOPSIS +and +.Sx DESCRIPTION +are mandatory. +The +headers are +discussed in +.Sx PAGE STRUCTURE DOMAIN , +after +presentation of +.Sx MANUAL DOMAIN . +Several content macros are used to demonstrate page layout macros; +reading about content macros before page layout macros is +recommended. +.Sh TITLE MACROS +The title macros are the first portion of the page structure +domain, but are presented first and separate for someone who +wishes to start writing a man page yesterday. +Three header macros designate the document title or manual page title, +the operating system, +and the date of authorship. +These macros are one called once at the very beginning of the document +and are used to construct the headers and footers only. +.Bl -tag -width 6n +.It Li \&.Dt DOCUMENT_TITLE section# [volume] +The document title is the +subject of the man page and must be in +.Tn CAPITALS +due to troff +limitations. +The section number may be 1,\ ...,\ 9, +and if it is specified, +the volume title may be omitted. +A volume title may be arbitrary or one of the following: +.\" .Cl +.\" USD UNIX User's Supplementary Documents +.\" .Cl +.\" PS1 UNIX Programmer's Supplementary Documents +.Pp +.Bl -column SMM -offset indent -compact +.It Li AMD NetBSD Ancestral Manual Documents +.It Li SMM NetBSD System Manager's Manual +.It Li URM NetBSD Reference Manual +.It Li PRM NetBSD Programmer's Manual +.It Li KM NetBSD Kernel Manual +.El +.Pp +The default volume labeling is +.Li URM +for sections 1, 6, and 7; +.Li SMM +for section 8; +.Li PRM +for sections 2, 3, 4, and 5; +.Li KM +for section 9. +.\" .Cl +.\" MMI UNIX Manual Master Index +.\" .Cl +.\" CON UNIX Contributed Software Manual +.\" .Cl +.\" LOC UNIX Local Manual +.It Li \&.Os operating_system release# +The name of the operating system +should be the common acronym, e.g. +.Tn BSD +or +.Tn ATT . +The release should be the standard release +nomenclature for the system specified, e.g. 4.3, 4.3+Tahoe, V.3, +V.4. +Unrecognized arguments are displayed as given in the page footer. +For instance, a typical footer might be: +.Pp +.Dl \&.Os BSD 4.3 +.Pp +or for a locally produced set +.Pp +.Dl \&.Os CS Department +.Pp +The Berkeley default, +.Ql \&.Os +without an argument, has been defined as +.Nx 1.4 +in the site specific file +.Pa /usr/share/tmac/tmac.doc-common . +Note, if the +.Ql \&.Os +macro is not present, the bottom left corner of the page +will be ugly. +.It Li \&.Dd month day, year +The date should be written formally: +.Pp +.ne 5 +.Dl January 25, 1989 +.sp +Note that the date must not be placed in quotes! +.El +.Sh MANUAL DOMAIN +.Ss What's in a name... +The manual domain macro names are derived from the day to day +informal language used to describe commands, subroutines and related +files. +Slightly +different variations of this language are used to describe +the three different aspects of writing a man page. +First, there is the description of +.Nm \-mdoc +macro request usage. +Second is the description of a +.Ux +command +.Em with +.Nm \-mdoc +macros and third, +the +description of a command to a user in the verbal sense; +that is, discussion of a command in the text of a man page. +.Pp +In the first case, +.Xr troff 1 +macros are themselves a type of command; +the general syntax for a troff command is: +.Bd -filled -offset indent +\&.Va argument1 argument2 ... argument9 +.Ed +.Pp +The +.Ql \&.Va +is a macro command or request, and anything following it is an argument to +be processed. +In the second case, +the description of a +.Ux +command using the content macros is a +bit more involved; +a typical +.Sx SYNOPSIS +command line might be displayed as: +.Bd -filled -offset indent +.Nm filter +.Op Fl flag +.Ar infile outfile +.Ed +.Pp +Here, +.Nm filter +is the command name and the +bracketed string +.Fl flag +is a +.Em flag +argument designated as optional by the option brackets. +In +.Nm \-mdoc +terms, +.Ar infile +and +.Ar outfile +are +called +.Em arguments . +The macros which formatted the above example: +.Bd -literal -offset indent +\&.Nm filter +\&.Op \&Fl flag +\&.Ar infile outfile +.Ed +.Pp +In the third case, discussion of commands and command syntax +includes both examples above, but may add more detail. +The +arguments +.Ar infile +and +.Ar outfile +from the example above might be referred to as +.Em operands +or +.Em file arguments . +Some command line argument lists are quite long: +.Bl -tag -width make -offset indent +.It Nm make +.Op Fl eiknqrstv +.Op Fl D Ar variable +.Op Fl d Ar flags +.Op Fl f Ar makefile +.Bk -words +.Op Fl I Ar directory +.Ek +.Op Fl j Ar max_jobs +.Op Ar variable=value +.Bk -words +.Op Ar target ... +.Ek +.El +.Pp +Here one might talk about the command +.Nm make +and qualify the argument +.Ar makefile , +as an argument to the flag, +.Fl f , +or discuss the optional +file +operand +.Ar target . +In the verbal context, such detail can prevent confusion, +however the +.Nm \-mdoc +package +does not have a macro for an argument +.Em to +a flag. +Instead the +.Ql \&Ar +argument macro is used for an operand or file argument like +.Ar target +as well as an argument to a flag like +.Ar variable . +The make command line was produced from: +.Bd -literal -offset indent +\&.Nm make +\&.Op Fl eiknqrstv +\&.Op Fl D Ar variable +\&.Op Fl d Ar flags +\&.Op Fl f Ar makefile +\&.Op Fl I Ar directory +\&.Op Fl j Ar max_jobs +\&.Op Ar variable=value +\&.Bk -words +\&.Op Ar target ... +\&.Ek +.Ed +.Pp +The +.Ql \&.Bk +and +.Ql \&.Ek +macros are explained in +.Sx Keeps . +.Ss General Syntax +The manual domain and general text domain macros share a similar +syntax with a few minor deviations: +.Ql \&.Ar , +.Ql \&.Fl , +.Ql \&.Nm , +and +.Ql \&.Pa +differ only when called without arguments; +.Ql \&.Fn +and +.Ql \&.Xr +impose an order on their argument lists +and the +.Ql \&.Op +and +.Ql \&.Fn +macros +have nesting limitations. +All content macros +are capable of recognizing and properly handling punctuation, +provided each punctuation character is separated by a leading space. +If an request is given: +.Pp +.Dl \&.Li sptr, ptr), +.Pp +The result is: +.Pp +.Dl Li sptr, ptr), +.Pp +The punctuation is not recognized and all is output in the +literal font. If the punctuation is separated by a leading +white space: +.Pp +.Dl \&.Li "sptr , ptr ) ," +.Pp +The result is: +.Pp +.Dl Li sptr , ptr ) , +.Pp +The punctuation is now recognized and is output in the +default font distinguishing it from the strings in literal font. +.Pp +To remove the special meaning from a punctuation character +escape it with +.Ql \e& . +.Xr Troff +is limited as a macro language, and has difficulty +when presented with a string containing +a member of the mathematical, logical or +quotation set: +.Bd -literal -offset indent-two +\&{+,\-,/,*,\&%,<,>,<=,>=,=,==,&,`,',"} +.Ed +.Pp +The problem is that +.Xr troff +may assume it is supposed to actually perform the operation +or evaluation suggested by the characters. To prevent +the accidental evaluation of these characters, +escape them with +.Ql \e& . +Typical syntax is shown in the first content macro displayed +below, +.Ql \&.Ad . +.Ss Address Macro +The address macro identifies an address construct +of the form addr1[,addr2[,addr3]]. +.Pp +.Dl Usage: .Ad address ... \*(Pu +.Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n +.It Li \&.Ad addr1 +.Ad addr1 +.It Li \&.Ad addr1\ . +.Ad addr1 . +.It Li \&.Ad addr1\ , file2 +.Ad addr1 , file2 +.It Li \&.Ad f1\ , f2\ , f3\ : +.Ad f1 , f2 , f3 : +.It Li \&.Ad addr\ )\ )\ , +.Ad addr ) ) , +.El +.Pp +It is an error to call +.Li \&.Ad +without arguments. +.Li \&.Ad +is callable by other macros and is parsed. +.Ss Argument Macro +The +.Li \&.Ar +argument macro may be used whenever +a command line argument is referenced. +.Pp +.Dl Usage: .Ar argument ... \*(Pu +.Bl -tag -width ".Ar file1 file2" -compact -offset 15n +.It Li \&.Ar +.Ar +.It Li \&.Ar file1 +.Ar file1 +.It Li \&.Ar file1\ . +.Ar file1 . +.It Li \&.Ar file1 file2 +.Ar file1 file2 +.It Li \&.Ar f1 f2 f3\ : +.Ar f1 f2 f3 : +.It Li \&.Ar file\ )\ )\ , +.Ar file ) ) , +.El +.Pp +If +.Li \&.Ar +is called without arguments +.Ql Ar +is assumed. +The +.Li \&.Ar +macro is parsed and is callable. +.Ss Configuration Declaration (section four only) +The +.Ql \&.Cd +macro is used to demonstrate a +.Xr config 8 +declaration for a device interface in a section four manual. +This macro accepts quoted arguments (double quotes only). +.Pp +.Bl -tag -width "device le0 at scode?" -offset indent +.It Cd "device le0 at scode?" +produced by: +.Ql ".Cd device le0 at scode?" . +.El +.Ss Command Modifier +The command modifier is identical to the +.Ql \&.Fl +(flag) command with the exception +the +.Ql \&.Cm +macro does not assert a dash +in front of every argument. +Traditionally flags are marked by the +preceding dash, some commands or subsets of commands do not use them. +Command modifiers may also be specified in conjunction with interactive +commands such as editor commands. +See +.Sx Flags . +.Ss Defined Variables +A variable which is defined in an include file is specified +by the macro +.Ql \&.Dv . +.Pp +.Dl Usage: .Dv defined_variable ... \*(Pu +.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n +.It Li ".Dv MAXHOSTNAMELEN" +.Dv MAXHOSTNAMELEN +.It Li ".Dv TIOCGPGRP )" +.Dv TIOCGPGRP ) +.El +.Pp +It is an error to call +.Ql \&.Dv +without arguments. +.Ql \&.Dv +is parsed and is callable. +.Ss Errno's (Section two only) +The +.Ql \&.Er +errno macro specifies the error return value +for section two library routines. +The second example +below shows +.Ql \&.Er +used with the +.Ql \&.Bq +general text domain macro, as it would be used in +a section two manual page. +.Pp +.Dl Usage: .Er ERRNOTYPE ... \*(Pu +.Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n +.It Li \&.Er ENOENT +.Er ENOENT +.It Li \&.Er ENOENT\ )\ ; +.Er ENOENT ) ; +.It Li \&.Bq \&Er ENOTDIR +.Bq Er ENOTDIR +.El +.Pp +It is an error to call +.Ql \&.Er +without arguments. +The +.Ql \&.Er +macro is parsed and is callable. +.Ss Environment Variables +The +.Ql \&.Ev +macro specifies an environment variable. +.Pp +.Dl Usage: .Ev argument ... \*(Pu +.Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n +.It Li \&.Ev DISPLAY +.Ev DISPLAY +.It Li \&.Ev PATH\ . +.Ev PATH . +.It Li \&.Ev PRINTER\ )\ )\ , +.Ev PRINTER ) ) , +.El +.Pp +It is an error to call +.Ql \&.Ev +without arguments. +The +.Ql \&.Ev +macro is parsed and is callable. +.Ss Function Argument +The +.Ql \&.Fa +macro is used to refer to function arguments (parameters) +outside of the +.Sx SYNOPSIS +section of the manual or inside +the +.Sx SYNOPSIS +section should a parameter list be too +long for the +.Ql \&.Fn +macro and the enclosure macros +.Ql \&.Fo +and +.Ql \&.Fc +must be used. +.Ql \&.Fa +may also be used to refer to structure members. +.Pp +.Dl Usage: .Fa function_argument ... \*(Pu +.Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n +.It Li \&.Fa d_namlen\ )\ )\ , +.Fa d_namlen ) ) , +.It Li \&.Fa iov_len +.Fa iov_len +.El +.Pp +It is an error to call +.Ql \&.Fa +without arguments. +.Ql \&.Fa +is parsed and is callable. +.Ss Function Declaration +The +.Ql \&.Fd +macro is used in the +.Sx SYNOPSIS +section with section two or three +functions. +The +.Ql \&.Fd +macro does not call other macros and is not callable by other +macros. +.Pp +.Dl Usage: .Fd include_file (or defined variable) +.Pp +In the +.Sx SYNOPSIS +section a +.Ql \&.Fd +request causes a line break if a function has already been presented +and a break has not occurred. +This leaves a nice vertical space +in between the previous function call and the declaration for the +next function. +.Ss Flags +The +.Ql \&.Fl +macro handles command line flags. +It prepends +a dash, +.Ql \- , +to the flag. +For interactive command flags, which +are not prepended with a dash, the +.Ql \&.Cm +(command modifier) +macro is identical, but without the dash. +.Pp +.Dl Usage: .Fl argument ... \*(Pu +.Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n +.It Li \&.Fl +.Fl +.It Li \&.Fl cfv +.Fl cfv +.It Li \&.Fl cfv\ . +.Fl cfv . +.It Li \&.Fl s v t +.Fl s v t +.It Li \&.Fl -\ , +.Fl - , +.It Li \&.Fl xyz\ )\ , +.Fl xyz ) , +.El +.Pp +The +.Ql \&.Fl +macro without any arguments results +in a dash representing stdin/stdout. +Note that giving +.Ql \&.Fl +a single dash, will result in two dashes. +The +.Ql \&.Fl +macro is parsed and is callable. +.Ss Functions (library routines) +The .Fn macro is modeled on ANSI C conventions. +.Bd -literal +Usage: .Fn [type] function [[type] parameters ... \*(Pu] +.Ed +.Bl -tag -width ".Fn .int align. .const * char *sptrsxx" -compact +.It Li "\&.Fn getchar" +.Fn getchar +.It Li "\&.Fn strlen ) ," +.Fn strlen ) , +.It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" , +.Fn "int align" "const * char *sptrs" , +.El +.Pp +It is an error to call +.Ql \&.Fn +without any arguments. +The +.Ql \&.Fn +macro +is parsed and is callable, +note that any call to another macro signals the end of +the +.Ql \&.Fn +call (it will close-parenthesis at that point). +.Pp +For functions that have more than eight parameters (and this +is rare), the +macros +.Ql \&.Fo +(function open) +and +.Ql \&.Fc +(function close) +may be used with +.Ql \&.Fa +(function argument) +to get around the limitation. For example: +.Bd -literal -offset indent +\&.Fo "int res_mkquery" +\&.Fa "int op" +\&.Fa "char *dname" +\&.Fa "int class" +\&.Fa "int type" +\&.Fa "char *data" +\&.Fa "int datalen" +\&.Fa "struct rrec *newrr" +\&.Fa "char *buf" +\&.Fa "int buflen" +\&.Fc +.Ed +.Pp +Produces: +.Bd -filled -offset indent +.Fo "int res_mkquery" +.Fa "int op" +.Fa "char *dname" +.Fa "int class" +.Fa "int type" +.Fa "char *data" +.Fa "int datalen" +.Fa "struct rrec *newrr" +.Fa "char *buf" +.Fa "int buflen" +.Fc +.Ed +.Pp +The +.Ql \&.Fo +and +.Ql \&.Fc +macros are parsed and are callable. +In the +.Sx SYNOPSIS +section, the function will always begin at +the beginning of line. +If there is more than one function +presented in the +.Sx SYNOPSIS +section and a function type has not been +given, a line break will occur, leaving a nice vertical space +between the current function name and the one prior. +At the moment, +.Ql \&.Fn +does not check its word boundaries +against troff line lengths and may split across a newline +ungracefully. +This will be fixed in the near future. +.Ss Function Type +This macro is intended for the +.Sx SYNOPSIS +section. +It may be used +anywhere else in the man page without problems, but its main purpose +is to present the function type in kernel normal form for the +.Sx SYNOPSIS +of sections two and three +(it causes a page break allowing the function name to appear +on the next line). +.Pp +.Dl Usage: .Ft type ... \*(Pu +.Bl -tag -width "\&.Ft struct stat" -offset 14n -compact +.It Li \&.Ft struct stat +.Ft struct stat +.El +.Pp +The +.Ql \&.Ft +request is not callable by other macros. +.Ss Interactive Commands +The +.Ql \&.Ic +macro designates an interactive or internal command. +.Pp +.Dl Usage: .Li argument ... \*(Pu +.Bl -tag -width ".Ic setenv , unsetenvxx" -compact -offset 14n +.It Li \&.Ic :wq +.Ic :wq +.It Li \&.Ic do while {...} +.Ic do while {...} +.It Li \&.Ic setenv\ , unsetenv +.Ic setenv , unsetenv +.El +.Pp +It is an error to call +.Ql \&.Ic +without arguments. +The +.Ql \&.Ic +macro is parsed and is callable. +.Ss Literals +The +.Ql \&.Li +literal macro may be used for special characters, +variable constants, anything which should be displayed as it +would be typed. +.Pp +.Dl Usage: .Li argument ... \*(Pu +.Bl -tag -width ".Li cntrl-D ) ," -compact -offset 14n +.It Li \&.Li \een +.Li \en +.It Li \&.Li M1 M2 M3\ ; +.Li M1 M2 M3 ; +.It Li \&.Li cntrl-D\ )\ , +.Li cntrl-D ) , +.It Li \&.Li 1024\ ... +.Li 1024 ... +.El +.Pp +The +.Ql \&.Li +macro is parsed and is callable. +.Ss Name Macro +The +.Ql \&.Nm +macro is used for the document title or subject name. +It has the peculiarity of remembering the first +argument it was called with, which should +always be the subject name of the page. +When called without +arguments, +.Ql \&.Nm +regurgitates this initial name for the sole purpose +of making less work for the author. +If trailing punctuation is required with this feature, +use +.Qq +as a first argument to +.Ql \&.Nm . +Note: +a section two +or three document function name is addressed with the +.Ql \&.Nm +in the +.Sx NAME +section, and with +.Ql \&.Fn +in the +.Sx SYNOPSIS +and remaining sections. +For interactive commands, such as the +.Ql while +command keyword in +.Xr csh 1 , +the +.Ql \&.Ic +macro should be used. +While the +.Ql \&.Ic +is nearly identical +to +.Ql \&.Nm , +it can not recall the first argument it was invoked with. +.Pp +.Dl Usage: .Nm argument ... \*(Pu +.Bl -tag -width ".Nm mdoc.samples" -compact -offset 14n +.It Li \&.Nm mdoc.samples +.Nm mdoc.samples +.It Li \&.Nm \e-mdoc +.Nm \-mdoc +.It Li \&.Nm foo\ )\ )\ , +.Nm foo ) ) , +.It Li \&.Nm +.Nm +.It Li \&.Nm \&"\&"\ : +.Nm "" : +.El +.Pp +The +.Ql \&.Nm +macro is parsed and is callable. +.Ss Options +The +.Ql \&.Op +macro +places option brackets around the any remaining arguments on the command +line, and places any +trailing punctuation outside the brackets. +The macros +.Ql \&.Oc +and +.Ql \&.Oo +may be used across one or more lines. +.Pp +.Dl Usage: .Op options ... \*(Pu +.Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent +.It Li \&.Op +.Op +.It Li ".Op Fl k" +.Op Fl k +.It Li ".Op Fl k ) ." +.Op Fl k ) . +.It Li ".Op Fl k Ar kookfile" +.Op Fl k Ar kookfile +.It Li ".Op Fl k Ar kookfile ," +.Op Fl k Ar kookfile , +.It Li ".Op Ar objfil Op Ar corfil" +.Op Ar objfil Op Ar corfil +.It Li ".Op Fl c Ar objfil Op Ar corfil ," +.Op Fl c Ar objfil Op Ar corfil , +.It Li \&.Op word1 word2 +.Op word1 word2 +.El +.Pp +The +.Ql \&.Oc +and +.Ql \&.Oo +macros: +.Bd -literal -offset indent +\&.Oo +\&.Op \&Fl k \&Ar kilobytes +\&.Op \&Fl i \&Ar interval +\&.Op \&Fl c \&Ar count +\&.Oc +.Ed +.Pp +Produce: +.Oo +.Op Fl k Ar kilobytes +.Op Fl i Ar interval +.Op Fl c Ar count +.Oc +.Pp +The macros +.Ql \&.Op , +.Ql \&.Oc +and +.Ql \&.Oo +are parsed and are callable. +.Ss Pathnames +The +.Ql \&.Pa +macro formats path or file names. +.Pp +.Dl Usage: .Pa pathname \*(Pu +.Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n +.It Li \&.Pa /usr/share +.Pa /usr/share +.It Li \&.Pa /tmp/fooXXXXX\ )\ . +.Pa /tmp/fooXXXXX ) . +.El +.Pp +The +.Ql \&.Pa +macro is parsed and is callable. +.Ss Variables +Generic variable reference: +.Pp +.Dl Usage: .Va variable ... \*(Pu +.Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n +.It Li \&.Va count +.Va count +.It Li \&.Va settimer , +.Va settimer , +.It Li \&.Va int\ *prt\ )\ : +.Va int\ *prt ) : +.It Li \&.Va char\ s\ ]\ )\ )\ , +.Va char\ s ] ) ) , +.El +.Pp +It is an error to call +.Ql \&.Va +without any arguments. +The +.Ql \&.Va +macro is parsed and is callable. +.Ss Manual Page Cross References +The +.Ql \&.Xr +macro expects the first argument to be +a manual page name, and the second argument, if it exists, +to be either a section page number or punctuation. +Any +remaining arguments are assumed to be punctuation. +.Pp +.Dl Usage: .Xr man_page [1,...,9] \*(Pu +.Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n +.It Li \&.Xr mdoc +.Xr mdoc +.It Li \&.Xr mdoc\ , +.Xr mdoc , +.It Li \&.Xr mdoc 7 +.Xr mdoc 7 +.It Li \&.Xr mdoc 7\ )\ )\ , +.Xr mdoc 7 ) ) , +.El +.Pp +The +.Ql \&.Xr +macro is parsed and is callable. +It is an error to call +.Ql \&.Xr +without +any arguments. +.Sh GENERAL TEXT DOMAIN +.Ss AT&T Macro +.Bd -literal -offset indent -compact +Usage: .At [v1 .. v7 | 32v | V.1 | V.4] ... \*(Pu +.Ed +.Bl -tag -width ".At v6 ) ," -compact -offset 14n +.It Li ".At" +.At +.It Li ".At v6 ." +.At v6 . +.El +.Pp +The +.Ql \&.At +macro is +.Em not +parsed and +.Em not +callable. It accepts at most two arguments. +.Ss BSD Macro +.Dl Usage: .Bx [Version/release] ... \*(Pu +.Bl -tag -width ".Bx 4.3 ) ," -compact -offset 14n +.It Li ".Bx" +.Bx +.It Li ".Bx 4.3 ." +.Bx 4.3 . +.El +.Pp +The +.Ql \&.Bx +macro is parsed and is callable. +.Ss NetBSD Macro +.Dl Usage: .Nx [Version/release] ... \*(Pu +.Bl -tag -width ".Nx 1.4 ) ," -compact -offset 14n +.It Li ".Nx" +.Nx +.It Li ".Nx 1.4 ." +.Nx 1.4 . +.El +.Pp +The +.Ql \&.Nx +macro is parsed and is callable. +.Ss FreeBSD Macro +.Dl Usage: .Fx [Version/release] ... \*(Pu +.Bl -tag -width ".Fx 2.2 ) ," -compact -offset 14n +.It Li ".Fx" +.Fx +.It Li ".Fx 2.2 ." +.Fx 2.2 . +.El +.Pp +The +.Ql \&.Fx +macro is parsed and is callable. +.Ss UNIX Macro +.Dl Usage: .Ux ... \*(Pu +.Bl -tag -width ".Ux 4.3 ) ," -compact -offset 14n +.It Li ".Ux" +.Ux +.El +.Pp +The +.Ql \&.Ux +macro is parsed and is callable. +.Ss Emphasis Macro +Text may be stressed or emphasized with the +.Ql \&.Em +macro. +The usual font for emphasis is italic. +.Pp +.Dl Usage: .Em argument ... \*(Pu +.Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n +.It Li ".Em does not" +.Em does not +.It Li ".Em exceed 1024 ." +.Em exceed 1024 . +.It Li ".Em vide infra ) ) ," +.Em vide infra ) ) , +.El +.\" .Pp +.\" The emphasis can be forced across several lines of text by using +.\" the +.\" .Ql \&.Bf +.\" macro discussed in +.\" .Sx Modes +.\" under +.\" .Sx PAGE STRUCTURE DOMAIN . +.\" .Pp +.\" .Bf -emphasis +.\" We are certain the reason most people desire a Harvard MBA +.\" so they can become to be successful philanthropists. Only +.\" mathematicians and physicists go to graduate school strictly +.\" to acquire infinite wealthy and fame. Its that inifinity +.\" word that does it to them. Ruins them. +.\" .Ef +.Pp +The +.Ql \&.Em +macro is parsed and is callable. +It is an error to call +.Ql \&.Em +without arguments. +.Ss Enclosure and Quoting Macros +The concept of enclosure is similar to quoting. +The object being to enclose one or more strings between +a pair of characters like quotes or parentheses. +The terms quoting and enclosure are used +interchangeably throughout this document. +Most of the +one line enclosure macros end +in small letter +.Ql q +to give a hint of quoting, but there are a few irregularities. +For each enclosure macro +there is also a pair of open and close macros which end +in small letters +.Ql o +and +.Ql c +respectively. +These can be used across one or more lines of text +and while they have nesting limitations, the one line quote macros +can be used inside +of them. +.Pp +.ne 5 +.Bd -filled -offset indent +.Bl -column "quote " "close " "open " "Enclose Stringx(in XX) " XXstringXX +.Em " Quote Close Open Function Result" +\&.Aq .Ac .Ao Angle Bracket Enclosure +\&.Bq .Bc .Bo Bracket Enclosure [string] +\&.Dq .Dc .Do Double Quote ``string'' + .Ec .Eo Enclose String (in XX) XXstringXX +\&.Pq .Pc .Po Parenthesis Enclosure (string) +\&.Ql Quoted Literal `st' or string +\&.Qq .Qc .Qo Straight Double Quote "string" +\&.Sq .Sc .So Single Quote `string' +.El +.Ed +.Pp +Except for the irregular macros noted below, all +of the quoting macros are parsed and callable. +All handle punctuation properly, as long as it +is presented one character at a time and separated by spaces. +The quoting macros examine opening and closing punctuation +to determine whether it comes before or after the +enclosing string. This makes some nesting possible. +.Bl -tag -width xxx,xxxx +.It Li \&.Ec , \&.Eo +These macros expect the first argument to be the +opening and closing strings respectively. +.It Li \&.Ql +The quoted literal macro behaves differently for +.Xr troff +than +.Xr nroff . +If formatted with +.Xr nroff , +a quoted literal is always quoted. If formatted with +troff, an item is only quoted if the width +of the item is less than three constant width characters. +This is to make short strings more visible where the font change +to literal (constant width) is less noticeable. +.It Li \&.Pf +The prefix macro is not callable, but it is parsed: +.Bl -tag -width "(namexx" -offset indent +.It Li ".Pf ( Fa name2" +becomes +.Pf ( Fa name2 . +.El +.It Li \&.Ns +The +.Ql \&.Ns +(no space) macro, which +.Em is +callable, +performs the analogous suffix function. +.It Li ".Ap +The \&.Ap macro inserts an apostrophe and exits any special text modes, +continuing in +.Li \&.No +mode. +.El +.Pp +.ne 4 +Examples of quoting: +.Bl -tag -width ".Aq Pa ctype.h ) ,xxxxxxxx" -compact -offset indent +.It Li \&.Aq +.Aq +.It Li \&.Aq \&Ar ctype.h\ )\ , +.Aq Ar ctype.h ) , +.It Li \&.Bq +.Bq +.It Li \&.Bq \&Em Greek \&, French \&. +.Bq Em Greek , French . +.It Li \&.Dq +.Dq +.It Li ".Dq string abc ." +.Dq string abc . +.It Li ".Dq \'^[A-Z]\'" +.Dq \'^[A-Z]\' +.It Li "\&.Ql man mdoc" +.Ql man mdoc +.It Li \&.Qq +.Qq +.It Li "\&.Qq string ) ," +.Qq string ) , +.It Li "\&.Qq string Ns )," +.Qq string Ns ), +.It Li \&.Sq +.Sq +.It Li "\&.Sq string +.Sq string +.It Li "\&.Em or Ap ing +.Em or Ap ing +.El +.Pp +For a good example of nested enclosure macros, see the +.Ql \&.Op +option macro. +It was created from the same +underlying enclosure macros as those presented in the list +above. +The +.Ql \&.Xo +and +.Ql \&.Xc +extended argument list macros +were also built from the same underlying routines and are a good +example of +.Nm \-mdoc +macro usage at its worst. +.Ss No\-Op or Normal Text Macro +The macro +.Li \&.No +is +a hack for words in a macro command line which should +.Em not +be formatted and follows the conventional syntax +for content macros. +.Ss No Space Macro +The +.Ql \&.Ns +macro eliminates unwanted spaces in between macro requests. +It is useful for old style argument lists where there is no space +between the flag and argument: +.Bl -tag -width ".Op Fl I Ns Ar directoryxx" -offset indent +.It Li ".Op Fl I Ns Ar directory" +produces +.Op Fl I Ns Ar directory +.El +.Pp +Note: the +.Ql \&.Ns +macro always invokes the +.Ql \&.No +macro after eliminating the space unless another macro name +follows it. +The macro +.Ql \&.Ns +is parsed and is callable. +.Ss Section Cross References +The +.Ql \&.Sx +macro designates a reference to a section header +within the same document. +It is parsed and is callable. +.Pp +.Bl -tag -width "Li \&.Sx FILES" -offset 14n +.It Li \&.Sx FILES +.Sx FILES +.El +.Ss Symbolic +The symbolic emphasis macro is generally a boldface macro in +either the symbolic sense or the traditional English usage. +.Pp +.Dl Usage: .Sy symbol ... \*(Pu +.Bl -tag -width ".Sy Important Noticex" -compact -offset 14n +.It Li \&.Sy Important Notice +.Sy Important Notice +.El +.Pp +The +.Ql \&.Sy +macro is parsed and is callable. +Arguments to +.Ql \&.Sy +may be quoted. +.Ss References and Citations +The following macros make a modest attempt to handle references. +At best, the macros make it convenient to manually drop in a subset of +refer style references. +.Pp +.Bl -tag -width 6n -offset indent -compact +.It Li ".Rs" +Reference Start. +Causes a line break and begins collection +of reference information until the +reference end macro is read. +.It Li ".Re" +Reference End. +The reference is printed. +.It Li ".%A" +Reference author name, one name per invocation. +.It Li ".%B" +Book title. +.It Li ".\&%C" +City/place. +.It Li ".\&%D" +Date. +.It Li ".%J" +Journal name. +.It Li ".%N" +Issue number. +.It Li ".%O" +Optional information. +.It Li ".%P" +Page number. +.It Li ".%R" +Report name. +.It Li ".%T" +Title of article. +.It Li ".%V" +Volume(s). +.El +.Pp +The macros beginning with +.Ql % +are not callable, and are parsed only for the trade name macro which +returns to its caller. +(And not very predictably at the moment either.) +The purpose is to allow trade names +to be pretty printed in +.Xr troff Ns / Ns Xr ditroff +output. +.Ss Trade Names (or Acronyms and Type Names) +The trade name macro is generally a small caps macro for +all upper case words longer than two characters. +.Pp +.Dl Usage: .Tn symbol ... \*(Pu +.Bl -tag -width ".Tn ASCII" -compact -offset 14n +.It Li \&.Tn DEC +.Tn DEC +.It Li \&.Tn ASCII +.Tn ASCII +.El +.Pp +The +.Ql \&.Tn +macro +is parsed and is callable by other macros. +.Ss Extended Arguments +The +.Li \&.Xo +and +.Li \&.Xc +macros allow one to extend an argument list +on a macro boundary. +Argument lists cannot +be extended within a macro +which expects all of its arguments on one line such +as +.Ql \&.Op . +.Pp +Here is an example of +.Ql \&.Xo +using the space mode macro to turn spacing off: +.Bd -literal -offset indent +\&.Sm off +\&.It Xo Sy I Ar operation +\&.No \een Ar count No \een +\&.Xc +\&.Sm on +.Ed +.Pp +Produces +.Bd -filled -offset indent +.Bl -tag -width flag -compact +.Sm off +.It Xo Sy I Ar operation +.No \en Ar count No \en +.Xc +.Sm on +.El +.Ed +.Pp +Another one: +.Bd -literal -offset indent +\&.Sm off +\&.It Cm S No \&/ Ar old_pattern Xo +\&.No \&/ Ar new_pattern +\&.No \&/ Op Cm g +\&.Xc +\&.Sm on +.Ed +.Pp +Produces +.Bd -filled -offset indent +.Bl -tag -width flag -compact +.Sm off +.It Cm S No \&/ Ar old_pattern Xo +.No \&/ Ar new_pattern +.No \&/ Op Cm g +.Xc +.Sm on +.El +.Ed +.Pp +Another example of +.Ql \&.Xo +and using enclosure macros: +Test the value of an variable. +.Bd -literal -offset indent +\&.It Xo +\&.Ic .ifndef +\&.Oo \e&! Oc Ns Ar variable +\&.Op Ar operator variable ... +\&.Xc +.Ed +.Pp +Produces +.Bd -filled -offset indent +.Bl -tag -width flag -compact +.It Xo +.Ic .ifndef +.Oo \&! Oc Ns Ar variable +.Op Ar operator variable ... +.Xc +.El +.Ed +.Pp +All of the above examples have used the +.Ql \&.Xo +macro on the argument list of the +.Ql \&.It +(list-item) +macro. +The extend macros are not used very often, and when they are +it is usually to extend the list-item argument list. +Unfortunately, this is also where the extend macros are the +most finicky. +In the first two examples, spacing was turned off; +in the third, spacing was desired in part of the output but +not all of it. +To make these macros work in this situation make sure +the +.Ql \&.Xo +and +.Ql \&.Xc +macros are placed as shown in the third example. +If the +.Ql \&.Xo +macro is not alone on the +.Ql \&.It +argument list, spacing will be unpredictable. +The +.Ql \&.Ns +(no space macro) +must not occur as the first or last macro on a line +in this situation. +Out of 900 manual pages (about 1500 actual pages) +currently released with +.Bx +only fifteen use the +.Ql \&.Xo +macro. +.Sh PAGE STRUCTURE DOMAIN +.Ss Section Headers +The first three +.Ql \&.Sh +section header macros +list below are required in every +man page. +The remaining section headers +are recommended at the discretion of the author +writing the manual page. +The +.Ql \&.Sh +macro can take up to nine arguments. +It is parsed and but is not callable. +.Bl -tag -width ".Sh SYNOPSIS" +.It \&.Sh NAME +The +.Ql \&.Sh NAME +macro is mandatory. +If not specified, +the headers, footers and page layout defaults +will not be set and things will be rather unpleasant. +The +.Sx NAME +section consists of at least three items. +The first is the +.Ql \&.Nm +name macro naming the subject of the man page. +The second is the Name Description macro, +.Ql \&.Nd , +which separates the subject +name from the third item, which is the description. +The +description should be the most terse and lucid possible, +as the space available is small. +.It \&.Sh SYNOPSIS +The +.Sx SYNOPSIS +section describes the typical usage of the +subject of a man page. +The macros required +are either +.Ql ".Nm" , +.Ql ".Cd" , +.Ql ".Fn" , +(and possibly +.Ql ".Fo" , +.Ql ".Fc" , +.Ql ".Fd" , +.Ql ".Ft" +macros). +The function name +macro +.Ql ".Fn" +is required +for manual page sections 2 and 3, the command and general +name macro +.Ql \&.Nm +is required for sections 1, 5, 6, 7, 8. +Section 4 manuals require a +.Ql ".Nm" , ".Fd" +or a +.Ql ".Cd" +configuration device usage macro. +Several other macros may be necessary to produce +the synopsis line as shown below: +.Pp +.Bd -filled -offset indent +.Nm cat +.Op Fl benstuv +.Op Fl +.Ar +.Ed +.Pp +The following macros were used: +.Pp +.Dl \&.Nm cat +.Dl \&.Op \&Fl benstuv +.Dl \&.Op \&Fl +.Dl \&.Ar +.Pp +.Sy Note : +The macros +.Ql \&.Op , +.Ql \&.Fl , +and +.Ql \&.Ar +recognize the pipe bar character +.Ql \*(Ba , +so a command line such as: +.Pp +.Dl ".Op Fl a | Fl b" +.Pp +will not go orbital. +.Xr Troff +normally interprets a \*(Ba as a special operator. +See +.Sx PREDEFINED STRINGS +for a usable \*(Ba +character in other situations. +.It \&.Sh DESCRIPTION +In most cases the first text in the +.Sx DESCRIPTION +section +is a brief paragraph on the command, function or file, +followed by a lexical list of options and respective +explanations. +To create such a list, the +.Ql \&.Bl +begin-list, +.Ql \&.It +list-item and +.Ql \&.El +end-list +macros are used (see +.Sx Lists and Columns +below). +.El +.Pp +The following +.Ql \&.Sh +section headers are part of the +preferred manual page layout and must be used appropriately +to maintain consistency. +They are listed in the order +in which they would be used. +.Bl -tag -width SYNOPSIS +.It \&.Sh ENVIRONMENT +The +.Sx ENVIRONMENT +section should reveal any related +environment +variables and clues to their behavior and/or usage. +.It \&.Sh EXAMPLES +There are several ways to create examples. +See +the +.Sx EXAMPLES +section below +for details. +.It \&.Sh FILES +Files which are used or created by the man page subject +should be listed via the +.Ql \&.Pa +macro in the +.Sx FILES +section. +.It \&.Sh SEE ALSO +References to other material on the man page topic and +cross references to other relevant man pages should +be placed in the +.Sx SEE ALSO +section. +Cross references +are specified using the +.Ql \&.Xr +macro. +At this time +.Xr refer 1 +style references are not accommodated. +.Pp +It is recommended that the cross references are sorted on the section +number, and then alphabetically on the names within a section. +.It \&.Sh STANDARDS +If the command, library function or file adheres to a +specific implementation such as +.St -p1003.2 +or +.St -ansiC +this should be noted here. +If the +command does not adhere to any standard, its history +should be noted in the +.Sx HISTORY +section. +.It \&.Sh HISTORY +Any command which does not adhere to any specific standards +should be outlined historically in this section. +.It \&.Sh AUTHORS +Credits, if need be, should be placed here. +.It \&.Sh DIAGNOSTICS +Diagnostics from a command should be placed in this section. +.It \&.Sh ERRORS +Specific error handling, especially from library functions +(man page sections 2 and 3) should go here. +The +.Ql \&.Er +macro is used to specify an errno. +.It \&.Sh BUGS +Blatant problems with the topic go here... +.El +.Pp +User specified +.Ql \&.Sh +sections may be added, +for example, this section was set with: +.Bd -literal -offset 14n +\&.Sh PAGE LAYOUT MACROS +.Ed +.Ss Paragraphs and Line Spacing. +.Bl -tag -width 6n +.It \&.Pp +The \&.Pp paragraph command may +be used to specify a line space where necessary. +The macro is not necessary after a +.Ql \&.Sh +or +.Ql \&.Ss +macro or before +a +.Ql \&.Bl +macro. +(The +.Ql \&.Bl +macro asserts a vertical distance unless the -compact flag is given). +.El +.\" This worked with version one, need to redo for version three +.\" .Pp +.\" .Ds I +.\" .Cw (ax+bx+c) \ is\ produced\ by\ \& +.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\& +.\" .Cl Cx \t\t +.\" .Li \&.Cx\ ( +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va ax +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy \+ +.\" .Cx +.\" .Cl Cx \&(\& +.\" .Va ax +.\" .Cx + +.\" .Va by +.\" .Cx + +.\" .Va c ) +.\" .Cx \t +.\" .Em is produced by +.\" .Cx \t +.\" .Li \&.Va by +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy \+ +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va c ) +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx +.\" .Cx +.\" .Cw +.\" .De +.\" .Pp +.\" This example shows the same equation in a different format. +.\" The spaces +.\" around the +.\" .Li \&+ +.\" signs were forced with +.\" .Li \e : +.\" .Pp +.\" .Ds I +.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \& +.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\& +.\" .Cl Cx \t\t +.\" .Li \&.Cx\ ( +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va a +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy x +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx \e\ +\e\ \e& +.\" .Cx +.\" .Cl Cx \&(\& +.\" .Va a +.\" .Sy x +.\" .Cx \ +\ \& +.\" .Va b +.\" .Sy y +.\" .Cx \ +\ \& +.\" .Va c ) +.\" .Cx \t +.\" .Em is produced by +.\" .Cl Cx \t\t +.\" .Li \&.Va b +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy y +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx \e\ +\e\ \e& +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va c ) +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx +.\" .Cx +.\" .Cw +.\" .De +.\" .Pp +.\" The incantation below was +.\" lifted from the +.\" .Xr adb 1 +.\" manual page: +.\" .Pp +.\" .Ds I +.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by +.\" .Cl Cx \t\t +.\" .Li \&.Cx Op Sy ?/ +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Nm m +.\" .Cx +.\" .Cl Cx Op Sy ?/ +.\" .Nm m +.\" .Ad \ b1 e1 f1 +.\" .Op Sy ?/ +.\" .Cx \t +.\" .Em is produced by +.\" .Cx \t +.\" .Li \&.Ar \e\ b1 e1 f1 +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Op Sy ?/ +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx +.\" .Cx +.\" .Cw +.\" .De +.\" .Pp +.Ss Keeps +The only keep that is implemented at this time is for words. +The macros are +.Ql \&.Bk +(begin-keep) +and +.Ql \&.Ek +(end-keep). +The only option that +.Ql \&.Bl +accepts is +.Fl words +and is useful for preventing line breaks in the middle of options. +In the example for the make command line arguments (see +.Sx What's in a name ) , +the keep prevented +.Xr nroff +from placing up the +flag and the argument +on separate lines. +(Actually, the option macro used to prevent this from occurring, +but was dropped when the decision (religious) was made to force +right justified margins in +.Xr troff +as options in general look atrocious when spread across a sparse +line. +More work needs to be done with the keep macros, a +.Fl line +option needs to be added.) +.Ss Examples and Displays +There are six types of displays, a quickie one line indented display +.Ql \&.D1 , +a quickie one line literal display +.Ql \&.Dl , +and block literal, block filled, block unfilled, and block ragged which use +the +.Ql \&.Bd +begin-display +and +.Ql \&.Ed +end-display macros. +.Pp +.Bl -tag -width \&.Dlxx +.It Li \&.D1 +(D-one) Display one line of indented text. +This macro is parsed, but it is not callable. +.Pp +.Dl Fl ldghfstru +.Pp +The above was produced by: +.Li \&.Dl Fl ldghfstru . +.It Li \&.Dl +(D-ell) +Display one line of indented +.Em literal +text. +The +.Ql \&.Dl +example macro has been used throughout this +file. +It allows +the indent (display) of one line of text. +Its default font is set to +constant width (literal) however +it is parsed and will recognized other macros. +It is not callable however. +.Pp +.Dl % ls -ldg /usr/local/bin +.Pp +The above was produced by +.Li \&.Dl % ls -ldg /usr/local/bin . +.It Li \&.Bd +Begin-display. +The +.Ql \&.Bd +display must be ended with the +.Ql \&.Ed +macro. +Displays may be nested within lists, but may +.Em not +contain other displays; this also prohibits nesting +of .D1 and .Dl one-line displays. +.Ql \&.Bd +has the following syntax: +.Pp +.Dl ".Bd display-type [-offset offset_value] [-compact]" +.Pp +The display-type must be one of the following four types and +may have an offset specifier for indentation: +.Ql \&.Bd . +.Pp +.Bl -tag -width "file file_name " -compact +.It Fl ragged +Fill, but do not adjust the right margin. +.It Fl unfilled +Do not fill: display a block of text as typed, the +right (and left) margin edges are left ragged. +.It Fl filled +Display a filled (formatted) block. +The block of text is formatted (the edges are filled \- +not left unjustified). +.It Fl literal +Display a literal block, useful for source code or +simple tabbed or spaced text. +.It Fl file Ar file_name +The file name following the +.Fl file +flag is read and displayed. +Literal mode is +asserted and tabs are set at 8 constant width character +intervals, however any +.Xr troff/ Ns Nm \-mdoc +commands in file will be processed. +.It Fl offset Ar string +If +.Fl offset +is specified with one of the following strings, the string +is interpreted to indicate the level of indentation for the +forthcoming block of text: +.Pp +.Bl -tag -width "indent-two" -compact +.It Ar left +Align block on the current left margin, +this is the default mode of +.Ql \&.Bd . +.It Ar center +Supposedly center the block. +At this time +unfortunately, the block merely gets +left aligned about an imaginary center margin. +.It Ar indent +Indents by one default indent value or tab. +The default +indent value is also used for the +.Ql \&.D1 +display so one is guaranteed the two types of displays +will line up. +This indent is normally set to 6n or about two +thirds of an inch (six constant width characters). +.It Ar indent-two +Indents two times the default indent value. +.It Ar right +This +.Em left +aligns the block about two inches from +the right side of the page. +This macro needs +work and perhaps may never do the right thing by +.Xr troff . +.El +.El +.It ".Ed" +End-display. +.El +.Ss Tagged Lists and Columns +There are several types of lists which may be initiated with the +.Ql ".Bl" +begin-list macro. +Items within the list +are specified with the +.Ql ".It" +item macro and +each list must end with the +.Ql ".El" +macro. +Lists other than +.Li \-enum +may be nested within themselves and within displays. +The use of columns inside of lists or lists inside of columns +is unproven. +.Pp +In addition, several list attributes may be specified such as +the width of a tag, the list offset, and compactness +(blank lines between items allowed or disallowed). +Most of this document has been formatted with a tag style list +.Pq Fl tag . +For a change of pace, the list-type used to present the list-types +is an over-hanging list +.Pq Fl ohang . +This type of list is quite popular with +.Tn TeX +users, but might look a bit funny after having read many pages of +tagged lists. +The following list types are accepted by +.Ql ".Bl" : +.Pp +.Bl -ohang -compact +.It Fl bullet +.It Fl dash +.It Fl enum +.It Fl hyphen +.It Fl item +These five are the simplest types of lists. +Once the +.Ql ".Bl" +macro has been given, items in the list are merely +indicated by a line consisting solely of the +.Ql ".It" +macro. +For example, the source text for a simple enumerated list +would look like: +.Bd -literal -offset indent-two +\&.Bl -enum -compact +\&.It +\&Item one goes here. +\&.It +\&And item two here. +\&.It +\&Lastly item three goes here. +\&.El +.Ed +.Pp +The results: +.Pp +.Bl -enum -offset indent-two -compact +.It +Item one goes here. +.It +And item two here. +.It +Lastly item three goes here. +.El +.Pp +A simple bullet list construction: +.Bd -literal -offset indent-two +\&.Bl -bullet -compact +\&.It +\&Bullet one goes here. +\&.It +\&Bullet two here. +\&.El +.Ed +.Pp +Produces: +.Bl -bullet -offset indent-two -compact +.It +Bullet one goes here. +.It +Bullet two here. +.El +.Pp +.It Fl tag +.It Fl diag +.It Fl hang +.It Fl ohang +.It Fl inset +These list-types collect arguments specified with the +.Ql \&.It +macro and create a label which may be +.Em inset +into the forthcoming text, +.Em hanged +from the forthcoming text, +.Em overhanged +from above and not indented or +.Em tagged . +This +list was constructed with the +.Ql Fl ohang +list-type. +The +.Ql \&.It +macro is parsed only for the inset, hang +and tag list-types and is not callable. +Here is an example of inset labels: +.Bl -inset -offset indent +.It Em Tag +The tagged list (also called a tagged paragraph) is the +most common type of list used in the Berkeley manuals. Use a +.Fl width +attribute as described below. +.It Em Diag +Diag lists create section four diagnostic lists +and are similar to inset lists except callable +macros are ignored. +.It Em Hang +Hanged labels are a matter of taste. +.It Em Ohang +Overhanging labels are nice when space is constrained. +.It Em Inset +Inset labels are useful for controlling blocks of +paragraphs and are valuable for converting +.Nm \-mdoc +manuals to other formats. +.El +.Pp +Here is the source text which produced the above example: +.Bd -literal -offset indent +\&.Bl -inset -offset indent +\&.It Em Tag +\&The tagged list (also called a tagged paragraph) is the +\&most common type of list used in the Berkeley manuals. +\&.It Em Diag +\&Diag lists create section four diagnostic lists +\&and are similar to inset lists except callable +\¯os are ignored. +\&.It Em Hang +\&Hanged labels are a matter of taste. +\&.It Em Ohang +\&Overhanging labels are nice when space is constrained. +\&.It Em Inset +\&Inset labels are useful for controlling blocks of +\¶graphs and are valuable for converting +\&.Nm \-mdoc +\&manuals to other formats. +\&.El +.Ed +.Pp +Here is a hanged list with just one item: +.Bl -hang -offset indent +.It Em Hanged +labels appear similar to tagged lists when the +label is smaller than the label width. +.It Em Longer hanged list labels +blend in to the paragraph unlike +tagged paragraph labels. +.El +.Pp +And the unformatted text which created it: +.Bd -literal -offset indent +\&.Bl -hang -offset indent +\&.It Em Hanged +\&labels appear similar to tagged lists when the +\&label is smaller than the label width. +\&.It Em Longer hanged list labels +\&blend in to the paragraph unlike +\&tagged paragraph labels. +\&.El +.Ed +.Pp +The tagged list which follows uses a width specifier to control +the width of the tag. +.Pp +.Bl -tag -width "PAGEIN" -compact -offset indent +.It SL +sleep time of the process (seconds blocked) +.It PAGEIN +number of disk +.Tn I/O Ns 's +resulting from references +by the process to pages not loaded in core. +.It UID +numerical user-id of process owner +.It PPID +numerical id of parent of process process priority +(non-positive when in non-interruptible wait) +.El +.Pp +The raw text: +.Bd -literal -offset indent +\&.Bl -tag -width "PAGEIN" -compact -offset indent +\&.It SL +\&sleep time of the process (seconds blocked) +\&.It PAGEIN +\&number of disk +\&.Tn I/O Ns 's +\&resulting from references +\&by the process to pages not loaded in core. +\&.It UID +\&numerical user-id of process owner +\&.It PPID +\&numerical id of parent of process process priority +\&(non-positive when in non-interruptible wait) +\&.El +.Ed +.Pp +Acceptable width specifiers: +.Bl -tag -width Ar -offset indent +.It Fl width Ar "\&Fl" +sets the width to the default width for a flag. +All callable +macros have a default width value. +The +.Ql \&.Fl , +value is presently +set to ten constant width characters or about five sixth of +an inch. +.It Fl width Ar "24n" +sets the width to 24 constant width characters or about two +inches. +The +.Ql n +is absolutely necessary for the scaling to work correctly. +.It Fl width Ar "ENAMETOOLONG" +sets width to the constant width length of the +string given. +.It Fl width Ar "\\*qint mkfifo\\*q" +again, the width is set to the constant width of the string +given. +.El +.Pp +If a width is not specified for the tag list type, the first +time +.Ql \&.It +is invoked, an attempt is made to determine an appropriate +width. +If the first argument to +.Ql ".It" +is a callable macro, the default width for that macro will be used +as if the macro name had been supplied as the width. +However, +if another item in the list is given with a different callable +macro name, a new and nested list is assumed. This effectively +means that +.Fl width +is required for the tag list type. +.Pp +.It Fl column +This list type generates multiple columns. +The number of columns and the width of each column is determined by +the arguments to the +.Fl column +list. +Each +.Ql ".It" +argument is parsed to make a row, each column within the +row is a separate argument separated by a tab or the +.Ql ".Ta" +macro. +.El +The table: +.Bl -column "String" "Nroff" "Troff" -offset indent +.It Sy "String" Ta Sy "Nroff" Ta Sy "Troff" +.It Li "<=" Ta \&<\&= Ta \*(<= +.It Li ">=" Ta \&>\&= Ta \*(>= +.El +.Pp +was produced by: +.Bd -literal -offset indent +\&.Bl -column "String" "Nroff" "Troff" -offset indent +\&.It Sy "String" Ta Sy "Nroff" Ta Sy "Troff" +\&.It Li "<=" Ta \&<\&= Ta \*(<= +\&.It Li ">=" Ta \&>\&= Ta \*(>= +\&.El +.Ed +.Sh PREDEFINED STRINGS +The following strings are predefined as may be used by +preceding with the troff string interpreting sequence +.Ql \&\e*(xx +where +.Em xx +is the name of the defined string or as +.Ql \&\e*x +where +.Em x +is the name of the string. +The interpreting sequence may be used any where in the text. +.Pp +.Bl -column "String " "Nroff " "Troff " -offset indent +.It Sy "String Nroff Troff" +.It Li "<=" Ta \&<\&= Ta \*(<= +.It Li ">=" Ta \&>\&= Ta \*(>= +.It Li "Rq" Ta "''" Ta \*(Rq +.It Li "Lq" Ta "``" Ta \*(Lq +.It Li "ua" Ta ^ Ta \*(ua +.It Li "aa" Ta ' Ta \*(aa +.It Li "ga" Ta \` Ta \*(ga +.\" .It Li "sL" Ta ` Ta \*(sL +.\" .It Li "sR" Ta ' Ta \*(sR +.It Li "q" Ta \&" Ta \*q +.It Li "Pi" Ta pi Ta \*(Pi +.It Li "Ne" Ta != Ta \*(Ne +.It Li "Le" Ta <= Ta \*(Le +.It Li "Ge" Ta >= Ta \*(Ge +.It Li "Lt" Ta < Ta \*(Gt +.It Li "Gt" Ta > Ta \*(Lt +.It Li "Pm" Ta +- Ta \*(Pm +.It Li "If" Ta infinity Ta \*(If +.It Li "Na" Ta \fINaN\fP Ta \*(Na +.It Li "Ba" Ta \fR\&|\fP Ta \*(Ba +.El +.Pp +.Sy Note : +The string named +.Ql q +should be written as +.Ql \e*q +since it is only one char. +.Sh DIAGNOSTICS +The debugging facilities for +.Nm \-mdoc +are limited, but can help detect subtle errors such +as the collision of an argument name with an internal +register or macro name. +(A what?) +A register is an arithmetic storage class for +.Xr troff +with a one or two character name. +All registers internal to +.Nm \-mdoc +for +.Xr troff +and +.Xr ditroff +are two characters and +of the form such as +.Ql \&Ar , + as +.Ql \&aR +or + as +.Ql \&C\&1 . +And adding to the muddle, +.Xr troff +has its own internal registers all of which are either +two lower case characters or a dot plus a letter or meta-character +character. +In one of the introduction examples, it was shown how to +prevent the interpretation of a macro name with the escape sequence +.Ql \e& . +This is sufficient for the internal register names also. +.Pp +.\" Every callable macro name has a corresponding register +.\" of the same name (). +.\" There are also specific registers which have +.\" been used for stacks and arrays and are listed in the +.\" .Sx Appendix . +.\" .Bd -ragged -offset 4n +.\" [A-Z][a-z] registers corresponding to macro names (example ``Ar'') +.\" [a-z][A-Z] registers corresponding to macro names (example ``aR'') +.\" C[0-9] argument types (example C1) +.\" O[0-9] offset stack (displays) +.\" h[0-9] horizontal spacing stack (lists) +.\" o[0-9] offset (stack) (lists) +.\" t[0-9] tag stack (lists) +.\" v[0-9] vertical spacing stack (lists) +.\" w[0-9] width tag/label stack +.\" .Ed +.\" .Pp +If a non-escaped register name is given in the argument list of a request +unpredictable behavior will occur. +In general, any time huge portions +of text do not appear where expected in the output, or small strings +such as list tags disappear, chances are there is a misunderstanding +about an argument type in the argument list. +Your mother never intended for you to remember this evil stuff - so here +is a way to find out whether or not your arguments are valid: The +.Ql \&.Db +(debug) +macro displays the interpretation of the argument list for most +macros. +Macros such as the +.Ql \&.Pp +(paragraph) +macro do not contain debugging information. +All of the callable macros do, +and it is strongly advised whenever in doubt, +turn on the +.Ql \&.Db +macro. +.Pp +.Dl Usage: \&.Db [on | off] +.Pp +An example of a portion of text with +the debug macro placed above and below an +artificially created problem (a flag argument +.Ql \&aC +which should be +.Ql \e&aC +in order to work): +.Bd -literal -offset indent +\&.Db on +\&.Op Fl aC Ar file ) +\&.Db off +.Ed +.Pp +The resulting output: +.Bd -literal -offset indent +DEBUGGING ON +DEBUG(argv) MACRO: `.Op' Line #: 2 + Argc: 1 Argv: `Fl' Length: 2 + Space: `' Class: Executable + Argc: 2 Argv: `aC' Length: 2 + Space: `' Class: Executable + Argc: 3 Argv: `Ar' Length: 2 + Space: `' Class: Executable + Argc: 4 Argv: `file' Length: 4 + Space: ` ' Class: String + Argc: 5 Argv: `)' Length: 1 + Space: ` ' Class: Closing Punctuation or suffix + MACRO REQUEST: .Op Fl aC Ar file ) +DEBUGGING OFF +.Ed +.Pp +The first line of information tells the name of the calling +macro, here +.Ql \&.Op , +and the line number it appears on. +If one or more files are involved +(especially if text from another file is included) the line number +may be bogus. +If there is only one file, it should be accurate. +The second line gives the argument count, the argument +.Pq Ql \&Fl +and its length. +If the length of an argument is two characters, the +argument is tested to see if it is executable (unfortunately, any +register which contains a non-zero value appears executable). +The third line gives the space allotted for a class, and the +class type. +The problem here is the argument aC should not be +executable. +The four types of classes are string, executable, closing +punctuation and opening punctuation. +The last line shows the entire +argument list as it was read. +In this next example, the offending +.Ql \&aC +is escaped: +.Bd -literal -offset indent +\&.Db on +\&.Em An escaped \e&aC +\&.Db off +.Ed +.Bd -literal -offset indent +DEBUGGING ON +DEBUG(fargv) MACRO: `.Em' Line #: 2 + Argc: 1 Argv: `An' Length: 2 + Space: ` ' Class: String + Argc: 2 Argv: `escaped' Length: 7 + Space: ` ' Class: String + Argc: 3 Argv: `aC' Length: 2 + Space: ` ' Class: String + MACRO REQUEST: .Em An escaped &aC +DEBUGGING OFF +.Ed +.Pp +The argument +.Ql \e&aC +shows up with the same length of 2 as the +.Ql \e& +sequence produces a zero width, but a register +named +.Ql \e&aC +was not found and the type classified as string. +.Pp +Other diagnostics consist of usage statements and are self explanatory. +.Sh GROFF, TROFF AND NROFF +The +.Nm \-mdoc +package does not need compatibility mode with +.Xr groff . +.Pp +The package inhibits page breaks, and the headers and footers +which normally occur at those breaks with +.Xr nroff , +to make the manual more efficient for viewing on-line. +At the moment, +.Xr groff +with +.Fl T Ns Ar ascii +does eject the imaginary remainder of the page at end of file. +The inhibiting of the page breaks makes +.Xr nroff Ns 'd +files unsuitable for hardcopy. +There is a register named +.Ql \&cR +which can be set to zero in the site dependent style file +.Pa /usr/src/share/tmac/doc-nroff +to restore the old style behavior. +.Sh FILES +.Bl -tag -width /usr/share/misc/mdoc.template -compact +.It Pa /usr/share/tmac/tmac.doc +manual macro package +.It Pa /usr/share/misc/mdoc.template +template for writing a man page +.El +.Sh SEE ALSO +.Xr mdoc 7 , +.Xr man 1 , +.Xr troff 1 +.Sh BUGS +Undesirable hyphenation on the dash of a flag +argument is not yet resolved, and causes +occasional mishaps in the +.Sx DESCRIPTION +section. +(line break on the hyphen). +.Pp +Predefined strings are not declared in documentation. +.Pp +Section 3f has not been added to the header routines. +.Pp +.Ql \&.Nm +font should be changed in +.Sx NAME +section. +.Pp +.Ql \&.Fn +needs to have a check to prevent splitting up +if the line length is too short. +Occasionally it +separates the last parenthesis, and sometimes +looks ridiculous if a line is in fill mode. +.Pp +The method used to prevent header and footer page +breaks (other than the initial header and footer) when using +nroff occasionally places an unsightly partially filled line (blank) +at the would be bottom of the page. +.Pp +If the outer-most list definition doesn't have a +.Fl width +argument, the +.Ql ".It" +elements of inner lists may not work (producing a list where +each successive element +.Sq walks +to the right). +.Pp +The list and display macros to not do any keeps +and certainly should be able to. +.\" Note what happens if the parameter list overlaps a newline +.\" boundary. +.\" to make sure a line boundary is crossed: +.\" .Bd -literal +.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[] +.\" .Ed +.\" .Pp +.\" produces, nudge nudge, +.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] , +.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] , +.\" nudge +.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] . +.\" .Pp +.\" If double quotes are used, for example: +.\" .Bd -literal +.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q +.\" .Ed +.\" .Pp +.\" produces, nudge nudge, +.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" , +.\" nudge +.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" , +.\" nudge +.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" . +.\" .Pp +.\" Not a pretty sight... +.\" In a paragraph, a long parameter containing unpaddable spaces as +.\" in the former example will cause +.\" .Xr troff +.\" to break the line and spread +.\" the remaining words out. +.\" The latter example will adjust nicely to +.\" justified margins, but may break in between an argument and its +.\" declaration. +.\" In +.\" .Xr nroff +.\" the right margin adjustment is normally ragged and the problem is +.\" not as severe. diff --git a/gnu/usr.bin/groff/tmac/groff_mdoc.samples.man b/gnu/usr.bin/groff/tmac/groff_mdoc.samples.man deleted file mode 100644 index cdbbc21c4f6..00000000000 --- a/gnu/usr.bin/groff/tmac/groff_mdoc.samples.man +++ /dev/null @@ -1,2925 +0,0 @@ -.\" $NetBSD: mdoc.samples.7,v 1.21 1999/08/23 21:54:20 ross Exp $ -.\" -.\" Copyright (c) 1990, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93 -.\" -.\" This tutorial sampler invokes every macro in the package several -.\" times and is guaranteed to give a worst case performance -.\" for an already extremely slow package. -.\" -.Dd November 24, 1997 -.Os -.Dt MDOC.SAMPLES 7 -.Sh NAME -.Nm mdoc.samples -.Nd tutorial sampler for writing -.Bx -manuals with -.Nm \-mdoc -.Sh SYNOPSIS -.Nm man mdoc.samples -.Sh DESCRIPTION -A tutorial sampler for writing -.Bx -manual pages with the -.Nm \-mdoc -macro package, a -.Em content Ns \-based -and -.Em domain Ns \-based -formatting -package for -.Xr troff 1 . -Its predecessor, the -.Xr \-man 7 -package, -addressed page layout leaving the -manipulation of fonts and other -typesetting details to the individual author. -In -.Nm \-mdoc , -page layout macros -make up the -.Em "page structure domain" -which consists of macros for titles, section headers, displays -and lists. Essentially items which affect the physical position -of text on a formatted page. -In addition to the page structure domain, there are two more domains, -the manual domain and the general text domain. -The general text domain is defined as macros which -perform tasks such as quoting or emphasizing pieces of text. -The manual domain is defined as macros that are a subset of the -day to day informal language used to describe commands, routines -and related -.Bx -files. -Macros in the manual domain handle -command names, command line arguments and options, function names, -function parameters, pathnames, variables, cross -references to other manual pages, and so on. -These domain -items have value -for both the author and the future user of the manual page. -It is hoped the consistency gained -across the manual set will provide easier -translation to future documentation tools. -.Pp -Throughout the -.Ux -manual pages, a manual entry -is simply referred -to as a man page, regardless of actual length and without -sexist intention. -.Sh GETTING STARTED -Since a tutorial document is normally read when a person -desires to use the material immediately, the assumption has -been made that the user of this document may be impatient. -The material presented in the remained of this document is -outlined as follows: -.Bl -enum -offset indent -.It -.Tn "TROFF IDIOSYNCRASIES" -.Bl -tag -width flag -compact -offset indent -.It "Macro Usage" . -.It "Passing Space Characters in an Argument" . -.It "Trailing Blank Space Characters (a warning)" . -.It "Escaping Special Characters" . -.El -.It -.Tn "THE ANATOMY OF A MAN PAGE" -.Bl -tag -width flag -compact -offset indent -.It "A manual page template" . -.El -.It -.Tn "INTRODUCTION OF TITLE MACROS" . -.It -.Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS" . -.Bl -tag -width flag -compact -offset indent -.It "What's in a name..." . -.It "General Syntax" . -.El -.It -.Tn "MANUAL DOMAIN" -.Bl -tag -width flag -compact -offset indent -.It "Addresses" . -.It "Arguments" . -.It "Configuration Declarations (section four only)" . -.It "Command Modifier" . -.It "Defined Variables" . -.It "Errno's (Section two only)" . -.It "Environment Variables" . -.It "Function Argument" . -.It "Function Declaration" . -.It "Flags" . -.It "Functions (library routines)" . -.It "Function Types" . -.\" .It "Header File (including source code)" . -.It "Interactive Commands" . -.It "Literals" . -.It "Names" . -.It "Options" . -.It "Pathnames" . -.It "Variables" . -.It "Cross References" . -.El -.It -.Tn "GENERAL TEXT DOMAIN" -.Bl -tag -width flag -compact -offset indent -.It "AT&T Macro" . -.It "BSD Macro" . -.It "UNIX Macro" . -.It "Emphasis Macro" . -.It "Enclosure/Quoting Macros" -.Bl -tag -width flag -compact -offset indent -.It "Angle Bracket Quote/Enclosure" . -.It "Bracket Quotes/Enclosure" . -.It "Double Quote macro/Enclosure" . -.It "Parenthesis Quote/Enclosure" . -.It "Single Quotes/Enclosure" . -.It "Prefix Macro" . -.El -.It "Extended Arguments" . -.It "No\-Op or Normal Text Macro" . -.It "No Space Macro" . -.It "Section Cross References" . -.It "Symbolic Macro" . -.It "References and Citations" . -.It "Trade Names (Acronyms and Type Names)" . -.El -.It -.Tn "PAGE STRUCTURE DOMAIN" -.Bl -tag -width flag -compact -offset indent -.It "Section Headers" . -.It "Paragraphs and Line Spacing" . -.It "Keeps" . -.It "Displays" . -.It "Lists and Columns" . -.El -.It -.Tn "PREDEFINED STRINGS" -.It -.Tn "DIAGNOSTICS" -.It -.Tn "FORMATTING WITH GROFF, TROFF AND NROFF" -.It -.Tn "BUGS" -.El -.ne 7 -.Sh TROFF IDIOSYNCRASIES -The -.Nm \-mdoc -package attempts to simplify the process of writing a man page. -Theoretically, one should not have to learn the dirty details of -.Xr troff 1 -to use -.Nm \-mdoc ; -however, there are a few -limitations which are unavoidable and best gotten out -of the way. -And, too, be forewarned, this package is -.Em not -fast. -.Ss Macro Usage -As in -.Xr troff 1 , -a macro is called by placing a -.Ql \&\. -(dot character) -at the beginning of -a line followed by the two character name for the macro. -Arguments may follow the macro separated by spaces. -It is the dot character at the beginning of the line which causes -.Xr troff 1 -to interpret the next two characters as a macro name. -To place a -.Ql \&\. -(dot character) -at the beginning of a line in some context other than -a macro invocation, precede the -.Ql \&\. -(dot) with the -.Ql \e& -escape sequence. -The -.Ql \e& -translates literally to a zero width space, and is never displayed in the -output. -.Pp -In general, -.Xr troff 1 -macros accept up to nine arguments, any -extra arguments are ignored. -Most macros in -.Nm \-mdoc -accept nine arguments and, -in limited cases, arguments may be continued or extended -on the -next line (See -.Sx Extended Arguments ) . -A few macros handle quoted arguments (see -.Sx Passing Space Characters in an Argument -below). -.Pp -Most of the -.Nm \-mdoc -general text domain and manual domain macros are special -in that their argument lists are -.Em parsed -for callable macro names. -This means an argument on the argument list which matches -a general text or manual domain macro name and is determined -to be callable will be executed -or called when it is processed. -In this case -the argument, although the name of a macro, -is not preceded by a -.Ql \&\. -(dot). -It is in this manner that many macros are nested; for -example -the option macro, -.Ql \&.Op , -may -.Em call -the flag and argument macros, -.Ql \&Fl -and -.Ql \&Ar , -to specify an optional flag with an argument: -.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent -.It Op Fl s Ar bytes -is produced by -.Li \&.Op \&Fl s \&Ar bytes -.El -.Pp -To prevent a two character -string from being interpreted as a macro name, precede -the string with the -escape sequence -.Ql \e& : -.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent -.It Op \&Fl s \&Ar bytes -is produced by -.Li \&.Op \e&Fl s \e&Ar bytes -.El -.Pp -Here the strings -.Ql \&Fl -and -.Ql \&Ar -are not interpreted as macros. -Macros whose argument lists are parsed for callable arguments -are referred to -as parsed and macros which may be called from an argument -list are referred to as callable -throughout this document and in the companion quick reference -manual -.Xr mdoc 7 . -This is a technical -.Em faux pas -as almost all of the macros in -.Nm \-mdoc -are parsed, but as it was cumbersome to constantly refer to macros -as being callable and being able to call other macros, -the term parsed has been used. -.Ss Passing Space Characters in an Argument -Sometimes it is desirable to give as one argument a string -containing one or more blank space characters. -This may be necessary -to defeat the nine argument limit or to specify arguments to macros -which expect particular arrangement of items in the argument list. -For example, -the function macro -.Ql \&.Fn -expects the first argument to be the name of a function and any -remaining arguments to be function parameters. -As -.Tn "ANSI C" -stipulates the declaration of function parameters in the -parenthesized parameter list, each parameter is guaranteed -to be at minimum a two word string. -For example, -.Fa int foo . -.Pp -There are two possible ways to pass an argument which contains -an embedded space. -.Em Implementation note : -Unfortunately, the most convenient way -of passing spaces in between quotes by reassigning individual -arguments before parsing was fairly expensive speed wise -and space wise to implement in all the macros for -.Tn AT&T -.Xr troff . -It is not expensive for -.Xr groff -but for the sake of portability, has been limited -to the following macros which need -it the most: -.Pp -.Bl -tag -width 4n -offset indent -compact -.It Li \&Cd -Configuration declaration (section 4 -.Sx SYNOPSIS ) -.It Li \&Bl -Begin list (for the width specifier). -.It Li \&Em -Emphasized text. -.It Li \&Fn -Functions (sections two and four). -.It Li \&It -List items. -.It Li \&Li -Literal text. -.It Li \&Sy -Symbolic text. -.It Li \&%B -Book titles. -.It Li \&%J -Journal names. -.It Li \&%O -Optional notes for a reference. -.It Li \&%R -Report title (in a reference). -.It Li \&%T -Title of article in a book or journal. -.El -.Pp -One way of passing a string -containing blank spaces is to use the hard or unpaddable space character -.Ql \e\ , -that is, a blank space preceded by the escape character -.Ql \e . -This method may be used with any macro but has the side effect -of interfering with the adjustment of text -over the length of a line. -.Xr Troff -sees the hard space as if it were any other printable character and -cannot split the string into blank or newline separated pieces as one -would expect. -The method is useful for strings which are not expected -to overlap a line boundary. -For example: -.Bl -tag -width "fetch(char *str)" -offset indent -.It Fn fetch char\ *str -is created by -.Ql \&.Fn fetch char\e *str -.It Fn fetch "char *str" -can also be created by -.Ql \&.Fn fetch "\\*q*char *str\\*q" -.El -.Pp -If the -.Ql \e -or quotes -were omitted, -.Ql \&.Fn -would see three arguments and -the result would be: -.Pp -.Dl Fn fetch char *str -.Pp -For an example of what happens when the parameter list overlaps -a newline boundary, see the -.Sx BUGS -section. -.Ss Trailing Blank Space Characters -.Xr Troff -can be confused by blank space characters at the end of a line. -It -is a wise preventive measure to globally remove all blank spaces -from character sequences. -Should the need -arise to force a blank character at the end of a line, -it may be forced with an unpaddable space and the -.Ql \e& -escape character. -For example, -.Ql string\e\ \e& . -.Ss Escaping Special Characters -Special characters -like the newline character -.Ql \en , -are handled by replacing the -.Ql \e -with -.Ql \ee -(e.g. -.Ql \een ) -to preserve -the backslash. -.Sh THE ANATOMY OF A MAN PAGE -The body of a man page is easily constructed from a basic -template found in the file: -.Bd -literal -offset indent -\&.\e" /usr/share/misc/mdoc.template: -\&.\e" The following six lines are required. -\&.Dd Month day, year -\&.Os OPERATING_SYSTEM [version/release] -\&.Dt DOCUMENT_TITLE [section number] [volume] -\&.Sh NAME -\&.Sh SYNOPSIS -\&.Sh DESCRIPTION -\&.\e" The following requests should be uncommented and -\&.\e" used where appropriate. This next request is -\&.\e" for sections 2 and 3 function return values only. -\&.\e" .Sh RETURN VALUES -\&.\e" This next request is for sections 1, 6, 7 & 8 only -\&.\e" .Sh ENVIRONMENT -\&.\e" .Sh FILES -\&.\e" .Sh EXAMPLES -\&.\e" This next request is for sections 1, 6, 7 & 8 only -\&.\e" (command return values (to shell) and -\&.\e" fprintf/stderr type diagnostics) -\&.\e" .Sh DIAGNOSTICS -\&.\e" The next request is for sections 2 and 3 error -\&.\e" and signal handling only. -\&.\e" .Sh ERRORS -\&.\e" .Sh SEE ALSO -\&.\e" .Sh STANDARDS -\&.\e" .Sh HISTORY -\&.\e" .Sh AUTHORS -\&.\e" .Sh BUGS -.Ed -.Pp -The first items in the template are the macros -.Pq Li \&.Dd , \&.Os , \&.Dt ; -the document date, -the operating system the man page or subject source is developed -or modified for, -and the man page title -.Pq Em in upper case -along with the section of the manual the page -belongs in. -These macros identify the page, -and are discussed below in -.Sx TITLE MACROS . -.Pp -The remaining items in the template are section headers -.Pq Li \&.Sh ; -of which -.Sx NAME , -.Sx SYNOPSIS -and -.Sx DESCRIPTION -are mandatory. -The -headers are -discussed in -.Sx PAGE STRUCTURE DOMAIN , -after -presentation of -.Sx MANUAL DOMAIN . -Several content macros are used to demonstrate page layout macros; -reading about content macros before page layout macros is -recommended. -.Sh TITLE MACROS -The title macros are the first portion of the page structure -domain, but are presented first and separate for someone who -wishes to start writing a man page yesterday. -Three header macros designate the document title or manual page title, -the operating system, -and the date of authorship. -These macros are one called once at the very beginning of the document -and are used to construct the headers and footers only. -.Bl -tag -width 6n -.It Li \&.Dt DOCUMENT_TITLE section# [volume] -The document title is the -subject of the man page and must be in -.Tn CAPITALS -due to troff -limitations. -The section number may be 1,\ ...,\ 9, -and if it is specified, -the volume title may be omitted. -A volume title may be arbitrary or one of the following: -.\" .Cl -.\" USD UNIX User's Supplementary Documents -.\" .Cl -.\" PS1 UNIX Programmer's Supplementary Documents -.Pp -.Bl -column SMM -offset indent -compact -.It Li AMD NetBSD Ancestral Manual Documents -.It Li SMM NetBSD System Manager's Manual -.It Li URM NetBSD Reference Manual -.It Li PRM NetBSD Programmer's Manual -.It Li KM NetBSD Kernel Manual -.El -.Pp -The default volume labeling is -.Li URM -for sections 1, 6, and 7; -.Li SMM -for section 8; -.Li PRM -for sections 2, 3, 4, and 5; -.Li KM -for section 9. -.\" .Cl -.\" MMI UNIX Manual Master Index -.\" .Cl -.\" CON UNIX Contributed Software Manual -.\" .Cl -.\" LOC UNIX Local Manual -.It Li \&.Os operating_system release# -The name of the operating system -should be the common acronym, e.g. -.Tn BSD -or -.Tn ATT . -The release should be the standard release -nomenclature for the system specified, e.g. 4.3, 4.3+Tahoe, V.3, -V.4. -Unrecognized arguments are displayed as given in the page footer. -For instance, a typical footer might be: -.Pp -.Dl \&.Os BSD 4.3 -.Pp -or for a locally produced set -.Pp -.Dl \&.Os CS Department -.Pp -The Berkeley default, -.Ql \&.Os -without an argument, has been defined as -.Nx 1.4 -in the site specific file -.Pa /usr/share/tmac/tmac.doc-common . -Note, if the -.Ql \&.Os -macro is not present, the bottom left corner of the page -will be ugly. -.It Li \&.Dd month day, year -The date should be written formally: -.Pp -.ne 5 -.Dl January 25, 1989 -.sp -Note that the date must not be placed in quotes! -.El -.Sh MANUAL DOMAIN -.Ss What's in a name... -The manual domain macro names are derived from the day to day -informal language used to describe commands, subroutines and related -files. -Slightly -different variations of this language are used to describe -the three different aspects of writing a man page. -First, there is the description of -.Nm \-mdoc -macro request usage. -Second is the description of a -.Ux -command -.Em with -.Nm \-mdoc -macros and third, -the -description of a command to a user in the verbal sense; -that is, discussion of a command in the text of a man page. -.Pp -In the first case, -.Xr troff 1 -macros are themselves a type of command; -the general syntax for a troff command is: -.Bd -filled -offset indent -\&.Va argument1 argument2 ... argument9 -.Ed -.Pp -The -.Ql \&.Va -is a macro command or request, and anything following it is an argument to -be processed. -In the second case, -the description of a -.Ux -command using the content macros is a -bit more involved; -a typical -.Sx SYNOPSIS -command line might be displayed as: -.Bd -filled -offset indent -.Nm filter -.Op Fl flag -.Ar infile outfile -.Ed -.Pp -Here, -.Nm filter -is the command name and the -bracketed string -.Fl flag -is a -.Em flag -argument designated as optional by the option brackets. -In -.Nm \-mdoc -terms, -.Ar infile -and -.Ar outfile -are -called -.Em arguments . -The macros which formatted the above example: -.Bd -literal -offset indent -\&.Nm filter -\&.Op \&Fl flag -\&.Ar infile outfile -.Ed -.Pp -In the third case, discussion of commands and command syntax -includes both examples above, but may add more detail. -The -arguments -.Ar infile -and -.Ar outfile -from the example above might be referred to as -.Em operands -or -.Em file arguments . -Some command line argument lists are quite long: -.Bl -tag -width make -offset indent -.It Nm make -.Op Fl eiknqrstv -.Op Fl D Ar variable -.Op Fl d Ar flags -.Op Fl f Ar makefile -.Bk -words -.Op Fl I Ar directory -.Ek -.Op Fl j Ar max_jobs -.Op Ar variable=value -.Bk -words -.Op Ar target ... -.Ek -.El -.Pp -Here one might talk about the command -.Nm make -and qualify the argument -.Ar makefile , -as an argument to the flag, -.Fl f , -or discuss the optional -file -operand -.Ar target . -In the verbal context, such detail can prevent confusion, -however the -.Nm \-mdoc -package -does not have a macro for an argument -.Em to -a flag. -Instead the -.Ql \&Ar -argument macro is used for an operand or file argument like -.Ar target -as well as an argument to a flag like -.Ar variable . -The make command line was produced from: -.Bd -literal -offset indent -\&.Nm make -\&.Op Fl eiknqrstv -\&.Op Fl D Ar variable -\&.Op Fl d Ar flags -\&.Op Fl f Ar makefile -\&.Op Fl I Ar directory -\&.Op Fl j Ar max_jobs -\&.Op Ar variable=value -\&.Bk -words -\&.Op Ar target ... -\&.Ek -.Ed -.Pp -The -.Ql \&.Bk -and -.Ql \&.Ek -macros are explained in -.Sx Keeps . -.Ss General Syntax -The manual domain and general text domain macros share a similar -syntax with a few minor deviations: -.Ql \&.Ar , -.Ql \&.Fl , -.Ql \&.Nm , -and -.Ql \&.Pa -differ only when called without arguments; -.Ql \&.Fn -and -.Ql \&.Xr -impose an order on their argument lists -and the -.Ql \&.Op -and -.Ql \&.Fn -macros -have nesting limitations. -All content macros -are capable of recognizing and properly handling punctuation, -provided each punctuation character is separated by a leading space. -If an request is given: -.Pp -.Dl \&.Li sptr, ptr), -.Pp -The result is: -.Pp -.Dl Li sptr, ptr), -.Pp -The punctuation is not recognized and all is output in the -literal font. If the punctuation is separated by a leading -white space: -.Pp -.Dl \&.Li "sptr , ptr ) ," -.Pp -The result is: -.Pp -.Dl Li sptr , ptr ) , -.Pp -The punctuation is now recognized and is output in the -default font distinguishing it from the strings in literal font. -.Pp -To remove the special meaning from a punctuation character -escape it with -.Ql \e& . -.Xr Troff -is limited as a macro language, and has difficulty -when presented with a string containing -a member of the mathematical, logical or -quotation set: -.Bd -literal -offset indent-two -\&{+,\-,/,*,\&%,<,>,<=,>=,=,==,&,`,',"} -.Ed -.Pp -The problem is that -.Xr troff -may assume it is supposed to actually perform the operation -or evaluation suggested by the characters. To prevent -the accidental evaluation of these characters, -escape them with -.Ql \e& . -Typical syntax is shown in the first content macro displayed -below, -.Ql \&.Ad . -.Ss Address Macro -The address macro identifies an address construct -of the form addr1[,addr2[,addr3]]. -.Pp -.Dl Usage: .Ad address ... \*(Pu -.Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n -.It Li \&.Ad addr1 -.Ad addr1 -.It Li \&.Ad addr1\ . -.Ad addr1 . -.It Li \&.Ad addr1\ , file2 -.Ad addr1 , file2 -.It Li \&.Ad f1\ , f2\ , f3\ : -.Ad f1 , f2 , f3 : -.It Li \&.Ad addr\ )\ )\ , -.Ad addr ) ) , -.El -.Pp -It is an error to call -.Li \&.Ad -without arguments. -.Li \&.Ad -is callable by other macros and is parsed. -.Ss Argument Macro -The -.Li \&.Ar -argument macro may be used whenever -a command line argument is referenced. -.Pp -.Dl Usage: .Ar argument ... \*(Pu -.Bl -tag -width ".Ar file1 file2" -compact -offset 15n -.It Li \&.Ar -.Ar -.It Li \&.Ar file1 -.Ar file1 -.It Li \&.Ar file1\ . -.Ar file1 . -.It Li \&.Ar file1 file2 -.Ar file1 file2 -.It Li \&.Ar f1 f2 f3\ : -.Ar f1 f2 f3 : -.It Li \&.Ar file\ )\ )\ , -.Ar file ) ) , -.El -.Pp -If -.Li \&.Ar -is called without arguments -.Ql Ar -is assumed. -The -.Li \&.Ar -macro is parsed and is callable. -.Ss Configuration Declaration (section four only) -The -.Ql \&.Cd -macro is used to demonstrate a -.Xr config 8 -declaration for a device interface in a section four manual. -This macro accepts quoted arguments (double quotes only). -.Pp -.Bl -tag -width "device le0 at scode?" -offset indent -.It Cd "device le0 at scode?" -produced by: -.Ql ".Cd device le0 at scode?" . -.El -.Ss Command Modifier -The command modifier is identical to the -.Ql \&.Fl -(flag) command with the exception -the -.Ql \&.Cm -macro does not assert a dash -in front of every argument. -Traditionally flags are marked by the -preceding dash, some commands or subsets of commands do not use them. -Command modifiers may also be specified in conjunction with interactive -commands such as editor commands. -See -.Sx Flags . -.Ss Defined Variables -A variable which is defined in an include file is specified -by the macro -.Ql \&.Dv . -.Pp -.Dl Usage: .Dv defined_variable ... \*(Pu -.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n -.It Li ".Dv MAXHOSTNAMELEN" -.Dv MAXHOSTNAMELEN -.It Li ".Dv TIOCGPGRP )" -.Dv TIOCGPGRP ) -.El -.Pp -It is an error to call -.Ql \&.Dv -without arguments. -.Ql \&.Dv -is parsed and is callable. -.Ss Errno's (Section two only) -The -.Ql \&.Er -errno macro specifies the error return value -for section two library routines. -The second example -below shows -.Ql \&.Er -used with the -.Ql \&.Bq -general text domain macro, as it would be used in -a section two manual page. -.Pp -.Dl Usage: .Er ERRNOTYPE ... \*(Pu -.Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n -.It Li \&.Er ENOENT -.Er ENOENT -.It Li \&.Er ENOENT\ )\ ; -.Er ENOENT ) ; -.It Li \&.Bq \&Er ENOTDIR -.Bq Er ENOTDIR -.El -.Pp -It is an error to call -.Ql \&.Er -without arguments. -The -.Ql \&.Er -macro is parsed and is callable. -.Ss Environment Variables -The -.Ql \&.Ev -macro specifies an environment variable. -.Pp -.Dl Usage: .Ev argument ... \*(Pu -.Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n -.It Li \&.Ev DISPLAY -.Ev DISPLAY -.It Li \&.Ev PATH\ . -.Ev PATH . -.It Li \&.Ev PRINTER\ )\ )\ , -.Ev PRINTER ) ) , -.El -.Pp -It is an error to call -.Ql \&.Ev -without arguments. -The -.Ql \&.Ev -macro is parsed and is callable. -.Ss Function Argument -The -.Ql \&.Fa -macro is used to refer to function arguments (parameters) -outside of the -.Sx SYNOPSIS -section of the manual or inside -the -.Sx SYNOPSIS -section should a parameter list be too -long for the -.Ql \&.Fn -macro and the enclosure macros -.Ql \&.Fo -and -.Ql \&.Fc -must be used. -.Ql \&.Fa -may also be used to refer to structure members. -.Pp -.Dl Usage: .Fa function_argument ... \*(Pu -.Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n -.It Li \&.Fa d_namlen\ )\ )\ , -.Fa d_namlen ) ) , -.It Li \&.Fa iov_len -.Fa iov_len -.El -.Pp -It is an error to call -.Ql \&.Fa -without arguments. -.Ql \&.Fa -is parsed and is callable. -.Ss Function Declaration -The -.Ql \&.Fd -macro is used in the -.Sx SYNOPSIS -section with section two or three -functions. -The -.Ql \&.Fd -macro does not call other macros and is not callable by other -macros. -.Pp -.Dl Usage: .Fd include_file (or defined variable) -.Pp -In the -.Sx SYNOPSIS -section a -.Ql \&.Fd -request causes a line break if a function has already been presented -and a break has not occurred. -This leaves a nice vertical space -in between the previous function call and the declaration for the -next function. -.Ss Flags -The -.Ql \&.Fl -macro handles command line flags. -It prepends -a dash, -.Ql \- , -to the flag. -For interactive command flags, which -are not prepended with a dash, the -.Ql \&.Cm -(command modifier) -macro is identical, but without the dash. -.Pp -.Dl Usage: .Fl argument ... \*(Pu -.Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n -.It Li \&.Fl -.Fl -.It Li \&.Fl cfv -.Fl cfv -.It Li \&.Fl cfv\ . -.Fl cfv . -.It Li \&.Fl s v t -.Fl s v t -.It Li \&.Fl -\ , -.Fl - , -.It Li \&.Fl xyz\ )\ , -.Fl xyz ) , -.El -.Pp -The -.Ql \&.Fl -macro without any arguments results -in a dash representing stdin/stdout. -Note that giving -.Ql \&.Fl -a single dash, will result in two dashes. -The -.Ql \&.Fl -macro is parsed and is callable. -.Ss Functions (library routines) -The .Fn macro is modeled on ANSI C conventions. -.Bd -literal -Usage: .Fn [type] function [[type] parameters ... \*(Pu] -.Ed -.Bl -tag -width ".Fn .int align. .const * char *sptrsxx" -compact -.It Li "\&.Fn getchar" -.Fn getchar -.It Li "\&.Fn strlen ) ," -.Fn strlen ) , -.It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" , -.Fn "int align" "const * char *sptrs" , -.El -.Pp -It is an error to call -.Ql \&.Fn -without any arguments. -The -.Ql \&.Fn -macro -is parsed and is callable, -note that any call to another macro signals the end of -the -.Ql \&.Fn -call (it will close-parenthesis at that point). -.Pp -For functions that have more than eight parameters (and this -is rare), the -macros -.Ql \&.Fo -(function open) -and -.Ql \&.Fc -(function close) -may be used with -.Ql \&.Fa -(function argument) -to get around the limitation. For example: -.Bd -literal -offset indent -\&.Fo "int res_mkquery" -\&.Fa "int op" -\&.Fa "char *dname" -\&.Fa "int class" -\&.Fa "int type" -\&.Fa "char *data" -\&.Fa "int datalen" -\&.Fa "struct rrec *newrr" -\&.Fa "char *buf" -\&.Fa "int buflen" -\&.Fc -.Ed -.Pp -Produces: -.Bd -filled -offset indent -.Fo "int res_mkquery" -.Fa "int op" -.Fa "char *dname" -.Fa "int class" -.Fa "int type" -.Fa "char *data" -.Fa "int datalen" -.Fa "struct rrec *newrr" -.Fa "char *buf" -.Fa "int buflen" -.Fc -.Ed -.Pp -The -.Ql \&.Fo -and -.Ql \&.Fc -macros are parsed and are callable. -In the -.Sx SYNOPSIS -section, the function will always begin at -the beginning of line. -If there is more than one function -presented in the -.Sx SYNOPSIS -section and a function type has not been -given, a line break will occur, leaving a nice vertical space -between the current function name and the one prior. -At the moment, -.Ql \&.Fn -does not check its word boundaries -against troff line lengths and may split across a newline -ungracefully. -This will be fixed in the near future. -.Ss Function Type -This macro is intended for the -.Sx SYNOPSIS -section. -It may be used -anywhere else in the man page without problems, but its main purpose -is to present the function type in kernel normal form for the -.Sx SYNOPSIS -of sections two and three -(it causes a page break allowing the function name to appear -on the next line). -.Pp -.Dl Usage: .Ft type ... \*(Pu -.Bl -tag -width "\&.Ft struct stat" -offset 14n -compact -.It Li \&.Ft struct stat -.Ft struct stat -.El -.Pp -The -.Ql \&.Ft -request is not callable by other macros. -.Ss Interactive Commands -The -.Ql \&.Ic -macro designates an interactive or internal command. -.Pp -.Dl Usage: .Li argument ... \*(Pu -.Bl -tag -width ".Ic setenv , unsetenvxx" -compact -offset 14n -.It Li \&.Ic :wq -.Ic :wq -.It Li \&.Ic do while {...} -.Ic do while {...} -.It Li \&.Ic setenv\ , unsetenv -.Ic setenv , unsetenv -.El -.Pp -It is an error to call -.Ql \&.Ic -without arguments. -The -.Ql \&.Ic -macro is parsed and is callable. -.Ss Literals -The -.Ql \&.Li -literal macro may be used for special characters, -variable constants, anything which should be displayed as it -would be typed. -.Pp -.Dl Usage: .Li argument ... \*(Pu -.Bl -tag -width ".Li cntrl-D ) ," -compact -offset 14n -.It Li \&.Li \een -.Li \en -.It Li \&.Li M1 M2 M3\ ; -.Li M1 M2 M3 ; -.It Li \&.Li cntrl-D\ )\ , -.Li cntrl-D ) , -.It Li \&.Li 1024\ ... -.Li 1024 ... -.El -.Pp -The -.Ql \&.Li -macro is parsed and is callable. -.Ss Name Macro -The -.Ql \&.Nm -macro is used for the document title or subject name. -It has the peculiarity of remembering the first -argument it was called with, which should -always be the subject name of the page. -When called without -arguments, -.Ql \&.Nm -regurgitates this initial name for the sole purpose -of making less work for the author. -If trailing punctuation is required with this feature, -use -.Qq -as a first argument to -.Ql \&.Nm . -Note: -a section two -or three document function name is addressed with the -.Ql \&.Nm -in the -.Sx NAME -section, and with -.Ql \&.Fn -in the -.Sx SYNOPSIS -and remaining sections. -For interactive commands, such as the -.Ql while -command keyword in -.Xr csh 1 , -the -.Ql \&.Ic -macro should be used. -While the -.Ql \&.Ic -is nearly identical -to -.Ql \&.Nm , -it can not recall the first argument it was invoked with. -.Pp -.Dl Usage: .Nm argument ... \*(Pu -.Bl -tag -width ".Nm mdoc.samples" -compact -offset 14n -.It Li \&.Nm mdoc.samples -.Nm mdoc.samples -.It Li \&.Nm \e-mdoc -.Nm \-mdoc -.It Li \&.Nm foo\ )\ )\ , -.Nm foo ) ) , -.It Li \&.Nm -.Nm -.It Li \&.Nm \&"\&"\ : -.Nm "" : -.El -.Pp -The -.Ql \&.Nm -macro is parsed and is callable. -.Ss Options -The -.Ql \&.Op -macro -places option brackets around the any remaining arguments on the command -line, and places any -trailing punctuation outside the brackets. -The macros -.Ql \&.Oc -and -.Ql \&.Oo -may be used across one or more lines. -.Pp -.Dl Usage: .Op options ... \*(Pu -.Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent -.It Li \&.Op -.Op -.It Li ".Op Fl k" -.Op Fl k -.It Li ".Op Fl k ) ." -.Op Fl k ) . -.It Li ".Op Fl k Ar kookfile" -.Op Fl k Ar kookfile -.It Li ".Op Fl k Ar kookfile ," -.Op Fl k Ar kookfile , -.It Li ".Op Ar objfil Op Ar corfil" -.Op Ar objfil Op Ar corfil -.It Li ".Op Fl c Ar objfil Op Ar corfil ," -.Op Fl c Ar objfil Op Ar corfil , -.It Li \&.Op word1 word2 -.Op word1 word2 -.El -.Pp -The -.Ql \&.Oc -and -.Ql \&.Oo -macros: -.Bd -literal -offset indent -\&.Oo -\&.Op \&Fl k \&Ar kilobytes -\&.Op \&Fl i \&Ar interval -\&.Op \&Fl c \&Ar count -\&.Oc -.Ed -.Pp -Produce: -.Oo -.Op Fl k Ar kilobytes -.Op Fl i Ar interval -.Op Fl c Ar count -.Oc -.Pp -The macros -.Ql \&.Op , -.Ql \&.Oc -and -.Ql \&.Oo -are parsed and are callable. -.Ss Pathnames -The -.Ql \&.Pa -macro formats path or file names. -.Pp -.Dl Usage: .Pa pathname \*(Pu -.Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n -.It Li \&.Pa /usr/share -.Pa /usr/share -.It Li \&.Pa /tmp/fooXXXXX\ )\ . -.Pa /tmp/fooXXXXX ) . -.El -.Pp -The -.Ql \&.Pa -macro is parsed and is callable. -.Ss Variables -Generic variable reference: -.Pp -.Dl Usage: .Va variable ... \*(Pu -.Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n -.It Li \&.Va count -.Va count -.It Li \&.Va settimer , -.Va settimer , -.It Li \&.Va int\ *prt\ )\ : -.Va int\ *prt ) : -.It Li \&.Va char\ s\ ]\ )\ )\ , -.Va char\ s ] ) ) , -.El -.Pp -It is an error to call -.Ql \&.Va -without any arguments. -The -.Ql \&.Va -macro is parsed and is callable. -.Ss Manual Page Cross References -The -.Ql \&.Xr -macro expects the first argument to be -a manual page name, and the second argument, if it exists, -to be either a section page number or punctuation. -Any -remaining arguments are assumed to be punctuation. -.Pp -.Dl Usage: .Xr man_page [1,...,9] \*(Pu -.Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n -.It Li \&.Xr mdoc -.Xr mdoc -.It Li \&.Xr mdoc\ , -.Xr mdoc , -.It Li \&.Xr mdoc 7 -.Xr mdoc 7 -.It Li \&.Xr mdoc 7\ )\ )\ , -.Xr mdoc 7 ) ) , -.El -.Pp -The -.Ql \&.Xr -macro is parsed and is callable. -It is an error to call -.Ql \&.Xr -without -any arguments. -.Sh GENERAL TEXT DOMAIN -.Ss AT&T Macro -.Bd -literal -offset indent -compact -Usage: .At [v1 .. v7 | 32v | V.1 | V.4] ... \*(Pu -.Ed -.Bl -tag -width ".At v6 ) ," -compact -offset 14n -.It Li ".At" -.At -.It Li ".At v6 ." -.At v6 . -.El -.Pp -The -.Ql \&.At -macro is -.Em not -parsed and -.Em not -callable. It accepts at most two arguments. -.Ss BSD Macro -.Dl Usage: .Bx [Version/release] ... \*(Pu -.Bl -tag -width ".Bx 4.3 ) ," -compact -offset 14n -.It Li ".Bx" -.Bx -.It Li ".Bx 4.3 ." -.Bx 4.3 . -.El -.Pp -The -.Ql \&.Bx -macro is parsed and is callable. -.Ss NetBSD Macro -.Dl Usage: .Nx [Version/release] ... \*(Pu -.Bl -tag -width ".Nx 1.4 ) ," -compact -offset 14n -.It Li ".Nx" -.Nx -.It Li ".Nx 1.4 ." -.Nx 1.4 . -.El -.Pp -The -.Ql \&.Nx -macro is parsed and is callable. -.Ss FreeBSD Macro -.Dl Usage: .Fx [Version/release] ... \*(Pu -.Bl -tag -width ".Fx 2.2 ) ," -compact -offset 14n -.It Li ".Fx" -.Fx -.It Li ".Fx 2.2 ." -.Fx 2.2 . -.El -.Pp -The -.Ql \&.Fx -macro is parsed and is callable. -.Ss UNIX Macro -.Dl Usage: .Ux ... \*(Pu -.Bl -tag -width ".Ux 4.3 ) ," -compact -offset 14n -.It Li ".Ux" -.Ux -.El -.Pp -The -.Ql \&.Ux -macro is parsed and is callable. -.Ss Emphasis Macro -Text may be stressed or emphasized with the -.Ql \&.Em -macro. -The usual font for emphasis is italic. -.Pp -.Dl Usage: .Em argument ... \*(Pu -.Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n -.It Li ".Em does not" -.Em does not -.It Li ".Em exceed 1024 ." -.Em exceed 1024 . -.It Li ".Em vide infra ) ) ," -.Em vide infra ) ) , -.El -.\" .Pp -.\" The emphasis can be forced across several lines of text by using -.\" the -.\" .Ql \&.Bf -.\" macro discussed in -.\" .Sx Modes -.\" under -.\" .Sx PAGE STRUCTURE DOMAIN . -.\" .Pp -.\" .Bf -emphasis -.\" We are certain the reason most people desire a Harvard MBA -.\" so they can become to be successful philanthropists. Only -.\" mathematicians and physicists go to graduate school strictly -.\" to acquire infinite wealthy and fame. Its that inifinity -.\" word that does it to them. Ruins them. -.\" .Ef -.Pp -The -.Ql \&.Em -macro is parsed and is callable. -It is an error to call -.Ql \&.Em -without arguments. -.Ss Enclosure and Quoting Macros -The concept of enclosure is similar to quoting. -The object being to enclose one or more strings between -a pair of characters like quotes or parentheses. -The terms quoting and enclosure are used -interchangeably throughout this document. -Most of the -one line enclosure macros end -in small letter -.Ql q -to give a hint of quoting, but there are a few irregularities. -For each enclosure macro -there is also a pair of open and close macros which end -in small letters -.Ql o -and -.Ql c -respectively. -These can be used across one or more lines of text -and while they have nesting limitations, the one line quote macros -can be used inside -of them. -.Pp -.ne 5 -.Bd -filled -offset indent -.Bl -column "quote " "close " "open " "Enclose Stringx(in XX) " XXstringXX -.Em " Quote Close Open Function Result" -\&.Aq .Ac .Ao Angle Bracket Enclosure -\&.Bq .Bc .Bo Bracket Enclosure [string] -\&.Dq .Dc .Do Double Quote ``string'' - .Ec .Eo Enclose String (in XX) XXstringXX -\&.Pq .Pc .Po Parenthesis Enclosure (string) -\&.Ql Quoted Literal `st' or string -\&.Qq .Qc .Qo Straight Double Quote "string" -\&.Sq .Sc .So Single Quote `string' -.El -.Ed -.Pp -Except for the irregular macros noted below, all -of the quoting macros are parsed and callable. -All handle punctuation properly, as long as it -is presented one character at a time and separated by spaces. -The quoting macros examine opening and closing punctuation -to determine whether it comes before or after the -enclosing string. This makes some nesting possible. -.Bl -tag -width xxx,xxxx -.It Li \&.Ec , \&.Eo -These macros expect the first argument to be the -opening and closing strings respectively. -.It Li \&.Ql -The quoted literal macro behaves differently for -.Xr troff -than -.Xr nroff . -If formatted with -.Xr nroff , -a quoted literal is always quoted. If formatted with -troff, an item is only quoted if the width -of the item is less than three constant width characters. -This is to make short strings more visible where the font change -to literal (constant width) is less noticeable. -.It Li \&.Pf -The prefix macro is not callable, but it is parsed: -.Bl -tag -width "(namexx" -offset indent -.It Li ".Pf ( Fa name2" -becomes -.Pf ( Fa name2 . -.El -.It Li \&.Ns -The -.Ql \&.Ns -(no space) macro, which -.Em is -callable, -performs the analogous suffix function. -.It Li ".Ap -The \&.Ap macro inserts an apostrophe and exits any special text modes, -continuing in -.Li \&.No -mode. -.El -.Pp -.ne 4 -Examples of quoting: -.Bl -tag -width ".Aq Pa ctype.h ) ,xxxxxxxx" -compact -offset indent -.It Li \&.Aq -.Aq -.It Li \&.Aq \&Ar ctype.h\ )\ , -.Aq Ar ctype.h ) , -.It Li \&.Bq -.Bq -.It Li \&.Bq \&Em Greek \&, French \&. -.Bq Em Greek , French . -.It Li \&.Dq -.Dq -.It Li ".Dq string abc ." -.Dq string abc . -.It Li ".Dq \'^[A-Z]\'" -.Dq \'^[A-Z]\' -.It Li "\&.Ql man mdoc" -.Ql man mdoc -.It Li \&.Qq -.Qq -.It Li "\&.Qq string ) ," -.Qq string ) , -.It Li "\&.Qq string Ns )," -.Qq string Ns ), -.It Li \&.Sq -.Sq -.It Li "\&.Sq string -.Sq string -.It Li "\&.Em or Ap ing -.Em or Ap ing -.El -.Pp -For a good example of nested enclosure macros, see the -.Ql \&.Op -option macro. -It was created from the same -underlying enclosure macros as those presented in the list -above. -The -.Ql \&.Xo -and -.Ql \&.Xc -extended argument list macros -were also built from the same underlying routines and are a good -example of -.Nm \-mdoc -macro usage at its worst. -.Ss No\-Op or Normal Text Macro -The macro -.Li \&.No -is -a hack for words in a macro command line which should -.Em not -be formatted and follows the conventional syntax -for content macros. -.Ss No Space Macro -The -.Ql \&.Ns -macro eliminates unwanted spaces in between macro requests. -It is useful for old style argument lists where there is no space -between the flag and argument: -.Bl -tag -width ".Op Fl I Ns Ar directoryxx" -offset indent -.It Li ".Op Fl I Ns Ar directory" -produces -.Op Fl I Ns Ar directory -.El -.Pp -Note: the -.Ql \&.Ns -macro always invokes the -.Ql \&.No -macro after eliminating the space unless another macro name -follows it. -The macro -.Ql \&.Ns -is parsed and is callable. -.Ss Section Cross References -The -.Ql \&.Sx -macro designates a reference to a section header -within the same document. -It is parsed and is callable. -.Pp -.Bl -tag -width "Li \&.Sx FILES" -offset 14n -.It Li \&.Sx FILES -.Sx FILES -.El -.Ss Symbolic -The symbolic emphasis macro is generally a boldface macro in -either the symbolic sense or the traditional English usage. -.Pp -.Dl Usage: .Sy symbol ... \*(Pu -.Bl -tag -width ".Sy Important Noticex" -compact -offset 14n -.It Li \&.Sy Important Notice -.Sy Important Notice -.El -.Pp -The -.Ql \&.Sy -macro is parsed and is callable. -Arguments to -.Ql \&.Sy -may be quoted. -.Ss References and Citations -The following macros make a modest attempt to handle references. -At best, the macros make it convenient to manually drop in a subset of -refer style references. -.Pp -.Bl -tag -width 6n -offset indent -compact -.It Li ".Rs" -Reference Start. -Causes a line break and begins collection -of reference information until the -reference end macro is read. -.It Li ".Re" -Reference End. -The reference is printed. -.It Li ".%A" -Reference author name, one name per invocation. -.It Li ".%B" -Book title. -.It Li ".\&%C" -City/place. -.It Li ".\&%D" -Date. -.It Li ".%J" -Journal name. -.It Li ".%N" -Issue number. -.It Li ".%O" -Optional information. -.It Li ".%P" -Page number. -.It Li ".%R" -Report name. -.It Li ".%T" -Title of article. -.It Li ".%V" -Volume(s). -.El -.Pp -The macros beginning with -.Ql % -are not callable, and are parsed only for the trade name macro which -returns to its caller. -(And not very predictably at the moment either.) -The purpose is to allow trade names -to be pretty printed in -.Xr troff Ns / Ns Xr ditroff -output. -.Ss Trade Names (or Acronyms and Type Names) -The trade name macro is generally a small caps macro for -all upper case words longer than two characters. -.Pp -.Dl Usage: .Tn symbol ... \*(Pu -.Bl -tag -width ".Tn ASCII" -compact -offset 14n -.It Li \&.Tn DEC -.Tn DEC -.It Li \&.Tn ASCII -.Tn ASCII -.El -.Pp -The -.Ql \&.Tn -macro -is parsed and is callable by other macros. -.Ss Extended Arguments -The -.Li \&.Xo -and -.Li \&.Xc -macros allow one to extend an argument list -on a macro boundary. -Argument lists cannot -be extended within a macro -which expects all of its arguments on one line such -as -.Ql \&.Op . -.Pp -Here is an example of -.Ql \&.Xo -using the space mode macro to turn spacing off: -.Bd -literal -offset indent -\&.Sm off -\&.It Xo Sy I Ar operation -\&.No \een Ar count No \een -\&.Xc -\&.Sm on -.Ed -.Pp -Produces -.Bd -filled -offset indent -.Bl -tag -width flag -compact -.Sm off -.It Xo Sy I Ar operation -.No \en Ar count No \en -.Xc -.Sm on -.El -.Ed -.Pp -Another one: -.Bd -literal -offset indent -\&.Sm off -\&.It Cm S No \&/ Ar old_pattern Xo -\&.No \&/ Ar new_pattern -\&.No \&/ Op Cm g -\&.Xc -\&.Sm on -.Ed -.Pp -Produces -.Bd -filled -offset indent -.Bl -tag -width flag -compact -.Sm off -.It Cm S No \&/ Ar old_pattern Xo -.No \&/ Ar new_pattern -.No \&/ Op Cm g -.Xc -.Sm on -.El -.Ed -.Pp -Another example of -.Ql \&.Xo -and using enclosure macros: -Test the value of an variable. -.Bd -literal -offset indent -\&.It Xo -\&.Ic .ifndef -\&.Oo \e&! Oc Ns Ar variable -\&.Op Ar operator variable ... -\&.Xc -.Ed -.Pp -Produces -.Bd -filled -offset indent -.Bl -tag -width flag -compact -.It Xo -.Ic .ifndef -.Oo \&! Oc Ns Ar variable -.Op Ar operator variable ... -.Xc -.El -.Ed -.Pp -All of the above examples have used the -.Ql \&.Xo -macro on the argument list of the -.Ql \&.It -(list-item) -macro. -The extend macros are not used very often, and when they are -it is usually to extend the list-item argument list. -Unfortunately, this is also where the extend macros are the -most finicky. -In the first two examples, spacing was turned off; -in the third, spacing was desired in part of the output but -not all of it. -To make these macros work in this situation make sure -the -.Ql \&.Xo -and -.Ql \&.Xc -macros are placed as shown in the third example. -If the -.Ql \&.Xo -macro is not alone on the -.Ql \&.It -argument list, spacing will be unpredictable. -The -.Ql \&.Ns -(no space macro) -must not occur as the first or last macro on a line -in this situation. -Out of 900 manual pages (about 1500 actual pages) -currently released with -.Bx -only fifteen use the -.Ql \&.Xo -macro. -.Sh PAGE STRUCTURE DOMAIN -.Ss Section Headers -The first three -.Ql \&.Sh -section header macros -list below are required in every -man page. -The remaining section headers -are recommended at the discretion of the author -writing the manual page. -The -.Ql \&.Sh -macro can take up to nine arguments. -It is parsed and but is not callable. -.Bl -tag -width ".Sh SYNOPSIS" -.It \&.Sh NAME -The -.Ql \&.Sh NAME -macro is mandatory. -If not specified, -the headers, footers and page layout defaults -will not be set and things will be rather unpleasant. -The -.Sx NAME -section consists of at least three items. -The first is the -.Ql \&.Nm -name macro naming the subject of the man page. -The second is the Name Description macro, -.Ql \&.Nd , -which separates the subject -name from the third item, which is the description. -The -description should be the most terse and lucid possible, -as the space available is small. -.It \&.Sh SYNOPSIS -The -.Sx SYNOPSIS -section describes the typical usage of the -subject of a man page. -The macros required -are either -.Ql ".Nm" , -.Ql ".Cd" , -.Ql ".Fn" , -(and possibly -.Ql ".Fo" , -.Ql ".Fc" , -.Ql ".Fd" , -.Ql ".Ft" -macros). -The function name -macro -.Ql ".Fn" -is required -for manual page sections 2 and 3, the command and general -name macro -.Ql \&.Nm -is required for sections 1, 5, 6, 7, 8. -Section 4 manuals require a -.Ql ".Nm" , ".Fd" -or a -.Ql ".Cd" -configuration device usage macro. -Several other macros may be necessary to produce -the synopsis line as shown below: -.Pp -.Bd -filled -offset indent -.Nm cat -.Op Fl benstuv -.Op Fl -.Ar -.Ed -.Pp -The following macros were used: -.Pp -.Dl \&.Nm cat -.Dl \&.Op \&Fl benstuv -.Dl \&.Op \&Fl -.Dl \&.Ar -.Pp -.Sy Note : -The macros -.Ql \&.Op , -.Ql \&.Fl , -and -.Ql \&.Ar -recognize the pipe bar character -.Ql \*(Ba , -so a command line such as: -.Pp -.Dl ".Op Fl a | Fl b" -.Pp -will not go orbital. -.Xr Troff -normally interprets a \*(Ba as a special operator. -See -.Sx PREDEFINED STRINGS -for a usable \*(Ba -character in other situations. -.It \&.Sh DESCRIPTION -In most cases the first text in the -.Sx DESCRIPTION -section -is a brief paragraph on the command, function or file, -followed by a lexical list of options and respective -explanations. -To create such a list, the -.Ql \&.Bl -begin-list, -.Ql \&.It -list-item and -.Ql \&.El -end-list -macros are used (see -.Sx Lists and Columns -below). -.El -.Pp -The following -.Ql \&.Sh -section headers are part of the -preferred manual page layout and must be used appropriately -to maintain consistency. -They are listed in the order -in which they would be used. -.Bl -tag -width SYNOPSIS -.It \&.Sh ENVIRONMENT -The -.Sx ENVIRONMENT -section should reveal any related -environment -variables and clues to their behavior and/or usage. -.It \&.Sh EXAMPLES -There are several ways to create examples. -See -the -.Sx EXAMPLES -section below -for details. -.It \&.Sh FILES -Files which are used or created by the man page subject -should be listed via the -.Ql \&.Pa -macro in the -.Sx FILES -section. -.It \&.Sh SEE ALSO -References to other material on the man page topic and -cross references to other relevant man pages should -be placed in the -.Sx SEE ALSO -section. -Cross references -are specified using the -.Ql \&.Xr -macro. -At this time -.Xr refer 1 -style references are not accommodated. -.Pp -It is recommended that the cross references are sorted on the section -number, and then alphabetically on the names within a section. -.It \&.Sh STANDARDS -If the command, library function or file adheres to a -specific implementation such as -.St -p1003.2 -or -.St -ansiC -this should be noted here. -If the -command does not adhere to any standard, its history -should be noted in the -.Sx HISTORY -section. -.It \&.Sh HISTORY -Any command which does not adhere to any specific standards -should be outlined historically in this section. -.It \&.Sh AUTHORS -Credits, if need be, should be placed here. -.It \&.Sh DIAGNOSTICS -Diagnostics from a command should be placed in this section. -.It \&.Sh ERRORS -Specific error handling, especially from library functions -(man page sections 2 and 3) should go here. -The -.Ql \&.Er -macro is used to specify an errno. -.It \&.Sh BUGS -Blatant problems with the topic go here... -.El -.Pp -User specified -.Ql \&.Sh -sections may be added, -for example, this section was set with: -.Bd -literal -offset 14n -\&.Sh PAGE LAYOUT MACROS -.Ed -.Ss Paragraphs and Line Spacing. -.Bl -tag -width 6n -.It \&.Pp -The \&.Pp paragraph command may -be used to specify a line space where necessary. -The macro is not necessary after a -.Ql \&.Sh -or -.Ql \&.Ss -macro or before -a -.Ql \&.Bl -macro. -(The -.Ql \&.Bl -macro asserts a vertical distance unless the -compact flag is given). -.El -.\" This worked with version one, need to redo for version three -.\" .Pp -.\" .Ds I -.\" .Cw (ax+bx+c) \ is\ produced\ by\ \& -.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\& -.\" .Cl Cx \t\t -.\" .Li \&.Cx\ ( -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Va ax -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Sy \+ -.\" .Cx -.\" .Cl Cx \&(\& -.\" .Va ax -.\" .Cx + -.\" .Va by -.\" .Cx + -.\" .Va c ) -.\" .Cx \t -.\" .Em is produced by -.\" .Cx \t -.\" .Li \&.Va by -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Sy \+ -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Va c ) -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Cx -.\" .Cx -.\" .Cw -.\" .De -.\" .Pp -.\" This example shows the same equation in a different format. -.\" The spaces -.\" around the -.\" .Li \&+ -.\" signs were forced with -.\" .Li \e : -.\" .Pp -.\" .Ds I -.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \& -.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\& -.\" .Cl Cx \t\t -.\" .Li \&.Cx\ ( -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Va a -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Sy x -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Cx \e\ +\e\ \e& -.\" .Cx -.\" .Cl Cx \&(\& -.\" .Va a -.\" .Sy x -.\" .Cx \ +\ \& -.\" .Va b -.\" .Sy y -.\" .Cx \ +\ \& -.\" .Va c ) -.\" .Cx \t -.\" .Em is produced by -.\" .Cl Cx \t\t -.\" .Li \&.Va b -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Sy y -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Cx \e\ +\e\ \e& -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Va c ) -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Cx -.\" .Cx -.\" .Cw -.\" .De -.\" .Pp -.\" The incantation below was -.\" lifted from the -.\" .Xr adb 1 -.\" manual page: -.\" .Pp -.\" .Ds I -.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by -.\" .Cl Cx \t\t -.\" .Li \&.Cx Op Sy ?/ -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Nm m -.\" .Cx -.\" .Cl Cx Op Sy ?/ -.\" .Nm m -.\" .Ad \ b1 e1 f1 -.\" .Op Sy ?/ -.\" .Cx \t -.\" .Em is produced by -.\" .Cx \t -.\" .Li \&.Ar \e\ b1 e1 f1 -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Op Sy ?/ -.\" .Cx -.\" .Cl Cx \t\t -.\" .Li \&.Cx -.\" .Cx -.\" .Cw -.\" .De -.\" .Pp -.Ss Keeps -The only keep that is implemented at this time is for words. -The macros are -.Ql \&.Bk -(begin-keep) -and -.Ql \&.Ek -(end-keep). -The only option that -.Ql \&.Bl -accepts is -.Fl words -and is useful for preventing line breaks in the middle of options. -In the example for the make command line arguments (see -.Sx What's in a name ) , -the keep prevented -.Xr nroff -from placing up the -flag and the argument -on separate lines. -(Actually, the option macro used to prevent this from occurring, -but was dropped when the decision (religious) was made to force -right justified margins in -.Xr troff -as options in general look atrocious when spread across a sparse -line. -More work needs to be done with the keep macros, a -.Fl line -option needs to be added.) -.Ss Examples and Displays -There are six types of displays, a quickie one line indented display -.Ql \&.D1 , -a quickie one line literal display -.Ql \&.Dl , -and block literal, block filled, block unfilled, and block ragged which use -the -.Ql \&.Bd -begin-display -and -.Ql \&.Ed -end-display macros. -.Pp -.Bl -tag -width \&.Dlxx -.It Li \&.D1 -(D-one) Display one line of indented text. -This macro is parsed, but it is not callable. -.Pp -.Dl Fl ldghfstru -.Pp -The above was produced by: -.Li \&.Dl Fl ldghfstru . -.It Li \&.Dl -(D-ell) -Display one line of indented -.Em literal -text. -The -.Ql \&.Dl -example macro has been used throughout this -file. -It allows -the indent (display) of one line of text. -Its default font is set to -constant width (literal) however -it is parsed and will recognized other macros. -It is not callable however. -.Pp -.Dl % ls -ldg /usr/local/bin -.Pp -The above was produced by -.Li \&.Dl % ls -ldg /usr/local/bin . -.It Li \&.Bd -Begin-display. -The -.Ql \&.Bd -display must be ended with the -.Ql \&.Ed -macro. -Displays may be nested within lists, but may -.Em not -contain other displays; this also prohibits nesting -of .D1 and .Dl one-line displays. -.Ql \&.Bd -has the following syntax: -.Pp -.Dl ".Bd display-type [-offset offset_value] [-compact]" -.Pp -The display-type must be one of the following four types and -may have an offset specifier for indentation: -.Ql \&.Bd . -.Pp -.Bl -tag -width "file file_name " -compact -.It Fl ragged -Fill, but do not adjust the right margin. -.It Fl unfilled -Do not fill: display a block of text as typed, the -right (and left) margin edges are left ragged. -.It Fl filled -Display a filled (formatted) block. -The block of text is formatted (the edges are filled \- -not left unjustified). -.It Fl literal -Display a literal block, useful for source code or -simple tabbed or spaced text. -.It Fl file Ar file_name -The file name following the -.Fl file -flag is read and displayed. -Literal mode is -asserted and tabs are set at 8 constant width character -intervals, however any -.Xr troff/ Ns Nm \-mdoc -commands in file will be processed. -.It Fl offset Ar string -If -.Fl offset -is specified with one of the following strings, the string -is interpreted to indicate the level of indentation for the -forthcoming block of text: -.Pp -.Bl -tag -width "indent-two" -compact -.It Ar left -Align block on the current left margin, -this is the default mode of -.Ql \&.Bd . -.It Ar center -Supposedly center the block. -At this time -unfortunately, the block merely gets -left aligned about an imaginary center margin. -.It Ar indent -Indents by one default indent value or tab. -The default -indent value is also used for the -.Ql \&.D1 -display so one is guaranteed the two types of displays -will line up. -This indent is normally set to 6n or about two -thirds of an inch (six constant width characters). -.It Ar indent-two -Indents two times the default indent value. -.It Ar right -This -.Em left -aligns the block about two inches from -the right side of the page. -This macro needs -work and perhaps may never do the right thing by -.Xr troff . -.El -.El -.It ".Ed" -End-display. -.El -.Ss Tagged Lists and Columns -There are several types of lists which may be initiated with the -.Ql ".Bl" -begin-list macro. -Items within the list -are specified with the -.Ql ".It" -item macro and -each list must end with the -.Ql ".El" -macro. -Lists other than -.Li \-enum -may be nested within themselves and within displays. -The use of columns inside of lists or lists inside of columns -is unproven. -.Pp -In addition, several list attributes may be specified such as -the width of a tag, the list offset, and compactness -(blank lines between items allowed or disallowed). -Most of this document has been formatted with a tag style list -.Pq Fl tag . -For a change of pace, the list-type used to present the list-types -is an over-hanging list -.Pq Fl ohang . -This type of list is quite popular with -.Tn TeX -users, but might look a bit funny after having read many pages of -tagged lists. -The following list types are accepted by -.Ql ".Bl" : -.Pp -.Bl -ohang -compact -.It Fl bullet -.It Fl dash -.It Fl enum -.It Fl hyphen -.It Fl item -These five are the simplest types of lists. -Once the -.Ql ".Bl" -macro has been given, items in the list are merely -indicated by a line consisting solely of the -.Ql ".It" -macro. -For example, the source text for a simple enumerated list -would look like: -.Bd -literal -offset indent-two -\&.Bl -enum -compact -\&.It -\&Item one goes here. -\&.It -\&And item two here. -\&.It -\&Lastly item three goes here. -\&.El -.Ed -.Pp -The results: -.Pp -.Bl -enum -offset indent-two -compact -.It -Item one goes here. -.It -And item two here. -.It -Lastly item three goes here. -.El -.Pp -A simple bullet list construction: -.Bd -literal -offset indent-two -\&.Bl -bullet -compact -\&.It -\&Bullet one goes here. -\&.It -\&Bullet two here. -\&.El -.Ed -.Pp -Produces: -.Bl -bullet -offset indent-two -compact -.It -Bullet one goes here. -.It -Bullet two here. -.El -.Pp -.It Fl tag -.It Fl diag -.It Fl hang -.It Fl ohang -.It Fl inset -These list-types collect arguments specified with the -.Ql \&.It -macro and create a label which may be -.Em inset -into the forthcoming text, -.Em hanged -from the forthcoming text, -.Em overhanged -from above and not indented or -.Em tagged . -This -list was constructed with the -.Ql Fl ohang -list-type. -The -.Ql \&.It -macro is parsed only for the inset, hang -and tag list-types and is not callable. -Here is an example of inset labels: -.Bl -inset -offset indent -.It Em Tag -The tagged list (also called a tagged paragraph) is the -most common type of list used in the Berkeley manuals. Use a -.Fl width -attribute as described below. -.It Em Diag -Diag lists create section four diagnostic lists -and are similar to inset lists except callable -macros are ignored. -.It Em Hang -Hanged labels are a matter of taste. -.It Em Ohang -Overhanging labels are nice when space is constrained. -.It Em Inset -Inset labels are useful for controlling blocks of -paragraphs and are valuable for converting -.Nm \-mdoc -manuals to other formats. -.El -.Pp -Here is the source text which produced the above example: -.Bd -literal -offset indent -\&.Bl -inset -offset indent -\&.It Em Tag -\&The tagged list (also called a tagged paragraph) is the -\&most common type of list used in the Berkeley manuals. -\&.It Em Diag -\&Diag lists create section four diagnostic lists -\&and are similar to inset lists except callable -\¯os are ignored. -\&.It Em Hang -\&Hanged labels are a matter of taste. -\&.It Em Ohang -\&Overhanging labels are nice when space is constrained. -\&.It Em Inset -\&Inset labels are useful for controlling blocks of -\¶graphs and are valuable for converting -\&.Nm \-mdoc -\&manuals to other formats. -\&.El -.Ed -.Pp -Here is a hanged list with just one item: -.Bl -hang -offset indent -.It Em Hanged -labels appear similar to tagged lists when the -label is smaller than the label width. -.It Em Longer hanged list labels -blend in to the paragraph unlike -tagged paragraph labels. -.El -.Pp -And the unformatted text which created it: -.Bd -literal -offset indent -\&.Bl -hang -offset indent -\&.It Em Hanged -\&labels appear similar to tagged lists when the -\&label is smaller than the label width. -\&.It Em Longer hanged list labels -\&blend in to the paragraph unlike -\&tagged paragraph labels. -\&.El -.Ed -.Pp -The tagged list which follows uses a width specifier to control -the width of the tag. -.Pp -.Bl -tag -width "PAGEIN" -compact -offset indent -.It SL -sleep time of the process (seconds blocked) -.It PAGEIN -number of disk -.Tn I/O Ns 's -resulting from references -by the process to pages not loaded in core. -.It UID -numerical user-id of process owner -.It PPID -numerical id of parent of process process priority -(non-positive when in non-interruptible wait) -.El -.Pp -The raw text: -.Bd -literal -offset indent -\&.Bl -tag -width "PAGEIN" -compact -offset indent -\&.It SL -\&sleep time of the process (seconds blocked) -\&.It PAGEIN -\&number of disk -\&.Tn I/O Ns 's -\&resulting from references -\&by the process to pages not loaded in core. -\&.It UID -\&numerical user-id of process owner -\&.It PPID -\&numerical id of parent of process process priority -\&(non-positive when in non-interruptible wait) -\&.El -.Ed -.Pp -Acceptable width specifiers: -.Bl -tag -width Ar -offset indent -.It Fl width Ar "\&Fl" -sets the width to the default width for a flag. -All callable -macros have a default width value. -The -.Ql \&.Fl , -value is presently -set to ten constant width characters or about five sixth of -an inch. -.It Fl width Ar "24n" -sets the width to 24 constant width characters or about two -inches. -The -.Ql n -is absolutely necessary for the scaling to work correctly. -.It Fl width Ar "ENAMETOOLONG" -sets width to the constant width length of the -string given. -.It Fl width Ar "\\*qint mkfifo\\*q" -again, the width is set to the constant width of the string -given. -.El -.Pp -If a width is not specified for the tag list type, the first -time -.Ql \&.It -is invoked, an attempt is made to determine an appropriate -width. -If the first argument to -.Ql ".It" -is a callable macro, the default width for that macro will be used -as if the macro name had been supplied as the width. -However, -if another item in the list is given with a different callable -macro name, a new and nested list is assumed. This effectively -means that -.Fl width -is required for the tag list type. -.Pp -.It Fl column -This list type generates multiple columns. -The number of columns and the width of each column is determined by -the arguments to the -.Fl column -list. -Each -.Ql ".It" -argument is parsed to make a row, each column within the -row is a separate argument separated by a tab or the -.Ql ".Ta" -macro. -.El -The table: -.Bl -column "String" "Nroff" "Troff" -offset indent -.It Sy "String" Ta Sy "Nroff" Ta Sy "Troff" -.It Li "<=" Ta \&<\&= Ta \*(<= -.It Li ">=" Ta \&>\&= Ta \*(>= -.El -.Pp -was produced by: -.Bd -literal -offset indent -\&.Bl -column "String" "Nroff" "Troff" -offset indent -\&.It Sy "String" Ta Sy "Nroff" Ta Sy "Troff" -\&.It Li "<=" Ta \&<\&= Ta \*(<= -\&.It Li ">=" Ta \&>\&= Ta \*(>= -\&.El -.Ed -.Sh PREDEFINED STRINGS -The following strings are predefined as may be used by -preceding with the troff string interpreting sequence -.Ql \&\e*(xx -where -.Em xx -is the name of the defined string or as -.Ql \&\e*x -where -.Em x -is the name of the string. -The interpreting sequence may be used any where in the text. -.Pp -.Bl -column "String " "Nroff " "Troff " -offset indent -.It Sy "String Nroff Troff" -.It Li "<=" Ta \&<\&= Ta \*(<= -.It Li ">=" Ta \&>\&= Ta \*(>= -.It Li "Rq" Ta "''" Ta \*(Rq -.It Li "Lq" Ta "``" Ta \*(Lq -.It Li "ua" Ta ^ Ta \*(ua -.It Li "aa" Ta ' Ta \*(aa -.It Li "ga" Ta \` Ta \*(ga -.\" .It Li "sL" Ta ` Ta \*(sL -.\" .It Li "sR" Ta ' Ta \*(sR -.It Li "q" Ta \&" Ta \*q -.It Li "Pi" Ta pi Ta \*(Pi -.It Li "Ne" Ta != Ta \*(Ne -.It Li "Le" Ta <= Ta \*(Le -.It Li "Ge" Ta >= Ta \*(Ge -.It Li "Lt" Ta < Ta \*(Gt -.It Li "Gt" Ta > Ta \*(Lt -.It Li "Pm" Ta +- Ta \*(Pm -.It Li "If" Ta infinity Ta \*(If -.It Li "Na" Ta \fINaN\fP Ta \*(Na -.It Li "Ba" Ta \fR\&|\fP Ta \*(Ba -.El -.Pp -.Sy Note : -The string named -.Ql q -should be written as -.Ql \e*q -since it is only one char. -.Sh DIAGNOSTICS -The debugging facilities for -.Nm \-mdoc -are limited, but can help detect subtle errors such -as the collision of an argument name with an internal -register or macro name. -(A what?) -A register is an arithmetic storage class for -.Xr troff -with a one or two character name. -All registers internal to -.Nm \-mdoc -for -.Xr troff -and -.Xr ditroff -are two characters and -of the form such as -.Ql \&Ar , - as -.Ql \&aR -or - as -.Ql \&C\&1 . -And adding to the muddle, -.Xr troff -has its own internal registers all of which are either -two lower case characters or a dot plus a letter or meta-character -character. -In one of the introduction examples, it was shown how to -prevent the interpretation of a macro name with the escape sequence -.Ql \e& . -This is sufficient for the internal register names also. -.Pp -.\" Every callable macro name has a corresponding register -.\" of the same name (). -.\" There are also specific registers which have -.\" been used for stacks and arrays and are listed in the -.\" .Sx Appendix . -.\" .Bd -ragged -offset 4n -.\" [A-Z][a-z] registers corresponding to macro names (example ``Ar'') -.\" [a-z][A-Z] registers corresponding to macro names (example ``aR'') -.\" C[0-9] argument types (example C1) -.\" O[0-9] offset stack (displays) -.\" h[0-9] horizontal spacing stack (lists) -.\" o[0-9] offset (stack) (lists) -.\" t[0-9] tag stack (lists) -.\" v[0-9] vertical spacing stack (lists) -.\" w[0-9] width tag/label stack -.\" .Ed -.\" .Pp -If a non-escaped register name is given in the argument list of a request -unpredictable behavior will occur. -In general, any time huge portions -of text do not appear where expected in the output, or small strings -such as list tags disappear, chances are there is a misunderstanding -about an argument type in the argument list. -Your mother never intended for you to remember this evil stuff - so here -is a way to find out whether or not your arguments are valid: The -.Ql \&.Db -(debug) -macro displays the interpretation of the argument list for most -macros. -Macros such as the -.Ql \&.Pp -(paragraph) -macro do not contain debugging information. -All of the callable macros do, -and it is strongly advised whenever in doubt, -turn on the -.Ql \&.Db -macro. -.Pp -.Dl Usage: \&.Db [on | off] -.Pp -An example of a portion of text with -the debug macro placed above and below an -artificially created problem (a flag argument -.Ql \&aC -which should be -.Ql \e&aC -in order to work): -.Bd -literal -offset indent -\&.Db on -\&.Op Fl aC Ar file ) -\&.Db off -.Ed -.Pp -The resulting output: -.Bd -literal -offset indent -DEBUGGING ON -DEBUG(argv) MACRO: `.Op' Line #: 2 - Argc: 1 Argv: `Fl' Length: 2 - Space: `' Class: Executable - Argc: 2 Argv: `aC' Length: 2 - Space: `' Class: Executable - Argc: 3 Argv: `Ar' Length: 2 - Space: `' Class: Executable - Argc: 4 Argv: `file' Length: 4 - Space: ` ' Class: String - Argc: 5 Argv: `)' Length: 1 - Space: ` ' Class: Closing Punctuation or suffix - MACRO REQUEST: .Op Fl aC Ar file ) -DEBUGGING OFF -.Ed -.Pp -The first line of information tells the name of the calling -macro, here -.Ql \&.Op , -and the line number it appears on. -If one or more files are involved -(especially if text from another file is included) the line number -may be bogus. -If there is only one file, it should be accurate. -The second line gives the argument count, the argument -.Pq Ql \&Fl -and its length. -If the length of an argument is two characters, the -argument is tested to see if it is executable (unfortunately, any -register which contains a non-zero value appears executable). -The third line gives the space allotted for a class, and the -class type. -The problem here is the argument aC should not be -executable. -The four types of classes are string, executable, closing -punctuation and opening punctuation. -The last line shows the entire -argument list as it was read. -In this next example, the offending -.Ql \&aC -is escaped: -.Bd -literal -offset indent -\&.Db on -\&.Em An escaped \e&aC -\&.Db off -.Ed -.Bd -literal -offset indent -DEBUGGING ON -DEBUG(fargv) MACRO: `.Em' Line #: 2 - Argc: 1 Argv: `An' Length: 2 - Space: ` ' Class: String - Argc: 2 Argv: `escaped' Length: 7 - Space: ` ' Class: String - Argc: 3 Argv: `aC' Length: 2 - Space: ` ' Class: String - MACRO REQUEST: .Em An escaped &aC -DEBUGGING OFF -.Ed -.Pp -The argument -.Ql \e&aC -shows up with the same length of 2 as the -.Ql \e& -sequence produces a zero width, but a register -named -.Ql \e&aC -was not found and the type classified as string. -.Pp -Other diagnostics consist of usage statements and are self explanatory. -.Sh GROFF, TROFF AND NROFF -The -.Nm \-mdoc -package does not need compatibility mode with -.Xr groff . -.Pp -The package inhibits page breaks, and the headers and footers -which normally occur at those breaks with -.Xr nroff , -to make the manual more efficient for viewing on-line. -At the moment, -.Xr groff -with -.Fl T Ns Ar ascii -does eject the imaginary remainder of the page at end of file. -The inhibiting of the page breaks makes -.Xr nroff Ns 'd -files unsuitable for hardcopy. -There is a register named -.Ql \&cR -which can be set to zero in the site dependent style file -.Pa /usr/src/share/tmac/doc-nroff -to restore the old style behavior. -.Sh FILES -.Bl -tag -width /usr/share/misc/mdoc.template -compact -.It Pa /usr/share/tmac/tmac.doc -manual macro package -.It Pa /usr/share/misc/mdoc.template -template for writing a man page -.El -.Sh SEE ALSO -.Xr mdoc 7 , -.Xr man 1 , -.Xr troff 1 -.Sh BUGS -Undesirable hyphenation on the dash of a flag -argument is not yet resolved, and causes -occasional mishaps in the -.Sx DESCRIPTION -section. -(line break on the hyphen). -.Pp -Predefined strings are not declared in documentation. -.Pp -Section 3f has not been added to the header routines. -.Pp -.Ql \&.Nm -font should be changed in -.Sx NAME -section. -.Pp -.Ql \&.Fn -needs to have a check to prevent splitting up -if the line length is too short. -Occasionally it -separates the last parenthesis, and sometimes -looks ridiculous if a line is in fill mode. -.Pp -The method used to prevent header and footer page -breaks (other than the initial header and footer) when using -nroff occasionally places an unsightly partially filled line (blank) -at the would be bottom of the page. -.Pp -If the outer-most list definition doesn't have a -.Fl width -argument, the -.Ql ".It" -elements of inner lists may not work (producing a list where -each successive element -.Sq walks -to the right). -.Pp -The list and display macros to not do any keeps -and certainly should be able to. -.\" Note what happens if the parameter list overlaps a newline -.\" boundary. -.\" to make sure a line boundary is crossed: -.\" .Bd -literal -.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[] -.\" .Ed -.\" .Pp -.\" produces, nudge nudge, -.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] , -.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] , -.\" nudge -.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] . -.\" .Pp -.\" If double quotes are used, for example: -.\" .Bd -literal -.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q -.\" .Ed -.\" .Pp -.\" produces, nudge nudge, -.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" , -.\" nudge -.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" , -.\" nudge -.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" . -.\" .Pp -.\" Not a pretty sight... -.\" In a paragraph, a long parameter containing unpaddable spaces as -.\" in the former example will cause -.\" .Xr troff -.\" to break the line and spread -.\" the remaining words out. -.\" The latter example will adjust nicely to -.\" justified margins, but may break in between an argument and its -.\" declaration. -.\" In -.\" .Xr nroff -.\" the right margin adjustment is normally ragged and the problem is -.\" not as severe. diff --git a/gnu/usr.bin/groff/tmac/groff_me.7_in b/gnu/usr.bin/groff/tmac/groff_me.7_in new file mode 100644 index 00000000000..49196212391 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_me.7_in @@ -0,0 +1,274 @@ +.\" Copyright (c) 1980 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms are permitted +.\" provided that the above copyright notice and this paragraph are +.\" duplicated in all such forms and that any documentation, +.\" advertising materials, and other materials related to such +.\" distribution and use acknowledge that the software was developed +.\" by the University of California, Berkeley. The name of the +.\" University may not be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.\" @(#)me.7 6.4 (Berkeley) 4/13/90 +.\" +.\" Modified for groff by jjc@jclark.com +.hc % +.TH GROFF_ME @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.UC 3 +.SH NAME +groff_me \- troff macros for formatting papers +.SH SYNOPSIS +.B "groff \-me" +[ options ] +file ... +.br +.B "troff \-me" +[ options ] +file ... +.SH DESCRIPTION +This manual page describes the GNU version of the \-me macros, +which is part of the groff document formatting system. +This version can be used with both GNU troff and Unix troff. +This package of +.I troff +macro definitions provides a canned formatting +facility for tech%nical papers in various formats. +.PP +The macro requests are defined below. +Many +.I troff +requests are unsafe in conjunction with +this package, however, these requests may be used with +impunity after the first .pp: +.nf +.IP +.ta \w'.sz +n 'u +\&.bp begin new page +\&.br break output line here +\&.sp n insert n spacing lines +\&.ls n (line spacing) n=1 single, n=2 double space +\&.na no alignment of right margin +\&.ce n center next n lines +\&.ul n underline next n lines +.fi +.PP +Output of the +.I pic, +.I eqn, +.I refer, +and +.I tbl +preprocessors +is acceptable as input. +.SH FILES +@MACRODIR@/tmac.e +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@) +.br +\-me Reference Manual, Eric P. Allman +.br +Writing Papers with Groff Using \-me +.tr &. +.SH REQUESTS +This list is incomplete; +see +.I "The \-me Reference Manual" +for interesting details. +.PP +.ta \w'.eh \'x\'y\'z\' 'u +\w'Initial 'u +\w'Cause 'u +.br +.di x + \ka +.br +.di +.in \nau +.ti 0 +Request Initial Cause Explanation +.ti 0 + Value Break +.br +.in \nau +.ti 0 +\&.(c - yes Begin centered block +.ti 0 +\&.(d - no Begin delayed text +.ti 0 +\&.(f - no Begin footnote +.ti 0 +\&.(l - yes Begin list +.ti 0 +\&.(q - yes Begin major quote +.ti 0 +\&.(x \fIx\fR - no Begin indexed item in index +.I x +.ti 0 +\&.(z - no Begin floating keep +.ti 0 +\&.)c - yes End centered block +.ti 0 +\&.)d - yes End delayed text +.ti 0 +\&.)f - yes End footnote +.ti 0 +\&.)l - yes End list +.ti 0 +\&.)q - yes End major quote +.ti 0 +\&.)x - yes End index item +.ti 0 +\&.)z - yes End floating keep +.ti 0 +\&.++ \fIm H\fR - no Define paper section. +.I m +defines the part of the paper, and can be +.B C +(chapter), +.B A +(appendix), +.B P +(preliminary, e.g., abstract, table of contents, etc.), +.B B +(bibliography), +.B RC +(chapters renumbered from page one each chapter), +or +.B RA +(appendix renumbered from page one). +.ti 0 +\&.+c \fIT\fR - yes Begin chapter (or appendix, etc., as +set by .++). +.I T +is the chapter title. +.ti 0 +\&.1c 1 yes One column format on a new page. +.ti 0 +\&.2c 1 yes Two column format. +.ti 0 +\&.EN - yes Space after equation +produced by +.I eqn +or +.IR neqn . +.ti 0 +\&.EQ \fIx y\fR - yes Precede equation; break out and +add space. +Equation number is +.IR y . +The optional argument \fIx\fR +may be +.I I +to indent equation (default), +.I L +to left-adjust the equation, or +.I C +to center the equation. +.ti 0 +\&.GE - yes End \fIgremlin\fP picture. +.ti 0 +\&.GS - yes Begin \fIgremlin\fP picture. +.ti 0 +\&.PE - yes End \fIpic\fP picture. +.ti 0 +\&.PS - yes Begin \fIpic\fP picture. +.ti 0 +\&.TE - yes End table. +.ti 0 +\&.TH - yes End heading section of table. +.ti 0 +\&.TS \fIx\fR - yes Begin table; if \fIx\fR is +.I H +table has repeated heading. +.ti 0 +\&.b \fIx\fR no no Print +.I x +in boldface; if no argument switch to boldface. +.ti 0 +\&.ba \fI+n\fR 0 yes Augments the base indent by +.I n. +This indent is used to set the indent on regular text +(like paragraphs). +.ti 0 +\&.bc no yes Begin new column +.ti 0 +\&.bi \fIx\fR no no Print +.I x +in bold italics (nofill only) +.ti 0 +\&.bu - yes Begin bulleted paragraph +.ti 0 +\&.bx \fIx\fR no no Print \fIx\fR in a box (nofill only). +.ti 0 +\&.ef \fI\'x\'y\'z\'\fR \'\'\'\' no Set even footer to x y z +.ti 0 +\&.eh \fI\'x\'y\'z\'\fR \'\'\'\' no Set even header to x y z +.ti 0 +\&.fo \fI\'x\'y\'z\'\fR \'\'\'\' no Set footer to x y z +.ti 0 +\&.hx - no Suppress headers and footers on next page. +.ti 0 +\&.he \fI\'x\'y\'z\'\fR \'\'\'\' no Set header to x y z +.ti 0 +\&.hl - yes Draw a horizontal line +.ti 0 +\&.i \fIx\fR no no Italicize +.I x; +if +.I x +missing, italic text follows. +.ti 0 +\&.ip \fIx y\fR no yes Start indented paragraph, +with hanging tag +.IR x . +Indentation is +.I y +ens (default 5). +.ti 0 +\&.lp yes yes Start left-blocked paragraph. +.ti 0 +\&.np 1 yes Start numbered paragraph. +.ti 0 +\&.of \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd footer to x y z +.ti 0 +\&.oh \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd header to x y z +.ti 0 +\&.pd - yes Print delayed text. +.ti 0 +\&.pp no yes Begin paragraph. +First line indented. +.ti 0 +\&.r yes no Roman text follows. +.ti 0 +\&.re - no Reset tabs to default values. +.ti 0 +\&.sh \fIn x\fR - yes Section head follows, +font automatically bold. +.I n +is level of section, +.I x +is title of section. +.ti 0 +\&.sk no no Leave the next page blank. +Only one page is remembered ahead. +.ti 0 +\&.sm \fIx\fR - no Set +.I x +in a smaller pointsize. +.ti 0 +\&.sz \fI+n\fR 10p no Augment the point size by +.I n +points. +.ti 0 +\&.tp no yes Begin title page. +.ti 0 +\&.u \fIx\fR - no Underline argument (even in \fItroff\fR). +(Nofill only). +.ti 0 +\&.uh - yes Like .sh but unnumbered. +.ti 0 +\&.xp \fIx\fR - no Print index +.I x. diff --git a/gnu/usr.bin/groff/tmac/groff_me.man b/gnu/usr.bin/groff/tmac/groff_me.man deleted file mode 100644 index 49196212391..00000000000 --- a/gnu/usr.bin/groff/tmac/groff_me.man +++ /dev/null @@ -1,274 +0,0 @@ -.\" Copyright (c) 1980 The Regents of the University of California. -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms are permitted -.\" provided that the above copyright notice and this paragraph are -.\" duplicated in all such forms and that any documentation, -.\" advertising materials, and other materials related to such -.\" distribution and use acknowledge that the software was developed -.\" by the University of California, Berkeley. The name of the -.\" University may not be used to endorse or promote products derived -.\" from this software without specific prior written permission. -.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" @(#)me.7 6.4 (Berkeley) 4/13/90 -.\" -.\" Modified for groff by jjc@jclark.com -.hc % -.TH GROFF_ME @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.UC 3 -.SH NAME -groff_me \- troff macros for formatting papers -.SH SYNOPSIS -.B "groff \-me" -[ options ] -file ... -.br -.B "troff \-me" -[ options ] -file ... -.SH DESCRIPTION -This manual page describes the GNU version of the \-me macros, -which is part of the groff document formatting system. -This version can be used with both GNU troff and Unix troff. -This package of -.I troff -macro definitions provides a canned formatting -facility for tech%nical papers in various formats. -.PP -The macro requests are defined below. -Many -.I troff -requests are unsafe in conjunction with -this package, however, these requests may be used with -impunity after the first .pp: -.nf -.IP -.ta \w'.sz +n 'u -\&.bp begin new page -\&.br break output line here -\&.sp n insert n spacing lines -\&.ls n (line spacing) n=1 single, n=2 double space -\&.na no alignment of right margin -\&.ce n center next n lines -\&.ul n underline next n lines -.fi -.PP -Output of the -.I pic, -.I eqn, -.I refer, -and -.I tbl -preprocessors -is acceptable as input. -.SH FILES -@MACRODIR@/tmac.e -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@) -.br -\-me Reference Manual, Eric P. Allman -.br -Writing Papers with Groff Using \-me -.tr &. -.SH REQUESTS -This list is incomplete; -see -.I "The \-me Reference Manual" -for interesting details. -.PP -.ta \w'.eh \'x\'y\'z\' 'u +\w'Initial 'u +\w'Cause 'u -.br -.di x - \ka -.br -.di -.in \nau -.ti 0 -Request Initial Cause Explanation -.ti 0 - Value Break -.br -.in \nau -.ti 0 -\&.(c - yes Begin centered block -.ti 0 -\&.(d - no Begin delayed text -.ti 0 -\&.(f - no Begin footnote -.ti 0 -\&.(l - yes Begin list -.ti 0 -\&.(q - yes Begin major quote -.ti 0 -\&.(x \fIx\fR - no Begin indexed item in index -.I x -.ti 0 -\&.(z - no Begin floating keep -.ti 0 -\&.)c - yes End centered block -.ti 0 -\&.)d - yes End delayed text -.ti 0 -\&.)f - yes End footnote -.ti 0 -\&.)l - yes End list -.ti 0 -\&.)q - yes End major quote -.ti 0 -\&.)x - yes End index item -.ti 0 -\&.)z - yes End floating keep -.ti 0 -\&.++ \fIm H\fR - no Define paper section. -.I m -defines the part of the paper, and can be -.B C -(chapter), -.B A -(appendix), -.B P -(preliminary, e.g., abstract, table of contents, etc.), -.B B -(bibliography), -.B RC -(chapters renumbered from page one each chapter), -or -.B RA -(appendix renumbered from page one). -.ti 0 -\&.+c \fIT\fR - yes Begin chapter (or appendix, etc., as -set by .++). -.I T -is the chapter title. -.ti 0 -\&.1c 1 yes One column format on a new page. -.ti 0 -\&.2c 1 yes Two column format. -.ti 0 -\&.EN - yes Space after equation -produced by -.I eqn -or -.IR neqn . -.ti 0 -\&.EQ \fIx y\fR - yes Precede equation; break out and -add space. -Equation number is -.IR y . -The optional argument \fIx\fR -may be -.I I -to indent equation (default), -.I L -to left-adjust the equation, or -.I C -to center the equation. -.ti 0 -\&.GE - yes End \fIgremlin\fP picture. -.ti 0 -\&.GS - yes Begin \fIgremlin\fP picture. -.ti 0 -\&.PE - yes End \fIpic\fP picture. -.ti 0 -\&.PS - yes Begin \fIpic\fP picture. -.ti 0 -\&.TE - yes End table. -.ti 0 -\&.TH - yes End heading section of table. -.ti 0 -\&.TS \fIx\fR - yes Begin table; if \fIx\fR is -.I H -table has repeated heading. -.ti 0 -\&.b \fIx\fR no no Print -.I x -in boldface; if no argument switch to boldface. -.ti 0 -\&.ba \fI+n\fR 0 yes Augments the base indent by -.I n. -This indent is used to set the indent on regular text -(like paragraphs). -.ti 0 -\&.bc no yes Begin new column -.ti 0 -\&.bi \fIx\fR no no Print -.I x -in bold italics (nofill only) -.ti 0 -\&.bu - yes Begin bulleted paragraph -.ti 0 -\&.bx \fIx\fR no no Print \fIx\fR in a box (nofill only). -.ti 0 -\&.ef \fI\'x\'y\'z\'\fR \'\'\'\' no Set even footer to x y z -.ti 0 -\&.eh \fI\'x\'y\'z\'\fR \'\'\'\' no Set even header to x y z -.ti 0 -\&.fo \fI\'x\'y\'z\'\fR \'\'\'\' no Set footer to x y z -.ti 0 -\&.hx - no Suppress headers and footers on next page. -.ti 0 -\&.he \fI\'x\'y\'z\'\fR \'\'\'\' no Set header to x y z -.ti 0 -\&.hl - yes Draw a horizontal line -.ti 0 -\&.i \fIx\fR no no Italicize -.I x; -if -.I x -missing, italic text follows. -.ti 0 -\&.ip \fIx y\fR no yes Start indented paragraph, -with hanging tag -.IR x . -Indentation is -.I y -ens (default 5). -.ti 0 -\&.lp yes yes Start left-blocked paragraph. -.ti 0 -\&.np 1 yes Start numbered paragraph. -.ti 0 -\&.of \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd footer to x y z -.ti 0 -\&.oh \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd header to x y z -.ti 0 -\&.pd - yes Print delayed text. -.ti 0 -\&.pp no yes Begin paragraph. -First line indented. -.ti 0 -\&.r yes no Roman text follows. -.ti 0 -\&.re - no Reset tabs to default values. -.ti 0 -\&.sh \fIn x\fR - yes Section head follows, -font automatically bold. -.I n -is level of section, -.I x -is title of section. -.ti 0 -\&.sk no no Leave the next page blank. -Only one page is remembered ahead. -.ti 0 -\&.sm \fIx\fR - no Set -.I x -in a smaller pointsize. -.ti 0 -\&.sz \fI+n\fR 10p no Augment the point size by -.I n -points. -.ti 0 -\&.tp no yes Begin title page. -.ti 0 -\&.u \fIx\fR - no Underline argument (even in \fItroff\fR). -(Nofill only). -.ti 0 -\&.uh - yes Like .sh but unnumbered. -.ti 0 -\&.xp \fIx\fR - no Print index -.I x. diff --git a/gnu/usr.bin/groff/tmac/groff_ms.7_in b/gnu/usr.bin/groff/tmac/groff_ms.7_in new file mode 100644 index 00000000000..0e1f64c741f --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_ms.7_in @@ -0,0 +1,235 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_ms \- groff ms macros +.SH SYNOPSIS +.B groff +.B \-m@TMAC_S_PREFIX@s +[ +.IR options .\|.\|. +] +[ +.IR files .\|.\|. +] +.SH DESCRIPTION +This manual page describes the GNU version of the ms macros, +which is part of the groff document formatting system. +The groff ms macros are intended to be compatible with the +documented behaviour of the 4.3 +.SM BSD +Unix ms macros subject to the following limitations: +.IP \(bu +the internals of groff ms are not similar to the internals of Unix ms +and so documents that depend upon implementation details of Unix ms +may well not work with groff ms; +.IP \(bu +there is no support for typewriter-like devices; +.IP \(bu +Berkeley localisms, in particular the +.B TM +and +.B CT +macros, are not implemented; +.IP \(bu +groff ms +does not provide cut marks; +.IP \(bu +multiple line spacing is not allowed +(use a larger vertical spacing instead); +.IP \(bu +groff ms does not work in compatibility mode (eg with the +.B \-C +option); +.IP \(bu +the error-handling policy of groff ms +is to detect and report errors, +rather than silently to ignore them. +.LP +The groff ms macros make use of many features of GNU troff +and therefore cannot be used with any other troff. +.LP +Bell Labs localisms are not implemented in either the +.SM BSD +ms macros or in the groff ms macros. +.LP +Some Unix ms documentation says that the +.B CW +and +.B GW +number registers can be used to control the column width and +gutter width respectively. +This is not the case. +These number registers are not used in groff ms. +.LP +Macros that cause a reset set the indent. +Macros that change the indent do not increment or decrement +the indent, but rather set it absolutely. +This can cause problems for documents that define +additional macros of their own. +The solution is to use not the +.B in +request but instead the +.B RS +and +.B RE +macros. +.LP +The number register +.B GS +is set to 1 by the groff ms macros, +but is not used by the Unix ms macros. +It is intended that documents that need to determine whether +they are being formatted with Unix ms or groff ms make use of this +number register. +.LP +Footnotes are implemented so that they can safely be used within +keeps and displays. +Automatically numbered footnotes within floating keeps are +not recommended. +It is safe to have another +.B \e** +between a +.B \e** +and the corresponding +.BR .FS ; +it is required only that each +.B .FS +occur after the corresponding +.B \e** +and that the occurrences of +.B .FS +are in the same order as the corresponding occurrences of +.BR \e** . +.LP +The strings +.B \e*{ +and +.B \e*} +can be used to begin and end a superscript. +.LP +Some Unix V10 ms features are implemented. +The +.BR B , +.BR I +and +.B BI +macros can have an optional third argument which will be printed +in the current font before the first argument. +There is a macro +.B CW +like +.B B +that changes to a constant-width font. +.LP +The following strings can be redefined to adapt the groff ms macros +to languages other than English: +.LP +.nf +.ta \w'REFERENCES'u+2n +String Default Value +.sp .3v +REFERENCES References +ABSTRACT ABSTRACT +TOC Table of Contents +MONTH1 January +MONTH2 February +MONTH3 March +MONTH4 April +MONTH5 May +MONTH6 June +MONTH7 July +MONTH8 August +MONTH9 September +MONTH10 October +MONTH11 November +MONTH12 December +.fi +.LP +The font family is reset from the string +.BR FAM ; +at initialization if this string is undefined it is set to the current +font family. +The point size, vertical spacing, and inter-paragraph spacing for footnotes +are taken from the number registers +.BR FPS , +.BR FVS , +and +.BR FPD ; +at initialization these are set to +.BR \en(PS-2 , +.BR \en[FPS]+2 , +and +.B \en(PD/2 +respectively; however, if any of these registers has been defined +before initialization, it will not be set. +The hyphenation flags (as set by the +.B .hy +request) are set from the +.B HY +register; +if this has not been defined at initialization, +it will be set to 14. +.LP +Right-aligned displays are available with +.B ".DS R" +and +.BR .RD . +.LP +The following conventions are used for names of macros, strings and +number registers. +External names available to documents that use the groff ms +macros contain only uppercase letters and digits. +Internally the macros are divided into modules. +Names used only within one module are of the form +.IB module * name\fR. +Names used outside the module in which they are defined are of the form +.IB module @ name\fR. +Names associated with a particular environment are of the form +.IB environment : name; +these are used only within the +.B par +module, +and +.I name +does not have a module prefix. +Constructed names used to implement arrays are of the form +.IB array ! index\fR. +Thus the groff ms macros reserve the following names: +.IP \(bu +names containing +.BR * ; +.IP \(bu +names containing +.BR @ ; +.IP \(bu +names containing +.BR : ; +.IP \(bu +names containing only uppercase letters and digits. +.SH FILES +.B @MACRODIR@/tmac.@TMAC_S_PREFIX@s +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@tbl (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), +.BR @g@eqn (@MAN1EXT@) +.br +.BR ms (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/tmac/groff_ms.man b/gnu/usr.bin/groff/tmac/groff_ms.man deleted file mode 100644 index 0e1f64c741f..00000000000 --- a/gnu/usr.bin/groff/tmac/groff_ms.man +++ /dev/null @@ -1,235 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_ms \- groff ms macros -.SH SYNOPSIS -.B groff -.B \-m@TMAC_S_PREFIX@s -[ -.IR options .\|.\|. -] -[ -.IR files .\|.\|. -] -.SH DESCRIPTION -This manual page describes the GNU version of the ms macros, -which is part of the groff document formatting system. -The groff ms macros are intended to be compatible with the -documented behaviour of the 4.3 -.SM BSD -Unix ms macros subject to the following limitations: -.IP \(bu -the internals of groff ms are not similar to the internals of Unix ms -and so documents that depend upon implementation details of Unix ms -may well not work with groff ms; -.IP \(bu -there is no support for typewriter-like devices; -.IP \(bu -Berkeley localisms, in particular the -.B TM -and -.B CT -macros, are not implemented; -.IP \(bu -groff ms -does not provide cut marks; -.IP \(bu -multiple line spacing is not allowed -(use a larger vertical spacing instead); -.IP \(bu -groff ms does not work in compatibility mode (eg with the -.B \-C -option); -.IP \(bu -the error-handling policy of groff ms -is to detect and report errors, -rather than silently to ignore them. -.LP -The groff ms macros make use of many features of GNU troff -and therefore cannot be used with any other troff. -.LP -Bell Labs localisms are not implemented in either the -.SM BSD -ms macros or in the groff ms macros. -.LP -Some Unix ms documentation says that the -.B CW -and -.B GW -number registers can be used to control the column width and -gutter width respectively. -This is not the case. -These number registers are not used in groff ms. -.LP -Macros that cause a reset set the indent. -Macros that change the indent do not increment or decrement -the indent, but rather set it absolutely. -This can cause problems for documents that define -additional macros of their own. -The solution is to use not the -.B in -request but instead the -.B RS -and -.B RE -macros. -.LP -The number register -.B GS -is set to 1 by the groff ms macros, -but is not used by the Unix ms macros. -It is intended that documents that need to determine whether -they are being formatted with Unix ms or groff ms make use of this -number register. -.LP -Footnotes are implemented so that they can safely be used within -keeps and displays. -Automatically numbered footnotes within floating keeps are -not recommended. -It is safe to have another -.B \e** -between a -.B \e** -and the corresponding -.BR .FS ; -it is required only that each -.B .FS -occur after the corresponding -.B \e** -and that the occurrences of -.B .FS -are in the same order as the corresponding occurrences of -.BR \e** . -.LP -The strings -.B \e*{ -and -.B \e*} -can be used to begin and end a superscript. -.LP -Some Unix V10 ms features are implemented. -The -.BR B , -.BR I -and -.B BI -macros can have an optional third argument which will be printed -in the current font before the first argument. -There is a macro -.B CW -like -.B B -that changes to a constant-width font. -.LP -The following strings can be redefined to adapt the groff ms macros -to languages other than English: -.LP -.nf -.ta \w'REFERENCES'u+2n -String Default Value -.sp .3v -REFERENCES References -ABSTRACT ABSTRACT -TOC Table of Contents -MONTH1 January -MONTH2 February -MONTH3 March -MONTH4 April -MONTH5 May -MONTH6 June -MONTH7 July -MONTH8 August -MONTH9 September -MONTH10 October -MONTH11 November -MONTH12 December -.fi -.LP -The font family is reset from the string -.BR FAM ; -at initialization if this string is undefined it is set to the current -font family. -The point size, vertical spacing, and inter-paragraph spacing for footnotes -are taken from the number registers -.BR FPS , -.BR FVS , -and -.BR FPD ; -at initialization these are set to -.BR \en(PS-2 , -.BR \en[FPS]+2 , -and -.B \en(PD/2 -respectively; however, if any of these registers has been defined -before initialization, it will not be set. -The hyphenation flags (as set by the -.B .hy -request) are set from the -.B HY -register; -if this has not been defined at initialization, -it will be set to 14. -.LP -Right-aligned displays are available with -.B ".DS R" -and -.BR .RD . -.LP -The following conventions are used for names of macros, strings and -number registers. -External names available to documents that use the groff ms -macros contain only uppercase letters and digits. -Internally the macros are divided into modules. -Names used only within one module are of the form -.IB module * name\fR. -Names used outside the module in which they are defined are of the form -.IB module @ name\fR. -Names associated with a particular environment are of the form -.IB environment : name; -these are used only within the -.B par -module, -and -.I name -does not have a module prefix. -Constructed names used to implement arrays are of the form -.IB array ! index\fR. -Thus the groff ms macros reserve the following names: -.IP \(bu -names containing -.BR * ; -.IP \(bu -names containing -.BR @ ; -.IP \(bu -names containing -.BR : ; -.IP \(bu -names containing only uppercase letters and digits. -.SH FILES -.B @MACRODIR@/tmac.@TMAC_S_PREFIX@s -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@tbl (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@), -.BR @g@eqn (@MAN1EXT@) -.br -.BR ms (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/tmac/groff_msafer.7_in b/gnu/usr.bin/groff/tmac/groff_msafer.7_in new file mode 100644 index 00000000000..0e0de775b63 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_msafer.7_in @@ -0,0 +1,59 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH GROFF_MSAFER @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_msafer \- groff -msafer macros +.SH SYNOPSIS +.B groff +.B \-msafer +[ +.IR options .\|.\|. +] +[ +.IR files .\|.\|. +] +.SH DESCRIPTION +The -msafer macros remove the +.BR open , +.BR opena , +.BR pso , +.BR sy , +and +.B pi +requests. +These macros should be used when processing input from +an untrustworthy source. +For maximum safety, +they should be the first -m option on the command-line. +Normally they are invoked using the +.B \-S +option of groff, which will also pass +.B @g@pic +the +.B \-S +flag. +This is now the default; to get the old behaviour, use the +.B \-U +flag. +.SH FILES +.B @MACRODIR@/tmac.safer +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/tmac/groff_msafer.man b/gnu/usr.bin/groff/tmac/groff_msafer.man deleted file mode 100644 index 0e0de775b63..00000000000 --- a/gnu/usr.bin/groff/tmac/groff_msafer.man +++ /dev/null @@ -1,59 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1999 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH GROFF_MSAFER @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_msafer \- groff -msafer macros -.SH SYNOPSIS -.B groff -.B \-msafer -[ -.IR options .\|.\|. -] -[ -.IR files .\|.\|. -] -.SH DESCRIPTION -The -msafer macros remove the -.BR open , -.BR opena , -.BR pso , -.BR sy , -and -.B pi -requests. -These macros should be used when processing input from -an untrustworthy source. -For maximum safety, -they should be the first -m option on the command-line. -Normally they are invoked using the -.B \-S -option of groff, which will also pass -.B @g@pic -the -.B \-S -flag. -This is now the default; to get the old behaviour, use the -.B \-U -flag. -.SH FILES -.B @MACRODIR@/tmac.safer -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/tmac/me.man b/gnu/usr.bin/groff/tmac/me.man deleted file mode 100644 index 49196212391..00000000000 --- a/gnu/usr.bin/groff/tmac/me.man +++ /dev/null @@ -1,274 +0,0 @@ -.\" Copyright (c) 1980 The Regents of the University of California. -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms are permitted -.\" provided that the above copyright notice and this paragraph are -.\" duplicated in all such forms and that any documentation, -.\" advertising materials, and other materials related to such -.\" distribution and use acknowledge that the software was developed -.\" by the University of California, Berkeley. The name of the -.\" University may not be used to endorse or promote products derived -.\" from this software without specific prior written permission. -.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" @(#)me.7 6.4 (Berkeley) 4/13/90 -.\" -.\" Modified for groff by jjc@jclark.com -.hc % -.TH GROFF_ME @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.UC 3 -.SH NAME -groff_me \- troff macros for formatting papers -.SH SYNOPSIS -.B "groff \-me" -[ options ] -file ... -.br -.B "troff \-me" -[ options ] -file ... -.SH DESCRIPTION -This manual page describes the GNU version of the \-me macros, -which is part of the groff document formatting system. -This version can be used with both GNU troff and Unix troff. -This package of -.I troff -macro definitions provides a canned formatting -facility for tech%nical papers in various formats. -.PP -The macro requests are defined below. -Many -.I troff -requests are unsafe in conjunction with -this package, however, these requests may be used with -impunity after the first .pp: -.nf -.IP -.ta \w'.sz +n 'u -\&.bp begin new page -\&.br break output line here -\&.sp n insert n spacing lines -\&.ls n (line spacing) n=1 single, n=2 double space -\&.na no alignment of right margin -\&.ce n center next n lines -\&.ul n underline next n lines -.fi -.PP -Output of the -.I pic, -.I eqn, -.I refer, -and -.I tbl -preprocessors -is acceptable as input. -.SH FILES -@MACRODIR@/tmac.e -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@) -.br -\-me Reference Manual, Eric P. Allman -.br -Writing Papers with Groff Using \-me -.tr &. -.SH REQUESTS -This list is incomplete; -see -.I "The \-me Reference Manual" -for interesting details. -.PP -.ta \w'.eh \'x\'y\'z\' 'u +\w'Initial 'u +\w'Cause 'u -.br -.di x - \ka -.br -.di -.in \nau -.ti 0 -Request Initial Cause Explanation -.ti 0 - Value Break -.br -.in \nau -.ti 0 -\&.(c - yes Begin centered block -.ti 0 -\&.(d - no Begin delayed text -.ti 0 -\&.(f - no Begin footnote -.ti 0 -\&.(l - yes Begin list -.ti 0 -\&.(q - yes Begin major quote -.ti 0 -\&.(x \fIx\fR - no Begin indexed item in index -.I x -.ti 0 -\&.(z - no Begin floating keep -.ti 0 -\&.)c - yes End centered block -.ti 0 -\&.)d - yes End delayed text -.ti 0 -\&.)f - yes End footnote -.ti 0 -\&.)l - yes End list -.ti 0 -\&.)q - yes End major quote -.ti 0 -\&.)x - yes End index item -.ti 0 -\&.)z - yes End floating keep -.ti 0 -\&.++ \fIm H\fR - no Define paper section. -.I m -defines the part of the paper, and can be -.B C -(chapter), -.B A -(appendix), -.B P -(preliminary, e.g., abstract, table of contents, etc.), -.B B -(bibliography), -.B RC -(chapters renumbered from page one each chapter), -or -.B RA -(appendix renumbered from page one). -.ti 0 -\&.+c \fIT\fR - yes Begin chapter (or appendix, etc., as -set by .++). -.I T -is the chapter title. -.ti 0 -\&.1c 1 yes One column format on a new page. -.ti 0 -\&.2c 1 yes Two column format. -.ti 0 -\&.EN - yes Space after equation -produced by -.I eqn -or -.IR neqn . -.ti 0 -\&.EQ \fIx y\fR - yes Precede equation; break out and -add space. -Equation number is -.IR y . -The optional argument \fIx\fR -may be -.I I -to indent equation (default), -.I L -to left-adjust the equation, or -.I C -to center the equation. -.ti 0 -\&.GE - yes End \fIgremlin\fP picture. -.ti 0 -\&.GS - yes Begin \fIgremlin\fP picture. -.ti 0 -\&.PE - yes End \fIpic\fP picture. -.ti 0 -\&.PS - yes Begin \fIpic\fP picture. -.ti 0 -\&.TE - yes End table. -.ti 0 -\&.TH - yes End heading section of table. -.ti 0 -\&.TS \fIx\fR - yes Begin table; if \fIx\fR is -.I H -table has repeated heading. -.ti 0 -\&.b \fIx\fR no no Print -.I x -in boldface; if no argument switch to boldface. -.ti 0 -\&.ba \fI+n\fR 0 yes Augments the base indent by -.I n. -This indent is used to set the indent on regular text -(like paragraphs). -.ti 0 -\&.bc no yes Begin new column -.ti 0 -\&.bi \fIx\fR no no Print -.I x -in bold italics (nofill only) -.ti 0 -\&.bu - yes Begin bulleted paragraph -.ti 0 -\&.bx \fIx\fR no no Print \fIx\fR in a box (nofill only). -.ti 0 -\&.ef \fI\'x\'y\'z\'\fR \'\'\'\' no Set even footer to x y z -.ti 0 -\&.eh \fI\'x\'y\'z\'\fR \'\'\'\' no Set even header to x y z -.ti 0 -\&.fo \fI\'x\'y\'z\'\fR \'\'\'\' no Set footer to x y z -.ti 0 -\&.hx - no Suppress headers and footers on next page. -.ti 0 -\&.he \fI\'x\'y\'z\'\fR \'\'\'\' no Set header to x y z -.ti 0 -\&.hl - yes Draw a horizontal line -.ti 0 -\&.i \fIx\fR no no Italicize -.I x; -if -.I x -missing, italic text follows. -.ti 0 -\&.ip \fIx y\fR no yes Start indented paragraph, -with hanging tag -.IR x . -Indentation is -.I y -ens (default 5). -.ti 0 -\&.lp yes yes Start left-blocked paragraph. -.ti 0 -\&.np 1 yes Start numbered paragraph. -.ti 0 -\&.of \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd footer to x y z -.ti 0 -\&.oh \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd header to x y z -.ti 0 -\&.pd - yes Print delayed text. -.ti 0 -\&.pp no yes Begin paragraph. -First line indented. -.ti 0 -\&.r yes no Roman text follows. -.ti 0 -\&.re - no Reset tabs to default values. -.ti 0 -\&.sh \fIn x\fR - yes Section head follows, -font automatically bold. -.I n -is level of section, -.I x -is title of section. -.ti 0 -\&.sk no no Leave the next page blank. -Only one page is remembered ahead. -.ti 0 -\&.sm \fIx\fR - no Set -.I x -in a smaller pointsize. -.ti 0 -\&.sz \fI+n\fR 10p no Augment the point size by -.I n -points. -.ti 0 -\&.tp no yes Begin title page. -.ti 0 -\&.u \fIx\fR - no Underline argument (even in \fItroff\fR). -(Nofill only). -.ti 0 -\&.uh - yes Like .sh but unnumbered. -.ti 0 -\&.xp \fIx\fR - no Print index -.I x. diff --git a/gnu/usr.bin/groff/tmac/msafer.man b/gnu/usr.bin/groff/tmac/msafer.man deleted file mode 100644 index 05712855652..00000000000 --- a/gnu/usr.bin/groff/tmac/msafer.man +++ /dev/null @@ -1,56 +0,0 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. -.. -.TH MSAFER @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -msafer \- groff -msafer macros -.SH SYNOPSIS -.B groff -.B \-msafer -[ -.IR options .\|.\|. -] -[ -.IR files .\|.\|. -] -.SH DESCRIPTION -The -msafer macros remove the -.BR open , -.BR opena , -.BR pso , -.B sy -and -.B pi -requests. -These macros should be used when processing input from -an untrustworthy source. -For maximum safety, -they should be the first -m option on the command-line. -Normally they are invoked using the -.B \-S -option of groff, which will also pass -.B @g@pic -the -.B \-S -flag. -.SH FILES -.B @MACRODIR@/tmac.safer -.SH "SEE ALSO" -.BR groff (@MAN1EXT@), -.BR @g@troff (@MAN1EXT@), -.BR @g@pic (@MAN1EXT@) diff --git a/gnu/usr.bin/groff/tmac/tmac.e b/gnu/usr.bin/groff/tmac/tmac.e index a472560979c..3a4eb86a999 100644 --- a/gnu/usr.bin/groff/tmac/tmac.e +++ b/gnu/usr.bin/groff/tmac/tmac.e @@ -1519,8 +1519,10 @@ in \\f2\\*([B\\f1, \c .if \n(dw=5 .ds dw Thursday .if \n(dw=6 .ds dw Friday .if \n(dw=7 .ds dw Saturday -.nr *year \n(yr+1900 -.ds td \*(mo \n(dy, \n[*year] +.nr y2 \n(yr%100 +.af y2 00 +.nr y4 \n(yr+1900 +.ds td \*(mo \n(dy, \n(y4 .\" *** PARAMETRIC INITIALIZATIONS *** .rr x .nr $v \n(.v00+\n(.sp-1/\n(.sp \" vs as percentage of ps for .sz request diff --git a/gnu/usr.bin/groff/troff/Makefile.sub b/gnu/usr.bin/groff/troff/Makefile.sub index dc67031fee2..28b5dd18eb2 100644 --- a/gnu/usr.bin/groff/troff/Makefile.sub +++ b/gnu/usr.bin/groff/troff/Makefile.sub @@ -1,5 +1,5 @@ PROG=troff -MAN1=troff.n +MAN1=troff.1 XLIBS=$(LIBGROFF) MLIB=$(LIBM) OBJS=env.o node.o input.o div.o symbol.o dictionary.o reg.o \ diff --git a/gnu/usr.bin/groff/troff/troff.1_in b/gnu/usr.bin/groff/troff/troff.1_in new file mode 100644 index 00000000000..c3249672129 --- /dev/null +++ b/gnu/usr.bin/groff/troff/troff.1_in @@ -0,0 +1,2063 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1999 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" define a string tx for the TeX logo +.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X +.el .ds tx TeX +.de TQ +.br +.ns +.TP \\$1 +.. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.\" The BSD man macros can't handle " in arguments to font change macros, +.\" so use \(ts instead of ". +.tr \(ts" +.TH @G@TROFF 1 "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@troff \- format documents +.SH SYNOPSIS +.nr a \n(.j +.ad l +.nr i \n(.i +.in +\w'\fB@g@troff 'u +.ti \niu +.B @g@troff +.de OP +.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +.el .RB "[\ " "\\$1" "\ ]" +.. +.OP \-abivzCERU +.OP \-w name +.OP \-W name +.OP \-d cs +.OP \-f fam +.OP \-m name +.OP \-n num +.OP \-o list +.OP \-r cn +.OP \-T name +.OP \-F dir +.OP \-M dir +.RI "[\ " files\|.\|.\|. "\ ]" +.br +.ad \na +.SH DESCRIPTION +This manual page describes the GNU version of +.BR troff , +which is part of the groff document formatting system. +It is highly compatible with Unix troff. +Usually it should be invoked using the groff command, which will +also run preprocessors and postprocessors in the appropriate +order and with the appropriate options. +.SH OPTIONS +.TP \w'\-dname=s'u+2n +.B \-a +Generate an +.SM ASCII +approximation of the typeset output. +.TP +.B \-b +Print a backtrace with each warning or error message. This backtrace +should help track down the cause of the error. The line numbers given +in the backtrace may not always be correct: +.B troff 's +idea of line numbers +gets confused by +.B as +or +.B am +requests. +.TP +.B \-i +Read the standard input after all the named input files have been +processed. +.TP +.B \-v +Print the version number. +.TP +.BI \-w name +Enable warning +.IR name . +Available warnings are described in +the Warnings subsection below. +Multiple +.B \-w +options are allowed. +.TP +.BI \-W name +Inhibit warning +.IR name . +Multiple +.B \-W +options are allowed. +.TP +.B \-E +Inhibit all error messages. +.TP +.B \-z +Suppress formatted output. +.TP +.B \-C +Enable compatibility mode. +.TP +.BI \-d cs +.TQ +.BI \-d name = s +Define +.I c +or +.I name +to be a string +.IR s ; +.I c +must be a one letter name. +.TP +.BI \-f fam +Use +.I fam +as the default font family. +.TP +.BI \-m name +Read in the file +.BI tmac. name\fR. +Normally this will be searched for in @MACRODIR@. +By default is used the +.I safer +macro (reverted using -U ). +.TP +.B \-U +Unsafe option, avoids default use of +.I safer +macro. +.TP +.B \-R +Don't load +.BR troffrc . +.TP +.BI \-n num +Number the first page +.IR num . +.TP +.BI \-o list +Output only pages in +.IR list , +which is a comma-separated list of page ranges; +.I n +means print page +.IR n , +.IB m \- n +means print every page between +.I m +and +.IR n , +.BI \- n +means print every page up to +.IR n , +.IB n \- +means print every page from +.IR n . +.B Troff +will exit after printing the last page in the list. +.TP +.BI \-r cn +.TQ +.BI \-r name = n +Set number register +.I c +or +.I name +to +.IR n ; +.I c +must be a one character name; +.I n +can be any troff numeric expression. +.TP +.BI \-T name +Prepare output for device +.IR name , +rather than the default +.BR @DEVICE@ . +.TP +.BI \-F dir +Search +.I dir +for subdirectories +.BI dev name +.RI ( name +is the name of the device) +for the +.B DESC +file and font files before the normal +.BR @FONTDIR@ . +.TP +.BI \-M dir +Search directory +.I dir +for macro files before the normal +.BR @MACRODIR@ . +.SH USAGE +Only the features not in Unix troff are described here. +.SS Long names +The names of number registers, fonts, strings/macros/diversions, +special characters can be of any length. In escape sequences, where +you can use +.BI ( xx +for a two character name, you can use +.BI [ xxx ] +for a name of arbitrary length: +.TP +.BI \e[ xxx ] +Print the special character called +.IR xxx . +.TP +.BI \ef[ xxx ] +Set font +.IR xxx . +.TP +.BI \e*[ xxx ] +Interpolate string +.IR xxx . +.TP +.BI \en[ xxx ] +Interpolate number register +.IR xxx . +.SS Fractional pointsizes +A +.I +scaled point +is equal to 1/sizescale +points, where +sizescale is specified in the +.B DESC +file (1 by default.) +There is a new scale indicator +.B z +which has the effect of multiplying by sizescale. +Requests and escape sequences in troff +interpret arguments that represent a pointsize as being in units +of scaled points, but they evaluate each such argument +using a default scale indicator of +.BR z . +Arguments treated in this way are +the argument to the +.B ps +request, +the third argument to the +.B cs +request, +the second and fourth arguments to the +.B tkf +request, +the argument to the +.B \eH +escape sequence, +and those variants of the +.B \es +escape sequence that take a numeric expression as their argument. +.LP +For example, suppose sizescale is 1000; +then a scaled point will be equivalent to a millipoint; +the request +.B .ps 10.25 +is equivalent to +.B .ps 10.25z +and so sets the pointsize to 10250 scaled points, +which is equal to 10.25 points. +.LP +The number register +.B \en(.s +returns the pointsize in points as decimal fraction. +There is also a new number register +.B \en[.ps] +that returns the pointsize in scaled points. +.LP +It would make no sense to use the +.B z +scale indicator in a numeric expression +whose default scale indicator was neither +.B u +nor +.BR z , +and so +.B troff +disallows this. +Similarly it would make no sense to use a scaling indicator +other than +.B z +or +.B u +in a numeric expression whose default scale indicator was +.BR z , +and so +.B troff +disallows this as well. +.LP +There is also new scale indicator +.B s +which multiplies by the number of units in a scaled point. +So, for example, +.B \en[.ps]s +is equal to +.BR 1m . +Be sure not to confuse the +.B s +and +.B z +scale indicators. +.SS Numeric expressions +.LP +Spaces are permitted in a number expression within parentheses. +.LP +.B M +indicates a scale of 100ths of an em. +.TP +.IB e1 >? e2 +The maximum of +.I e1 +and +.IR e2 . +.TP +.IB e1 (\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" -.. -.\" The BSD man macros can't handle " in arguments to font change macros, -.\" so use \(ts instead of ". -.tr \(ts" -.TH @G@TROFF 1 "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@troff \- format documents -.SH SYNOPSIS -.nr a \n(.j -.ad l -.nr i \n(.i -.in +\w'\fB@g@troff 'u -.ti \niu -.B @g@troff -.de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" -.. -.OP \-abivzCER -.OP \-w name -.OP \-W name -.OP \-d cs -.OP \-f fam -.OP \-m name -.OP \-n num -.OP \-o list -.OP \-r cn -.OP \-T name -.OP \-F dir -.OP \-M dir -.RI "[\ " files\|.\|.\|. "\ ]" -.br -.ad \na -.SH DESCRIPTION -This manual page describes the GNU version of -.BR troff , -which is part of the groff document formatting system. -It is highly compatible with Unix troff. -Usually it should be invoked using the groff command, which will -also run preprocessors and postprocessors in the appropriate -order and with the appropriate options. -.SH OPTIONS -.TP \w'\-dname=s'u+2n -.B \-a -Generate an -.SM ASCII -approximation of the typeset output. -.TP -.B \-b -Print a backtrace with each warning or error message. This backtrace -should help track down the cause of the error. The line numbers given -in the backtrace may not always correct: troff's idea of line numbers -gets confused by -.B as -or -.B am -requests. -.TP -.B \-i -Read the standard input after all the named input files have been -processed. -.TP -.B \-v -Print the version number. -.TP -.BI \-w name -Enable warning -.IR name . -Available warnings are described in -the Warnings subsection below. -Multiple -.B \-w -options are allowed. -.TP -.BI \-W name -Inhibit warning -.IR name . -Multiple -.B \-W -options are allowed. -.TP -.B \-E -Inhibit all error messages. -.TP -.B \-z -Suppress formatted output. -.TP -.B \-C -Enable compatibility mode. -.TP -.BI \-d cs -.TQ -.BI \-d name = s -Define -.I c -or -.I name -to be a string -.IR s ; -.I c -must be a one letter name. -.TP -.BI \-f fam -Use -.I fam -as the default font family. -.TP -.BI \-m name -Read in the file -.BI tmac. name\fR. -Normally this will be searched for in @MACRODIR@. -.TP -.B \-R -Don't load -.BR troffrc . -.TP -.BI \-n num -Number the first page -.IR num . -.TP -.BI \-o list -Output only pages in -.IR list , -which is a comma-separated list of page ranges; -.I n -means print page -.IR n , -.IB m \- n -means print every page between -.I m -and -.IR n , -.BI \- n -means print every page up to -.IR n , -.IB n \- -means print every page from -.IR n . -.B Troff -will exit after printing the last page in the list. -.TP -.BI \-r cn -.TQ -.BI \-r name = n -Set number register -.I c -or -.I name -to -.IR n ; -.I c -must be a one character name; -.I n -can be any troff numeric expression. -.TP -.BI \-T name -Prepare output for device -.IR name , -rather than the default -.BR @DEVICE@ . -.TP -.BI \-F dir -Search -.I dir -for subdirectories -.BI dev name -.RI ( name -is the name of the device) -for the -.B DESC -file and font files before the normal -.BR @FONTDIR@ . -.TP -.BI \-M dir -Search directory -.I dir -for macro files before the normal -.BR @MACRODIR@ . -.SH USAGE -Only the features not in Unix troff are described here. -.SS Long names -The names of number registers, fonts, strings/macros/diversions, -special characters can be of any length. In escape sequences, where -you can use -.BI ( xx -for a two character name, you can use -.BI [ xxx ] -for a name of arbitrary length: -.TP -.BI \e[ xxx ] -Print the special character called -.IR xxx . -.TP -.BI \ef[ xxx ] -Set font -.IR xxx . -.TP -.BI \e*[ xxx ] -Interpolate string -.IR xxx . -.TP -.BI \en[ xxx ] -Interpolate number register -.IR xxx . -.SS Fractional pointsizes -A -.I -scaled point -is equal to 1/sizescale -points, where -sizescale is specified in the -.B DESC -file (1 by default.) -There is a new scale indicator -.B z -which has the effect of multiplying by sizescale. -Requests and escape sequences in troff -interpret arguments that represent a pointsize as being in units -of scaled points, but they evaluate each such argument -using a default scale indicator of -.BR z . -Arguments treated in this way are -the argument to the -.B ps -request, -the third argument to the -.B cs -request, -the second and fourth arguments to the -.B tkf -request, -the argument to the -.B \eH -escape sequence, -and those variants of the -.B \es -escape sequence that take a numeric expression as their argument. -.LP -For example, suppose sizescale is 1000; -then a scaled point will be equivalent to a millipoint; -the request -.B .ps 10.25 -is equivalent to -.B .ps 10.25z -and so sets the pointsize to 10250 scaled points, -which is equal to 10.25 points. -.LP -The number register -.B \en(.s -returns the pointsize in points as decimal fraction. -There is also a new number register -.B \en[.ps] -that returns the pointsize in scaled points. -.LP -It would make no sense to use the -.B z -scale indicator in a numeric expression -whose default scale indicator was neither -.B u -nor -.BR z , -and so -.B troff -disallows this. -Similarly it would make no sense to use a scaling indicator -other than -.B z -or -.B u -in a numeric expression whose default scale indicator was -.BR z , -and so -.B troff -disallows this as well. -.LP -There is also new scale indicator -.B s -which multiplies by the number of units in a scaled point. -So, for example, -.B \en[.ps]s -is equal to -.BR 1m . -Be sure not to confuse the -.B s -and -.B z -scale indicators. -.SS Numeric expressions -.LP -Spaces are permitted in a number expression within parentheses. -.LP -.B M -indicates a scale of 100ths of an em. -.TP -.IB e1 >? e2 -The maximum of -.I e1 -and -.IR e2 . -.TP -.IB e1 #include #include +#include +#ifndef HAVE_MKSTEMP +#include +#include +#include +#endif #include "DviP.h" /**************************************************************** @@ -186,7 +192,14 @@ static void Initialize(request, new) dw->dvi.native = 0; } -#include +#include "gray1.bm" +#include "gray2.bm" +#include "gray3.bm" +#include "gray4.bm" +#include "gray5.bm" +#include "gray6.bm" +#include "gray7.bm" +#include "gray8.bm" static void Realize (w, valueMask, attrs) @@ -211,16 +224,37 @@ Realize (w, valueMask, attrs) GCForeground|GCCapStyle|GCJoinStyle |GCLineWidth, &values); - dw->dvi.gray = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), - gray_bits, - gray_width, gray_height); + dw->dvi.gray[0] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray1_bits, + gray1_width, gray1_height); + dw->dvi.gray[1] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray2_bits, + gray2_width, gray2_height); + dw->dvi.gray[2] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray3_bits, + gray3_width, gray3_height); + dw->dvi.gray[3] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray4_bits, + gray4_width, gray4_height); + dw->dvi.gray[4] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray5_bits, + gray5_width, gray5_height); + dw->dvi.gray[5] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray6_bits, + gray6_width, gray6_height); + dw->dvi.gray[6] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray7_bits, + gray7_width, gray7_height); + dw->dvi.gray[7] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray8_bits, + gray8_width, gray8_height); values.background = dw->dvi.background; - values.stipple = dw->dvi.gray; + values.stipple = dw->dvi.gray[5]; dw->dvi.fill_GC = XCreateGC (XtDisplay (w), XtWindow (w), GCForeground|GCBackground|GCStipple, &values); - dw->dvi.fill_type = DVI_FILL_BLACK; + dw->dvi.fill_type = 9; if (dw->dvi.file) OpenFile (dw); @@ -235,7 +269,14 @@ Destroy(w) XFreeGC (XtDisplay (w), dw->dvi.normal_GC); XFreeGC (XtDisplay (w), dw->dvi.fill_GC); - XFreePixmap (XtDisplay (w), dw->dvi.gray); + XFreePixmap (XtDisplay (w), dw->dvi.gray[0]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[1]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[2]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[3]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[4]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[5]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[6]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[7]); DestroyFontMap (dw->dvi.font_map); DestroyFileMap (dw->dvi.file_map); device_destroy (dw->dvi.device); @@ -345,13 +386,18 @@ static void OpenFile (dw) DviWidget dw; { char tmpName[sizeof ("/tmp/dviXXXXXX")]; - int fd; + int fd; dw->dvi.tmpFile = 0; if (!dw->dvi.seek) { strcpy (tmpName, "/tmp/dviXXXXXX"); +#ifdef HAVE_MKSTEMP fd = mkstemp (tmpName); - dw->dvi.tmpFile = fdopen (fd, "w+"); +#else /* not HAVE_MKSTEMP */ + mktemp (tmpName); + fd = open (tmpName, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR); +#endif /* not HAVE_MKSTEMP */ + dw->dvi.tmpFile = fdopen (tmpName, "w+"); unlink (tmpName); } dw->dvi.requested_page = 1; diff --git a/gnu/usr.bin/groff/xditview/Imakefile b/gnu/usr.bin/groff/xditview/Imakefile index 4cb2ea9500a..12a2ef5ef08 100644 --- a/gnu/usr.bin/groff/xditview/Imakefile +++ b/gnu/usr.bin/groff/xditview/Imakefile @@ -1,5 +1,4 @@ -GROFF_LIBDIR = /usr/share -GROFF_FONTDIR = $(GROFF_LIBDIR)/groff_font +GROFF_FONTDIR = /usr/share/groff_font GROFF_FONTPATH = .:$(GROFF_FONTDIR):/usr/local/lib/font:/usr/lib/font DPIS = 75 100 @@ -14,7 +13,7 @@ SRCS2 = xtotroff.c XFontName.c DviChar.c OBJS2 = xtotroff.o XFontName.o DviChar.o INCLUDES = -I$(TOOLKITSRC) -I$(TOP) MATHLIB = -lm -DEFINES = $(SIGNAL_DEFINES) -DFONTPATH=\"$(GROFF_FONTPATH)\" # -DX_NOT_STDC_ENV +DEFINES = -DHAVE_MKSTEMP $(SIGNAL_DEFINES) -DFONTPATH=\"$(GROFF_FONTPATH)\" # -DX_NOT_STDC_ENV ComplexProgramTarget_1(gxditview,$(LOCAL_LIBRARIES),$(MATHLIB)) NormalProgramTarget(xtotroff,$(OBJS2),$(DEPXLIB),$(XLIB), /**/) @@ -46,7 +45,10 @@ fonts: xtotroff DESC FontMap $$dir/xtotroff -g -r $$dpi -s 12 $$dir/FontMap); \ done +GXditview-ad.h: GXditview.ad + /bin/sh ad2c GXditview.ad >GXditview-ad.h + extraclean: clean - -rm -f junk tmp grot old + -rm -f junk tmp grot old Makefile FORCE: