* some wz

* no tab
* add Cdata section
# make test before commit ;)
This commit is contained in:
yannick
2005-05-10 21:14:36 +00:00
parent 9d92dc1613
commit 610b3aa2f0
7 changed files with 442 additions and 378 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="language.function.assign">
<sect1 id="language.function.assign">
<title>assign</title>
<informaltable frame="all">
<tgroup cols="5">
@@ -40,17 +40,24 @@
assign is used for assigning template variables during the execution
of the template.
</para>
<example>
<title>assign</title>
<programlisting>
<example>
<title>assign</title>
<programlisting>
<![CDATA[
{assign var="name" value="Bob"}
The value of $name is {$name}.
OUTPUT:
The value of $name is Bob.</programlisting>
</example>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
The value of $name is Bob.
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:

View File

@@ -59,8 +59,7 @@
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>the template variable the output will be assigned
to</entry>
<entry>the template variable the output will be assigned to</entry>
</row>
</tbody>
</tgroup>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="language.function.math">
<sect1 id="language.function.math">
<title>math</title>
<informaltable frame="all">
<tgroup cols="5">
@@ -82,47 +82,72 @@
repetitive math function calls, like within section loops.
</para>
</note>
<example>
<title>math</title>
<programlisting>
{* $height=4, $width=5 *}
<example>
<title>math</title>
<programlisting>
<![CDATA[
{* $height=4, $width=5 *}
{math equation="x + y" x=$height y=$width}
{math equation="x + y" x=$height y=$width}
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
9
]]>
</screen>
<programlisting>
<![CDATA[
{* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *}
OUTPUT:
9
{* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *}
{math equation="height * width / division"
{math equation="height * width / division"
height=$row_height
width=$row_width
division=#col_div#}
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
100
]]>
</screen>
<programlisting>
<![CDATA[
{* you can use parenthesis *}
OUTPUT:
{math equation="(( x + y ) / z )" x=2 y=10 z=2}
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
6
]]>
</screen>
<programlisting>
<![CDATA[
{* you can supply a format parameter in sprintf format *}
100
{* you can use parenthesis *}
{math equation="(( x + y ) / z )" x=2 y=10 z=2}
OUTPUT:
6
{* you can supply a format parameter in sprintf format *}
{math equation="x + y" x=4.4444 y=5.0000 format="%.2f"}
OUTPUT:
9.44</programlisting>
</example>
{math equation="x + y" x=4.4444 y=5.0000 format="%.2f"}
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
9.44
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="language.function.textformat">
<sect1 id="language.function.textformat">
<title>textformat</title>
<informaltable frame="all">
<tgroup cols="5">
@@ -90,65 +90,80 @@
You can set the parameters explicitly, or use a preset style.
Currently "email" is the only available style.
</para>
<example>
<title>textformat</title>
<programlisting>
{textformat wrap=40}
<example>
<title>textformat</title>
<programlisting>
<![CDATA[
{textformat wrap=40}
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is bar.
This is bar.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
{/textformat}
{/textformat}
OUTPUT:
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
This is foo. This is foo. This is foo.
This is foo. This is foo. This is foo.
This is foo. This is foo. This is foo.
This is foo. This is foo. This is foo.
This is bar.
This is bar.
bar foo bar foo foo. bar foo bar foo
foo. bar foo bar foo foo. bar foo bar
foo foo. bar foo bar foo foo. bar foo
bar foo foo. bar foo bar foo foo.
bar foo bar foo foo. bar foo bar foo
foo. bar foo bar foo foo. bar foo bar
foo foo. bar foo bar foo foo. bar foo
bar foo foo. bar foo bar foo foo.
]]>
</screen>
<programlisting>
<![CDATA[
{textformat wrap=40 indent=4}
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
{textformat wrap=40 indent=4}
This is bar.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
This is bar.
{/textformat}
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
{/textformat}
OUTPUT:
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
This is foo. This is foo. This is
foo. This is foo. This is foo. This
@@ -161,29 +176,37 @@ OUTPUT:
bar foo foo. bar foo bar foo foo.
bar foo bar foo foo. bar foo bar
foo foo.
]]>
</screen>
<programlisting>
<![CDATA[
{textformat wrap=40 indent=4 indent_first=4}
{textformat wrap=40 indent=4 indent_first=4}
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is bar.
This is bar.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
{/textformat}
OUTPUT:
{/textformat}
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
This is foo. This is foo. This
is foo. This is foo. This is foo.
@@ -196,41 +219,51 @@ OUTPUT:
foo bar foo foo. bar foo bar foo
foo. bar foo bar foo foo. bar foo
bar foo foo.
]]>
</screen>
<programlisting>
<![CDATA[
{textformat style="email"}
{textformat style="email"}
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is foo.
This is bar.
This is bar.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
bar foo bar foo foo.
{/textformat}
{/textformat}
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
OUTPUT:
This is foo. This is foo. This is foo. This is foo. This is foo. This is
foo.
This is foo. This is foo. This is foo. This is foo. This is foo. This is
foo.
This is bar.
This is bar.
bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo
bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo
foo.
bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo
bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo
foo.
</programlisting>
</example>
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables: