From b9bffa35fa103c9c5613102ec1ed76fc8964c773 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 9 Dec 2013 22:28:28 -0500 Subject: v5: docbook, structure, a fix * construction zone: structure okish; docbook generated not usable --- data/doc/sisu/CHANGELOG_v5 | 3 +++ lib/sisu/v5/xml_docbook5.rb | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index f050a004..fe1be01a 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -32,6 +32,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.1.2.orig.tar.xz * Rakefile, (installer) improve, re-arrange +* docbook, structure, a fix + (construction zone: structure okish; docbook generated not usable) + [NOTE disk crash (2013-11-28), fairly good but incomplete backup affecting work] %% 5.1.1.orig.tar.xz (2013-12-03:48/2) diff --git a/lib/sisu/v5/xml_docbook5.rb b/lib/sisu/v5/xml_docbook5.rb index d3840d18..9e02af39 100644 --- a/lib/sisu/v5/xml_docbook5.rb +++ b/lib/sisu/v5/xml_docbook5.rb @@ -213,13 +213,16 @@ module SiSU_XML_Docbook_Book ? @chlv=o.lc.to_i : 0 @splv=lev - unless doc_position==:head + tag_id=o.tags[0] ? %{ id="#{o.tags[0]}" } : '' + if doc_position ==:head + filename_docbook.puts %{#{space*lev}} + doc_position=:body_and_tail + else filename_docbook.puts structure_build_tag_close(lev,h) - end - doc_position=:body_and_tail - filename_docbook.puts %{#{space*(lev-1)}<#{tags.docbook(lev,chlv)}> + filename_docbook.puts %{#{space*(lev-1)}<#{tags.docbook(lev,chlv)}#{tag_id}> #{space*lev} } + end filename_docbook.puts SiSU_TextUtils::Wrap.new(o.obj + ocn,80,(@splv*2+2)).line_wrap filename_docbook.puts %{#{space*lev}} h=lev -- cgit v1.2.3