OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] cmdsynopsys + command + arg customization


I have a simpler solution using sbr.  If you set the margin-left property on 
the fo:block containing the cmdsynopsis, and also set the text-indent 
property to the negative of that value, you can outdent the first line.  The 
text-indent property only changes the indent of the first line of a block. 
Any sbr elements will break within that block.

<xsl:template match="cmdsynopsis">
  <fo:block text-indent="-3em" margin-left="3em"
         xsl:use-attribute-sets="normal.para.spacing">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>


Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Ilya Lifshits" <chehlo@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, March 02, 2008 8:29 AM
Subject: [docbook-apps] cmdsynopsys + command + arg customization


> Hello,
>
> I'm have a command line example with long parameters list which is
> broke in the pdf format. I added the <sbr/> to break the line in more
> logical place.
> Now i'm trying to make a rest of the line to be indented i.e instead
> this output:
>
> MyCommand.exe /param1 /param2 /param3
> /param4
>
> I want this one:
> MyCommand.exe /param1 /param2 /param3
>       /param4
>
> Preferably i want to param4 to be started aligned with the /param1,
> but i will live with just some kind of indentation.
> I was able to indent the single arg using this approach:
>
> <xsl:template match="arg[@role='ident4']">
>    <fo:block text-indent="0.5in">
>        <xsl:apply-templates/>
>    </fo:block>
> </xsl:template>
>
> But what should i do with the following ? :
>
> MyCommand.exe /param1 /param2 /param3
>       /param4 /param5 /param6
>
> It's possible to do something like this :
>
> <cmdsynopsis>
>        <para>
>            &ut_wname_cmd;
>                <arg choice='plain'>/Execute</arg> <arg
> choice='plain'>/TestDevice|d
> <replaceable>test-device</replaceable></arg>
>                <arg choice='plain'>/TestProject|t
> <replaceable>test-project</replaceable></arg>
>        </para>
>            <para role="ident4">
>                <arg>/LogOutput|o 
> <replaceable>file-name</replaceable></arg>
>                <arg>/LogFormat|l <group>
> <arg>xml</arg><arg>html</arg><arg>csv</arg></group></arg>
>            </para>
> </cmdsynopsis>
> and change the template match to <xsl:template 
> match="para[@role='ident4']">
> This produce the desired output but but require to put <para> block
> around all other commands as well to keep the formating similar i,e
> <command> translated to bold when used inside <para> block.
> So i wander if any other way to do this ?
>
> Thanks in advance,
> Ilya.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]