khajavi / pandoc

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

-B option puts file contents after the h1 title instead of before #241

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the `-B path/to/filename.txt` option, although pandoc adds the
contents of `filename.txt`, the contents end up after the h1 class="title"
instead of before it.

The full command I'm using is: `pandoc -N -s --css=/styles/foo.css --toc -B
/tmp/header.txt -A /tmp/footer.txt -o output.html input.txt`

This is using Pandoc 1.5.1.1 on Ubuntu GNU/Linux.

Original issue reported on code.google.com by jmg3...@gmail.com on 29 May 2010 at 11:41

GoogleCodeExporter commented 9 years ago
Also, my input file looks like this:

% My Title


My Title

Content goes here.

Etc.

Original comment by jmg3...@gmail.com on 29 May 2010 at 11:45

GoogleCodeExporter commented 9 years ago
If you do

pandoc --print-default-template html

you'll see why this happens.  You can change the behavior by changing the 
template
(and saving the result in ~/.pandoc/html.template).

I can't remember now whether there was a good reason for putting the -B contents
after the title.  It may have been for consistency with older versions of 
pandoc. 
But I agree with you that it probably makes sense to change the default 
template to
put the -B contents right after the <body> tag.

Original comment by fiddloso...@gmail.com on 30 May 2010 at 12:31

GoogleCodeExporter commented 9 years ago
Fixed in a59a14190686ceab44e8dd2ccb7d061f281f929f

Original comment by fiddloso...@gmail.com on 14 Jul 2010 at 2:31