Wiki2LaTeX 0.11 released

Yes, that’s right. Far too many changes went into Wiki2LaTeX in the last week, so this release is called 0.11. Check out all the changes in the version history.

Most interesting changes:

  • Changed export options from radio buttons to clickable buttons. Saves you possibly one click and as the new buttons are also on top, it safes you at least one scroll operation 🙂
  • W2L now parses plain links in an article.
  • Added Polish (thx to: Szymon Tarnowski) and German translation
  • Adds compatibility with the new Vector theme.

As always there are some minor changes and some bugfixes.

Important Note:
This release needs some configuration changes (especially on older installations):

  • Removed ((WikiContent)) in LaTeX-Templates. Replace it with: ((W2L_CONTENT))
  • Removed support for old config-arrays $w2l_config and others. This only affects very old installations. Change them in your config files as such:
    • $w2l_config to $w2lConfig;
    • $w2l_tags to $w2lTags;
    • $w2l_pFunctions to $w2lParserFunctions;
  • Removed reference-support from w2lDefaultConfig.php. Reactivate it by adding include(‘contrib/ref.php’); to your own w2lConfig.php
  • Added $frame to tag-definitions (which is submitted by MW 1.16). Has no meaning at this point in W2L. This change (should not but) might break any tag extension. In case of errors please check, if the function definition matches the one given in the docs.

The last change only applies to your custom XML-Style-Parser-Extensions. All parser tags of W2L have been updated.

After you made sure, that these config changes are applied you can just replace the old files.

As soon as the online documentation is up to date, I think there will be a new release, which finally removes the beta-tag from Wiki2LaTeX. W2L 1.0 is clearly soon to be released, so please report any bug you find.

Have fun with this new version of Wiki2LaTeX.


3 Responses to Wiki2LaTeX 0.11 released

  1. Maik says:


    is it possible to use wiki2latex with latex beamer.

    I created a template, but how can I parse:
    == example = to /frametitle (example)


  2. mastro says:

    Thank you for this extension!

    I’m trying to stress it with some non-trivial test, and I found some possible weakness which seems to be really easy to fix. In case it could be useful, I summarize them — one per post.

    – file contrib/math.php , line 23: when the key ‘style’ is not defined, a php notice is raised. Despite not dramatic, the warning can be avoided with the pre-condition check

    if( array_key_exists( ‘style’ , $argv ) && $argv[‘style’] == ‘display’ ) {

    instead of

    if( $argv[‘style’] == ‘display’ ) {

  3. Charlie says:

    Hey, Hansgeorg, in the current repository there is a bug in contrib/math.php (the return $output; line is missing!)
    Sorry for my foolish report, but i am under time pressure and I don’t want this to get lost. Cool project, anyway. Really great.

    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.

    if ( !defined('MEDIAWIKI') ) {
    $msg = 'To install Wiki2LaTeX, put the following line in LocalSettings.php:’;
    $msg .= ‘require_once( $IP.”/extensions/path_to_Wiki2LaTeX_files/wiki2latex.php” );’;
    echo $msg;
    exit( 1 );

    if ( !function_exists(‘w2lMath’) ) {

    $w2lTags[‘math’] = ‘w2lMath’;
    $wgHooks[‘w2lBeginParse’][] = ‘w2lDoDisplayMath’;

    function w2lMath($input, $argv, $parser, $frame = false, $mode = ‘latex’) {
    if ( $argv[‘style’] == ‘display’ ) {
    $output = “\n\begin{equation}\n”;
    $output .= trim($input).”\n”;
    $output .= “\end{equation}\n”;
    } else {
    $output = “\n\begin{math}\n”;
    $output .= trim($input).”\n”;
    $output .= “\end{math}\n”;
    return $output;

    function w2lDoDisplayMath(&$parser, &$text) {
    $text = str_replace(“:”, “”, $text);
    return true;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: