README.md in caracal-1.0.1 vs README.md in caracal-1.0.2

- old
+ new

@@ -10,11 +10,14 @@ Caracal is not a magical HTML to Word translator. Instead, it is a markup language for generating Office Open XML (OOXML). Programmers create Word documents by issuing a series of simple commands against a document object. When the document is rendered, Caracal takes care of translating those Ruby commands into the requisite OOXML. At its core, the library is essentially a templating engine for the `:docx` format. Or, said differently, if you use [Prawn](https://github.com/prawnpdf/prawn) for PDF generation, you'll probably like Caracal. Only you'll probably like it better. :) +Please see the [caracal-example](https://github.com/trade-informatics/caracal-example) repository for +a working demonstration of the library's capabilities. + ## Teaser How would you like to make a Word document like this? ```ruby @@ -40,11 +43,11 @@ docx.ul do li 'Item 1' li 'Item 2' end docx.p - docx.img image_url('graph.png'), width: 500, height: 300 + docx.img 'https://www.example.com/logo.png', width: 500, height: 300 end ``` **You can!** Read on. @@ -531,11 +534,11 @@ Images can be added by using the `img` method. The method accepts several optional parameters for controlling the style and placement of the asset. *Caracal will automatically embed the image in the Word document.* ```ruby -docx.img image_url('example.png') do +docx.img 'https://www.example.com/logo.png' do data raw_data # sets the file data directly instead of opening the url width 396 # sets the image width. units specified in pixels. height 216 # sets the image height. units specified in pixels. align :right # controls the justification of the image. default is :left. top 10 # sets the top margin. units specified in pixels. @@ -607,10 +610,10 @@ right # sets the right margin. defaults to 0. units in twips. end p 'This is a sentence above an image.' p - img image_url('example.png'), width: 200, height: 100 + img 'https://www.example.com/logo.png', width: 200, height: 100 end ``` ### Nested Tables