[eros-cvs] cvs commit: eros/src/doc/www/DTD latex-doc.xslt

shap@eros.cs.jhu.edu shap@eros.cs.jhu.edu
Tue, 13 Nov 2001 22:28:50 -0500


shap        01/11/13 22:28:50

  Modified:    src/doc/www/DTD latex-doc.xslt
  Log:
  Do not insist on goodfoot style pkg

Revision  Changes    Path
1.2       +117 -27   eros/src/doc/www/DTD/latex-doc.xslt

Index: latex-doc.xslt
===================================================================
RCS file: /cvs/eros/src/doc/www/DTD/latex-doc.xslt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- latex-doc.xslt	2001/10/14 05:45:22	1.1
+++ latex-doc.xslt	2001/11/14 03:28:50	1.2
@@ -93,7 +93,9 @@
     <xsl:text>\textbf{</xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text>
   </xsl:template>
   <xsl:template match="code">
-    <xsl:text>\texttt{</xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text>
+    <xsl:text>\begin{texttt}</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>\end{texttt}</xsl:text>
   </xsl:template>
   <xsl:template match="sup">
     XXX-SUP-XXX<xsl:apply-templates/>XXX-ENDSUP-XXX
@@ -134,11 +136,11 @@
   </xsl:template>
 
   <xsl:template match="term">
-    <xsl:text>\term{</xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text>
+    <xsl:text>\myterm{</xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text>
   </xsl:template>
 
   <xsl:template match="br">
-    <xsl:text>\\
+    <xsl:text>
 
 </xsl:text>
   </xsl:template>
@@ -155,36 +157,34 @@
   </xsl:template>
   <xsl:template match="dl">
     <!-- FIX me this is wrong! -->
-    <xsl:text>\begin{itemize}</xsl:text>
+    <xsl:text>\begin{description}</xsl:text>
     <xsl:apply-templates/>
-    <xsl:text>\end{itemize}</xsl:text>
+    <xsl:text>\end{description}</xsl:text>
   </xsl:template>
   <xsl:template match="li">
-    <xsl:text>\item</xsl:text>
-    <xsl:apply-templates select="dlnm" mode="tag"/>
-    <xsl:text> </xsl:text>
+    <xsl:text>
+\item </xsl:text>
     <xsl:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="p">
-<xsl:apply-templates/>
-<xsl:text>
-
-    </xsl:text>
-  </xsl:template>
-
-  <xsl:template match="dlnm" mode="tag">
-    [<xsl:apply-templates/>]
-  </xsl:template>
-
   <xsl:template match="dlnm">
-    <!-- suppress -->
+    <xsl:text>
+\item[</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>] </xsl:text>
   </xsl:template>
 
   <xsl:template match="dldescrip">
     <xsl:apply-templates/>
   </xsl:template>
 
+  <xsl:template match="p">
+<xsl:apply-templates/>
+<xsl:text>
+
+    </xsl:text>
+  </xsl:template>
+
   <xsl:template match="hr">
     XXX-HR-XXX
   </xsl:template>
@@ -430,16 +430,89 @@
 
   <xsl:template match="bibliography">
     <xsl:text>
-
-\begin{bibliography}
-
+\begin{thebibliography}{999}
 </xsl:text>
     <xsl:apply-templates select="citation"/>
+\end{thebibliography}
   </xsl:template>
 
   <xsl:template match="citation">
-    FILL IN CITATION STUFF HERE
+    <xsl:text>\bibitem{</xsl:text>
+    <xsl:apply-templates select="@name"/>
+    <xsl:text>}
+    </xsl:text>
+    <xsl:for-each select="cite.author">
+      <xsl:choose>
+	<xsl:when test="position() = last() and position() != 1">
+	  <xsl:text> and </xsl:text>
+	</xsl:when>
+	<xsl:when test="position() &gt; 1">
+	  <xsl:text>, </xsl:text>
+	</xsl:when>
+      </xsl:choose>
+      <xsl:apply-templates/>
+    </xsl:for-each>
+    <xsl:text>, </xsl:text>
+    <xsl:choose>
+      <xsl:when test="count(./cite.journal|./cite.proceedings) != 0">
+	<xsl:text>``</xsl:text>
+	<xsl:apply-templates select="cite.title"/>
+	<xsl:text>,'' </xsl:text>
+	<xsl:apply-templates select="cite.journal|cite.proceedings"/>
+      </xsl:when>
+      <xsl:otherwise>
+	<em>
+	<xsl:apply-templates select="cite.title"/>
+	</em>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:apply-templates select="cite.publisher"/>
+    <xsl:apply-templates select="cite.volume"/>
+    <xsl:apply-templates select="cite.number"/>
+    <xsl:apply-templates select="cite.part"/>
+    <xsl:apply-templates select="cite.month"/>
+    <xsl:apply-templates select="cite.year"/>
+    <xsl:apply-templates select="cite.pages"/>
+    <xsl:apply-templates select="cite.url"/>
+    <xsl:apply-templates select="cite.note"/>
+
+    <xsl:text>
+
+    </xsl:text>
+  </xsl:template>
+
+
+  <xsl:template match="cite.journal|cite.proceedings">
+    <!-- Exceptional case - no comma insertion! -->
+    \emph{<xsl:apply-templates/>}
+  </xsl:template>
+
+  <xsl:template match="cite.year|cite.month">
+    <xsl:text>, </xsl:text><xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="cite.volume">
+    <xsl:text>, </xsl:text>\textbf{<xsl:apply-templates/>}
+  </xsl:template>
+
+  <xsl:template match="cite.number">
+    <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="cite.part">
+    <xsl:text>, part </xsl:text><xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="cite.pages">
+    <xsl:text>, pp. </xsl:text><xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="cite.publisher">
+    <xsl:text>, </xsl:text><xsl:apply-templates/>
+  </xsl:template>
 
+  <xsl:template match="cite.url">
+    <xsl:text>, </xsl:text>\texttt{<xsl:apply-templates/>}
   </xsl:template>
 
   <xsl:template match="cite">
@@ -454,7 +527,16 @@
     <xsl:apply-templates/>
   </xsl:template>
 
-<!-- FIX: re-introduce the DOC element -->
+  <xsl:template match="doc">
+    <xsl:apply-templates select="front"/>
+\begin{document}
+\mytitle
+    <xsl:apply-templates select="body"/>
+    <xsl:apply-templates select="back"/>
+<!--      <xsl:apply-templates select="copyright"/> -->
+\end{document}
+  </xsl:template>
+
   <xsl:template match="ProtectionProfile">
     <xsl:apply-templates select="pp.front"/>
 \begin{document}
@@ -474,6 +556,13 @@
 \documentclass[10pt]{article}
 
 \usepackage{times}
+\usepackage{psfig}
+%%\usepackage{goodfoot}
+
+\newcommand{\leadin}[1]{\smallskip \noindent \textbf{#1}\hspace{0.1in}}
+\newcommand{\myterm}[1]{\emph{#1}}
+\newcommand{\defn}[1]{\textbf{#1}}
+\newcommand{\email}[1]{\makeatletter #1\makeatother}
 
 \setlength{\textheight}{8.5in}\setlength{\topmargin}{-0.25in}
 \setlength{\oddsidemargin}{-.25in}\setlength{\evensidemargin}{-.25in}
@@ -566,8 +655,9 @@
   </xsl:template>
 
   <xsl:template match="abstract">
-    <table width="100%"><tbody><tr valign="top"><td
-    width="5%"><![CDATA[&nbsp;]]></td><td width="90%"><div><![CDATA[&nbsp;]]><br/></div><xsl:apply-templates mode="abstract"/></td><td width="5%"><![CDATA[&nbsp;]]></td></tr></tbody></table>
+\begin{abstract}
+    <xsl:apply-templates mode="abstract"/>
+\end{abstract}
   </xsl:template>
 
   <xsl:template match="pp.disclaimer">