SysTutorials

Linux Manual Pages › Section 1

latex2man(1)

NAME

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).

SYNOPSIS

latex2man [-ttransfile] [-cCSSfile] [-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). With this option you can, optionally, specify a CSSfile as an argument. CSS (Cascading Style Sheets) allows you to control the appearance of the resulting HTML page. See below for the names of CSS classes that are included in the HTML tags as attributes.

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. 
-cCSSfile
 If you use the -H you can also specify a file that contains CSS style sheets. The link to the CSS file is inserted into the generatedHTML output using the specified CSSfile filename.
-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.inc
 A file read with \input{..} . 
latex2man.sty
 The LaTeX package defining the environments and  commands.
latex2man.cfg
 The configuration file for Latex2man LaTeX-package.
latex2man.css
 File containing example CSS definitions. 
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.
latex2man.pdf
 The PDF version of this document. 

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:

egin{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 egin{Name} must be written on one line).
egin{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:

egin{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 \
nd{Table}

will be typeset as:

HereamI

A 1A 2A 3 1 2 3 4 5 A 3 1 2 3 4 5
B 1B 2B 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.

egin{Description}
is the same as egin{description}
egin{Description}[label]
is similar to egin{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 egin{description}
ab
|ab
abc
|abc
a
|a egin{Description}
ab
|ab
abc
|abc
a
|a egin{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.
\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 [at] informatik-vollmer.de} is typeset as:
Juergen.Vollmer [at] informatik-vollmer.de.