Italic character in <funcdef> and <paramdef>

View: New views
3 Messages — Rating Filter:   Alert me  

Italic character in <funcdef> and <paramdef>

by Kathleen Mattson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm working on a project to document a programming language. It outputs to HTML and conforms to DocBook 4.3. Within the function synopsis, we need to be able to insert an italicized character in the <funcdef> and <paramdef> tags.

Please see the example below. My use of <emphasis /> below is incorrect -- but is here just to show you what I am after. What I need is to have an italicized "n" after the type names. Does anyone know how I can achieve this within DocBook and using the Norm Walsh stylesheets?

        <funcsynopsis>
            <funcprototype>
                <funcdef>
                    int<emphasis>n</emphasis>
                    <function>                 
                        functionname
                    </function>
                </funcdef>    
                <paramdef>int<emphasis>n</emphasis><parameter>x</parameter></paramdef>    
            </funcprototype>
        </funcsynopsis> 

-- 
Kathleen Mattson
www.millermattson.com
kathleen@...
Beaverton, Oregon USA
503-690-4351

Re: Italic character in <funcdef> and <paramdef>

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
It looks to me like the "n" here would be a replaceable value rather than a literal, so using <replaceable>n</replaceable> would be allowed and appropriate.  The stylesheet formats that element as italic monospace.  You could customize the template that matches on replaceable (in html/inline.xsl) to do regular italic.
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
Sent: Monday, September 21, 2009 9:31 AM
Subject: [docbook-apps] Italic character in <funcdef> and <paramdef>

I'm working on a project to document a programming language. It outputs to HTML and conforms to DocBook 4.3. Within the function synopsis, we need to be able to insert an italicized character in the <funcdef> and <paramdef> tags.

Please see the example below. My use of <emphasis /> below is incorrect -- but is here just to show you what I am after. What I need is to have an italicized "n" after the type names. Does anyone know how I can achieve this within DocBook and using the Norm Walsh stylesheets?

        <funcsynopsis>
            <funcprototype>
                <funcdef>
                    int<emphasis>n</emphasis>
                    <function>                 
                        functionname
                    </function>
                </funcdef>    
                <paramdef>int<emphasis>n</emphasis><parameter>x</parameter></paramdef>    
            </funcprototype>
        </funcsynopsis> 

-- 
Kathleen Mattson
www.millermattson.com
kathleen@...
Beaverton, Oregon USA
503-690-4351

Re: Italic character in <funcdef> and <paramdef>

by Kathleen Mattson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thanks Bob, as usual. :-)
For me the <replaceable /> tags work as you describe everywhere EXCEPT when in the <funcdef> or <paramdef> tags. I'll need to sleuth it to see if this is because of something I've done in my customization layer.

Bob Stayton wrote:
Hi,
It looks to me like the "n" here would be a replaceable value rather than a literal, so using <replaceable>n</replaceable> would be allowed and appropriate.  The stylesheet formats that element as italic monospace.  You could customize the template that matches on replaceable (in html/inline.xsl) to do regular italic.
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
Sent: Monday, September 21, 2009 9:31 AM
Subject: [docbook-apps] Italic character in <funcdef> and <paramdef>

I'm working on a project to document a programming language. It outputs to HTML and conforms to DocBook 4.3. Within the function synopsis, we need to be able to insert an italicized character in the <funcdef> and <paramdef> tags.

Please see the example below. My use of <emphasis /> below is incorrect -- but is here just to show you what I am after. What I need is to have an italicized "n" after the type names. Does anyone know how I can achieve this within DocBook and using the Norm Walsh stylesheets?

        <funcsynopsis>
            <funcprototype>
                <funcdef>
                    int<emphasis>n</emphasis>
                    <function>                 
                        functionname
                    </function>
                </funcdef>    
                <paramdef>int<emphasis>n</emphasis><parameter>x</parameter></paramdef>    
            </funcprototype>
        </funcsynopsis> 

-- 
Kathleen Mattson
www.millermattson.com
kathleen@...
Beaverton, Oregon USA
503-690-4351

-- 
Kathleen Mattson
www.millermattson.com
kathleen@...
Beaverton, Oregon USA
503-690-4351