posts - 81, comments - 257, trackbacks - 0

BibTex Citation Management in MediaWiki


Lately I have been setting up a local MediaWiki installation to organize and document my research (see previous posts which relate to installing MediaWiki on Windows). An essential feature is of course documentation, and nise presents a nice solution by combining two extensions, Biblio and Bibtex.

This solution allows you to use the BibTex citations from a manager such as Mendeley or JabRef in both the MediaWiki citations and LaTex citations.

I integrated the two similarly to how nise has, but with a modification on matching Bibtex entries, using a regular expression instead of a string match.

  1. Install Biblio and Bibtex extensions
  2. Open Biblio.php and location the function render_biblio
  3. Define the following within the function (just under the two global's works)

     

    $bibtexx = new BibTex();

  4. Find "$text = $this->get($ref, 'text');" further down in the function and add the following just below it.

     

    if(preg_match("/@[a-zA-Z]+/", $text, $matches)){
    $bibtexx->BibTex($text);
    $text = $bibtexx->html();
    }

  5. The example by nise will now work as intended

     

    #localref local reference
    #[[Literature]]
    #somebook @book{Alexander1979,
        Author = {Christopher Alexander},
        Publisher = {Oxford University Press},
        Title = {The Timeless Way of Building},
        Year = {1979}}
    #someusualbook MySelf. "Me Myself and I". Self.
    #x ...

The difference with what was originally done is the Regular Expression match. Since a BibTex entry starts with @type, we test for @[someword].

 

 

 

 


Print | posted on Wednesday, September 5, 2012 10:21 AM |

Feedback

Gravatar

# ugg saappaat

Uggs boots keep feet toasty even http://www.uggssaappaatsuomi.org/ in the freezing cold days and ugg saappaat therefore have become the ugg saappaat suomesta first choices of many customers xiaocaicl15. ugg saappaat boots This kind of footwear looks fashionable ugg saappaat oulu and unique and is available in different uggs saarbrücken styles and colors for your choices. Made http://www.uggstovlerdanmark-s.com/ with twin-faced sheepskin, these boots feel incredible ugg boots udsalg warm and comfortable. Many celebrities are ugg boots dk also spotted wearing them during the winter season ugg boots tilbud to go through the cold winter. But this conception is ugg boots online quite wrong, as wearing them sensibly especially with jeans and feathery coats really looks cool and exquisite.
3
11/13/2012 3:14 AM | Zkjykgsng01

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 2 and 4 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET