mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@321919 c90b9560-bf6c-de11-be94-00142212c4b1
319 lines
9.7 KiB
XML
319 lines
9.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
|
<refentry xml:id="function.ps-show-boxed" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ps_show_boxed</refname>
|
|
<refpurpose>Output text in a box</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>ps_show_boxed</methodname>
|
|
<methodparam><type>resource</type><parameter>psdoc</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>text</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>left</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>bottom</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>width</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>height</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>hmode</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>feature</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Outputs a text in a given box. The lower left corner of the box is at
|
|
(<parameter>left</parameter>, <parameter>bottom</parameter>). Line breaks
|
|
will be inserted where needed. Multiple spaces are treated as one.
|
|
Tabulators are treated as spaces.
|
|
</para>
|
|
<para>
|
|
The text will be hyphenated if the parameter
|
|
<parameter>hyphenation</parameter> is set to &true;
|
|
and the parameter <parameter>hyphendict</parameter> contains a valid
|
|
filename for a hyphenation
|
|
file. The line spacing is taken from the value <literal>leading</literal>.
|
|
Paragraphs can be
|
|
separated by an empty line just like in TeX. If the value
|
|
<literal>parindent</literal> is
|
|
set to value > 0.0 then the first n lines will be indented. The number n
|
|
of lines is set by the parameter <literal>numindentlines</literal>.
|
|
In order to prevent
|
|
indenting of the first m paragraphs set the value
|
|
<literal>parindentskip</literal> to a
|
|
positive number.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>psdoc</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Resource identifier of the postscript file
|
|
as returned by <function>ps_new</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>text</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The text to be output into the given box.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>left</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
x-coordinate of the lower left corner of the box.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>bottom</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
y-coordinate of the lower left corner of the box.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>width</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Width of the box.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>height</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Height of the box.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>hmode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The parameter <parameter>hmode</parameter> can be "justify",
|
|
"fulljustify", "right", "left", or "center". The difference of
|
|
"justify" and "fulljustify" just affects the last line of the box. In
|
|
fulljustify mode the last line will be left and right justified unless
|
|
this is also the last line of paragraph. In justify mode it will always
|
|
be left justified.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>feature</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Used parameters</title>
|
|
<para>
|
|
The output of <function>ps_show_boxed</function> can be configured with
|
|
several parameters and values which must be set with either
|
|
<function>ps_set_parameter</function> or <function>ps_set_value</function>.
|
|
Beside the parameters and values which affect text output, the following
|
|
parameters and values are evaluated.
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>leading (value)</term>
|
|
<listitem>
|
|
<para>Distance between baselines of two consecutive lines.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>linebreak (parameter)</term>
|
|
<listitem>
|
|
<para>
|
|
Set to "true" if you want a carriage return to start a new line instead
|
|
of treating it as a space. Defaults to "false".
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>parbreak (parameter)</term>
|
|
<listitem>
|
|
<para>
|
|
Set to "true" if you want a carriage return on a single line to start a
|
|
new paragraph instead of treating it as a space. Defaults to "true".
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>hyphenation (parameter)</term>
|
|
<listitem>
|
|
<para>
|
|
Set to "true" in order to turn hyphenation on. This requires a
|
|
dictionary to be set with the parameter "hyphendict". Defaults to
|
|
"false".
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>hyphendict (parameter)</term>
|
|
<listitem>
|
|
<para>
|
|
Filename of the dictionary used for hyphenation pattern (see below).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>hyphenminchar (value)</term>
|
|
<listitem>
|
|
<para>
|
|
The number of chars which must at least be left over before or after
|
|
the hyphen. This implies that only words of at least two times this
|
|
value will be hyphenated. The default value is three. Setting a value
|
|
of zero will result in the default value.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>parindent (value)</term>
|
|
<listitem>
|
|
<para>
|
|
Set the amount of space in pixel for indenting the first m lines of a
|
|
paragraph. m can be set with the value "numindentlines".
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>parskip (value)</term>
|
|
<listitem>
|
|
<para>
|
|
Set the amount of extra space in pixel between paragraphs. Defaults to
|
|
0 which will result in a normal line distance.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>numindentlines (value)</term>
|
|
<listitem>
|
|
<para>
|
|
Number of lines from the start of the paragraph which will be indented.
|
|
Defaults to 1.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>parindentskip (value)</term>
|
|
<listitem>
|
|
<para>
|
|
Number of paragraphs in the box whose first lines will not be indented.
|
|
This defaults to 0. This is useful for paragraphs right after a section
|
|
heading or text being continued in a second box. In both case one would
|
|
set this to 1.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>linenumbermode (parameter)</term>
|
|
<listitem>
|
|
<para>
|
|
Set how lines are to be numbered. Possible values are "box" for
|
|
numbering lines in the whole box or "paragraph" to number lines within
|
|
each paragraph.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>linenumberspace (value)</term>
|
|
<listitem>
|
|
<para>
|
|
The space for the column left of the numbered line containing the line
|
|
number. The line number will be right justified into this column.
|
|
Defaults to 20.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>linenumbersep (value)</term>
|
|
<listitem>
|
|
<para>
|
|
The space between the column with line numbers and the line itself.
|
|
Defaults to 5.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Hyphenation</title>
|
|
<para>
|
|
Text is hyphenated if the parameter <literal>hyphenation</literal> is set
|
|
to true and a valid hyphenation dictionary is set. pslib does not ship its own
|
|
hyphenation dictionary but uses one from openoffice, scribus or koffice.
|
|
You can find their dictionaries for different languages in one of the
|
|
following directories if the software is installed:
|
|
<simplelist>
|
|
<member>
|
|
<filename class="directory">/usr/share/apps/koffice/hyphdicts/</filename>
|
|
</member>
|
|
<member>
|
|
<filename class="directory">/usr/lib/scribus/dicts/</filename>
|
|
</member>
|
|
<member>
|
|
<filename class="directory">/usr/lib/openoffice/share/dict/ooo/</filename>
|
|
</member>
|
|
</simplelist>
|
|
Currently scribus appears to have the most complete hyphenation
|
|
dictionaries.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Number of characters that could not be written.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>ps_continue_text</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- 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:"~/.phpdoc/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
|
|
-->
|
|
|