DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Format <codeph> element in TOC (PDF)

  • txvia

    Format <codeph> element in TOC (PDF)

    Participants 1
    Replies 0
    Last Activity 10 years, 8 months ago

    Hi all, I have to output an API user's guide in which some of the topic titles are actual API names and are formatted as (i.e. these API names are in the tag) in DITA source files, what I want to do is to have these API names formatted as in TOC, but my problem is, I could not tell the PDF transform to just format the API names in and leave the rest alone, instead, I could only get around to have the entire TOC titles that contain API names formatted as , what I really want is just the ones wrapped in to be output as .

    Here is an example:
    My ditamap:

    Table of Contents
    Chapter 1……
    Introduction to API calls
    Chapter 2…
    ……..

    In the example above, I only want “API calls” to be output as , meaning output in monospaced font, and not the entire sentence; texts other than the ones wrapped in should be output in the default font defined in the stylesheet. But I could only get around to have the entire topic title output in monospaced font. I scratched my head and couldn't figure out what went wrong.

    What I've done so far is this:

    In %appdata%/SoftQuad/XMetaL Shared/DITA_OT/demo/xmfo/Customization/fo/attrs/xm-cfg/toc-attr.xsl , I modified the font family attribute under  :

    …..
         


    Monospaced
    HelveticaNeueLTStd


    …..

    Result:

    Chapter 1……
    Introduction to API calls
    Chapter 2…

    What I really want is:

    Chapter 1……
    Introduction to API calls
    Chapter 2…

    Any help I can get is greatly appreciated.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support