MarkupBabel

From Wiki4Intranet
(Redirected from MarkupBabel/en)
Jump to: navigation, search

MarkupBabel is a MediaWiki extension.

Status for Mediawiki4Intranet distribution:

  • Inclusion date: 2008-10-14
  • Included version: newest available
  • Improvement status: Created by MediaWiki4Intranet project

«Markup Babylon» — support for LaTeX formulas, Graphviz graphs, Gnuplot charts and diagrams, UML diagrams via UMLGraph or UMLet. Does not require additional «texvc» script for LaTeX, unlike Math, and renders LaTeX in vector format (SVG) for improved quality.

Usage

This extension enables the following parser tags:

LaTeX

  • <m>Code</m>
  • <math>Code</math>
  • <amsmath>Code</amsmath>

Code should be just the document content. babel [english, russian], amssymb, amsmath, amscd, color packages are included in header.

Formulas are rendered in vector format (SVG) if you have dvisvgm installed on the server (available as part of texlive-extra-utils package under Debian).

Requires installed LaTeX distribution (for example texlive), tex packages and dvisvgm utility. Wikipedia-specific "texvc" utility is not required.

Graphviz

Tags:

graph, neato, circo, fdp, twopi
Each tag renders the corresponding Graphviz layout. "graph" tag uses the standard "dot" layout.
graph-print, neato-print, circo-print, fdp-print, twopi-print
Same, but only in raster format and only visible in printable version.

You should include the full graph code in tag, along with digraph G { ... }.

Graphviz is required for these tags to work.

GeSHi syntax highlight

Requires geshi (GEneric Syntax HIghlighter). Duplicates SyntaxHighlight_GeSHi functionality and differs from it only by <pre> wrapping and different tags which are of code-xxx format, where xxx is the highlight language. Supported languages:

  • actionscript, ada, apache, asm, asp, bash, c, c_mac, caddcl, cadlisp, cpp, csharp, css, delphi, html4strict, java, javascript, lisp, lua, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php, php-brief, python, qbasic, smarty, sql, vb, vbnet, visualfoxpro, xml

Gnuplot

Gnuplot graphs are rendered via <plot>…</plot> tag.

Gantt-like charts

This extension also includes minimal Gantt-like chart renderer via Gnuplot. Syntax is:

<gantt [width=WIDTH height=HEIGHT]>
resource begin_date end_date|duration_in_days task_name...
...
</gantt>

Resource must not include spaces, begin_date and end_date must be in YYYY-MM-DD format. Example:

UMLGraph

UMLGraph draws UML diagrams using Java-like description. That's not always convenient, so there is also an option to use PlantUML extension.

Tag is <umlgraph>.

Java and UMLGraph itself are required to work.

UMLet

Another UML diagram language. Tag is <umlet>. Also requires Java and UMLet.

Installation

Just download the extension to extensions/MarkupBabel and add a usual line in LocalSettings.php:

require_once "$IP/extensions/MarkupBabel/MarkupBabel.php";