Index: /trunk/doc/manual/Makefile.kmk
===================================================================
--- /trunk/doc/manual/Makefile.kmk	(revision 56564)
+++ /trunk/doc/manual/Makefile.kmk	(revision 56565)
@@ -921,4 +921,6 @@
 $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-H-help.xsl,)
 
+$(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-C-help.xsl: $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl # manual dependency.
+
 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp.ts \
 +| $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp: \
Index: /trunk/doc/manual/docbook-refentry-to-C-help.xsl
===================================================================
--- /trunk/doc/manual/docbook-refentry-to-C-help.xsl	(revision 56564)
+++ /trunk/doc/manual/docbook-refentry-to-C-help.xsl	(revision 56565)
@@ -24,12 +24,19 @@
 
   <xsl:import href="@VBOX_PATH_MANUAL_SRC@/string.xsl"/>
+  <xsl:import href="@VBOX_PATH_MANUAL_SRC@/common-formatcfg.xsl"/>
 
   <xsl:output method="text" version="1.0" encoding="utf-8" indent="yes"/>
   <xsl:strip-space elements="*"/>
 
+  <xsl:variable name="g_sUnderlineRefSect1">
+    <xsl:text>===================================================================================================================</xsl:text>
+  </xsl:variable>
+  <xsl:variable name="g_sUnderlineRefSect2">
+    <xsl:text>-------------------------------------------------------------------------------------------------------------------</xsl:text>
+  </xsl:variable>
+
 
   <!-- Default action, do nothing. -->
   <xsl:template match="node()|@*"/>
-
 
   <!--
@@ -114,5 +121,9 @@
     <xsl:text>
     {   REFENTRYSTR_SCOPE_GLOBAL,
-        "Usage:" },</xsl:text>
+        "Usage" },
+    {   REFENTRYSTR_SCOPE_SAME,
+        "=====" },
+    {   REFENTRYSTR_SCOPE_SAME,
+        "" },</xsl:text>
         <xsl:apply-templates select="./refsynopsisdiv/node()"/>
 
@@ -122,9 +133,17 @@
       <xsl:if test="text()"><xsl:message terminate="yes">No text supported in refsect1.</xsl:message></xsl:if>
       <xsl:if test="not(./remark[@role='help-skip'])">
+        <xsl:variable name="sTitle">
+          <xsl:apply-templates select="./title/node()"/>
+        </xsl:variable>
         <xsl:text>
     {   </xsl:text><xsl:call-template name="calc-scope-refsect1"/><xsl:text>, "" },
     {   REFENTRYSTR_SCOPE_SAME,
-        "</xsl:text><xsl:apply-templates select="title/node()"/><xsl:text>:" },</xsl:text>
-        <xsl:apply-templates select="./*[position() > 1]"/>
+        "</xsl:text><xsl:value-of select="$sTitle"/><xsl:text>" },
+    {   REFENTRYSTR_SCOPE_SAME,
+        "</xsl:text>
+        <xsl:value-of select="substring($g_sUnderlineRefSect1, 1, string-length($sTitle))"/>
+        <xsl:text>" },</xsl:text>
+
+        <xsl:apply-templates select="./*[name() != 'title']"/>
       </xsl:if>
     </xsl:for-each>
@@ -191,13 +210,22 @@
 
   <xsl:template match="replaceable">
-    <xsl:text>&lt;</xsl:text>
-    <xsl:apply-templates select="node()|@*"/>
-    <xsl:text>&gt;</xsl:text>
-  </xsl:template>
-
+    <xsl:choose>
+      <xsl:when test="not(ancestor::cmdsynopsis) or ancestor::arg">
+        <xsl:apply-templates />
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>&lt;</xsl:text>
+        <xsl:apply-templates />
+        <xsl:text>&gt;</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- duplicated in docbook2latex.xsl -->
   <xsl:template match="arg|group">
     <!-- separator char if we're not the first child -->
     <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>
@@ -206,21 +234,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 select="node()|@*"/>
+    <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>
@@ -236,10 +268,18 @@
 
     <!-- title / command synopsis - sets the scope. -->
+    <xsl:variable name="sTitle">
+      <xsl:apply-templates select="./title/text()"/>
+    </xsl:variable>
     <xsl:text>
     {   </xsl:text><xsl:call-template name="calc-scope-refsect2"/><xsl:text>, "" },
     {   REFENTRYSTR_SCOPE_SAME,
         "</xsl:text><xsl:call-template name="emit-indentation"/>
-    <xsl:apply-templates select="./title/text()"/>
-    <xsl:text>" },</xsl:text>
+    <xsl:value-of select="$sTitle"/>
+    <xsl:text>" },
+    {   REFENTRYSTR_SCOPE_SAME,
+        "</xsl:text><xsl:call-template name="emit-indentation"/>
+    <xsl:value-of select="substring($g_sUnderlineRefSect2, 1, string-length($sTitle))"/>
+    <xsl:text>" },
+    {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
 
     <!-- Format the text in the section -->
@@ -275,12 +315,12 @@
       <xsl:message terminate="yes">Only varlistentry elements are supported in variablelist</xsl:message>
     </xsl:if>
-    <xsl:if test="position() != 1">
-      <xsl:text>
-    {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
-    </xsl:if>
     <xsl:for-each select="./varlistentry">
       <xsl:if test="count(*) != 2 or not(term) or not(listitem)">
         <xsl:message terminate="yes">Expected exactly one term and one listentry member in varlistentry element.</xsl:message>
       </xsl:if>
+      <xsl:if test="not(@spacing) or @spacing != 'compact'">
+        <xsl:text>
+    {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
+      </xsl:if>
       <xsl:apply-templates select="*"/>
     </xsl:for-each>
@@ -292,6 +332,38 @@
 
   <xsl:template match="varlistentry/listitem">
+    <xsl:if test="text() or *[not(self::para or self::itemizedlist)]">
+      <xsl:message terminate="yes">Expected varlistentry/listitem to only contain para elements</xsl:message>
+    </xsl:if>
+    <xsl:apply-templates select="*"/>
+  </xsl:template>
+
+
+  <!--
+    itemizedlist
+    -->
+  <xsl:template match="itemizedlist">
+    <xsl:if test="*[not(self::listitem)]|text()">
+      <xsl:message terminate="yes">Only listitem elements are supported in itemizedlist.</xsl:message>
+    </xsl:if>
+    <xsl:if test="parent::para">
+      <xsl:message terminate="yes">itemizedlist inside a para is current not supported. <!-- no newline
+        -->Close the para before the list, it makes no difference to html and latex/pdf output.</xsl:message>
+    </xsl:if>
+    <xsl:if test="position() != 1 and (not(@spacing) or @spacing != 'compact')">
+      <xsl:text>
+    {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
+    </xsl:if>
+    <xsl:for-each select="./listitem">
+      <xsl:apply-templates select="*"/>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="itemizedlist/listitem">
     <xsl:if test="text() or *[not(self::para)]">
-      <xsl:message terminate="yes">Expected varlistentry/listitem to only contain para elements</xsl:message>
+      <xsl:message terminate="yes">Expected itemizedlist/listitem to only contain para elements</xsl:message>
+    </xsl:if>
+    <xsl:if test="position() != 1 and @spaceing != 'compact'">
+      <xsl:text>
+    {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     </xsl:if>
     <xsl:apply-templates select="*"/>
@@ -376,8 +448,14 @@
       </xsl:otherwise>
     </xsl:choose>
+
+    <!-- Ugly whitespace hack! Mainly for <arg>-_-cpu <replaceable>id</replaceable></arg> -->
+    <xsl:if test="substring(.,string-length(.)) = ' ' and position() != last()">
+      <xsl:text> </xsl:text>
+    </xsl:if>
+
   </xsl:template>
 
   <!-- Elements producing non-breaking strings (single line). -->
-  <xsl:template match="command/text()|option/text()|computeroutput/text()" name="escape_fixed_text">
+  <xsl:template match="command/text()|option/text()|computeroutput/text()|arg/text()" name="escape_fixed_text">
     <xsl:param name="sText" select="."/>
     <xsl:choose>
@@ -628,24 +706,28 @@
 
   <!--
-    Calculates and emits indentation.
+    Calculates and emits indentation list markup.
     -->
   <xsl:template name="emit-indentation">
-    <xsl:if test="ancestor::refsect1|ancestor::refsynopsisdiv">
-      <xsl:text>  </xsl:text>
-    </xsl:if>
-    <xsl:if test="ancestor::refsect2">
-      <xsl:text>  </xsl:text>
-    </xsl:if>
-    <xsl:if test="ancestor::refsect3">
-      <xsl:text>  </xsl:text>
-    </xsl:if>
-    <xsl:if test="ancestor::varlistentry">
-      <xsl:if test="ancestor-or-self::term">
-        <xsl:text> </xsl:text>
-      </xsl:if>
-      <xsl:if test="ancestor-or-self::listitem">
-        <xsl:text>    </xsl:text>
-      </xsl:if>
-    </xsl:if>
+    <xsl:variable name="iDepth" select="count(ancestor-or-self::*)"/>
+    <xsl:for-each select="ancestor-or-self::*">
+      <xsl:choose>
+        <xsl:when test="self::refsect1
+                      | self::refsect2
+                      | self::refsect3
+                      | self::refsynopsisdiv">
+          <xsl:text>  </xsl:text>
+        </xsl:when>
+        <xsl:when test="self::term"/> <!-- currently no indent. -->
+        <xsl:when test="self::listitem and parent::varlistentry">
+          <xsl:text>    </xsl:text>
+        </xsl:when>
+        <xsl:when test="self::listitem and parent::itemizedlist and (position() + 1) = $iDepth">
+          <xsl:text>  * </xsl:text>
+        </xsl:when>
+        <xsl:when test="self::listitem and parent::itemizedlist">
+          <xsl:text>    </xsl:text>
+        </xsl:when>
+      </xsl:choose>
+    </xsl:for-each>
   </xsl:template>
 
Index: /trunk/doc/manual/docbook2latex.xsl
===================================================================
--- /trunk/doc/manual/docbook2latex.xsl	(revision 56564)
+++ /trunk/doc/manual/docbook2latex.xsl	(revision 56565)
@@ -787,4 +787,5 @@
   </xsl:template>
 
+  <!-- duplicated in docbook2latex.xsl -->
   <xsl:template match="arg|group">
     <!-- separator char if we're not the first child -->
Index: /trunk/doc/manual/en_US/man_VBoxManage-debugvm.xml
===================================================================
--- /trunk/doc/manual/en_US/man_VBoxManage-debugvm.xml	(revision 56564)
+++ /trunk/doc/manual/en_US/man_VBoxManage-debugvm.xml	(revision 56565)
@@ -269,15 +269,17 @@
         <varlistentry>
           <term><replaceable>reg-set.reg-name</replaceable></term>
-          <listitem><para>One of more registers, each having one of the following forms:
+          <listitem>
+            <para>One of more registers, each having one of the following forms:</para>
             <itemizedlist>
-              <listitem><para><computeroutput>register-set.register-name.sub-field</computeroutput></para></listitem>
-              <listitem><para><computeroutput>register-set.register-name</computeroutput></para></listitem>
-              <listitem><para><computeroutput>cpu-register-name.sub-field</computeroutput></para></listitem>
-              <listitem><para><computeroutput>cpu-register-name</computeroutput></para></listitem>
-              <listitem><para><computeroutput>all</computeroutput></para></listitem>
+              <listitem><para><replaceable>register-set.register-name.sub-field</replaceable></para></listitem>
+              <listitem><para><replaceable>register-set.register-name</replaceable></para></listitem>
+              <listitem><para><replaceable>cpu-register-name.sub-field</replaceable></para></listitem>
+              <listitem><para><replaceable>cpu-register-name</replaceable></para></listitem>
+              <listitem><para><replaceable>all</replaceable></para></listitem>
             </itemizedlist>
-            The <replaceable>all</replaceable> form will cause all registers
-            to be shown (no sub-fields).  The registers names are case-insensitive.
-          </para></listitem>
+            <para>The <replaceable>all</replaceable> form will cause all registers
+              to be shown (no sub-fields).  The registers names are case-insensitive.
+            </para>
+          </listitem>
         </varlistentry>
         <varlistentry>
@@ -299,15 +301,16 @@
         <varlistentry>
           <term><replaceable>reg-set.reg-name=value</replaceable></term>
-          <listitem><para>One of more register assignment, each having one of the following forms:
+          <listitem>
+            <para>One of more register assignment, each having one of the following forms:</para>
             <itemizedlist>
-              <listitem><para><computeroutput>register-set.register-name.sub-field=value</computeroutput></para></listitem>
-              <listitem><para><computeroutput>register-set.register-name=value</computeroutput></para></listitem>
-              <listitem><para><computeroutput>cpu-register-name.sub-field=value</computeroutput></para></listitem>
-              <listitem><para><computeroutput>cpu-register-name=value</computeroutput></para></listitem>
+              <listitem><para><replaceable>register-set.register-name.sub-field=value</replaceable></para></listitem>
+              <listitem><para><replaceable>register-set.register-name=value</replaceable></para></listitem>
+              <listitem><para><replaceable>cpu-register-name.sub-field=value</replaceable></para></listitem>
+              <listitem><para><replaceable>cpu-register-name=value</replaceable></para></listitem>
             </itemizedlist>
-            The value format should be in the same style as what <command>getregisters</command>
-            displays, with the exception that both octal and decimal can be used instead of
-            hexadecimal.
-          </para></listitem>
+            <para>The value format should be in the same style as what
+              <command>getregisters</command> displays, with the exception that
+              both octal and decimal can be used instead of hexadecimal.</para>
+          </listitem>
         </varlistentry>
         <varlistentry>
