]> granicus.if.org Git - apache/commitdiff
A little bit of progress:
authorJoshua Slive <slive@apache.org>
Thu, 5 Jun 2003 15:16:27 +0000 (15:16 +0000)
committerJoshua Slive <slive@apache.org>
Thu, 5 Jun 2003 15:16:27 +0000 (15:16 +0000)
1. Fix transformation of absolute <a href>s to footnotes,
   and include hyperref links.  This is a result of fixing
   a bug in the latex escaping template.

2. Turn off the ugly box around the links, and make them
   colored instead.

3. Slightly shrink the inter-paragraph spacing, and the spacing
   around <notes> and <examples>.

4. Change to favour standard pdf fonts where possible.  This
   may or may not be a good move in the long run.

A new version is online at
http://www.apache.org/~slive/manual/

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

docs/manual/style/latex/TODO
docs/manual/style/latex/common.xsl
docs/manual/style/latex/html.xsl
docs/manual/style/latex/latex.xsl
docs/manual/style/latex/manualpage.xsl
docs/manual/style/latex/synopsis.xsl

index 53faedf869fd1baa731fa54c1bb722d5c8c6b0df..3fcc5404cd353b1e65394d282531642d28f24c85 100644 (file)
@@ -13,13 +13,6 @@ Some things that need to be done with the LaTeX transforms:
   <table><columnlist><column width="20%"/><column width="80%"/></columnlist>
   <tr><td>...
 
-- href
-
-  External hrefs should be transformed to \footnote{}s, but it's not
-  working at the moment.  It is easy enough just to <value-of> the @href,
-  but this won't work because the result needs to be run through the
-  escaping routines or LaTeX will barf.
-
 - Images
 
   A quick search makes me believe that pdftex will not handle gifs.
index 3ab1872eee53bacb3626caa5d35222dfdb53dc0a..47070da7cfb7bd1a49837b6fc6d865ce88597d5c 100644 (file)
@@ -59,7 +59,7 @@ select="$metafile/basename"/>
 <!-- ==================================================================== -->
 
 <xsl:template match="example">
-<xsl:text>\par\medskip\begin{center}</xsl:text>
+<xsl:text>\par\smallskip\begin{center}</xsl:text>
 <xsl:if test="not(pre)"><xsl:text>\fbox{</xsl:text></xsl:if>
 <xsl:text>\begin{minipage}{.8\textwidth}\begin{flushleft}</xsl:text>
 <xsl:apply-templates select="title" mode="print" />
@@ -68,7 +68,7 @@ select="$metafile/basename"/>
 <xsl:if test="not(pre)"><xsl:text>}</xsl:text></xsl:if>
 <xsl:text>\end{flushleft}\end{minipage}</xsl:text>
 <xsl:if test="not(pre)"><xsl:text>}</xsl:text></xsl:if>
-<xsl:text>\end{center}\par\medskip</xsl:text>
+<xsl:text>\end{center}\par\smallskip</xsl:text>
 </xsl:template>
 
 <xsl:template match="example/title" mode="print">
@@ -91,12 +91,12 @@ select="$metafile/basename"/>
 <!-- <note>                                                               -->
 <!-- ==================================================================== -->
 <xsl:template match="note">
-<xsl:text>\par\medskip
+<xsl:text>\par\smallskip
 {\Huge $\Longrightarrow$}\begin{minipage}[t]{.8\textwidth}
 \noindent </xsl:text>
 <xsl:apply-templates select="title" mode="print" />
 <xsl:apply-templates/>
-<xsl:text>\end{minipage}\par\medskip</xsl:text>
+<xsl:text>\end{minipage}\par\smallskip</xsl:text>
 </xsl:template>
 
 <xsl:template match="note/title" mode="print">
@@ -165,7 +165,7 @@ select="$metafile/basename"/>
 <xsl:text>
 \end{minipage}
 \end{tabular}}
-\medskip
+\smallskip
 </xsl:text>
 </xsl:template>
 
index a4d75ae8c3be1029a44028afa4c7a584b49ec558..3e71dad0c169d96936d40dc305c6fbfb637782a4 100644 (file)
@@ -133,6 +133,25 @@ interpreted in pre -->
 </xsl:text>
 </xsl:template>
 
+
+<!--
+   This is a horrible hack, but it seems to mostly work.  It does a
+   few things:
+
+   1. Transforms references starting in http:// to footnotes with the
+      appropriate hyperref macro to make them clickable.  (This needs
+      to be expanded to deal with news: and needs to be adjusted to
+      deal with "#", which is creating bad links at the moment.)
+
+   2. For intra-document references, constructs the appropriate absolute
+      reference using a latex \pageref.  
+      This involves applying a simplified version of the
+      general URL resolution rules to deal with ../.  It only works for
+      one level of subdirectory.
+
+   3. It is also necessary to deal with the fact that index pages
+      get references as "/".
+-->
 <xsl:template match="a">
 <xsl:apply-templates/>
 <xsl:if test="@href">
@@ -151,13 +170,13 @@ interpreted in pre -->
 <xsl:choose>
 <xsl:when test="starts-with(@href, 'http:')">
   <xsl:if test="not(.=@href)">
-    <xsl:text>\footnote{</xsl:text>
+    <xsl:text>\footnote{\href{</xsl:text>
+      <xsl:value-of select="@href"/>
+    <xsl:text>}{</xsl:text>
       <xsl:call-template name="ltescape">
-        <xsl:with-param name="string">
-          <xsl:value-of select="string(@href)"/>
-        </xsl:with-param>
+        <xsl:with-param name="string" select="@href"/>
       </xsl:call-template>
-    <xsl:text>}</xsl:text>
+    <xsl:text>}}</xsl:text>
   </xsl:if>
 </xsl:when>
 <xsl:when test="starts-with(@href, '#')">
index bfbe7ce09eb3e5a1988184e041d61f53fdffce4c..574669c109e694b7825aaa549b483c2706ed67fc 100644 (file)
 <xsl:template match="sitemap">
 <xsl:text>
 \documentclass[11pt]{book}
-\usepackage{fullpage,hyperref}
+\usepackage{times}
+\usepackage{fullpage}
 \usepackage{style/latex/atbeginend}
+\usepackage[colorlinks=true,letterpaper=true]{hyperref}
 
 % Let LaTeX be lenient about very-bad line wrapping.
 \tolerance=9999 
@@ -30,7 +32,7 @@
 % Keep paragraphs flush left (rather than the default of indenting
 % the first line) and put a space between paragraphs.
 \setlength{\parindent}{0ex}
-\addtolength{\parskip}{1.5ex}
+\addtolength{\parskip}{1.2ex}
 
 % Shrink the inter-item spaces
 \AfterBegin{itemize}{\addtolength{\itemsep}{-.8\baselineskip}}
    </xsl:call-template>
  </xsl:when>
  <xsl:otherwise>
-   <xsl:value-of select="."/>
+   <xsl:value-of select="$string"/>
  </xsl:otherwise>
  </xsl:choose>
 </xsl:variable>
index a5a0237d5ed715837c79fe1600c0aff4f6f9b138..fbfc79a816743c61f552265c6eeef393a6ef4ea5 100644 (file)
@@ -17,7 +17,7 @@ select="$metafile/basename"/>
 
 
    <xsl:if test="seealso">
-   <xsl:text>\bigskip\noindent\textbf{</xsl:text>
+   <xsl:text>\medskip\noindent\textbf{</xsl:text>
    <xsl:value-of select="$messages/message[@name='seealso']" />
    <xsl:text>}
    \begin{itemize}</xsl:text>
index 29d31aca88ee569be1619d516de33c91998e75e0..255d87b3107fb5b9e5e65fb05b569220dea43583 100644 (file)
@@ -86,7 +86,7 @@
      </xsl:if>
 
      <xsl:text>
-\medskip\textbf{</xsl:text>
+\smallskip\textbf{</xsl:text>
      <xsl:value-of select="$messages/message [@name='directives']" />
      <xsl:text>}
 </xsl:text>