| Andrew Stacey | |||
|
|
Fri, 17th Apr 2009 (HowDidIDoThat :: Vanilla) LaTeX plugin for Vanilla LaTeX support for VanillaThis extension allows posters to use LaTeX syntax to include mathematics in their posts. The syntax is converted to pictures in png format using a public latex server. The images are placed in a local cache. DownloadInstallationIn order for Vanilla to recognize an extension, it must be contained within its own directory within the extensions directory. So, once you have downloaded and unzipped the extension files, you can then place the folder containing the default.php file into your installation of Vanilla. The path to this extension's default.php file should look like this: /path/to/vanilla/extensions/vLaTeX/default.php Once this is complete, you can enable the extension through the "Manage Extensions" form on the settings tab in Vanilla. This extension has several configuration options. These can be set via the 'Extension Options' tab under the 'Settings' menu. Most importantly, this plugin requires a cache directory where it can save the images. The plugin will tell you what to do to create this cache. Follow these instructions carefully. Other plugins need to be told to allow the mathematics to go through.
In detail, the code is stored internally within
Requirementsphp with the GD library compiled in. UsageThe configuration panel gives several options for font size, colours, and so forth. These should be self-explanatory. Note that the background transparency works by setting one colour to be transparent so there can be "edge effects" round the text. It is probably best to set the background to be white or black when using transparency. To use in posts, surround the mathematics by the appropriate tags and it will be converted into an image. The image is cached so that the server only gets hit once per unique request. Other NotesThe script actually translates the tags into an "internal standard".
This means that changing the input tags later on does not change
earlier posts - the mathematics is displayed exactly as it was before.
As well as this robustness, this makes it easier for other filters to
ignore the mathematics (e.g. markdown can be easily told to ignore
[Full link] |
||