Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I think I've seen a script for converting mediawiki syntax to Latex. Also, in case there are more than one solution for this, it might be nice to summarize them here.

share|improve this question

7 Answers 7

up vote 11 down vote accepted

If you're working from within a MediaWiki, there is the wiki2latex extension.

share|improve this answer

I'm surprised no one has mentioned Pandoc yet. Quoting its website:

Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, TWiki markup, OPML, Emacs Org-Mode, Txt2Tags, Microsoft Word docx, LibreOffice ODT, EPUB, or Haddock markup to

  • HTML formats: XHTML, HTML5, and HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides.
  • Word processor formats: Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML
  • Ebooks: EPUB version 2 or 3, FictionBook2
  • Documentation formats: DocBook, GNU TexInfo, Groff man pages, Haddock markup
  • Page layout formats: InDesign ICML
  • Outline formats: OPML
  • TeX formats: LaTeX, ConTeXt, LaTeX Beamer slides
  • PDF via LaTeX
  • Lightweight markup formats: Markdown (including CommonMark), reStructuredText, AsciiDoc, MediaWiki markup, DokuWiki markup, Emacs Org-Mode, Textile

It's a command-line tool. Usage:

pandoc input.txt -f mediawiki -t latex --standalone -o output.tex
share|improve this answer
That's not an answer. Can you maybe explain a little more on how it works etc.? – MERose Oct 30 at 12:59

Actually there is a website doing that:

The software running there is licensed freely under GPL and can be obtained from:

You may download the binary for Windows from there too.

On Ubuntu 13.10 or higher it is

sudo apt-get install mediawiki2latex

and then call the program by, for instance,

mediawiki2latex -u -o AdamRies.pdf
share|improve this answer
For I get a bad gateway error and the example doesn't work for me as well (Ubuntu 14.04). – MERose Oct 30 at 12:57

There is also WikiPublisher addon which is built specifically as an addon to pmwiki. I have been using it with quite some success.

share|improve this answer

Zim is WYSIWYG desktop note-taking application with a wiki markup that can directly export their .txt pages to HTML or LaTeX code. It is available for Windows, BSD and Linux (included in several distributions). It can export single pages or complete notebooks.

A simple page of Zim, their internal wiki code and the compiled LaTeX export as article is showed below:


Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2012-10-05T19:09:32+02:00

====== Testing Zim ======

===== Title 2 =====

==== Title 3 ====

=== Title 4 ===

== Title 5 ==

Some text  normal **bold** //italic// __underlined__
~~deleted~~ normal ''literal ''_{ sub} ^{super}

* item
* item
* item

[*] item checked
[ ] item not checked


share|improve this answer
Unfortunately it doesn't use MediaWiki mark up, but its own format – Alexey Grigorev Dec 29 '13 at 14:43
@AlexeyGrigorev, Yes, but for simple pages can be useful. If you simply make a search & replace from ''' to ** and from '' to // (in that order, obviously) you can later import the MediaWiki code with bolds and italics working, and the titles, the [[links]] and the itemized list are imported without modification. – Fran Dec 30 '13 at 11:13

Javalatex seems like a very interesting project, and should have support for this. (Haven't tried them yet, but will report experience when I have)

share|improve this answer

This perl script seems to be the script I was thinking of.

share|improve this answer
It says: "Update: Don't use this. Use Pandoc instead!" – Erel Segal-Halevi Aug 28 at 14:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.