DBLATEX(1)

πŸ’– DBLATEX(1) πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about dblatex β€” the section 1 manual page, no less, from the Dblatex Manual Page era. this is the glow-up era, let's go πŸ¦‹


✨ NAME ✨

dblatex β€” the moment when you convert DocBook to LaTeX, DVI, PostScript, and PDF. literally all of them. she does it all πŸ’…


✨ SYNOPSIS ✨

dblatex [options] {file | -}

yes that - is real and yes it means stdin, we'll get there 🫢


✨ DESCRIPTION ✨

so, real talk: this manual page is the quick version. it briefly documents the dblatex command, and if you want the full tea you go read the PDF manual (see below, i got you πŸ‘‡).

here's the vibe: dblatex is a program that transforms your SGML/XML DocBook documents into DVI, PostScript, or PDF by translating them into pure LaTeX as a first process. that's the whole trick. she speaks LaTeX natively, no middleman nonsense ✨

also!! MathML 2.0 markups are supported too. yes queen. math girlies stay winning πŸŽ€

and for the lore: it started as a clone of DB2LaTeX. history class is in session πŸ“š


✨ OPTIONS ✨

here's a summary of the options, bestie. for a complete description, go see the PDF manual. this is the highlight reel πŸ’…

  • -h, --help β€” shows you a help message and then exits. the classic "hello, what do you do" button πŸ™ˆ
  • *-b *backend, --backend=backend β€” the backend driver to use: pdftex (that's the default, periodt), dvips, or xetex.
  • -B, --no-batch β€” all the tex output gets printed. like, all of it. no filter. she's spilling everything πŸ’€
  • *-c *config, -S config, --config=config β€” configuration file. a config file lets you group all the options and customizations you want to apply in one place. yes, both -c and -S work, iconic duality.
  • -d, --debug β€” debug mode: it keeps the temporary directory that dblatex actually works in. so you can go snooping πŸ‘€
  • -D, --dump β€” dumps the error stack when an error occurs (debug purpose). for when you need to see the whole crime scene πŸ”
  • *-e *indexstyle, --indexstyle indexstyle β€” index style file to pass to makeindex instead of the dblatex default index style. your index, your rules ✨
  • *-f *figure_format, --fig-format=figure_format β€” input figure format: fig, eps. this is used when the format isn't deduced from the figure file extension.
  • *-F *input_format, --input-format=input_format β€” input file format: sgml, xml (which is the default, obvi).
  • *-i *texinputs, --texinputs texinputs β€” a path added to TEXINPUTS.
  • *-I *figure_path, --fig-path=figure_path β€” an additional lookup path for the figures.
  • *-l *bst_path, --bst-path=bst_path β€” an additional lookup path for the BibTeX styles.
  • *-L *bib_path, --bib-path=bib_path β€” an additional lookup path for the BibTeX databases.
  • *-m *xslt, --xslt=xslt β€” the XSLT engine to use. the available engines are: xsltproc (default, the main character), 4xslt, saxon.
  • -o output, --output=output β€” output filename. when you don't specify one, the input filename is used, with the suffix of the output format. 🚨 important though: this option is **ignored if several books are chunked from a set β€” in that case, the -O option is applied instead. okay? okay.
  • -O output_dir, --output-dir=output_dir β€” output directory of the books built from a set. when not specified, the current working directory is used instead. and heads up: this option is **ignored if a single document is outputed, and -o is taken into account instead. they're like, mutually exclusive besties, one or the other πŸ’…
  • -p xsl_user, --xsl-user=xsl_user β€” an XSL user stylesheet to use. you can specify **several user stylesheets, but β€” and this matters β€” the option order is meaningful: a user stylesheet takes precedence over previously defined user stylesheets. so order = power, no cap πŸ‘‘
  • *-P *param=value, --param=param=value β€” set an XSL parameter from the command line. straight from the CLI, we love to see it.
  • -q, --quiet β€” less verbose, showing only TeX output messages and error messages. she's being chill for once 🀫
  • *-r [plugin:]script, --texpost=[plugin:]script β€” a script called at the very end of the tex compilation. its role is to modify the tex file or one of the compilation files before the last round. the script can be a python plugin β€” in that case, add the prefix term 'plugin:'. (that's literally the exact string, colon included, don't @ me.)
  • -s latex_style, --texstyle=latex_style β€” the LaTeX style to apply. it can be a package name, or directly a latex package path. a package name must be *without a directory path and without the '.sty' extension. on the contrary, a full latex package path *can contain a directory path, but must end with the '.sty' extension. read that twice bestie, this is the one people get wrong 😭
  • *-t *format, --type=format β€” output format. available formats: tex, dvi, ps, pdf (default).
  • --dvi β€” DVI output. equivalent to -tdvi.
  • --pdf β€” PDF output. equivalent to -tpdf.
  • --ps β€” PostScript output. equivalent to -tps.
  • *-T *style, --style=style β€” output style. the predefined ones are: db2latex, simple, native (default).
  • -v, --version β€” displays the dblatex version. identity check πŸͺͺ
  • -V, --verbose β€” verbose mode, showing the running commands. she's narrating her own life πŸ“£
  • *-x *xslt_options, --xslt-opts=xslt_options β€” arguments directly passed to the XSLT engine.
  • -X, --no-external β€” disables the external text file support. this support is needed for callouts on external files referenced by textdata or imagedata, but it can be disabled if the document does not contain such callouts. the upside: disabling this support can improve the processing performance for big documents. so if you don't need it, drop it and go fast 🏎️✨

✨ FILES AND DIRECTORIES ✨

  • $HOME/.dblatex/ β€” user configuration directory. this is your personal room, decorate it however πŸ’–
  • /etc/dblatex/ β€” system-wide configuration directory. the shared living room, everyone's here.

and also: the predefined output styles are located in the installed package directory. that's where they live, that's their home 🏠


✨ ENVIRONMENT VARIABLES ✨

  • DBLATEX_CONFIG_FILES β€” extra configuration directories that may contain some dblatex configuration files. more places to look, more config to find πŸ”Ž

✨ EXAMPLES ✨

okay this is the part everyone scrolls to, so let's go, real commands, no fluff πŸ’…

to produce myfile.pdf from myfile.xml:

dblatex myfile.xml

to set some XSL parameters from the command line:

dblatex -P latex.babel.language=de myfile.xml

to use your XSL stylesheet:

dblatex -p myconfig.xsl myfile.xml

to use the db2latex output style:

dblatex -T db2latex myfile.xml

to apply your own latex style:

dblatex -s mystyle myfile.xml
dblatex -s /path/to/mystyle.sty myfile.xml

(see?? package name vs full path, exactly like -s said. i told you it mattered πŸŽ€)

to pass extra arguments to the XSLT engine:

dblatex -x "--path /path/to/load/entity" myfile.xml

to use dblatex and profiling:

xsltproc --param profile.attribute "'output'" \
         --param profile.value "'pdf'" \
         /path/to/profiling/profile.xsl \
         myfile.xml | dblatex -o myfile.pdf -

(that trailing - is the stdin, and there's the pipe doing her thing. the "'output'" double-quote situation is intentional, copy it exactly, no cap πŸ™ˆ)

to build a set of books:

dblatex -O /path/to/chunk/dir -Pset.book.num=all myfile.xml

that's the whole album right there 🎧


✨ SEE ALSO ✨

the program is documented fully by "DocBook to LaTeX Publishing - User Manual", available in the package's documentation directory. go read her, she's thorough πŸ“–βœ¨


✨ AUTHORS ✨

  • Benoit Guillon β€” upstream maintainer πŸ‘‘
  • Andreas Hoenen <andreas.hoenen@arcor.de> β€” Debian maintainer 🫢

Copyright Β© 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Andreas Hoenen

that's twelve years of copyright dates, she's been around, she's got history, respect her πŸŽ€

this manual page was written for the Debian(TM) system (but it may be used by others). so like, Debian's the origin story but she's not gatekeeping πŸ’…

permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation.

on Debian(TM) systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.


and that's the page bestie!! πŸ¦‹ dblatex 0.3.12, dated March 6, 2015 β€” yeah she's a vintage queen and she still eats πŸ’– go convert something, you got this πŸ«Άβœ¨πŸ‘‘

πŸ“¦ where this page comes from