zip.writestr('OPS/annotations.html', etree.tostring(
html_tree, method="html", pretty_print=True))
- toc.add("Weprzyj Wolne Lektury", "support.html")
- manifest.append(etree.fromstring(
- '<item id="support" href="support.html" media-type="application/xhtml+xml" />'))
- spine.append(etree.fromstring(
- '<itemref idref="support" />'))
- html_string = open(get_resource('epub/support.html')).read()
- chars.update(used_chars(etree.fromstring(html_string)))
- zip.writestr('OPS/support.html', html_string)
+ # toc.add("Weprzyj Wolne Lektury", "support.html")
+ # manifest.append(etree.fromstring(
+ # '<item id="support" href="support.html" media-type="application/xhtml+xml" />'))
+ # spine.append(etree.fromstring(
+ # '<itemref idref="support" />'))
+ # html_string = open(get_resource('epub/support.html')).read()
+ # chars.update(used_chars(etree.fromstring(html_string)))
+ # zip.writestr('OPS/support.html', html_string)
toc.add("Strona redakcyjna", "last.html")
manifest.append(etree.fromstring(
<xsl:apply-templates />
</h2>
</xsl:template>
+
+ <xsl:template match="autor_rozdzialu">
+ </xsl:template>
<xsl:template match="naglowek_rozdzial">
<h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:if test="name(following-sibling::*[1])='autor_rozdzialu'">
+ <xsl:value-of select="following-sibling::*[1]/text()"/> -
+ </xsl:if>
<xsl:apply-templates />
</h2>
</xsl:template>
</div>
</xsl:template>
+ <xsl:template match="lista">
+ <ul>
+ <xsl:apply-templates />
+ </ul>
+ </xsl:template>
+
+ <xsl:template match="punkt">
+ <li><xsl:apply-templates /></li>
+ </xsl:template>
+
+ <xsl:template match="www">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ <xsl:value-of select="text()"/>
+ </a>
+ </xsl:template>
+
+ <xsl:template match="link">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="@url"/>
+ </xsl:attribute>
+ <xsl:value-of select="text()"/>
+ </a>
+ </xsl:template>
+
+
<!--===========================================================-->
<!-- Tagi LINIOWE -->
<!--===========================================================-->
</p>
</xsl:if-->
- <p class="info">
+<!-- <p class="info">
<xsl:choose>
<xsl:when test="//dc:contributor">Thank you for your contribution, <xsl:value-of select="//dc:contributor"/>!</xsl:when>
<xsl:otherwise>Thank you for all your contributions!</xsl:otherwise>
</xsl:choose>
<br/>You made this book possible.
- </p>
+ </p>-->
<!--p class="info">
insert_tags(doc,
re.compile("(?<=[^-\s])-(?=[^-\s])"),
"dywiz",
- exclude=[DCNS("identifier.url"), DCNS("rights.license")]
+ exclude=[DCNS("identifier.url"), DCNS("rights.license"), "www"]
)
if customizations is not None:
root.set('customizations', u','.join(customizations))
- root.set('documentclass', documentclass)
+ root.set('documentclass', documentclass or 'wl')
# add editors info
root.set('editors', u', '.join(sorted(
</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" />
</cmd>
</xsl:template>
+<xsl:template match="autor_rozdzialu">
+</xsl:template>
<xsl:template
- match="naglowek_akt|naglowek_czesc|srodtytul|naglowek_osoba|naglowek_podrozdzial|naglowek_scena|autor_rozdzialu|naglowek_rozdzial|miejsce_czas|didaskalia|lista_osoba|akap|akap_dialog|akap_cd|motto_podpis|naglowek_listy|lista">
+ 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">
+ <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: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>
\RequirePackage{amsmath}
\RequirePackage{paralist}
\RequirePackage[normalem]{ulem}
+\RequirePackage{xifthen}
%\DeclareOption{13pt}{%
%\AtEndOfClass{%
% font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
}
\makeatother
-
-\renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=0.3}\selectfont}
\setlength{\parindent}{4mm}
\setlength{\parskip}{0mm}
-\renewcommand{\large}{\fontsize{14}{14.28}\selectfont} % srodtytul
-\renewcommand{\small}{\fontsize{8}{14.28}\selectfont} % paginy
-\renewcommand{\Large}{\fontsize{15}{21.42}\selectfont} % tytuł rozdziału
-\renewcommand{\huge}{\fontsize{18}{21.6}\selectfont} % wyimek
+\renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=0.3}\selectfont}
+\renewcommand{\large}{\fontsize{14}{14.28}\addfontfeature{LetterSpace=0.3}\selectfont} % srodtytul
+\renewcommand{\small}{\fontsize{8}{14.28}\addfontfeature{LetterSpace=0.5}\selectfont} % paginy
+\renewcommand{\Large}{\fontsize{15}{21.42}\addfontfeature{LetterSpace=0.1}\selectfont} % tytuł rozdziału
+\renewcommand{\huge}{\fontsize{18}{21.6}\addfontfeature{LetterSpace=0.1}\selectfont} % wyimek
\renewcommand{\Huge}{\fontsize{24}{40}\selectfont} % cover
\renewcommand{\footnotesize}{\fontsize{9}{10.74}\selectfont}
\makeatother
%%%%%%%%%%%%%%%%%%%%%% Section title styles.
-%% Sections
+%% Chapters
\titleformat{\chapter}[block]%
{\Large\intro\addfontfeature{LetterSpace=0.5,Kerning={Uppercase}}}%
{}{0pt}{\parbox{80mm}{\raggedright\MakeUppercase{#1}}}
\setlength{\chapterspaceafter}{14\baselineskip-14pt}%\f@size of large
\titlespacing*{\chapter}{0pt}{\chapterposcorrection}{\chapterspaceafter}
-%% Subsections
+%% Sections
\titleformat{\section}%
{\addfontfeature{LetterSpace=0.3}\large}%
{\thesection}{.5em}{\MakeUppercase{#1}}
\raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
-\newcommand{\makecover}{
+\newcommand{\makecover}[2]{
%\pdfpagewidth=#1
%\pdfpageheight=#2
\noindent\hspace*{-\PictHOffset}%
\raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
\includegraphics[height=\paperheight,width=\paperwidth]{cover.jpg}}}
+
+
+ }
+
+
+
+\renewcommand{\maketitle}{
\newpage
%\vspace{\paperheight}
-
\thispagestyle{empty}
\begin{center}
\intro
\includegraphics[scale=.2]{logo.eps}
\end{center}
- \newpage
- \thispagestyle{empty}
-
- \input{editorial}
-
-
- }
-
-
-
-\renewcommand{\maketitle}{
- {
- \thispagestyle{empty}
- \footnotesize
- \color{theme}
- \noindent \rule{\linewidth}{0.4pt}
-
- \vspace{.6em}
- \color{black}
- }
}
\newcommand{\editorialsection}{
+ \newpage
+ \thispagestyle{empty}
+}
+\renewcommand*\contentsname{Table of Contents}
+\newcommand{\spistresci}{
+{
+ \intro
+ \setcounter{tocdepth}{0}
+ \tableofcontents
+ \newpage
+}
}
+
\newcommand{\tytul}[1]{%
#1%
\vspace{1em}%
}
\newcommand{\naglowekrozdzial}[1]{%
-\chapter{#1\theautorrozdzialu{}}\renewcommand{\theautorrozdzialu}{}%
+\chapter[#1]{#1\theautorrozdzialu{}}\renewcommand{\theautorrozdzialu}{}%
}
\newcommand{\naglowekosoba}[1]{%
\vspace{10pt}%
}
-\newcommand{\ilustr}[2]{
- \vspace{1em}%
+\newcommand{\ilustrscale}[0]{1}
+\newcommand{\setilustrscale}[1]{\renewcomand{\ilustrscale}{#1}}
+
+\newcommand{\ilustr}[3][]{
+ \vspace{2\baselineskip}%
\begin{center}%
- \par{\includegraphics[width=\textwidth]{\trimspace{#1}}\\#2}%
+ \ifthenelse{\isempty{#1}}%
+ {\par{\includegraphics{\trimspace{#2}}\\#3}}%
+ {\par{\includegraphics[#1]{\trimspace{#2}}\\#3}}%
\end{center}%
- \vspace{1em}%
+ \vspace{2\baselineskip}%
}
}
\newcommand{\link}[2]{\href{#1}{\uline{#2}\footnote{#1}}}
-\newcommand{\www}[1]{\url{#1}}
+\newcommand{\www}[1]{{\normalfont\small\url{#1}}}