You are here

function mathjax_filter_tips in MathJax: LaTeX for Drupal 6

Same name and namespace in other branches
  1. 7.2 mathjax.module \mathjax_filter_tips()

Implements hook_filter_tips().

File

./mathjax.module, line 144
MathJax module.

Code

function mathjax_filter_tips($delta, $format, $long = FALSE) {
  if (!$long) {
    return t('Equations entered between $...$ are rendered using !mathjax', array(
      '!mathjax' => l(t('MathJax'), 'http://www.mathjax.org/'),
    ));
  }
  else {
    $tips = '<p>' . t('Mathematics that is written in TeX or LaTeX format is indicated using math delimiters that surround the mathematics, telling MathJax what part of your page represents mathematics and what is normal text. There are two types of equations: ones that occur within a paragraph (in-line mathematics), and larger equations that appear separated from the rest of the text on lines by themselves (displayed mathematics).') . '</p>';
    $tips .= '<p>' . t('The default math delimiters are $$...$$ for displayed mathematics, and $...$ for in-line mathematics. The longer notation can also be used: [mathjax:inline ...] for in-line mathematics, and [mathjax:block ...] for displayed mathematics.') . '</p>';
    $tips .= '<p>' . t('Go to the MathJax documentation website for a list of supported LaTeX commands: !url', array(
      '!url' => l('http://www.mathjax.org/docs/1.1/tex.html#supported-latex-commands', 'http://www.mathjax.org/docs/1.1/tex.html#supported-latex-commands'),
    )) . '</p>';
    return $tips;
  }
}