Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert LaTeX to MediaWiki syntax

I need to convert LaTeX into MediaWiki syntax. The formulas should stay the same, but I need to transform, for example \chapter{something} into = something =.

Although this can be obtained with a bit of sed, things get a little dirty with the itemize environment, so I was wondering if a better solution can be produced.

Anything that can be useful for this task?

like image 785
Stefano Borini Avatar asked Jan 08 '10 17:01

Stefano Borini


2 Answers

Pandoc should be able to do it:

$ pandoc -f latex -t mediawiki << END
> \documentclass{paper}
> \begin{document}
> \section{Heading}
> 
> Hello
> 
> \subsection{Sub-heading}
> 
> \textbf{World}!
> \end{document}
> END
== Heading ==

Hello

=== Sub-heading ===

'''World'''!
like image 155
sastanin Avatar answered Nov 04 '22 09:11

sastanin


pandoc can get your file converted between several different mark-up languages pretty easily, including mediawiki

like image 33
Mica Avatar answered Nov 04 '22 09:11

Mica