Sha256: 13edb1c542b66c76657a3aeaa56e539b5f04f4e8f984dda2f7c317ec6c15947f
Contents?: true
Size: 876 Bytes
Versions: 1
Compression:
Stored size: 876 Bytes
Contents
require 'docx_generator' DocxGenerator::DSL::Document.new("basic_paragraph") do |doc| doc.paragraph do |par| par.alignment :center par.text "Title", underline: { style: "double" }, size: 20 # par.newline end doc.paragraph do |par| par.text "Simple string of text and" par.text "some formatted text" do |t| t.bold true t.italics true t.underline style: "single" end end doc.paragraph do |par| par.text "Antoine", bold: true par.text "How are you today?" end doc.paragraph do |par| par.text "John", bold: true par.text "(whispering)", bold: true, italics: true par.text "How are you today?" end doc.paragraph(alignment: :center) do |par| par.text "A simple chemical formula: CO" par.no_space par.text "2", subscript: true end doc.save end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
docx_generator-0.1.0 | examples/basic_document_with_blocks.rb |