Thank you for your response, John.
It really depends on the details of the document, but if
pandoc is struggling with certain commands and environments,
one approach is to define custom macros for those, which
convert them into something pandoc can handle.
(In a few cases you might get away with just putting the .sty
file in the working directory, so pandoc tries to parse it,
but pandoc usually can't handle the lower-level tex definitions
style files have, so this usually doesn't work.)
For example, if you have a foobar command, just
add this to your document
\renewcommand{foobar}[2]{limit yourself
here to stuff pandoc can handle}
You can often get pretty far with this method.
Jeremy Conlin <jlco...@gmail.com> writes:
> I have a large (900 page) LaTeX document (broken up into several LaTeX
> files) that I want to convert into restructured text. I've already tried to
> use pandoc to convert some of the files and it has failed for a few
> reasons.
>
> I'm a new pandoc user, but I figure I'm going to have to write my own
> converter. Before I do, I wanted to ask this forum what the right way to
> approach the conversion. I was planning on reading everything into Python,
> do my own search/replace and then pass the result on to pandoc. I would
> then rinse/repeat until I have everything the way I want it.
>
> I know there are filters and such that I can write to customize things, but
> (as a beginner) I'm not sure if it would be easier to learn pandoc syntax
> and write my own filter, or just go at it in Python as I described above.
>
> I don't mind doing it either way; I think it might be a fun side project to
> do when I'm procrastinating doing what I really should be doing.
>
> Please advise on what is the right approach. I'm sure there are other
> approaches too that I'm not aware of. I'm open for suggestions.
>
> Thanks,
> Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9c40cd2c-9874-446b-8772-c8a99e377acan%40googlegroups.com.