2007-04-21 12:13:34 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<!-- $Revision$ -->
|
2008-05-26 08:47:23 +00:00
|
|
|
<!-- EN-Revision: 2602 Maintainer: takagi Status: ready -->
|
2007-04-21 12:13:34 +00:00
|
|
|
<!-- CREDITS: mat-sh,daichi,joe -->
|
|
|
|
|
<sect1 id="language.function.textformat">
|
|
|
|
|
<title>{textformat}</title>
|
|
|
|
|
<para>
|
|
|
|
|
<varname>{textformat}</varname> は、
|
|
|
|
|
テキストを整形するために用いる
|
|
|
|
|
<link linkend="plugins.block.functions">ブロック関数</link> です。
|
|
|
|
|
これは基本的に空白と特殊文字を取り除き、
|
|
|
|
|
境界でラップして行をインデントする事によって段落を整形します。
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
明示的にパラメータを設定したり、あらかじめ決められたスタイルを使用したりできます。現在、
|
|
|
|
|
<quote>email</quote> のみが有効なスタイルです。
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
<informaltable frame="all">
|
|
|
|
|
<tgroup cols="5">
|
|
|
|
|
<colspec colname="param" align="center" />
|
|
|
|
|
<colspec colname="type" align="center" />
|
|
|
|
|
<colspec colname="required" align="center" />
|
|
|
|
|
<colspec colname="default" align="center" />
|
|
|
|
|
<colspec colname="desc" />
|
|
|
|
|
<thead>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>属性名</entry>
|
|
|
|
|
<entry>型</entry>
|
|
|
|
|
<entry>必須</entry>
|
|
|
|
|
<entry>デフォルト</entry>
|
|
|
|
|
<entry>概要</entry>
|
|
|
|
|
</row>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>style</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
<entry>あらかじめ決められたスタイル</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>indent</entry>
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>0</emphasis></entry>
|
|
|
|
|
<entry>各行をインデントするキャラクタ数</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>indent_first</entry>
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>0</emphasis></entry>
|
|
|
|
|
<entry>最初の行をインデントするキャラクタ数</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>indent_char</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>(半角スペース1個)</emphasis></entry>
|
|
|
|
|
<entry>インデントするために使われるキャラクタ(又は文字列)</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>wrap</entry>
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>80</emphasis></entry>
|
|
|
|
|
<entry>各行をいくつのキャラクタ数でラップするか</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>wrap_char</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>\n</emphasis></entry>
|
|
|
|
|
<entry>各行を分割するためのキャラクタ(又は文字列)</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>wrap_cut</entry>
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>&false;</emphasis></entry>
|
|
|
|
|
<entry>&true; ならば、単語の境界の代わりに正確なキャラクタ数で行を分割します。</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>assign</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
<entry>出力が割り当てられるテンプレート変数</entry>
|
|
|
|
|
</row>
|
|
|
|
|
</tbody>
|
|
|
|
|
</tgroup>
|
|
|
|
|
</informaltable>
|
|
|
|
|
|
|
|
|
|
<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 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.
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
上の例の出力
|
|
|
|
|
</para>
|
|
|
|
|
<screen>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
|
|
This is foo. 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.
|
|
|
|
|
]]>
|
|
|
|
|
</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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
上の例の出力
|
|
|
|
|
</para>
|
|
|
|
|
<screen>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
|
|
This is foo. 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.
|
|
|
|
|
]]>
|
|
|
|
|
</screen>
|
|
|
|
|
<programlisting>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
{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 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.
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
]]>
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
上の例の出力
|
|
|
|
|
</para>
|
|
|
|
|
<screen>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
|
|
This is foo. 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.
|
|
|
|
|
]]>
|
|
|
|
|
</screen>
|
|
|
|
|
<programlisting>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
{textformat style="email"}
|
|
|
|
|
|
|
|
|
|
This is foo.
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
上の例の出力
|
|
|
|
|
</para>
|
|
|
|
|
<screen>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
|
|
This is foo. 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.
|
|
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
</screen>
|
|
|
|
|
</example>
|
|
|
|
|
<para>
|
|
|
|
|
<link linkend="language.function.strip"><varname>{strip}</varname></link>
|
|
|
|
|
および
|
|
|
|
|
<link linkend="language.modifier.wordwrap"><varname>wordwrap</varname></link>
|
|
|
|
|
も参照してください。
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
|
Local variables:
|
|
|
|
|
mode: sgml
|
|
|
|
|
sgml-omittag:t
|
|
|
|
|
sgml-shorttag:t
|
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
|
sgml-indent-step:1
|
|
|
|
|
sgml-indent-data:t
|
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
|
sgml-parent-document:nil
|
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
|
End:
|
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
|
-->
|