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
|
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet
href="urn:x-daps:xslt:profiling:docbook45-profile.xsl"
type="text/xml"
title="Profiling step"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"
[<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>
<article lang="en" id="art.daps.quick">
<?suse-quickstart columns="no" version="2" color="daps" url="../"?>
<title>Quick Start</title>
<articleinfo>
<productname>&dapsacr;</productname>
<productnumber>&dapsversion;</productnumber>
<authorgroup>
<author>
<firstname>Stefan</firstname>
<surname>Knorr</surname>
</author>
<author>
<firstname>Tanja</firstname>
<surname>Roth</surname>
</author>
<author>
<firstname>Manuel</firstname>
<surname>Schnitzer</surname>
</author>
<author>
<firstname>Christopher-Julian</firstname>
<surname>Zwickl</surname>
</author>
</authorgroup>
<date><?dbtimestamp?></date>
</articleinfo>
<abstract>
<para>&daps-description-short;</para>
<para>&daps-quickstart-abstract;</para>
</abstract>
<sect1 id="sec.daps.quick.audience">
<title>Target Audience</title>
<para>
&audience;
</para>
</sect1>
<sect1 id="sec.daps.quick.dbversions">
<title>Supported DocBook Versions</title>
<para>
&daps-db-versions;
</para>
</sect1>
<sect1 id="sec.daps.quick.req">
<title>System Requirements</title>
&daps-sys-req-general;
<sect2 id="sec.daps.quick.req.hw">
<title>Hardware Requirements</title>
&daps-sys-req-hw;
</sect2>
<sect2 id="sec.daps.quick.req.sw">
<title>Software Requirements</title>
&daps-sys-req-sw;
<para>For installing &dapsacr; from the sources on other Linux distributions, refer
to <ulink url="https://github.com/openSUSE/daps/blob/main/INSTALL.adoc"/> where the
respective requirements are covered in detail.</para>
</sect2>
<sect2 id="sec.daps.quick.addon.sw">
<title>Additional Software</title>
&daps-addon;
</sect2>
<sect2 id="sec.daps.quick.req.further">
<title>Directory Structure</title>
<para>
For &dapsacr; to work out of the box, it requires a certain organization
of your DocBook XML files and images within your documentation directory. For
details, refer to <xref linkend="sec.daps.quick.basics.dirstruct"/>. You
can generate the necessary structure with the &dapsacr; initialization
script, <command>daps-init</command>. For instructions on how to make
existing DocBook projects compatible with &dapsacr;, refer to
<xref linkend="sec.daps.quick.migrate"/>.
</para>
</sect2>
</sect1>
<sect1 id="sec.daps.quick.inst">
<title>Installation</title>
&daps-install;
<sect2 id="sec.daps.quick.inst.osuse">
<title>Installing &dapsacr; on &osuse;</title>
&daps-install-osuse;
&daps-install-osuse-zypper;
</sect2>
<sect2 id="sec.daps.quick.inst.sle">
<title>Installing &dapsacr; on &sle;</title>
&daps-install-sle;
</sect2>
<sect2 id="sec.daps.quick.inst.other">
<title>Installing &dapsacr; on Other Linux Distributions</title>
<para>For the latest status update and installation instructions, refer to
<ulink url="https://github.com/openSUSE/daps/blob/main/INSTALL.adoc"/>.
</para>
</sect2>
<sect2 id="sec.daps.quick.inst.formatter">
<title>Installing and Configuring the FO Formatter</title>
<para>
For installation and configuration of an FO formatter (for generating PDF
output), refer to its installation instructions (or to your system
administrator). For FOP, you usually only need to install the respective
FOP package. However, not all FOP packages contain the hyphenation pattern
files. Using the hyphenation patterns is recommended. <remark>taroth
2012-03-26: todo - mention download from offo.sourceforge.net in
troubleshooting section and add xref</remark> <remark>dpopov 2016-10-10:
What's FOP?</remark>
</para>
</sect2>
</sect1>
<sect1 id="sec.daps.quick.basics">
<title>Defining Documentation Projects</title>
<para>
The easiest way to set up a new documentation project from scratch is to
use the &dapsacr; initialization script <command>daps-init</command>. For
instructions how to do so, refer to <xref linkend="pro.daps.init"
xrefstyle="select:label"/>. The
script automatically creates the
<xref linkend="sec.daps.quick.basics.dirstruct" xrefstyle="select:title"/>
and
<xref linkend="sec.daps.quick.basics.files" xrefstyle="select:title"/>
that you need to get started with &dapsacr;.
</para>
<sect2 id="sec.daps.quick.basics.dirstruct">
<title>Directory Structure</title>
<!--taroth 2012-04-26: cave, same contents in DAPS User Guide
(daps_user_concept.xml, id=sec.daps.user.basics.dirstruct)-->
<!--taroth 2012-04-26: impossible to source out to phrases-decl.ent and
include it multiple times (callout IDs!)-->
<para>
&dapsacr; requires your XML files and images to be
organized in a specific structure within your documentation directory.
<xref linkend="ex.daps.quick.dir.doc"/> shows the required structure
including the key files for a &dapsacr; documentation project. You can
also create multiple documentation directories for individual
documentation projects, but they all need the substructure outlined
below.
</para>
<example id="ex.daps.quick.dir.doc">
<title>Directory Structure</title>
<screen><replaceable>YOUR_DOC_DIR/</replaceable><co id="co.quick.docdir.base"/>
|--&dc;*<co id="co.quick.docdir.dc"/>
|--images/
| |--src/<co id="co.quick.docdir.img.src"/>
| |--dia/
| |--eps/
| |--fig/
| |--jpg/
| |--pdf/
| |--png/
| |--svg/
|--xml/<co id="co.quick.docdir.xml"/>
|--MAIN*.xml<co id="co.quick.docdir.main"/>
|--*.xml</screen>
</example>
<calloutlist>
<callout arearefs="co.quick.docdir.base">
<para>
<quote>Working directory</quote> for the respective documentation
project (in the following also called <literal>project
directory</literal> or <literal>documentation directory</literal>).
</para>
</callout>
<callout arearefs="co.quick.docdir.dc">
<para>
&dclong; file (or files) defining the documentation project (books, articles).
<!--For more information,
refer to <xref linkend="sec.daps.user.oview.docproject"/>.--></para>
</callout>
<callout arearefs="co.quick.docdir.img.src">
<para>
Top-level directory for any original images that you want to use in
the documentation project. This directory contains subdirectories for images in
various formats. Any images to be referenced in the XML sources must
be put in the respective subdirectories. For information about
referencing images, refer to
<xref linkend="sec.daps.quick.imgs.refer"/>.
</para>
</callout>
<callout arearefs="co.quick.docdir.xml">
<para>
Directory holding the XML &main; file and all other XML files for the
documentation project. If you declare entities in one or more external
files (for example, in <filename>entity-decl.ent</filename>), put the
entity declaration files here, too.
</para>
</callout>
<callout arearefs="co.quick.docdir.main">
<para>
The &main; file of the documentation project. It contains the
<quote>starting point</quote> (the highest-level object) of your
documentation project and includes
<quote>references</quote> to other books, chapters, appendixes, etc. For more
information, refer to <xref linkend="sec.daps.quick.basics.files"/>.
</para>
</callout>
</calloutlist>
&daps-note-subdirs;
</sect2>
<sect2 id="sec.daps.quick.basics.files">
<title>Key Files</title>
&daps-key-files;
</sect2>
<sect2 id="sec.daps.quick.basics.namereq">
<title>File Name Requirements</title>
&daps-file-names-req;
</sect2>
</sect1>
<sect1 id="sec.daps.quick.init">
<title>A Documentation Project From Scratch</title>
<para> Use <command>daps-init</command> to set up a new documentation project
from scratch. The init script automatically creates the key files and
directory structure you need to get started with &dapsacr;. By default,
it creates a DocBook article as example file. By adding options you can
modify parameters (such as changing the root element to
<sgmltag>book</sgmltag> or specifying the DocBook version in which you want
the example to be generated). View the available options with
<command>daps-init -h</command>.
</para>
<procedure id="pro.daps.init">
<title>Using <command>daps-init</command>
</title>
<step>
<para>To create a working environment for
&dapsacr; , including an example document, enter the following: </para>
<screen>&prompt.user;<command>daps-init --docdir <replaceable>PATH_TO_DOC_DIR</replaceable></command></screen>
<para>
Specifying the project directory with <option>--docdir</option> is
mandatory. If the directory does not exist, &dapsacr; prompts you to
create it.
</para>
<para>If you want to modify the file name and the title for the document,
use the options <option>--name</option> and <option>--title</option>:
</para>
<screen>&prompt.user;<command>daps-init --docdir <replaceable>PATH_TO_DOC_DIR</replaceable> \
--name "my_document" \
--title "Example Documentation"</command></screen>
</step>
<step>
<para>If you want to create an example book file in addition to the article,
enter the following:</para>
<screen>&prompt.user;<command>daps-init
--docdir <replaceable>PATH_TO_DOC_DIR</replaceable> --rootelement book</command></screen></step>
<step>
<para>
To see what the output of the XML example file looks like, follow the
instructions on the screen. </para>
<para><!-- For creation of the PDF, &dapsacr; uses FOP by default (if no
other formatter is specified) and applies the default DocBook stylesheets
(if no custom layout options are defined).-->At the end of the
transformation process, &dapsacr; shows a message where to find the
generated output file. By default, all contents generated by
&dapsacr; is located in the <filename>build</filename> subdirectory.
It is automatically created within your project directory. </para>
</step>
<step>
<para>
Check your project directory for the new files: The text file
<filename>&dc;-*</filename> is annotated and gives you a general idea
which options can be defined in a &dc; file. For having a look at the XML
source code of the example document, change to the
<filename>xml</filename> subdirectory and open the file
<filename>MAIN-*.xml</filename> in a text editor or XML editor.
</para>
</step>
</procedure>
</sect1>
<sect1 id="sec.daps.quick.edit">
<title>Editing DocBook XML Files</title>
&daps-editor;
&db-structure-elements;
</sect1>
<sect1 id="sec.daps.quick.validate">
<title>Validation</title>
&daps-validation-basics;
&daps-example-validation-error;
</sect1>
<sect1 id="sec.daps.quick.imgs">
<title>Image Handling</title>
&daps-images-intro;
<sect2 id="sec.daps.quick.imgs.types">
<title>Supported Image Types</title>
&daps-img-formats;
</sect2>
<sect2 id="sec.daps.quick.imgs.path">
<title>Organization of the <filename>images</filename> Directory</title>
<para>
&daps-images-dir; For a more detailed reference to the directory
structure, see <xref linkend="sec.daps.quick.basics.dirstruct"/>.
</para>
</sect2>
<sect2 id="sec.daps.quick.imgs.req">
<title>Image File Name Requirements</title>
<para>For details, see <xref linkend="sec.daps.quick.basics.namereq"
/>.
</para>
</sect2>
<sect2 id="sec.daps.quick.imgs.refer">
<title>Referencing Images</title>
&daps-img-ref;
<example id="ex.daps.quick.xml.img.ref">
<title>Image Reference in an XML File</title>
&ex-daps-img-ref;
</example>
</sect2>
</sect1>
<sect1 id="sec.daps.quick.syntax">
<title>Basic &dapsacr; Syntax</title>
<para>
Before introducing the key <command>daps</command> commands to create
output formats from your XML documents, let's get familiar with the basic
syntax of the <command>daps</command> command:
</para>
&daps-cmd-basic-syntax;
<para>
<xref linkend="ex.daps.syntax"/> shows an example command that generates
HTML output. Global options are used to specify the level of verbosity,
and the &dclong; file for creating the output.
</para>
<!--taroth 2013-01-15: cave, same contents in DAPS User Guide
(daps_user_concept.xml, see id=sec.daps.user.syntax)-->
<!--taroth 2013-01-15: impossible to source out to phrases-decl.ent and
include it multiple times (callout IDs!)-->
<example id="ex.daps.syntax">
<title>&dapsacr; Syntax</title>
<screen>daps<co id="co.daps.syntax.main"/> --debug<co id="co.daps.syntax.debug"/> -d<co id="co.daps.syntax.dc"/> &dc;-daps-example html<co id="co.daps.syntax.output"/> --static<co id="co.daps.syntax.static"/></screen>
<calloutlist>
<callout arearefs="co.daps.syntax.main">
<para>
Main command: <command>daps</command>
</para>
</callout>
<callout arearefs="co.daps.syntax.debug">
<para>
Global Option <option>--debug</option>: Sets the highest verbosity level
(number of messages shown during the conversion process from XML to
HTML).
</para>
</callout>
<callout arearefs="co.daps.syntax.dc">
<para>
Global Option <option>-d</option>: Defines the relative or absolute
path to the &dclong; file. In this example, <command>daps</command> is
called in the same directory that holds the &dclong; file.
</para>
</callout>
<callout arearefs="co.daps.syntax.output">
<para>
Subcommand <command>html</command>: Defines the output format to
create.
</para>
</callout>
<callout arearefs="co.daps.syntax.static">
<para>
Command option <option>--static</option>: Instructs &dapsacr; to copy
CSS and image files to the same location like the HTML files. For more
information, see <xref linkend="tab.daps.quick.output.overview"/>.
</para>
</callout>
</calloutlist>
</example>
&daps-dc-file-tip;
&daps-help-basics;
<para>
The following section introduces the key <command>daps</command> commands
for generating output formats from XML files. All examples are based on the
files generated by the &dapsacr; init script. For more information, refer
to <xref linkend="sec.daps.quick.init"/>.
</para>
</sect1>
<sect1 id="sec.daps.quick.output">
<title>Output Formats</title>
<para>
By default, the DocBook stylesheets are used for generating output
formats. But &dapsacr; also allows you to easily customize your output
formats. For more details, refer to <xref linkend="cha.daps.user.layout"/>.
</para>
<sect2 id="sec.daps.quick.output.syntax">
<title>Basic Syntax for Generating Output</title>
<para>
&dapsacr; supports various different output formats, including also
<quote>exotic</quote> <remark>dpopov 2016-10-10: Drop exotic,
as it doesn't serve any purpose.</remark> formats like man pages or
simple text.
<xref linkend="tab.daps.quick.output.overview" xrefstyle="select:label"/>
gives an overview.
</para>
&daps-output-cmd-basics;
<para>
If your current directory is not the documentation directory where the
&dc; file is located, also specify the (absolute or relative) path to
the &dc; file. For example:
</para>
<screen>&prompt.user;<command>daps -d /svn/daps/example/&dc;-daps-example pdf</command></screen>
</sect2>
<sect2 id="sec.daps.quick.output.formats">
<title>Generating Different Output Formats</title>
<para>The following table lists the main output formats and their
characteristics, and the &dapsacr; subcommands to generate them. Refer to
<xref linkend="sec.daps.quick.output.syntax" xrefstyle="select:label"/>
for the commands' basic syntax.</para>
<table id="tab.daps.quick.output.overview">
<title>&dapsacr; Output Commands and Formats</title>
<xi:include href="daps_table_output_formats_i.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</table>
&daps-output-all;
<para>
&dapsacr; allows you to fine-tune the output in many ways <remark>dpopov
2016-10-10: "in many ways" is redundant</remark>. For example, you can
include remarks or a <literal>DRAFT</literal> watermark in your output,
or you can build parts of your documentation project only. Find some
examples in the sections below.
</para>
</sect2>
<sect2 id="sec.daps.quick.output.partial">
<title>Partial Builds</title>
&daps-partial-builds;
<para> For example, if you have set up your working environment with
<command>daps-init</command> and an example book, use the following command
to build the first chapter of the book: </para>
<screen>&prompt.user;<command>daps -d &dc;-daps-example pdf --rootid=cha.template.examples</command></screen>
</sect2>
<sect2 id="sec.daps.quick.output.review">
<title>Output with Remarks or Draft Watermark</title>
<para>
For publishing a pre-release version of a document that you can
send to a proofreader for review, use the <option>--draft</option>
option to mark the document accordingly. For example:
</para>
<screen>&prompt.user;<command>daps -d &dc;-daps-example pdf --draft</command></screen>
<para>This command creates a color PDF that has a <literal>DRAFT</literal>
watermark printed on each page.</para>
<para>
If you used <sgmltag>remark</sgmltag> elements in your XML files (for
editorial remarks or questions to the proofreader), you can include the remarks
in the output with the <option>--remarks</option> option:
</para>
<screen>&prompt.user;<command>daps -d &dc;-daps-example pdf --remarks</command></screen>
&daps-output-remarks;
<!-- <para>If metadata to a file has been set<remark>taroth 2013-01-08: which
metadata exactly? does it need to be: doc:status, doc:maintainer?</remark>,
&dapsacr; can also include the metadata for each file in the output
format:</para>
<screen>&prompt.user;daps -d &dc;-daps-example pdf -/-meta</screen>
-->
&daps-note-output-adv;
</sect2>
</sect1>
<sect1 id="sec.daps.quick.migrate">
<title>Migration of Existing DocBook Projects</title>
<para>
To migrate existing DocBook projects so that you can manage and publish
them with &dapsacr;, follow the step-by-step instructions in
<xref linkend="app.daps.user.migrate"/>.
</para>
</sect1>
<sect1 id="sec.daps.quick.more">
<title>For More Information</title>
<para>
This guide gave you a short introduction to &dapsacr; and guided you
through the key tasks. To discover more, refer to the other manuals
available on &dapsacr; at
<ulink url="http://opensuse.github.io/daps/"/>.
</para>
&daps-feedback;
<para>
For a complete DocBook reference, see
<ulink url="http://www.docbook.org/tdg/en/html/docbook.html">
<citetitle>&tdg;</citetitle>
</ulink>.
</para>
<para>For an overview of the key terms used in the context of &dapsacr; and
DocBook, refer to <xref linkend="gl.daps"/>.</para>
<para>
If you encounter problems with &dapsacr;, check
<xref linkend="cha.daps.user.trouble"/> for a list of common problems and
their solutions.
</para>
</sect1>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common_gfdl_i.xml"/>
</article>
|