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

View File

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

View File

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

View File

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