From 5add2428204d8d6ff589a9679141d288cf421152 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 13 Nov 2008 17:43:59 +0000 Subject: new support script latex2man git-svn-id: svn://tug.org/texlive/trunk@11289 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/support/latex2man/CHANGES | 106 ++ Master/texmf-dist/doc/support/latex2man/INSTALL | 49 + Master/texmf-dist/doc/support/latex2man/Makefile | 216 ++++ Master/texmf-dist/doc/support/latex2man/README | 34 + .../doc/support/latex2man/THIS-IS-VERSION-1.23 | 1 + .../texmf-dist/doc/support/latex2man/latex2man.1 | 1100 +++++++++++++++++++ .../doc/support/latex2man/latex2man.html | 1160 ++++++++++++++++++++ .../texmf-dist/doc/support/latex2man/latex2man.pdf | Bin 0 -> 206853 bytes .../texmf-dist/doc/support/latex2man/latex2man.tex | 758 +++++++++++++ .../doc/support/latex2man/latex2man.texi | 1005 +++++++++++++++++ .../doc/support/latex2man/latex2man.trans | 67 ++ .../texmf-dist/doc/support/latex2man/latex2man.txt | 758 +++++++++++++ 12 files changed, 5254 insertions(+) create mode 100644 Master/texmf-dist/doc/support/latex2man/CHANGES create mode 100644 Master/texmf-dist/doc/support/latex2man/INSTALL create mode 100644 Master/texmf-dist/doc/support/latex2man/Makefile create mode 100644 Master/texmf-dist/doc/support/latex2man/README create mode 100644 Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.23 create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.1 create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.html create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.pdf create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.tex create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.texi create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.trans create mode 100644 Master/texmf-dist/doc/support/latex2man/latex2man.txt (limited to 'Master/texmf-dist/doc/support') diff --git a/Master/texmf-dist/doc/support/latex2man/CHANGES b/Master/texmf-dist/doc/support/latex2man/CHANGES new file mode 100644 index 00000000000..d7a166dcfda --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/CHANGES @@ -0,0 +1,106 @@ + + Change history of the latex2man package + ======================================= + +$Id: CHANGES,v 1.60 2008/11/11 07:18:18 vollmer Exp $ +1.23 11 Nov 2008 - use /usr/bin/env to locate the perl interpreter + Thanks to "J.R. Mauro" +1.22 05 Dec 2007 - Fixed TROFF code generation if none of -H -T -M -L + is given. +1.21 05 Jul 2007 - Fixed Makefile +1.20 24 Apr 2007 - Added optional parameter to Table-environment + - Fixed generataion of tbl-tables. +1.19 12 Sep 2005 - Thanks to Aleksey Nogin for + his bugfix of the problem he found: + "I came across another issue in the latest + latex2man - if the source file has "\verb+.foo+" in + it, then the ".foo" will be copied to the man page + verbatim and if it happens to be placed on the + beginning of a line, then troff will consider it to + be a command and not display it properly." +1.18 20 July 2005 - latex2man.sty: Removed option pdf. +1.17 14 Oct 2004 - Fixed order of gerating & for HTML + (Thanks to Aleksey Nogin ) +1.16 06 Sep 2004 - Fixed handling of % in \verb+..+ and verbatim + environments + (Thanks to Aleksey Nogin ) + - added \subsubsection +1.15 12 Dec 2001 - added extra stuff in the headline of man pages + (thanks to Andrew Anderson ) +1.14 18 June 2001 - TROFF generation: fixed handling of leading . and ' + - removed macro \Dot +1.13 08 May 2001 - Added \begin{center} / \end{center}. + - Reimplemented font changing stuff in TROFF + generation (use now troff instead of -man commands). +1.12.3 10 Apr 2001 - Fixed \oOptArg in man output. +1.12.2 12 Mar 2001 - Fixed handling of conditional translation to LaTeX + (if in a IF .. ELSE .. END-IF, the condition + evaluates to true, the ELSE and END-IF are written + to the result file, but not the IF... + Now all %@% directives are written.) +1.12.1 13 Sep 2000 - In \setDate and \setVersion a ~ is replaced by the + output specific blank. +1.12 28 Aug 2000 - Fixed error in htmlVerb (thanks to + Glunz Wolfgang ) + - Fixed error in conditional text handling: + (%@%ELSE%@% was not handled correct). +1.11 25 Aug 2000 - Fixed error in conditional text handling: + (MAN was not enabled by default, when calling + with -M). + - Added eror message, if arguments of \begin{Name}, + \section, and \subsection are not contained on a + single line. +1.10.1 21 Aug 2000 - Better handling of \Tilde. +1.10 13 Jun 2000 - added \Begin{Description}[label] (based on an idea of + Andi Winter ) + - Thanks to Andi Winter : + - fixed: removed wrong line break in date for + TROFF output + - fixed wrong line breaks in some TROFF macros + - fixed wrong output of optional arguments in TROFF + - allow spaces between `\item' and following `[' +1.9.1 20 Mar 2000 - added \OptoArg \oOptoArg Option with optional + argument (Thanks to Andi Winter ) +1.9 13 Mar 2000 - latex2man.sty: Added option pdf. + latex2man: define names HTML TEXI MAN LATEX + automatically. +1.8 11 Feb 2000 - Added verbatim environment (many thanks to + "Olaf Maibaum" + who provided me the troff generation code) + - Added better handling of german Umlaut + - Fixed minor HTML tag mismatch. +1.7.1 17 Nov 1999 - Fixed END_IF handling of -L option. +1.7 25 July 1999 - Allow german Umlaute to be written as \"a, etc. +1.6.4 30 May 1999 - Added fix of Frank.Schilder@Mathematik.TU-Ilmenau.DE + line 418: from + if ($manRS == 0 && $list_nest > 0) { + to + if ($manRS == 0 && $list_nest > 1) { + line 471: from + + # manParagraph; + to + manParagraph; +1.6.3 25 Mar 1999 - Added \, Math stuff is matched now after macro + arguments +1.6.2 21 Nov 1998 - Added \LBr / \RBr, added \setlength{}{} and \itemsep + \Dollar $\ge$, $\le$, $\leftarrow$, $\Leftarrow$, + $\rightarrow$, $\Rightarrow$. +1.6.1 14 Sep 1998 - Added $<=$, $>=$, $=$ $<>$. +1.6 08 Sep 1998 - Added \SP macro. + - Hyphenation \- is translated for TexInfo into @-. + - Runs now under older Versions of Perl (e.g. 5.03). +1.5 22 Aug 1998 - Support for the fanyhdr package, added latex2man.cfg + - Now \% and \- work. +1.4 23 July 1998 - Fixed typos. + - Fixed generated HTML + The following is wrong: .... + Correct is: ... +1.3 03 June 1998 - Add conditional text feature +1.2 18 Jan 1998 - Enumerate/itemize/description environments may + be nested now. + - Output specific line break macros. +1.1 14 Jan 1998 - Fixed bug in HTML generation (no blanks emited + after \hline) +1.0 11 Jan 1998 - Initial version + diff --git a/Master/texmf-dist/doc/support/latex2man/INSTALL b/Master/texmf-dist/doc/support/latex2man/INSTALL new file mode 100644 index 00000000000..f87b88d66f7 --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/INSTALL @@ -0,0 +1,49 @@ +How to install latex2man: + +Requirements: + - Latex2man requires Perl version >= 5.0004_03. + - LaTeX2e + - If you want to install the system with the distributed Makefile, you need + GNU-make. If you don't have it, you should execute the steps shown + in the Makefile manually. + +Installation: + - Edit the Makefile and set + BIN_DIR = $(HOME)/bin + MAN_DIR = $(HOME)/man + HTML_DIR = $(HOME)/public_html + INFO_DIR = $(HOME)/info + TEX_DIR = $(HOME)/tex/inputs + CFG_DIR = $(HOME)/tex/inputs + to your needs + - If you do not have pdflatex installed, remove in the "all" goal, + the sub goal "$(BASE).pdf". + - Edit latex2man and set in the first line + #!/usr/local/bin/perl + to the correct path + - make install + +That's it. + +The following files should be part of this package: + latex2man/latex2man + latex2man/latex2man.tex + latex2man/latex2man.cfg + latex2man/latex2man.sty + latex2man/latex2man.trans + latex2man/latex2man.1 + latex2man/latex2man.txt + latex2man/latex2man.html + latex2man/latex2man.texi + latex2man/latex2man.info + latex2man/latex2man.pdf + latex2man/Makefile + latex2man/README + latex2man/INSTALL + latex2man/CHANGES + latex2man/THIS-IS-VERSION-x.y + +Juergen + +$Id: INSTALL,v 1.7 2000/03/13 10:25:48 vollmer Entwurf $ + diff --git a/Master/texmf-dist/doc/support/latex2man/Makefile b/Master/texmf-dist/doc/support/latex2man/Makefile new file mode 100644 index 00000000000..f40f285f32b --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/Makefile @@ -0,0 +1,216 @@ +# Project: Documentation Tools +# Descr: Latex --> MAN-page (groff -man), Makefile +# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de +# $Id: Makefile,v 1.106 2008/11/11 07:17:29 vollmer Exp $ + +BASE = latex2man + +#-------- user configuration section +BIN_DIR = $(HOME)/bin +MAN_DIR = $(HOME)/man +HTML_DIR = $(HOME)/public_html +INFO_DIR = $(HOME)/info +TEX_DIR = $(HOME)/tex/inputs +CFG_DIR = $(HOME)/tex/inputs +#-------- end of user configuration section + +DATE = `date +%Y-%m-%d` +DATE2 = `date +%Y/%m/%d` +TAR_BAK = $(BASE)-$(DATE)-backup.tar.gz +TAR_SRC = $(BASE)-$(DATE)-source.tar.gz +TAR_DIST = $(BASE)-$(VERSION).tar.gz +EX = --exclude "*.o" --exclude core --exclude "*.tar.gz" --exclude "*~" \ + --exclude "*.a" --exclude "*.php" +EXrcs = $(EX) --exclude "*/RCS/*" --exclude "*/RCS" + +VERSION = 1.23 +V_DATE = 2008/11/11 +latex2man = ./latex2man + +D = $ + +HOMEPAGE = $(HOME)/Privat/informatik-vollmer/software + +.PHONY: all clean realclean diff backup src-tar +#.SUFFIXES: .tex .html .ps .info .texi .txt + +all: $(BASE).1 $(BASE).html $(BASE).texi $(BASE).info $(BASE).txt \ + $(BASE).pdf + $(MAKE) clean + +%.ps: %.tex + latex $*.tex + latex $*.tex + dvips -o $*.ps $*.dvi + +%.pdf: %.tex + rm -f /tmp/$*.tex /tmp/$*.pdf /tmp/$*.aux /tmp/$*.toc /tmp/$*.log /tmp/$*.sty + (cp $*.tex $*.sty /tmp && \ + cd /tmp && \ + pdflatex $*.tex && \ + pdflatex $*.tex); + mv /tmp/$*.pdf . + +%.info: %.texi + makeinfo $*.texi + +%.txt: %.1 + groff -t -man -Tlatin1 $*.1 | \ + sed -e 's/.//g' \ + -e 's/7|//g' \ + -e 's/[6-9]//g' \ + -e 's///g' \ + -e 's/­$$/- /' > $*.txt + +%.1: %.tex + $(latex2man) -M $*.tex $*.1 + +%.html: %.tex + $(latex2man) -H $*.tex $*.html + +%.texi: %.tex + $(latex2man) -T $*.tex $*.texi + +CHANGES.html: CHANGES + sed -e's/&/\&/g' -e's/>/\>/g' -e's/ CHANGES.html + +$(BASE).php: $(BASE).php.src Makefile CHANGES.html + sed < $(BASE).php.src \ + -e "s|@VERSION@|$(VERSION)|g" \ + -e "s|@DATE@|$(V_DATE)|g" \ + -e "/@CHANGELOG@/r CHANGES.html" \ + -e "/^@.*@$$/d" \ + -e "s|$(BASE).src|$(BASE)|g" \ + -e "s|$(D)\(Id: $(BASE),v .*\) $(D)|\1|g" |\ + sed -e "/$(D)Id: CHANGES,v/d" \ + > $(BASE).php + rm -f CHANGES.html + +latex2man-html.php: latex2man.html Makefile + @ (echo ''; \ + sed < latex2man.html \ + -e "1,//d" \ + -e "s/ align=center//g" \ + -e "/<\/body>/d" \ + -e "/<\/html>/d"; \ + echo ''; \ + ) > latex2man-html.php + +latex2man-text.php: latex2man.txt Makefile + @ (echo ''; \ + echo '

LaTeX2MAN
plain text / UNIX-man

'; \ + echo ''; \ + cat latex2man.txt | \ + sed -e's/&/\&/g' -e's/>/\>/g' -e's/'; \ + echo ''; \ + ) > latex2man-text.php + +homepage: latex2man.pdf latex2man.txt latex2man.php latex2man-html.php \ + latex2man-text.php latex2man.info + cp -fp $(TAR_DIST) latex2man.pdf latex2man*.php latex2man.info $(HOMEPAGE) + cp -fp CHANGES $(HOMEPAGE)/latex2man-CHANGES + rm -f *.php + +install: realclean all + @echo + @if [ ! -f $(INFO_DIR)/dir ]; \ + then \ + (echo ; \ + echo ""; \ + echo "File: dir Node: Top This is the top of the INFO tree"; \ + echo "* Menu: " ) \ + > $(INFO_DIR)/dir ; \ + fi + cp -f $(BASE) $(BIN_DIR) + cp -f $(BASE).sty $(TEX_DIR) + cp -f $(BASE).cfg $(CFG_DIR) + cp -f $(BASE).1 $(MAN_DIR)/man1 + cp -f $(BASE).html $(HTML_DIR) + cp -f $(BASE).info $(INFO_DIR) + install-info $(BASE).info $(INFO_DIR)/dir + $(MAKE) clean + +uninstall: + rm -f $(BIN_DIR)/$(BASE) + rm -f $(TEX_DIR)/$(BASE).sty + rm -f $(CFG_DIR)/$(BASE).cfg + rm -f $(MAN_DIR)/man1/$(BASE).1 + rm -f $(HTML_DIR)/$(BASE).html + rm -f $(INFO_DIR)/$(BASE).info + - install-info --quiet --remove $(BASE).info $(INFO_DIR)/dir + +src-tar: + $(MAKE) realclean all + @cd ..; tar $(EXrcs) -czvf $(BASE)/$(TAR_SRC) $(BASE) + +dist: + rm -f THIS-IS-VERSION-* + @- co -l latex2man latex2man.tex latex2man.sty README + @rm -f .xxx; cp latex2man .xxx + @sed < .xxx -e 's/$VERSION = .*/$VERSION = "$(VERSION)";/' > latex2man + @rm -f .xxx; cp latex2man.tex .xxx + @sed < .xxx -e 's/^\\setVersion{[0-9]*\(\.[0-9]*\)*}/\\setVersion{$(VERSION)}/' \ + -e 's|^\\setDate{[0-9]*/[0-9]*/[0-9]*}|\\setDate{$(V_DATE)}|' \ + > latex2man.tex + @rm -f .xxx; cp latex2man.sty .xxx + @sed < .xxx -e 's/^%% VERSION:.*/%% VERSION: $(VERSION)/' \ + -e "s|^\(\\\\ProvidesPackage{latex2man}\).*|\1[$(DATE2) v$(VERSION)]|"\ + > latex2man.sty + rm -f .xxx; cp README .xxx + @sed < .xxx -e 's/^VERSION:.*/VERSION: $(VERSION)/' > README + @rm -f .xxx + ci -u -m"Distribution" latex2man latex2man.tex latex2man.sty README + - $(MAKE) realclean all + @echo "VERSION $(VERSION) DATE=$(V_DATE)" > THIS-IS-VERSION-$(VERSION) + @cd ..; tar $(EXrcs) -czvf $(BASE)/$(TAR_DIST) \ + $(BASE)/latex2man \ + $(BASE)/latex2man.tex \ + $(BASE)/latex2man.cfg \ + $(BASE)/latex2man.sty \ + $(BASE)/latex2man.trans \ + $(BASE)/latex2man.1 \ + $(BASE)/latex2man.txt \ + $(BASE)/latex2man.html \ + $(BASE)/latex2man.texi \ + $(BASE)/latex2man.info \ + $(BASE)/latex2man.pdf \ + $(BASE)/Makefile \ + $(BASE)/README \ + $(BASE)/INSTALL \ + $(BASE)/CHANGES \ + $(BASE)/THIS-IS-VERSION-$(VERSION) + +backup: + @ cd ..; tar $(EX) -czvf /tmp/$(TAR_BAK) $(BASE) + @ copy-to-backup -al -d $(BASE) /tmp/$(TAR_BAK) + @ rm /tmp/$(TAR_BAK) + +clean: + rm -f *~ *.aux *.log *.dvi .xxx *.out + +realclean: clean + rm -f *.ps *.1 *.html *.texi *.info *.txt *.pdf + +diff: + @echo + @echo "Check for differences with RCS" + @echo + for i in RCS/* ; do [ -f `basename $$i ,v` ] && rcsdiff -q $$i; done + @echo + diff --git a/Master/texmf-dist/doc/support/latex2man/README b/Master/texmf-dist/doc/support/latex2man/README new file mode 100644 index 00000000000..bd7e9042288 --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/README @@ -0,0 +1,34 @@ + + latex2man + ========= + +Latex2man is a tool to translate UNIX manual pages written with LaTeX into +the troff format understood by the UNIX man(1)-command. +Alternatively HTML, TexInfo, or LaTeX code can be produced too. +Output of parts of the text may be supressed using the conditional text +feature (for this, LaTeX generation may be used). + +There is LaTeX package (latex2man.sty) used for writing the Man-page +and a PERL script (latex2man) doing the actual translation. + +Requirements: + - Latex2man requires Perl version >= 5.0004_03. + - LaTeX2e + +VERSION: 1.23 + +Author and Copyright (c) 1998: + Dr. Jürgen Vollmer + Viktoriastraße 15 + D-76133 Karlsruhe + Email: + +License: + This program can be redistributed and/or modified under the terms + of the LaTeX Project Public License Distributed from CTAN + archives in directory macros/latex/base/lppl.txt; either + version 1 of the License, or any later version. + +If you find this software useful, please send me a postcard. + +$Id: README,v 1.62 2008/11/11 07:21:18 vollmer Exp $ diff --git a/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.23 b/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.23 new file mode 100644 index 00000000000..b6307fa0d6e --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.23 @@ -0,0 +1 @@ +VERSION 1.23 DATE=2008/11/11 diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.1 b/Master/texmf-dist/doc/support/latex2man/latex2man.1 new file mode 100644 index 00000000000..587dbf434b8 --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/latex2man.1 @@ -0,0 +1,1100 @@ +'\" t +.\" Manual page created with latex2man on Di 11. Nov 08:21:27 CET 2008 +.\" NOTE: This file is generated, DO NOT EDIT. +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "LATEX2MAN" "1" "2008/11/11" "Documentation Tools " "Documentation Tools " +.SH NAME + +.PP +Latex2man +is a tool to translate UNIX manual pages written with +LaTeXinto a format understood by the UNIX \fIman\fP(1)\-command. +Alternatively HTML, TexInfo, or LaTeX code can be produced too. +Output of parts of the text may be suppressed using the conditional text +feature (for this, LaTeX generation may be used). +.PP +.SH SYNOPSIS + +.PP +latex2man +[\fB\-t\fP\fItransfile\fP] +[\fB\-HMTL\fP] +[\fB\-h\fP] +[\fB\-V\fP] +[\fB\-C\fP\fIname\fP] +[\fB\-a\fP\fIchar\fP] +\fIinfile\fP +\fIoutfile\fP +.PP +.SH DESCRIPTION + +Latex2man +reads the file \fIinfile\fP +and writes \fIoutfile\fP\&. +The +input must be a LaTeX document using the latex2man +LaTeXpackage. +Latex2man +translates that document into the \fItroff\fP(1) +format using +the \fB\-man\fP +macro package. +.PP +Using the \fB\-H\fP +option, HTML code can be produced, instead of +\fItroff\fP(1)\&. +.PP +Using the \fB\-T\fP +option, TexInfo code can be produced, instead of +\fItroff\fP(1)\&. +.PP +Using the \fB\-M\fP +option, \fItroff\fP(1) +input is produced. +.PP +Using the \fB\-L\fP +option, LaTeX ouput can be produced, instead of +\fItroff\fP(1)\&. +.PP +.SH OPTIONS + +.TP +\fB\-t\fP\fItransfile\fP + Translation for user defined LaTeX macros. +.TP +\fB\-M\fP + Produce output suitable for the \fIman\fP(1) +command (default). +.TP +\fB\-H\fP + Instead of producing output suitable for the \fIman\fP(1) +command, HTML code is produced (despite the name of the command). +.TP +\fB\-T\fP + Instead of producing output suitable for the \fIman\fP(1) +command, TexInfo code is produced (despite the name of the command). The +generated \&.texi\-file +may be processed with \fImakeinfo\fP(1) +(to produce an \&.info\-file) +which in turn may be installed using +\fIinstall\-info\fP(1)\&. +The Info tags @dircategory and +@direntry are provided. +.TP +\fB\-L\fP + The LaTeX source is written to the \fIoutfile\fP\&. +This is +useful in conjunction with the \fB\-C\fP\fIname\fP +option. +.TP +\fB\-C\fP\fIname\fP + Output the conditional text for \fIname\fP\&. +If more +than one name should be given use quotes: \fB\-C\fP\fI\&'name1 name2 ...\&'\fP +.br +The following names are defined automatically: +.RS +.TP +.B * +\fB\-H\fP defines HTML +.TP +.B * +\fB\-T\fP defines TEXI +.TP +.B * +\fB\-M\fP defines MAN +.TP +.B * +\fB\-L\fP defines LATEX +.RE +.RS +.PP +.RE +.TP +\fB\-a\fP\fIchar\fP + Is used only in conjunction with \-T. +.br +Background: +.br +TexInfo ignores all blanks before the first word on a new line. In order +to produce some additional space before that word (using \\SP) some +character has to be printed before the additional space. By default this +is a \&. (dot). The \fIchar\fP +specifies an alternative for that first +character. Giving a blank to +\fB\-a\fP +supresses the indentation of a line. +.br +Note: only for the first \\SP of a series that \fIchar\fP +is printed. +.TP +\fB\-h\fP + Show a help text. +.TP +\fB\-V\fP + Show version information. +.PP +.SH FILES + +.PP +.TP +latex2man.tex + The LaTeX file containing this Man\-page. +.TP +latex2man.sty + The LaTeX package defining the environments and +commands. +.TP +latex2man.cfg + The configuration file for Latex2man +LaTeX\-package. +.TP +latex2man.trans + File containing example translations of user +defined LaTeX macros. +.TP +fancyheadings.sty + A LaTeX package used to typeset head\- and +foot lines. +.TP +fancyhdr.sty + A LaTeX package used to typeset head\- and foot +lines. +.TP +rcsinfo.sty + A LaTeX package used to extract and use RCS version +control information in LaTeX documents. +.PP +.SH SEE ALSO + +.PP +LaTeX,TexInfo, \fItroff\fP(1), +\fIgroff\fP(1), +\fImakeinfo\fP(1)\&. +.PP +.SH LaTeX COMMANDS + +.PP +The LaTeX package latex2man +is used to write the Man\-pages with +LaTeX\&.Since we translate into other text formats, not all LaTeX stuff can +be translated. +.PP +.SS PACKAGE OPTIONS +The latex2man +package accepts the following options: +.PP +.TP +fancy +use the LaTeX package fancyheadings\&. +.TP +fancyhdr +use the LaTeX package fancyhdr\&. +.TP +nofancy +neither the LaTeX package fancyheadings +nor +fancyhdr +are used. +.PP +The default option may be specified in the file latex2man.cfg\&. +.PP +.SS PACKAGE SPECIFIC ENVIRONMENTS +.PP +The following environments are provided by the package: +.TP +\\begin{Name}{chapter}{name}{author}{info}{title} +The +Name +environment takes five arguments: 1. the Man\-page chapter, +2. the name of the Man\-page, 3. the author, 4. some short information +about the tool printed in the footline of the Man\-page, and 5. a text +which is used as title, for HTML and LaTeX (it\&'s ignored for output of +the Man\-page or TeXinfo. The Name +environment must be the first +environment in the document. Processing starts with this environment. Any +text before this is ignored (exception: the setVersion and +setDate commands). (Note: all arguments of \\begin{Name} must +be written on one line). +.TP +\\begin{Table}[width]{columns} +The Table +environment takes two arguments: the first optional one specifies +a width of the last column, the second one gives the number of columns. +For example: +.PP +\\begin{Table}[2cm]{3} +.br +Here & am & I \\\\\\hline +.br +A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5 \\\\ +.br +B 1 & B 2 & B 3 \\\\ +.br +\\end{Table} +.PP +will be typeset as: +.PP +.TS +tab(&); +l l lw(2cm). +T{ +Here +T}&T{ +am +T}&T{ +I +T} +_ +T{ +A 1 +T}&T{ +A 2 +T}&T{ +A 3 1 2 3 4 5 A 3 1 2 3 4 5 +T} +T{ +B 1 +T}&T{ +B 2 +T}&T{ +B 3 +T} +.TE +.PP +If no optional \fIwidth\fP +argument is given, all entries are +typeset left justified. +The \fIwidth\fP +is a length measured absolutly in \fIcm\fP\&. +Processing with LaTeX a p{width} column is typeset +as last column. The translation to \fItroff\fP(1) +commands +results in a lw(width) +column specification. Translating +to HTML and TexInfo ignores the \fIwidth\fP +parameter. +.PP +\\hline may be used. +.PP +If the Man\-page is formatted with \fItroff\fP(1) +and tables are used, the +\fItbl\fP(1) +preprocessor should be called, usually by giving +a \fB\-t\fP +to the call of \fItroff\fP(1)\&. +When viewing the generated +manula page using \fIman\fP(1), +\fItbl\fP(1) +is called automatically. +.TP +\\begin{Description} +is the same as \\begin{description} +.TP +\\begin{Description}[label] +is similar to +\\begin{description}, but the item labels have at minimum the size +of the (optional) word \fIlabel\fP\&. +The difference is visible only +in the DVI and PDF\-output, not in the troff, TexInfo or HTML output. +.RS +.TP +a +|a \\begin{description} +.TP +ab +|ab +.TP +abc +|abc +.RE +.RS +.PP +.RS +.RE +.TP +a +|a \\begin{Description} +.TP +ab +|ab +.TP +abc +|abc +.RE +.RS +.PP +.RS +.RE +.TP +a +|a \\begin{Description}[aa] +.TP +ab +|ab +.TP +abc +|abc +.RE +.RS +.PP +.RE +.PP +.SS ACCEPTED LaTeX ENVIRONMENTS +.PP +The following environments are accepted: +.RE +.TP +.B * +description +.TP +.B * +enumerate +.TP +.B * +itemize +.TP +.B * +verbatim +.TP +.B * +center +.PP +They may be nested: +.TP +.B * +Itemize and nested center: +.ce 100 +A centered line. +.br +Another centered line. +.ce 0 + +.TP +.B * +Another item an nested enumerate +.RS +.TP +1. +a +.TP +2. +b +.RE +.RS +.PP +.RE +.PP +.SS PACKAGE SPECIFIC MACROS +.PP +The following commands are provided: +.RE +.TP +\\Opt{option} +Option: \\Opt{\-o} will be typeset as \fB\-o\fP\&. +.TP +\\Arg{argument} +Argument: \\Arg{filename} will be typeset as +\fIfilename\fP\&. +.TP +\\OptArg{option}{argument} +Option with Argument: +.br +\\OptArg{\-o}{filename} will be typeset as \fB\-o\fP\fIfilename\fP\&. +.TP +\\OptoArg{option}{argument} +Option with optional Argument: +.br +\\OptoArg{\-o}{filename} will be +typeset as \fB\-o\fP[\fIfilename\fP]\&. +.TP +\\oOpt{option} +Optional option, e.g. \\oOpt{\-o} will be +typeset as [\fB\-o\fP]\&. +.TP +\\oArg{argument} +Optional argument, e.g. \\oArg{filename} +will be typeset as [\fIfilename\fP]\&. +.TP +\\oOptArg{option}{argument} +Optional option with argument, e.g. +.br +\\oOptArg{\-o}{filename} will be typeset as [\fB\-o\fP\fIfilename\fP]\&. +.TP +\\oOptoArg{option}{argument} +Optional option with optional +argument, e.g. +\\oOptoArg{\-o}{filename} will be typeset as [\fB\-o\fP[\fIfilename\fP]]\&. +.TP +\\File{filename} +used to typeset filenames, e.g. +\\File{filename} will be typeset as filename\&. +.TP +\\Prog{prog} +used to typeset program names, e.g. +\\Prog{latex2man} will be typeset as latex2man\&. +.TP +\\Cmd{command}{chapter} +used to typeset references to other +commands, e.g. \\Cmd{latex2man}{1} will be typeset as +\fIlatex2man\fP(1)\&. +.TP +\\Bar +is typeset as |\&. +.TP +\\Bs +(BackSlash) is typeset as \\\&. +.TP +\\Tilde +is typeset as a ~\&. +.TP +\\Dots +is typeset as \&... + +.TP +\\Bullet +us typeset as *\&. +.TP +\\setVersion{\&.\&.} +set \&.. as version information. +.TP +\\setVersionWord{\&.\&.} +set \&.. for the word \fIVersion:\fP +in +the footline. The default is \\setVersionWord{Version:}\&. +.TP +\\Version +returns the version information. +.TP +\\setDate{\&.\&.} +sets \&.. as date information. +.TP +\\Date +returns the date information. +.TP +\\Email{\&.\&.} +use to mark an Email address: +.br +\\Email{Juergen.Vollmer@informatik\-vollmer.de} is typeset as: +.br +\fBJuergen.Vollmer@informatik\-vollmer.de\fP\&. +.TP +\\URL{\&.\&.} +use to mark an URL: +\\URL{http://www.foo.de/\\Tilde vollmer} is typeset as +\fBhttp://www.foo.de/~vollmer\fP\&. +.TP +\\LatexManEnd +the input file is read and processed until reading +end\-of\-file or \\LatexManEnd (at the beginning of a line). +LaTeXignores this command. +.TP +\\Lbr, \\Rbr +is typeset as [ and ] (these variants are +needed only somtimes like in item[FooBar\\LBr xx \\Lbr]\&. Usually +[ ] will work. +.TP +\\LBr, \\RBr +is typeset as { and } (these variants are +needed when using { or } as arguments to macros. +.TP +\\Circum +is typeset as ^\&. +.TP +\\Percent +is typeset as %\&. +.TP +\\TEXbr +If processed with LaTeX causes a linebreak (i.e. is +equivalent to \\\\).In the output of latex2man +this macro is +ignored. +.TP +\\TEXIbr +If TexInfo output is generated, causes a linebreak (i.e. is +equivalent to \\\\),otherwise ignored. +.TP +\\MANbr +If Man\-Page output is generated, causes a linebreak (i.e. is +equivalent to \\\\),otherwise ignored. +.TP +\\HTMLbr +If HTML output is generated, causes a linebreak (i.e. is +equivalent to \\\\),otherwise ignored. +.TP +\\medskip +An empty line. +.TP +\\SP +Produces some extra space, works also at the beginning of lines. +The code of the second line looks like: +\\SP abc \\SP\\SP xx\\\\: +.br +abc \fB \fP\fB \fP\fB \fPxx +.br +\fB \fPabc \fB \fP\fB \fPxx +.br +\fB \fP\fB \fPabc \fB \fPxx +.PP +Note: Due to some ``problems\&'' with TexInfo, the lines starting with +\\SP +have a leading \&. (dot) in the TexInfo output, +see \fB\-a\fP\fIchar\fP\&. +.PP +.SS ACCEPTED MACROS FROM THE RCSINFO PACKAGE +.PP +.TP +\\rcsInfo $Id ...$ +if the LaTeX package rcsinfo +is used, +this command is used to extract the date of the Man\-page. +.TP +\\rcsInfoLongDate +if the LaTeX package rcsinfo +is used, this +command is used to typeset the date coded in the $Id ..$ string. +.PP +.SS ACCEPTED LaTeX MACROS +.PP +The following standard LaTeX commands are accepted: +.TP +\\section{\&.\&.} +The section +macro takes one argument: the +name of the Man\-page section. Each Man\-page consists of several sections. +Usually there are the following sections in a Man\-page: \fIName\fP +(special handling as environment, c.f. above), \fISynopsis\fP, +\fIDescription\fP, +\fIOptions\fP, +\fIFiles\fP, +\fISee Also\fP, +\fIDiagnostics\fP, +\fIReturn Values\fP, +\fIBugs\fP, +\fIAuthor\fP, +\fIversion\fP, +etc. +.PP +\fISynopsis\fP +must be the first section after the Name +environment. +.PP +Note: Do not use LaTeX\-macrosin section names. +.TP +\\subsection{\&.\&.} +works as well as +.TP +\\subsubsection{\&.\&.} +those. +.TP +\\emph{\&.\&.} +\\emph{example} is typeset as \fIexample\fP\&. +.TP +\\textbf{\&.\&.} +\\textbf{example} is typeset as \fBexample\fP\&. +.TP +\\texttt{\&.\&.} +\\textt{example} is typeset as example\&. +.TP +\\underline{\&.\&.} +\\underline{example} is typeset as +.ul +example of underline +\&. +.TP +\\date{\&.\&.} +uses \&.. as date. +.TP +\\verb+..+ +but only + is allowed as delimiter. +.TP +$<$ is typeset as <\&. +.TP +$>$ is typeset as >\&. +.TP +$<=$ is typeset as <=\&. +.TP +$>=$ is typeset as >=\&. +.TP +$=$ is typeset as =\&. +.TP +$<>$ is typeset as <>\&. +.TP +$\\ge$ +is typeset as $>=$. +.TP +$\\le$ +is typeset as $<=$. +.TP +$\\leftarrow$ +is typeset as $<--$. +.TP +$\\Leftarrow$ +is typeset as $<==$. +.TP +$\\rightarrow$ +is typeset as $-->$. +.TP +$\\Rightarrow$ +is typeset as $==>$. +.TP +\\{ is typeset as {\&. +.TP +\\} is typeset as }\&. +.TP +\\$ is typeset as $\&. +.TP +\\$ is typeset as $,should be used inside macro +arguments. +.TP +\\_ is typeset as _\&. +.TP +\\& is typeset as &\&. +.TP +\\# is typeset as #\&. +.TP +\\% is typeset as %\&. +.TP +\\, +is typeset as smaller blank \- \- (between the two \-) +.TP +\\\- +is used to mark hyphenation in a word. +.TP +\\\\ is typeset as a linebreak or marks the end of a column in the +Table +environment. +.TP +\\ (a \\ followed by a blank) is typeset as a blank, +although it cannot be used at the beginning of a line to make indentation +(see the \\SP +command). +.TP +~ is typeset as a blank. +.TP +\\copyright +is typeset as (C)\&. +.TP +\\noindent +.TP +\\hline +inside a Table +environment. +.TP +\\item +inside a itemize, +enumerate, +or +description +environment. +.TP +\\today +11 November 2008(see also the rcsinfo +LaTeXpackage). +.TP +\\ss,\\"a, ... +\\ss = ß, \\"a= ä, \\"o= ö, \\"u= ü, +\\"A= Ä, \\"O= Ö, \\"U= Ü. It is allowed to surround these +macros in { and } in all places, even inside other macros, e.g. +.Vb + \\textbf{\\"a\\"o\\"u\\"A\\"O\\"U\\ss} + \\textbf{\\"a}{\\"o}{\\"u}{\\"A}{\\"O}{\\"U}{\\ss}} + \\textbf{äöüÄÖÜß} +.Ve +.PP +\fBäöüÄÖÜß äöüÄÖÜß äöüÄÖÜß\fP +.PP +If these letters are used in their LATIN\-1 8\-bit coding, they are +translated into the equivalent letter of the desired output format. +E.g. Ä +becomes Ä +in HTML and @"A +in texinfo. +.PP +.SS CONDITIONAL TEXT +.PP +latex2man +preprocesses the LaTeX input to allow text to be used +conditionally. A special sort of LaTeX comment is used for that purpose. +.TP +.B * +%@% IF \fIcondition\fP %@% +.TP +.B * +%@% ELSE %@% +.TP +.B * +%@% END\-IF %@% +.PP +A line must contain only such a comment and nothing else. \fIcondition\fP +is +a boolean expression containing ``names\&'' and operators. The names given with +the \fB\-C\fP\fIname\fP +option have the value ``true\&'', while all other names +occuring in the expression are assumed to be ``false\&''\&. If the evaluation of +the boolean expression results in the value ``true\&'', the text in the +``then\&''\-part is used and the text in the optional ``else\&''\-part is skipped +(and vice versa). The IF/ELSE/END\-IF +may be nested. As boolean +operators the following are allowed: +.PP +.TS +tab(&); +l l. +T{ +||T}&T{ +boolean or +T} +T{ +&&T}&T{ +boolean and +T} +T{ +! +T}&T{ +negation +.TE +.PP +( and ) for grouping are allowed. +.PP +For example: +.br +%@% IF abc %@% +.br +abc set +.br +%@% IF xyz %@% +.br +xyz set +.br +%@% ELSE %@% +.br +xyz NOT set +.br +%@% END\-IF %@% +.br +%@% ELSE %@% +.br +abc NOT set +.br +%@% IF xyz || !XYZ %@% +.br +xyz OR !XYZ set +.br +%@% ELSE %@% +.br +xyz OR !XYZ NOT set +.br +%@% END\-IF %@% +.br +%@% END\-IF %@% +.PP +Run this manual page through latex2man +with e.g. +\fB\-C\fP\fI\&'abc XYZ\&'\fP +and have a look to the generated output. +(If simply running the LaTeX\-document through LaTeX,all lines are shown in the +\&.dvi file). +.br +abc NOT set +.br +xyz OR !XYZ set +.br +.PP +To check the conditional text feature, when latex2man +is called with +.TP +\fB\-C\fP\fIHTML\fP + the lines 1a, 2b, 3b, and 4b; +.TP +\fB\-C\fP\fITEXI\fP + the lines 1b, 2a, 3b, and 4b; +.TP +\fB\-C\fP\fIMAN\fP + the lines 1b, 2b, 3a, and 4b; +.TP +\fB\-C\fP\fILATEX\fP + the lines 1b, 2b, 3b, and 4a; +.TP +calling LaTeX without preprocessing +all lines +.PP +should be shown: +.PP +1b. The HTML conditional was not set. +.PP +2b. The TEXI conditional was not set. +.PP +3a. This text occurs only when viewing the MAN output +.PP +4b. The LATEX conditional was not set. +.PP +.SS TRANSLATION OF USER DEFINED MACROS +.PP +The user macro translation file (given by the [\fB\-t\fP\fItransfile\fP]) +contains +Perl +commands specifying the translation of LaTeX macros defined by +the user. These macros may have none, one or two arguments. The following code +is expected: +.PP +.TP +.B * +Comments start with a # up to the end of the line. +.TP +.B * +For a macro \\foo with no arguments, the following code must be +specified: +.RS +.TP +Translation to Man\-Pages +$manMacro{'foo'} = '...'; +.TP +Translation to HTML +$htmlMacro{'foo'} = '...'; +.TP +Translation to TexInfo +$texiMacro{'foo'} = '...'; +.RE +.RS +.PP +where \&... is the translation. +.PP +.RE +.TP +.B * +For a macro \\foo{..} with one argument, the following code must be +specified: +.RS +.TP +Translation to Man\-Pages +$manMacro1a{'foo'} = '...'; +.br +$manMacro1b{'foo'} = '...'; +.TP +Translation to HTML +$htmlMacro1a{'foo'} = '...'; +.br +$htmlMacro1b{'foo'} = '...'; +.RS +.PP +.RE +.TP +Translation to TexInfo +$texiMacro1a{'foo'} = '...'; +.br +$texiMacro1b{'foo'} = '...'; +.RE +.RS +.PP +where \&... is the translation. The 1a code is used before the +argument, while 1b is typeset after the argument is set. +.PP +.RE +.TP +.B * +For a macro \\foo{..}{..} with two arguments, the following code +must be specified: +.RS +.TP +Translation to Man\-Pages +$manMacro2a{'foo'} = '...'; +.br +$manMacro2b{'foo'} = '...'; +.br +$manMacro2c{'foo'} = '...'; +.TP +Translation to HTML +$htmlMacro2a{'foo'} = '...'; +.br +$htmlMacro2b{'foo'} = '...'; +.br +$htmlMacro2c{'foo'} = '...'; +.TP +Translation to TexInfo +$texiMacro2a{'foo'} = '...'; +.br +$texiMacro2b{'foo'} = '...'; +.br +$texiMacro2c{'foo'} = '...'; +.RE +.RS +.PP +where \&... is the translation. The 2a code is used before the +first argument, 2b between the two arguments and 2c is +typeset after the second argument is set. +.RE +.TP +.B * +The file latex2man.trans contains some example code. +.PP +.SS VERBATIM ENVIRONMENT +.PP +.Vb +This + {is} + \\texttt{a} + $test$ + _of_ +verbatim + and no @* TexInfo command +.Ve +.PP +.SS SUBSECTION WORKS +.PP +This is a \\subsection\&. +.PP +.SS Subsubsection works +.PP +This is a \\subsubsection\&. +.PP +.SS Subsubsection still works +.PP +This is another \\subsubsection\&. +.PP +.SS GENERAL REMARKS +.PP +.TP +1. +Empty lines are typeset as paragraph separators. +.TP +2. +The arguments of the LaTeX commands must not be split over several +lines. +.TP +3. +Do not nest calls to macros. +.TP +4. +Except the mentioned environment and macros, the usage of other LaTeX +environments or macros are not translated. Their usage will cause garbage +in the output. +.TP +5. +latex2man requires Perl version >= 5.0004_03. +.TP +6. +If you want to install the system with the distributed Makefile, +you need GNU\-make\&. +If you don\&'t have it, you should execute the +steps shown in the Makefile +manually. +.PP +.SS SOME BUG FIX TESTS +.PP +.TP +Leading . and \&' +Now leading \&. and \&' in generation troff output should work propperly, +since a \\& is added. Therfore the \\Dot macro has been deleted. +.br +Thanks to \fBFrank.Schilder@Mathematik.Tu\-Ilmenau.De\fP\&. +.br +Testcase 1: +.RS +.TP +\&'\\n\&' +\&.\&.\&. +.RE +.RS +.PP +Testcase 2: +.br +\&.foobar +Testcase 3: +.br +\&... +.PP +abc \&... +abc \&. efg \&' 123 +.PP +.RE +.TP +%in verbatim +A % in a \\verb and verbatim\-environment was not +emitted correctly. Thanks to Aleksey Nogin \fBnogin@cs.caltech.edu\fP +for the bug report and bug fix. +.PP +% abc +.PP +.Vb + % abc % +.Ve +.PP +but ignore comments following this: +.PP +.SH REQUIREMENTS + +.PP +.TP +Perl +latex2man +requires Perl version >= 5.0004_03. +.TP +Make +If you want to install the system with the distributed +Makefile, +you need GNU\-make\&. +If you don\&'t have it, you +should execute the steps shown in the Makefile +manually. +.TP +LaTeX LaTeX2e is required. +.PP +.SH CHANGES + +Please check the file \fBlatex2man\-CHANGES\fP +for the list of changes. +.PP +.SH VERSION + +.PP +Version: 1.23 of 2008/11/11\&. +.PP +.SH LICENSE AND COPYRIGHT + +.PP +.TP +Copyright +(C)1998, Dr. Jürgen Vollmer, Viktoriastraße 15, +D\-76133 Karlsruhe, Germany, \fBJuergen.Vollmer@informatik\-vollmer.de\fP +.PP +The actual version of Latex2man +may be found on my homepage +.br +\fBhttp://www.informatik\-vollmer.de/software/latex2man.html\fP\&. +.PP +.TP +License +This program can be redistributed and/or modified under the +terms of the LaTeX Project Public License Distributed from CTAN archives +in directory macros/latex/base/lppl.txt; +either version 1 of the +License, or any later version. +.PP +.TP +Misc +If you find this software useful, please send me a postcard from +the place where you are living. +.PP +.SH AUTHOR + +.PP +Dr. Jürgen Vollmer +.br +Viktoriastraße 15 +.br +D\-76133 Karlsruhe +.br +Email: \fBJuergen.Vollmer@informatik\-vollmer.de\fP +.br +WWW: \fBhttp://www.informatik\-vollmer.de\fP\&. +.PP +.\" NOTE: This file is generated, DO NOT EDIT. diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.html b/Master/texmf-dist/doc/support/latex2man/latex2man.html new file mode 100644 index 00000000000..03612aa1acb --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/latex2man.html @@ -0,0 +1,1160 @@ + + + +LATEX2MAN + +

+LaTeX2man -
+A Documentation Tool +

+

Dr. Jürgen Vollmer

+

2008/11/11

+

Version 1.23

+

+Latex2man +is a tool to translate UNIX manual pages written with +LaTeXinto a format understood by the UNIX man(1)-command. +Alternatively HTML, TexInfo, or LaTeX code can be produced too. +Output of parts of the text may be suppressed using the conditional text +feature (for this, LaTeX generation may be used). +

Table of Contents

+ +

+

Synopsis

+ +

+latex2man +[-ttransfile] +[-HMTL] +[-h] +[-V] +[-Cname] +[-achar] +infile +outfile +

+

Description

+ +Latex2man +reads the file infile +and writes outfile. +The +input must be a LaTeX document using the latex2man +LaTeXpackage. +Latex2man +translates that document into the troff(1) +format using +the -man +macro package. +

+Using the -H +option, HTML code can be produced, instead of +troff(1). +

+Using the -T +option, TexInfo code can be produced, instead of +troff(1). +

+Using the -M +option, troff(1) +input is produced. +

+Using the -L +option, LaTeX ouput can be produced, instead of +troff(1). +

+

Options

+ +
+
-ttransfile +
+
Translation for user defined LaTeX macros. +
+
-M +
+
Produce output suitable for the man(1) +command (default). +
+
-H +
+
Instead of producing output suitable for the man(1) +command, HTML code is produced (despite the name of the command). +
+
-T +
+
Instead of producing output suitable for the man(1) +command, TexInfo code is produced (despite the name of the command). The +generated .texi-file +may be processed with makeinfo(1) +(to produce an .info-file) +which in turn may be installed using +install-info(1). +The Info tags @dircategory and +@direntry are provided. +
+
-L +
+
The LaTeX source is written to the outfile. +This is +useful in conjunction with the -Cname +option. +
+
-Cname +
+
Output the conditional text for name. +If more +than one name should be given use quotes: -C'name1 name2 ...'
+ +The following names are defined automatically: +
    +
  • -H defines HTML +
  • +
  • -T defines TEXI +
  • +
  • -M defines MAN +
  • +
  • -L defines LATEX +
  • +
+
+
-achar +
+
Is used only in conjunction with -T.
+ +Background:
+ +TexInfo ignores all blanks before the first word on a new line. In order +to produce some additional space before that word (using \SP) some +character has to be printed before the additional space. By default this +is a . (dot). The char +specifies an alternative for that first +character. Giving a blank to +-a +supresses the indentation of a line.
+ +Note: only for the first \SP of a series that char +is printed. +
+
-h +
+
Show a help text. +
+
-V +
+
Show version information. +
+
+

+

Files

+ +

+

+
latex2man.tex +
+
The LaTeX file containing this Man-page. +
+
latex2man.sty +
+
The LaTeX package defining the environments and +commands. +
+
latex2man.cfg +
+
The configuration file for Latex2man +LaTeX-package. +
+
latex2man.trans +
+
File containing example translations of user +defined LaTeX macros. +
+
fancyheadings.sty +
+
A LaTeX package used to typeset head- and +foot lines. +
+
fancyhdr.sty +
+
A LaTeX package used to typeset head- and foot +lines. +
+
rcsinfo.sty +
+
A LaTeX package used to extract and use RCS version +control information in LaTeX documents. +
+
+

+

See Also

+ +

+LaTeX,TexInfo, troff(1), +groff(1), +makeinfo(1). +

+

LaTeX commands

+ +

+The LaTeX package latex2man +is used to write the Man-pages with +LaTeX.Since we translate into other text formats, not all LaTeX stuff can +be translated. +

+

Package Options

+ +The latex2man +package accepts the following options: +

+

+
fancy
+
use the LaTeX package fancyheadings. +
+
fancyhdr
+
use the LaTeX package fancyhdr. +
+
nofancy
+
neither the LaTeX package fancyheadings +nor +fancyhdr +are used. +
+
+

+The default option may be specified in the file latex2man.cfg. +

+

Package Specific Environments

+ +

+The following environments are provided by the package: +

+
\begin{Name}{chapter}{name}{author}{info}{title}
+
The +Name +environment takes five arguments: 1. the Man-page chapter, +2. the name of the Man-page, 3. the author, 4. some short information +about the tool printed in the footline of the Man-page, and 5. a text +which is used as title, for HTML and LaTeX (it's ignored for output of +the Man-page or TeXinfo. The Name +environment must be the first +environment in the document. Processing starts with this environment. Any +text before this is ignored (exception: the setVersion and +setDate commands). (Note: all arguments of \begin{Name} must +be written on one line). +
+
\begin{Table}[width]{columns}
+
The Table +environment takes two arguments: the first optional one specifies +a width of the last column, the second one gives the number of columns. +For example: +

+\begin{Table}[2cm]{3}
+ +Here & am & I \\\hline
+ +A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5 \\
+ +B 1 & B 2 & B 3 \\
+ +\end{Table} +

+will be typeset as: +

+ + + + + + + + + + + + + + + + + + + +
Here am I
A 1 A 2 A 3 1 2 3 4 5 A 3 1 2 3 4 5
B 1 B 2 B 3
+

+If no optional width +argument is given, all entries are +typeset left justified. +The width +is a length measured absolutly in cm. +Processing with LaTeX a p{width} column is typeset +as last column. The translation to troff(1) +commands +results in a lw(width) +column specification. Translating +to HTML and TexInfo ignores the width +parameter. +

+\hline may be used. +

+If the Man-page is formatted with troff(1) +and tables are used, the +tbl(1) +preprocessor should be called, usually by giving +a -t +to the call of troff(1). +When viewing the generated +manula page using man(1), +tbl(1) +is called automatically. +

+
\begin{Description}
+
is the same as \begin{description} +
+
\begin{Description}[label]
+
is similar to +\begin{description}, but the item labels have at minimum the size +of the (optional) word label. +The difference is visible only +in the DVI and PDF-output, not in the troff, TexInfo or HTML output. +
+
a
+
|a \begin{description} +
+
ab
+
|ab +
+
abc
+
|abc +
+
+
+
a
+
|a \begin{Description} +
+
ab
+
|ab +
+
abc
+
| abc +
+
+
+
a
+
|a \begin{Description}[aa] +
+
ab
+
|ab +
+
abc
+
|abc +
+
+
+
+

+

Accepted LaTeX Environments

+ +

+The following environments are accepted: +

    +
  • description +
  • +
  • enumerate +
  • +
  • itemize +
  • +
  • verbatim +
  • +
  • center +
  • +
+

+They may be nested: +

    +
  • Itemize and nested center: +
    +A centered line.
    + +Another centered line. +
    +
  • +
  • Another item an nested enumerate +
      +
    1. a +
    2. +
    3. b +
    4. +
    +
  • +
+

+

Package Specific Macros

+ +

+The following commands are provided: +

+
\Opt{option}
+
Option: \Opt{-o} will be typeset as -o. +
+
\Arg{argument}
+
Argument: \Arg{filename} will be typeset as +filename. +
+
\OptArg{option}{argument}
+
Option with Argument:
+ +\OptArg{-o}{filename} will be typeset as -ofilename. +
+
\OptoArg{option}{argument}
+
Option with optional Argument:
+ +\OptoArg{-o}{filename} will be +typeset as -o[filename]. +
+
\oOpt{option}
+
Optional option, e.g. \oOpt{-o} will be +typeset as [-o]. +
+
\oArg{argument}
+
Optional argument, e.g. \oArg{filename} +will be typeset as [filename]. +
+
\oOptArg{option}{argument}
+
Optional option with argument, e.g.
+ +\oOptArg{-o}{filename} will be typeset as [-ofilename]. +
+
\oOptoArg{option}{argument}
+
Optional option with optional +argument, e.g. +\oOptoArg{-o}{filename} will be typeset as [-o[filename]]. +
+
\File{filename}
+
used to typeset filenames, e.g. +\File{filename} will be typeset as filename. +
+
\Prog{prog}
+
used to typeset program names, e.g. +\Prog{latex2man} will be typeset as latex2man. +
+
\Cmd{command}{chapter}
+
used to typeset references to other +commands, e.g. \Cmd{latex2man}{1} will be typeset as +latex2man(1). +
+
\Bar
+
is typeset as |. +
+
\Bs
+
(BackSlash) is typeset as \. +
+
\Tilde
+
is typeset as a ~. +
+
\Dots
+
is typeset as ... +
+
\Bullet
+
us typeset as *. +
+
\setVersion{..}
+
set .. as version information. +
+
\setVersionWord{..}
+
set .. for the word Version: +in +the footline. The default is \setVersionWord{Version:}. +
+
\Version
+
returns the version information. +
+
\setDate{..}
+
sets .. as date information. +
+
\Date
+
returns the date information. +
+
\Email{..}
+
use to mark an Email address:
+ +\Email{Juergen.Vollmer@informatik-vollmer.de} is typeset as:
+ +Juergen.Vollmer@informatik-vollmer.de. +
+
\URL{..}
+
use to mark an URL: +\URL{http://www.foo.de/\Tilde vollmer} is typeset as +http://www.foo.de/~vollmer. +
+
\LatexManEnd
+
the input file is read and processed until reading +end-of-file or \LatexManEnd (at the beginning of a line). +LaTeXignores this command. +
+
\Lbr, \Rbr
+
is typeset as [ and ] (these variants are +needed only somtimes like in item[FooBar\LBr xx \Lbr]. Usually +[ ] will work. +
+
\LBr, \RBr
+
is typeset as { and } (these variants are +needed when using { or } as arguments to macros. +
+
\Circum
+
is typeset as ^. +
+
\Percent
+
is typeset as %. +
+
\TEXbr
+
If processed with LaTeX causes a linebreak (i.e. is +equivalent to \\).In the output of latex2man +this macro is +ignored. +
+
\TEXIbr
+
If TexInfo output is generated, causes a linebreak (i.e. is +equivalent to \\),otherwise ignored. +
+
\MANbr
+
If Man-Page output is generated, causes a linebreak (i.e. is +equivalent to \\),otherwise ignored. +
+
\HTMLbr
+
If HTML output is generated, causes a linebreak (i.e. is +equivalent to \\),otherwise ignored. +
+
\medskip
+
An empty line. +
+
\SP
+
Produces some extra space, works also at the beginning of lines. +The code of the second line looks like: +\SP abc \SP\SP xx\\:
+ +abc       xx
+ +  abc     xx
+ +    abc   xx +

+Note: Due to some ``problems'' with TexInfo, the lines starting with +\SP +have a leading . (dot) in the TexInfo output, +see -achar. +

+
+

+

Accepted Macros from the rcsinfo Package

+ +

+

+
\rcsInfo $Id ...$
+
if the LaTeX package rcsinfo +is used, +this command is used to extract the date of the Man-page. +
+
\rcsInfoLongDate
+
if the LaTeX package rcsinfo +is used, this +command is used to typeset the date coded in the $Id ..$ string. +
+
+

+

Accepted LaTeX Macros

+ +

+The following standard LaTeX commands are accepted: +

+
\section{..}
+
The section +macro takes one argument: the +name of the Man-page section. Each Man-page consists of several sections. +Usually there are the following sections in a Man-page: Name +(special handling as environment, c.f. above), Synopsis, +Description, +Options, +Files, +See Also, +Diagnostics, +Return Values, +Bugs, +Author, +version, +etc. +

+Synopsis +must be the first section after the Name +environment. +

+Note: Do not use LaTeX-macrosin section names. +

+
\subsection{..}
+
works as well as +
+
\subsubsection{..}
+
those. +
+
\emph{..}
+
\emph{example} is typeset as example. +
+
\textbf{..}
+
\textbf{example} is typeset as example. +
+
\texttt{..}
+
\textt{example} is typeset as example. +
+
\underline{..}
+
\underline{example} is typeset as +example of underline. +
+
\date{..}
+
uses .. as date. +
+
\verb+..+
+
but only + is allowed as delimiter. +
+
$<$
+
is typeset as <. +
+
$>$
+
is typeset as >. +
+
$<=$
+
is typeset as <=. +
+
$>=$
+
is typeset as >=. +
+
$=$
+
is typeset as =. +
+
$<>$
+
is typeset as <>. +
+
$\ge$
+
is typeset as $>$. +
+
$\le$
+
is typeset as $<=$. +
+
$\leftarrow$
+
is typeset as $<--$. +
+
$\Leftarrow$
+
is typeset as $<==$. +
+
$\rightarrow$
+
is typeset as $-->$. +
+
$\Rightarrow$
+
is typeset as $==>$. +
+
\{
+
is typeset as {. +
+
\}
+
is typeset as }. +
+
\$
+
is typeset as $. +
+
\$
+
is typeset as $,should be used inside macro +arguments. +
+
\_
+
is typeset as _. +
+
\&
+
is typeset as &. +
+
\#
+
is typeset as #. +
+
\%
+
is typeset as %. +
+
\,
+
is typeset as smaller blank - - (between the two -) +
+
\-
+
is used to mark hyphenation in a word. +
+
\\
+
is typeset as a linebreak or marks the end of a column in the +Table +environment. +
+
\
+
(a \ followed by a blank) is typeset as a blank, +although it cannot be used at the beginning of a line to make indentation +(see the \SP +command). +
+
~
+
is typeset as a blank. +
+
\copyright
+
is typeset as ©. +
+
\noindent
+
+
+
\hline
+
inside a Table +environment. +
+
\item
+
inside a itemize, +enumerate, +or +description +environment. +
+
\today
+
11 November 2008 (see also the rcsinfo +LaTeXpackage). +
+
\ss,\"a, ...
+
\ss = ß, \"a= ä, \"o= ö, \"u= ü, +\"A= Ä, \"O= Ö, \"U= Ü. It is allowed to surround these +macros in { and } in all places, even inside other macros, e.g. +
+     \textbf{\"a\"o\"u\"A\"O\"U\ss}
+     \textbf{\"a}{\"o}{\"u}{\"A}{\"O}{\"U}{\ss}}
+     \textbf{äöüÄÖÜß}
+
+

+äöüÄÖÜß äöüÄÖÜß äöüÄÖÜß +

+If these letters are used in their LATIN-1 8-bit coding, they are +translated into the equivalent letter of the desired output format. +E.g. Ä +becomes &Auml; +in HTML and @"A +in texinfo. +

+
+

+

Conditional Text

+ +

+latex2man +preprocesses the LaTeX input to allow text to be used +conditionally. A special sort of LaTeX comment is used for that purpose. +

    +
  • %@% IF condition %@% +
  • +
  • %@% ELSE %@% +
  • +
  • %@% END-IF %@% +
  • +
+

+A line must contain only such a comment and nothing else. condition +is +a boolean expression containing ``names'' and operators. The names given with +the -Cname +option have the value ``true'', while all other names +occuring in the expression are assumed to be ``false''. If the evaluation of +the boolean expression results in the value ``true'', the text in the +``then''-part is used and the text in the optional ``else''-part is skipped +(and vice versa). The IF/ELSE/END-IF +may be nested. As boolean +operators the following are allowed: +

+ + + + + + + + + + + + + +
|| boolean or
&& boolean and
! negation +
+

+( and ) for grouping are allowed. +

+For example:
+ +%@% IF abc %@%
+ +abc set
+ +%@% IF xyz %@%
+ +xyz set
+ +%@% ELSE %@%
+ +xyz NOT set
+ +%@% END-IF %@%
+ +%@% ELSE %@%
+ +abc NOT set
+ +%@% IF xyz || !XYZ %@%
+ +xyz OR !XYZ set
+ +%@% ELSE %@%
+ +xyz OR !XYZ NOT set
+ +%@% END-IF %@%
+ +%@% END-IF %@% +

+Run this manual page through latex2man +with e.g. +-C'abc XYZ' +and have a look to the generated output. +(If simply running the LaTeX-document through LaTeX,all lines are shown in the +.dvi file).
+ +abc NOT set
+ +xyz OR !XYZ set
+ +

+To check the conditional text feature, when latex2man +is called with +

+
-CHTML +
+
the lines 1a, 2b, 3b, and 4b; +
+
-CTEXI +
+
the lines 1b, 2a, 3b, and 4b; +
+
-CMAN +
+
the lines 1b, 2b, 3a, and 4b; +
+
-CLATEX +
+
the lines 1b, 2b, 3b, and 4a; +
+
calling LaTeX without preprocessing
+
all lines +
+
+should be shown: +

+1a. This text occurs only when viewing the HTML output. +

+2b. The TEXI conditional was not set. +

+3b. The MAN conditional was not set. +

+4b. The LATEX conditional was not set. +

+

Translation of User Defined Macros

+ +

+The user macro translation file (given by the [-ttransfile]) +contains +Perl +commands specifying the translation of LaTeX macros defined by +the user. These macros may have none, one or two arguments. The following code +is expected: +

+

    +
  • Comments start with a # up to the end of the line. +
  • +
  • For a macro \foo with no arguments, the following code must be +specified: +
    +
    Translation to Man-Pages
    +
    +$manMacro{'foo'} = '...'; +
    +
    Translation to HTML
    +
    +$htmlMacro{'foo'} = '...'; +
    +
    Translation to TexInfo
    +
    +$texiMacro{'foo'} = '...'; +
    +
    +

    +where ... is the translation. +

    +

  • +
  • For a macro \foo{..} with one argument, the following code must be +specified: +
    +
    Translation to Man-Pages
    +
    +$manMacro1a{'foo'} = '...';
    + +$manMacro1b{'foo'} = '...'; +
    +
    Translation to HTML
    +
    +$htmlMacro1a{'foo'} = '...';
    + +$htmlMacro1b{'foo'} = '...'; +

    +

    +
    Translation to TexInfo
    +
    +$texiMacro1a{'foo'} = '...';
    + +$texiMacro1b{'foo'} = '...'; +
    +
    +

    +where ... is the translation. The 1a code is used before the +argument, while 1b is typeset after the argument is set. +

    +

  • +
  • For a macro \foo{..}{..} with two arguments, the following code +must be specified: +
    +
    Translation to Man-Pages
    +
    +$manMacro2a{'foo'} = '...';
    + +$manMacro2b{'foo'} = '...';
    + +$manMacro2c{'foo'} = '...'; +
    +
    Translation to HTML
    +
    +$htmlMacro2a{'foo'} = '...';
    + +$htmlMacro2b{'foo'} = '...';
    + +$htmlMacro2c{'foo'} = '...'; +
    +
    Translation to TexInfo
    +
    +$texiMacro2a{'foo'} = '...';
    + +$texiMacro2b{'foo'} = '...';
    + +$texiMacro2c{'foo'} = '...'; +
    +
    +

    +where ... is the translation. The 2a code is used before the +first argument, 2b between the two arguments and 2c is +typeset after the second argument is set. +

  • +
  • The file latex2man.trans contains some example code. +
  • +
+

+

Verbatim Environment

+ +

+

+This
+    {is}
+        \texttt{a}
+                  $test$
+                         _of_
+verbatim
+<this is no HTML tag> and no @* TexInfo command
+
+

+

Subsection works

+ +

+This is a \subsection. +

+

Subsubsection works
+ +

+This is a \subsubsection. +

+

Subsubsection still works
+ +

+This is another \subsubsection. +

+

General Remarks

+ +

+

    +
  1. Empty lines are typeset as paragraph separators. +
  2. +
  3. The arguments of the LaTeX commands must not be split over several +lines. +
  4. +
  5. Do not nest calls to macros. +
  6. +
  7. Except the mentioned environment and macros, the usage of other LaTeX +environments or macros are not translated. Their usage will cause garbage +in the output. +
  8. +
  9. latex2man requires Perl version >= 5.0004_03. +
  10. +
  11. If you want to install the system with the distributed Makefile, +you need GNU-make. +If you don't have it, you should execute the +steps shown in the Makefile +manually. +
  12. +
+

+

Some Bug Fix Tests

+ +

+

+
Leading . and '
+
+Now leading . and ' in generation troff output should work propperly, +since a \& is added. Therfore the \Dot macro has been deleted.
+ +Thanks to Frank.Schilder@Mathematik.Tu-Ilmenau.De.
+ +Testcase 1: +
+
'\n'
+
... +
+
+Testcase 2:
+ +.foobar +Testcase 3:
+ +...

+abc ...abc . efg ' 123 +

+

+
% in verbatim
+
A % in a \verb and verbatim-environment was not +emitted correctly. Thanks to Aleksey Nogin nogin@cs.caltech.edu +for the bug report and bug fix. +

+% abc +

+

+   % abc %
+
+

+but ignore comments following this: +

+

+
+

+

Requirements

+ +

+

+
Perl
+
latex2man +requires Perl version >= 5.0004_03. +
+
Make
+
If you want to install the system with the distributed +Makefile, +you need GNU-make. +If you don't have it, you +should execute the steps shown in the Makefile +manually. +
+
LaTeX
+
LaTeX2e is required. +
+
+

+

Changes

+ +Please check the file latex2man-CHANGES +for the list of changes. +

+

Version

+ +

+Version: 1.23 of 2008/11/11. +

+

License and Copyright

+ +

+

+
Copyright
+
© 1998, Dr. Jürgen Vollmer, Viktoriastraße 15, +D-76133 Karlsruhe, Germany, Juergen.Vollmer@informatik-vollmer.de +

+The actual version of Latex2man +may be found on my homepage
+ +http://www.informatik-vollmer.de/software/latex2man.html. +

+

+
License
+
This program can be redistributed and/or modified under the +terms of the LaTeX Project Public License Distributed from CTAN archives +in directory macros/latex/base/lppl.txt; +either version 1 of the +License, or any later version. +

+

+
Misc
+
If you find this software useful, please send me a postcard from +the place where you are living. +
+
+

+

Author

+ +

+Dr. Jürgen Vollmer
+ +Viktoriastraße 15
+ +D-76133 Karlsruhe
+ +Email: Juergen.Vollmer@informatik-vollmer.de +
+WWW: http://www.informatik-vollmer.de. +

+ + + diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.pdf b/Master/texmf-dist/doc/support/latex2man/latex2man.pdf new file mode 100644 index 00000000000..13768b901c3 Binary files /dev/null and b/Master/texmf-dist/doc/support/latex2man/latex2man.pdf differ diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.tex b/Master/texmf-dist/doc/support/latex2man/latex2man.tex new file mode 100644 index 00000000000..b4d02ad8f83 --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/latex2man.tex @@ -0,0 +1,758 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Project: Documentation Tools +%% Descr: Latex --> MAN-page (groff -man), LATEX documentation +%% Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de +%% $Id: latex2man.tex,v 1.187 2008/11/11 07:21:18 vollmer Exp $ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% Latex2man is a tool to translate UNIX manual pages written with LaTeX into a +%% format understood by the UNIX man(1)-command. +%% Alternatively HTML or TexInfo code can be produced too. +%% Output of parts of the text may be supressed using the conditional text +%% feature. +%% +%% There is LaTeX package (latex2man.sty) used for writing the Man-page +%% and a PERL script (latex2man) doing the actual translation. +%% +%% Copyright (C) 1998, Dr. Juergen Vollmer +%% Viktoriastrasse 15, D-76133 Karlsruhe, Germany +%% Juergen.Vollmer@informatik-vollmer.de +%% License: +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +%% +%% If you find this software useful, please send me a postcard. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[english]{article} +\usepackage[latin1]{inputenc} +\usepackage{babel} +\usepackage{verbatim} + +%% do we have the `hyperref package? +\IfFileExists{hyperref.sty}{ + \usepackage[bookmarksopen,bookmarksnumbered]{hyperref} +}{} + +%% do we have the `fancyhdr' package? +\IfFileExists{fancyhdr.sty}{ +\usepackage[fancyhdr]{latex2man} +}{ +%% do we have the `fancyheadings' package? +\IfFileExists{fancyheadings.sty}{ +\usepackage[fancy]{latex2man} +}{ +\usepackage[nofancy]{latex2man} +\message{no fancyhdr or fancyheadings package present, discard it} +}} + +%% do we have the `rcsinfo' package? +\IfFileExists{rcsinfo.sty}{ +\usepackage[nofancy]{rcsinfo} +\rcsInfo $Id: latex2man.tex,v 1.187 2008/11/11 07:21:18 vollmer Exp $ +\setDate{\rcsInfoLongDate} +}{ +\setDate{2008/11/11} %%%% must be manually set, if rcsinfo is not present +\message{package rcsinfo not present, discard it} +} + +\setVersionWord{Version:} %%% that's the default, no need to set it. +\setVersion{1.23} + +\begin{document} + +\begin{Name}{1}{latex2man}{Dr.~J{\"u}rgen Vollmer}{Documentation Tools}{\LaTeX2man\\--\\ A Documentation Tool} + + \Prog{Latex2man} is a tool to translate UNIX manual pages written with + \LaTeX\ into a format understood by the UNIX \Cmd{man}{1}-command. + Alternatively HTML, TexInfo, or \LaTeX\ code can be produced too. + Output of parts of the text may be suppressed using the conditional text + feature (for this, LaTeX generation may be used). +\end{Name} + +\section{Synopsis} +%%%%%%%%%%%%%%%%%% + +\Prog{latex2man} \oOptArg{-t}{transfile} + \oOpt{-HMTL} \oOpt{-h} \oOpt{-V} \oOptArg{-C}{name} \TEXIbr + \oOptArg{-a}{char} + \Arg{infile} + \Arg{outfile} + +\section{Description} +%%%%%%%%%%%%%%%%%%%%% +\Prog{Latex2man} reads the file \Arg{infile} and writes \Arg{outfile}. The +input must be a \LaTeX\ document using the \Prog{latex2man} \LaTeX\ package. +\Prog{Latex2man} translates that document into the \Cmd{troff}{1} format using +the \Opt{-man} macro package. + +Using the \Opt{-H} option, HTML code can be produced, instead of +\Cmd{troff}{1}. + +Using the \Opt{-T} option, TexInfo code can be produced, instead of +\Cmd{troff}{1}. + +Using the \Opt{-M} option, \Cmd{troff}{1} input is produced. + +Using the \Opt{-L} option, \LaTeX\ ouput can be produced, instead of +\Cmd{troff}{1}. + + +\section{Options} +%%%%%%%%%%%%%%%%% +\begin{Description}[\OptArg{-t}{transfile}]\setlength{\itemsep}{0cm} +\item[\OptArg{-t}{transfile}] Translation for user defined \LaTeX\ macros. +\item[\Opt{-M}] Produce output suitable for the \Cmd{man}{1} command (default). +\item[\Opt{-H}] Instead of producing output suitable for the \Cmd{man}{1} + command, HTML code is produced (despite the name of the command). +\item[\Opt{-T}] Instead of producing output suitable for the \Cmd{man}{1} + command, TexInfo code is produced (despite the name of the command). The + generated \File{.texi}-file may be processed with \Cmd{makeinfo}{1} + (to produce an \File{.info}-file) which in turn may be installed using + \Cmd{install-info}{1}. The Info tags \verb+@dircategory+ and + \verb+@direntry+ are provided. +\item[\Opt{-L}] The \LaTeX\ source is written to the \Arg{outfile}. This is + useful in conjunction with the \OptArg{-C}{name} option. +\item[\OptArg{-C}{name}] Output the conditional text for \Arg{name}. If more + than one name should be given use quotes: \OptArg{-C}{'name1 name2 ...'}\\ + The following names are defined automatically: + \begin{itemize} + \item \Opt{-H} defines \texttt{HTML} + \item \Opt{-T} defines \texttt{TEXI} + \item \Opt{-M} defines \texttt{MAN} + \item \Opt{-L} defines \texttt{LATEX} + \end{itemize} + \item[\OptArg{-a}{char}] Is used only in conjunction with -T.\\ + Background:\\ + TexInfo ignores all blanks before the first word on a new line. In order + to produce some additional space before that word (using \Bs SP) some + character has to be printed before the additional space. By default this + is a . (dot). The \Arg{char} specifies an alternative for that first + character. Giving a blank to + \Opt{-a} supresses the indentation of a line.\\ + Note: only for the first \Bs SP of a series that \Arg{char} is printed. +\item[\Opt{-h}] Show a help text. +\item[\Opt{-V}] Show version information. +\end{Description} + +\section{Files} +%%%%%%%%%%%%%%% + +\begin{Description}\setlength{\itemsep}{0cm} +\item[\File{latex2man.tex}] The \LaTeX\ file containing this Man-page. +\item[\File{latex2man.sty}] The \LaTeX\ package defining the environments and + commands. +\item[\File{latex2man.cfg}] The configuration file for \Prog{Latex2man} + \LaTeX-package. +\item[\File{latex2man.trans}] File containing example translations of user + defined \LaTeX\ macros. +\item[\File{fancyheadings.sty}] A \LaTeX\ package used to typeset head- and + foot lines. +\item[\File{fancyhdr.sty}] A \LaTeX\ package used to typeset head- and foot + lines. +\item[\File{rcsinfo.sty}] A \LaTeX\ package used to extract and use RCS version + control information in \LaTeX\ documents. +\end{Description} + +\section{See Also} +%%%%%%%%%%%%%%%%%% + +\LaTeX, TexInfo, \Cmd{troff}{1}, \Cmd{groff}{1}, \Cmd{makeinfo}{1}. + +\section{\LaTeX\ commands} +%%%%%%%%%%%%%%%%%%%%%%%%%% + +The \LaTeX\ package \texttt{latex2man} is used to write the Man-pages with +\LaTeX. Since we translate into other text formats, not all \LaTeX\ stuff can +be translated. + +\subsection{Package Options} +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +The \texttt{latex2man} package accepts the following options: + +\begin{description}\setlength{\itemsep}{0cm} +\item[fancy] use the \LaTeX\ package \texttt{fancyheadings}. +\item[fancyhdr] use the \LaTeX\ package \texttt{fancyhdr}. +\item[nofancy] neither the \LaTeX\ package \texttt{fancyheadings} nor + \texttt{fancyhdr} are used. +\end{description} + +The default option may be specified in the file \texttt{latex2man.cfg}. + +\subsection{Package Specific Environments} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The following environments are provided by the package: +\begin{description}\setlength{\itemsep}{0cm} +\item[\Bs begin\{Name\}\{chapter\}\{name\}\{author\}\{info\}\{title\} ] The + \texttt{Name} environment takes five arguments: 1.\ the Man-page chapter, + 2.\ the name of the Man-page, 3.\ the author, 4.\ some short information + about the tool printed in the footline of the Man-page, and 5.\ a text + which is used as title, for HTML and \LaTeX\ (it's ignored for output of + the Man-page or TeXinfo. The \texttt{Name} environment must be the first + environment in the document. Processing starts with this environment. Any + text before this is ignored (exception: the \verb+setVersion+ and + \verb+setDate+ commands). (Note: all arguments of \Bs begin\{Name\} must + be written on one line). +\item[\Bs begin\{Table\}\Lbr width\Rbr\{columns\}] The \texttt{Table} + environment takes two arguments: the first optional one specifies + a width of the last column, the second one gives the number of columns. + For example: + + \verb+\begin{Table}[2cm]{3}+ \\ + \verb+ Here & am & I \\\hline+ \\ + \verb+ A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5 \\+ \\ + \verb+ B 1 & B 2 & B 3 \\+ \\ + \verb+\end{Table}+ + + will be typeset as: + + \begin{Table}[2cm]{3} + Here & am & I \\\hline + A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5\\ + B 1 & B 2 & B 3 \\ + \end{Table} + + If no optional \emph{width} argument is given, all entries are + typeset left justified. + The \emph{width} is a length measured absolutly in \emph{cm}. + Processing with \LaTeX\ a \verb+p{width}+ column is typeset + as last column. The translation to \Cmd{troff}{1} commands + results in a \texttt{lw(width)} column specification. Translating + to HTML and TexInfo ignores the \emph{width} parameter. + + \verb+\hline+ may be used. + + If the Man-page is formatted with \Cmd{troff}{1} and tables are used, the + \Cmd{tbl}{1} preprocessor should be called, usually by giving + a \Opt{-t} to the call of \Cmd{troff}{1}. When viewing the generated + manula page using \Cmd{man}{1}, \Cmd{tbl}{1} is called automatically. +\item[\Bs begin\{Description\}] is the same as \Bs begin\{description\} +\item[\Bs begin\{Description\}\Lbr label\Rbr] is similar to + \Bs begin\{description\}, but the item labels have at minimum the size + of the (optional) word \emph{label}. The difference is visible only + in the DVI and PDF-output, not in the troff, TexInfo or HTML output. + \begin{description} + \item[a] \Bar a \verb+\begin{description}+ + \item[ab] \Bar ab + \item[abc] \Bar abc + \end{description} + \begin{Description} + \item[a] \Bar a \verb+\begin{Description}+ + \item[ab] \Bar ab + \item[abc]\Bar abc + \end{Description} + \begin{Description}[ab] + \item[a] \Bar a \verb+\begin{Description}[aa]+ + \item[ab] \Bar ab + \item[abc] \Bar abc + \end{Description} +\end{description} + +\subsection{Accepted \LaTeX\ Environments} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The following environments are accepted: +\begin{itemize}\setlength{\itemsep}{0cm} +\item \texttt{description} +\item \texttt{enumerate} +\item \texttt{itemize} +\item \texttt{verbatim} +\item \texttt{center} +\end{itemize} + +They may be nested: +\begin{itemize} +\item Itemize and nested center: + \begin{center} + A centered line.\\ + Another centered line. + \end{center} +\item Another item an nested enumerate + \begin{enumerate} + \item a + \item b + \end{enumerate} +\end{itemize} + + +\subsection{Package Specific Macros} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The following commands are provided: +\begin{description}\setlength{\itemsep}{0cm} +\item[\Bs Opt\{option\}] Option: \verb+\Opt{-o}+ will be typeset as \Opt{-o}. +\item[\Bs Arg\{argument\}] Argument: \verb+\Arg{filename}+ will be typeset as + \Arg{filename}. +\item[\Bs OptArg\{option\}\{argument\}] Option with Argument:\\ + \verb+\OptArg{-o}{filename}+ will be typeset as \OptArg{-o}{filename}. +\item[\Bs OptoArg\{option\}\{argument\}] Option with optional Argument:\\ + \verb+\OptoArg{-o}{filename}+ will be + typeset as \OptoArg{-o}{filename}. +\item[\Bs oOpt\{option\}] Optional option, e.g.\ \verb+\oOpt{-o}+ will be + typeset as \oOpt{-o}. +\item[\Bs oArg\{argument\}] Optional argument, e.g.\ \verb+\oArg{filename}+ + will be typeset as \oArg{filename}. +\item[\Bs oOptArg\{option\}\{argument\}] Optional option with argument, e.g.\\ + \verb+\oOptArg{-o}{filename}+ will be typeset as \oOptArg{-o}{filename}. +\item[\Bs oOptoArg\{option\}\{argument\}] Optional option with optional + argument, e.g.\ + \verb+\oOptoArg{-o}{filename}+ will be typeset as \oOptoArg{-o}{filename}. +\item[\Bs File\{filename\}] used to typeset filenames, e.g.\ + \verb+\File{filename}+ will be typeset as \File{filename}. +\item[\Bs Prog\{prog\}] used to typeset program names, e.g.\ + \verb+\Prog{latex2man}+ will be typeset as \Prog{latex2man}. +\item[\Bs Cmd\{command\}\{chapter\}] used to typeset references to other + commands, e.g.\ \verb+\Cmd{latex2man}{1}+ will be typeset as + \Cmd{latex2man}{1}. +\item[\Bs Bar] is typeset as \Bar. +\item[\Bs Bs] (BackSlash) is typeset as \Bs. +\item[\Bs Tilde] is typeset as a \Tilde. +\item[\Bs Dots] is typeset as \Dots +\item[\Bs Bullet] us typeset as \Bullet. +\item[\Bs setVersion\{..\}] set \verb+..+ as version information. +\item[\Bs setVersionWord\{..\}] set \verb+..+ for the word \emph{Version:} in + the footline. The default is \verb+\setVersionWord{Version:}+. +\item[\Bs Version] returns the version information. +\item[\Bs setDate\{..\}] sets \verb+..+ as date information. +\item[\Bs Date] returns the date information. +\item[\Bs Email\{..\}] use to mark an Email address:\\ + \verb+\Email{Juergen.Vollmer@informatik-vollmer.de}+ is typeset as:\\ + \Email{Juergen.Vollmer@informatik-vollmer.de}. +\item[\Bs URL\{..\}] use to mark an URL: + \verb+\URL{http://www.foo.de/\Tilde vollmer}+ is typeset as + \URL{http://www.foo.de/\Tilde vollmer}. +\item[\Bs LatexManEnd] the input file is read and processed until reading + end-of-file or \verb+\LatexManEnd+ (at the beginning of a line). + \LaTeX\ ignores this command. +\item[\Bs Lbr, \Bs Rbr] is typeset as \Lbr\ and \Rbr\ (these variants are + needed only somtimes like in \verb+item[FooBar\LBr xx \Lbr]+. Usually + \verb+[ ]+ will work. +\item[\Bs LBr, \Bs RBr] is typeset as \LBr\ and \RBr\ (these variants are + needed when using \{ or \} as arguments to macros. +\item[\Bs Circum] is typeset as \Circum. +\item[\Bs Percent] is typeset as \Percent. +\item[\Bs TEXbr] If processed with \LaTeX\ causes a linebreak (i.e.\ is + equivalent to \Bs\Bs). In the output of \Prog{latex2man} this macro is + ignored. +\item[\Bs TEXIbr] If TexInfo output is generated, causes a linebreak (i.e.\ is + equivalent to \Bs\Bs), otherwise ignored. +\item[\Bs MANbr] If Man-Page output is generated, causes a linebreak (i.e.\ is + equivalent to \Bs\Bs), otherwise ignored. +\item[\Bs HTMLbr] If HTML output is generated, causes a linebreak (i.e.\ is + equivalent to \Bs\Bs), otherwise ignored. +\item[\Bs medskip] An empty line. +\item[\Bs SP] Produces some extra space, works also at the beginning of lines. + The code of the second line looks like: + \texttt{\Bs SP abc \Bs SP\Bs SP xx\Bs\Bs}:\\ + abc \SP\SP\SP xx\\ + \SP abc \SP\SP xx\\ + \SP\SP abc \SP xx + + Note: Due to some ``problems'' with TexInfo, the lines starting with + \texttt{\Bs SP} have a leading . (dot) in the TexInfo output, + see \OptArg{-a}{char}. +\end{description} + +\subsection{Accepted Macros from the rcsinfo Package} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{description}\setlength{\itemsep}{0cm} +\item[\Bs rcsInfo \$Id ...\$] if the \LaTeX\ package \File{rcsinfo} is used, + this command is used to extract the date of the Man-page. +\item[\Bs rcsInfoLongDate] if the \LaTeX\ package \File{rcsinfo} is used, this + command is used to typeset the date coded in the \verb+$Id ..$+ string. +\end{description} + +\subsection{Accepted \LaTeX\ Macros} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The following standard \LaTeX\ commands are accepted: +\begin{description}\setlength{\itemsep}{0cm} +\item[\Bs section\{..\}] The \texttt{section} macro takes one argument: the + name of the Man-page section. Each Man-page consists of several sections. + Usually there are the following sections in a Man-page: \emph{Name} + (special handling as environment, c.f.\ above), \emph{Synopsis}, + \emph{Description}, \emph{Options}, \emph{Files}, \emph{See Also}, + \emph{Diagnostics}, \emph{Return Values}, \emph{Bugs}, \emph{Author}, + \emph{version}, etc. + + \emph{Synopsis} must be the first section after the \texttt{Name} + environment. + + Note: Do not use \LaTeX-macros in section names. +\item[\Bs subsection\{..\}] works as well as +\item[\Bs subsubsection\{..\}] those. +\item[\Bs emph\{..\}] \verb+\emph{example}+ is typeset as \emph{example}. +\item[\Bs textbf\{..\}] \verb+\textbf{example}+ is typeset as \textbf{example}. +\item[\Bs texttt\{..\}]\verb+\textt{example}+ is typeset as \texttt{example}. +\item[\Bs underline\{..\}]\verb+\underline{example}+ is typeset as + \underline{example of underline}. +\item[\Bs date\{..\}] uses \verb+..+ as date. +\item[\Bs verb+..+] but only + is allowed as delimiter. +\item[\$$<$\$] is typeset as $<$. +\item[\$$>$\$] is typeset as $>$. +\item[\$$<=$\$] is typeset as $<=$. +\item[\$$>=$\$] is typeset as $>=$. +\item[\$$=$\$] is typeset as $=$. +\item[\$$<>$\$] is typeset as $<>$. +\item[\$\Bs ge\$] is typeset as $\ge$. +\item[\$\Bs le\$] is typeset as $\le$. +\item[\$\Bs leftarrow\$] is typeset as $\leftarrow$. +\item[\$\Bs Leftarrow\$] is typeset as $\Leftarrow$. +\item[\$\Bs rightarrow\$] is typeset as $\rightarrow$. +\item[\$\Bs Rightarrow\$] is typeset as $\Rightarrow$. +\item[\Bs \{] is typeset as \{. +\item[\Bs \}] is typeset as \}. +\item[\Bs \$] is typeset as \$. +\item[\Bs \Dollar] is typeset as \Dollar, should be used inside macro + arguments. +\item[\Bs \_] is typeset as \_. +\item[\Bs \&] is typeset as \&. +\item[\Bs \#] is typeset as \#. +\item[\Bs \%] is typeset as \%. +\item[\Bs ,] is typeset as smaller blank -\,- (between the two -) +\item[\Bs -] is used to mark hyphenation in a word. +\item[\Bs \Bs] is typeset as a linebreak or marks the end of a column in the + \texttt{Table} environment. +\item[\Bs ] (a \Bs\ followed by a blank) is typeset as a blank, + although it cannot be used at the beginning of a line to make indentation + (see the \texttt{\Bs SP} command). +\item[\Tilde] is typeset as a blank. +\item[\Bs copyright] is typeset as \copyright. +\item[\Bs noindent] +\item[\Bs hline] inside a \texttt{Table} environment. +\item[\Bs item] inside a \texttt{itemize}, \texttt{enumerate}, or + \texttt{description} environment. +\item[\Bs today] \today\ (see also the \texttt{rcsinfo} \LaTeX\ package). +\item[\Bs ss,\Bs"a, ...] \Bs ss = \ss, \Bs"a = \"a, \Bs"o = \"o, \Bs"u = \"u, + \Bs"A = \"A, \Bs"O = \"O, \Bs"U = \"U. It is allowed to surround these + macros in \{ and \} in all places, even inside other macros, e.g. + \begin{verbatim} + \textbf{\"a\"o\"u\"A\"O\"U\ss} + \textbf{\"a}{\"o}{\"u}{\"A}{\"O}{\"U}{\ss}} + \textbf{äöüÄÖÜß} + \end{verbatim} + + \textbf{\"a\"o\"u\"A\"O\"U\ss {\"a}{\"o}{\"u}{\"A}{\"O}{\"U}{\ss} äöüÄÖÜß} + + If these letters are used in their LATIN-1 8-bit coding, they are + translated into the equivalent letter of the desired output format. + E.g. \texttt{Ä} becomes \texttt{\Ä}; in HTML and \texttt{@"A} + in texinfo. +\end{description} + +\subsection{Conditional Text} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\Prog{latex2man} preprocesses the \LaTeX\ input to allow text to be used +conditionally. A special sort of \LaTeX\ comment is used for that purpose. +\begin{itemize}\setlength{\itemsep}{0cm} +\item \Percent@\Percent\ IF \emph{condition} \Percent@\Percent +\item \Percent@\Percent\ ELSE \Percent@\Percent +\item \Percent@\Percent\ END-IF \Percent@\Percent +\end{itemize} + +A line must contain only such a comment and nothing else. \emph{condition} is +a boolean expression containing ``names'' and operators. The names given with +the \OptArg{-C}{name} option have the value ``true'', while all other names +occuring in the expression are assumed to be ``false''. If the evaluation of +the boolean expression results in the value ``true'', the text in the +``then''-part is used and the text in the optional ``else''-part is skipped +(and vice versa). The \texttt{IF/ELSE/END-IF} may be nested. As boolean +operators the following are allowed: + +\begin{Table}{2} +\Bar\Bar & boolean or \\ +\&\& & boolean and \\ +! & negation +\end{Table} + +( and ) for grouping are allowed. + +\noindent +For example:\\ +\Percent@\Percent\ IF abc \Percent@\Percent\\ +\verb+ +abc set\\ +\verb+ +\Percent@\Percent\ IF xyz \Percent@\Percent\\ +\verb+ +xyz set\\ +\verb+ +\Percent@\Percent\ ELSE \Percent@\Percent\\ +\verb+ +xyz NOT set\\ +\verb+ +\Percent@\Percent\ END-IF \Percent@\Percent\\ +\Percent@\Percent\ ELSE \Percent@\Percent\\ +\verb+ +abc NOT set\\ +\verb+ +\Percent@\Percent\ IF xyz \Bar\Bar\ !XYZ \Percent@\Percent\\ +\verb+ +xyz OR !XYZ set\\ +\verb+ +\Percent@\Percent\ ELSE \Percent@\Percent\\ +\verb+ +xyz OR !XYZ NOT set\\ +\verb+ +\Percent@\Percent\ END-IF \Percent@\Percent\\ +\Percent@\Percent\ END-IF \Percent@\Percent + +\noindent +Run this manual page through \Prog{latex2man} with e.g.\ +\OptArg{-C}{'abc XYZ'} and have a look to the generated output. +(If simply running the \LaTeX-document\ through \LaTeX, all lines are shown in the +.dvi file).\\ +%@% IF abc %@% + abc set\\ + %@% IF xyz %@% + xyz set\\ + %@% ELSE %@% + xyz NOT set\\ + %@% END-IF %@% +%@% ELSE %@% + abc NOT set\\ + %@% IF xyz || !XYZ %@% + xyz OR !XYZ set\\ + %@% ELSE %@% + xyz OR !XYZ NOT set + %@% END-IF %@% +%@% END-IF %@% + +\noindent +To check the conditional text feature, when \Prog{latex2man} is called with +\begin{description} +\item[\OptArg{-C}{HTML}] the lines 1a, 2b, 3b, and 4b; +\item[\OptArg{-C}{TEXI}] the lines 1b, 2a, 3b, and 4b; +\item[\OptArg{-C}{MAN}] the lines 1b, 2b, 3a, and 4b; +\item[\OptArg{-C}{LATEX}] the lines 1b, 2b, 3b, and 4a; +\item[calling \LaTeX\ without preprocessing] all lines +\end{description} +should be shown: + +%@% IF HTML %@% +1a. This text occurs only when viewing the HTML output. + +%@% ELSE %@% +1b. The HTML conditional was not set. + +%@% END-IF %@% + +%@% IF TEXI %@% +2a. This text occurs only when viewing the TEXI output + +%@% ELSE %@% +2b. The TEXI conditional was not set. + +%@% END-IF %@% + +%@% IF MAN %@% +3a. This text occurs only when viewing the MAN output + +%@% ELSE %@% +3b. The MAN conditional was not set. + +%@% END-IF %@% + +%@% IF LATEX %@% +4a. This text occurs only when viewing the LATEX output + +%@% ELSE %@% +4b. The LATEX conditional was not set. + +%@% END-IF %@% + +\subsection{Translation of User Defined Macros} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The user macro translation file (given by the \oOptArg{-t}{transfile}) contains +\Prog{Perl} commands specifying the translation of \LaTeX\ macros defined by +the user. These macros may have none, one or two arguments. The following code +is expected: + +\begin{itemize}\setlength{\itemsep}{0cm} +\item Comments start with a \# up to the end of the line. +\item For a macro \verb+\foo+ with no arguments, the following code must be + specified: + \begin{description}\setlength{\itemsep}{0cm} + \item[Translation to Man-Pages]\TEXbr + \verb+$manMacro{'foo'} = '...';+ + \item[Translation to HTML]\TEXbr + \verb+$htmlMacro{'foo'} = '...';+ + \item[Translation to TexInfo]\TEXbr + \verb+$texiMacro{'foo'} = '...';+ + \end{description} + + where \verb+...+ is the translation. + +\item For a macro \verb+\foo{..}+ with one argument, the following code must be + specified: + \begin{description}\setlength{\itemsep}{0cm} + \item[Translation to Man-Pages]\TEXbr + \verb+$manMacro1a{'foo'} = '...';+\\ + \verb+$manMacro1b{'foo'} = '...';+ + \item[Translation to HTML]\TEXbr + \verb+$htmlMacro1a{'foo'} = '...';+\\ + \verb+$htmlMacro1b{'foo'} = '...';+ + + \item[Translation to TexInfo]\TEXbr + \verb+$texiMacro1a{'foo'} = '...';+\\ + \verb+$texiMacro1b{'foo'} = '...';+ + \end{description} + + where \verb+...+ is the translation. The \verb+1a+ code is used before the + argument, while \verb+1b+ is typeset after the argument is set. + +\item For a macro \verb+\foo{..}{..}+ with two arguments, the following code + must be specified: + \begin{description}\setlength{\itemsep}{0cm} + \item[Translation to Man-Pages]\TEXbr + \verb+$manMacro2a{'foo'} = '...';+\\ + \verb+$manMacro2b{'foo'} = '...';+\\ + \verb+$manMacro2c{'foo'} = '...';+ + \item[Translation to HTML]\TEXbr + \verb+$htmlMacro2a{'foo'} = '...';+\\ + \verb+$htmlMacro2b{'foo'} = '...';+\\ + \verb+$htmlMacro2c{'foo'} = '...';+ + \item[Translation to TexInfo]\TEXbr + \verb+$texiMacro2a{'foo'} = '...';+\\ + \verb+$texiMacro2b{'foo'} = '...';+\\ + \verb+$texiMacro2c{'foo'} = '...';+ + \end{description} + + where \verb+...+ is the translation. The \verb+2a+ code is used before the + first argument, \verb+2b+ between the two arguments and \verb+2c+ is + typeset after the second argument is set. +\item The file \File{latex2man.trans} contains some example code. +\end{itemize} + +\subsection{Verbatim Environment} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{verbatim} +This + {is} + \texttt{a} + $test$ + _of_ +verbatim + and no @* TexInfo command +\end{verbatim} + +\subsection{Subsection works} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +This is a \verb+\subsection+. + +\subsubsection{Subsubsection works} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +This is a \verb+\subsubsection+. + +\subsubsection{Subsubsection still works} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +This is another \verb+\subsubsection+. + + +\subsection{General Remarks} +%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{enumerate}\setlength{\itemsep}{0cm} +\item Empty lines are typeset as paragraph separators. +\item The arguments of the \LaTeX\ commands must not be split over several + lines. +\item Do not nest calls to macros. +\item Except the mentioned environment and macros, the usage of other \LaTeX\ + environments or macros are not translated. Their usage will cause garbage + in the output. +\item \Prog{latex2man} requires Perl version $>=$ 5.0004\_03. +\item If you want to install the system with the distributed \File{Makefile}, + you need GNU-\Prog{make}. If you don't have it, you should execute the + steps shown in the \File{Makefile} manually. +\end{enumerate} + +\subsection{Some Bug Fix Tests} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% TODO: HTML: a blank line after \begin{description} should not emit a

+\begin{description} +\item[Leading . and '] +%%%%%%%%%%%%%%%%%%%%%% +Now leading . and ' in generation troff output should work propperly, +since a \verb+\&+ is added. Therfore the \verb+\Dot+ macro has been deleted.\\ +Thanks to \Email{Frank.Schilder@Mathematik.Tu-Ilmenau.De}.\\ +Testcase 1: +\begin{description} +\item['\Bs n'] ... +\end{description} +Testcase 2:\\ +\File{.foobar} +Testcase 3:\\ +\Dots + +abc \Dots abc . efg ' 123 + +\item[\% in verbatim] A \% in a \Bs verb and verbatim-environment was not + emitted correctly. Thanks to Aleksey Nogin \Email{nogin@cs.caltech.edu} + for the bug report and bug fix. + +\verb+ % abc+ + +\begin{verbatim} + % abc % +\end{verbatim} + +but ignore comments following this: % this should be ignored + +\end{description} + +\section{Requirements} +%%%%%%%%%%%%%%%%%%%%%% + +\begin{description}\setlength{\itemsep}{0cm} +\item[Perl] \Prog{latex2man} requires Perl version $>=$ 5.0004\_03. +\item[Make] If you want to install the system with the distributed + \File{Makefile}, you need GNU-\Prog{make}. If you don't have it, you + should execute the steps shown in the \File{Makefile} manually. +\item[\LaTeX] \LaTeX 2e is required. +\end{description} + +\section{Changes} +%@% IF LATEX %@% +{\small\verbatiminput{CHANGES}} +%@% ELSE %@% +Please check the file \URL{latex2man-CHANGES} for the list of changes. +%@% END-IF %@% + +\section{Version} +%%%%%%%%%%%%%%%%% + +Version: \Version\ of \Date. + +\section{License and Copyright} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{description} +\item[Copyright] \copyright\ 1998, Dr.~Jürgen Vollmer, Viktoriastraße 15, + D-76133 Karlsruhe, Germany, \Email{Juergen.Vollmer@informatik-vollmer.de} + + + The actual version of \Prog{Latex2man} may be found on my homepage\\ + \URL{http://www.informatik-vollmer.de/software/latex2man.html}. + +\item[License] This program can be redistributed and/or modified under the + terms of the LaTeX Project Public License Distributed from CTAN archives + in directory \File{macros/latex/base/lppl.txt}; either version 1 of the + License, or any later version. + +\item[Misc] If you find this software useful, please send me a postcard from + the place where you are living. +\end{description} + +\section{Author} +%%%%%%%%%%%%%%%% + +\noindent +Dr.~Jürgen Vollmer \\ +Viktoriastraße 15 \\ +D-76133 Karlsruhe \\ +Email: \Email{Juergen.Vollmer@informatik-vollmer.de} \\ +WWW: \URL{http://www.informatik-vollmer.de}. + +\LatexManEnd + +\end{document} diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.texi b/Master/texmf-dist/doc/support/latex2man/latex2man.texi new file mode 100644 index 00000000000..0614458666d --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/latex2man.texi @@ -0,0 +1,1005 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename latex2man.info +@settitle latex2man +@c %**end of header +@c Manual page created with latex2man on Di 11. Nov 08:21:27 CET 2008> +@c NOTE: This file is generated, DO NOT EDIT. +@dircategory Man-pages +@direntry +* Latex2man: (latex2man). Its Man-Page +@end direntry +@titlepage +@title latex2man +@subtitle Documentation Tools +@author Dr.~J@"urgen Vollmer +@end titlepage +@node Top, Description, (dir), (dir) +@top latex2man + +Latex2man +is a tool to translate UNIX manual pages written with +LaTeXinto a format understood by the UNIX man(1)-command. +Alternatively HTML, TexInfo, or LaTeX code can be produced too. +Output of parts of the text may be suppressed using the conditional text +feature (for this, LaTeX generation may be used). + +@section Synopsis + + +latex2man +[ -t@var{transfile} ] +[ -HMTL ] +[ -h ] +[ -V ] +[ -C@var{name} ] +@* +[ -a@var{char} ] +@var{infile} +@var{outfile} + +@menu +* Description:: +* Options:: +* Files:: +* See Also:: +* LaTeX commands:: +* Package Options:: +* Package Specific Environments:: +* Accepted LaTeX Environments:: +* Package Specific Macros:: +* Accepted Macros from the rcsinfo Package:: +* Accepted LaTeX Macros:: +* Conditional Text:: +* Translation of User Defined Macros:: +* Verbatim Environment:: +* Subsection works:: +* Subsubsection works:: +* Subsubsection still works:: +* General Remarks:: +* Some Bug Fix Tests:: +* Requirements:: +* Changes:: +* Version:: +* License and Copyright:: +* Author:: +@end menu +@node Description, Options, Top, Top +@section Description + +Latex2man +reads the file @var{infile} +and writes @var{outfile}. +The +input must be a LaTeX document using the latex2man +LaTeXpackage. +Latex2man +translates that document into the troff(1) +format using +the -man +macro package. + +Using the -H +option, HTML code can be produced, instead of +troff(1). + +Using the -T +option, TexInfo code can be produced, instead of +troff(1). + +Using the -M +option, troff(1) +input is produced. + +Using the -L +option, LaTeX ouput can be produced, instead of +troff(1). + +@node Options, Files, Description, Top +@section Options + +@table @samp +@item -t@var{transfile} +Translation for user defined LaTeX macros. +@item -M +Produce output suitable for the man(1) +command (default). +@item -H +Instead of producing output suitable for the man(1) +command, HTML code is produced (despite the name of the command). +@item -T +Instead of producing output suitable for the man(1) +command, TexInfo code is produced (despite the name of the command). The +generated @file{.texi}-file +may be processed with makeinfo(1) +(to produce an @file{.info}-file) +which in turn may be installed using +install-info(1). +The Info tags @t{@@dircategory} and +@t{@@direntry} are provided. +@item -L +The LaTeX source is written to the @var{outfile}. +This is +useful in conjunction with the -C@var{name} +option. +@item -C@var{name} +Output the conditional text for @var{name}. +If more +than one name should be given use quotes: -C@var{'name1 name2 ...'}@* + +The following names are defined automatically: +@itemize @bullet +@item +-H defines @t{HTML} +@item +-T defines @t{TEXI} +@item +-M defines @t{MAN} +@item +-L defines @t{LATEX} +@end itemize +@item -a@var{char} +Is used only in conjunction with -T.@* + +Background:@* + +TexInfo ignores all blanks before the first word on a new line. In order +to produce some additional space before that word (using \SP) some +character has to be printed before the additional space. By default this +is a . (dot). The @var{char} +specifies an alternative for that first +character. Giving a blank to +-a +supresses the indentation of a line.@* + +Note: only for the first \SP of a series that @var{char} +is printed. +@item -h +Show a help text. +@item -V +Show version information. +@end table + +@node Files, See Also, Options, Top +@section Files + + +@table @samp +@item @file{latex2man.tex} +The LaTeX file containing this Man-page. +@item @file{latex2man.sty} +The LaTeX package defining the environments and +commands. +@item @file{latex2man.cfg} +The configuration file for Latex2man +LaTeX-package. +@item @file{latex2man.trans} +File containing example translations of user +defined LaTeX macros. +@item @file{fancyheadings.sty} +A LaTeX package used to typeset head- and +foot lines. +@item @file{fancyhdr.sty} +A LaTeX package used to typeset head- and foot +lines. +@item @file{rcsinfo.sty} +A LaTeX package used to extract and use RCS version +control information in LaTeX documents. +@end table + +@node See Also, LaTeX commands, Files, Top +@section See Also + + +LaTeX,TexInfo, troff(1), +groff(1), +makeinfo(1). + +@node LaTeX commands, Package Options, See Also, Top +@section LaTeX commands + + +The LaTeX package @t{latex2man} +is used to write the Man-pages with +LaTeX.Since we translate into other text formats, not all LaTeX stuff can +be translated. + +@node Package Options, Package Specific Environments, LaTeX commands, Top +@subsection Package Options + +The @t{latex2man} +package accepts the following options: + +@table @samp +@item fancy +use the LaTeX package @t{fancyheadings}. +@item fancyhdr +use the LaTeX package @t{fancyhdr}. +@item nofancy +neither the LaTeX package @t{fancyheadings} +nor +@t{fancyhdr} +are used. +@end table + +The default option may be specified in the file @t{latex2man.cfg}. + +@node Package Specific Environments, Accepted LaTeX Environments, Package Options, Top +@subsection Package Specific Environments + + +The following environments are provided by the package: +@table @samp +@item \begin@{Name@}@{chapter@}@{name@}@{author@}@{info@}@{title@} +The +@t{Name} +environment takes five arguments: 1. the Man-page chapter, +2. the name of the Man-page, 3. the author, 4. some short information +about the tool printed in the footline of the Man-page, and 5. a text +which is used as title, for HTML and LaTeX (it's ignored for output of +the Man-page or TeXinfo. The @t{Name} +environment must be the first +environment in the document. Processing starts with this environment. Any +text before this is ignored (exception: the @t{setVersion} and +@t{setDate} commands). (Note: all arguments of \begin@{Name@} must +be written on one line). +@item \begin@{Table@}[width]@{columns@} +The @t{Table} +environment takes two arguments: the first optional one specifies +a width of the last column, the second one gives the number of columns. +For example: + +@t{\begin@{Table@}[2cm]@{3@}} @* + +@t{Here & am & I \\\hline} @* + +@t{A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5 \\} @* + +@t{B 1 & B 2 & B 3 \\} @* + +@t{\end@{Table@}} + +will be typeset as: + +@multitable @columnfractions 0.3 0.3 0.3 +@item Here @tab am @tab I + +@item +A 1 @tab A 2 @tab A 3 1 2 3 4 5 A 3 1 2 3 4 5 + +@item B 1 @tab B 2 @tab B 3 + +@end multitable + +If no optional @emph{width} +argument is given, all entries are +typeset left justified. +The @emph{width} +is a length measured absolutly in @emph{cm}. +Processing with LaTeX a @t{p@{width@}} column is typeset +as last column. The translation to troff(1) +commands +results in a @t{lw(width)} +column specification. Translating +to HTML and TexInfo ignores the @emph{width} +parameter. + +@t{\hline} may be used. + +If the Man-page is formatted with troff(1) +and tables are used, the +tbl(1) +preprocessor should be called, usually by giving +a -t +to the call of troff(1). +When viewing the generated +manula page using man(1), +tbl(1) +is called automatically. +@item \begin@{Description@} +is the same as \begin@{description@} +@item \begin@{Description@}[label] +is similar to +\begin@{description@}, but the item labels have at minimum the size +of the (optional) word @emph{label}. +The difference is visible only +in the DVI and PDF-output, not in the troff, TexInfo or HTML output. +@table @samp +@item a +|a @t{\begin@{description@}} +@item ab +|ab +@item abc +|abc +@end table +@table @samp +@item a +|a @t{\begin@{Description@}} +@item ab +|ab +@item abc +|abc +@end table +@table @samp +@item a +|a @t{\begin@{Description@}[aa]} +@item ab +|ab +@item abc +|abc +@end table +@end table + +@node Accepted LaTeX Environments, Package Specific Macros, Package Specific Environments, Top +@subsection Accepted LaTeX Environments + + +The following environments are accepted: +@itemize @bullet +@item +@t{description} +@item +@t{enumerate} +@item +@t{itemize} +@item +@t{verbatim} +@item +@t{center} +@end itemize + +They may be nested: +@itemize @bullet +@item +Itemize and nested center: + +@center A centered line.@* +@center Another centered line. +@center +@item +Another item an nested enumerate +@enumerate +@item +a +@item +b +@end enumerate +@end itemize + +@node Package Specific Macros, Accepted Macros from the rcsinfo Package, Accepted LaTeX Environments, Top +@subsection Package Specific Macros + + +The following commands are provided: +@table @samp +@item \Opt@{option@} +Option: @t{\Opt@{-o@}} will be typeset as -o. +@item \Arg@{argument@} +Argument: @t{\Arg@{filename@}} will be typeset as +@var{filename}. +@item \OptArg@{option@}@{argument@} +Option with Argument:@* + +@t{\OptArg@{-o@}@{filename@}} will be typeset as -o@var{filename}. +@item \OptoArg@{option@}@{argument@} +Option with optional Argument:@* + +@t{\OptoArg@{-o@}@{filename@}} will be +typeset as -o[@var{filename}]. +@item \oOpt@{option@} +Optional option, e.g. @t{\oOpt@{-o@}} will be +typeset as [ -o ]. +@item \oArg@{argument@} +Optional argument, e.g. @t{\oArg@{filename@}} +will be typeset as [ @var{filename} ]. +@item \oOptArg@{option@}@{argument@} +Optional option with argument, e.g.@* + +@t{\oOptArg@{-o@}@{filename@}} will be typeset as [ -o@var{filename} ]. +@item \oOptoArg@{option@}@{argument@} +Optional option with optional +argument, e.g. +@t{\oOptoArg@{-o@}@{filename@}} will be typeset as [ -o[@var{filename}] ]. +@item \File@{filename@} +used to typeset filenames, e.g. +@t{\File@{filename@}} will be typeset as @file{filename}. +@item \Prog@{prog@} +used to typeset program names, e.g. +@t{\Prog@{latex2man@}} will be typeset as latex2man. +@item \Cmd@{command@}@{chapter@} +used to typeset references to other +commands, e.g. @t{\Cmd@{latex2man@}@{1@}} will be typeset as +latex2man(1). +@item \Bar +is typeset as |. +@item \Bs +(BackSlash) is typeset as \. +@item \Tilde +is typeset as a ~. +@item \Dots +is typeset as ... +@item \Bullet +us typeset as *. +@item \setVersion@{..@} +set @t{..} as version information. +@item \setVersionWord@{..@} +set @t{..} for the word @emph{Version:} +in +the footline. The default is @t{\setVersionWord@{Version:@}}. +@item \Version +returns the version information. +@item \setDate@{..@} +sets @t{..} as date information. +@item \Date +returns the date information. +@item \Email@{..@} +use to mark an Email address:@* + +@t{\Email@{Juergen.Vollmer@@informatik-vollmer.de@}} is typeset as:@* + +@email{Juergen.Vollmer@@informatik-vollmer.de}. +@item \URL@{..@} +use to mark an URL: +@t{\URL@{http://www.foo.de/\Tilde vollmer@}} is typeset as +@url{http://www.foo.de/~vollmer}. +@item \LatexManEnd +the input file is read and processed until reading +end-of-file or @t{\LatexManEnd} (at the beginning of a line). +LaTeXignores this command. +@item \Lbr, \Rbr +is typeset as [ and ] (these variants are +needed only somtimes like in @t{item[FooBar\LBr xx \Lbr]}. Usually +@t{[ ]} will work. +@item \LBr, \RBr +is typeset as @{ and @} (these variants are +needed when using @{ or @} as arguments to macros. +@item \Circum +is typeset as ^. +@item \Percent +is typeset as %. +@item \TEXbr +If processed with LaTeX causes a linebreak (i.e. is +equivalent to \\).In the output of latex2man +this macro is +ignored. +@item \TEXIbr +If TexInfo output is generated, causes a linebreak (i.e. is +equivalent to \\),otherwise ignored. +@item \MANbr +If Man-Page output is generated, causes a linebreak (i.e. is +equivalent to \\),otherwise ignored. +@item \HTMLbr +If HTML output is generated, causes a linebreak (i.e. is +equivalent to \\),otherwise ignored. +@item \medskip +An empty line. +@item \SP +Produces some extra space, works also at the beginning of lines. +The code of the second line looks like: +@t{\SP abc \SP\SP xx\\}:@* + +abc @ @ @ @ @ @ xx@* + +.@ abc @ @ @ @ xx@* + +.@ .@ abc @ @ xx + +Note: Due to some ``problems'' with TexInfo, the lines starting with +@t{\SP} +have a leading . (dot) in the TexInfo output, +see -a@var{char}. +@end table + +@node Accepted Macros from the rcsinfo Package, Accepted LaTeX Macros, Package Specific Macros, Top +@subsection Accepted Macros from the rcsinfo Package + + +@table @samp +@item \rcsInfo $Id ...$ +if the LaTeX package @file{rcsinfo} +is used, +this command is used to extract the date of the Man-page. +@item \rcsInfoLongDate +if the LaTeX package @file{rcsinfo} +is used, this +command is used to typeset the date coded in the @t{$Id ..$} string. +@end table + +@node Accepted LaTeX Macros, Conditional Text, Accepted Macros from the rcsinfo Package, Top +@subsection Accepted LaTeX Macros + + +The following standard LaTeX commands are accepted: +@table @samp +@item \section@{..@} +The @t{section} +macro takes one argument: the +name of the Man-page section. Each Man-page consists of several sections. +Usually there are the following sections in a Man-page: @emph{Name} +(special handling as environment, c.f. above), @emph{Synopsis}, +@emph{Description}, +@emph{Options}, +@emph{Files}, +@emph{See Also}, +@emph{Diagnostics}, +@emph{Return Values}, +@emph{Bugs}, +@emph{Author}, +@emph{version}, +etc. + +@emph{Synopsis} +must be the first section after the @t{Name} +environment. + +Note: Do not use LaTeX-macrosin section names. +@item \subsection@{..@} +works as well as +@item \subsubsection@{..@} +those. +@item \emph@{..@} +@t{\emph@{example@}} is typeset as @emph{example}. +@item \textbf@{..@} +@t{\textbf@{example@}} is typeset as @strong{example}. +@item \texttt@{..@} +@t{\textt@{example@}} is typeset as @t{example}. +@item \underline@{..@} +@t{\underline@{example@}} is typeset as +example of underline. +@item \date@{..@} +uses @t{..} as date. +@item \verb+..+ +but only + is allowed as delimiter. +@item $<$ +is typeset as <. +@item $>$ +is typeset as >. +@item $<=$ +is typeset as <=. +@item $>=$ +is typeset as >=. +@item $=$ +is typeset as =. +@item $<>$ +is typeset as <>. +@item $\ge$ +is typeset as $>=$. +@item $\le$ +is typeset as $<=$. +@item $\leftarrow$ +is typeset as $<--$. +@item $\Leftarrow$ +is typeset as $<==$. +@item $\rightarrow$ +is typeset as $-->$. +@item $\Rightarrow$ +is typeset as $==>$. +@item \@{ +is typeset as @{. +@item \@} +is typeset as @}. +@item \$ +is typeset as $. +@item \$ +is typeset as $,should be used inside macro +arguments. +@item \_ +is typeset as _. +@item \& +is typeset as &. +@item \# +is typeset as #. +@item \% +is typeset as %. +@item \, +is typeset as smaller blank - - (between the two -) +@item \- +is used to mark hyphenation in a word. +@item \\ +is typeset as a linebreak or marks the end of a column in the +@t{Table} +environment. +@item \ +(a \ followed by a blank) is typeset as a blank, +although it cannot be used at the beginning of a line to make indentation +(see the @t{\SP} +command). +@item ~ +is typeset as a blank. +@item \copyright +is typeset as @copyright{}. +@item \noindent +@item \hline +inside a @t{Table} +environment. +@item \item +inside a @t{itemize}, +@t{enumerate}, +or +@t{description} +environment. +@item \today +11 November 2008(see also the @t{rcsinfo} +LaTeXpackage). +@item \ss,\"a, ... +\ss = @ss{}, \"a= @"a, \"o= @"o, \"u= @"u, +\"A= @"A, \"O= @"O, \"U= @"U. It is allowed to surround these +macros in @{ and @} in all places, even inside other macros, e.g. +@* +.@ @ @ @ @ \textbf@{\"a\"o\"u\"A\"O\"U\ss@}@* +.@ @ @ @ @ \textbf@{\"a@}@{\"o@}@{\"u@}@{\"A@}@{\"O@}@{\"U@}@{\ss@}@}@* +.@ @ @ @ @ \textbf@{äöüÄÖÜß@}@* + +@strong{@"a@"o@"u@"A@"O@"U@ss{} @"a@"o@"u@"A@"O@"U@ss{} @"a@"o@"u@"A@"O@"U@ss{}} + +If these letters are used in their LATIN-1 8-bit coding, they are +translated into the equivalent letter of the desired output format. +E.g. @t{@"A} +becomes @t{Ä}; +in HTML and @t{@@"A} +in texinfo. +@end table + +@node Conditional Text, Translation of User Defined Macros, Accepted LaTeX Macros, Top +@subsection Conditional Text + + +latex2man +preprocesses the LaTeX input to allow text to be used +conditionally. A special sort of LaTeX comment is used for that purpose. +@itemize @bullet +@item +%@@% IF @emph{condition} %@@% +@item +%@@% ELSE %@@% +@item +%@@% END-IF %@@% +@end itemize + +A line must contain only such a comment and nothing else. @emph{condition} +is +a boolean expression containing ``names'' and operators. The names given with +the -C@var{name} +option have the value ``true'', while all other names +occuring in the expression are assumed to be ``false''. If the evaluation of +the boolean expression results in the value ``true'', the text in the +``then''-part is used and the text in the optional ``else''-part is skipped +(and vice versa). The @t{IF/ELSE/END-IF} +may be nested. As boolean +operators the following are allowed: + +@multitable @columnfractions 0.45 0.45 +@item ||@tab boolean or + +@item && @tab boolean and + +@item ! @tab negation +@end multitable + +( and ) for grouping are allowed. + +@noindent + +For example:@* + +%@@% IF abc %@@%@* + +@t{}abc set@* + +@t{}%@@% IF xyz %@@%@* + +@t{}xyz set@* + +@t{}%@@% ELSE %@@%@* + +@t{}xyz NOT set@* + +@t{}%@@% END-IF %@@%@* + +%@@% ELSE %@@%@* + +@t{}abc NOT set@* + +@t{}%@@% IF xyz || !XYZ %@@%@* + +@t{}xyz OR !XYZ set@* + +@t{}%@@% ELSE %@@%@* + +@t{}xyz OR !XYZ NOT set@* + +@t{}%@@% END-IF %@@%@* + +%@@% END-IF %@@% + +@noindent + +Run this manual page through latex2man +with e.g. +-C@var{'abc XYZ'} +and have a look to the generated output. +(If simply running the LaTeX-document through LaTeX,all lines are shown in the +.dvi file).@* + +abc NOT set@* + +xyz OR !XYZ set@* + + +@noindent + +To check the conditional text feature, when latex2man +is called with +@table @samp +@item -C@var{HTML} +the lines 1a, 2b, 3b, and 4b; +@item -C@var{TEXI} +the lines 1b, 2a, 3b, and 4b; +@item -C@var{MAN} +the lines 1b, 2b, 3a, and 4b; +@item -C@var{LATEX} +the lines 1b, 2b, 3b, and 4a; +@item calling LaTeX without preprocessing +all lines +@end table +should be shown: + +1b. The HTML conditional was not set. + +2a. This text occurs only when viewing the TEXI output + +3b. The MAN conditional was not set. + +4b. The LATEX conditional was not set. + +@node Translation of User Defined Macros, Verbatim Environment, Conditional Text, Top +@subsection Translation of User Defined Macros + + +The user macro translation file (given by the [ -t@var{transfile} ]) +contains +Perl +commands specifying the translation of LaTeX macros defined by +the user. These macros may have none, one or two arguments. The following code +is expected: + +@itemize @bullet +@item +Comments start with a # up to the end of the line. +@item +For a macro @t{\foo} with no arguments, the following code must be +specified: +@table @samp +@item Translation to Man-Pages +@t{$manMacro@{'foo'@} = '...';} +@item Translation to HTML +@t{$htmlMacro@{'foo'@} = '...';} +@item Translation to TexInfo +@t{$texiMacro@{'foo'@} = '...';} +@end table + +where @t{...} is the translation. + +@item +For a macro @t{\foo@{..@}} with one argument, the following code must be +specified: +@table @samp +@item Translation to Man-Pages +@t{$manMacro1a@{'foo'@} = '...';}@* + +@t{$manMacro1b@{'foo'@} = '...';} +@item Translation to HTML +@t{$htmlMacro1a@{'foo'@} = '...';}@* + +@t{$htmlMacro1b@{'foo'@} = '...';} + +@item Translation to TexInfo +@t{$texiMacro1a@{'foo'@} = '...';}@* + +@t{$texiMacro1b@{'foo'@} = '...';} +@end table + +where @t{...} is the translation. The @t{1a} code is used before the +argument, while @t{1b} is typeset after the argument is set. + +@item +For a macro @t{\foo@{..@}@{..@}} with two arguments, the following code +must be specified: +@table @samp +@item Translation to Man-Pages +@t{$manMacro2a@{'foo'@} = '...';}@* + +@t{$manMacro2b@{'foo'@} = '...';}@* + +@t{$manMacro2c@{'foo'@} = '...';} +@item Translation to HTML +@t{$htmlMacro2a@{'foo'@} = '...';}@* + +@t{$htmlMacro2b@{'foo'@} = '...';}@* + +@t{$htmlMacro2c@{'foo'@} = '...';} +@item Translation to TexInfo +@t{$texiMacro2a@{'foo'@} = '...';}@* + +@t{$texiMacro2b@{'foo'@} = '...';}@* + +@t{$texiMacro2c@{'foo'@} = '...';} +@end table + +where @t{...} is the translation. The @t{2a} code is used before the +first argument, @t{2b} between the two arguments and @t{2c} is +typeset after the second argument is set. +@item +The file @file{latex2man.trans} contains some example code. +@end itemize + +@node Verbatim Environment, Subsection works, Translation of User Defined Macros, Top +@subsection Verbatim Environment + + +@* +.This@* +.@ @ @ @ @{is@}@* +.@ @ @ @ @ @ @ @ \texttt@{a@}@* +.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ $test$@* +.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ _of_@* +.verbatim@* +.@ and@ no@ @@*@ TexInfo@ command@* + +@node Subsection works, Subsubsection works, Verbatim Environment, Top +@subsection Subsection works + + +This is a @t{\subsection}. + +@node Subsubsection works, Subsubsection still works, Subsection works, Top +@subsubsection Subsubsection works + + +This is a @t{\subsubsection}. + +@node Subsubsection still works, General Remarks, Subsubsection works, Top +@subsubsection Subsubsection still works + + +This is another @t{\subsubsection}. + +@node General Remarks, Some Bug Fix Tests, Subsubsection still works, Top +@subsection General Remarks + + +@enumerate +@item +Empty lines are typeset as paragraph separators. +@item +The arguments of the LaTeX commands must not be split over several +lines. +@item +Do not nest calls to macros. +@item +Except the mentioned environment and macros, the usage of other LaTeX +environments or macros are not translated. Their usage will cause garbage +in the output. +@item +latex2man requires Perl version >= 5.0004_03. +@item +If you want to install the system with the distributed @file{Makefile}, +you need GNU-make. +If you don't have it, you should execute the +steps shown in the @file{Makefile} +manually. +@end enumerate + +@node Some Bug Fix Tests, Requirements, General Remarks, Top +@subsection Some Bug Fix Tests + + +@table @samp +@item Leading . and ' +Now leading . and ' in generation troff output should work propperly, +since a @t{\&} is added. Therfore the @t{\Dot} macro has been deleted.@* + +Thanks to @email{Frank.Schilder@@Mathematik.Tu-Ilmenau.De}.@* + +Testcase 1: +@table @samp +@item '\n' +... +@end table +Testcase 2:@* + +@file{.foobar} +Testcase 3:@* + +... +abc ...abc . efg ' 123 + +@item % in verbatim +A % in a \verb and verbatim-environment was not +emitted correctly. Thanks to Aleksey Nogin @email{nogin@@cs.caltech.edu} +for the bug report and bug fix. + +@t{% abc} + +@* +.@ @ @ %@ abc@ %@* + +but ignore comments following this: + +@end table + +@node Requirements, Changes, Some Bug Fix Tests, Top +@section Requirements + + +@table @samp +@item Perl +latex2man +requires Perl version >= 5.0004_03. +@item Make +If you want to install the system with the distributed +@file{Makefile}, +you need GNU-make. +If you don't have it, you +should execute the steps shown in the @file{Makefile} +manually. +@item LaTeX +LaTeX2e is required. +@end table + +@node Changes, Version, Requirements, Top +@section Changes + +Please check the file @url{latex2man-CHANGES} +for the list of changes. + +@node Version, License and Copyright, Changes, Top +@section Version + + +Version: 1.23 of 2008/11/11. + +@node License and Copyright, Author, Version, Top +@section License and Copyright + + +@table @samp +@item Copyright +@copyright{}1998, Dr. J@"urgen Vollmer, Viktoriastra@ss{}e 15, +D-76133 Karlsruhe, Germany, @email{Juergen.Vollmer@@informatik-vollmer.de} + +The actual version of Latex2man +may be found on my homepage@* + +@url{http://www.informatik-vollmer.de/software/latex2man.html}. + +@item License +This program can be redistributed and/or modified under the +terms of the LaTeX Project Public License Distributed from CTAN archives +in directory @file{macros/latex/base/lppl.txt}; +either version 1 of the +License, or any later version. + +@item Misc +If you find this software useful, please send me a postcard from +the place where you are living. +@end table + +@node Author, , License and Copyright, Top +@section Author + + +@noindent + +Dr. J@"urgen Vollmer @* + +Viktoriastra@ss{}e 15 @* + +D-76133 Karlsruhe @* + +Email: @email{Juergen.Vollmer@@informatik-vollmer.de} +@* +WWW: @url{http://www.informatik-vollmer.de}. + +@bye +@c NOTE: This file is generated, DO NOT EDIT. diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.trans b/Master/texmf-dist/doc/support/latex2man/latex2man.trans new file mode 100644 index 00000000000..2b77cc2fc21 --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/latex2man.trans @@ -0,0 +1,67 @@ +################################################################################# +# Project: Documentation Tools +# Descr: Latex --> MAN-page (groff -man), and HTML; example of user macro +# translations +# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@acm.org +# $Id: latex2man.trans,v 1.2 1998/01/03 17:06:52 vollmer Exp $ +################################################################################# + +################################################################################# +# translation for MAN +################################################################################# + +# LaTeX macros without arguments +$manMacro{'LaTeX'} = 'LaTeX'; +$manMacro{'LATEX'} = 'LaTeX'; # needed, since \LaTeX is contained in a + # section name (which are transposed + # into uppercase + +# LaTeX macros with one argument +$manMacro1a{'myEmph'} = '\n.IR "'; $manMacro1b{'myEmph'} = '"'; + +# LaTeX macros with two arguments +$manMacro2a{'myCmd'} = '\n.I "'; + $manMacro2b{'myCmd'} = '"\n('; + $manMacro2c{'myCmd'} = ')'; + +################################################################################# +# translation for HTML +################################################################################# + +# LaTeX macros without arguments +$htmlMacro{'LaTeX'} = 'LaTeX'; +$htmlMacro{'LATEX'} = 'LaTeX'; # needed, since \LaTeX is contained in a + # section name (which are transposed + # into uppercase + +# LaTeX macros with one argument +$htmlMacro1a{'myEmph'} = ''; $htmlMacro1b{'myEmph'} = ''; + +# LaTeX macros with two arguments +$htmlMacro2a{'Cmymd'} = ''; + $htmlMacro2b{'myCmd'} = '('; + $htmlMacro2c{'myCmd'} = ')'; + +################################################################################# +# translation for TexInfo +################################################################################# + +# LaTeX macros without arguments +$texiMacro{'LaTeX'} = 'LaTeX'; +$texiMacro{'LATEX'} = 'LaTeX'; # needed, since \LaTeX is contained in a + # section name (which are transposed + # into uppercase + +# LaTeX macros with one argument +$texiMacro1a{'myEmph'} = '@emph{'; $texiMacro1b{'myEmph'} = '}'; + +# LaTeX macros with two arguments +$texiMacro2a{'Cmymd'} = ''; + $texiMacro2b{'myCmd'} = ' ('; + $texiMacro2c{'myCmd'} = ')'; + +################################################################################# +## emacs variables +## Local Variables: *** +## mode: perl *** +## End: *** diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.txt b/Master/texmf-dist/doc/support/latex2man/latex2man.txt new file mode 100644 index 00000000000..2ded2fa1000 --- /dev/null +++ b/Master/texmf-dist/doc/support/latex2man/latex2man.txt @@ -0,0 +1,758 @@ +LATEX2MAN(1) Documentation Tools LATEX2MAN(1) + + + +NAME + Latex2man is a tool to translate UNIX manual pages written with LaTeX- + into a format understood by the UNIX man(1)-command. Alternatively + HTML, TexInfo, or LaTeX code can be produced too. Output of parts of + the text may be suppressed using the conditional text feature (for + this, LaTeX generation may be used). + + +SYNOPSIS + latex2man [-ttransfile] [-HMTL] [-h] [-V] [-Cname] [-achar] infile out- + file + + +DESCRIPTION + Latex2man reads the file infile and writes outfile. The input must be + a LaTeX document using the latex2man LaTeXpackage. Latex2man trans- + lates that document into the troff(1) format using the -man macro pack- + age. + + Using the -H option, HTML code can be produced, instead of troff(1). + + Using the -T option, TexInfo code can be produced, instead of troff(1). + + Using the -M option, troff(1) input is produced. + + Using the -L option, LaTeX ouput can be produced, instead of troff(1). + + +OPTIONS + -ttransfile + Translation for user defined LaTeX macros. + + -M Produce output suitable for the man(1) command (default). + + -H Instead of producing output suitable for the man(1) command, + HTML code is produced (despite the name of the command). + + -T Instead of producing output suitable for the man(1) command, + TexInfo code is produced (despite the name of the command). The + generated .texi-file may be processed with makeinfo(1) (to pro- + duce an .info-file) which in turn may be installed using + install-info(1). The Info tags @dircategory and @direntry are + provided. + + -L The LaTeX source is written to the outfile. This is useful in + conjunction with the -Cname option. + + -Cname Output the conditional text for name. If more than one name + should be given use quotes: -C'name1 name2 ...' + The following names are defined automatically: + + * -H defines HTML + + * -T defines TEXI + + * -M defines MAN + + * -L defines LATEX + + + -achar Is used only in conjunction with -T. + Background: + TexInfo ignores all blanks before the first word on a new line. + In order to produce some additional space before that word + (using \SP) some character has to be printed before the addi- + tional space. By default this is a . (dot). The char specifies + an alternative for that first character. Giving a blank to -a + supresses the indentation of a line. + Note: only for the first \SP of a series that char is printed. + + -h Show a help text. + + -V Show version information. + + +FILES + latex2man.tex + The LaTeX file containing this Man-page. + + latex2man.sty + The LaTeX package defining the environments and commands. + + latex2man.cfg + The configuration file for Latex2man LaTeX-package. + + latex2man.trans + File containing example translations of user defined LaTeX + macros. + + fancyheadings.sty + A LaTeX package used to typeset head- and foot lines. + + fancyhdr.sty + A LaTeX package used to typeset head- and foot lines. + + rcsinfo.sty + A LaTeX package used to extract and use RCS version control + information in LaTeX documents. + + +SEE ALSO + LaTeX,TexInfo, troff(1), groff(1), makeinfo(1). + + +LaTeX COMMANDS + The LaTeX package latex2man is used to write the Man-pages with + LaTeX.Since we translate into other text formats, not all LaTeX stuff + can be translated. + + + PACKAGE OPTIONS + The latex2man package accepts the following options: + + + fancy use the LaTeX package fancyheadings. + + fancyhdr + use the LaTeX package fancyhdr. + + nofancy + neither the LaTeX package fancyheadings nor fancyhdr are used. + + The default option may be specified in the file latex2man.cfg. + + + PACKAGE SPECIFIC ENVIRONMENTS + The following environments are provided by the package: + + \begin{Name}{chapter}{name}{author}{info}{title} + The Name environment takes five arguments: 1. the Man-page + chapter, 2. the name of the Man-page, 3. the author, 4. some + short information about the tool printed in the footline of the + Man-page, and 5. a text which is used as title, for HTML and + LaTeX (it's ignored for output of the Man-page or TeXinfo. The + Name environment must be the first environment in the document. + Processing starts with this environment. Any text before this is + ignored (exception: the setVersion and setDate commands). (Note: + all arguments of \begin{Name} must be written on one line). + + \begin{Table}[width]{columns} + The Table environment takes two arguments: the first optional + one specifies a width of the last column, the second one gives + the number of columns. For example: + + \begin{Table}[2cm]{3} + Here & am & I \\\hline + A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5 \\ + B 1 & B 2 & B 3 \\ + \end{Table} + + will be typeset as: + + + Here am I + ---------------------- + A 1 A 2 A 3 1 2 + 3 4 5 A + 3 1 2 3 + 4 5 + B 1 B 2 B 3 + + If no optional width argument is given, all entries are typeset left + justified. The width is a length measured absolutly in cm. Processing + with LaTeX a p{width} column is typeset as last column. The translation + to troff(1) commands results in a lw(width) column specification. + Translating to HTML and TexInfo ignores the width parameter. + + \hline may be used. + + If the Man-page is formatted with troff(1) and tables are used, the + tbl(1) preprocessor should be called, usually by giving a -t to the + call of troff(1). When viewing the generated manula page using man(1), + tbl(1) is called automatically. + + \begin{Description} + is the same as \begin{description} + + \begin{Description}[label] + is similar to \begin{description}, but the item labels have at + minimum the size of the (optional) word label. The difference + is visible only in the DVI and PDF-output, not in the troff, + TexInfo or HTML output. + + a |a \begin{description} + + ab |ab + + abc |abc + + + a |a \begin{Description} + + ab |ab + + abc |abc + + + a |a \begin{Description}[aa] + + ab |ab + + abc |abc + + + + ACCEPTED LaTeX ENVIRONMENTS + The following environments are accepted: + + * description + + * enumerate + + * itemize + + * verbatim + + * center + + They may be nested: + + * Itemize and nested center: + A centered line. + Another centered line. + + + * Another item an nested enumerate + + 1. a + + 2. b + + + + PACKAGE SPECIFIC MACROS + The following commands are provided: + + \Opt{option} + Option: \Opt{-o} will be typeset as -o. + + \Arg{argument} + Argument: \Arg{filename} will be typeset as filename. + + \OptArg{option}{argument} + Option with Argument: + \OptArg{-o}{filename} will be typeset as -ofilename. + + \OptoArg{option}{argument} + Option with optional Argument: + \OptoArg{-o}{filename} will be typeset as -o[filename]. + + \oOpt{option} + Optional option, e.g. \oOpt{-o} will be typeset as [-o]. + + \oArg{argument} + Optional argument, e.g. \oArg{filename} will be typeset as + [filename]. + + \oOptArg{option}{argument} + Optional option with argument, e.g. + \oOptArg{-o}{filename} will be typeset as [-ofilename]. + + \oOptoArg{option}{argument} + Optional option with optional argument, e.g. \oOp- + toArg{-o}{filename} will be typeset as [-o[filename]]. + + \File{filename} + used to typeset filenames, e.g. \File{filename} will be typeset + as filename. + + \Prog{prog} + used to typeset program names, e.g. \Prog{latex2man} will be + typeset as latex2man. + + \Cmd{command}{chapter} + used to typeset references to other commands, e.g. + \Cmd{latex2man}{1} will be typeset as latex2man(1). + + \Bar is typeset as |. + + \Bs (BackSlash) is typeset as \. + + \Tilde is typeset as a ~. + + \Dots is typeset as ... + + + \Bullet + us typeset as *. + + \setVersion{..} + set .. as version information. + + \setVersionWord{..} + set .. for the word Version: in the footline. The default is + \setVersionWord{Version:}. + + \Version + returns the version information. + + \setDate{..} + sets .. as date information. + + \Date returns the date information. + + \Email{..} + use to mark an Email address: + \Email{Juergen.Vollmer@informatik-vollmer.de} is typeset as: + Juergen.Vollmer@informatik-vollmer.de. + + \URL{..} + use to mark an URL: \URL{http://www.foo.de/\Tilde vollmer} is + typeset as http://www.foo.de/~vollmer. + + \LatexManEnd + the input file is read and processed until reading end-of-file + or \LatexManEnd (at the beginning of a line). LaTeXignores this + command. + + \Lbr, \Rbr + is typeset as [ and ] (these variants are needed only somtimes + like in item[FooBar\LBr xx \Lbr]. Usually [ ] will work. + + \LBr, \RBr + is typeset as { and } (these variants are needed when using { or + } as arguments to macros. + + \Circum + is typeset as ^. + + \Percent + is typeset as %. + + \TEXbr If processed with LaTeX causes a linebreak (i.e. is equivalent + to \\).In the output of latex2man this macro is ignored. + + \TEXIbr + If TexInfo output is generated, causes a linebreak (i.e. is + equivalent to \\),otherwise ignored. + + \MANbr If Man-Page output is generated, causes a linebreak (i.e. is + equivalent to \\),otherwise ignored. + + \HTMLbr + If HTML output is generated, causes a linebreak (i.e. is equiv- + alent to \\),otherwise ignored. + + \medskip + An empty line. + + \SP Produces some extra space, works also at the beginning of lines. + The code of the second line looks like: \SP abc \SP\SP xx\\: + abc xx + abc xx + abc xx + + Note: Due to some ``problems'' with TexInfo, the lines starting with + \SP have a leading . (dot) in the TexInfo output, see -achar. + + + ACCEPTED MACROS FROM THE RCSINFO PACKAGE + \rcsInfo $Id ...$ + if the LaTeX package rcsinfo is used, this command is used to + extract the date of the Man-page. + + \rcsInfoLongDate + if the LaTeX package rcsinfo is used, this command is used to + typeset the date coded in the $Id ..$ string. + + + ACCEPTED LaTeX MACROS + The following standard LaTeX commands are accepted: + + \section{..} + The section macro takes one argument: the name of the Man-page + section. Each Man-page consists of several sections. Usually + there are the following sections in a Man-page: Name (special + handling as environment, c.f. above), Synopsis, Description, + Options, Files, See Also, Diagnostics, Return Values, Bugs, + Author, version, etc. + + Synopsis must be the first section after the Name environment. + + Note: Do not use LaTeX-macrosin section names. + + \subsection{..} + works as well as + + \subsubsection{..} + those. + + \emph{..} + \emph{example} is typeset as example. + + \textbf{..} + \textbf{example} is typeset as example. + + \texttt{..} + \textt{example} is typeset as example. + + \underline{..} + \underline{example} is typeset as example of underline . + + \date{..} + uses .. as date. + + \verb+..+ + but only + is allowed as delimiter. + + $<$ is typeset as <. + + $>$ is typeset as >. + + $<=$ is typeset as <=. + + $>=$ is typeset as >=. + + $=$ is typeset as =. + + $<>$ is typeset as <>. + + $\ge$ is typeset as $>=$. + + $\le$ is typeset as $<=$. + + $\leftarrow$ + is typeset as $<--$. + + $\Leftarrow$ + is typeset as $<==$. + + $\rightarrow$ + is typeset as $-->$. + + $\Rightarrow$ + is typeset as $==>$. + + \{ is typeset as {. + + \} is typeset as }. + + \$ is typeset as $. + + \$ is typeset as $,should be used inside macro + arguments. + + \_ is typeset as _. + + \& is typeset as &. + + \# is typeset as #. + + \% is typeset as %. + + \, is typeset as smaller blank - - (between the two -) + + \- is used to mark hyphenation in a word. + + \\ is typeset as a linebreak or marks the end of a column in the + Table environment. + + \ (a \ followed by a blank) is typeset as a blank, + although it cannot be used at the beginning of a line to make + indentation (see the \SP command). + + ~ is typeset as a blank. + + \copyright + is typeset as (C). + + \noindent + + \hline inside a Table environment. + + \item inside a itemize, enumerate, or description environment. + + \today 11 November 2008(see also the rcsinfo LaTeXpackage). + + \ss,\"a, ... + \ss = ß, \"a= ä, \"o= ö, \"u= ü, \"A= Ä, \"O= Ö, \"U= Ü. It is + allowed to surround these macros in { and } in all places, even + inside other macros, e.g. + \textbf{\"a\"o\"u\"A\"O\"U\ss} + \textbf{\"a}{\"o}{\"u}{\"A}{\"O}{\"U}{\ss}} + \textbf{äöüÄÖÜß} + + + äöüÄÖÜß äöüÄÖÜß äöüÄÖÜß + + If these letters are used in their LATIN-1 8-bit coding, they are + translated into the equivalent letter of the desired output format. + E.g. Ä becomes Ä in HTML and @"A in texinfo. + + + CONDITIONAL TEXT + latex2man preprocesses the LaTeX input to allow text to be used condi- + tionally. A special sort of LaTeX comment is used for that purpose. + + * %@% IF condition %@% + + * %@% ELSE %@% + + * %@% END-IF %@% + + A line must contain only such a comment and nothing else. condition is + a boolean expression containing ``names'' and operators. The names + given with the -Cname option have the value ``true'', while all other + names occuring in the expression are assumed to be ``false''. If the + evaluation of the boolean expression results in the value ``true'', the + text in the ``then''-part is used and the text in the optional + ``else''-part is skipped (and vice versa). The IF/ELSE/END-IF may be + nested. As boolean operators the following are allowed: + + + + ( and ) for grouping are allowed. + + For example: + %@% IF abc %@% + abc set + %@% IF xyz %@% + xyz set + %@% ELSE %@% + xyz NOT set + %@% END-IF %@% + %@% ELSE %@% + abc NOT set + %@% IF xyz || !XYZ %@% + xyz OR !XYZ set + %@% ELSE %@% + xyz OR !XYZ NOT set + %@% END-IF %@% + %@% END-IF %@% + + Run this manual page through latex2man with e.g. -C'abc XYZ' and have + a look to the generated output. (If simply running the LaTeX-document + through LaTeX,all lines are shown in the .dvi file). + abc NOT set + xyz OR !XYZ set + + To check the conditional text feature, when latex2man is called with + + -CHTML the lines 1a, 2b, 3b, and 4b; + + -CTEXI the lines 1b, 2a, 3b, and 4b; + + -CMAN the lines 1b, 2b, 3a, and 4b; + + -CLATEX + the lines 1b, 2b, 3b, and 4a; + + calling LaTeX without preprocessing + all lines + + should be shown: + + 1b. The HTML conditional was not set. + + 2b. The TEXI conditional was not set. + + 3a. This text occurs only when viewing the MAN output + + 4b. The LATEX conditional was not set. + + + TRANSLATION OF USER DEFINED MACROS + The user macro translation file (given by the [-ttransfile]) contains + Perl commands specifying the translation of LaTeX macros defined by the + user. These macros may have none, one or two arguments. The following + code is expected: + + + * Comments start with a # up to the end of the line. + + * For a macro \foo with no arguments, the following code must be + specified: + + Translation to Man-Pages + $manMacro{'foo'} = '...'; + + Translation to HTML + $htmlMacro{'foo'} = '...'; + + Translation to TexInfo + $texiMacro{'foo'} = '...'; + + where ... is the translation. + + + * For a macro \foo{..} with one argument, the following code must + be specified: + + Translation to Man-Pages + $manMacro1a{'foo'} = '...'; + $manMacro1b{'foo'} = '...'; + + Translation to HTML + $htmlMacro1a{'foo'} = '...'; + $htmlMacro1b{'foo'} = '...'; + + + Translation to TexInfo + $texiMacro1a{'foo'} = '...'; + $texiMacro1b{'foo'} = '...'; + + where ... is the translation. The 1a code is used before the + argument, while 1b is typeset after the argument is set. + + + * For a macro \foo{..}{..} with two arguments, the following code + must be specified: + + Translation to Man-Pages + $manMacro2a{'foo'} = '...'; + $manMacro2b{'foo'} = '...'; + $manMacro2c{'foo'} = '...'; + + Translation to HTML + $htmlMacro2a{'foo'} = '...'; + $htmlMacro2b{'foo'} = '...'; + $htmlMacro2c{'foo'} = '...'; + + Translation to TexInfo + $texiMacro2a{'foo'} = '...'; + $texiMacro2b{'foo'} = '...'; + $texiMacro2c{'foo'} = '...'; + + where ... is the translation. The 2a code is used before the + first argument, 2b between the two arguments and 2c is typeset + after the second argument is set. + + * The file latex2man.trans contains some example code. + + + VERBATIM ENVIRONMENT + This + {is} + \texttt{a} + $test$ + _of_ + verbatim + and no @* TexInfo command + + + + SUBSECTION WORKS + This is a \subsection. + + + Subsubsection works + This is a \subsubsection. + + + Subsubsection still works + This is another \subsubsection. + + + GENERAL REMARKS + 1. Empty lines are typeset as paragraph separators. + + 2. The arguments of the LaTeX commands must not be split over sev- + eral lines. + + 3. Do not nest calls to macros. + + 4. Except the mentioned environment and macros, the usage of other + LaTeX environments or macros are not translated. Their usage + will cause garbage in the output. + + 5. latex2man requires Perl version >= 5.0004_03. + + 6. If you want to install the system with the distributed Makefile, + you need GNU-make. If you don't have it, you should execute the + steps shown in the Makefile manually. + + + SOME BUG FIX TESTS + Leading . and ' + Now leading . and ' in generation troff output should work prop- + perly, since a \& is added. Therfore the \Dot macro has been + deleted. + Thanks to Frank.Schilder@Mathematik.Tu-Ilmenau.De. + Testcase 1: + + '\n' ... + + Testcase 2: + .foobar Testcase 3: + ... + + abc ... abc . efg ' 123 + + + %in verbatim + A % in a \verb and verbatim-environment was not emitted cor- + rectly. Thanks to Aleksey Nogin nogin@cs.caltech.edu for the bug + report and bug fix. + + % abc + + % abc % + + + but ignore comments following this: + + +REQUIREMENTS + Perl latex2man requires Perl version >= 5.0004_03. + + Make If you want to install the system with the distributed Makefile, + you need GNU-make. If you don't have it, you should execute the + steps shown in the Makefile manually. + + LaTeX LaTeX2e is required. + + +CHANGES + Please check the file latex2man-CHANGES for the list of changes. + + +VERSION + Version: 1.23 of 2008/11/11. + + +LICENSE AND COPYRIGHT + Copyright + (C)1998, Dr. Jürgen Vollmer, Viktoriastraße 15, D-76133 Karl- + sruhe, Germany, Juergen.Vollmer@informatik-vollmer.de + + The actual version of Latex2man may be found on my homepage + http://www.informatik-vollmer.de/software/latex2man.html. + + + License + This program can be redistributed and/or modified under the + terms of the LaTeX Project Public License Distributed from CTAN + archives in directory macros/latex/base/lppl.txt; either version + 1 of the License, or any later version. + + + Misc If you find this software useful, please send me a postcard from + the place where you are living. + + +AUTHOR + Dr. Jürgen Vollmer + Viktoriastraße 15 + D-76133 Karlsruhe + Email: Juergen.Vollmer@informatik-vollmer.de + WWW: http://www.informatik-vollmer.de. + + + + +Documentation Tools 2008/11/11 LATEX2MAN(1) -- cgit v1.2.3