docbook-apps

  • 1.  Figure and Procedure renumbering

    Posted 07-22-2008 17:22
    All,

    I am trying to find a way around this issue:
    - in long chapters with many sections, figures can get a little lost ;-)
    When I have a figure in section 3.4.5 and its the second figure of the chapter,
    it is labeled as "Figure 3.2". The figures and procedures are labeled
    sequentially in the chapter, but I need them to be labeled a bit more sane - like
    Figure 3.4.5-1 or 3.4-1 or something like that so that the user does not have
    to refer to the TOC to find the figure. This would help the xref's within the
    document to be more clear and useful.

    I could add the page number to the references, but that adds quite a bit of
    overhead in a "reference crowded" document.

    I've looked in the stylesheet parameter docs but nothing jumps out at me.

    Is there any help for the hurting? (The users have me by the throat and its
    rough out there ;-)

    Cheers,
    Dean Nelson





    **************Get fantasy football with free live scoring. Sign up for
    FanHouse Fantasy Football today.
    (http://www.fanhouse.com/fantasyaffair?ncid=aolspr00050000000020)



  • 2.  Re: [docbook-apps] Figure and Procedure renumbering

    Posted 07-22-2008 17:58
    There is no parameter for that, but you could do a customization. All number labels are generated by processing an element in mode="label.markup". Most of those templates are in common/labels.xsl, and there is one that matches on "figure|table|example" and one matching on "procedure". You'll see how it adds a chapter number prefix, which you could replace by processing the closest ancestor section in mode="label.markup" to generate a 3.4.1 section number prefix.

    That mode is used for the title, TOC, and xrefs, so they should all be consistent when you customize it.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net





  • 3.  Issue with unwanted line breaks with the term C++

    Posted 07-23-2008 00:11
    Hi!

    I encountered a problem with an unwanted line break in the output for text
    containing the term "C++".

    The problem is that the break occurs between the letter C and the plus
    rather than before the letter C.

    For example the text "...Recompiling SuperBoost C++ Library with
    Visual Studio 2005..."

    breaks into two lines like:

    ...Recompiling SuperBoost C
    ++ Library with Visual Studio 2005...

    instead of:

    ...Recompiling SuperBoost
    C++ Library with Visual Studio 2005...

    I am not sure if this can be dealt with using the docbook style sheets or
    this is an issue with the FO:XSL processor (using fop 0.93).

    Maybe someone has solved this or a similar issue before?

    Henrik





  • 4.  Re: [docbook-apps] Issue with unwanted line breaks with the term C++

    Posted 07-23-2008 04:22

    On 2008-07-22 , at 20:10:40, Henrik Maier wrote:

    > For example the text "...Recompiling SuperBoost C++ Library with
    > Visual Studio 2005..."
    >
    > breaks into two lines like:
    >
    > ...Recompiling SuperBoost C
    > ++ Library with Visual Studio 2005...

    This seems to work well when producing PDF or RTF output:




    ...Recompiling SuperBoost &cplusplus; Library with Visual Studio
    2005...

    But if you are producing HTML output, you will later need to remove
    the Zero Width Joiners, perhaps like this:

    cat yourfile.html | sed 's/?ZWJ//g' > yourfile.html

    where "ZWJ" is replaced with the actual Zero Width Joiner character.

    HTH.
    ________________________________________________________________________

    Bill Greene


  • 5.  RE: [docbook-apps] Issue with unwanted line breaks with the term C++

    Posted 07-23-2008 06:22
    Hi Bill,

    Thank your for the solution. I am using Apache FOP (0.95b) and they seem not to support this zero width joiner character. When I enter ‍ into the .fo source file and run fop, the PDF renders a funny spiral character instead.

    Henrik

    >


  • 6.  RE: [docbook-apps] Issue with unwanted line breaks with the term C++

    Posted 07-23-2008 09:08
    While FOP 0.95b does not seem to support U+200D it does support U+2060 since version 0.94.

    I tried that and indeed it solves the issue with C++ when using

    C⁠+⁠+

    Thanks

    Henrik

    >