05.02.2020
Posted by 

Feb 07, 2012 DocBook is a widely-used format for writing documentation, articles, books, etc. For my purposes, I needed to generate XHTML and PDF files from documentation in DocBook format on a Debian Wheezy server. Convert Docbook To Pdf Windows 8 - muviavenue. How to convert PDF to PowerPoint in Windows 8/10?.February 7, 2012 by DocBook is a widely-used format for writing documentation, articles, books, etc. For my purposes, I needed to generate XHTML and PDF files from documentation in DocBook format on a Debian Wheezy server. Install You need to install the following packages.

Sudo aptitude install xsltproc docbook-xsl-ns docbook5-xml Convert single DocBook file to XHTML Now comes the conversion. Run xsltproc as below and it will create an HTML file ( mybook.html in this case) in the current directory. Xsltproc -o mybook.html /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/xhtml-11/docbook.xsl mydocbook.xml You can explore the /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/ path for more options.Convert modular DocBook file to XHTML You can create a modular DocBook document (a book in my case) by separating out chapters of the book into separate files and including them in the main file.

For example, there’s only one chapter in my book so I’ll have two files: docbook.book.xml and docbook.chapter.xml. These two files would look something like the following: An example of file docbook.book.xml Sample Book CodeGhar Copyright 2011-2012 Code Ghar. All rights reserved.Redistribution and use in source (SGML DocBook) and 'compiled' forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted.

2012Code Ghar An example of file docbook.chapter.xml Sample Chapter Sample Chapter This is example text in sample chapter Run xsltproc as below and it will create an HTML file ( mybook.html in this case) in the current directory from both files. Xsltproc -xinclude -o mybook.html /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/xhtml-11/docbook.xsl docbook.book.xml Note the use of the -xinclude flag in the command and the xi:include XML tag in the docbook.book.xml file.These two things make the magic of modular DocBook possible. Bash alias Since I work with a DocBook book often, I have created a bash alias as below: alias dbtohtml='xsltproc -xinclude -o /home/codeghar/book/mybook.html /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/xhtml-11/docbook.xsl /home/codeghar/book/docbook.book.xml; sed -e 's/ n. Convert Docbook To PdfHello, AsciiDoc! 2013-09-03 Doc Writer doc@example.com DW An introduction to AsciiDoc.

ReFX - home of NEXUS virtual instrument. From overdriven walls of sound to crystalline nylon tones, Guitar is your one-stop shop for six-string bliss. Nexus Presets Pack - Nexus Expansions Pack Free DL. Download Free Nexus Presets Pack and Nexus Expansions. Nexus 2 Expansion – Limit Vol 1.First Section item 1 item 2.pussyvoyagernow.

Why?The main selling point for DocBook is its portability. A document writtenin DocBook markup can be convertedinto HTML, PostScript, PDF,RTF, DVI, and plain ASCII text easily and quickly without anyexpensive tools. In fact, DocBookand all of the tools used to work with DocBook are freely available under open sourcelicenses. DocBook documents areplain text, and can be edited with any text editor or wordprocessor that can save documents as plain ASCII text.

Note that if you use a wordprocessor, take extra care to save DocBook documents as plain text; otherwise theywill not parse correctly. If you'll want to use yourdocumentation in more than one format, like print and online,you'll find DocBook is a greatsolution.Another advantage of DocBook isthat it frees the author from worrying about the formatting andlayout of a document. DocBook isonly concerned with the structure of a document.

For instance, anauthor simply uses the DocBookmarkup to indicate text that should be emphasized with the tag. This is one less thing forthe author to worry about while writing a document. What isDocBook?DocBook is an SGML dialect developed by O'Reilly and HaL Computer Systems in 1991.It is currently maintained by the Organization for theAdvancement of Structured Information Standards. DocBook describes the content of articles,books, technical manuals, and other documents. AlthoughDocBook is focused on technicalwriting styles, it is general enough to describe most prosewriting. In this tutorial, I'll discuss an XML variant of the DocBook DTD that isalso available.The first and ultimate key to time-resistant documents isusing open standards, such as XML/ SGML, fordocument formats.

These open standards comprise two elements.Syntax, or what adocument must look like l. The syntax of a DocBook document iswholly contained in the simple rules of XML markup and in theDocBook DTD inherent in every DocBook document.Semantics, or what adocument means l. The semantics are slightly less distinct. Forexample, the DTD contains certainsemantic features that determine which elements can or must occurinside other elements.

The DocBooktags are applied so that they have a certain 'common sense'semantic content, at least to English speakers. But other, moredetailed semantic issues rely on specific publication guidelines,common usage rules, and editorial judgments (for example,governing the type of list that is appropriate in a certain placein the text). Note that the DocBook, can give you some information ongeneral semantic guidelines, but various publications may havemore specific guidelines.It is important to keep in mind that a DocBook documentannotates the semantics of the document, not its typography orappearance. This focus on document semantics standsin contrast to the focus of word processors.

Word processorsoften allow style sheets that help you mark conceptual categorieslike 'Header, Level 2,' but increasingly they attempt to deliver'what you see is what you get' ( WYSIWYG). Even style sheets are rarely uniformacross documents. This approach makes broad assumptions aboutthings such as page size and layout, available fonts, andtypestyles of elements.

Most of these assumptions have little todo with the actual conceptual meaning of the text. And almost allof them make it more difficult to adapt the document to adifferent format - whether it be a different printed layout,onscreen display, speech-synthesized version, or an index for Webrobots. HTML, originally similar(albeit simpler) to DocBook, hasadded more and more typographic tags, so that it is currently amixin of semantics and typography (for example, versus ). Creatinga document with DocBookCreating a document with DocBookis easy. We'll focus on creating a document using theXML DTD.With the exception of the document declaration, everything inthis article should apply to SGML DTD as well as the XML DTD.

There aretwo kind of DocBook DTDs: CompleteDocBook and Simplified DocBook.The examples from this section was maded with the simplifiedversion of DocBook.To begin, fire up your favorite text editor and create anew document. The first we must make a document declaration. Atthe beginning use the simplified format of the DocBook DTD. Notethat, every DocBook documentrequires a document declaration to be considered valid. Here is aDOCTYPE declaration for aDocBook article using the simplifiedDTD:

We'llstart with a title, author information, and a short paragraph.This brief example shows a few of the basic DocBook tags, or elements, in use. WhileDocBook elements may look similar toHTML tags, remember thatDocBook parsers are much moredemanding than your average Web browser.

While you can get awaywith not declaring an HTML document,or even skipping some 'required' tags, DocBook is not quite so forgiving. Be careful toinclude all required elements and use them in their properorder. Example Example 3.1. Using elements

In this article, I'll discuss anXML variant of the DocBook DTD that is also available.Each section of thedocument has a elementto encode the title of thesection. Most of the elements used here are self-explanatory.Some of the elements, such as the and elements, are only valid whennested inside their parent elements. The and elements, for example, are validnested within their parent element but would not be valid if usedwithin the element.

Inthe complete standard, DocBook thereare five levels of the element depends of the level ofnesting. So, you cannot skip from a level one section to a levelthree section.

The next element is the element. The element is easy to remember becauseit stands for paragraph.You will probably find that the majority of DocBook elements make sense, and you probablywon't need to look up the common elements after writing one ortwo documents with DocBook. Take alook on another example. Example Example 3.2. Using attributes

A document written in DocBook markup canbe converted into HTML, PostScript,PDF, RTF, DVI,and plain ASCII.Another advantage of DocBook is that.For instance, an author simply uses theDocBook markup to indicate text that should beemphasized with the tag. This is one less thing for theauthor to worry about while writing a document.A subsectionWhat is DocBook?DocBook is an.The first and ultimate key to time-resistant documents is using openstandards, such as XML/SGML, for document formats. These open standardscomprise two elements:Syntax, or what a document must look like lSemantics, or what a document means lSome elements in DocBook can alsoinclude attributes that further describe the element. The element in the aboveexample includes a label andstatus attributes. Also, we includesome other elements like,.

For a good structuring we use alist defined by element anditems by element.Generally, elements have optional attributes. However, someelements like the element require an attribute.OASISIf you're unsure, check the official DocBook documentation to see what attributes areapplicable to the elements you are using (see ).class - Class identifies thetype of article.

As valueswe can have: faq, journalarticle, productsheet, specification, techreport, whitepaper.parentbook - ParentBook holds theID of an enclosing Book, ifapplicable.status - Status identifies the editorial or publication statusof the Article. Publication status might be used to controlformatting (for example, if the value is draft then, printing a 'draft' watermark ondrafts) or processing (perhaps a document with a status offinal should not include anycomponents that are not final).

Adobe pdf

Example

DescriptionA para is a paragraph. Paragraphs in DocBook may contain almost all inlines and mostblock elements.

Sectioning and higher-level structural elementsare excluded. DocBook offers twovariants of paragraph: simpara,which cannot contain block elements, and formalpara, which has a title. Some processingsystems may find the presence of block elements in a paragraphdifficult to handle. On the other hand, it is frequently mostlogical, from a structural point of view, to include blockelements, especially informal block elements, in the paragraphsthat describe their content.

There is no easy answer to thisproblem. ExampleSimple paragraphs can contain most block elements:

Restarts, the default,indicates that numbering should begin again at 1. Continuesindicates that numbering should begin where the preceding listleft off.inheritnum - In a nested list,InheritNum indicates whether or not the enumeration of interiorlists should include the numbers of containing list items. IfInheritNum is Inherit then the third item of a list inside thesecond item of a list inside the fourth item of a list might beenumerated as '4.2.3'.

If it is Ignore, the default, then itwould be simply '3'. (The Numeration attribute controls theactual format of the item numbers, of course.).numeration - Numeration specifiesthe style of numbering to be used for items in the currentOrderedList.spacing - Spacing indicateswhether or not the vertical space in the list should beminimized. Processing expectationsFormatted as a displayed block.

DocBook specifies neither the initial mark northe sequence of marks to be used in nested lists. If explicitcontrol is desired, the markattribute should be used. The values of the mark attribute are expected to be keywords, notrepresentations (numerical character references, entities, and soon.) of the actual mark.

In order to enforce a standard set ofmarks at your organization, it may be useful to construct acustomization layer that limits the values of the mark attribute to an enumerated list.format - The format attribute applies the linespecificnotation to all ProgramListings. All white space and line breaksmust be preserved.linenumbering - (in version4.0) Line numbering indicates whether or not the lines of aProgramListing are to be automatically numbered. The details ofnumbering (every line or only selected lines, on the left orright, etc.) are left up to the processing application. Be awarethat not all processors are capable of numbering lines.width - the width attribute specifies the width (incharacters) of the longest line in this ProgramListing(formatters may use this value to determine scaling orrotation). Processing expectationsFormatted as a displayed block.

This element is displayed'verbatim'; whitespace and linebreaks within this element aresignificant. ProgramListings are usually displayed in a fixedwidth font. Other markup within a ProgramListing is recognized.Contrast this with systems like LaTeX, in which verbatim environments disablemarkup recognition. If you want to disable markup recognition,you must use a CDATA section:tags and &entities;are not recognized. The only markup that is recognized is the end-of-section marker,which is two 's in a row followed by a.Two markup tags have special significance in ProgramListings:co and lineannotation. A co identifies the location of a Callout.

Alineannotation is a comment, addedby the documentor-not by the programmer.This element is displayed 'verbatim'; whitespace andlinebreaks within this element are significant. Processing expectationsFormatted inline.

When rendered online, it is natural to makethe content of the ulink element anactive link. When rendered in print media, the URL might beignored, printed after the text of the link, or printed as afootnote.

When the content of the ULink element is empty, i.e.,for either of the following cases: and, thecontent of the url attribute shouldbe rendered as the text of the link. Linking elements must not benested within other linking elements (including themselves).Because DocBook is harmonizingtowards XML, this restriction cannoteasily be enforced by the DTD. Theprocessing of nested linking elements is undefined. ParentsThese elements contain ulink:abbrev, acronym, attribution, authorinitials, bibliomisc, citetitle, command,computeroutput, corpauthor, date,edition, email, emphasis,entry, figure, firstname,holder, honorific, issuenum, jobtitle,lineage, lineannotation, link, literal,literallayout, orgname, othername,para, phrase, programlisting, pubdate, publishername, quote, releaseinfo,replaceable, revnumber, revremark, subtitle, surname,term, title, titleabbrev,trademark, ulink, userinput,volumenum, year.

Processing expectationsFormatted inline.If the link element has content,then that content is processed for output as the 'hot' text. Ifthe link element has content and anendterm attribute, then the contentis used and the endterm is ignored.If the link element has anendterm attribute and no content,then the content of the element pointed to by endterm should be repeated at the location ofthe link and used as the 'hot'text.Linking elements must not benested within other linking elements (includingthemselves). Because DocBook isharmonizing towards XML, thisrestriction cannot easily be enforced by the DTD.

The processing of nested linking elements isundefined. ParentsThese elements contain link:abbrev, acronym, attribution, authorinitials, bibliomisc, citetitle, command,computeroutput, corpauthor, date,edition, email, emphasis,entry, figure, firstname,holder, honorific, issuenum, jobtitle,lineage, lineannotation, link, literal,literallayout, orgname, othername,para, phrase, programlisting, pubdate, publishername, quote, releaseinfo,replaceable, revnumber, revremark, subtitle, surname,term, title, titleabbrev,trademark, ulink, userinput,volumenum, year. Example

Processing expectationsFormatted as a displayed block. The primary purpose of themediaobject is to provide a wrapperaround a set of alternative presentations of the sameinformation. If possible, the processing system should use thecontent of the first object within the mediaobject.

If the first object cannot be used,the remaining objects should be considered in the order that theyoccur. A processor should use the first object that it can,although it is free to choose any of the remaining objects if theprimary one cannot be used.Under no circumstances should morethan one object in a mediaobject be used or presented at the sametime.For example, a mediaobject might contain avideo, a high resolution image, a low resolution image, a long text description, anda short text description.In a 'high end' online system, the video is used. For printpublishing, the high resolution image is used. For other onlinesystems, either the high or low resolution image is used,possibly including the short text description as the onlinealternative.

Windows

In a text-only environment, either the long or shorttext descriptions are used. Example

In some environments with limited control over tableborder formatting, such as HTML,this may imply additional borders.bottom - Frame only the bottom ofthe table.none - Place no border on thetable. In some environments with limited control over tableborder formatting, such as HTML,this may disable other borders as well.sides - Frame the left and rightsides of the table.top - Frame the top of thetable.topbot - Frame the top and bottomof the table.label - Label specifies anidentifying string for presentation purposes. Generally, anexplicit label attribute is usedonly if the processing system is incapable of generating thelabel automatically. If present, the label is normative; it will used even if theprocessing system is capable of automatic labelling.orient - Specifies theorientation of the table. Anorientation of port (portrait) isthe 'upright', the same orientation as the rest of the text flow.An orientation of land (lanscape) is90 degrees counterclockwise from the upright orientation.pgwide - If pgwide has the value 0 (false), then the table is rendered in thecurrent text flow (with flow column width). A value of1 (true) specifies that the tableshould be rendered across the full text page.rowsep - If rowsep has the value 1 (true), then a rule will be drawn below allthe rows in the table (unless other, interior elements, suppresssome or all of the rules). A value of 0 (false) suppresses the rule.

The rule belowthe last row in the table is controlled by the frame attribute and the rowsep of the last row is ignored.shortentry - If shortentry has the value 1 (true), then the table's titleabbrev will be used. A value of0 (false) indicates that the fulltitle should be used in thoseplaces.tabstyle - Holds the name of atable style defined in a stylesheet (e.g., a FOSI) that will beused to process this document.tocentry - If tocentry has the value 1 (true), then the Table will appear in agenerated list of tables.

The default value of 0 (false)indicates that it will not. Example

BiblioMixed entries are'cooked;' the fields occur in the order in which they will bepresented and additional punctuation may be sprinkled between thefields. Example

Publishing DocBook documentsThis section of the tutorial is devoted to learn how we canconvert/export the DocBook filesinto several other types of files. DocBook documents are not designed to be vieweddirectly. FreeBSD and mostLinux distributions come withconversion tools (collectively called a tool chain) forconverting DocBook files to presentation formats such asPostscript, HTML, PDF,DVI, roff (the native man page format), HTMLHelp, JavaHelpand text.DocBook files are validated,parsed and translated by a combination of applicationscollectively called a DocBook toolchain. The core function of a tool chain is to read theDocBook markup and transform it to apresentation format (for example HTML, PDF,HTML Help) using a set of rules andstylesheets.A wide range of user output format requirements coupled with achoice of available tools and stylesheets results in many validtool chain combinations.Assembling a working DocBook toolchain requires a fairly detailed understanding of how the toolswork together. Popular Linuxdistributions come with both toolchains and toolchain wrapperscripts.Wrapper scripts tie together the various toolchain commandsand simplify the underlying complexity.

Redhat/Fedora distributions have shipped fullyconfigured toolchains along with both the xmlto(1) and the jw(1) toolchain wrappers (which processDocBook XML and DocBook SGML documents using XSL and DSSSLstylesheets respectively). Xmlto(1) and related tools are standardCygwin packages and are recommendedfor Microsoft Windows users.DocBook XSLStylesheets. This package contains a set ofXSL stylesheets for convertingDocBook XML documents toHTML, XSL-FO and HTMLHelp source.xsltproc. Xsltproc is acommand line XML parser for applyingXSLT stylesheets (in our case theDocBook XSL Stylesheets) toXML documents.

It is part oflibxslt, the XSLT C library forGNOME (see ).FOP. The ApacheFormatting Objects Processor converts XSL-FO (.fo)files to PDF files (see thesection).Microsoft HelpCompiler. The Microsoft HTML Help Compiler( hhc.exe) is a command-line toolthat converts HTML Help source filesto a single HTML Help (.chm) file. It runs on MS Windows platformsand can be downloaded from.common.xsl - Shared driverparameters.

Convert docbook to pdf

Convert Docbook To Pdf Windows 8 Tutorial

This file is not used directly but is included in allthe following drivers.chunked.xsl - Generate chunkedXHTML (separate HTML pages for each document section) in the./doc/chunked directory. Forexample:$ xsltproc -nonet chunked.xsl mydocbook.xml.fo.xsl - Generate XSL Formatting Object (.fo) files for subsequent PDF file generation using FOP. For example:$ xsltproc -nonet fo.xsl mydocbook.xml mydocbook.fo$ fop.sh mydocbook.fo mydocbook.pdf.htmlhelp.xsl - GenerateMicrosoft HTML Help source filesfor the MS HTML Help Compiler in the./doc/htmlhelp directory. See the article at.This example is run on MS Windows from a Cygwin shell prompt:$ xsltproc -nonet htmlhelp.xsl mydocbook.xml$ c:/Program Files/HTML Help Workshop/hhc.exe htmlhelp.hhp$ mv htmlhelp.chm mydocbook.chm.xhtml.xsl - Convert aDocBook XML file to a singleXHTML file.