Benutzer:Dirk Huenniger/wb2pdf

Aus Wikibooks
Wechseln zu: Navigation, Suche

Summary [Bearbeiten]

Wb2pdf converts MediaWiki markup to LaTeX and PDF. So it provides and export from MediaWiki to LaTeX. It works with any project running MediaWiki, especially it converts Wikipedia to LaTeX.

Installation on Windows [Bearbeiten]

  1. Get wb2pdf https://sourceforge.net/projects/wb2pdf/files/ Download "MediaWiki to LaTeX.zip" in the latest folder
  2. unpack
  3. start "MediaWiki to LaTeX.exe"

Installation on Ubuntu [Bearbeiten]

see Installation Instructions for Ubuntu

Installation on Linux other than Ubuntu [Bearbeiten]

I recommend to use virtualbox or an other kind of virtual machine and run ubuntu in there. The program itself is already larger than ubuntu, so installing ubuntu does actually not cause much overhead. There is also an installation instruction for Fedora see [1].

Users Manual [Bearbeiten]

see Users Manual

LaTeX intermediate Code [Bearbeiten]

You will find it in

 wb2pdf/trunk/document/main/main.tex

The command to compile it is

pdflatex -interaction=nonstopmode  main.tex

where nonstopmode is important, because of the way LaTeX works you have to run it three times in order to get correct pagination, references and table of contents.

Media [Bearbeiten]

Talk [Bearbeiten]

File:Wb2pdfTalk.ogv

Slides [Bearbeiten]

Wb2pdfTalk.pdf

Poster [Bearbeiten]

File:Wb2pdfPoster.png

In Action [Bearbeiten]

To see it in action look here: Datei:Wb2latexCompilingWikibook2PDF.ogg

Developers [Bearbeiten]

The follwing Link Benutzer:Dirk Huenniger/wb2pdf/details explains some of the inner workings of the software.

Independent Installation on MikTeX [Bearbeiten]

In order to compile the code on you own installation of Miktex. You have to install the font megafont.ttf manually, which is included in the release. Furthermore you have to install the cjk-fonts and cjkpunct packages with the mpm.exe package manager. For Installing this font it is helpful to read this tutorial [2]. If you don't understand the tutorial you can look at other tutorials describing the installation of cyberbit.ttf and replace cyberbit.ttf with megafont.ttf at the appropriate places. Particularly you will not need to install cyberbit.ttf in any way.

EBook Readers [Bearbeiten]

Some Ebook readers do not support pdf but use epub instead. In these cases it is possible to compile the LaTeX file to HTML with tex4t and convert the html file to epub with calible. You have to modify the files packages1.tex and packages2.tex following the instructions given in these the files themself, look for the string tex4ht. After that you can compile with:

 htlatex main.tex  
 tex4ht main -cunihtf -utf8 -e/etc/tex4ht/tex4ht.env 

Possibly you need to swich the encoding to utf-8 in main.html

Quality and Statistics [Bearbeiten]

We did a test run on 91 randomly chosen featured articles of the english wikipedia.

result percentage
very good 63
minor error 13
severe error 16
no result at all 8

A more recent test on 500 pages resulted in only 5 pages with no result at all.