File: ps-show-boxed.xml

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (319 lines) | stat: -rw-r--r-- 9,963 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<!-- 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 <literal>true</literal>
   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 &gt; 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
-->