From: <de...@de...> - 2007-03-12 21:19:56
|
Author: RickMach Date: 2007-03-12 16:19:37 -0500 (Mon, 12 Mar 2007) New Revision: 13128 Modified: twiki/branches/MAIN/twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Render.pm Log: Item2933: added 'imagetype' config so no long have to mod source to change generated image type to something other than png Modified: twiki/branches/MAIN/twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt =================================================================== --- twiki/branches/MAIN/twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt 2007-03-12 19:46:15 UTC (rev 13127) +++ twiki/branches/MAIN/twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt 2007-03-12 21:19:37 UTC (rev 13128) @@ -1,7 +1,7 @@ %META:TOPICINFO{author="ScottHoge" date="1153937035" format="1.1" reprev="1.2" version="1.2"}% ---+!! <nop>%TOPIC% -This <nop>LaTeX Mode TWiki Plugin allows you to include <nop>LaTeX mark up commands within a TWiki page. It uses external programs (specifically latex, dvipng or dvips-and-convert, or mimetex) to generate =png= or =gif= images from the mark up. These images are then included in the rendered TWiki page. The first time a particular image is generated, there may be a significant lag in page rendering as the images are generated on the server. Once rendered, the image is saved as an attached file for the page, so subsequent viewings will not require re-renders. When you remove a math expression from a page, its image is deleted. +This <nop>LaTeX Mode TWiki Plugin allows you to include <nop>LaTeX mark up commands within a TWiki page. It uses external programs (specifically latex, dvipng or dvips-and-convert, or mimetex) to generate =png=, =gif=, or =jpg= images from the mark up. These images are then included in the rendered TWiki page. The first time a particular image is generated, there may be a significant lag in page rendering as the images are generated on the server. Once rendered, the image is saved as an attached file for the page, so subsequent viewings will not require re-renders. When you remove a math expression from a page, its image is deleted. This plugin expands the functionality provided by the TWiki:Plugins.MathModePlugin. @@ -361,18 +361,20 @@ Finally, customize the installation specific variables. * Set the local disk paths for the rendering methods employed. This can be done by copying the needed lines from the following list to =lib/LocalSite.cfg= or =lib/TWiki.cfg=. - * $TWiki::cfg{Plugins}{LatexModePlugin}{latex} = '/usr/bin/latex'; - * $TWiki::cfg{Plugins}{LatexModePlugin}{pdflatex} = '/usr/bin/pdflatex'; - * $TWiki::cfg{Plugins}{LatexModePlugin}{dvips} = '/usr/bin/dvips'; - * $TWiki::cfg{Plugins}{LatexModePlugin}{dvipng} = '/usr/bin/dvipng'; - * $TWiki::cfg{Plugins}{LatexModePlugin}{convert} = '/usr/X11R6/bin/convert'; - * $TWiki::cfg{Plugins}{LatexModePlugin}{mimetex} = '/usr/bin/mimetex'; - * Modify the following if needed. %BR% (These variables were introduced in version 2.4) - * $TWiki::cfg{Plugins}{LatexModePlugin}{donotrenderlist} %BR% declare a comma-separated list of <nop>LaTeX commands that _will not be rendered_. %BR% Default = ='input,include,catcode'=. - * $TWiki::cfg{Plugins}{LatexModePlugin}{tweakinline} %BR% Turned off by default, if this boolean variable to =1= the plugin will attempt to align the baseline of the rendered in-line math with the baseline of the HTML text. - * $TWiki::cfg{Plugins}{LatexModePlugin}{bypassattach} %BR% Turned off by default, setting this boolean variable to =1= will force file creation to use direct file stores and bypass the saveAttach mechanism in TWiki4. Saves a bit of processing overhead. - * $TWiki::cfg{Plugins}{LatexModePlugins}{engine} %BR% This sets the default rendering engine %BR% Default: 'dvipng' + * $TWiki::cfg{Plugins}{LatexModePlugin}{latex} = '/usr/bin/latex'; + * $TWiki::cfg{Plugins}{LatexModePlugin}{pdflatex} = '/usr/bin/pdflatex'; + * $TWiki::cfg{Plugins}{LatexModePlugin}{dvips} = '/usr/bin/dvips'; + * $TWiki::cfg{Plugins}{LatexModePlugin}{dvipng} = '/usr/bin/dvipng'; + * $TWiki::cfg{Plugins}{LatexModePlugin}{convert} = '/usr/X11R6/bin/convert'; + * $TWiki::cfg{Plugins}{LatexModePlugin}{mimetex} = '/usr/bin/mimetex'; + * Modify the following if needed. %BR% + * $TWiki::cfg{Plugins}{LatexModePlugin}{donotrenderlist} %BR% declare a comma-separated list of <nop>LaTeX commands that _will not be rendered_. %BR% Default = ='input,include,catcode'=. + * $TWiki::cfg{Plugins}{LatexModePlugin}{tweakinline} %BR% Turned off by default, if this boolean variable to =1= the plugin will attempt to align the baseline of the rendered in-line math with the baseline of the HTML text. + * $TWiki::cfg{Plugins}{LatexModePlugin}{bypassattach} %BR% Turned off by default, setting this boolean variable to =1= will force file creation to use direct file stores and bypass the saveAttach mechanism in TWiki4. Saves a bit of processing overhead. + * $TWiki::cfg{Plugins}{LatexModePlugins}{engine} %BR% This sets the default rendering engine %BR% Default: 'dvipng' + * $TWiki::cfg{Plugins}{LatexModePlugins}{imagetype} %BR% This sets the image format for the generated files. Valid types are png, gif, and jpg. %BR% Default: 'png' + ---+++ Security Aside from providing beautiful rendering of mathematics, !LaTeX is @@ -425,8 +427,9 @@ ---++ Plugin Info | Plugin Author: | TWiki:Main.ScottHoge | -| Plugin Version: | 30 Dec 2006 (v 3.51) | +| Plugin Version: | 12 Mar 2007 (v 3.6) | | Change History: | %ICON{warning}% v3.0 and above requires TWiki 4.x.x and above %ICON{warning}% <!-- versions below in reverse order --> | +| 12 Mar 2007 (v 3.6) | New option, imagetype, to set png, gif, or jpg rendering | | 30 Dec 2006 (v 3.51) | fixed call to attachmentExists in Render.pm, corrected version number | | 30 Dec 2006 (v 3.5) | modified how rendering of math from included topics is handled. Fixed mimetex inline processing | | 27 Dec 2006 (v 3.4) | added mimetex to the rendering engine list | Modified: twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Render.pm =================================================================== --- twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Render.pm 2007-03-12 19:46:15 UTC (rev 13127) +++ twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Render.pm 2007-03-12 21:19:37 UTC (rev 13128) @@ -70,13 +70,13 @@ $TWiki::fgrepCmd || '/usr/bin/fgrep'; +# This is the extension/type of the generated images. Valid types +# are png, gif, and jpg. +$EXT = $TWiki::cfg{Plugins}{LatexModePlugin}{imagetype} || 'png'; + ### The variables below this line will likely not need to be changed ###################################################################### -# this is the extension of the generated images. gif or jpg are other -# possibilities. - $EXT = 'png'; - #this is the name of the latex file created by the program. You shouldn't #need to change it unless for some bizarre reason you have a file attached to #a TWiki topic called twiki_math or twiki_math.tex Modified: twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm =================================================================== --- twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm 2007-03-12 19:46:15 UTC (rev 13127) +++ twiki/branches/MAIN/twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm 2007-03-12 21:19:37 UTC (rev 13128) @@ -75,7 +75,7 @@ # number the release version of this plugin $VERSION = '$Rev$'; -$RELEASE = '3.51'; +$RELEASE = '3.6'; # ========================= sub initPlugin |