From 55e8586118a522d262a7b337ccf8a83cfb458054 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 4 Jun 2012 11:57:36 +0200 Subject: [PATCH] foc-specific changes --- librarian/cover.py | 13 ++- librarian/dcparser.py | 4 +- librarian/epub.py | 70 ++++++++++------ librarian/epub/cover.html | 4 +- librarian/epub/toc.html | 4 +- librarian/epub/xsltChunkTitle.xsl | 25 +++++- librarian/epub/xsltContent.xsl | 7 +- librarian/epub/xsltLast.xsl | 41 ++-------- librarian/epub/xsltScheme-FoC.xsl | 55 +++++++++++++ librarian/epub/xsltScheme.xsl | 12 +-- librarian/epub/xsltTitle.xsl | 17 +++- librarian/functions.py | 3 +- librarian/mobi.py | 7 +- librarian/pdf.py | 22 +++--- librarian/pdf/wl.cls | 127 ++++++++++++++++++++++++------ librarian/pdf/wl2tex.xslt | 51 ++++++++---- scripts/book2pdf | 2 +- 17 files changed, 328 insertions(+), 136 deletions(-) create mode 100755 librarian/epub/xsltScheme-FoC.xsl diff --git a/librarian/cover.py b/librarian/cover.py index 46990fd..741436a 100644 --- a/librarian/cover.py +++ b/librarian/cover.py @@ -120,7 +120,7 @@ class Cover(object): } def __init__(self, book_info): - self.author = ", ".join(auth.readable() for auth in book_info.authors) + #self.author = ", ".join(auth.readable() for auth in book_info.authors) self.title = book_info.title def pretty_author(self): @@ -216,6 +216,7 @@ class WLCover(Cover): super(WLCover, self).__init__(book_info) self.kind = book_info.kind self.epoch = book_info.epoch + print book_info.cover_url if book_info.cover_url: from urllib2 import urlopen from StringIO import StringIO @@ -369,3 +370,13 @@ class GandalfCover(Cover): logo_bottom = 25 logo_width = 250 format = 'PNG' + +class ImageCover(WLCover): + format = 'JPEG' + def __init__(self, *args, **kwargs): + super(ImageCover, self).__init__(*args, **kwargs) + self.im = Image.open(self.background_img) + self.width, self.height = self.im.size + + def image(self): + return self.im diff --git a/librarian/dcparser.py b/librarian/dcparser.py index 5a571ec..d4bdc67 100644 --- a/librarian/dcparser.py +++ b/librarian/dcparser.py @@ -152,7 +152,7 @@ class WorkInfo(object): __metaclass__ = DCInfo FIELDS = ( - Field( DCNS('creator'), 'authors', as_person, salias='author', multiple=True), + Field( DCNS('creator'), 'authors', as_person, salias='author', multiple=True, required=False), Field( DCNS('title'), 'title'), Field( DCNS('type'), 'type', required=False, multiple=True), @@ -170,7 +170,7 @@ class WorkInfo(object): Field( DCNS('source'), 'source_name', required=False), Field( DCNS('source.URL'), 'source_url', required=False), - Field( DCNS('identifier.url'), 'url', WLURI, strict=as_wluri_strict), + Field( DCNS('identifier.url'), 'url', WLURI, strict=as_wluri_strict, required=False), Field( DCNS('rights.license'), 'license', required=False), Field( DCNS('rights'), 'license_description'), ) diff --git a/librarian/epub.py b/librarian/epub.py index 5481516..034d82d 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -16,7 +16,7 @@ from tempfile import mkdtemp, NamedTemporaryFile from shutil import rmtree from librarian import RDFNS, WLNS, NCXNS, OPFNS, XHTMLNS, OutputFile -from librarian.cover import WLCover +from librarian.cover import ImageCover as WLCover from librarian import functions, get_resource @@ -79,7 +79,7 @@ def replace_characters(node): return text.replace(u"\ufeff", u"")\ .replace("---", u"\u2014")\ .replace("--", u"\u2013")\ - .replace(",,", u"\u201E")\ + .replace(",,", u"“")\ .replace('"', u"\u201D")\ .replace("'", u"\u2019") if node.tag in ('uwaga', 'extra'): @@ -248,14 +248,15 @@ def chop(main_text): last_node_part = False for one_part in main_text: name = one_part.tag - if name == 'naglowek_czesc': - yield part_xml - last_node_part = True - main_xml_part[:] = [deepcopy(one_part)] - elif not last_node_part and name in ("naglowek_rozdzial", "naglowek_akt", "srodtytul"): - yield part_xml - main_xml_part[:] = [deepcopy(one_part)] - else: + #if name == 'naglowek_czesc': + # yield part_xml + # last_node_part = True + # main_xml_part[:] = [deepcopy(one_part)] + #elif not last_node_part and name in ("naglowek_rozdzial", "naglowek_akt", "srodtytul"): + # yield part_xml + # main_xml_part[:] = [deepcopy(one_part)] + #else: + if True: main_xml_part.append(deepcopy(one_part)) last_node_part = False yield part_xml @@ -265,21 +266,24 @@ def transform_chunk(chunk_xml, chunk_no, annotations, empty=False, _empty_html_s """ transforms one chunk, returns a HTML string, a TOC object and a set of used characters """ toc = TOC() - for element in chunk_xml[0]: - if element.tag in ("naglowek_czesc", "naglowek_rozdzial", "naglowek_akt", "srodtytul"): - toc.add(node_name(element), "part%d.html" % chunk_no) - elif element.tag in ('naglowek_podrozdzial', 'naglowek_scena'): - subnumber = toc.add(node_name(element), "part%d.html" % chunk_no, level=1, is_part=False) - element.set('sub', str(subnumber)) + #for element in chunk_xml[0]: + # if element.tag in ("naglowek_czesc", "naglowek_rozdzial", "naglowek_akt", "srodtytul"): + # toc.add(node_name(element), "part%d.html" % chunk_no) + # elif element.tag in ('naglowek_podrozdzial', 'naglowek_scena'): + # subnumber = toc.add(node_name(element), "part%d.html" % chunk_no, level=1, is_part=False) + # element.set('sub', str(subnumber)) if empty: if not _empty_html_static: _empty_html_static.append(open(get_resource('epub/emptyChunk.html')).read()) chars = set() output_html = _empty_html_static[0] else: - find_annotations(annotations, chunk_xml, chunk_no) - replace_by_verse(chunk_xml) - html_tree = xslt(chunk_xml, get_resource('epub/xsltScheme.xsl')) + if chunk_no == 1: + html_tree = xslt(chunk_xml, get_resource('epub/xsltScheme-FoC.xsl')) + else: + find_annotations(annotations, chunk_xml, chunk_no) + replace_by_verse(chunk_xml) + html_tree = xslt(chunk_xml, get_resource('epub/xsltScheme.xsl')) chars = used_chars(html_tree.getroot()) output_html = etree.tostring(html_tree, method="html", pretty_print=True) return output_html, toc, chars @@ -302,7 +306,16 @@ def transform(wldoc, verbose=False, # every input file will have a TOC entry, # pointing to starting chunk - toc = TOC(wldoc.book_info.title, "part%d.html" % chunk_counter) + + # hack for FoC: + if wldoc.book_info.author is not None: + toc_title = "%s, %s" % (wldoc.book_info.author.readable(), wldoc.book_info.title) + note = wldoc.edoc.find('//dzielo_nadrzedne') + if note is not None: + toc_title += " (%s)" % note.text + else: + toc_title = wldoc.book_info.title + toc = TOC(toc_title, "part%d.html" % chunk_counter) chars = set() if first: # write book title page @@ -311,7 +324,8 @@ def transform(wldoc, verbose=False, zip.writestr('OPS/title.html', etree.tostring(html_tree, method="html", pretty_print=True)) # add a title page TOC entry - toc.add(u"Strona tytułowa", "title.html") + toc.add(u"Title page", "title.html") + toc.add(u"Dear readers!", "part1.html") elif wldoc.book_info.parts: # write title page for every parent if sample is not None and sample <= 0: @@ -387,8 +401,9 @@ def transform(wldoc, verbose=False, '' \ '') - zip.write(get_resource('res/wl-logo-small.png'), os.path.join('OPS', 'logo_wolnelektury.png')) - zip.write(get_resource('res/jedenprocent.png'), os.path.join('OPS', 'jedenprocent.png')) + #zip.write(get_resource('res/wl-logo-small.png'), os.path.join('OPS', 'logo_wolnelektury.png')) + #zip.write(get_resource('res/jedenprocent.png'), os.path.join('OPS', 'jedenprocent.png')) + zip.write('logo.png', os.path.join('OPS', 'logo.png')) if not style: style = get_resource('epub/style.css') zip.write(style, os.path.join('OPS', 'style.css')) @@ -404,6 +419,9 @@ def transform(wldoc, verbose=False, cover_file = StringIO() c = cover(document.book_info) + import Image + c.im = Image.open('cover.jpg') + c.ext = lambda: 'jpg' c.save(cover_file) c_name = 'cover.%s' % c.ext() zip.writestr(os.path.join('OPS', c_name), cover_file.getvalue()) @@ -437,7 +455,7 @@ def transform(wldoc, verbose=False, '')) spine.append(etree.fromstring( '')) - guide.append(etree.fromstring('')) + guide.append(etree.fromstring('')) toc, chunk_counter, chars, sample = transform_file(document, sample=sample) @@ -457,7 +475,7 @@ def transform(wldoc, verbose=False, zip.writestr('OPS/annotations.html', etree.tostring( html_tree, method="html", pretty_print=True)) - toc.add("Strona redakcyjna", "last.html") + toc.add("Editorial page", "last.html") manifest.append(etree.fromstring( '')) spine.append(etree.fromstring( @@ -501,7 +519,7 @@ def transform(wldoc, verbose=False, # write TOC if html_toc: - toc.add(u"Spis treści", "toc.html", index=1) + toc.add(u"Table of Contents", "toc.html", index=1) zip.writestr('OPS/toc.html', toc.html().encode('utf-8')) toc.write_to_xml(nav_map) zip.writestr('OPS/toc.ncx', etree.tostring(toc_file, pretty_print=True)) diff --git a/librarian/epub/cover.html b/librarian/epub/cover.html index 784067c..3233201 100644 --- a/librarian/epub/cover.html +++ b/librarian/epub/cover.html @@ -2,12 +2,12 @@ - Okładka + Cover
- Okładka + Cover
\ No newline at end of file diff --git a/librarian/epub/toc.html b/librarian/epub/toc.html index 69d8724..1c2887d 100755 --- a/librarian/epub/toc.html +++ b/librarian/epub/toc.html @@ -2,10 +2,10 @@ - WolneLektury.pl + Future of Copyright -

Spis treści

+

Table of Contents

%s diff --git a/librarian/epub/xsltChunkTitle.xsl b/librarian/epub/xsltChunkTitle.xsl index 8c0e09a..1a997b6 100644 --- a/librarian/epub/xsltChunkTitle.xsl +++ b/librarian/epub/xsltChunkTitle.xsl @@ -16,7 +16,10 @@
- + + + +
@@ -37,4 +40,24 @@ + +

+ +

+
+ + +

+ +

+
+ + +

+ +

+
+ + + diff --git a/librarian/epub/xsltContent.xsl b/librarian/epub/xsltContent.xsl index 83eb376..eb14524 100644 --- a/librarian/epub/xsltContent.xsl +++ b/librarian/epub/xsltContent.xsl @@ -15,9 +15,9 @@ - + @@ -26,11 +26,10 @@ + diff --git a/librarian/epub/xsltLast.xsl b/librarian/epub/xsltLast.xsl index 751f97a..09dbc15 100644 --- a/librarian/epub/xsltLast.xsl +++ b/librarian/epub/xsltLast.xsl @@ -15,7 +15,7 @@ - <xsl:text>Strona redakcyjna</xsl:text> + <xsl:text>Editorial page</xsl:text> @@ -23,13 +23,13 @@

- Ten utwór jest udostepniony na licencji + This book is available under the terms of - + . Ten utwór nie jest chroniony prawem autorskim i znajduje się w domenie @@ -43,28 +43,12 @@

-

Źródło: - - - - - , - - -

- - -

Tekst opracowany na podstawie:

-
- - -

-
+

Published by Modern Poland Foundation, 2012.

-

Okładka na podstawie: +

Cover image: @@ -80,19 +64,6 @@

- -
- Logo 1% -
Przekaż 1% podatku na rozwój Wolnych Lektur.
-
Nazwa organizacji: Fundacja Nowoczesna Polska
-
KRS 0000070056
-
- -

 

-

- Plik wygenerowany dnia . -

- @@ -105,7 +76,7 @@

- Opracowanie redakcyjne i przypisy: + Technical editors: , diff --git a/librarian/epub/xsltScheme-FoC.xsl b/librarian/epub/xsltScheme-FoC.xsl new file mode 100755 index 0000000..e5c36e3 --- /dev/null +++ b/librarian/epub/xsltScheme-FoC.xsl @@ -0,0 +1,55 @@ + + + + + + + + + + + + + Future of Copyright + + + + + book-text + +

Dear readers!

+ +

It is our great pleasure to present you the “Future of Copyright +Anthology”, a collection of 10 best short stories sent in for the “Future +of Copyright” contest organized by Modern Poland Foundation. These works +have been selected by our jury – Prof. Michael Geist, Piotr Czerski and +Jarosław Lipszyc.

+ +

The main prize in this contest was founded by you, the readers, on the +Indiegogo crowdfunding platform. We are proud to announce that this +prize goes to Aymeric Mansoux, author of “Morphology of a copyright +tale”, in appreciation of the originality, power and the strong message +of this work. Moreover, the jury decided to grant an honorable mention +to Togi, author of the work “Give”.

+ +

We would like to thank you for your crowdfunding support and a high +standard of the submitted works. We were pleasantly surprised by the +interest shown in the competition, and we have decided to hold +its second edition next +year. We hope that with your help it will be even more successful and +the collected works will provide a strong voice in the debate on the future +of copyright law and system.

+ +

Modern Poland Foundation Team

+ +

+Modern Poland Foundation +

+ +

http://nowoczesnapolska.org.pl

+ + + + + + \ No newline at end of file diff --git a/librarian/epub/xsltScheme.xsl b/librarian/epub/xsltScheme.xsl index 3ddcf97..e8a5af6 100644 --- a/librarian/epub/xsltScheme.xsl +++ b/librarian/epub/xsltScheme.xsl @@ -10,7 +10,7 @@ - WolneLektury.pl + Future of Copyright @@ -18,8 +18,10 @@ book-text - - + + + + @@ -122,14 +124,14 @@ - +

- +

diff --git a/librarian/epub/xsltTitle.xsl b/librarian/epub/xsltTitle.xsl index 17739a8..cc006f2 100644 --- a/librarian/epub/xsltTitle.xsl +++ b/librarian/epub/xsltTitle.xsl @@ -14,7 +14,7 @@ - <xsl:text>Strona tytułowa</xsl:text> + <xsl:text>Title page</xsl:text> @@ -40,7 +40,7 @@

[Kopia robocza]

- +

+ + Thank you for your contribution, ! + Thank you for all your contributions! + +
You made this book possible. +

+ + + diff --git a/librarian/functions.py b/librarian/functions.py index 523b3d5..e8758f0 100644 --- a/librarian/functions.py +++ b/librarian/functions.py @@ -19,7 +19,8 @@ def reg_substitute_entities(): (u'---', u'—'), (u'--', u'–'), (u'...', u'…'), - (u',,', u'„'), + #(u',,', u'„'), + (u',,', u'“'), (u'"', u'”'), ] diff --git a/librarian/mobi.py b/librarian/mobi.py index 1e7569b..6de72b3 100755 --- a/librarian/mobi.py +++ b/librarian/mobi.py @@ -9,7 +9,7 @@ import subprocess from tempfile import NamedTemporaryFile from librarian import OutputFile -from librarian.cover import WLCover +from librarian.cover import ImageCover as WLCover from librarian import get_resource @@ -30,8 +30,11 @@ def transform(wldoc, verbose=False, # provide a cover by default if not cover: cover = WLCover - cover_file = NamedTemporaryFile(suffix='.png', delete=False) c = cover(book_info) + import Image + c.im = Image.open('cover.jpg') + c.ext = lambda: 'jpg' + cover_file = NamedTemporaryFile(suffix='.' + c.ext(), delete=False) c.save(cover_file) if cover.uses_dc_cover: diff --git a/librarian/pdf.py b/librarian/pdf.py index cb65311..ca18f70 100644 --- a/librarian/pdf.py +++ b/librarian/pdf.py @@ -21,7 +21,7 @@ from librarian.dcparser import Person from librarian.parser import WLDocument from librarian import ParseError, DCNS, get_resource, OutputFile from librarian import functions -from librarian.cover import WLCover +from librarian.cover import ImageCover as WLCover functions.reg_substitute_entities() @@ -193,9 +193,10 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None, if cover: if cover is True: cover = WLCover - document.edoc.getroot().set('data-cover-width', str(cover.width)) - document.edoc.getroot().set('data-cover-height', str(cover.height)) - if cover.uses_dc_cover: + the_cover = cover(document.book_info) + document.edoc.getroot().set('data-cover-width', str(the_cover.width)) + document.edoc.getroot().set('data-cover-height', str(the_cover.height)) + if the_cover.uses_dc_cover: if document.book_info.cover_by: document.edoc.getroot().set('data-cover-by', document.book_info.cover_by) if document.book_info.cover_source: @@ -215,10 +216,11 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None, document.edoc.getroot().set('customizations', u','.join(customizations)) # hack the tree - move_motifs_inside(document.edoc) - hack_motifs(document.edoc) + #move_motifs_inside(document.edoc) + #hack_motifs(document.edoc) parse_creator(document.edoc) - substitute_hyphens(document.edoc) + if document.book_info.language == 'pol': + substitute_hyphens(document.edoc) fix_hanging(document.edoc) # wl -> TeXML @@ -231,9 +233,8 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None, temp = mkdtemp('-wl2pdf') if cover: - c = cover(document.book_info) - with open(os.path.join(temp, 'cover.png'), 'w') as f: - c.save(f) + with open(os.path.join(temp, 'cover.jpg'), 'w') as f: + the_cover.save(f) del document # no longer needed large object :) @@ -249,6 +250,7 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None, # LaTeX -> PDF shutil.copy(get_resource('pdf/wl.cls'), temp) shutil.copy(get_resource('res/wl-logo.png'), temp) + shutil.copy('logo.eps', temp) cwd = os.getcwd() os.chdir(temp) diff --git a/librarian/pdf/wl.cls b/librarian/pdf/wl.cls index c387b03..2ddcc71 100644 --- a/librarian/pdf/wl.cls +++ b/librarian/pdf/wl.cls @@ -61,12 +61,12 @@ \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \ProcessOptions\relax -\LoadClass[a4paper,oneside]{book} +\LoadClass[a4paper]{book} \usepackage{trace} -\usepackage[MeX]{polski} +%\usepackage[MeX]{polski} \usepackage[xetex]{graphicx} \usepackage{fontspec} @@ -138,7 +138,8 @@ Letters={SmallCaps,UppercaseSmallCaps} \setlength{\marginparsep}{2em} \setlength{\marginparwidth}{8.5em} -\setlength{\oddsidemargin}{0pt} +\setlength{\oddsidemargin}{36mm} +\setlength{\evensidemargin}{0pt} \setlength{\voffset}{0pt} \setlength{\topmargin}{0pt} \setlength{\headheight}{0pt} @@ -149,9 +150,11 @@ Letters={SmallCaps,UppercaseSmallCaps} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} -\lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}} +%\lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}} \cfoot{} -\rfoot{{\footnotesize \thepage}} +%\rfoot{{\footnotesize \thepage}} +\fancyfoot[LO,RE]{{\footnotesize \textsc{\@author} \emph{\@title}}} +\fancyfoot[LE,RO]{{\footnotesize \thepage}} \clubpenalty=100000 \widowpenalty=100000 @@ -169,8 +172,9 @@ Letters={SmallCaps,UppercaseSmallCaps} \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}} \newcommand{\makecover}[2]{ - \pdfpagewidth=#1 - \pdfpageheight=#2 + + %\pdfpagewidth=#1 + %\pdfpageheight=#2 \thispagestyle{empty} \newlength{\PictHOffset} @@ -185,15 +189,34 @@ Letters={SmallCaps,UppercaseSmallCaps} \addtolength{\PictVOffset}{\headheight} \addtolength{\PictVOffset}{\headsep} \addtolength{\PictVOffset}{\topskip} - \addtolength{\PictVOffset}{-\pdfpageheight} + \addtolength{\PictVOffset}{-#2} \noindent\hspace*{-\PictHOffset}% \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{% - \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.png}}} - \clearpage + \includegraphics[height=#2,width=#1]{cover.jpg}}} + %\clearpage + \vspace{#2} + + \hspace{-36mm}\parbox{16cm}{ + {\addfontfeature{LetterSpace=-4.0}\emph{\scalefont{4}% + \noindent Future of Copyright Anthology + }} + + \vspace{2em} + {\addfontfeature{LetterSpace=-4.0}{\scalefont{1.5}% + A collection of texts from a crowd-funded contest. + }} + + + \vspace{8em} - \setlength{\pdfpagewidth}{210mm} - \setlength{\pdfpageheight}{297mm} +\emph{\thankyou}\\ +\indent\emph{You made this book possible.} + } + + + %\setlength{\pdfpagewidth}{210mm} + %\setlength{\pdfpageheight}{297mm} } @@ -226,7 +249,53 @@ Letters={SmallCaps,UppercaseSmallCaps} } } +\usepackage{printlen} + \newcommand{\editorialsection}{ +\clearpage + +%\set\textwidth=450pt +%\printlength\textwidth + + +{\scalefont{1.5}Dear readers!} + + + +\vspace{1em} +It is our great pleasure to present you the “Future of Copyright +Anthology”, a collection of 10 best short stories sent in for the “Future +of Copyright” contest organized by Modern Poland Foundation. These works +have been selected by our jury – Prof. Michael Geist, Piotr Czerski and +Jarosław Lipszyc. + +The main prize in this contest was founded by you, the readers, on the +Indiegogo crowdfunding platform. We are proud to announce that this +prize goes to Aymeric Mansoux, author of “Morphology of a copyright +tale”, in appreciation of the originality, power and the strong message +of this work. Moreover, the jury decided to grant an honorable mention +to Togi, author of the work “Give”. + +We would like to thank you for your crowdfunding support and a high +standard of the submitted works. We were pleasantly surprised by the +interest shown in the competition, and we have decided to hold +its second edition next +year. We hope that with your help it will be even more successful and +the collected works will provide a strong voice in the debate on the future +of copyright law and system. + +\vspace{1em} +Modern Poland Foundation Team + +\vspace{4em} +\includegraphics[scale=.2]{logo.eps} +\vspace{1em} + +\href{http://nowoczesnapolska.org.pl/}{http://nowoczesnapolska.org.pl/} + +%\vspace{4em} +%\box{\tableofcontents} + \begin{figure}[b!] { \footnotesize @@ -236,17 +305,19 @@ Letters={SmallCaps,UppercaseSmallCaps} \rightsinfo \vspace{.6em} - Źródło: \href{\bookurl}{\bookurl} + %Źródło: \href{\bookurl}{\bookurl} - \vspace{.6em} - \sourceinfo + %\vspace{.6em} + %\sourceinfo - \description - \vspace{.6em} + %\description + %\vspace{.6em} + + Published by \href{http://nowoczesnapolska.org.pl}{Modern Poland Foundation}, 2012. \editors - \vspace{.6em} + %\vspace{.6em} \coverby \color{black} @@ -276,10 +347,13 @@ Letters={Uppercase} %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}} } - \newcommand{\tytul}[1]{% #1% -\vspace{1em}% +%\vspace{1em}% +} + +\newcommand{\autorpodutworu}[1]{% +\section*{\typosection{#1}}% } \newcommand{\nazwapodutworu}[1]{% @@ -287,6 +361,7 @@ Letters={Uppercase} } \newcommand{\autorutworu}[1]{% +\addcontentsline{toc}{part}{???} \subsection*{\typosubsection{#1}}% } @@ -302,11 +377,14 @@ Letters={Uppercase} \subsection*{\typosubsubsection{#1}}% } +\newcommand{\podtytulpodutworu}[1]{% +\subsection*{\typosubsubsection{#1}}% +} + \newcommand{\translator}[1]{% \subsection*{\typosubsubsection{tłum. #1}}% } - \newcommand{\powiesc}[1]{#1} \newcommand{\opowiadanie}[1]{#1} \newcommand{\lirykal}[1]{#1} @@ -316,7 +394,9 @@ Letters={Uppercase} \newcommand{\dramatwspolczesny}[1]{#1} \newcommand{\nota}[1]{% -\par{#1}% +\begin{quotation}% +#1% +\end{quotation}% } \newcommand{\dedykacja}[1]{% @@ -367,7 +447,7 @@ Letters={Uppercase} \subsection*{\typosubsection{#1}}% } \newcommand{\naglowekczesc}[1]{% -\pagebreak +%\pagebreak \subsection*{\typosubsection{#1}}% } \newcommand{\srodtytul}[1]{% @@ -469,6 +549,7 @@ Letters={Uppercase} \begin{center}% \par{*}% \end{center}% +\noindent% } \newcommand{\separatorlinia}{% diff --git a/librarian/pdf/wl2tex.xslt b/librarian/pdf/wl2tex.xslt index 1a675ba..5b58d61 100644 --- a/librarian/pdf/wl2tex.xslt +++ b/librarian/pdf/wl2tex.xslt @@ -58,44 +58,51 @@ + + \def\thankyou{% + + Thank you for your contribution, ! + Thank you for all your contributions! + + } + + - mm 210mm + mm - + - + + - + - + - - - + \def\coverby{ - Okładka na podstawie: + Cover image: - \href{\datacoversource}{\datacoverby} + \href{\datacoversource}{\datacoverby}. - \datacoverby{} + \datacoverby{}. @@ -103,15 +110,25 @@ + + +
+ + + + + + + @@ -153,7 +170,7 @@ \href{http://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Uznanie Autorstwa – Na Tych Samych Warunkach 3.0 PL}.} - \def\rightsinfo{Ten utwór jest udostepniony na licencji + \def\rightsinfo{This book is available under the terms of \href{}{}.} @@ -376,10 +393,10 @@ - - Opracowanie redakcyjne i przypisy: - - + + Technical editors: + + , . diff --git a/scripts/book2pdf b/scripts/book2pdf index 258c20d..37fcb17 100755 --- a/scripts/book2pdf +++ b/scripts/book2pdf @@ -52,7 +52,7 @@ if __name__ == '__main__': doc = WLDocument.from_file(main_input, provider=provider) pdf = doc.as_pdf(save_tex=options.save_tex, cover=options.with_cover, - morefloats=options.morefloats) + morefloats=options.morefloats, verbose=options.verbose) doc.save_output_file(pdf, output_file, options.output_dir, options.make_dir, 'pdf') -- 2.20.1