1<?xml version="1.0" encoding="UTF-8"?> 2<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> 3<article id="template_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" 4 xmlns:xi="http://www.w3.org/2001/XInclude"> 5 <title>Template 1.7</title> 6 <section id="template_1_7.templates"> 7 <title><link linkend="template_1_7.templates">Templates</link></title> 8 <para> 9 nullary_arg 10 </para> 11 <para> 12 foo baz 13 </para> 14 <para> 15 foo baz 16 </para> 17 <para> 18 This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo 19 kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... 20 </para> 21 <para> 22 <hey>baz</hey> 23 </para> 24 <para> 25 This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar 26 madagascar madagascar madagascar madagascar.... blah blah blah...... 27 </para> 28 <para> 29 zoom peanut zoom 30 </para> 31 <para> 32 exactly xanadu 33 </para> 34 <para> 35 wx 36 </para> 37 <para> 38 wxyz wxyz trail 39 </para> 40<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> 41<phrase role="special">{</phrase> 42 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> "Hello, World" <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> 43<phrase role="special">}</phrase> 44</programlisting> 45 <para> 46 x<superscript>2</superscript> 47 </para> 48 <para> 49 α<superscript>2</superscript> 50 </para> 51 <para> 52 x<superscript>2</superscript> 53 </para> 54 <para> 55 got a banana? 56 </para> 57 <para> 58 .0 00 59 </para> 60 <para> 61 [fool] 62 </para> 63 </section> 64 <section id="template_1_7.empty_templates"> 65 <title><link linkend="template_1_7.empty_templates">Empty Templates</link></title> 66 </section> 67 <section id="template_1_7.nested_templates"> 68 <title><link linkend="template_1_7.nested_templates">Nested Templates</link></title> 69 <para> 70 Pre 71 </para> 72 <para> 73 Start block template. 74 </para> 75 <para> 76 Start block template. 77 </para> 78 <para> 79 Hello! 80 </para> 81 <para> 82 End block template. 83 </para> 84 <para> 85 End block template. 86 </para> 87 <para> 88 Post 89 </para> 90 <para> 91 Pre 92 </para> 93 <para> 94 Start block template. 95 </para> 96 <para> 97 Start phrase template. Hello! End phrase template. 98 </para> 99 <para> 100 End block template. 101 </para> 102 <para> 103 Post 104 </para> 105 <para> 106 Pre Start phrase template. 107 </para> 108 <para> 109 Start block template. 110 </para> 111 <para> 112 Hello! 113 </para> 114 <para> 115 End block template. 116 </para> 117 <para> 118 End phrase template. Post 119 </para> 120 <para> 121 Pre Start phrase template. Start phrase template. Hello! End phrase template. 122 End phrase template. Post 123 </para> 124 </section> 125 <section id="template_1_7.block_markup"> 126 <title><link linkend="template_1_7.block_markup">Block Markup</link></title> 127 <itemizedlist> 128 <listitem> 129 <simpara> 130 a 131 </simpara> 132 </listitem> 133 <listitem> 134 <simpara> 135 b 136 </simpara> 137 </listitem> 138 </itemizedlist> 139 <para/> 140<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting> 141 <para> 142 Paragraphs 1 143 </para> 144 <para> 145 Paragraphs 2 146 </para> 147 <itemizedlist> 148 <listitem> 149 <simpara> 150 <itemizedlist> 151 <listitem> 152 <simpara> 153 a 154 </simpara> 155 </listitem> 156 <listitem> 157 <simpara> 158 b 159 </simpara> 160 </listitem> 161 </itemizedlist> 162 </simpara> 163 </listitem> 164 <listitem> 165 <para/> 166 </listitem> 167 <listitem> 168<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting> 169 </listitem> 170 <listitem> 171 <simpara> 172 Paragraphs 1 173 </simpara> 174 <simpara> 175 Paragraphs 2 176 </simpara> 177 </listitem> 178 </itemizedlist> 179 </section> 180 <section id="template_1_7.static_scoping"> 181 <title><link linkend="template_1_7.static_scoping">Static Scoping</link></title> 182 <para> 183 static scoping 184 </para> 185 <para> 186 [a] 187 </para> 188 <para> 189 new 190 </para> 191 <para> 192 foo foo 193 </para> 194 </section> 195 <section id="template_1_7.template_arguments"> 196 <title><link linkend="template_1_7.template_arguments">Template Arguments</link></title> 197 <para> 198 {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} 199 </para> 200 <para> 201 { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} 202 </para> 203 <para> 204 {[1-2] 3} {[1-2] 3} {[1-2} 205 </para> 206 <para> 207 {1-2-3} {1-2-3} 208 </para> 209 </section> 210 <section id="template_1_7.block_and_phrase_templates"> 211 <title><link linkend="template_1_7.block_and_phrase_templates">Block and phrase 212 templates</link></title> 213 <para> 214 Some <emphasis role="bold">text</emphasis> 215 </para> 216 <para> 217 A <emphasis>paragraph</emphasis>. 218 </para> 219 <para> 220 Some *text* A <emphasis>paragraph</emphasis>. 221 </para> 222 <para> 223 <index type="things"><title>Things</title></index> 224 </para> 225 <informaltable frame="all"> 226 <tgroup cols="0"> 227 <tbody> 228 </tbody> 229 </tgroup> 230 </informaltable> 231 <informaltable frame="all"> 232 <tgroup cols="0"> 233 <tbody> 234 </tbody> 235 </tgroup> 236 </informaltable> 237 <para> 238 Text2 afterwards. Text3 before. 239 </para> 240 <informaltable frame="all"> 241 <tgroup cols="0"> 242 <tbody> 243 </tbody> 244 </tgroup> 245 </informaltable> 246 <para> 247 Text4 before. 248 </para> 249 <informaltable frame="all"> 250 <tgroup cols="0"> 251 <tbody> 252 </tbody> 253 </tgroup> 254 </informaltable> 255 <para> 256 Text4 afterwards. 257 </para> 258 <informaltable frame="all"> 259 <tgroup cols="0"> 260 <tbody> 261 </tbody> 262 </tgroup> 263 </informaltable> 264 <para> 265 * Not a list. 266 </para> 267 <informaltable frame="all"> 268 <tgroup cols="0"> 269 <tbody> 270 </tbody> 271 </tgroup> 272 </informaltable> 273 <para> 274 * Not a list. 275 </para> 276 </section> 277 <section id="template_1_7.template_body"> 278 <title><link linkend="template_1_7.template_body">Skipping the template body 279 correctly</link></title> 280 <para> 281 <emphasis>Argument</emphasis> 282 </para> 283 <orderedlist> 284 <listitem> 285<programlisting><phrase role="identifier">code</phrase></programlisting> 286 </listitem> 287 </orderedlist> 288 <orderedlist> 289 <listitem> 290 <simpara> 291 <code><phrase role="identifier">code</phrase></code> 292 </simpara> 293 </listitem> 294 </orderedlist> 295 </section> 296 <section id="template_1_7.escaped_templates"> 297 <title><link linkend="template_1_7.escaped_templates">Escaped templates</link></title> 298 <para> 299 <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob> 300 </para> 301 </section> 302</article> 303