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
|
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
The docbook-to-man binary is found in the docbook-to-man package.
Please remember that if you create the nroff version in one of the
debian/rules file targets (such as build), you will need to include
docbook-to-man in your Build-Depends control field.
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>UWE</firstname>">
<!ENTITY dhsurname "<surname>STEINMANN</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>April 20, 2006</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>3</manvolnum>">
<!ENTITY dhemail "<email>uwe@steinmann.cx</email>">
<!ENTITY dhusername "Uwe Steinmann">
<!ENTITY dhucpackage "<refentrytitle>PS_SHOW_BOXED</refentrytitle>">
<!ENTITY funcname "PS_show_boxed">
<!ENTITY debian "<productname>Debian</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2003</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&funcname;</refname>
<refpurpose>Output text in a box</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para>#include <pslib.h></para>
<para>int &funcname;(PSDoc *psdoc, char *text, float left, float bottom, float width, float height, const char *hmode, const char *feature)</para>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>Outputs a text in a given box. The lower left corner of the
box is at (<parameter>left</parameter>, <parameter>bottom</parameter>).
If the <parameter>height</parameter> is set to 0.0 the box will become
as tall as needed to contain all the text. If
<parameter>feature</parameter> is set to <literal>blind</literal> no
text will be output but the is set as usual. This can for example be
used to calculate the box height needed to comprise all text or in
order to determine how much text fits into a box.</para>
<para>
Line breaks will be inserted where
needed. Multiple spaces are treated as one. Tabulators are treated as
spaces. 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>
<para>The text will be hyphenated if the parameter
"hyphenation" is set to "true" and the parameter "hyphendict" contains
a valid filename for a hyphenation file. The line spacing is taken
from the value "leading". Paragraphs can be separated by an empty
line just like in TeX. If the value "parindent" is set to value > 0.0
then the first n lines will be indented. The number of indented lines
is set by the parameter "numindentlines". In order to prevent indenting
of the first m paragraphs set the value "parindentskip" to a positive
number.</para>
</refsect1>
<refsect1>
<title>USED PARAMETERS</title>
<para>The output of <function>&funcname;</function> can be configured
with several parameters and values which must be set with either
<function>PS_set_parameter(3)</function> or
<function>PS_set_value(3)</function>. Beside the parameters and values
which affect text output the following parameters and values are
evaluated.</para>
<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 carrige 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 carrige 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>
</refsect1>
<refsect1>
<title>HYPHENATION</title>
<para>Text is hyphenated if the parameter "hyphenation" is set to true
and a valid hyphenation dictory 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: /usr/share/apps/koffice/hyphdicts/,
/usr/lib/scribus/dicts/, or /usr/lib/openoffice/share/dict/ooo/.
Currently scribus appears to have the most complete hyphenation
dictionaries.</para>
</refsect1>
<refsect1>
<title>RETURN VALUE</title>
<para>Number of charactes that could not be written. This function will
also set the value "boxheight" to the actual height of the box. This
enables you to put several boxed beneath each other and keep the propper
line spacing.</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>PS_continue_text(3)</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;>.</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:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
|