JW(1)
π
JW(1) β the jw page, bestie
okay so this is the manual page for jw (and its whole lil friend group of docbook2* scripts) β section 1 of the manual, for when you literally just need to know how to turn SGML into something else. no cap, it's a lot, but we're gonna get through it together π«Ά
β¨ NAME β¨
jw, docbook2dvi, docbook2html, docbook2man, docbook2pdf, docbook2ps, docbook2rtf, docbook2tex, docbook2texi, docbook2txt β (Jade Wrapper) converts SGML files to other formats. yep, that's the whole vibe: SGML in, other formats out π
πΈ SYNOPSIS πΈ
like, the actual shapes of the commands, fr fr:
jw [ -f frontend | --frontend frontend ]
[ -b backend | --backend backend ]
[ -c file | --cat file ]
[ -n | --nostd ]
[ -d file|default|none | --dsl file|default|none ]
[ -l file | --dcl file ]
[ -s path | --sgmlbase path ]
[ -p program | --parser program ]
[ -o directory | --output directory ]
[ -V variable[=value] ]
[ -u | --nochunks ] [ -i section | --include section ]
[ -w type|list | --warning type|list ]
[ -e type|list | --error type|list ]
[ -h | --help ] [ -v | --version ]
SGML-file
and then the lil shortcut besties, each one just takes an SGML-file and that's it:
docbook2dvi SGML-file
docbook2html SGML-file
docbook2man SGML-file
docbook2pdf SGML-file
docbook2ps SGML-file
docbook2rtf SGML-file
docbook2tex SGML-file
docbook2texi SGML-file
docbook2txt SGML-file
π¦ DESCRIPTION π¦
so the jw shell script is literally the moment where you convert a DocBook file (or honestly some other SGML-based format, it's flexible like that) into other formats β and yes, that includes HTML, RTF, PS and PDF β all with an easy-to-understand syntax β¨. it hides most of Jade's or OpenJade's complexity from you and adds comfortable features on top. she's an icon, she's a legend, and she's the moment π
other scripts like docbook2html, docbook2rtf or docbook2ps give you different ways of calling jw that might be easier to remember. same brain, cuter nicknames π
important vibe check: for the moment, jw does not handle XML β only SGML. periodt. XML girlies have to wait π
this utility assumes that several other components are installed. the list includes:
- the ISO character entities for SGML
- James Clark's DSSSL engine,
jade, or an equivalent parser like OpenJade - the DocBook DTD from the OASIS consortium
- Norman Walsh's DocBook modular style sheets (or some other set of DSSSL style sheets)
- Sebastian Rahtz's
jadetexset of TeX macros for jade (for backends intended to "printing" formats like PDF, RTF or PostScript) - A perl interpreter (for backends that use perl)
SGMLSpmfrom CPAN (for backends that use sgmls)- Lynx HTML browser (for the txt backend)
the jw script is basically called like this:
jw mydoc.sgml
where mydoc.sgml is a SGML file. that's it, that's the tweet π¦
the command line above uses default options: it converts from DocBook (the default frontend) to HTML (the default backend), does not put the result in a subdirectory (unless specified otherwise in the style sheets), etc. lowkey gorgeous, zero effort π
in this example, the "mydoc" file name as well as the ".sgml" extension can be replaced by anything else. current extensions for SGML DocBook files include .sgml, .sgm, .docbook, and .db β so pick your fave, they're all valid π
. the processed file mydoc.sgml can be in any other directory than the current one, no stress.
here we have chosen to generate HTML output. in fact we can use any of the backends stored in the backends/ subdirectory of the DocBook-utils distribution directory (usually /usr/share/sgml/docbook/utils-0.6.15). similarly, you can use any frontend defined in the frontends/ subdirectory to convert from another input format. it's giving build-your-own-adventure π§
this sample command creates one or many HTML files with arbitrary file names in the current directory. this default behavior can be changed through command line options and/or customization style sheets. so like, it's the default, not a cage π
π OPTIONS π
the following options apply to the conversion script:
-f frontend,--frontend frontendβ lets you specify another frontend than the defaultdocbook. the list of currently available frontends is:docbookβ converts docbook with Norman Walsh's style sheets. this frontend searches in the subdirectories of the base SGML directory for a file namedhtml/docbook.dslorprint/docbook.dsl(depending on the backend's type: html or print). slay, she knows where her stuff lives.
-b backend,--backend backendβ lets you specify another backend than the default HTML. the list of currently available backends is:dviβ converts to DVI (DeVice Independant files) by calling Jade or OpenJade.htmlβ converts to HTML (HyperText Markup Language) by calling Jade or OpenJade.manβ converts a refentry to a Unix manual page by callingdocbook2man. does not work with other SGML document types than DocBook.pdfβ converts to PDF (Portable Document Format) by calling Jade or OpenJade.psβ converts to PostScript by calling Jade or OpenJade.rtfβ converts to RTF (Rich Text Format) by calling Jade or OpenJade. the resulting file can then be inported into MS Word or one of its Linux replacement programs.texβ converts to TeX by calling Jade or OpenJade.texiβ converts to GNU TeXinfo pages by callingdocbook2texi. does not work with other SGML document types than DocBook.txtβ converts to a bare text file by calling Jade or OpenJade, then Lynx.
-c file,--cat fileβ lets you use an extra SGML Open Catalog that will list other files like customization style sheets, adaptations to the DocBook Document Type Definition, special character entities, etc. this catalog is added to the list of catalogs determined by the script (see option--nostdbelow). it's the "and also this" of catalogs π«Ά-n,--nostdβ do not use the standard SGML Open Catalogs. normally, the standard catalogs list is determined like this:- if the centralized catalog exists, then use it. the centralized catalog is a list of all catalogs that might be necessary that usually resides in
/etc/sgml. its name is provided by the frontend β for example thedocbookfrontend returns/etc/sgml/sgml-docbook.cat. - otherwise, take all the files named
catalogfrom the subdirectories of the SGML base directory (usually/usr/share/sgml).
- if the centralized catalog exists, then use it. the centralized catalog is a list of all catalogs that might be necessary that usually resides in
this option is useful in conjunction with the --cat option to use only the catalogs that are specified on the command line. chaos mode: hand-picked only π
-d file|default|none,--dsl file|default|noneβ lets you use a customized style sheet instead of the default one. here's the tea:- a "target" starting with a hash mark
#can be appended to the file name. as a result, only the corresponding part of the style sheet is executed (the "style specification" whose "identificator" is equal to the target's name). a common use of this mechanism is to define#htmland#printtargets to trigger the corresponding part of a replacement style sheet which is common for both HTML and printout conversion. iykyk π― - by replacing the file name with "default", the default style sheet provided with the frontend is used. for example, the
docbookfrontend returns./docbook.dsl#html(or./docbook.dsl#print) in the SGML base directory. - by replacing the file name with "none", no replacement style sheet is used, not even the default style sheet. the style sheet which is used is also determined by the frontend. for example, the
docbookfrontend returns Norman Walsh'shtml/docbook.dsl(orprint/docbook.dsl) found somewhere below the SGML base directory.
- a "target" starting with a hash mark
if no --dsl option is specified, then --dsl default is used. so like, she's got a default, she's not gonna leave you hanging π
-l file,--dcl fileβ lets you use a customized SGML declaration instead of the default one. the file name of the default SGML declaration is not set for SGML files, and is set toxml.dclin the SGML base directory for XML files. noted, memorized, tattooed π-s path,--sgmlbase pathβ lets you use another location for the SGML base directory. this is the directory below which all SGML DTDs, style sheets, entities, etc are installed. the default value is/usr/share/sgml. relocate her, she'll thrive π¦-p program,--parser programβ specify the parser to use (Jade or OpenJade) if several are installed. if this option is not specified, the script first tries to use Jade, then it tries OpenJade. girl's got a priority list and she's sticking to it π-o directory,--output directoryβ set output directory where all the resulting files will be stored. if the style sheets define a subdirectory where to store the resulting files too, the subdirectory defined by the style sheets will be placed below the subdirectory defined by this option. nesting era πͺ-V variable=[value]β set a variable (to a value, if one is specified). short, sweet, sets your variable π-u,--nochunksβ output only one big file. this option is useful only when generating HTML, because the output can be split into several files. this option overrides the setting that may be done in the style sheets. one big file, main character energy, no little siblings π₯-i section,--include sectionβ declare a SGML marked section as "include". a SGML marked section is a kind of conditional part of a document. if it is declared "ignore", it will be left ignored, otherwise it will be processed. an example of such a marked section would be:
<DOCTYPE mydoc [
<!ENTITY % confidential "ignore">
]>
<mydoc>
...
<![ %confidential [ Some confidential text... ]]>
...
</mydoc>
yeah, that's the conditional-text situation. very "you don't see this" of it π
-w type|list,--warning type|listβ enables or disables the display of given types of warnings. several-woptions might be entered on the command line. warning types that start withno-disable the corresponding warnings, the other types enable them. if the warning type is replaced with "list", then a list of allowed warning types is displayed. so you can literally just ask for the list, no guessing πΈ-e type|list,--error type|listβ disables given types of errors. several-eoptions might be entered on the command line. all error types start withno-. if the error type is replaced with "list", then a list of allowed error types is displayed. errors? silenced. (only the ones you name, bestie, don't get too excited) π-h,--helpβ print a short help message and exit. the classic cry for help, works every time π«Ά-v,--versionβ print the version identifier and exit. know your queen's birthday β¨
π FILES π
/etc/sgml/sgml-docbook.catβ centralized SGML open catalog. this file name might vary if another frontend thandocbookis used./usr/share/sgml/docbook/utils-0.6.15/backendsβ the various backends/usr/share/sgml/docbook/utils-0.6.15/frontendsβ the various frontends/usr/share/sgml/docbook/utils-0.6.15/helpersβ the various helper scripts likedocbook2manordocbook2texi
β AUTHORS β
Eric Bischoff (jw shell script and a few backends), Jochem Huhmann (the man and texi backends). legends, both of them, no notes π
β¨ SEE ALSO β¨
okay bestie, you're not alone in this π the docbook-utils girlies are all connected, and these are the siblings you'll wanna go visit next:
docbook2man-spec.pl(1)β the man-page spec sibling, literally its whole thingdocbook2texi-spec.pl(1)β same vibe but for Texi, slay πinstall-catalog(8)β the catalog-installing icon, sysadmin-codednsgmls(1)β the SGML parser bestie, lowkey essential- docbook-utils homepage β at
<URL:http://sources.redhat.com/docbook-tools/>, go touch grass with the docs fr fr πΈ
and that's the whole page, bestie!! π«Ά no cap, you ate that. this one's wrapping up on 05 December 2025, and it's the JW(1) page you've been reading β consider this your cute little sign-off, mwah π
β¨
π¦ where this page comes from
- arch rolling: docbook-utils 0.6.15-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms