Attachment 'article-latex.xsl'

Download

   1 <?xml version='1.0'?> <!-- As XML file -->
   2 <!-- Identify as a stylesheet -->
   3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   4 
   5 <!-- Intend output for rendering by pdflatex -->
   6 <xsl:output method="text" />
   7 
   8 <xsl:template match="/article">\documentclass{article}
   9 %% Page layout
  10 \usepackage{geometry}
  11 \geometry{letterpaper,total={5.0in,9in}}
  12 %% Symbols, align environment, bracket-matrix
  13 \usepackage{amsmath}
  14 %% Theorem-like environments
  15 \usepackage{amsthm}
  16 \newtheorem{theorem}{Theorem}
  17 \newtheorem{corollary}{Corollary}
  18 \newtheorem{lemma}{Lemma}
  19 %% Convenience macros
  20 <xsl:value-of select="macros" />
  21 %% Title information
  22 \title{<xsl:value-of select="title" />}
  23 \author{<xsl:value-of select="author" />\\
  24 \texttt{<xsl:value-of select="email" />}\\
  25 <xsl:value-of select="department" />\\
  26 <xsl:value-of select="institution" />
  27 }
  28 \date{<xsl:value-of select="date" />}
  29 \begin{document}
  30 \maketitle
  31 <xsl:apply-templates select="p|theorem|lemma|corollary" />
  32 \end{document}
  33 </xsl:template>
  34 
  35 <xsl:template match="theorem|corollary|lemma">
  36 <xsl:apply-templates select="statement" />
  37 <xsl:apply-templates select="proof" />
  38 </xsl:template>
  39 
  40 <xsl:template match="theorem/statement">\begin{theorem}
  41 <xsl:apply-templates select="p"/>\end{theorem}
  42 %
  43 </xsl:template>
  44 
  45 <xsl:template match="corollary/statement">\begin{corollary}
  46 <xsl:apply-templates select="p"/>\end{corollary}
  47 %
  48 </xsl:template>
  49 
  50 <xsl:template match="lemma/statement">\begin{lemma}
  51 <xsl:apply-templates select="p"/>\end{lemma}
  52 %
  53 </xsl:template>
  54 
  55 <xsl:template match="proof">\begin{proof}
  56 <xsl:apply-templates select="p"/>\end{proof}
  57 %
  58 </xsl:template>
  59 
  60 
  61 <xsl:template match="p"><xsl:apply-templates />\par
  62 %
  63 </xsl:template>
  64 
  65 
  66 <!-- Math  -->
  67 
  68 <xsl:template match= "m">\(<xsl:value-of select="." />\)</xsl:template>
  69 
  70 <xsl:template match="dm">\[<xsl:value-of select="." />\]</xsl:template>
  71 
  72 <xsl:template match="am">\begin{align*}<xsl:value-of select="." />\end{align*}</xsl:template>
  73 
  74 
  75 <!-- Lists -->
  76 
  77 <xsl:template match="ol">\begin{enumerate}
  78 <xsl:apply-templates select="li"/>\end{enumerate}
  79 %
  80 </xsl:template>
  81 
  82 <xsl:template match="ul">\begin{itemize}
  83 <xsl:apply-templates />\end{itemize}
  84 %
  85 </xsl:template>
  86 
  87 <xsl:template match="li">\item <xsl:apply-templates />
  88 </xsl:template>
  89 
  90 
  91 
  92 <!-- <xsl:template match="@*|node()"></xsl:template> -->
  93 
  94 
  95 
  96 
  97 </xsl:stylesheet>

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2013-06-25 21:18:57, 169.9 KB) [[attachment:Shuttleworth-Funded-Logo.jpg]]
  • [get | view] (2013-06-20 19:59:48, 2.4 KB) [[attachment:article-html.xsl]]
  • [get | view] (2013-06-20 20:00:34, 2.3 KB) [[attachment:article-latex.xsl]]
  • [get | view] (2013-06-20 20:04:02, 0.8 KB) [[attachment:calculus-article.xml]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.