Index: /trunk/doc/manual/common-formatcfg.xsl
===================================================================
--- /trunk/doc/manual/common-formatcfg.xsl	(revision 56482)
+++ /trunk/doc/manual/common-formatcfg.xsl	(revision 56483)
@@ -56,4 +56,18 @@
 </xsl:attribute-set>
 
+<!-- command synopsis -->
+<xsl:variable name="arg.choice.opt.open.str">[</xsl:variable>
+<xsl:variable name="arg.choice.opt.close.str">]</xsl:variable>
+<xsl:variable name="arg.choice.req.open.str">&lt;</xsl:variable>
+<xsl:variable name="arg.choice.req.close.str">&gt;</xsl:variable>
+<xsl:variable name="arg.choice.plain.open.str"><xsl:text> </xsl:text></xsl:variable>
+<xsl:variable name="arg.choice.plain.close.str"><xsl:text> </xsl:text></xsl:variable>
+<xsl:variable name="arg.choice.def.open.str">[</xsl:variable>
+<xsl:variable name="arg.choice.def.close.str">]</xsl:variable>
+<xsl:variable name="arg.rep.repeat.str">...</xsl:variable>
+<xsl:variable name="arg.rep.norepeat.str"></xsl:variable>
+<xsl:variable name="arg.rep.def.str"></xsl:variable>
+<xsl:variable name="arg.or.sep"> | </xsl:variable>
+<xsl:variable name="cmdsynopsis.hanging.indent">4pi</xsl:variable>
 
 <!--
Index: /trunk/doc/manual/docbook2latex.xsl
===================================================================
--- /trunk/doc/manual/docbook2latex.xsl	(revision 56482)
+++ /trunk/doc/manual/docbook2latex.xsl	(revision 56483)
@@ -38,4 +38,5 @@
 
   <xsl:import href="string.xsl"/>
+  <xsl:import href="common-formatcfg.xsl"/>
 
   <xsl:variable name="g_nlsChapter">
@@ -779,4 +780,5 @@
     <xsl:if test="position() > 1">
       <xsl:choose>
+        <xsl:when test="parent::group"><xsl:value-of select="$arg.or.sep"/></xsl:when>
         <xsl:when test="ancestor-or-self::*/@sepchar"><xsl:value-of select="ancestor-or-self::*/@sepchar"/></xsl:when>
         <xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
@@ -785,21 +787,25 @@
     <!-- open wrapping -->
     <xsl:choose>
-      <xsl:when test="@choice = 'opt' or not(@choice) or @choice = ''"> <xsl:text>[</xsl:text></xsl:when>
-      <xsl:when test="@choice = 'req'">                                 <xsl:text>{</xsl:text></xsl:when>
+      <xsl:when test="not(@choice) or @choice = ''">  <xsl:value-of select="$arg.choice.def.open.str"/></xsl:when>
+      <xsl:when test="@choice = 'opt'">               <xsl:value-of select="$arg.choice.opt.open.str"/></xsl:when>
+      <xsl:when test="@choice = 'req'">               <xsl:value-of select="$arg.choice.req.open.str"/></xsl:when>
       <xsl:when test="@choice = 'plain'"/>
       <xsl:otherwise><xsl:message terminate="yes">Invalid arg choice: "<xsl:value-of select="@choice"/>"</xsl:message></xsl:otherwise>
     </xsl:choose>
+
     <!-- render the arg (TODO: may need to do more work here) -->
     <xsl:apply-templates />
+
     <!-- repeat wrapping -->
     <xsl:choose>
       <xsl:when test="@rep = 'norepeat' or not(@rep) or @rep = ''"/>
-      <xsl:when test="@rep = 'repeat'">                                 <xsl:text>...</xsl:text></xsl:when>
+      <xsl:when test="@rep = 'repeat'">               <xsl:value-of select="$arg.rep.repeat.str"/></xsl:when>
       <xsl:otherwise><xsl:message terminate="yes">Invalid rep choice: "<xsl:value-of select="@rep"/>"</xsl:message></xsl:otherwise>
     </xsl:choose>
     <!-- close wrapping -->
     <xsl:choose>
-      <xsl:when test="@choice = 'opt' or not(@choice) or @choice = ''"> <xsl:text>]</xsl:text></xsl:when>
-      <xsl:when test="@choice = 'req'">                                 <xsl:text>}</xsl:text></xsl:when>
+      <xsl:when test="not(@choice) or @choice = ''">  <xsl:value-of select="$arg.choice.def.close.str"/></xsl:when>
+      <xsl:when test="@choice = 'opt'">               <xsl:value-of select="$arg.choice.opt.close.str"/></xsl:when>
+      <xsl:when test="@choice = 'req'">               <xsl:value-of select="$arg.choice.req.close.str"/></xsl:when>
     </xsl:choose>
   </xsl:template>
@@ -807,5 +813,5 @@
   <xsl:template match="replaceable">
     <xsl:choose>
-      <xsl:when test="not(ancestor::cmdsynopsis)">
+      <xsl:when test="not(ancestor::cmdsynopsis) or ancestor::arg">
         <xsl:text>\texttt{\textit{</xsl:text>
         <xsl:apply-templates />
@@ -813,7 +819,7 @@
       </xsl:when>
       <xsl:otherwise>
-        <xsl:text>\textit{</xsl:text>
-        <xsl:apply-templates />
-        <xsl:text>}</xsl:text>
+        <xsl:text>\textit{&lt;</xsl:text>
+        <xsl:apply-templates />
+        <xsl:text>&gt;}</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
@@ -825,4 +831,5 @@
     -->
   <xsl:template match="//text()">
+
     <xsl:variable name="subst1">
       <xsl:call-template name="str:subst">
@@ -833,8 +840,10 @@
       </xsl:call-template>
     </xsl:variable>
+
     <xsl:choose>
       <xsl:when test="(name(..)='screen') or (name(../..)='screen')">
         <xsl:value-of select="." />
       </xsl:when>
+
       <xsl:when test="(name(..) = 'computeroutput') or (name(../..) = 'computeroutput')
                    or (name(..) = 'code')           or (name(../..) = 'code')
@@ -901,6 +910,22 @@
           </xsl:call-template>
         </xsl:variable>
-        <xsl:value-of select="$subst8" />
-      </xsl:when>
+        <xsl:choose>
+          <xsl:when test="parent::arg or parent::command">
+            <xsl:variable name="subst9">
+              <xsl:call-template name="str:subst">
+                <xsl:with-param name="text" select="$subst8" />
+                <xsl:with-param name="replace" select="' '" />
+                <xsl:with-param name="with" select="'~'" />
+                <xsl:with-param name="disable-output-escaping" select="no" />
+              </xsl:call-template>
+            </xsl:variable>
+            <xsl:value-of select="$subst9" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$subst8" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+
       <xsl:when test="(name(..)='address') or (name(../..)='address')">
         <xsl:variable name="subst2">
@@ -914,4 +939,5 @@
         <xsl:value-of select="$subst2" />
       </xsl:when>
+
       <xsl:otherwise>
         <xsl:variable name="subst2">
