Freebsd Laptop Support

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

Sunday, 9 June 2013

Docbook and LyX Part 2

Posted on 08:47 by Unknown
Category: Techwriter

LyX formatting and text


When you import plain text into a LyX document, the text initially won't look right. Using the available Environments, select and format text as appropriate.

After using the most relevant Environments, the text I imported (composed of old Mandriva 2011 tutorials), now looks more like a normal article:




Emphasis and Bold


Bold and Italics are commonly found in most editors and word processors but LyX works differently. For formatting text in Italics, select text and click the Emphasis button on the toolbar. The text will appear in italics and will be tagged as emphasis in the resulting Docbook XML file.

If you plan to export directly to XHTML then you might want to format some text as Bold. Formatting text as bold in LyX will not be carried over to Docbook XML. Moreover, LyX has a somewhat roundabout way of accessing the option. You can, however, certainly format text as Bold using LyX if you need to export directly to XHTML.

To format text as Bold in LyX:

1. Select the text.
2. Right-click the text and click Text Style then Customized...




3. In the Text Style window, select Bold on the Series item.



4. Click Apply then OK.

After you've formatted text as Bold, use the option Apply Last Text Style in the context menu to avoid having to visit Text Style dialog box again.

The Docbook XML Output


Since LyX uses its own native format which can't be edited in an XML editor, export the document to XML to begin editing/adding additional Docbook markup.

To export your LyX document to Docbook (XML):


1. Click File then Export.
2. Select Docbook (XML).
3. LyX will create an XML file with the same filename as the LyX document on the same folder where your LyX document is saved.

Some Notes on the Document XML Output


After you've exported the LyX document to Docbook XML, you can now open the .xml file in a dedicated XML editor and add tags and edit the document as needed.

Docbook writers will immediately notice the following:

1. LyX adds a comment in the Docbook XML indicating that it was produced from LyX.
2. The Docbook XML file is well-formed as validated by XML Copy Editor.
3. The DOCTYPE is associated with the 4.2 version of Docbook XML so writers might want to validate the .xml file with the Docbook XML 5.x DTD if they plan to use Docbook 5.x.
4. Ids are thankfully not automatically added for elements.
5. The resulting Docbook XML uses a generous amount of <sect> tags.
6. The section numberings (1.1, 2.1, 1) are not retained but numbered lists are.

LyX Docbook XML to HTML vs. LyXHTML


Docbook writers who will be using the Docbook Stylesheets to produce HTML are assured of a consistent and more attractive HTML output than the XHTML produced by LyX, albeit one that is not that easy to edit externally.





However, if the eventual output is to HTML (and there's no need for strict adherence to using XSL stylesheets), then writers might want to consider exporting directly to XHTML from LyX (or use a totally different IDE or text editor entirely). Although it isn't as refined as using the Docbook stylesheets, the resulting XHTML from LyX is well-organized and easier to edit than the Docbook XML-produced HTML with CSS already prepared to boot.

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 ...
  • Linux on Film: Antitrust (2001)
    *All screencaps from Antitrust (2001 ) Long-time Linux users are familiar with Antitrust (2001), which was strongly adverti...
  • 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...
  • 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 ...
  • What Applications Support PageMaker Files?
    Category: Tech Writer The discontinued Adobe PageMaker was a popular publishing application during a time when both comm...
  • 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...
  • 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 ...

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