</TeXML>
<xsl:choose>
- <xsl:when test="@old-morefloats">
+ <xsl:when test="@morefloats = 'new'">
<TeXML escape="0">
- \IfFileExists{morefloats.sty}{
- \usepackage{morefloats}
- }{}
+ \usepackage[maxfloats=64]{morefloats}
</TeXML>
</xsl:when>
+ <xsl:when test="@morefloats = 'old'">
+ <TeXML escape="0">
+ \usepackage{morefloats}
+ </TeXML>
+ </xsl:when>
+ <xsl:when test="@morefloats = 'none'" />
<xsl:otherwise>
<TeXML escape="0">
- \usepackage[maxfloats=64]{morefloats}
+ \IfFileExists{morefloats.sty}{
+ \usepackage{morefloats}
+ }{}
</TeXML>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select=".//dc:creator_parsed/node()" mode="inline" />
</parm></cmd>
<TeXML escape="0">
- \def\sourceinfo{<TeXML escape="1"><xsl:apply-templates select=".//dc:source/node()" mode="inline" /></TeXML>}
+ \def\sourceinfo{<xsl:apply-templates select=".//dc:source" mode="inline" />}
+ \def\bookurl{<xsl:value-of select=".//dc:identifier.url" />}
+ \def\rightsinfo{Ten utwór nie jest chroniony prawem autorskim i~znajduje się w~domenie publicznej,
+ co oznacza, że możesz go swobodnie wykorzystywać, publikować i~rozpowszechniać.}
+ <xsl:if test=".//dc:rights.license">
+ \def\rightsinfo{Ten utwór jest udostepniony na licencji
+ \href{<xsl:value-of select=".//dc:rights.license" />}{<xsl:value-of select=".//dc:rights" />}.}
+ </xsl:if>
</TeXML>
</xsl:template>
</xsl:template>
<xsl:template match="rdf:RDF" mode="dctitle">
- <cmd name="section*"><parm>
- <xsl:value-of select=".//dc:title/text()" />
+ <cmd name="nazwapodutworu"><parm>
+ <xsl:apply-templates select=".//dc:title/node()" mode="inline" />
</parm></cmd>
</xsl:template>
-
<xsl:template match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" mode="firstdctitle">
<xsl:apply-templates select="rdf:RDF" mode="firstdctitle" />
</xsl:template>
<xsl:template match="rdf:RDF" mode="firstdctitle">
- <cmd name="subsection*"><parm>
+ <cmd name="autorutworu"><parm>
<xsl:apply-templates select=".//dc:creator_parsed/node()" mode="inline" />
</parm></cmd>
- <cmd name="section*"><parm>
+ <cmd name="nazwautworu"><parm>
<xsl:apply-templates select=".//dc:title/node()" mode="inline" />
</parm></cmd>
</xsl:template>
<!-- = MASTER TAG = -->
<!-- = (can contain block tags, paragraph tags, standalone tags and special tags) = -->
<!-- ============================================================================== -->
-
-<xsl:template match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny">
- <xsl:apply-templates />
-</xsl:template>
-
-
-
<!-- ==================================================================================== -->
<!-- = BLOCK TAGS = -->
<!-- = (can contain other block tags, paragraph tags, standalone tags and special tags) = -->
<!-- ==================================================================================== -->
-<xsl:template match="nota">
- <cmd name="par">
- <parm><xsl:apply-templates /></parm>
+
+<xsl:template
+ match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny|nota|dedykacja|dlugi_cytat|poezja_cyt|motto">
+ <cmd>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ <parm><xsl:apply-templates/></parm>
</cmd>
</xsl:template>
<xsl:template match="lista_osob">
- <cmd name="par"><parm>
- <cmd name="textbf">
- <parm><xsl:value-of select="naglowek_listy" /></parm>
- </cmd>
- <env name="itemize">
- <xsl:apply-templates select="lista_osoba" />
- </env>
- </parm></cmd>
-</xsl:template>
-
-<xsl:template match="dedykacja">
- <env name="em">
- <env name="flushright">
- <xsl:apply-templates/>
- </env>
- </env>
+ <cmd name="listaosob">
+ <parm><xsl:apply-templates select="naglowek_listy" /></parm>
+ <parm><xsl:apply-templates select="lista_osoba" /></parm>
+ </cmd>
</xsl:template>
<xsl:template match="kwestia">
- <cmd name="par">
+ <cmd name="kwestia">
<parm><xsl:apply-templates select="strofa|akap|didaskalia" /></parm>
</cmd>
</xsl:template>
-<xsl:template match="dlugi_cytat">
- <env name="quotation">
- <xsl:apply-templates />
- </env>
-</xsl:template>
-
-<xsl:template match="poezja_cyt">
- <env name="verse">
- <xsl:apply-templates />
- </env>
-</xsl:template>
-
-<xsl:template match="motto">
- <env name="em">
- <xsl:apply-templates mode="inline" />
- </env>
-</xsl:template>
-
<!-- ========================================== -->
<!-- = PARAGRAPH TAGS = -->
<!-- only in root -->
<xsl:template match="autor_utworu" mode="title">
- <cmd name="subsection*"><parm>
- <xsl:apply-templates mode="inline" />
- </parm></cmd>
-</xsl:template>
-
-<xsl:template match="nazwa_utworu">
- <cmd name="section*"><parm>
+ <cmd name="autorutworu"><parm>
<xsl:apply-templates mode="inline" />
</parm></cmd>
</xsl:template>
-<!-- Section headers (included in index)-->
-<xsl:template match="naglowek_akt|naglowek_czesc|srodtytul">
- <cmd name="subsection*">
- <parm><xsl:apply-templates mode="inline" /></parm>
- </cmd>
-</xsl:template>
-<xsl:template match="naglowek_scena|naglowek_rozdzial">
- <cmd name="subsubsection*">
- <parm><xsl:apply-templates mode="inline" /></parm>
+<xsl:template
+ match="nazwa_utworu|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">
+ <cmd>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ <parm><xsl:apply-templates mode="inline"/></parm>
</cmd>
</xsl:template>
-<xsl:template match="naglowek_osoba|naglowek_podrozdzial">
- <cmd name="par">
- <parm><xsl:apply-templates mode="inline" /></parm>
- </cmd><cmd name="nopagebreak" />
-</xsl:template>
-
-<!-- Other paragraph tags -->
-<xsl:template match="miejsce_czas">
- <cmd name="par"><parm>
- <cmd name="emph">
- <parm><xsl:apply-templates mode="inline" /></parm>
- </cmd>
- </parm></cmd>
-</xsl:template>
-
-<xsl:template match="didaskalia">
- <cmd name="par"><parm>
- <cmd name="emph">
- <parm><xsl:apply-templates mode="inline" /></parm>
- </cmd>
- </parm></cmd>
-</xsl:template>
-
-<xsl:template match="lista_osoba">
- <cmd name="item"><parm>
- <xsl:apply-templates mode="inline" />
- </parm></cmd>
-</xsl:template>
-
-<xsl:template match="akap|akap_dialog|akap_cd">
- <cmd name="par"><parm>
- <xsl:apply-templates mode="inline" />
- </parm></cmd>
-</xsl:template>
-
<xsl:template match="strofa">
-<cmd name="par"><parm><cmd name="noindent"><parm>
+ <cmd name="strofa"><parm>
<xsl:choose>
<xsl:when test="count(br) > 0">
<xsl:call-template name="verse">
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
- <cmd name="vspace"><parm>1em</parm></cmd>
-</parm></cmd></parm></cmd>
+ </parm></cmd>
</xsl:template>
<xsl:template name="verse">
<xsl:param name="verse-content" />
<xsl:param name="verse-type" />
- <xsl:choose><xsl:when test="name($verse-type) = 'wers_akap'"><cmd name="hspace" ><parm>1em</parm></cmd></xsl:when>
- <xsl:when test="name($verse-type) = 'wers_wciety'">
- <xsl:choose>
- <xsl:when test="string($verse-content/@typ)">
- <cmd name="hspace" ><parm><xsl:value-of select="$verse-content/@typ" />em</parm></cmd>
- </xsl:when>
- <xsl:otherwise>
- <cmd name="hspace" ><parm>1em</parm></cmd>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name($verse-type) = 'wers_cd'">
- <cmd name="hspace" ><parm>8em</parm></cmd>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates select="$verse-content" mode="inline" />
-</xsl:template>
-<xsl:template match="motto_podpis">
- <env name="em">
- <env name="flushright">
- <xsl:apply-templates mode="inline"/>
- </env>
- </env>
+ <cmd>
+ <xsl:attribute name="name">
+ <xsl:choose>
+ <xsl:when test="$verse-type != ''">
+ <xsl:value-of select='wl:texcommand(name($verse-type))' />
+ </xsl:when>
+ <xsl:otherwise>wers</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:if test="string($verse-content/@typ)">
+ <opt><xsl:value-of select="$verse-content/@typ" />em</opt>
+ </xsl:if>
+ <parm><xsl:apply-templates select="$verse-content" mode="inline"/></parm>
+ </cmd>
</xsl:template>
<!-- ================================================ -->
<!-- = (contain other inline tags and special tags) = -->
<!-- ================================================ -->
-<!-- Annotations -->
-<xsl:template match="pa|pe|pr|pt" mode="inline">
- <cmd name="footnote"><parm><xsl:apply-templates mode="inline" /></parm></cmd>
+<xsl:template mode="inline"
+ match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba">
+ <cmd>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ <parm><xsl:apply-templates mode="inline"/></parm>
+ </cmd>
</xsl:template>
-<!-- Other inline tags -->
-<xsl:template match="mat" mode="inline">
- <math><xsl:apply-templates mode="inline" /></math>
-</xsl:template>
-<xsl:template match="didask_tekst" mode="inline">
- <cmd name="emph"><parm><xsl:apply-templates mode="inline" /></parm></cmd>
-</xsl:template>
-
-<xsl:template match="slowo_obce" mode="inline">
- <cmd name="emph"><parm><xsl:apply-templates mode="inline" /></parm></cmd>
-</xsl:template>
<xsl:template match="tytul_dziela" mode="inline">
- <cmd name="emph"><parm>
+ <cmd name="tytuldziela"><parm>
<xsl:if test="@typ = '1'">„</xsl:if><xsl:apply-templates mode="inline" /><xsl:if test="@typ = '1'">”</xsl:if>
</parm></cmd>
</xsl:template>
-<xsl:template match="wyroznienie" mode="inline">
- <cmd name="emph"><parm><xsl:apply-templates mode="inline" /></parm></cmd>
-</xsl:template>
-
-<xsl:template match="osoba" mode="inline">
- <cmd name="textsc"><parm><xsl:apply-templates mode="inline" /></parm></cmd>
-</xsl:template>
<!-- ============================================== -->
<!-- = STANDALONE TAGS = -->
<!-- = (cannot contain any other tags) = -->
<!-- ============================================== -->
-<xsl:template match="sekcja_swiatlo">
- <cmd name="hspace"><parm>30pt</parm></cmd>
-</xsl:template>
-
-<xsl:template match="sekcja_asterysk">
- <!-- TODO: padding? -->
- <cmd name="par"><parm>*</parm></cmd>
-</xsl:template>
-
-<xsl:template match="separator_linia">
- <cmd name="hrule" />
+<xsl:template
+ match="sekcja_swiatlo|sekcja_asterysk|separator_linia">
+ <cmd>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ </cmd>
</xsl:template>
-
<!-- ================ -->
<!-- = SPECIAL TAGS = -->
<!-- ================ -->
<xsl:template match="end" mode="inline" />
<xsl:template match="motyw" mode="inline">
- <cmd name="mbox" />
- <cmd name="marginpar">
- <parm>
- <cmd name="vspace"><parm>-8pt</parm></cmd>
- <xsl:if test="@moved">
- <cmd name="vspace"><parm>-<xsl:value-of select="@moved" /><cmd name="baselineskip" /></parm></cmd>
- </xsl:if>
- <cmd name="raggedright"><parm>
- <cmd name="hspace"><parm>0pt</parm></cmd>
- <cmd name="footnotesize"><parm>
- <cmd name="color"><parm>theme</parm><parm>
- <xsl:value-of select="." />
- </parm></cmd>
- </parm></cmd>
- </parm></cmd>
- <cmd name="vspace"><parm><cmd name="baselineskip" /></parm></cmd>
- </parm>
+ <cmd name="motyw">
+ <xsl:if test="@moved">
+ <opt name="moved"><xsl:value-of select="@moved" /></opt>
+ </xsl:if>
+ <parm><xsl:apply-templates mode="inline" /></parm>
</cmd>
</xsl:template>