---
name: "sgml2latex"
section: "1"
platform: "linux"
package: "linuxdoc-tools"
version: "0.9.86-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/sgml2latex"
---

# sgml2latex(1)

create LaTeX, DVI, PostScript or PDF output from a LinuxDoc DTD SGML source file

## NAME

sgml2latex - create LaTeX, DVI, PostScript or PDF output from a LinuxDoc DTD SGML source file

## SYNOPSIS

**sgml2latex \[generic-option...\]** **\[--output=***tex***\|***dvi***\|***ps***\|***pdf\]* **\[--bibtex\] \[--makeindex\]** **\[--pagenumber=***n***\]** **--quick** **\[--latex=***hlatexp***\|***platex\]* **\[--dvips=***dvips***\|***dvi2ps\]* **\[--verbosity=n\]** *file*\[.sgml\]

## DESCRIPTION

**sgml2latex** is an old and obsoleted form of the latex converter command of LinuxDoc-Tools (its name may be misleading, as it is not a tool for any SGML DTD, only supports the SGML LinuxDoc DTD). It is recommended to switch the new form **linuxdoc -B latex** now. It converts a LinuxDoc DTD SGML source file to LaTeX output, using the [**nsgmls**(1)](/nsgmls/1.md) or [**onsgmls**(1)](/onsgmls/1.md) parser, and the [**sgmlsasp**(1)](/sgmlsasp/1.md) translator.  Using the LaTeX output, and the [**latex**(1)](/latex/1.md) text formatter, you can then create DVI output, and PostScript output using the [**dvips**(1)](/dvips/1.md) converter. Output will appear in *file.tex* for LaTeX output, *file.dvi* for DVI output, or *file.ps* for PostScript output, where *file* is the name of the SGML source file.

Using  the LaTeX output, and the [**pdflatex**(1)](/pdflatex/1.md) text formatter, you can then create a nice PDF output, suitable for viewing with PDF viewers as [**xpdf**(1)](/xpdf/1.md), **acroread**(1) or **ghostview**(1).

The attribute/value pair "output=latex2e" is set for conditionals.

## OPTIONS

**sgml2latex** accepts all the generic options described in [**linuxdoc**(1)](/linuxdoc/1.md), and the following specific options:

- \--output=*fmt*, -o

  Specify the desired output format.  The specifier *fmt* may be \`\`tex'', \`\`dvi'', \`\`ps'', or \`\`pdf''.

Note: This version does not overwrite/remove the intermediate files: tex file for dvi output, or tex/dvi files for ps output. This is different behavior from the original SGML-Tools 1.0.9, so you are warned here.

- \--bibtex, -b

  Process the generated TeX with [**bibtex**(1)](/bibtex/1.md).

- \--makeindex, -m

  Generate a TeX index file suitable for processing with [**makeindex**(1)](/makeindex/1.md) from and \<idx\> and \<cdx\> tags present in the SGML source.

- \--pagenumber, -n

  Set the starting page number in the output DVI or PS file.

- \--quick, -q

  Do only one pass of LaTeX formatting. This is often not sufficient to produce final output (because of references, etc.) but is useful for spotting TeX errors and justification problems.

- \--pass, -P

  The argument of the pass option is inserted just after the LaTeX preamble generated by the document-type tag. Specify the desired output format. The specifier *fmt* may be \`\`tex'', \`\`dvi'', \`\`ps'', or \`\`pdf''.

- \--latex=*alternate\_latex\_command*, -x

  This option is currently for Korean and Japanese. The *alternate\_latex\_command* can be \`\`latex'' (default), \`\`hlatexp'' (for Korean), \`\`platex'' or \`\`jlatex'' (for Japanese). This option can be used to render Korean document using HLaTeXp, or to render Japanese document using pLaTeX/jLaTeX. If not, HLaTeX should be installed to render Korean document. On the other hand, Japanese document can be rendered with jLaTeX (which is the default when \`\`-c nippon'' is specified), so if you already have jLaTeX, you may not need to install the pLaTeX.

- \--dvips=*alternate\_dvips\_command*, -s

  This option is currently for Japanese. The *alternate\_dvips\_command* can be \`\`dvips'' or \`\`dvi2ps''. If you don't know this, then you may not need this.

- \--verbosity, -V

  Set verbosity. '0' (default) will show info about LaTeX run only in case of errors. '1' will always show info for last run. '2' will show info for all runs.

- file

  The SGML source file, named either *file* or *file.sgml*

## FILES

Many files and executables in /usr/share/linuxdoc-tools and /usr/bin are used.

## BUGS

None known.

## AUTHOR

Originally written by Greg Hankins \<greg.hankins@cc.gatech.edu\>, based on scripts by Tom Gordon and Alexander Horz. Later rewritten by Cees de Groot \<cg@cdegroot.com\>. PDF patches by Juan Jose Amor \<jjamor@hispalinux.es\>. Previously maintained by Taketoshi Sano \<sano@debian.org\> for Linuxdoc-Tools. Currently maintained by Agustin Martin \<agustin6martin AT gmail com\>.

## SEE ALSO

[**linuxdoc**(1)](/linuxdoc/1.md), [**sgml2html**(1)](/sgml2html/1.md), [**sgml2info**(1)](/sgml2info/1.md), [**sgml2lyx**(1)](/sgml2lyx/1.md), [**sgml2rtf**(1)](/sgml2rtf/1.md), [**sgml2txt**(1)](/sgml2txt/1.md), [**sgmlcheck**(1)](/sgmlcheck/1.md).
