</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{
</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" />}
</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" />
<!-- = (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|lista|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">
<xsl:attribute name="name">
<xsl:value-of select="wl:texcommand(name())" />
</xsl:attribute>
+ <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>
</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:apply-templates select="@*|node()" mode="identity"/>
+ <xsl:for-each select="text()">
+ <xsl:value-of select="normalize-space(.)"/>
+ </xsl:for-each>
</TeXML>
</xsl:template>
+<!-- TODO: this needs parameters, but we need to determine which
+ - cols: number of cols?
+ - first: is first column special?
+
+ -->
+<xsl:template match="tabela">
+ <cmd name="outmulticols"></cmd>
+ <cmd name="begin"><parm>tabela</parm> </cmd>
+ <xsl:apply-templates mode="tabela"/>
+ <cmd name="end"><parm>tabela</parm> </cmd>
+</xsl:template>
+
+<xsl:template match="r" mode="tabela">
+<!-- R<xsl:value-of select="count(preceding-sibling::*)" />-->
+ <xsl:choose>
+ <xsl:when test="count(preceding-sibling::*) = 0">
+ <cmd name="tabelanaglowek"><parm>
+ <xsl:apply-templates mode="tabelanaglowek"/>
+ </parm></cmd>
+ </xsl:when>
+ <xsl:otherwise>
+ <cmd name="tabelawiersz"><parm>
+ <xsl:apply-templates mode="tabelawiersz"/>
+ </parm></cmd>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="c" mode="tabelanaglowek">
+ <xsl:if test="count(preceding-sibling::*) > 0"><spec cat="align"/></xsl:if>
+ <cmd name="tabelakomnaglowek"><parm>
+ <xsl:apply-templates mode="inline"/>
+ </parm></cmd>
+</xsl:template>
+
+<xsl:template match="c" mode="tabelawiersz">
+
+ <xsl:choose>
+ <xsl:when test="count(preceding-sibling::*) = 0">
+ <cmd name="tabelakompierwsza"><parm>
+ <xsl:apply-templates mode="inline"/>
+ </parm></cmd>
+ </xsl:when>
+ <xsl:otherwise>
+ <spec cat="align"/><cmd name="tabelakom"><parm>
+ <xsl:apply-templates mode="inline"/>
+ </parm></cmd>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+
+
<xsl:template match="tablewrap">
<cmd name="begin"><parm>table</parm><opt>h!</opt></cmd>
<xsl:apply-templates select="table"/>
<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 = -->