How to install and configure Drupal's TeX implementation, DruTeX. We localize DruTeX files within their site directories (rather than in a global Drupal-wide directory) so sites are self-contained.
- Download and unpack the PEAR Wiki filter module in the sites/all/ directory.
- Site Building -> Modules -> Enable the PEAR Wiki filter module.
- Download and unpack the DruTeX module in the sites/all/ directory.
- Site Building -> Modules -> Enable the DruTeX module.
- User management -> Permissions -> Grant authenticated users and above rights to access DruTeX stuff.
- Localize the DruTeX module settings:
Site Config -> DruTeX Settings ->
Temporary directory: sites/wiki.cse.buffalo.edu.cse545_6/files/tmp
Conversion method: custom
Conversion Method (Custom): [fully-qualify the paths to the latex and dvipng binaries]
- Create a DruTeX input format:
Site Config -> Input Formats -> Add Input Format ->
Name: DruTeX
Roles: [authenticated user and above]
Filters: DruTeX, PEAR Wiki Filter
Save Configuration
- Configure the DruTeX input format:
Site Config -> Input Formats -> DruTeX -> Configure
Configure tab->
PEAR Wiki filter
Path of PEAR packages: /usr/local/www/drupal6/sites/all/modules/pearwiki_filter/
Format: MediaWiki
Compatibility
Allow HTML? [unchecked]
Ignore tags: equation equations math tex
Wikilinks
Use wiki links? [checked]
Replacement for Spaces: -
Base path for wikilinks: /wiki
Use wikitools? [checked]
Images
Base path for images: sites/wiki.cse.buffalo.edu.cse545_6/files/tex
Use image module? [checked]
DruTeX Submodules:
LaTeX Renderer
LaTeX to HTML
PDF Generator
Line break converter
DruTeX :: Base Settings
Temporary directory: /tmp
Image directory: sites/wiki.cse.buffalo.edu.SITENAME/files/tex
Image URL: sites/wiki.cse.buffalo.edu.SITENAME/files/tex
DruTeX :: LaTeX Renderer
Conversion Method: custom
Conversion Method (Custom): [fully qualify latex and dvipng binary pathnames]
DruTeX :: PDF Generator
Conversion Command: [fully qualify pdflatex binary pathname]
Rearrange Tab ->
PEAR Wiki Filter
DruTeX
- Teach DruTeX to understand MediaWiki-style <math> tags. Add this rule to drutex_render.inc, around line 114:
/* @se',
'replacement' => "'$1' . drutex_render('$ $2 $', 'format')",
'weight' => -3
);
- http://drupal.org/project/drutex
- http://drupal.org/project/pearwiki_filter
- DruTeX Documentation
- <math> mediawiki tag support
- Is there a way to reset all png images?