Bug fixes for links to indymedia.org.uk for publishing and admin and links to css...
[nyc.indymedia.org.git] / etc / producer / printablecontent.template
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!-- example for a simple fo file. At the beginning the page layout is set. 
4   Below fo:root there is always 
5 - a single fo:layout-master-set which defines one or more page layouts
6 - an optional fo:declarations 
7 - and a sequence of one or more fo:page-sequences containing the text and formatting instructions 
8 -->
9
10 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
11
12   <fo:layout-master-set>
13   <!-- fo:layout-master-set defines in its children the page layout: 
14        the pagination and layout specifications
15       - page-masters: have the role of describing the intended subdivisions 
16                        of a page and the geometry of these subdivisions 
17                       In this case there is only a simple-page-master which defines the 
18                       layout for all pages of the text
19   -->
20     <!-- layout information -->
21     <fo:simple-page-master master-name="simple"
22                   page-height="29.7cm" 
23                   page-width="21cm"
24                   margin-top="1cm" 
25                   margin-bottom="2cm" 
26                   margin-left="2.5cm" 
27                   margin-right="2.5cm">
28       <fo:region-body margin-top="3cm" />
29
30       <fo:region-before extent="5.0cm" />
31       <fo:region-after extent="1.5cm"/>
32     </fo:simple-page-master>
33   </fo:layout-master-set>
34   <!-- end: defines page layout -->
35
36
37   <!-- start page-sequence
38        here comes the text (contained in flow objects)
39        the page-sequence can contain different fo:flows 
40        the attribute value of master-name refers to the page layout
41        which is to be used to layout the text contained in this
42        page-sequence-->
43   <fo:page-sequence master-reference="simple">
44   <fo:static-content flow-name="xsl-region-before">
45       <!-- this defines a title -->
46       <fo:block font-size="24pt" 
47             line-height="23pt"
48             space-after.optimum="5pt"
49             background-color="black"
50             text-align="start">
51 <fo:external-graphic  src="file://${config["Producer.Image.Path"]}/banner.png"  />
52       </fo:block>
53 <fo:block font-size="10pt" 
54   font-family="serif" 
55   color="black"
56   line-height="12pt">
57   Here is where some descriptive text could go.  A fair use disclaimer
58 an attribution of copyright/left rights, etc.  the possibilities are endless.
59   <fo:leader leader-pattern="rule" leader-length="18cm"
60             rule-thickness="1pt" color="black"/>
61 </fo:block>
62   
63   </fo:static-content>
64   
65       <!-- start fo:flow
66            each flow is targeted 
67            at one (and only one) of the following:
68            xsl-region-body (usually: normal text)
69            xsl-region-before (usually: header)
70            xsl-region-after  (usually: footer)
71            xsl-region-start  (usually: left margin) 
72            xsl-region-end    (usually: right margin)
73            ['usually' applies here to languages with left-right and top-down 
74             writing direction like English]
75            in this case there is only one target: xsl-region-body
76         -->
77     <fo:flow flow-name="xsl-region-body">
78
79       <!-- each paragraph is encapsulated in a block element
80            the attributes of the block define
81            font-family and size, line-heigth etc. -->
82       
83       <!-- here is the article title -->
84       <fo:block font-size="16pt" 
85                 font-family="sans-serif" 
86     font-weight="bold"
87                 line-height="18pt"
88                 space-after.optimum="3pt"
89                 text-align="center">        
90       ${article.title}
91       </fo:block>
92       
93       <!-- here is the article author and date-->
94       <fo:block font-size="11pt" 
95                 font-family="sans-serif" 
96                 line-height="13pt"
97                 space-after.optimum="3pt"
98                 text-align="end">       
99       ${article.creator},  ${article.webdb_create_formatted}
100       </fo:block>
101
102
103       <!-- here is the article summary -->
104       <fo:block font-size="11pt" 
105                 font-family="sans-serif" 
106     font-weight="bold"
107                 line-height="13pt"
108                 space-after.optimum="3pt"
109                 text-align="justify">       
110       ${article.description_parsed}
111       </fo:block>
112
113
114         <!-- here is the header stuff -->
115 <if article.creator_main_url || article.creator_email>
116   <fo:block><fo:leader leader-pattern="rule" leader-length="18cm"
117             rule-thickness="1pt" color="black"/></fo:block>
118 </if>
119       <if article.creator_email>
120       <fo:block font-size="10pt" 
121                 font-family="sans-serif" 
122                 line-height="12pt">
123       Email:    ${article.creator_email}
124       </fo:block>
125       </if>
126       <if article.creator_main_url>
127       <fo:block font-size="10pt" 
128                 font-family="sans-serif" 
129                 line-height="12pt">
130       URL:    ${article.creator_main_url}
131       </fo:block>
132       </if> 
133       <fo:block><fo:leader leader-pattern="rule" leader-length="18cm"
134             rule-thickness="1pt" color="black"/></fo:block>
135
136       <!-- here is the content -->
137       <fo:block font-size="12pt" 
138                 font-family="sans-serif" 
139                 line-height="15pt"
140                 space-after.optimum="3pt"
141                 text-align="justify">
142 <list data.formatted_content as fc>
143 <if fc.hasImage == "1">
144 <fo:table>
145   <fo:table-column column-width="${fc.img_width}px"/>
146   <fo:table-column column-width="8px"/>
147   <fo:table-column column-width="${fc.text_widthCM}cm"/>
148   <fo:table-body>
149     <fo:table-row>
150       <fo:table-cell display-align="center">
151       <fo:external-graphic src="file://${config["Producer.Image.Path"]}${fc.img_src}" content-height="${fc.img_height}px" content-width="${fc.img_width}px" height="${fc.img_height}px" width="${fc.img_width}px" />
152 <fo:block font-weight="bold">${fc.img_title}</fo:block>
153       </fo:table-cell>
154       <fo:table-cell >
155       </fo:table-cell>
156       <fo:table-cell >
157       <fo:block text-align="justify">${fc.text}</fo:block>
158       </fo:table-cell>
159     </fo:table-row>
160   </fo:table-body> 
161 </fo:table>
162 <else>
163 <fo:block text-align="justify">${fc.text}</fo:block>
164 </if>
165
166 </list>
167
168       </fo:block>
169   
170
171
172     </fo:flow> <!-- closes the flow element-->
173   </fo:page-sequence> <!-- closes the page-sequence -->
174 </fo:root>
175
176
177
178
179
180
181
182