--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: chapter_number
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: table_of_contents
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: techbook_codefont
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: techbook_encoding
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: techbook_fontsize
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: techbook_source_dir
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: techbook_textfont
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: xref_table
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: run
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: PDF::TechBook
- !ruby/struct:SM::Flow::P 
  body: The TechBook class is a markup language interpreter. This will read a file containing the &quot;TechBook&quot; markukp, described below, and create a PDF document from it. This is intended as a complete document language, but it does have a number of limitations.
- !ruby/struct:SM::Flow::P 
  body: The TechBook markup language and class are used to format the PDF::Writer manual, represented in the distrubtion by the file &quot;manual.pwd&quot;.
- !ruby/struct:SM::Flow::P 
  body: The TechBook markup language is <b>primarily</b> stream-oriented with awareness of lines. That is to say that the document will be read and generated from beginning to end in the order of the markup stream.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: TechBook Markup
- !ruby/struct:SM::Flow::P 
  body: TechBook markup is relatively simple. The simplest markup is no markup at all (flowed paragraphs). This means that two lines separated by a single line separator will be treaed as part of the same paragraph and formatted appropriately by PDF::Writer. Paragaphs are terminated by empty lines, valid line markup directives, or valid headings.
- !ruby/struct:SM::Flow::P 
  body: Certain XML entitites will need to be escaped as they would in normal XML usage, that is, &amp;lt; must be written as &amp;amp;lt;; &amp;gt; must be written as &amp;amp;gt;; and &amp;amp; must be written as &amp;amp;amp;.
- !ruby/struct:SM::Flow::P 
  body: Comments, headings, and directives are line-oriented where the first mandatory character is in the first column of the document and take up the whole line. Styling and callback tags may appear anywhere in the text.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Comments
- !ruby/struct:SM::Flow::P 
  body: Comments begin with the hash-mark ('#') at the beginning of the line. Comment lines are ignored.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Styling and Callback Tags
- !ruby/struct:SM::Flow::P 
  body: Within normal, preserved, or code text, or in headings, HTML-like markup may be used for bold (&amp;lt;b&amp;gt;) and italic (&amp;lt;i&amp;gt;) text. TechBook supports standard PDF::Writer callback tags (&lt;c:alink&gt;, &lt;c:ilink&gt;, &lt;C:bullet/&gt;, and &lt;C:disc/&gt;) and adds two new ones (&lt;r:xref/&gt;, &lt;C:tocdots/&gt;).
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>&lt;r:xref/></tt>:"
    body: "Creates an internal document link to the named cross-reference destination. Works with the heading format (see below). See #tag_xref_replace for more information."
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>&lt;C:tocdots/></tt>:"
    body: This is used internally to create and display a row of dots between a table of contents entry and the page number to which it refers. This is used internally by TechBook.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Directives
- !ruby/struct:SM::Flow::P 
  body: Directives begin with a period ('.') and are followed by a letter ('a'..'z') and then any combination of word characters ('a'..'z', '0'..'9', and '_'). Directives are case-insensitive. A directive may have arguments; if there are arguments, they must follow the directive name after whitespace. After the arguments for a directive, if any, all other text is ignored and may be considered a comment.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.newpage [force]</tt>
- !ruby/struct:SM::Flow::P 
  body: The <tt>.newpage</tt> directive starts a new page. If multicolumn mode is on, a new column will be started if the current column is not the last column. If the optional argument <tt>force</tt> follows the <tt>.newpage</tt> directive, a new page will be started even if multicolumn mode is on.
- !ruby/struct:SM::Flow::VERB 
  body: "  .newpage\n  .newpage force\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.pre</tt>, <tt>.endpre</tt>
- !ruby/struct:SM::Flow::P 
  body: The <tt>.pre</tt> and <tt>.endpre</tt> directives enclose a block of text with preserved newlines. This is similar to normal text, but the lines in the <tt>.pre</tt> block are not flowed together. This is useful for poetic forms or other text that must end when each line ends. <tt>.pre</tt> blocks may not be nested in any other formatting block. When an <tt>.endpre</tt> directive is encountered, the text format will be returned to normal (flowed text) mode.
- !ruby/struct:SM::Flow::VERB 
  body: "  .pre\n  The Way that can be told of is not the eternal Way;\n  The name that can be named is not the eternal name.\n  The Nameless is the origin of Heaven and Earth;\n  The Named is the mother of all things.\n  Therefore let there always be non-being,\n    so we may see their subtlety,\n  And let there always be being,\n    so we may see their outcome.\n  The two are the same,\n  But after they are produced,\n    they have different names.\n  .endpre\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.code</tt>, <tt>.endcode</tt>
- !ruby/struct:SM::Flow::P 
  body: "The <tt>.code</tt> and <tt>.endcode</tt> directives enclose a block of text with preserved newlines. In addition, the font is changed from the normal #techbook_textfont to #techbook_codefont. The #techbook_codefont is normally a fixed pitched font and defaults to Courier. At the end of the code block, the text state is restored to its prior state, which will either be <tt>.pre</tt> or normal."
- !ruby/struct:SM::Flow::VERB 
  body: "  .code\n  require 'pdf/writer'\n  PDF::Writer.prepress # US Letter, portrait, 1.3, prepress\n  .endcode\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.blist</tt>, <tt>.endblist</tt>
- !ruby/struct:SM::Flow::P 
  body: These directives enclose a bulleted list block. Lists may be nested within other text states. If lists are nested, each list will be appropriately indented. Each line in the list block will be treated as a single list item with a bullet inserted in front using either the &lt;C:bullet/&gt; or &lt;C:disc/&gt; callbacks. Nested lists are successively indented. <tt>.blist</tt> directives accept one optional argument, the name of the type of bullet callback desired (e.g., 'bullet' for &lt;C:bullet/&gt; and 'disc' for &lt;C:disc/&gt;).
- !ruby/struct:SM::Flow::VERB 
  body: "  .blist\n  Item 1\n  .blist disc\n  Item 1.1\n  .endblist\n  .endblist\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.eval</tt>, <tt>.endeval</tt>
- !ruby/struct:SM::Flow::P 
  body: With these directives, the block enclosed will collected and passed to Ruby's Kernel#eval. <tt>.eval</tt> blocks may be present within normal text, <tt>.pre</tt>, <tt>.code</tt>, and <tt>.blist</tt> blocks. No other block may be embedded within an <tt>.eval</tt> block.
- !ruby/struct:SM::Flow::VERB 
  body: "  .eval\n  puts &quot;Hello&quot;\n  .endeval\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.columns</tt>
- !ruby/struct:SM::Flow::P 
  body: Multi-column output is controlled with this directive, which accepts one or two parameters. The first parameter is mandatory and is either the number of columns (2 or more) or the word 'off' (turning off multi-column output). When starting multi-column output, a second parameter with the gutter size may be specified.
- !ruby/struct:SM::Flow::VERB 
  body: "  .columns 3\n  Column 1\n  .newpage\n  Column 2\n  .newpage\n  Column 3\n  .columns off\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.toc</tt>
- !ruby/struct:SM::Flow::P 
  body: This directive is used to tell TechBook to generate a table of contents after the first page (assumed to be a title page). If this is not present, then a table of contents will not be generated.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.author</tt>, <tt>.title</tt>, <tt>.subject</tt>, <tt>.keywords</tt>
- !ruby/struct:SM::Flow::P 
  body: Sets values in the PDF information object. The arguments -- to the end of the line -- are used to populate the values.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: <tt>.done</tt>
- !ruby/struct:SM::Flow::P 
  body: Stops the processing of the document at this point.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Headings
- !ruby/struct:SM::Flow::P 
  body: Headings begin with a number followed by the rest of the heading format. This format is &quot;#&lt;heading-text&gt;&quot; or &quot;#&lt;heading-text&gt;xref_name&quot;. TechBook supports five levels of headings. Headings may include markup, but should not exceed a single line in size; those headings which have boxes as part of their layout are not currently configured to work with multiple lines of heading output. If an xref_name is specified, then the &amp;lt;r:xref&gt; tag can use this name to find the target for the heading. If xref_name is not specified, then the &quot;name&quot; associated with the heading is the index of the order of insertion. The xref_name is case sensitive.
- !ruby/struct:SM::Flow::VERB 
  body: "  1&lt;Chapter&gt;xChapter\n  2&lt;Section&gt;Section23\n  3&lt;Subsection&gt;\n  4&lt;Subsection&gt;\n  5&lt;Subsection&gt;\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Heading Level 1
- !ruby/struct:SM::Flow::P 
  body: First level headings are generally chapters. As such, the standard implementation of the heading level 1 method (#__heading1), will be rendered as &quot;chapter#. heading-text&quot; in centered white on a black background, at 26 point (H1_STYLE). First level headings are added to the table of contents.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Heading Level 2
- !ruby/struct:SM::Flow::P 
  body: Second level headings are major sections in chapters. The headings are rendered by default as black on 80% grey, left-justified at 18 point (H2_STYLE). The text is unchanged (#__heading2). Second level headings are added to the table of contents.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Heading Level 3, 4, and 5
- !ruby/struct:SM::Flow::P 
  body: The next three heading levels are used for varying sections within second level chapter sections. They are rendered by default in black on the background (there is no bar) at 18, 14, and 12 points, respectively (H3_STYLE, H4_STYLE, and H5_STYLE). Third level headings are bold-faced (#__heading3); fourth level headings are italicised (#__heading4), and fifth level headings are underlined (#__heading5).
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: H1_STYLE
  value: "{     :background     => Color::RGB::Black,     :foreground     => Color::RGB::White,     :justification  => :center,     :font_size      => 26,     :bar            => true"
- !ruby/object:RI::Constant 
  comment: 
  name: H2_STYLE
  value: "{     :background     => Color::RGB::Grey80,     :foreground     => Color::RGB::Black,     :justification  => :left,     :font_size      => 18,     :bar            => true"
- !ruby/object:RI::Constant 
  comment: 
  name: H3_STYLE
  value: "{     :background     => Color::RGB::White,     :foreground     => Color::RGB::Black,     :justification  => :left,     :font_size      => 18,     :bar            => false"
- !ruby/object:RI::Constant 
  comment: 
  name: H4_STYLE
  value: "{     :background     => Color::RGB::White,     :foreground     => Color::RGB::Black,     :justification  => :left,     :font_size      => 14,     :bar            => false"
- !ruby/object:RI::Constant 
  comment: 
  name: H5_STYLE
  value: "{     :background     => Color::RGB::White,     :foreground     => Color::RGB::Black,     :justification  => :left,     :font_size      => 12,     :bar            => false"
- !ruby/object:RI::Constant 
  comment: 
  name: LIST_ITEM_STYLES
  value: "%w(bullet disc)"
full_name: PDF::TechBook
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __heading1
- !ruby/object:RI::MethodSummary 
  name: __heading2
- !ruby/object:RI::MethodSummary 
  name: __heading3
- !ruby/object:RI::MethodSummary 
  name: __heading4
- !ruby/object:RI::MethodSummary 
  name: __heading5
- !ruby/object:RI::MethodSummary 
  name: generate_table_of_contents?
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_author
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_blist
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_code
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_columns
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_done
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_endblist
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_endcode
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_endeval
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_endpre
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_eval
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_keywords
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_newpage
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_pre
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_subject
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_title
- !ruby/object:RI::MethodSummary 
  name: techbook_directive_toc
- !ruby/object:RI::MethodSummary 
  name: techbook_parse
- !ruby/object:RI::MethodSummary 
  name: techbook_text
- !ruby/object:RI::MethodSummary 
  name: techbook_toc
name: TechBook
superclass: PDF::Writer
