@@ -33,10 +33,10 @@ package.styles << list_style
3333
3434# Each list needs a numbering within the numbering part of the document.
3535
36- # Create an abstract number that describes a bulleted list:
37- abstract_number = AbstractNumber . new ( 0 )
36+ # Create an abstract numbering that describes a bulleted list:
37+ abstract_numbering = AbstractNumbering . new ( 0 )
3838
39- # Each number can have multiple levels. Define the first level as a bulleted list:
39+ # Each numbering can have multiple levels. Define the first level as a bulleted list:
4040level_0 = Level . new
4141level_0 . level = 0
4242level_0 . start = 1
@@ -49,27 +49,28 @@ level_0.character_style.font.high_ansi = "Symbol"
4949level_0 . character_style . font . hint = :default
5050level_0 . paragraph_style . indentation . left = 720
5151level_0 . paragraph_style . indentation . hanging = 360
52- abstract_number << level_0
52+ abstract_numbering << level_0
5353
54- package . numbering << abstract_number
54+ package . numbering << abstract_numbering
5555
5656package . document << create_paragraph ( "Example of adding a list to a document" )
5757
5858list_item = create_paragraph ( "First list item" )
5959list_item . paragraph_style = 'ListParagraph'
60- # Say that this list item belongs to our first abstract number :
60+ # Say that this list item belongs to our first abstract numbering :
6161list_item . numbering . level = 0
6262list_item . numbering . id = 1
6363# This ID is NOT the numbering ID we created above. Instead, it is a concrete
6464# numbering that defines an instance of a list in the document. To link it to
65- # our existing abstract number, we need to create a concrete number instance:
65+ # our existing abstract numbering, we need to create a concrete numbering
66+ # instance:
6667
67- number = Number . new ( 1 )
68- # Setting the abstract number ID here links it to a given abstract number
69- number . abstract_number_id = 0
68+ numbering = Numbering . new ( 1 )
69+ # Setting the abstract numbering ID here links it to a given abstract numbering
70+ numbering . abstract_numbering_id = 0
7071
7172# And add this number to the numbering
72- package . numbering << number
73+ package . numbering << numbering
7374
7475# All that allows us to finally add the item to the document.
7576
@@ -89,7 +90,7 @@ package.document << create_paragraph("Outline Example")
8990# Lists with numbers are a bit more complicated. The following creates an
9091# "outline" list:
9192
92- abstract_number = AbstractNumber . new ( 1 )
93+ abstract_numbering = AbstractNumbering . new ( 1 )
9394
9495[ :upperRoman , :upperLetter , :decimal , :lowerLetter , :lowerRoman , :decimal , :lowerLetter ] . each . with_index do |number_format , index |
9596 level = Level . new
@@ -102,15 +103,15 @@ abstract_number = AbstractNumber.new(1)
102103 level . alignment = :left
103104 level . paragraph_style . indentation . left = ( 360 * ( index +1 ) )
104105 level . paragraph_style . indentation . hanging = 360
105- abstract_number << level
106+ abstract_numbering << level
106107end
107108
108- package . numbering << abstract_number
109+ package . numbering << abstract_numbering
109110
110- number = Number . new ( 2 )
111- number . abstract_number_id = 1
111+ numbering = Numbering . new ( 2 )
112+ numbering . abstract_numbering_id = 1
112113
113- package . numbering << number
114+ package . numbering << numbering
114115
115116( 0 ..6 ) . each do |level |
116117 list_item = create_paragraph ( "Level #{ level +1 } " )
0 commit comments