Wikitex

From Wikisophia
Jump to: navigation, search

WikiTeX describes a modular system for incorporating LaTeX objects with MediaWiki output.  WikiTeX was designed with expansibility in mind; and, security willing, can accommodate any conceivable package.

See also: sandbox, additional features, bugs, usability review, todo.

Contents

Classes

The following classes have been implemented:

Amsmath

Plenary AMS-LaTeX, including commutative diagrams (doc | template).

<amsmath> \label{e:barwq}\begin{split} H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2} \sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\ &\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot \Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr]. \end{split} </amsmath>

Chem

XyMTeX is an intuitive chemistry package by Shinsaku Fujita (doc | template).

<chem> \bzdrv{1==DDH;5==CH$_{3}$;4==OC$_{16}$H$_{33}$;% 2==\ryl(4==NH--SO$_{2}$){4==\bzdrh{1==(yl);2==OCH$_{2}$CH$_{2}$OCH$_{3}$;% 5==\ryl(2==NH--SO$_{2}$){4==\bzdrh{1==(yl);% 5==\ryl(2==SO$_{2}$--NH){4==\naphdrh{1==(yl);5==OH;% 8==\lyl(4==N=N){4==\bzdrh{4==(yl);1==NO$_{2}$;5==SO$_{2}$CH$_{3}$}}}}}}}}} </chem>

Chess

Skak by Torben Hoffmann supports SAN and FEN notation (doc | doc | doc | template).

<chess> \whitename{Dubois} \blackname{Steinitz} \chessevent{London 1862} \ECO{C50} \chessopening{Giucco Pianissimo} \makegametitle |1 e4 e5 Nf3 Nc6 Bc4 Bc5 d3 Nf6 Bg5?! [Nc3] d6 O-O?! h6 Bh4 g5 Bg3 h5! Nxg5 h4! Nxf7 hxg3!! \toD{hxg3!!} Nxd8 [Nxh8 Qe7! \threat<Qh7> Nf7 Bxf2+ Rxf2 gxf2+ Kxf2 Ng4+ Kg3 Qf6 Qf3 Qg7\BBetter] Bg4 Qe1 Nd4 Nc3\onlymove [h3 Ne2+ Kh1 Rxh3+ gxh3 Bf3\#] Nf3+! gxf3 Bxf3 \toD{Bxf3} \resigns| \begin{figure}[h] \makediagrams \end{figure} </chess>

Feyn

feynMF by Thorsten Ohl for Feynman diagrams (doc | template).

<feyn> \fmfpen{thick} \fmfleft{i1,i2} \fmflabel{$p^{\prime}$}{i1} \fmflabel{$p$}{i2} \fmfright{o1} \fmf{fermion,tension=1/3}{i1,v1} \fmf{plain}{v1,v2} \fmf{fermion,label=$p-k$,l.side=left}{v2,v3} \fmf{photon,right,tension=0,label=$k$}{v2,v3} \fmf{plain}{v3,i2} \fmf{photon}{v1,o1} </feyn>

Go

sgf2dg by Daniel Bump and Reid Augustin for go games described in SGF (doc | template).

Genan—Shuwa, 1842:
<go>(;FF[4]GM[1]SZ[19]AP[SGFC:1.16];B[qd];W[oc];B[ec];W[pf];B[od]
W[nd];B[oe];W[pc];B[qe];W[qc];B[qi];W[de];B[cd];W[ce];B[bd]
W[mf];B[of];W[gc];B[fc];W[gd];B[ee];W[do];B[cj];W[di];B[ci]
W[dh];B[cm];W[fe];B[ef];W[ff];B[eg];W[fg];B[eh];W[fh];B[ei]
W[dj];B[dk];W[ej];B[fi];W[dl];B[ek];W[fj];B[gi];W[dd];B[dc]
W[ck];B[el];W[bk];B[ch])</go>

Graph

Graphviz by Lefty Koutsofios, et al.; for relational diagrams (doc | template).


<dot> rankdir=LR; node [shape = doublecircle]; LR_0 LR_3 LR_8; node [shape = circle]; LR_0 -> LR_2 [ label = "SS(B)" ]; LR_0 -> LR_1 [ label = "SS(S)" ]; LR_1 -> LR_3 [ label = "S(end)" ]; LR_2 -> LR_6 [ label = "SS(b)" ]; LR_2 -> LR_5 [ label = "SS(a)" ]; LR_2 -> LR_4 [ label = "S(A)" ]; LR_4 -> LR_8 [ label = "S(D)" ]; LR_5 -> LR_7 [ label = "S(a)" ]; LR_5 -> LR_5 [ label = "S(b)" ]; LR_6 -> LR_6 [ label = "S(b)" ]; LR_6 -> LR_5 [ label = "S(a)" ]; LR_7 -> LR_8 [ label = "S(b)" ]; LR_7 -> LR_5 [ label = "S(a)" ]; LR_8 -> LR_6 [ label = "S(b)" ]; LR_8 -> LR_5 [ label = "S(a)" ]; </dot>

Greek

Ibycus by Pierre MacKay for polytonic Greek (doc | template).

<greek> Ei)s ('Hfaiston; \begin{verse} \quad ('Hfaiston kluto'mhtin a)ei'deo Mou=sa li'geia,\\ o(`s met' )Aqhnai'hs glaukw'pidos a)glaa` e)'rga\\ a)nqrw'pous e)di'dacen e)pi` xqono's, oi(` to` pa'ros per\\ a)'ntrois naieta'askon e)n ou)'resin h)u'+te qh=res.\\ nu=n de` di) ('Hfaiston klutote'xnhn e)'rga dae'ntes\\ r(hi+di'ws ai)w=na telesfo'ron ei)s e)niauto`n\\ eu)'khloi dia'gousin e)ni` sfete'roisi do'moisin.\\ \quad )All' i('lhq' ('Hfaiste; di'dou d' a)reth'n te kai` o)'lbon. \end{verse} </greek>

Music

Lilypond with midi output (doc | template).

<music> \new Pianostaff << \new Staff { \time 2/2 \clef violin \key cis \minor \tempo 4=120 \relative c \context Staff << \new Voice { \voiceOne r4 cis8 dis e4 fis gis8 fis gis a gis fis e gis fis e fis gis fis e dis fis e dis e fis e d cis e d cis d e d cis b d cis b cis d cis b a cis b a b cis b a gis b a2 r cis2. } \new Voice { \voiceTwo e,8 gis a b cis dis bis cis dis4 r r2 r1 r1 r4 fis, b b b a8 gis a2 gis1~ gis8 gis fis eis fis2 gis2. } \new Voice { \voiceThree \stemDown s1 s s s s2. fis4 eis2 fis } >> } \new Staff { \clef bass \time 2/2 \key cis \minor \relative c' \context Staff << \new Voice { \voiceOne s1 r4 gis cis cis cis bis8 ais bis2 cis1 b2. s4 s1 b2 cis~ cis~ cis8 cis b a gis2. } \new Voice { \voiceTwo \stemUp cis,1 bis2 e dis1 \stemDown cis4 e a a a gis8 fis gis2~ \stemUp gis fis gis1 a2 fis~ fis8 fis e dis e4 } \new Voice { \voiceThree \stemDown cis4 b a2 gis4 r4 g2\rest e1\rest e1\rest e1\rest r4 cis' fis fis fis eis8 dis eis2 fis r r } >> } >> </music>

Plot

Gnuplot by Hans-Bernhard Broeker, et al.; for plotting two- and three-dimensional line, point, dot, box, histogram graphs or vector fields (doc | template).

<plot># original from TANAKA Masaki
  1. masaki@isea.is.titech.ac.jp(Tokyo Institute of technology)
set pm3d at s solid set palette rgb 7,5,15 unset colorbox unset surface set ticslevel 0 set mapp cart set size square set view 45,30,1,1 set auto set isosamples 100,100 compl(a,b)=a*{1,0}+b*{0,1} mand(z,a,n) = n<=0 || abs(z)>2 ? 1:mand(z*z+a,a,n-1)+1 splot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),50) </plot>

Teng

TengTeX by Ivan Derzhanski for Fëanorian Tengwar (doc | template).

<teng> \sindarin ash nazg duRbatuluuk, ash nazg gimbatul, ash nazg thrakatuluuk, agh buRzumishi krimpatul </teng>

id est,

“One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.”

See also

Credits

WikiTeX was conceived by Peter Danenberg, where Tomasz Wegrzanowski's texvc provided impulse; which packages twain may yet coexist in a self installation.

Several security fixes have been submitted by Johannes Berg.

Personal tools