khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Chapter in DocBook books #265

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is my DocBook template for pandoc 1.6:

+++++++++++++++++++++++++++++++++++++

$if(legacy-header)$
$legacy-header$
$else$
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
$endif$
<book>
 <bookinfo>
   <title>$title$</title>
$for(author)$
   <author>
     $author$
   </author>
$endfor$
$if(date)$
   <date>$date$</date>
$endif$
 </bookinfo>
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
</book>

+++++++++++++++++++++++++++++++++++++

I have to fix the missing chapters:

cat bookraw.db | sed -e 's/^<section/<chapter/g' -e
's/^<\/section>/<\/chapter>/g' > book.db

Would it be possible that pandoc looks into the template and writes
chapters if the document type is book?

Original issue reported on code.google.com by schm...@gmx.de on 10 Nov 2010 at 5:01

GoogleCodeExporter commented 9 years ago
Should all Headers turn into <chapter>, or just the top-level headers?
That is, should a level 2 header still be a <section>?

Original comment by fiddloso...@gmail.com on 8 Dec 2010 at 8:16

GoogleCodeExporter commented 9 years ago
Just the top level headers. Yes.

Original comment by schm...@gmx.de on 8 Dec 2010 at 8:23

GoogleCodeExporter commented 9 years ago
Feature added in ece098b

Original comment by fiddloso...@gmail.com on 16 Jan 2011 at 5:00