TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 11 down vote accepted

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
I added this as the correct answer, as it seems to be the most up to date and portable solution, as of 2016. – Samuel Lampa May 30 at 12:38

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

share|improve this answer

The software doing that is licensed freely under GPL and can be obtained from:


You may download the binary for Windows from there too.

On Ubuntu 16.04 or higher it is

sudo apt-get install mediawiki2latex

and then call the program by, for instance,

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

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

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 '15 at 14:22

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

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

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.