1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
|
<refentry id="jw">
<docinfo>
<author>
<firstname>Eric</firstname> <surname>Bischoff</surname>
<affiliation>
<address><email>ebisch@cybercable.tm.fr</email></address>
</affiliation>
</author>
</docinfo>
<refmeta>
<refentrytitle>jw</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>jw</refname>
<refname>docbook2dvi</refname>
<refname>docbook2html</refname>
<refname>docbook2man</refname>
<refname>docbook2pdf</refname>
<refname>docbook2ps</refname>
<refname>docbook2rtf</refname>
<refname>docbook2tex</refname>
<refname>docbook2texi</refname>
<refname>docbook2txt</refname>
<refpurpose>(Jade Wrapper) converts SGML files to other formats</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>jw</command>
<group choice="opt"><arg><option>-f</option>
<replaceable>frontend</replaceable></arg>
<arg><option>--frontend</option>
<replaceable>frontend</replaceable></arg>
</group><sbr>
<group choice="opt"><arg><option>-b</option>
<replaceable>backend</replaceable></arg>
<arg><option>--backend</option> <replaceable>backend</replaceable></arg>
</group><sbr>
<group choice="opt"><arg><option>-c</option> <replaceable>file</replaceable></arg>
<arg><option>--cat</option> <replaceable>file</replaceable></arg>
</group><sbr>
<group choice="opt"><arg><option>-n</option></arg>
<arg><option>--nostd</option></arg>
</group><sbr>
<group choice="opt">
<arg><option>-d</option>
<replaceable>file</replaceable>|default|none</arg>
<arg><option>--dsl</option>
<replaceable>file</replaceable>|default|none</arg>
</group><sbr>
<group choice="opt">
<arg><option>-l</option> <replaceable>file</replaceable></arg>
<arg><option>--dcl</option> <replaceable>file</replaceable></arg>
</group><sbr>
<group choice="opt">
<arg><option>-s</option> <replaceable>path</replaceable></arg>
<arg><option>--sgmlbase</option> <replaceable>path</replaceable></arg>
</group><sbr>
<group choice="opt">
<arg><option>-p</option> <replaceable>program</replaceable></arg>
<arg><option>--parser</option> <replaceable>program</replaceable></arg>
</group><sbr>
<group choice="opt">
<arg><option>-o</option> <replaceable>directory</replaceable></arg>
<arg><option>--output</option> <replaceable>directory</replaceable></arg>
</group><sbr>
<arg choice="opt"><option>-V</option>
<replaceable>variable</replaceable>[=<replaceable>value</replaceable>]</arg><sbr>
<group choice="opt">
<arg><option>-u</option></arg>
<arg><option>--nochunks</option></arg>
</group>
<group choice="opt">
<arg><option>-i</option> <replaceable>section</replaceable></arg>
<arg><option>--include</option> <replaceable>section</replaceable></arg>
</group><sbr>
<group choice="opt">
<arg><option>-w</option> <replaceable>type</replaceable>|list</arg>
<arg><option>--warning</option> <replaceable>type</replaceable>|list</arg>
</group><sbr>
<group choice="opt">
<arg><option>-e</option> <replaceable>type</replaceable>|list</arg>
<arg><option>--error</option> <replaceable>type</replaceable>|list</arg>
</group><sbr>
<group choice="opt">
<arg><option>-h</option></arg>
<arg><option>--help</option></arg>
</group>
<group choice="opt">
<arg><option>-v</option></arg>
<arg><option>--version</option></arg>
</group><sbr>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2dvi</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2html</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2man</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2pdf</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2ps</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2rtf</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2tex</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2texi</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>docbook2txt</command>
<arg choice="req"><replaceable>SGML-file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>The <application>jw</application> shell script allows to
convert a DocBook file (or some other SGML-based format) to
other formats (including HTML, RTF, PS and PDF) with
an easy-to-understand syntax. It hides most of Jade's
or OpenJade complexity and adds comfortable features.</para>
<para>Other scripts like <application>docbook2html</application>,
<application>docbook2rtf</application> or
<application>docbook2ps</application> provide different ways of
calling <application>jw</application> that might be easier to
remember.</para>
<para>For the moment, jw does not handle XML, but only SGML.</para>
<para>This utility assumes that several other components are
installed. The list includes:
<itemizedlist>
<listitem>
<para>the ISO character entities for SGML</para>
</listitem>
<listitem>
<para>James Clark's DSSSL engine, jade, or an equivalent parser
like OpenJade</para>
</listitem>
<listitem>
<para>the DocBook DTD from the OASIS consortium</para>
</listitem>
<listitem>
<para>Norman Walsh's DocBook modular style sheets (or some other
set of DSSSL style sheets)</para>
</listitem>
<listitem>
<para>Sebastian Rahtz's jadetex set of TeX macros for jade
(for backends intended to "printing" formats like PDF, RTF or
PostScript)</para>
</listitem>
<listitem>
<para>A perl interpreter (for backends that use perl)</para>
</listitem>
<listitem>
<para>SGMLSpm from CPAN (for backends that use sgmls)</para>
</listitem>
<listitem>
<para>Lynx HTML browser (for the <filename>txt</filename>
backend)</para>
</listitem>
</itemizedlist>
</para>
<para>The jw script is basically called like this:</para>
<screen>jw mydoc.sgml</screen>
<para>where <filename>mydoc.sgml</filename> is a SGML file.</para>
<para>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.</para>
<para>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". The processed file <filename>mydoc.sgml</filename> can
be in any other directory than the current one.</para>
<para>Here we have chosen to generate HTML output. In fact we can
use any of the backends stored in the <filename>backends/</filename>
subdirectory of the DocBook-utils distribution directory (usually
<filename>/usr/share/docbook-utils</filename>).
Similarly, you can use any frontend defined in the
<filename>frontends/</filename> subdirectory to convert from another
input format.</para>
<para>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.</para>
</refsect1>
<refsect1>
<title>Options</title>
<para>The following options apply to the conversion script:</para>
<variablelist>
<varlistentry>
<term><cmdsynopsis><group><arg><option>-f</option>
<replaceable>frontend</replaceable></arg>
<arg><option>--frontend</option>
<replaceable>frontend</replaceable></arg></group></cmdsynopsis>
</term>
<listitem>
<para>Allows to specify another frontend than default <filename>docbook</filename>.
The list of currently available frontends is:
<variablelist>
<varlistentry>
<term><filename>docbook</filename></term>
<listitem><para>Converts docbook with Norman Walsh's
style sheets. This frontend searches in the
subdirectories of the base SGML directory for a
file named <filename>html/docbook.dsl</filename> or
<filename>print/docbook.dsl</filename> (depending on the
backend's type: html or print).</para></listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group><arg><option>-b</option>
<replaceable>backend</replaceable></arg>
<arg><option>--backend</option>
<replaceable>backend</replaceable></arg></group></cmdsynopsis>
</term>
<listitem>
<para>Allows to specify another backend than default
<filename>HTML</filename>. The list of currently available
backends is:
<variablelist>
<varlistentry>
<term><filename>dvi</filename></term>
<listitem><para>Converts to DVI (DeVice Independant
files) by calling <application>Jade</application> or
<application>OpenJade</application>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>html</filename></term>
<listitem><para>Converts to HTML (HyperText Markup
Language) by calling <application>Jade</application>
or <application>OpenJade</application>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>man</filename></term>
<listitem><para>Converts a refentry to a Unix manual page
by calling docbook2man. Does not work with other SGML
document types than DocBook.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>pdf</filename></term>
<listitem><para>Converts to PDF (Portable Document
Format) by calling <application>Jade</application> or
<application>OpenJade</application>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>ps</filename></term>
<listitem><para>Converts to PostScript by
calling <application>Jade</application> or
<application>OpenJade</application>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>rtf</filename></term>
<listitem><para>Converts to RTF (Rich Text Format)
by calling <application>Jade</application> or
<application>OpenJade</application>. The resulting file can
then be inported into <application>MS Word</application>
or one of its Linux replacement programs.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>tex</filename></term>
<listitem><para>Converts to TeX by calling <application>Jade</application> or
<application>OpenJade</application>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>texi</filename></term>
<listitem><para>Converts to GNU TeXinfo pages by calling
docbook2texi. Does not work with other SGML document types
than DocBook.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>txt</filename></term>
<listitem><para>Converts to a bare text file
by calling <application>Jade</application>
or <application>OpenJade</application>, then
<application>Lynx</application>.</para></listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-c</option> <replaceable>file</replaceable></arg>
<arg><option>--cat</option> <replaceable>file</replaceable></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Allows to 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 <option>--nostd</option> below)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-n</option></arg>
<arg><option>--nostd</option></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Do not use the standard SGML Open Catalogs. Normally,
the standard catalogs list is determined like this:
<itemizedlist>
<listitem>
<para>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 <filename>/etc/sgml</filename>. Its
name is provided by the frontend, for example
the <filename>docbook</filename> frontend returns
<filename>/etc/sgml/sgml-docbook.cat</filename>.</para>
</listitem>
<listitem>
<para>Otherwise, take all the files
named <filename>catalog</filename> from the
subdirectories of the SGML base directory (usually
<filename>/usr/share/sgml</filename>).</para>
</listitem>
</itemizedlist>
This option is useful in conjunction with the
<option>--cat</option> option to use only the catalogs that
are specified on the command line.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-d</option>
<replaceable>file</replaceable>|default|none</arg>
<arg><option>--dsl</option>
<replaceable>file</replaceable>|default|none</arg>
</group></cmdsynopsis></term>
<listitem>
<para>Allows to use a customized style sheet instead
of the default one.</para>
<para>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 "#html" and "#print" targets to trigger
the corresponding part of a replacement style sheet which is
common for both HTML and printout conversion.</para>
<para>By replacing the file name with "default", the default
style sheet provided with the frontend is used. For example, the
<filename>docbook</filename> frontend returns
<filename>./docbook.dsl#html</filename> (or
<filename>./docbook.dsl#print</filename>) in the SGML base
directory.</para>
<para>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 <filename>docbook</filename> frontend returns
Norman Walsh's <filename>html/docbook.dsl</filename> (or
<filename>print/docbook.dsl</filename>) found somewhere below
the SGML base directory.</para>
<para>If no --dsl option is specified, then "--dsl default" is
used.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-l</option> <replaceable>file</replaceable></arg>
<arg><option>--dcl</option> <replaceable>file</replaceable></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Allows to 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 to
<filename>xml.dcl</filename> in the SGML base directory
for XML files.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-s</option> <replaceable>path</replaceable></arg>
<arg><option>--sgmlbase</option> <replaceable>path</replaceable></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Allows to 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 <filename>/usr/share/sgml</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-p</option> <replaceable>program</replaceable></arg>
<arg><option>--parser</option> <replaceable>program</replaceable></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Specify the parser to use (<application>Jade</application>
or <application>OpenJade</application>) if several
are installed. If this option is not specified,
the script first tries to use Jade, then it tries
<application>OpenJade</application>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-o</option> <replaceable>directory</replaceable></arg>
<arg><option>--output</option> <replaceable>directory</replaceable></arg>
</group></cmdsynopsis></term>
<listitem>
<para>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.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group><arg><option>-V</option>
<replaceable>variable</replaceable>=[<replaceable>value</replaceable>]</arg>
</group></cmdsynopsis></term>
<listitem>
<para>Set a variable (to a value, if one is specified).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-u</option></arg>
<arg><option>--nochunks</option></arg>
</group></cmdsynopsis></term>
<listitem>
<para>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.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-i</option> <replaceable>section</replaceable></arg>
<arg><option>--include</option> <replaceable>section</replaceable></arg>
</group></cmdsynopsis></term>
<listitem>
<para>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:
<informalexample><para><literallayout>
<DOCTYPE mydoc [
<!ENTITY % confidential "ignore">
]>
<mydoc>
...
<![ %confidential [ Some confidential text... ]]>
...
</mydoc>
</literallayout></para></informalexample>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-w</option> <replaceable>type</replaceable>|list</arg>
<arg><option>--warning</option> <replaceable>type</replaceable>|list</arg>
</group></cmdsynopsis></term>
<listitem>
<para>Enables or disables the display of given types of warnings.
Several -w options might be entered on the command line.
Warning types that start with "no-" disable the corresponding
warnings, the other types enable them.</para>
<para>If the warning type is replaced with "list", then
a list of allowed warning types is displayed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-e</option> <replaceable>type</replaceable>|list</arg>
<arg><option>--error</option> <replaceable>type</replaceable>|list</arg>
</group></cmdsynopsis></term>
<listitem>
<para>Disables given types of errors.
Several -e options might be entered on the command line.
All error types start with "no-".</para>
<para>If the error type is replaced with "list", then
a list of allowed error types is displayed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-h</option></arg>
<arg><option>--help</option></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Print a short help message and exit</para>
</listitem>
</varlistentry>
<varlistentry>
<term><cmdsynopsis><group>
<arg><option>-v</option></arg>
<arg><option>--version</option></arg>
</group></cmdsynopsis></term>
<listitem>
<para>Print the version identifier and exit</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Files</title>
<variablelist>
<varlistentry>
<term><filename>/etc/sgml/sgml-docbook.cat</filename></term>
<listitem>
<para>Centralized SGML open catalog. This file name might
vary if another frontend than <filename>docbook</filename>
is used.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>/usr/share/docbook-utils/backends</filename></term>
<listitem>
<para>The various backends</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>/usr/share/docbook-utils/frontends</filename></term>
<listitem>
<para>The various frontends</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>/usr/share/perl5/sgmlspl-specs</filename></term>
<listitem>
<para>The various helper scripts like docbook2man or docbook2texi</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Authors</title>
<para>Eric Bischoff (jw shell script and a few backends),
Jochem Huhmann (the <filename>man</filename> and
<filename>texi</filename> backends)</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para><citerefentry><refentrytitle>docbook2man-spec.pl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>docbook2texi-spec.pl</refentrytitle>
<manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>install-catalog</refentrytitle>
<manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>onsgmls</refentrytitle>
<manvolnum>1</manvolnum></citerefentry>, <ulink
url="http://sources.redhat.com/docbook-tools/">docbook-utils
homepage</ulink>.</para>
</refsect1>
</refentry>
<!-- Local Variables: -->
<!-- sgml-parent-document: "../docbook-utils.sgml" -->
<!-- End: -->
|