anammari / pandoc

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

Converting to ODT fails with a css file #178

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. download example README (http://johnmacfarlane.net/pandoc/README) and 
pandoc.css (http://johnmacfarlane.net/pandoc/pandoc.css)
2. run the following command:
pandoc -o pandoc.odt -c pandoc.css README
3. Attempt to open pandoc.odt in OpenOffice
3. Fails with the following error:

Format Error Discovered in the file in sub-document content.xml at 
4,0(row,col).

What is the expected output? What do you see instead?
Ideally I'd like the resultant odt to be properly styled by the CSS file. 
If that feature is not currently supported, then failing at the command 
line with a helpful message would be a nice compromise. 

What version of the product are you using? On what operating system?
pandoc 1.2.1, OpenOffice.org 3.1.1

Please provide any additional information below.
Peeking in the content.xml file, it looks like pandoc attempts to associate 
the CSS file with the following line:
<link rel="stylesheet" href="ev.css" type="text/css" media="all" />

I don't know enough about the ODT file type to know whether or not that 
should work. 

Original issue reported on code.google.com by evilhecu...@gmail.com on 11 Nov 2009 at 4:58

GoogleCodeExporter commented 8 years ago
I don't think there's any reason why it should work.  The -c option is intended 
to be
used with HTML (CSS is for styling HTML).  It inserts an HTML <link> tag, as 
you saw.
 This probably isn't valid OpenDocument XML, hence the failure.

Am I wrong?  Is CSS supposed to work with OpenDocument XML?  If you can show me 
that
it is, I will consider this a bug, but for now I'll close it.

Original comment by fiddloso...@gmail.com on 17 Nov 2009 at 5:19