README.md in caracal-1.1.0 vs README.md in caracal-1.1.1

- old
+ new

@@ -1,8 +1,7 @@ # Caracal -[![Build Status](http://img.shields.io/travis/trade-informatics/caracal.svg?style=flat)](https://travis-ci.org/trade-informatics/caracal) [![Gem Version](http://img.shields.io/gem/v/caracal.svg?style=flat)](https://rubygems.org/gems/caracal) ## Overview @@ -332,10 +331,11 @@ ```ruby docx.style do id 'Heading1' # sets the internal identifier for the style. name 'heading 1' # sets the friendly name of the style. + type 'paragraph' # sets the style type. accepts `paragraph` or `character` 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. @@ -361,12 +361,17 @@ * Heading3 * Heading4 * Heading5 * Heading6 +Styles are declared as `paragraph` by default. If you need to adjust inline text styles repeatedly, you might +benefit from defining a `character` style. Paragraph styles affects all text runs within a paragraph; character styles +are used to style individual runs within a larger text block. +One-off inline text styling can also be accomplished by passing the `text` command override arguments (see below). + ### Custom Properties Custom document properties can be defined using the `custom_property` method. The method accepts a few required parameters to control the definition of the custom property. ```ruby @@ -414,11 +419,11 @@ text 'Here is a sentence with a ' link 'link', 'https://www.example.com' text ' to something awesome', font: 'Courier New', color: '555555', size: 32, bold: true, italic: true, underline: true, bgcolor: 'cccccc' text '.' br - text 'This text follows a line break.' + text 'This text follows a line break and uses a character style instead of overrides.', style: 'MyCharStyle' page end ``` @@ -711,9 +716,14 @@ ## Template Rendering Caracal includes [Tilt](https://github.com/rtomayko/tilt) integration to facilitate its inclusion in other frameworks. Rails integration can be added via the [Caracal-Rails](https://github.com/trade-informatics/caracal-rails) gem. + + +## Using Variables + +Lexical scope is a pretty big challenge for Caracal and it often confuses new users. This [closed issue](https://github.com/trade-informatics/caracal/issues/71) covers the discussion both from the user and library persepctive. ## Filing an Issue Caracal was written for and tested against Word 2010, 2013, and Office365. It should also open in LibreOffice