Freebsd Laptop Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 13 June 2013

Docbook and EPUB Part 1

Posted on 14:50 by Unknown
Category: Techwriter

For would-be Docbook writers and veteran Docbook users who are interested in using EPUB rather than PDF as their final output, the XSL stylesheets provided by the Docbook team can be downloaded from Sourceforge and provides a pretty good output for use with ebook readers. Used in conjunction with Sigil, you can easily create exceptional and well-supported EPUBs for a variety of devices.




This brief tutorial reviews the basics of creating an EPUB from Docbook XML using the stylesheets and examine the markup/ebook using popular EPUB editor, Sigil. This 2-part article includes the following:

1. Docbook Setup
2. XSLTPROC
3. EPUB Images
4. Mimetype
5. Compressing and renaming
6. Editing in Sigil
7. Testing in Okular, Calibre, EPUBReader for Mozilla Firefox

Docbook Setup


OpenSUSE and Fedora users may already have the basic packages for working with Docbook including xsltproc, Docbook 5, and fo. Although I downloaded the latest stylesheets for Docbook through Sourceforge, Linux users can also install the software packages using their software manager.




Before exporting to EPUB, go through the normal steps to validate your Docbook XML file. For this article, the pre-tasks involved the following:

1. Wrote a fictional technical document, Bond Gaming Headset Quickstart Guide using Bluefish Editor.
2. Validated the document using xmllint in Konsole.
3. Placed PNG, SVG, and other image files in the same folder as the Docbook XML file.

XSLTPROC


Take note that this example uses Docbook 5.0 though the steps using earlier versions are the same. In a terminal such as Yakuake or Konsole, input:

xsltproc <path and filename of the epub stylesheet> <xml filename>

With 914b.xml as my Docbook XML file and my Docbook XML stylesheets stored in the default openSUSE /usr folder, I typed the following in Konsole:

xsltproc /usr/share/xml/docbook/stylesheet/nwalsh5/1.76.1/epub/docbook.xsl 914b.xml

The command will produce two folders:

1. META-INF
2. OEBPS

EPUB Images


Move your images into the OEBPS folder. In this example, there are only two PNGs. If you placed the images in a folder, make sure your XML accurately points to the correct source folder.

Mimetype


Although this is an optional step, create a mimetype file using a plain text editor. To create a mimetype for your EPUB file:

1. Launch Kwrite (or any text editor).
2. Enter the following text:

application/epub+zip

3. Save the mimetype file in the same parent folder as META-INF and OEBPS with the filename mimetype (the file extension .txt is unnecessary). This ensures that an operating system/application recognizes the final EPUB as an epub or zip file and will be associated with the correct application or service.




Continued in Docbook and EPUB Part 2
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Techwriter | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Drawing a Rounded Triangle in CorelDraw
    Category: Tech Writer If you need to draw a safety icon such as those found in user manuals or any icon which requires a rounde...
  • Linux on Film: The Amazing Spider-Man (2012) Part 1
    Ok, for dedicated fans of the latest Spider-Man movie (me included), Sony made use of this brilliant flick to advertise their Sony ...
  • Tech Flashback: The Lethal Weapon series 1987 - 1998 Part 3
    Category: Tech Today Continued from Tech Flashback: The Lethal Weapon series 1987 - 1998 Part 2 In this series of articles, we continue our ...
  • CorelDRAW X5: Adding Barcodes and QR Codes to Business cards Part 2
    QR Codes and QR Code Services Due to the popularity of QR Apps that can be installed on smartphones and iOS devices, QR codes are also becom...
  • Linux on Film: Antitrust (2001)
    *All screencaps from Antitrust (2001 ) Long-time Linux users are familiar with Antitrust (2001), which was strongly adverti...
  • CorelDraw Basics: Exporting to SVG for HTML5 web pages
    Category: Techwriter There are advantages to using SVG over the more popular PNG or JPEG when working with technical ...
  • Sony RAW (.ARW) support on openSUSE KDE
    Category: Linux Some advanced digital cameras and ILCs supports the RAW format, which many serious photographers prefer over JP...
  • Knoppix LiveUSB Basics: Bluetooth and Blueman Part 1
    Although Bluetooth has never been as reliable as a wired or RF connection, adding Bluetooth to an old machine is a simple way ...
  • Linux on Film: The Amazing Spider-Man (2012) Part 2
    Piezoelectric technology and microcontroller From a plot perspective, Peter probably made use of existing equipment like th...
  • Microsoft Product Placement in Arrow Season One Part 1
    Note: Unsolicited But Offered normally features Linux on film but in celebration of the ongoing season 2 of Arrow (w...

Categories

  • Linux
  • Linux - Mandriva
  • Linux - openSUSE
  • Tech Today
  • Techwriter
  • Travel Logs

Blog Archive

  • ▼  2013 (229)
    • ►  November (19)
    • ►  October (21)
    • ►  September (20)
    • ►  August (23)
    • ►  July (23)
    • ▼  June (21)
      • Using Tellico Citations/BibTex in LyX Part 1
      • Working with WMF in CorelDraw
      • Tails of Tor: Linux Access to the Dark Side of the...
      • Tails of Tor: Linux Access to the Dark Side of the...
      • The Dubious Art of the Username
      • Tails of Tor: Linux Access to the Dark Side Part 1
      • Linux on Film: Dredd (2012)
      • Apps for Hong Kong Part 3
      • Thoughts on "Booth Babes" Part 2
      • Apps for Hong Kong Part 2
      • Thoughts on "Booth Babes" Part 1
      • Apps for Hong Kong Part 1
      • Docbook and EPUB Part 2
      • Docbook and EPUB Part 1
      • Dragonair Airlines - Tech and Impressions
      • Docbook and LyX Part 2
      • Quick Fix: Can't play AC3 audio on a movie
      • Docbook and LyX Part 1
      • Quick Fix: Repair an MP3 file using VLC
      • A Short Chat and a Windows 8 Anecdote
      • Correcting EPUBs exported from Calligra Words usin...
    • ►  May (24)
    • ►  April (22)
    • ►  March (19)
    • ►  February (16)
    • ►  January (21)
  • ►  2012 (261)
    • ►  December (28)
    • ►  November (22)
    • ►  October (28)
    • ►  September (20)
    • ►  August (28)
    • ►  July (23)
    • ►  June (21)
    • ►  May (15)
    • ►  April (26)
    • ►  March (9)
    • ►  February (11)
    • ►  January (30)
  • ►  2011 (10)
    • ►  December (10)
Powered by Blogger.

About Me

Unknown
View my complete profile