create new tag
, view all tags

LatexModePlugin On TWiki Personal

This topic describes how to install the LatexModePlugin and supporting software with a TWiki Personal installation on Windows. It covers certain points, particularly Perl module installation, that may be useful with other plugins.

This document reflects TWiki Personal 4.0.5 and LatexModePlugin v 3.73

  • Install TWiki
    1. download twiki personal from TWikiForWindowsPersonal
    2. unzip at the top directory (could be a removable usb stick)
    3. test that it is functional
  • Install Plugin
    1. download the LatexModePlugin .zip file from http://twiki.org/cgi-bin/view/Plugins/LatexModePlugin
    2. extract in .\twiki\twiki
    3. enable plugin in configure, or or add the following line to LocalSite.cfg
            $TWiki::cfg{Plugins}{LatexModePlugin}{Enabled} = 1;
  • Install needed Perl Modules
    This point in the installation requires a bit of thought and/or hacking. Perl modules are commonly stored in the Unix-centric .tar.gz file format. A further complication here is that while TWiki Personal contains perl, the perl support tools are not 'installed' on the OS, so they can be difficult to use. Two paths are described below: a formal/proper path, and a quick-and-dirty 'hack' path.
    1. in both cases find the module(s) needed on http://search.cpan.org
    2. download the modules and save them in C:\TEMP
      • A proper install
      1. "How to install perl modules on windows" instructions can be found here: HowToInstallCpanModules and http://www.cpan.org/modules/INSTALL.html
      2. On Windows, you have to extract the module files (Using Powerzip or similar is a good idea) into the C:\Temp folder, which creates a folder of the same name of the zip;
      3. Then you open up a little black DOS window via the start menu;
      4. Type "cd C:\Temp\(name of folder)" and you're in. Type perl Makefile.PL (Note: this will probably work only if perl is installed on the OS.)
      5. Then let it get "nmake" from the Microsoft site; and then type "nmake" (let it do it's thing) and "nmake test" (wait again) and "nmake install" (not "dmake"!) to install it (apparently);
      6. Note: certain modules, such as File::Basename, that use compiled C code will require a C compiler.
      7. repeat thrice - once for each of the required modules.
      • install hack
      1. Perl modules are typically very portable. So, after you extract the module files (using Powerzip or GNU tar tools) you can probably get away with just copying the files directly.
      2. so, copy all of the .pm files to the TWiki-PM CPAN perl lib directory: i.e. C:\TEMP\Image-Info-N.NN\lib\ to the same tree in \twiki\twiki\lib\CPAN\lib In a DOS or CMD shell:
        md C:\twiki\twiki\lib\CPAN\lib\Image
        copy C:\TEMP\Image-Info-N.NN\lib\Image\Info.pm  C:\twiki\twiki\lib\CPAN\lib\Image\Info.pm
        md C:\twiki\twiki\lib\CPAN\lib\Image\Info
        copy C:\TEMP\Image-Info-N.NN\lib\Image\Info\*.pm C:\twiki\twiki\lib\CPAN\lib\Image\Info\

Or you're afraid of DOS boxes (and assuming you've extracted the Image-Info-1.28.tar to your C:\Temp directory), you can manually copy-paste the entire Image folder from C:\TEMP\Image-Info-N.NN\lib\ to C:\twiki\twiki\lib\CPAN\lib\ \ (if you're using a USB stick, there'll be a different drive letter of course - a.k.a. "root directory").

    1. Test the plugin-diagnostics at
  • Install the LaTeX rendering engine:
    1. Download mimetex, and extract the binary to \twiki\tools\
    2. add the following lines to \twiki\twiki\lib\LocalSite.cfg
            $TWiki::cfg{Plugins}{LatexModePlugin}{mimetex} = '\twiki\tools\mimetex';
            $TWiki::cfg{Plugins}{LatexModePlugin}{imagetype} = 'gif';
  • Test the plugin
    1. Create a new topic in the Sandbox
    2. Add some plugin specific macros to the text:
            %\[ -1 + 0 = \exp^{ \pi } \]%

-- ScottHoge, JackMacDaddy

TopicClassification PluginDevelopment
TopicSummary TWiki Personal is a fast way to get started with TWiki. This topic describes how to add a plugin to it.
InterestedParties ScottHoge
RelatedTopics LatexModePlugin
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2008-07-05 - JackMacDaddy
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.