Convert LaTeX to MediaWiki Syntax

I need to convert LaTeX to MediaWiki syntax. The formulas should remain unchanged, but I need to convert, for example, \chapter{something} to = something =.

Although this can be obtained with a little sed, everything gets a little dirty in the itemize environment, so I was wondering if a more efficient solution could be created.

Anything that can be useful for this task?

+23
source share
4 answers

Pandoc should be able to do this:

 $ 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'''! 
+21
source

pandoc can easily convert your file between several different markup languages, including mediawiki

+2
source

I found this: plasTeX . With a bit of hack, I can probably create a visualizer for the mediawiki syntax

0
source

Yes, Pandoc will be the easiest way to do this.

pandoc -f latex -t mediawiki -metadata link-citations --bibliography = bibl.bib --csl = cslstyle.csl test.tex -o test.wiki

--metadata link-citations creates hyperlinks with your text quotes and bibliography. You can remove this part if it is not required.

bibl.bib is the bibliography file you used

cslstyle.csl is the quote style you want. There are many options that can be downloaded from editor.citationstyles.org

test.tex is the file you want to convert from

test.wiki is the output file you want

all files must be in the same folder, otherwise addresses must be specified

0
source

Source: https://habr.com/ru/post/1303912/


All Articles