You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2014/01/25 11:41:48 UTC
svn commit: r1561281 - in /httpd/httpd/trunk/docs/manual/style/latex:
common.xsl html.xsl latex.xsl quickreference.xsl synopsis.xsl
Author: nd
Date: Sat Jan 25 10:41:48 2014
New Revision: 1561281
URL: http://svn.apache.org/r1561281
Log:
latex build was also broken by multiline syntax descriptions (which are bad on
their own, but anyway...).
Also add some missing formatting rules
Modified:
httpd/httpd/trunk/docs/manual/style/latex/common.xsl
httpd/httpd/trunk/docs/manual/style/latex/html.xsl
httpd/httpd/trunk/docs/manual/style/latex/latex.xsl
httpd/httpd/trunk/docs/manual/style/latex/quickreference.xsl
httpd/httpd/trunk/docs/manual/style/latex/synopsis.xsl
Modified: httpd/httpd/trunk/docs/manual/style/latex/common.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/common.xsl?rev=1561281&r1=1561280&r2=1561281&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/common.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/common.xsl Sat Jan 25 10:41:48 2014
@@ -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 -->
Modified: httpd/httpd/trunk/docs/manual/style/latex/html.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/html.xsl?rev=1561281&r1=1561280&r2=1561281&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/html.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/html.xsl Sat Jan 25 10:41:48 2014
@@ -66,10 +66,24 @@
<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>
@@ -90,7 +105,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>
@@ -102,21 +118,33 @@
</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">
Modified: httpd/httpd/trunk/docs/manual/style/latex/latex.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/latex.xsl?rev=1561281&r1=1561280&r2=1561281&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/latex.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/latex.xsl Sat Jan 25 10:41:48 2014
@@ -213,6 +213,12 @@ Server Documentation Project. More info
<!-- 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="."/>
Modified: httpd/httpd/trunk/docs/manual/style/latex/quickreference.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/quickreference.xsl?rev=1561281&r1=1561280&r2=1561281&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/quickreference.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/quickreference.xsl Sat Jan 25 10:41:48 2014
@@ -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>&</xsl:text>
Modified: httpd/httpd/trunk/docs/manual/style/latex/synopsis.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/synopsis.xsl?rev=1561281&r1=1561280&r2=1561281&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/synopsis.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/synopsis.xsl Sat Jan 25 10:41:48 2014
@@ -208,7 +208,7 @@
<xsl:value-of select="$message[@id='syntax']" />
<xsl:text>: & {\ttfamily </xsl:text>
-<xsl:apply-templates select="syntax" />
+<xsl:apply-templates select="syntax" mode="tabular" />
<xsl:text>}\\
</xsl:text>