From 5348b08e74f4ad856643cd2382105df9309bba36 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 17 Nov 2011 17:03:46 +0100 Subject: [PATCH 1/1] pdf catalogue fixes: use longtable --- apps/catalogue/templatetags/catalogue_tags.py | 2 +- .../templates/reporting/catalogue.texml | 34 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index ba70f7b57..323edda90 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -144,7 +144,7 @@ def book_tree(book_list, books_by_parent): def book_tree_texml(book_list, books_by_parent, depth=0): return "".join(""" %(depth)dem%(title)s - %(audiobook)s + %(audiobook)s %(children)s """ % { diff --git a/apps/reporting/templates/reporting/catalogue.texml b/apps/reporting/templates/reporting/catalogue.texml index 78e655135..93a13d0b2 100755 --- a/apps/reporting/templates/reporting/catalogue.texml +++ b/apps/reporting/templates/reporting/catalogue.texml @@ -12,6 +12,8 @@ \usepackage{scalefnt} \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref} +\usepackage{longtable} + \setmainfont [ %ExternalLocation, UprightFont = JunicodeWL-Regular, @@ -31,7 +33,7 @@ LetterSpace=-1.0 \makeatletter \usepackage{color} -\definecolor{theme}{gray}{.3} +\definecolor{note}{gray}{.3} \setlength{\hoffset}{-1cm} \setlength{\oddsidemargin}{0pt} @@ -45,7 +47,7 @@ LetterSpace=-1.0 \setlength{\leftmargin}{0em} \setlength{\rightmargin}{0em} \setlength{\textheight}{24cm} -\setlength{\textwidth}{18cm} +\setlength{\textwidth}{17cm} \pagestyle{fancy} @@ -73,31 +75,31 @@ LetterSpace=-1.0 \newcommand{\name}[1]{% -\vspace{.5em}\Large{#1}% +\\ +\Large{#1}% +} + +\newcommand{\note}[1]{% +\small{\color{note}{#1}}% } - \begin{document} +\begin{document} \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt} \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}} - \vspace{1em} \end{minipage} \begin{minipage}[t]{.65\textwidth}\vspace{0pt} - - \begin{flushright} - - \section*{Katalog biblioteki internetowej \href{http://www.wolnelektury.pl/}{WolneLektury.pl}.} - stan na \today - - \end{flushright} - + \begin{flushright} + \section*{Katalog biblioteki internetowej + \href{http://www.wolnelektury.pl/}{WolneLektury.pl}.} + stan na \today + \end{flushright} \end{minipage} + \begin{longtable}{p{15cm} p{2cm}} - \begin{tabular}{p{12cm} p{2cm}} - {% book_tree_texml orphans books_by_parent %} {% for author, group in books_by_author.items %} @@ -110,7 +112,7 @@ LetterSpace=-1.0 {% endfor %} - \end{tabular} + \end{longtable} \end{document} \ No newline at end of file -- 2.20.1