Difference between revisions of "MarkupBabel"
(→LaTeX) |
|||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{Extension4info |
|name=MarkupBabel | |name=MarkupBabel | ||
− | | | + | |description en=«Markup Babylon» — support for [[LaTeX]], [[Graphviz]], [[Gnuplot]], UMLGraph and UMLet. |
− | |created= | + | |description ru=«Вавилон разметок» — поддержка [[LaTeX]], [[Graphviz]], [[Gnuplot]], UMLGraph и UMLet. |
− | + | |created=2006-06-29 | |
|included=2008-10-14 | |included=2008-10-14 | ||
|status=our | |status=our | ||
+ | |useful=definitely | ||
}} | }} | ||
+ | {{ExtensionFromInfo|lang=en|name=MarkupBabel}} | ||
− | + | «Markup Babylon» — support for [[wikipedia:LaTeX|LaTeX]] formulas, [[wikipedia:Graphviz|Graphviz]] graphs, [[wikipedia:Gnuplot|Gnuplot]] charts and diagrams, UML diagrams via UMLGraph or UMLet. Does not require additional «texvc» script for LaTeX, unlike [[mediawikiwiki:Extension:Math|Math]], and renders LaTeX in vector format (SVG) for improved quality. | |
− | + | == Usage == | |
+ | |||
+ | This extension enables the following parser tags: | ||
=== [[rupedia:LaTeX|LaTeX]] === | === [[rupedia:LaTeX|LaTeX]] === | ||
− | * <tt><nowiki><m> | + | * <tt><nowiki><m>Code</m></nowiki></tt> |
− | * <tt><nowiki><math> | + | * <tt><nowiki><math>Code</math></nowiki></tt> |
− | * <tt><nowiki><amsmath> | + | * <tt><nowiki><amsmath>Code</amsmath></nowiki></tt> |
− | <tt> | + | <tt>Code</tt> 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 [http://dvisvgm.sourceforge.net/ 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 [http://dvisvgm.sourceforge.net/ dvisvgm] utility. Wikipedia-specific "texvc" utility is not required. | |
=== [[Graphviz]] === | === [[Graphviz]] === | ||
− | + | Tags: | |
− | ; graph, neato, circo, fdp, twopi: | + | ; 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: | + | ; 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 <tt>digraph G { ... }</tt>. | |
− | + | [http://www.graphviz.org/ Graphviz] is required for these tags to work. | |
− | + | === [http://qbnz.com/highlighter/ GeSHi] syntax highlight === | |
− | + | Requires [http://qbnz.com/highlighter/ geshi] (GEneric Syntax HIghlighter). Duplicates <tt>SyntaxHighlight_GeSHi</tt> functionality and differs from it only by <pre> wrapping and different tags which are of <tt>code-xxx</tt> 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 | * 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]] === | ||
− | + | Gnuplot graphs are rendered via <plot>…</plot> tag. | |
+ | |||
+ | === Gantt-like charts === | ||
+ | |||
+ | This extension also includes minimal Gantt-like chart renderer via Gnuplot. Syntax is: | ||
+ | |||
+ | <pre> | ||
+ | <gantt [width=WIDTH height=HEIGHT]> | ||
+ | resource begin_date end_date|duration_in_days task_name... | ||
+ | ... | ||
+ | </gantt> | ||
+ | </pre> | ||
+ | |||
+ | Resource must not include spaces, begin_date and end_date must be in YYYY-MM-DD format. Example: | ||
+ | |||
+ | <gantt width="800" height="200"> | ||
+ | Dev 2014-01-28 2 Bug 1 | ||
+ | Test 2014-01-29 6 Bug 1 | ||
+ | Dev 2014-02-03 4 Bug 2 | ||
+ | Test 2014-02-06 2 Bug 3 | ||
+ | </gantt> | ||
+ | |||
+ | <gantt width="800" height="200"> | ||
+ | 3.6.3 2014-01-28 14 Dev | ||
+ | 3.6.3 2014-02-11 7 Test | ||
+ | 3.6.3 2014-02-18 20 Verify | ||
+ | 3.6.4 2014-02-11 10 Dev | ||
+ | 3.6.4 2014-02-21 5 Test | ||
+ | 3.6.4 2014-02-26 14 Verify | ||
+ | </gantt> | ||
+ | |||
+ | === [http://www.umlgraph.org/ 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 [http://www.umlgraph.org/ UMLGraph] itself are required to work. | ||
− | + | === [http://www.umlet.com/ UMLet] === | |
− | + | Another UML diagram language. Tag is <umlet>. Also requires Java and [http://www.umlet.com/ UMLet]. | |
− | == | + | == Installation == |
− | + | Just download the extension to extensions/MarkupBabel and add a usual line in LocalSettings.php: | |
− | + | <code-php> | |
+ | require_once "$IP/extensions/MarkupBabel/MarkupBabel.php"; | ||
+ | </code-php> |
Latest revision as of 22:09, 11 October 2015
MarkupBabel is a MediaWiki extension.
- Main purpose: «Markup Babylon» — support for LaTeX, Graphviz, Gnuplot, UMLGraph and UMLet.
- Repository: https://github.com/mediawiki4intranet/MarkupBabel
- Homepage: http://wiki.4intra.net/MarkupBabel
- License: GPLv2.0+
- Created: 2006-06-29
- Our rating: Definitely useful (5)
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.
Contents
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";