cb4a78f238f9d30b5a507c1fed092af72339e21e
[wolnelektury.git] / apps / reporting / templates / reporting / catalogue.texml
1 {% load catalogue_tags %}
2 <TeXML xmlns="http://getfo.sourceforge.net/texml/ns1">
3     <TeXML escape="0">
4     \documentclass[a4paper, oneside, 11pt]{book}
5
6 \usepackage[MeX]{polski}
7
8 \usepackage[xetex]{graphicx}
9 \usepackage{xltxtra}
10 \usepackage{xunicode}
11
12 \usepackage{scalefnt}
13 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
14
15 \usepackage{longtable}
16
17 \setmainfont [
18 %ExternalLocation,
19 UprightFont = JunicodeWL-Regular,
20 ItalicFont = JunicodeWL-Italic,
21 BoldFont = JunicodeWL-Regular,
22 BoldItalicFont = JunicodeWL-Italic,
23 SmallCapsFont = JunicodeWL-Regular,
24 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
25 Numbers=OldStyle,
26 Scale=1.04,
27 LetterSpace=-1.0
28 ] {JunicodeWL}
29
30 \pagestyle{plain}
31 \usepackage{fancyhdr}
32
33 \makeatletter
34
35 \usepackage{color}
36 \definecolor{note}{gray}{.3}
37
38 \setlength{\hoffset}{-1cm}
39 \setlength{\oddsidemargin}{0pt}
40 \setlength{\marginparsep}{0pt}
41 \setlength{\marginparwidth}{0pt}
42
43 \setlength{\voffset}{0pt}
44 \setlength{\topmargin}{0pt}
45 \setlength{\headheight}{0pt}
46 \setlength{\headsep}{0pt}
47 \setlength{\leftmargin}{0em}
48 \setlength{\rightmargin}{0em}
49 \setlength{\textheight}{24cm}
50 \setlength{\textwidth}{17.5cm}
51
52
53 \pagestyle{fancy}
54 \fancyhf{}
55 \renewcommand{\headrulewidth}{0pt}
56 \renewcommand{\footrulewidth}{0pt}
57 \lfoot{\footnotesize Katalog biblioteki internetowej WolneLektury.pl, \today}
58 \cfoot{}
59 \rfoot{\footnotesize \thepage}
60
61 \clubpenalty=100000
62 \widowpenalty=100000
63
64
65 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
66 \newsavebox{\ximagebox}\newlength{\ximageheight}
67 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
68 \newcommand{\xbox}[1]
69 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
70 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
71 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
72 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
73 \usebox{\ximagebox}%
74 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
75
76
77 \newcommand{\name}[1]{%
78 \\
79 \Large{#1}%
80 }
81
82 \newcommand{\note}[1]{%
83 \small{\color{note}{#1}}%
84 }
85
86
87 \begin{document}
88
89     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
90         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
91     \end{minipage}
92
93     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
94         \begin{flushright}
95             \section*{Katalog biblioteki internetowej 
96                 \href{http://www.wolnelektury.pl/}{WolneLektury.pl}.}
97             stan na \today
98         \end{flushright}
99     \end{minipage}
100
101     \begin{longtable}{p{9.5cm} p{5.5cm}r p{2cm}}
102
103         <TeXML escape="1">
104             {% book_tree_texml orphans books_by_parent %}
105             {% for author, group in books_by_author.items %}
106                 {% if group %}
107                     <cmd name="name"><parm>{{ author }}</parm></cmd>
108                     <ctrl ch='\' />
109
110                     {% book_tree_texml group books_by_parent %}
111                 {% endif %}
112             {% endfor %}
113         </TeXML>
114
115     \end{longtable}
116     \end{document}
117     </TeXML>
118 </TeXML>