Accept attributes in inline image syntax
[multimarkdown] / XSLT / article.xslt
1 <?xml version='1.0' encoding='utf-8'?>
2
3 <!-- XHTML-to-Article converter by Fletcher Penney
4         specifically designed for use with MultiMarkdown created XHTML
5         
6         Uses the LaTeX memoir class with the article option for output
7         
8         MultiMarkdown Version 2.0.b5
9         
10         $Id: article.xslt 479 2008-01-12 23:04:13Z fletcher $
11 -->
12
13 <!-- 
14 # Copyright (C) 2005-2008  Fletcher T. Penney <fletcher@fletcherpenney.net>
15 #
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
20 #
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 # GNU General Public License for more details.
25 #
26 # You should have received a copy of the GNU General Public License
27 # along with this program; if not, write to the
28 #    Free Software Foundation, Inc.
29 #    59 Temple Place, Suite 330
30 #    Boston, MA 02111-1307 USA
31 -->
32
33         
34 <xsl:stylesheet
35         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
36         xmlns:html="http://www.w3.org/1999/xhtml"
37         version="1.0">
38
39         <xsl:import href="memoir.xslt"/>
40         
41         <xsl:output method='text' encoding='utf-8'/>
42
43         <xsl:strip-space elements="*" />
44
45         <xsl:template match="/">
46                 <xsl:apply-templates select="html:html/html:head"/>
47                 <xsl:apply-templates select="html:html/html:body"/>
48                 <xsl:call-template name="latex-footer"/>
49         </xsl:template>
50
51         <xsl:template name="latex-document-class">
52                 <xsl:text>\documentclass[oneside,article]{memoir}
53 \usepackage{layouts}[2001/04/29]
54 \usepackage{xmpincl}    % Seems to be required to get the pdf to generate??
55
56 \makeglossary
57 \makeindex
58
59 \def\mychapterstyle{default}
60 \def\mypagestyle{headings}
61 \def\revision{}
62 </xsl:text>
63         </xsl:template>
64
65         <xsl:template name="latex-title">
66                         <xsl:text>
67 % Title
68 \mainmatter
69
70 \maketitle
71
72 </xsl:text>
73         </xsl:template>
74
75         <xsl:template name="latex-copyright">
76                         <xsl:text>% Copyright Info
77 \setlength{\parindent}{0pt}
78
79 \ifx\mycopyright\undefined
80 \else
81         \textcopyright{} \mycopyright
82 \fi
83
84 \revision
85
86 \setlength{\parindent}{1em}
87
88 </xsl:text>
89         </xsl:template>
90
91         <xsl:template name="latex-begin-body">
92                 <xsl:text>%
93 % Main Content
94 %
95
96
97 % Layout settings
98 \setlength{\parindent}{1em}
99
100 </xsl:text>
101         </xsl:template>
102
103 </xsl:stylesheet>