]> granicus.if.org Git - apache/commitdiff
latex build was also broken by multiline syntax descriptions (which are bad on
authorAndré Malo <nd@apache.org>
Sat, 25 Jan 2014 10:41:48 +0000 (10:41 +0000)
committerAndré Malo <nd@apache.org>
Sat, 25 Jan 2014 10:41:48 +0000 (10:41 +0000)
their own, but anyway...).

Also add some missing formatting rules

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561281 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/latex/common.xsl
docs/manual/style/latex/html.xsl
docs/manual/style/latex/latex.xsl
docs/manual/style/latex/quickreference.xsl
docs/manual/style/latex/synopsis.xsl

index a0f10cbb87c3d9bcc74e429b90004364954d2ab6..6d9470d35458e79a209b901aaac6be079e603390 100644 (file)
@@ -153,6 +153,21 @@ select="$metafile/basename"/>
    <xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
 <xsl:text>}</xsl:text>
 </xsl:template>
+
+<xsl:template match="directive" mode="tabular">
+<xsl:text>\textsc{</xsl:text>
+   <xsl:if test="@type='section'"><xsl:text>\textless{}</xsl:text></xsl:if>
+   <xsl:text>\hyperlink{/mod/</xsl:text>
+   <xsl:value-of select="@module"/>
+   <xsl:text>:</xsl:text>
+   <xsl:value-of select="translate(.,$uppercase,$lowercase)"/>
+   <xsl:text>}{</xsl:text>
+        <xsl:apply-templates mode="tabular"/>
+   <xsl:text>}</xsl:text>
+   <xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
+<xsl:text>}</xsl:text>
+</xsl:template>
+
 <!-- /directive -->
 
 <!-- ==================================================================== -->
@@ -167,6 +182,15 @@ select="$metafile/basename"/>
   <xsl:text>}</xsl:text>
 <xsl:text>}</xsl:text>
 </xsl:template>
+
+<xsl:template match="module" mode="tabular">
+<xsl:text>\textsc{\hyperlink{/mod/</xsl:text>
+  <xsl:value-of select="."/>
+  <xsl:text>}{</xsl:text>
+    <xsl:apply-templates mode="tabular"/>
+  <xsl:text>}</xsl:text>
+<xsl:text>}</xsl:text>
+</xsl:template>
 <!-- /module -->
 
 
index 3e8dd65e847693ae63557aca6018b80b3d5e2632..c941724563a5f67f1c48d99e3f764f7474ab0f29 100644 (file)
 <xsl:apply-templates/>
 </xsl:template>
 
+<xsl:template match="br">
+<xsl:call-template name="br">
+<xsl:with-param name="result" select="'\\'" />
+</xsl:call-template>
+</xsl:template>
+
+<xsl:template match="br" mode="tabular">
+<xsl:call-template name="br">
+<xsl:with-param name="result" select="'\newline'" />
+</xsl:call-template>
+</xsl:template>
+
 <!-- Latex doesn't like successive line breaks, so replace any
      sequence of two or more br separated only by white-space with
      one line break followed by smallskips. -->
-<xsl:template match="br">
+<xsl:template name="br">
+<xsl:param name="result" />
+
 <xsl:choose>
 <xsl:when test="name(preceding-sibling::node()[1])='br' or name(preceding-sibling::node()[1])='indent'">
 <xsl:text>\smallskip </xsl:text>
@@ -82,7 +96,8 @@
   <xsl:otherwise>
     <!-- Don't put a line break if we are the last thing -->
     <xsl:if test="not(position()=last()) and not(position()=last()-1 and normalize-space(following-sibling::node()[1])='')">
-      <xsl:text>\\ </xsl:text>
+      <xsl:value-of select="$result" />
+      <xsl:text> </xsl:text>
     </xsl:if>
   </xsl:otherwise>
   </xsl:choose>
 <xsl:otherwise>
     <!-- Don't put a line break if we are the last thing -->
     <xsl:if test="not(position()=last()) and not(position()=last()-1 and normalize-space(following-sibling::node()[1])='')">
-      <xsl:text>\\ </xsl:text>
+      <xsl:value-of select="$result" />
+      <xsl:text> </xsl:text>
     </xsl:if>
 </xsl:otherwise>
 </xsl:choose>
 </xsl:text>
 </xsl:template>
 
-<xsl:template match="code">
+<xsl:template match="code|program">
 <xsl:text>\texttt{</xsl:text>
 <xsl:apply-templates/>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
+<xsl:template match="code|program" mode="tabular">
+<xsl:text>\texttt{</xsl:text>
+<xsl:apply-templates mode="tabular"/>
+<xsl:text>}</xsl:text>
+</xsl:template>
+
 <xsl:template match="strong">
 <xsl:text>\textbf{</xsl:text>
 <xsl:apply-templates/>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
-<xsl:template match="em">
+<xsl:template match="strong" mode="tabular">
+<xsl:text>\textbf{</xsl:text>
+<xsl:apply-templates mode="tabular"/>
+<xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="em|var|cite|q|dfn">
 <xsl:text>\textit{</xsl:text>
-<xsl:apply-templates/>
+<xsl:apply-templates mode="tabular"/>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
@@ -244,8 +272,17 @@ interpreted in pre -->
    3. It is also necessary to deal with the fact that index pages
       get references as "/".
 -->
+<xsl:template match="a" mode="tabular">
+<xsl:apply-templates mode="tabular"/>
+<xsl:call-template name="a"/>
+</xsl:template>
+
 <xsl:template match="a">
 <xsl:apply-templates/>
+<xsl:call-template name="a"/>
+</xsl:template>
+
+<xsl:template name="a">
 <xsl:if test="@href">
 <xsl:variable name="relpath" select="document(/*/@metafile)/metafile/relpath" />
 <xsl:variable name="path" select="document(/*/@metafile)/metafile/path" />
@@ -322,6 +359,14 @@ interpreted in pre -->
 </xsl:template>
 
 <xsl:template match="img">
+<xsl:call-template name="img"/>
+</xsl:template>
+
+<xsl:template match="img" mode="tabular">
+<xsl:call-template name="img"/>
+</xsl:template>
+
+<xsl:template name="img">
 <xsl:variable name="path" select="document(/*/@metafile)/metafile/path" />
 <xsl:text>\includegraphics{</xsl:text>
       <xsl:call-template name="replace-string">
index b892214340c2fa44afaaeab311946c6238f60dbc..944799fc9b008067170c6d2c5ab436bf375d5b5d 100644 (file)
@@ -213,6 +213,12 @@ Server Documentation Project.  More information is available at
 <!-- Take care of all the LaTeX special characters.                       -->
 <!-- Silly multi-variable technique used to avoid deep recursion.         -->
 <!-- ==================================================================== -->
+<xsl:template match="text()|@*" mode="tabular">
+<xsl:call-template name="ltescape">
+  <xsl:with-param name="string" select="."/>
+</xsl:call-template>
+</xsl:template>
+
 <xsl:template match="text()">
 <xsl:call-template name="ltescape">
   <xsl:with-param name="string" select="."/>
index e69d78f9d2ee230434772635655f1e69078141f8..c201b5bd7084795298552e5ce40fb928a864f2ea 100644 (file)
@@ -51,7 +51,7 @@
 <xsl:sort select="name" />
 
    <xsl:text>\texttt{</xsl:text>
-   <xsl:apply-templates select="syntax" />
+   <xsl:apply-templates select="syntax" mode="tabular" />
    <xsl:text>}</xsl:text>
    <xsl:text>&amp;</xsl:text>
 
index dd1ddddb7feeb705a4a14e41a4ba85e6b18472fc..5498a282318ba6abb3fd0399fe8dcaaaea1a3ff5 100644 (file)
 
 <xsl:value-of select="$message[@id='syntax']" />
 <xsl:text>: &amp; {\ttfamily </xsl:text>
-<xsl:apply-templates select="syntax" />
+<xsl:apply-templates select="syntax" mode="tabular" />
 <xsl:text>}\\
 </xsl:text>