demydd / pandoc

Automatically exported from code.google.com/p/pandoc
0 stars 0 forks source link

texinfo support #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Here is a patch to add TexInfo output to Pandoc. I couldn't get the latest
SVN version to compile, so this patch is against r1211.

The only problem is that the generated .texi files cannot be run through
texi2dvi (LaTeX) because not all the characters are escape properly, etc.
Since Pandoc has a native LaTeX backend, I don't think it's that important.
Also the code may be a bit ugly.

I didn't support for translating HTML-style internal cross references into
Texinfo nodes (yet).

Original issue reported on code.google.com by noval...@gmail.com on 17 Feb 2008 at 12:20

Attachments:

GoogleCodeExporter commented 8 years ago
Very cool!

The patch did not include tests/writer.texinfo or tests/tables.texinfo.
I assume that you have these, since you included tests for them.
Can you upload them?

As for your difficulties compiling the latest svn source:  are you using
GHC 6.6?  If you upgrade to 6.8, you won't have any trouble, and pandoc
will build much faster.

Original comment by fiddloso...@gmail.com on 17 Feb 2008 at 4:38

GoogleCodeExporter commented 8 years ago
Here are the files. Note I incorrectly spelt "texinfo" as "texi" in generate.sh.

Yes, I am using ghc 6.6. I will upgrade to 6.8 at some stage.

Original comment by noval...@gmail.com on 17 Feb 2008 at 10:09

Attachments:

GoogleCodeExporter commented 8 years ago
I've added the Texinfo support to trunk (r1244).  I made a few changes,
so have a look and let me know if anything seems wrong.  In particular,
I solved the escaping problem by using @code instead of @verb (which doesn't
play well inside other commands), and I solved the problem of excess blank
space between a paragraph and a following code block by inserting the blank
line (if needed) in blockListToTexinfo rather than in the clause for Para.
Now texi2dvi and texi2pdf work fine with pandoc's texinfo output.
Many thanks for the patch!

Original comment by fiddloso...@gmail.com on 24 Feb 2008 at 5:52

GoogleCodeExporter commented 8 years ago
When I run the (new) writer.texinfo through texi2pdf, I get the following error
message:

Use of \ doesn't match its definition.
l.731 Backslash: \

The Texinfo manual doesn't say anything about escaping backslashes.  Any 
thoughts
on what is causing this?

Original comment by fiddloso...@gmail.com on 24 Feb 2008 at 6:40

GoogleCodeExporter commented 8 years ago
I couldn't figure it out either. I think the texinfo tools are rather buggy. 
The best
I could manage is @math{@\} or @verb{!\!}.

One other thing: since texinfo files get run through TeX rather than LaTeX, 
maybe
it's best not to include LaTeX inlines as if they were TeX.

Original comment by noval...@gmail.com on 25 Feb 2008 at 10:03