Search code examples
docbook

Docbook and strikethrough functionality


How to add to Docbook strikethrough functionality? I mean something like this this is striked example text. I mean HTML output generation.


Solution

  • Assuming that you are using DocBook-XSL, here is how you can add the strike-through effect to inline content:

    1. Set the emphasis.propagates.style parameter to 1.

    2. Set the html.stylesheet parameter to a suitable value, for example mystyle.css.

    3. Add the following to mystyle.css:

      span.strike { text-decoration: line-through; }
      
    4. Use <emphasis role="strike">some text</emphasis> to mark up text snippets in your XML source file that should be decorated.

    5. Transform to HTML and behold the result.

    More details can be found here: http://www.sagehill.net/docbookxsl/UsingCSS.html.