LINUXDOC(1)
β¨ NAME β¨
okay so this is the LINUXDOC(1) page from the General Commands Manual, and it's literally about linuxdoc β LinuxDoc DTD SGML converter to other output format. That's the whole main character energy right there. π
πΈ SYNOPSIS πΈ
bestie, here's the whole synopsis, no cap:
linuxdoc --backend=format
[--papersize=size] [--language=lang] [--charset=char] [--style=file]
[--debug] [--define attribute=value] [--include entity] [backend-
options...] file(.sgml)
or (Old, obsoleted usage)
sgmlxxxx [generic-options...] [backend-options...] file(.sgml)
periodt. The old obsoleted usage is still there if you're feeling nostalgic, but it's giving legacy. π
π DESCRIPTION π
okay so the linuxdoc suite is a collection of text formatters which understands a LinuxDoc DTD SGML source file. Each formatter (or "back-end") renders the source file into a variety of output formats, including HTML, TeX, DVI, PostScript, plain text, and groff(1) source in manual-page format. The linuxdoc suite is provided for backward compatibility, because there are still many useful documents written in LinuxDoc DTD sgml source. obsessed. β¨
The markup language(s) accepted by these formatters is described in the Linuxdoc-Tools User's Guide. They are variants of an SGML document type definition originally designed by Matt Welsh for Linux documentation. iykyk. π¦
π GENERIC-OPTIONS π
Most command-line options are accepted by all back-ends. Some back-ends have additional specific options to control rendering to their particular output format. Here are the common options:
--backend=format,-Bβ Set the backend for specified format. Default is none of the actual format, but just output the usage of this suites. Available formats are:html,info,latex,lyx,rtf,txt,check. slay. π--papersize=size,-pβ Set the paper size. Default isa4(European 297x210mm paper). You may also specifylettersize. vibe check passed. π--language=lang,-lβ Specify the language of the document (this may change which style files are used for formatting by a back end). The default language is English. Run an LinuxDoc-tools command without arguments to see the list of valid language codes. fr fr. π--charset=chars,-cβ Specify the output character encoding. Defaults toasciiselecting the ASCII set; you may specify "latin" to specify the ISO 8859-1 (Latin-1) character set. Also,nipponandeuc-kris required to handle the euc-jp and euc-kr encoded sgml file.utf-8is also accepted, although it is only partially supported. the way thatutf-8is only partially supported? noted. π--style=file,-Sβ Include an auxiliary DTD (Document Type Definition) from/usr/share/linuxdoc-tools/dtd. iconic path. β¨--tabsize=n,-tβ Set the tab spacing assumed for generating the output document. The default tab spacing is 8. lowkey important. π«Ά--debug,-dβ Don't delete intermediate files (such as.TeXfiles generated on the way to a.dvi, or.manfiles deleted on the way to plain text). bestie, this is your bestie when you need to see the messy middle. π--define,-Dβ Pass attribute/value pairs to be matched against "if" and "unless" conditionals. See the User's Guide for extended discussion of this feature. This conditionalization are handled bysgmlprecommand. Seesgmlpre(1)as well as the User's Guide. iykyk. π§--include,-iβ Pass a-ioption tonsgmls(1). This may be used for conditional inclusion. See thensgmls(1)manual page for details. conditional inclusion is giving main character energy. π--pass,-Pβ Pass an option string to the back end. The exact semantics of this option are dependent on the back end and should be explained in the individual manual pages for each. ngl, very back-end-specific. πfileβ The SGML source file with.sgmlextension, named either file or file.sgml. It must use the linuxdoc DTD. Other DTDs are not supported. no cap, only linuxdoc DTD. π
Running a back-end with no arguments will cause it to list all its options (Error message about "no filenames given" can be ignored safely in this case). The available back ends include (names in brackets are old & obsoleted form):
linuxdoc -B html(sgml2html) β translate to HTMLlinuxdoc -B info(sgml2info) β translate to GNU infolinuxdoc -B lyx(sgml2lyx) β translate to Lyx macroslinuxdoc -B latex(sgml2latex) β translate to LaTeX 2elinuxdoc -B rtf(sgml2rtf) β translate to Microsoft Rich Text Formatlinuxdoc -B txt(sgml2txt) β translate to plain text or Unix manual-page markup
There is also a tool linuxdoc-Bcheck (sgmlcheck) available for checking the Linuxdoc DTD SGML syntax of document sources without actually generating a translated version. periodt. π
β¨ BACKEND-DRIVERS β¨
okay bestie, here's the tea on every single backend driver, one by one. no skipping, no skimming, we're doing all of them π
πΈ linuxdoc -B html (sgml2html)
converts a LinuxDoc DTD SGML source file to HTML output. Output will appear in the top level file file.html and file-n.html for each section (default action, but can be changed by option), where file is the name of the SGML source file and n is the section name.
The attribute/value pair output=html is set for conditionals.
linuxdoc -B html accepts the following options: [--split 0|1|2 ] [--dosnames] [--imagebuttons] [--toc 0|1|2 ]
The meanings of them are:
--split,-sβ what level to split source documents.0= don't split,1= split by major sections,2= split by subsections.--toc,-Tβ what level to generate toc.0= don't generate toc at all,1= includes major sections(/chapters/parts),2= includes subsections.
--dosnames,-hβ use.htmrather than.htmlas the extension of html files.--imagebuttons,-Iβ use the "next", "previous", and "contents" arrow image icons included in/usr/share/linuxdoc-toolsas navigation buttons.--footer,-Fβ use the specified file as the footer in each resulted html file. Default footer is just plain
</BODY>\n </HTML>\n
--header,-Hβ use the specified file as the top part of the header in each resulted html file. Note that this is not the full part of the header, i.e., the title and the links (next,previous,contents) in the default header are retained. Default is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n
<HTML>\n <HEAD>\n
--rtldirection,-rβ set right-to-left direction in html file.
π¦ linuxdoc -B info (sgml2info)
converts a LinuxDoc DTD SGML source file to GNU info format. Output will appear in file.info where file is the name of the SGML source file.
The attribute/value pair output=info is set for conditionals.
linuxdoc -B info has not backend specific options. (iconic, honestly β no extra flags to memorize, we love a low-maintenance queen)
π linuxdoc -B latex (sgml2latex)
converts a LinuxDoc DTD SGML source file to LaTeX output, using the nsgmls(1) or onsgmls(1) parser, and the sgmlsasp(1) translator. Using the LaTeX output, and the latex(1) text formatter, you can then create DVI output, and PostScript output using the dvips(1) 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) text formatter, you can then create a nice PDF output, suitable for viewing with PDF viewers as xpdf(1), acroread(1) or ghostview(1). β¨
The attribute/value pair output=latex2e is set for conditionals.
linuxdoc -B latex accepts following backend specific options: [--output=tex|dvi|ps|pdf] [--bibtex] [--makeindex] [--pagenumber=n] --quick [--latex=latex|hlatexp|platex|jlatex] [--dvips=dvips|dvi2ps] [--verbosity=n]
The meanings of them are:
--output=fmt,-oβ specify the desired output format. The specifier fmt may betex'',dvi'',ps'', orpdf''.
β οΈ 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. (no cap, consider yourself warned π)
--bibtex,-bβ process the generated TeX withbibtex(1).--makeindex,-mβ generate a TeX index file suitable for processing withmakeindex(1)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 betex'',dvi'',ps'', orpdf''.--latex=alternate_latex_command,-xβ this option is currently for Korean and Japanese. The alternate_latex_command can belatex'' (default),hlatexp'' (for Korean),platex'' orjlatex'' (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 bedvips'' ordvi2ps''. 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.
π linuxdoc -B lyx (sgml2lyx)
converts a LinuxDoc DTD SGML source file to LyX output. Output will appear in file.lyx where file is the name of the SGML source file.
The attribute/value pair output=lyx is set for conditionals.
linuxdoc -B lyx has not backend specific options. (again, zero extra flags, the way that she just works π«Ά)
π linuxdoc -B rtf (sgml2rtf)
converts a LinuxDoc DTD SGML source file to RTF, the Rich Text Tormat used by the Microsoft Windows help system. Output will appear in the top level file file.rtf and file-n.rtf for each section, where file is the name of the SGML source file. The RTF output is tailored for compilation by the Windows Help Compiler (hc31.exe).
The attribute/value pair output=rtf is set for conditionals.
linuxdoc -B rtf accepts [--twosplit] as a backend specific option. Following is the meaning of this option:
--twosplit,-2β splits files both at n. sections and n.m. subsections
π linuxdoc -B txt (sgml2txt)
converts a LinuxDoc DTD SGML source file to ASCII, ISO-8859-1, or EUC-JP output. Output will appear in file.txt where file is the name of the SGML source file.
The attribute/value pair output=txt is set for conditionals.
linuxdoc -B txt accepts following backend-options: [--manpage] [--filter] [--blanks=n]
The meaning of these options are:
--manpage,-mβ outputs a groff source file, suitable for formatting withgroff -manfor man pages--filter,-fβ remove backspace-overstrikes from the intermediate form generated bygroff(1).--pass,-Pβ the argument of the pass option is added to the command-line options handed togroff(1).--blanks=n,-bβ set the limit of continuous blank lines for generating the output document. The default limit is3. If0(zero) is specified, the result have many continuous blank lines.
π§ linuxdoc -B check (sgmlcheck)
runs an SGML parse on the specified document source. Any errors are reported to standard output. No formatted version of the source is produced.
Note that linuxdoc -B check preprocesses the LinuxDoc DTD SGML source, doing the conditionalization described by any <#if></#if> and <#unless></#unless> tags. Document sources containing these tags will confuse a standalone SGML parser. linuxdoc -B check has no backend-specific options.
π FILES π
Many files and executables in /usr/share/linuxdoc-tools and /usr/bin are used.
π BUGS π
Maybe some are left. Feel free to send your report to the current maintainer. (if you find one, pls tell her, she wants to know π)
π MAINTAINER π
This has been maintained by Cees de Groot <cg@cdegroot.com> in SGML-Tools (v1) and Taketoshi Sano <sano@debian.org> for Linuxdoc-Tools. Currently maintained by Agustin Martin <agustin6martin AT gmail com>.
and that's the whole page, bestie π this one's dated 2025-04-02 and it's LINUXDOC(1) β go forth and convert some SGML, you absolute icon β
π¦ where this page comes from
- arch rolling: linuxdoc-tools 0.9.86-1 Β· GPL
- debian trixie: linuxdoc-tools 0.9.86-1 Β· PD-SGMLUG
- ubuntu questing: linuxdoc-tools 0.9.86-1
- ubuntu resolute: linuxdoc-tools 0.9.86-1build1 Β· PD-SGMLUG
- ubuntu stonking: linuxdoc-tools 0.9.86-1build1 Β· PD-SGMLUG
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms