Blame view

export/PHPRtfLite-1.3.1/docs/html/_sources/enumerations-numberings.txt 2.15 KB
f90e19c3   Andrea Petta   plugin update
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
  Enumerations / Numberings
  *************************
  
  Enumerations and numberings can be added to table cells and sections. They can be nested.
  
  
  Enumerations
  =============
  
  Enumeration example:
  
  .. code-block:: php
  
      <?php
      // first level enumeration
      $enum = new PHPRtfLite_List_Enumeration($rtf);
      $enum->addItem('hello world');
      $enum->addItem('foo');
      $enum->addItem('bar');
      // second level enumeration
      $subEnum = new PHPRtfLite_List_Enumeration($rtf);
      $subEnum->addItem('hello world');
      $subEnum->addItem('foo');
      $subEnum->addItem('bar');
      $enum->addList($subEnum);
      
      $section = $rtf->addSection();
      // add enumeration to a section
      $section->addList($enum);
  
  
  For enumerations the following types are supported:
  
  - TYPE_BULLET   uses bullets as enumeration characters (default)
  - TYPE_ARROW    uses arrows as enumeration characters
  - TYPE_CIRCLE   uses circles as enumeration characters
  - TYPE_SQUARE   uses squares as enumeration characters
  - TYPE_DIAMOND  uses diamonds as enumeration characters
  
  The bullet character are the default character for enumerations.
      
  
  Numberings
  =============
  
  Numbering example:
  
  .. code-block:: php
  
      <?php
      // first level numbering
      $numList = new PHPRtfLite_List_Numbering($rtf);
      $numList->addItem('hello world');
      $numList->addItem('foo');
      $numList->addItem('bar');
  
      // second level numbering
      $subNumList = new PHPRtfLite_List_Numbering($rtf);
      $subNumList->addItem('hello world');
      $subNumList->addItem('foo');
      $subNumList->addItem('bar');
      $numList->addList($subNumList);
      // add item in the first level
      $numList->addItem('foobar');
  
      $section = $rtf->addSection();
      // add numbering to a section
      $section->addList($numList);
  
  
  For numberings the following types are supported:
  
  - TYPE_ARABIC_NUM   counting in arabic numbers (default)
  - TYPE_ALPHA_UPPER  counting in alphanumeric characters in upper case
  - TYPE_ALPHA_LOWER  counting in alphanumeric characters in lower case
  - TYPE_ROMAN_UPPER  counting in roman characters in upper case
  - TYPE_ROMAN_LOWER  counting in roman characters in lower case
  
  Arabic numbering is the default type.