<xsl:template match="utwor">
<TeXML xmlns="http://getfo.sourceforge.net/texml/ns1">
<TeXML escape="0">
- \documentclass[<xsl:value-of select="@customizations"/>]{wl}
+ \documentclass[<xsl:value-of select="@customizations"/>]{<xsl:value-of select="@documentclass"/>}
<!-- flags and values set on root -->
</xsl:for-each>
</TeXML>
- <xsl:choose>
+<!-- WHAT. THE. FUCK. -->
+<!-- <xsl:choose>
<xsl:when test="@morefloats = 'new'">
<TeXML escape="0">
\usepackage[maxfloats=64]{morefloats}
}{}
</TeXML>
</xsl:otherwise>
- </xsl:choose>
+ </xsl:choose>-->
<xsl:apply-templates select="rdf:RDF" mode="titlepage" />
<xsl:apply-templates select="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" mode='titlepage' />
</xsl:choose>
}
</TeXML>
-
- <xsl:if test="@data-cover-width">
+ <!-- XXX fix this not to hardcode width -->
+ <!--<xsl:if test="@data-cover-width">
<cmd name="makecover">
<parm>210mm</parm>
<parm><xsl:value-of select="210 * @data-cover-height div @data-cover-width" />mm</parm>
</cmd>
- </xsl:if>
- <!--cmd name="maketitle" /-->
-
- <!--cmd name="tytul"><parm>
- <xsl:choose>
- <xsl:when test="(powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny)/nazwa_utworu">
- <!- title in master ->
- <xsl:apply-templates select="(powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny)/autor_utworu" mode="title" />
- <xsl:apply-templates select="(powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny)/dzielo_nadrzedne" mode="title" />
- <xsl:apply-templates select="(powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny)/nazwa_utworu" mode="title" />
- <xsl:apply-templates select="(powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny)/podtytul" mode="title" />
- <!- dc in master or not ->
- <cmd name="translatorsline" />
- </xsl:when>
- <xsl:otherwise>
- <!- look for author title in dc ->
- <xsl:apply-templates select="rdf:RDF" mode="firstdctitle" />
- <xsl:apply-templates select="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" mode='firstdctitle' />
- </xsl:otherwise>
- </xsl:choose>
- </parm></cmd-->
+ </xsl:if>-->
+ <cmd name="makecover" />
+ <cmd name="maketitle" />
<TeXML escape="0">
\def\coverby{
- <xsl:if test="@data-cover-by">Cover image:
+ <xsl:if test="@data-cover-by">Obraz na okładce:
<xsl:choose>
<xsl:when test="@data-cover-source">
\href{\datacoversource}{\datacoverby}.
</TeXML>
<cmd name="editorialsection" />
+ <cmd name="spistresci" />
<xsl:apply-templates select="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" />
<xsl:apply-templates select="utwor" mode="part" />
+
</env>
</TeXML>
</xsl:template>
\def\authors{<xsl:call-template name="authors" />}
\author{\authors}
\title{<xsl:apply-templates select=".//dc:title" mode="inline" />}
+ \makeatletter
+ \let\theauthor\@author
+ \let\thetitle\@title
+ \makeatother
+
\def\translatorsline{<xsl:call-template name="translators" />}
\def\bookurl{<xsl:value-of select=".//dc:identifier.url" />}
\href{http://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons
Uznanie Autorstwa – Na Tych Samych Warunkach 3.0 PL}.}
<xsl:if test=".//dc:rights.license">
- \def\rightsinfo{This book is available under the terms of
+ \def\rightsinfo{Ta książka jest udostpęniona na licencji
\href{<xsl:value-of select=".//dc:rights.license" />}{<xsl:value-of select=".//dc:rights" />}.}
</xsl:if>
</cmd>
</xsl:template>
+<xsl:template match="autor_rozdzialu">
+</xsl:template>
<xsl:template
- match="naglowek_akt|naglowek_czesc|srodtytul|naglowek_osoba|naglowek_podrozdzial|naglowek_scena|naglowek_rozdzial|miejsce_czas|didaskalia|lista_osoba|akap|akap_dialog|akap_cd|motto_podpis|naglowek_listy">
+ match="naglowek_akt|naglowek_czesc|srodtytul|naglowek_osoba|naglowek_podrozdzial|naglowek_scena|naglowek_rozdzial|miejsce_czas|didaskalia|lista_osoba|akap|akap_dialog|akap_cd|motto_podpis|naglowek_listy|lista|nota_red">
+ <xsl:if test="name(following-sibling::*[1])='autor_rozdzialu'">
+ <cmd name="autorrozdzialu"><parm><xsl:value-of select="following-sibling::*[1]/text()"/></parm></cmd>
+ </xsl:if>
<cmd>
<xsl:attribute name="name">
<xsl:value-of select="wl:texcommand(name())" />
</xsl:template>
+<xsl:template match="link">
+ <cmd name="link">
+ <parm><xsl:value-of select="@url"/></parm>
+ <parm><xsl:apply-templates mode="inline"/></parm>
+ </cmd>
+</xsl:template>
+
+
<xsl:template name="verse">
<xsl:param name="verse-content" />
<xsl:param name="verse-type" />
<!-- = INLINE TAGS = -->
<!-- = (contain other inline tags and special tags) = -->
<!-- ================================================ -->
+<xsl:strip-space elements="nota|akap|wyroznienie"/>
<xsl:template mode="inline"
- match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba">
+ match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba|punkt|www|nota_red">
<cmd>
<xsl:attribute name="name">
<xsl:value-of select="wl:texcommand(name())" />
</cmd>
</xsl:template>
+<xsl:template mode="inline"
+ match="wyimek">
+ <env>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ <xsl:apply-templates mode="inline"/>
+ </env>
+</xsl:template>
+<xsl:template
+ match="wyimek_extra">
+ <env>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ <xsl:apply-templates mode="inline"/>
+ </env>
+</xsl:template>
+
+
<xsl:template match="tytul_dziela" mode="inline">
</cmd>
</xsl:template>
+<xsl:strip-space elements="ilustr"/>
<xsl:template match="ilustr">
<cmd>
<xsl:attribute name="name">
<xsl:value-of select="wl:texcommand(name())" />
</xsl:attribute>
- <parm><xsl:value-of select="@src" /></parm>
+ <xsl:if test="@opt">
+ <opt><TeXML ecape="0"><xsl:value-of select="normalize-space(@opt)" /></TeXML></opt>
+ </xsl:if>
+ <parm><TeXML escape="0"><xsl:value-of select="normalize-space(@src)" /></TeXML></parm>
<parm><xsl:apply-templates mode="inline" /></parm>
</cmd>
</xsl:template>
</math>
</xsl:template>
+<xsl:template match="latex">
+ <TeXML escape="0">
+ <xsl:for-each select="text()">
+ <xsl:value-of select="normalize-space(.)"/>
+ </xsl:for-each>
+ </TeXML>
+</xsl:template>
+
+<xsl:template match="latex" mode="inline">
+ <TeXML escape="0">
+ <xsl:for-each select="text()">
+ <xsl:value-of select="normalize-space(.)"/>
+ </xsl:for-each>
+ </TeXML>
+</xsl:template>
+
+
<xsl:template match="tablewrap">
<cmd name="begin"><parm>table</parm><opt>h!</opt></cmd>
<xsl:apply-templates select="table"/>
<xsl:template name="editors">
<xsl:if test=".//dc:contributor.editor_parsed|.//dc:contributor.technical_editor_parsed">
- <xsl:text>Technical editors: </xsl:text>
+ <xsl:text>Redakcja techniczna: </xsl:text>
<xsl:for-each select=".//dc:contributor.editor_parsed|.//dc:contributor.technical_editor_parsed[not(.//dc:contributor.editor_parsed/text()=text())]">
<!--xsl:sort select="@sortkey" /-->
<xsl:if test="position() != 1">, </xsl:if>
<xsl:template match="extra|uwaga" />
<xsl:template match="extra|uwaga" mode="inline" />
-<xsl:template match="nota_red" />
+<!-- make it a command: <xsl:template match="nota_red" />-->
+
<!-- ======== -->
<!-- = TEXT = -->