]> granicus.if.org Git - apache/commitdiff
LaTeX:
authorJoshua Slive <slive@apache.org>
Thu, 12 Jun 2003 19:50:41 +0000 (19:50 +0000)
committerJoshua Slive <slive@apache.org>
Thu, 12 Jun 2003 19:50:41 +0000 (19:50 +0000)
- Add directive index.
- Number the front-matter pages using roman numerals
- Omit any <br/> that ends a block.
- Improve the rendering of <indent> by using a
  list environment rather than a minipage.
- Update the TODO list.

Current draft at:
http://www.apache.org/~slive/manual/

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

docs/manual/style/latex/TODO
docs/manual/style/latex/common.xsl
docs/manual/style/latex/directiveindex.xsl [new file with mode: 0644]
docs/manual/style/latex/html.xsl
docs/manual/style/latex/latex.xsl

index 432dadffbdf59cd391241f87c8483d767bc72e63..867ebb008a9b19b2eaaca47e25b080ba8ae0b9a2 100644 (file)
@@ -1,7 +1,6 @@
 Some things that need to be done with the LaTeX transforms:
 
 - Finish special pages:
-  * directive index
   * quick reference
   * faq
   [This is a good job for someone who wants to get familiar with LaTeX,
@@ -22,6 +21,11 @@ Some things that need to be done with the LaTeX transforms:
   not be feasible for us, in which case we could simply replace
   " with \texttt{"} or something, so that the quotes are all straight.
 
+- Fix page references on "external" directives
+  (<directivesynopsis location=...)
+
+- External URL references containing a "#" are broken.
+
 - Hundreds of other little problems with presentation, cross-referencing,
   etc.
 
index 8a6d09792e9929d2e3cc4d14c8642b75710d47bb..58c09705742fb3c656d54c9b96213ddbe35b9324 100644 (file)
@@ -82,9 +82,11 @@ select="$metafile/basename"/>
 <!-- indentations                                                         -->
 <!-- ==================================================================== -->
 <xsl:template match="indent">
-<xsl:text>\hfill\begin{minipage}{.9\textwidth}{\texttt </xsl:text>
+<xsl:text>\begin{list}{}{\topsep 0pt\rightmargin 0pt\leftmargin 2em}
+\item[] </xsl:text>
 <xsl:apply-templates/>
-<xsl:text>}\end{minipage}</xsl:text>
+<xsl:text>\end{list}
+</xsl:text>
 </xsl:template>
 
 <!-- ==================================================================== -->
diff --git a/docs/manual/style/latex/directiveindex.xsl b/docs/manual/style/latex/directiveindex.xsl
new file mode 100644 (file)
index 0000000..1a9f024
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0"?><!--
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */ -->
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                  xmlns="http://www.w3.org/1999/xhtml">
+
+<!-- ==================================================================== -->
+<!-- <directiveindex>                                                     -->
+<!-- Builds the directive index page                                      -->
+<!-- ==================================================================== -->
+<xsl:template match="directiveindex">
+
+    <xsl:variable name="directives"
+        select="document(modulefilelist/modulefile)
+                /modulesynopsis[status!='Obsolete']
+                /directivesynopsis[not(@location)]" />
+
+
+  <xsl:variable name="metafile" select="document(/*/@metafile)/metafile" /> 
+
+  <xsl:text>\section{</xsl:text><xsl:apply-templates select="title"/>
+  <xsl:text>}</xsl:text>
+  <xsl:text>\label{</xsl:text>
+  <xsl:value-of select="$metafile/path"/>
+  <xsl:value-of select="$metafile/basename"/>
+  <xsl:text>}
+</xsl:text>
+
+   <xsl:apply-templates select="summary" />
+
+  <xsl:text>\begin{itemize}
+</xsl:text>
+  <xsl:for-each select="$directives">
+  <xsl:sort select="name" />
+
+  <xsl:text>
+\item </xsl:text>
+  <xsl:apply-templates select="name" mode="simple"/>
+  <xsl:text> (p.\ \pageref{/mod/</xsl:text>
+  <xsl:value-of select="../name"/><xsl:text>:</xsl:text>
+  <xsl:value-of select="translate(name, $uppercase, $lowercase)"/>
+  <xsl:text>})</xsl:text>
+</xsl:for-each>
+
+  <xsl:text>\end{itemize}</xsl:text>
+
+</xsl:template>
+<!-- /directiveindex -->
+
+</xsl:stylesheet>
index 67a6465070cb90d1972d0e4d0102abdf658b2bba..1f1240044ff15890dabc04a7036aa9d9a58c6975 100644 (file)
     <xsl:text>\smallskip </xsl:text>
   </xsl:when>
   <xsl:otherwise>
-    <xsl:text>\\ </xsl:text>
+    <!-- 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:if>
   </xsl:otherwise>
   </xsl:choose>
 </xsl:when>
 <xsl:otherwise>
-<xsl:text>\\ </xsl:text>
+    <!-- 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:if>
 </xsl:otherwise>
 </xsl:choose>
 </xsl:template>
index c4a4558331f91aa4b66bd2fd9f08917d53460ba5..2b3c7cf647ad255de9e789c970e5ff9df80c5cd0 100644 (file)
@@ -17,6 +17,7 @@
 <xsl:include href="html.xsl" />
 <xsl:include href="synopsis.xsl" />
 <xsl:include href="moduleindex.xsl" />
+<xsl:include href="directiveindex.xsl" />
 
 <xsl:template match="sitemap">
 <xsl:text>
@@ -28,7 +29,7 @@
 
 % Let LaTeX be lenient about very-bad line wrapping.
 \tolerance=9999 
-\emergencystretch=40pt
+\emergencystretch=60pt
 
 % Keep paragraphs flush left (rather than the default of indenting
 % the first line) and put a space between paragraphs.
 \date{\today}
 
 \begin{document}
+\frontmatter
 \maketitle
 \tableofcontents
+\mainmatter
 </xsl:text>
 
 <xsl:for-each select="category">