diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-10-14 14:51:14 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-10-14 14:54:22 -0400 |
commit | 9a32a0743767b16456fee98354f269ba6a29efdf (patch) | |
tree | 6e83ba9d708c627d4e4c5844b47cd052fddfe9c3 /lib/sisu/v2/dal_doc_str.rb | |
parent | documentation related minor updates and fixes (diff) |
codeblocks, numbered markup option, fix
(requested fix needed by debian-live:live-manual,
Ben Armstrong & Mark Schneider)
* numbered codeblocks, , where codeblock opens with code{#
* dal changes as required, flag markup request and number
* constants, provide vertical line symbol, use to separate numbered
codeblock from code
* texpdf substitute \vline for numbered codeblock line separator
Diffstat (limited to 'lib/sisu/v2/dal_doc_str.rb')
-rw-r--r-- | lib/sisu/v2/dal_doc_str.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb index 2d4ee192..6eb2ee69 100644 --- a/lib/sisu/v2/dal_doc_str.rb +++ b/lib/sisu/v2/dal_doc_str.rb @@ -198,6 +198,7 @@ module SiSU_document_structure_extract if t_o =~/^code\{/ @@flag['code']=true @@counter=1 + @codeblock_numbered=(t_o =~/^code\{#/) ? true : false h={:obj=>'code block start'} #introduce a counter t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h) elsif t_o =~/^poem\{/ @@ -314,7 +315,7 @@ module SiSU_document_structure_extract if t_o =~/^\}code/ @@flag['code']=false obj,tags=extract_tags(@tuned_code.join("\n")) - h={:obj=>obj,:tags=>tags} + h={:obj=>obj,:tags=>tags,:number_=>@codeblock_numbered} t_o=SiSU_document_structure::Object_group.new.code(h) @tuned_code=[] tuned_file << t_o |