README.md in caracal-1.0.7 vs README.md in caracal-1.0.8
- old
+ new
@@ -329,23 +329,26 @@
Paragraph style classes can be defined using the `style` method. The method accepts several optional parameters to control the rendering of text using the style.
```ruby
docx.style do
- id 'Heading1' # sets the internal identifier for the style.
- name 'heading 1' # sets the friendly name of the style.
- font 'Palantino' # sets the font family.
- color '333333' # sets the text color. accepts hex RGB.
- size 28 # sets the font size. units in half points.
- bold false # sets the font weight.
- italic false # sets the font style.
- underline false # sets whether or not to underline the text.
- caps false # sets whether or not text should be rendered in all capital letters.
- align :left # sets the alignment. accepts :left, :center, :right, and :both.
- line 360 # sets the line height. units in twips.
- top 100 # sets the spacing above the paragraph. units in twips.
- bottom 0 # sets the spacing below the paragraph. units in twips.
+ id 'Heading1' # sets the internal identifier for the style.
+ name 'heading 1' # sets the friendly name of the style.
+ font 'Palantino' # sets the font family.
+ color '333333' # sets the text color. accepts hex RGB.
+ size 28 # sets the font size. units in half points.
+ bold false # sets the font weight.
+ italic false # sets the font style.
+ underline false # sets whether or not to underline the text.
+ caps false # sets whether or not text should be rendered in all capital letters.
+ align :left # sets the alignment. accepts :left, :center, :right, and :both.
+ line 360 # sets the line height. units in twips.
+ top 100 # sets the spacing above the paragraph. units in twips.
+ bottom 0 # sets the spacing below the paragraph. units in twips.
+ indent_left 360 # sets the left indent. units in twips.
+ indent_right 360 # sets the rights indent. units in twips.
+ indent_first 720 # sets the first line indent. units in twips.
end
```
Caracal establishes a standard set of default styles for every document. Default styles can be overridden by issuing a `style` command referencing an existing id. Default style ids are:
@@ -629,10 +632,10 @@
### Table Cells
If your table contains more complex data (multiple paragraphs, images, lists, etc.), you will probably want to instantiate your `TableCellModel` instances directly. With the exception of page breaks, table cells can contain anything the document can contain, including another table.
```ruby
-c1 = Caracal::Core::Models:TableCellModel.new do
+c1 = Caracal::Core::Models::TableCellModel.new do
background 'cccccc' # sets the background color. defaults to 'ffffff'.
margins do
top # sets the top margin. defaults to 0. units in twips.
bottom # sets the bottom margin. defaults to 0. units in twips.
left # sets the left margin. defaults to 0. units in twips.