Changeset 11139


Ignore:
Timestamp:
03/19/11 09:08:31 (14 months ago)
Author:
MichaelDaum
Message:

Item2436:Item1620:Item9656:Item2085:

  • added Config.spec and DEPENDENCIES to ease installation and configuration
  • improved compatibility to run this plugin on various Foswiki engines
Location:
trunk/MathModePlugin
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MathModePlugin

    • Property svn:ignore set to
      MathModePlugin.tgz
      MathModePlugin.md5
      MathModePlugin_installer.pl
      MathModePlugin.sha1
      MathModePlugin_installer
      MathModePlugin.txt
      MathModePlugin.zip
  • trunk/MathModePlugin/data/System/MathModePlugin.txt

    r5562 r11139  
    148148|   | extension of the image type; \ 
    149149           possible values are 'gif' and 'png' || 
    150 | =Latex2Img= | | '.../%SYSTEMWEB%/%TOPIC%/latex2img' | 
    151 |   | the script to convert a latex formula to an image || 
     150| =Latex2Img= | | '.../tools/MathModePlugin_latex2img' | 
     151|   | the command to convert a latex formula to an image || 
    152152| =LatexPreamble= | %<nop>LATEXPREAMBLE% | '\usepackage{latexsym}' | 
    153153| &nbsp; | latex preamble to include additional packages \ 
     
    169169--> 
    170170|  Plugin Author: | Graeme Lufkin, Foswiki:Main/MichaelDaum | 
    171 |  Copyright &copy;: | 2002 Graeme Lufkin, gwl@u.washington.edu, 2006-2009, Michael Daum http://michaeldaumconsulting.com | 
     171|  Copyright &copy;: | 2002 Graeme Lufkin, gwl@u.washington.edu, 2006-2011, Michael Daum http://michaeldaumconsulting.com | 
    172172|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | 
    173173|  Release: | %$RELEASE% | 
    174174|  Version: | %$VERSION% | 
    175175|  Change History: | &nbsp; | 
     176|  19 Mar 2011: | added Config.spec and DEPENDENCIES to ease installation and configuration; \ 
     177                  improved compatibility to run this plugin on various Foswiki engines | 
    176178|  23 Apr 2009: | converted to foswiki plugin | 
    177179|  07 Jan 2009: | certified for foswiki/compat; removed deprecated endRenderingHandler | 
  • trunk/MathModePlugin/lib/Foswiki/Plugins/MathModePlugin.pm

    r4640 r11139  
    11# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ 
    22# 
    3 # Copyright (C) 2006-2009 Michael Daum http://michaeldaumconsulting.com 
     3# Copyright (C) 2006-2011 Michael Daum http://michaeldaumconsulting.com 
    44# Copyright (C) 2002 Graeme Lufkin, gwl@u.washington.edu 
    55# 
     
    2525); 
    2626$VERSION = '$Rev$'; 
    27 $RELEASE = '4.01'; 
     27$RELEASE = '4.02'; 
    2828$NO_PREFS_IN_TOPIC = 1; 
    2929$SHORTDESCRIPTION = 'Include <nop>LaTeX formatted math in your Foswiki pages'; 
  • trunk/MathModePlugin/lib/Foswiki/Plugins/MathModePlugin/Core.pm

    r5562 r11139  
    11# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ 
    22# 
    3 # Copyright (C) 2006-2009 Michael Daum http://michaeldaumconsulting.com 
     3# Copyright (C) 2006-2011 Michael Daum http://michaeldaumconsulting.com 
    44# Copyright (C) 2002 Graeme Lufkin, gwl@u.washington.edu 
    55# 
     
    2222use Digest::MD5 qw( md5_hex ); 
    2323use File::Copy qw( move ); 
    24 use File::Temp; 
    25 use FindBin; 
    26 use Foswiki::Sandbox; 
     24use File::Temp (); 
     25#use FindBin (); 
     26use Foswiki::Sandbox (); 
    2727 
    2828use constant DEBUG => 0; # toggle me 
     
    146146  foreach my $dir (split(/\//, "$web/$topic")) { 
    147147    $topicPubDir .= '/'.$dir; 
    148     $topicPubDir = Foswiki::Sandbox::normalizeFileName($topicPubDir); 
     148    $topicPubDir = normalizeFileName($topicPubDir); 
    149149    unless (-d $topicPubDir) { 
    150150      mkdir $topicPubDir or die "can't create directory $topicPubDir"; 
     
    274274  my @files = grep(/$this->{imagePrefix}.*\.$this->{imageType}$/,readdir(DIR)); 
    275275  foreach my $fileName (@files) { 
    276     $fileName = Foswiki::Sandbox::normalizeFileName($fileName); 
     276    $fileName = normalizeFileName($fileName); 
    277277    #writeDebug( "found image: $fileName"); 
    278278 
     
    419419} 
    420420 
     421############################################################################### 
     422# wrapper 
     423sub normalizeFileName { 
     424  my $fileName = shift; 
     425 
     426  if (defined &Foswiki::Sandbox::_cleanUpFilePath) { 
     427    return Foswiki::Sandbox::_cleanUpFilePath($fileName); 
     428  } 
     429 
     430  if (defined &Foswiki::Sandbox::normalizeFileName) { 
     431    return Foswiki::Sandbox::normalizeFileName($fileName); 
     432  } 
     433 
     434  if (defined &Foswiki::normalizeFileName) { 
     435    return Foswiki::normalizeFileName($fileName); 
     436  } 
     437     
     438  # outch 
     439  return $fileName; 
     440} 
     441 
    4214421; 
  • trunk/MathModePlugin/lib/Foswiki/Plugins/MathModePlugin/DEPENDENCIES

    r211 r11139  
     1dvipng,>0,c,Required. Required to generate .png output 
     2latex2html,>0,c,Required. Required by the plugin for all output. 
  • trunk/MathModePlugin/lib/Foswiki/Plugins/MathModePlugin/MANIFEST

    r3649 r11139  
    11data/System/MathModePlugin.txt 0644 
     2lib/Foswiki/Plugins/MathModePlugin/Config.spec 0644 
    23lib/Foswiki/Plugins/MathModePlugin/Core.pm 0644 
    34lib/Foswiki/Plugins/MathModePlugin.pm 0644 
  • trunk/MathModePlugin/pub/System/MathModePlugin

    • Property svn:ignore set to
      _MathModePlugin*
Note: See TracChangeset for help on using the changeset viewer.