*2Qc@s ddlZdefdYZddlZddlZdefdYZdefdYZdefd YZd efd YZd efd YZ defdYZ defdYZ defdYZ defdYZ defdYZdefdYZdefdYZdefdYZdefdYZd efd!YZd"efd#YZd$efd%YZd&efd'YZddlZd(efd)YZd*efd+YZd,efd-YZd.efd/YZd0efd1YZd2efd3YZd4efd5YZd6efd7YZd8efd9YZ d:efd;YZ!d<efd=YZ"d>e"fd?YZ#d@e"fdAYZ$dBe"fdCYZ%dDe%fdEYZ&dFe%fdGYZ'dHe"fdIYZ(ddlZddl)Z)dJefdKYZ*dLefdMYZ+dNefdOYZ,dPefdQYZ-dRefdSYZ.dTe,fdUYZ/dVe/fdWYZ0dXe/fdYYZ1dZefd[YZ2d\e2fd]YZ3d^e3fd_YZ4d`e2fdaYZ5dbe5fdcYZ6dde2fdeYZ7dfefdgYZ8dhefdiYZ9dje9fdkYZ:dle2fdmYZ;dne;fdoYZ<dpe6fdqYZ=dre;fdsYZ>dte;fduYZ?dve;fdwYZ@dxe;fdyYZAdze;fd{YZBd|e;fd}YZCd~eCfdYZDdefdYZEdefdYZFde2fdYZGde;fdYZHdefdYZIddlJZJddlKZKdefdYZLeLeL_MdefdYZNdeNfdYZOdefdYZPdePfdYZQeQeP_RePeP_SdefdYZTde2fdYZUde2fdYZVde7fdYZWde7fdYZXde7fdYZYde7fdYZZde7fdYZ[de7fdYZ\de7fdYZ]de7fdYZ^de7fdYZ_de3fdYZ`de3fdYZade2fdYZbde2fdYZcde2fdYZdde2fdYZedeefdYZfde2fdYZgde7fdYZhde3fdYZide2fdYZjdejfdYZkdekfdYZlde"fdYZmdefdYZndefdYZodejfdYZpdejfdYZqde;fdYZrderfdYZsdesfdYZtdesfdYZudetfdYZvdesfdYZwdesfdYZxdesfdYZydesfdYZzdewfdYZ{eIj|erexg7_|evetewe{ezeyeuger_|defdYZ}de}fdYZ~desfdYZderfdYZderfdYZdesfdYZdefdYZdefdYZdefdYZdefdYZdesfdYZerj|eg7_|dewfdYZdewfdYZdetfdYZdefdYZdeEfdYZdewfdYZdeEfdYZerj|eeeeg7_|eFjeeg7_defd YZd esfd YZd efd YZdefdYZerj|eg7_|defdYZdefdYZdefdYZdesfdYZde;fdYZdesfdYZdeGfdYZeIj|eg7_|erj|eg7_|dZdZed kr endS(!iNtTracecBseZdZeZeZeZdZdZ dZ dZ dZ dZ ee Z ee Z ee Z ee Z ee Z RS(sA tracing classcCs.tj stjrdStj|tjdS(sShow a debug messageN(Rt debugmodet quietmodetshowtsyststdout(tclstmessage((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytdebug%scCsFtjr dStjr/tjr/tj|}ntj|tjdS(sShow a trace messageN(RRtprefixt showlinesmodeRRR(RR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR+s  cCsCd|}tjr,tjr,tj|}ntj|tjdS(sShow an error messages* N(RR R RRtstderr(RR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyterror3s cCstjd|tddS(s#Show an error message and terminatesFATAL: iN(RR texit(RR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytfatal:scCs6tjdkr!|jd}n|j|ddS(sShow a message out of a channeliisutf-8s N(ii(Rt version_infotencodetwrite(RRtchannel((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR?sN(t__name__t __module__t__doc__tFalseRRR tNoneR RRR RRt classmethod(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs         tBibStylesConfigcBskeZdZidd6dd6dd6Zidd6dd6d d6Zid d6d d 6d d6d d6Zidd6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d6dd6Zid"d#6d$d%6d$d&6Zid'd6d(d 6d!d6d)d6Zid*d6d+d 6d,d6d-d6d!d6d.d6Z id/d6d0d 6d!d6d1d6Z RS(2s+Configuration class from elyxer.config fileuy$authors. $title. $journal,{ {$volume:}$pages,} $month $year.{ doi: $doi.}{ URL $url.}{ $note.}u@articleu$surname($year)uciteuS$authors. $title. $publisher, $year.{ URL $url.}{ $note.}udefaultu$authors. $title.{ $journal{, {$volume}{($number)}}{: $pages}{, $year}.}{ $url.}{ $filename.}{ $note.}u$Sur$YYut$authors. $title.{ $journal,} $year.{ $url.}{ $filename.}{ $note.}ur$authors. $year. $title. $journal, $volume($number), $pages.{ URL $url.}{ $note.}uS$authors. $year. $title. $publisher.{ URL $url.}{ $note.}u@booku$surname, $yearue$authors: “$title”, $journal,{ pp. $pages,} $year.{ URL $url.}{ $note.}uj{$authors: }$title{ ($editor, ed.)}.{{ $publisher,} $year.}{ URL $url.}{ $note.}uW$authors: $title.{{ $publisher,} $year.}{ URL $url.}{ $note.}u@bookletu @conferenceu@inbooku$authors: $title{ in $booktitle{ ($editor, ed.)}}.{{ $publisher,} $year.}{ URL $url.}{ $note.}u @incollectionu@inproceedingsu@manualu@mastersthesisuh$authors: $title.{{ $publisher,}{ $howpublished,} $year.}{ URL $url.}{ $note.}u@miscu @phdthesisu @proceedingsuG$authors: $title, $year.{ URL $url.}{ $note.}u @techreportuW$authors: “$title”, $journal, $year.{ URL $url.}{ $note.}u @unpublishedu$indexu??uYYuuauthorsusurnameu~$authors, “$title”, $journal, vol. $volume, no. $number, pp. $pages, $year.{ URL $url.}{ $note.}uS$authors, $title. $publisher, $year.{ URL $url.}{ $note.}uF$authors, “$title”. $year.{ URL $url.}{ $note.}uv$authors. $title.{ $journal{, {$volume}{($number)}}{:$pages}{, $year}.}{ URL $url.}{ $note.}u\$authors. $title. $publisher,{ $month} $year.{ URL $url.}{ $note.}u~$authors. $title.{ In $booktitle {($editor, ed.)}.} $publisher,{ $month} $year.{ URL $url.}{ $note.}uy$authors. $title. { $booktitle{, {$volume}{($number)}}{:$pages}{, $year}.}{ URL $url.}{ $note.}uR{$authors. }$title.{{ $publisher,} $year.}{ URL $url.}{ $note.}uy$authors. $title. $journal, $year{;{$volume}{($number)}{:$pages}}.{ URL: $url.}{ $note.}uO$authors. $title. {$publisher, }$year.{ URL: $url.}{ $note.}u`$authors. $title; {$publisher, }$year.{ $howpublished.}{ URL: $url.}{ $note.}( RRRtabbrvnattalphat authordate2tdefaultt defaulttagstieeetrtplaint vancouver(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRRsd      t BibTeXConfigcBs"eZdZidd6dd6ZRS(s+Configuration class from elyxer.config fileu—u--u.u..(RRRtreplaced(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR"stContainerConfigcBseZdZidd6dd6dd6dd6d d 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6Zid%d&d'gd(6d)gd*6d+d,dd-d"dd$ddd d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>gd?6Zid@dA6ddB6ddC6Zi~d%d)6dDdE6dDdF6ddG6dHdI6ddJ6ddK6dd6dDdL6dDdM6dDdN6dOdA6dDdP6ddQ6dRdS6dTdU6dVdW6d-dX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dwdy6dzd{6d|d}6d~d6dd6d/d6dd6dd6dd6dd6dYd6d[d6d]d6d]d6d]d6d]d6d_d6dd6ded6dkd6dmd6dcd6did6dmd6dod6d_d6dmd6dwd6dd6dd6dd6dRd6dd6dd6dd6dd6dd6dd6dd6dd6ddC6dd6dd6dd6dd6dd6dd6dd6dd6dd6d+d6dd6dd6dd6d d6d d6dDd 6d d 6dDd6dDd6dDd6dDd6dd6dd6dd6d"d!6dDd6dDd6dd6dDd6d.d6dd6dd6dd6dd6dd6dDd6dDd6dDd6d$d6dDd6dd6dDd6dDd6dd6dDd6dDd6dd6dDd6dd6dDd6d d6Zidd6Ziddgd6ZRS(s+Configuration class from elyxer.config fileu \end_layoutuAlignu\baru BarredTextu\seriesuBoldTextuu/>u u u u u u ( RRRtcharstcommandstentitiesthtmlt iso885915t nonunicode(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR+"s$& t FormulaConfigcBseZdZi=dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d#d%6d&d'6d(d)6d(d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6d;dk6dldm6dndo6dpdq6drds6dtdu6dvdw6Zidxdy6dzd{6d|d}6d~d6Zidddgd6dddgd6dddgd6dddgd6ddddgd6dgd6ddddgd6dgd6Ziddgd6ddgd6Zidd6dd6dd6dd6dd6Zidd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6Zidd6dd6dd6dd6dd6dzd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dSd6d d 6d d 6d d6dd6dUd6dd6dd6dd6dd6dd6dd6dd6d d!6dWd"6d#d$6dYd%6d[d&6d'd(6d]d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d_d66d7d86d9d:6d;d<6dad=6d>d?6d@dA6dcdB6dCdD6ddE6dFdG6dHdI6dedJ6dKdL6dMd~6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6ddx6dydz6d{d|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dvd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dRd6dd6dd6dd6dd6dd6dd6dyd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d/d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dNdZ6d[d\6d]d^6d_d`6d#d%6dadb6dcdd6dedf6d(d*6dgdh6didj6ddk6dldm6dndo6ddp6ddq6ddr6dsdt6ddu6dvdw6d4dx6dydz6d{d|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dMd6dd6dd6dd6d d 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6d{dM6ddN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d}d[6d\d]6dd^6d d_6dd`6dadb6ddc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6drdt6dudv6dwdx6dydz6d{d|6dd}6d~d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dld6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d 6d d 6dd 6dd6d4d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6dd+6d!d,6d!d-6d.d/6d0d16d2d36d4d56dd66d7d86d9d:6dd;6d<d=6dd>6dPd?6dd@6dAdB6dCdD6dEdF6ddG6ddH6dIdJ6ddK6dLdM6ddN6ddO6dPdQ6dRdS6dTdU6ddV6ddW6ddX6Z iZ idd6dd6ddY6Z iddZ6d[d\6dd]6d^d_6dd`6Z idadbgdc6dadddbgde6dbdbgdf6Z i:dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dgd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d6d.d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6Zi"dddddgd6dddgd6ddddddgd6dddgd6dddgd6dddddgd6ddddddgd6dddgd6dddgd6dddgd6dddgd6dddgd6ddddddgd6dddgd6dddgd6dddgd6dddgd6ddddddgd6dd d gd 6dd d gd6ddgd6dddgd6dddgd6dddgd6dddddddgd6dd d!d"d#gd$6dddddgd%6dddgd&6ddd'gd(6dd)d*gd+6d,d-dd.d/gd06ddd1gd26d3d4dgd56ddd6gd76Zid8d6d8d6d9d6d8d6d8d6d9d%6Zid:d;6Zidd<6dd=6d>d?6d@dA6ddB6ddC6Zx dD]ZdDeeeeAmSu\AmSuÐu\DHuŁu\LuØu\OuŒu\OEuÞu\THuåu\aauæu\aeuαu\alphauβu\betauδu\deltauðu\dhuϵu\epsilonuηu\etauγu\gammauıu\iu\imathuιu\iotauȷu\ju\jmathuκu\kappaułu\luλu\lambdauμu\muuνu\nuuøu\ouœu\oeuωu\omegauφu\phiuπu\piuψu\psiuρu\rhouσu\sigmaußu\ssuτu\tauuħu\textcrhuþu\thuθu\thetauυu\upsilonu∆u \varDeltauΓu \varGammauΛu \varLambdauΩu \varOmegauΦu\varPhiuΠu\varPiuΨu\varPsiuΣu \varSigmauΘu \varThetauΥu \varUpsilonuΞu\varXiuεu \varepsilonuϰu \varkappau\varphiuϖu\varpiuϱu\varrhouςu \varsigmauϑu \varthetauξu\xiuζu\zetau\beginubeginu&u cellseparatoru\enduendu\\u rowseparatoru⎛u⎜u⎝u(u⎞u⎟u⎠u)u⎡u⎢u⎣u[u⎤u⎥u⎦u]u⎧u⎪u⎨u⎩u{u|u⎫u⎬u⎭u}u∥u⎲u⎳u∑u⌠u⌡u∫uspan class="symbol"u\leftuu\left.u\middleu\rightuu\right.üu\"úu\'ûu\^ùu\`u\acuteūu\barŭu\breveu̧u\cǔu\checku⃛u\dddotu\ddotu̇u\dotu\graveu\hatůu \mathringu⃖u\overleftarrowu⃗u\overrightarrowu\ru̩u\su⃝u \textcircledu̥u \textsubringũu\tildeu\vu\vecu\~u u\ uu\!u#u\#u$u\$u%u\%u\&u u\,u u\:u u\;u⍗u\APLdownarrowboxu⍇u\APLleftarrowboxu⍈u\APLrightarrowboxu⍐u\APLuparrowboxu□u\Boxu≎u\Bumpequ●u\CIRCLEu⋒u\Capu☑u \CheckedBoxu○u\Circleu⩴u \Coloneqqu≙u \Correspondsu⋓u\CupuΔu\Deltau◇u\Diamondu⇓u \Downarrowu€u\EURu⅁u\Gameu\Gammauℑu\Imu⨝u\Joinu◖u \LEFTCIRCLEu◐u \LEFTcircleu\Lambdau⇐u \Leftarrowu⇚u \Lleftarrowu⟸u\Longleftarrowu⟺u\Longleftrightarrowu⟹u\Longrightarrowu↰u\Lshu⇐|u \Mapsfromu|⇒u\Mapstou\Omegau¶u\Pu\Phiu\PiuPru\Pru\Psiu◗u \RIGHTCIRCLEu◑u \RIGHTcircleuℜu\Reu⇛u \Rrightarrowu↱u\Rshu§u\Su\Sigmau☐u\Squareu⋐u\Subsetu⋑u\Supsetu\Thetau⇑u\Uparrowu⇕u \Updownarrowu\Upsilonu⊩u\Vdashu\Vertu⊪u\Vvdashu☒u\XBoxu\Xiu⅄u\Yupu
u_u\_uℵu\alephu∐u\amalgu∠u\angleu♒u \aquariusuarccosu\arccosuarcsinu\arcsinuarctanu\arctanuargu\argu♈u\ariesu∗u\astu≍u\asympu∍u \backepsilonu‵u \backprimeu⋍u \backsimequ\u \backslashu⊼u \barwedgeu∵u\becauseuℶu\bethu≬u\betweenu∩u\bigcapu\bigcircu∪u\bigcupu⊙u\bigodotu⊕u \bigoplusu⊗u \bigotimesu⊔u \bigsqcupu★u\bigstaru▽u\bigtriangledownu△u\bigtriangleupu⊎u \biguplusu∨u\bigveeu∧u \bigwedgeu⧫u \blacklozengeu☻u \blacksmileyu■u \blacksquareu▲u\blacktriangleu▼u\blacktriangledownu▶u\blacktrianglerightu⊥u\botu⋈u\bowtieu▫u\boxu⊡u\boxdotu•u\bulletu≏u\bumpequ♋u\canceru\capu♑u \capricornusu⋅u\cdotu⋯u\cdotsu∙u \centerdotu✓u \checkmarkuχu\chiu\circu≗u\circequ®u \circledRu⊛u \circledastu⊚u \circledcircu⊝u \circleddashu♣u \clubsuitu≔u \coloneqqu∁u \complementu≅u\congu\coprodu©u \copyrightucosu\cosucoshu\coshucotu\cotucothu\cothucscu\cscu\cupu↶u\curvearrowleftu↷u\curvearrowrightu†u\dagu\daggeruℸu\dalethu⇠u\dashleftarrowu⊣u\dashvu‡u\ddagu\ddaggeru⋱u\ddotsudegu\degudetu\detu╲u \diagdownu╱u\diagupu\diamondu♦u \diamondsuitudimu\dimu÷u\divu⋇u\divideontimesu∸u\dotdivu≐u\dotequ≑u \doteqdotu∔u\dotplusu…u\dotsu⌆u\doublebarwedgeu↓u \downarrowu⇊u\downdownarrowsu⇃u\downharpoonleftu⇂u\downharpoonrightu♁u\earthuℓu\ellu∅u \emptysetu≖u\eqcircu≕u\eqcolonu≂u\eqsimu\eurou∃u\existsuexpu\expu≒u\fallingdotsequ♀u\femaleu♭u\flatu∀u\forallu⌢u\frownu☹u\frownieugcdu\gcdu♊u\geminiu≥u\geq)u≧u\geqqu \geqslantu←u\getsu≫u\ggu⋙u\ggguℷu\gimelu≩u\gneqqu⋧u\gnsimu⋗u\gtrdotu⋚u \gtreqlessu⪌u \gtreqqlessu≷u\gtrlessu≳u\gtrsimu«u\guillemotleftu»u\guillemotrightuℏu\hbaru♥u \heartsuitu u\hfilluhomu\homu↩u\hookleftarrowu↪u\hookrightarrowu\hslashu(∫⋯∫u \idotsintu"u\iiintu"u\iintuinfu\infu∞u\inftyu⌐u\invnegu♃u\jupiterukeru\keru\landu"u \landupintu⟨u\langleu\lbraceu\lbrace)u\lbracku⌈u\lceilu\ldotsu⇝u\leadstou \leftarrow)u↢u\leftarrowtailu⇤u\leftarrowtobaru↽u\leftharpoondownu↼u\leftharpoonupu⇇u\leftleftarrowsu⥢u\leftleftharpoonsu☾u \leftmoonu↔u\leftrightarrowu⇆u\leftrightarrowsu⇋u\leftrightharpoonsu⋋u\leftthreetimesu♌u\leou≤u\leq)u≦u\leqqu \leqslantu⋖u\lessdotu⋛u \lesseqgtru⪋u \lesseqqgtru≶u\lessgtru≲u\lesssimu⌊u\lfloorulgu\lgu⊲u\lhdu♎u\librau↯u \lightninguliminfu\liminfulimsupu\limsupu≪u\llu⋘u\lllulnu\lnu≨u\lneqqu¬u\lnotu⋦u\lnsimulogu\logu⟵u\longleftarrowu⟷u\longleftrightarrowu⟼u \longmapstou⟶u\longrightarrowu↫u\looparrowleftu↬u\looparrowrightu\loru◊u\lozengeu⋉u\ltimesu\lyxlocku♂u\maleu✠u\malteseu↤u \mapsfromu↦u\mapstou^u\mathcircumflexumaxu\maxu∡u\measuredangleu☿u\mercuryu℧u\mhou∣u\miduminu\minu⊨u\modelsu∓u\mpu⊸u \multimapu⇍u \nLeftarrowu⇎u\nLeftrightarrowu⇏u \nRightarrowu⊯u\nVDashu∇u\nablau≉u\napproxu♮u\naturalu≇u\ncongu↗u\nearrowu\negu\neg)u♆u\neptuneu≢u\nequivu\newlineu∄u\nexistsu≱u \ngeqslantu≯u\ngtru≹u \ngtrlessu∋u\niu\ni)u↚u \nleftarrowu↮u\nleftrightarrowu≰u \nleqslantu≮u\nlessu≸u \nlessgtru∤u\nmidu \nolimitsu \nonumberu\notu\notu⍀u \notbackslashu∉u\notinu∌u\notniu⌿u \notslashu∦u \nparallelu⊀u\nprecu↛u \nrightarrowu≁u\nsimu≄u\nsimequ⊏̸u \nsqsubsetu⊈u \nsubsetequ⊁u\nsuccu⋡u \nsucccurlyequ⊅u\nsupsetu⊉u \nsupsetequ⋪u\ntriangleleftu⋬u\ntriangleleftequ⋫u\ntrianglerightu⋭u\ntrianglerightequ⊭u\nvDashu⊬u\nvdashu↖u\nwarrowu\odotu \officialeurou"u\oiiintu"u\oiintu"u\ointu"u\ointclockwiseu"u\ointctrclockwiseu⊖u\ominusu\oplusu⊘u\oslashu\otimesu\ownsu \parallelu∂u\partialu\perpu♓u\piscesu⋔u \pitchforku♇u\plutou±u\pmu➪u\pointeru£u\poundsu≺u\precu≼u \preccurlyequ\precequ≾u\precsimu′u\primeu∝u\promptou u\qquadu\quadu♩u \quarternoteu⟩u\rangleu\rbraceu\rbrace)u\rbracku⌉u\rceilu⌋u\rflooru⊳u\rhdu→u \rightarrow)u↣u\rightarrowtailu⇥u\rightarrowtobaru⇁u\rightharpoondownu⇀u\rightharpoonupu\rightharpooondownu\rightharpooonupu⇄u\rightleftarrowsu⇌u\rightleftharpoonsu☽u \rightmoonu⇉u\rightrightarrowsu⥤u\rightrightharpoonsu⋌u\rightthreetimesu≓u \risingdotsequ⋊u\rtimesu♐u \sagittariusu♄u\saturnu♏u\scorpiou↘u\searrowusecu\secu∖u \setminusu♯u\sharpu≃u\simequsinu\sinusinhu\sinhu∕u\slashu⌣u\smileu☺u\smileyu♠u \spadesuitu∢u\sphericalangleu⊓u\sqcapu\sqcupu⊏u \sqsubsetu⊑u \sqsubsetequ⊐u \sqsupsetu⊒u \sqsupsetequ\squareu⋆u\staru⫅u \subseteqqu⫋u \subsetneqqu≻u\succu≽u \succcurlyequ\succequ⋩u \succnsimu≿u\succsimu☼u\sunusupu\supu⫆u \supseteqqu⫌u \supsetneqqu√u\surdu↙u\swarrowutanu\tanutanhu\tanhu♉u\taurusu\textasciicircumu~u\textasciitildeu\textbackslashu©'u\textcopyrightu°u \textdegreeu \textellipsisu—u \textemdashu \textendashu \texteurou>u \textgreateru%suLimitPreviousCommandu\limitsuMacroDefinitionu \newcommandu \renewcommanduSetCounterFunctionu \setcounteru FormulaTagu\tagu\tag*u u u'u + u+u, u,u  − u-u  ⁄ u/u  < u = u=u  > u@u\Biguspan class="hugesymbol"u\Bigguspan class="bar"uspan class="arraydef"u \begin{array}u\biguspan class="largesymbol"u\biggu\biglu\bigruspan class="align-center"u \centeringuspan class="ensuremath"u \ensuremathuspan class="phantom"u \hphantomuspan class="noindent"u \noindentuspan class="overbrace"u \overbraceuspan class="overline"u \overlineu\phantomuspan class="underbrace"u \underbraceuuu \underlineu \vphantomu⇔u\Leftrightarrowu⇒u \Rightarrowu≈u\approxu⇢u\dashrightarrowu≡u\equivu\geu\gequ  ⇒ u\impliesu∈u\inu\leu \leftarrowu\lequ\neu\nequ\not\inu\proptou \rightarrowu\rightsquigarrowu\simu⊂u\subsetu⊆u \subsetequ⊃u\supsetu⊇u \supsetequ×u\timesu\tou beginafteru\begin{u beginbeforeucommanducommentu\[usimpleu*u unnumberedusubuspan class="mbox"u\mboxuspan class="text"u\textu\textbfuspan class="textipa"u\textipau\textituspan class="textnormal"u \textnormaluspan class="textrm"u\textrmuspan class="versalitas"u\textscuspan class="textsf"u\textsfu\textslu\textttuspan class="normal"u\textupu.u:u·u!u;u"u charactersu-http://chart.googleapis.com/chart?cht=tx&chl=u googlecharts(u\intu\intopu\produ\sum(RRRt alphacommandstarrayt bigbracketst bigsymbolstbracketcommandstcombiningfunctionsR-tdecoratedcommandtdecoratingfunctionsR%t environmentst fontfunctionsthybridfunctionst hybridsizestlabelfunctionst limitcommandstkeyt misccommandstmodifiedt onefunctionstspacedcommandsR(tsymbolfunctionst textfunctionst unmodifiedturls(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR2Bs## 0-  ###      *#  4t GeneralConfigcBs)eZdZidd6dd6dd6ZRS(s+Configuration class from elyxer.config fileu 2011-06-27udateu413u lyxformatu1.2.3unumber(RRRtversion(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRJst HeaderConfigc1BsBeZdZi dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6Zidddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHg0d6dIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZgdI6ZRS([s+Configuration class from elyxer.config fileu\begin_preambleu beginpreambleu\branchubranchu \textclassu documentclassu \end_branchu endbranchu \end_preambleu endpreambleu \languageulanguageu\lstsetulstsetu\output_changesu outputchangesu\paragraph_separationuparagraphseparationu \pdf_titleupdftitleu \secnumdepthu secnumdepthu \tocdepthutocdepthuarticleuaastexuaapaperu acmsiggraphu sigplanconfuachemsouamsartuapau arab-articleuarmenian-articleuarticle-beameruchessudtku elsarticleu heb-articleuIEEEtranuiopartukluweruscrarticle-beameruscrartclu extarticleupaperumwarturevtex4uspieu svglobal3ultugboatuagu-dtdujgrgauagumsuentcsuegsuijmpcuijmpdu singlecol-newu doublecol-newuisprsutarticleu jsarticleujarticleujssuliterate-articleusiamltexucl2emultullncsusvglobalusvjogusvprobthubookuamsbookuscrbookuextbooku tufte-bookureportu extreportuscrreprtumemoirutbookujsbookujbookumwbkusvmonousvmultutreportujreportumwrep(RRRt parameterststyles(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRLs t ImageConfigcBsWeZdZidd6dd6Zidd6dd6dd 6Zid d 6d dgd 6ZRS(s+Configuration class from elyxer.config fileuOconvert[ -density $scale][ -define $format:use-cropbox=true] "$input" "$output"u imagemagicku(inkscape "$input" --export-png="$output"uinkscapeupsu.epsupdfu.pdfu.psu.pngudefaultu.svguvector(RRRt converterstcropboxformatstformats(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyROs t LayoutConfigc Bs?eZdZiddddddddd d d d g d 6ZRS(s+Configuration class from elyxer.config fileuStringContaineruConstantu TaggedTextuAlignu TextFamilyu EmphaticTextuVersalitasTextu BarredTextuSizeTextu ColorTextuLangLineuFormulauallowed(RRRt groupable(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRSstNewfangleConfigcBs7eZdZidd6dd6dd6dd6d d 6ZRS( s+Configuration class from elyxer.config fileu chunkref{uchunkrefu}u endcommandu>uendmarku\u startcommandu=<u startmark(RRRt constants(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRUstNumberingConfigc BsbeZdZidddddgd6ddgd 6Zid d d d ddddddg d6ZRS(s+Configuration class from elyxer.config fileuChapteruSectionu Subsectionu Subsubsectionu ParagraphuordereduPartuBookuromanu*u**u†u‡u§u§§u¶u¶¶u#u##usymbols(RRRtlayoutstsequence(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRWs t StyleConfigcBseZdZi dd6dd6dd6dd6dd 6dd 6d d 6dd 6dd6dd6dd6Zidd6dd6dd6dd6dd6dd6dd 6d!d"6dd#6dd$6dd%6dd&6d'd(6d)d*6d+d,6d-d.6d'd/6d)d06d1d26d3d46d1d56d1d66Zid7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6ZidEdFdGdHdIdJgdK6ZidLdM6dNdO6dPdQ6dRdS6dTdU6ZRS(Vs+Configuration class from elyxer.config fileu u \enskip{}u u\hfill{}u u\hspace*{\fill}uu \hspace*{}u \hspace{}u\negthinspace{}u  u\qquad{}u\quad{}u u\space{}u u \thinspace{}u~u»ualdu›ualsu«uardu‹uarsu“ueldu‘uelsu”uerdu’uersuflduflsufrdufrsu„ugldu‚uglsu“ugrdu‘ugrsuplduplsu”uprdu’uprsusldusrdu(@↕)ueqrefu¶↕u formattedu$↕unamerefu#↕upagerefu@↕urefu on-page#↕uvpagerefu @on-page#↕uvrefucolutextulineupageutheightupheightu ignoredtextsu
ubigskipu
udefskipu
umedskipu
u smallskipu
uvfill(RRRthspacestquotestreferenceformatstsizetvspaces(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRZ s.###t TOCConfigc BseZdZiddddddddd d d d g d 6dgd6dgd6Zidddgd 6ddddd d d d gd6ddddddgd6ZRS(s+Configuration class from elyxer.config fileuStringContaineruConstantu TaggedTextuAlignu TextFamilyu EmphaticTextuVersalitasTextu BarredTextuSizeTextu ColorTextuLangLineuFormulaualloweduuclonedu extracteduSpaceu PlainLayoutuCaptionuStandardLayoutu FlexInset(RRRt extractplaint extracttitle(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR`,s+t TagConfigcBseZdZidd6Zidd6dd6Zidd6d d 6dd 6d d 6d d6dd6Ziddgd6Zi dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6Zid!d"6d#d$6Zid%d&6d'd(6d%d)6Z id*d+6d*d,6d-d.6Z RS(/s+Configuration class from elyxer.config fileuuuunderuspan class="sans"usansuttu typewriteruspan class="code"uCharStyle:Codeuspan class="menuitem"uCharStyle:MenuItemuCodeuMenuItemuspan class="noun"uNounuspan class="strong"uStrongu QuotationuQuoteulayoutsudivuCenteruh?uChapteruh2uDateu Paragraphuh1uPartu blockquoteuSectionu Subsectionu Subsubsectionuolu EnumerateuuluItemizeuuCommentuspan class="greyedout"u GreyedoutuNoteuiuitalicuslanteduspan class="versalitas"u smallcaps( RRRtbarredtfamilytflextgroupRXt listitemstnotestshaped(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRc;s, tTranslationConfigcBsNeZdZi$dd6dd6dd6dd6dd6dd6dd6dd6d d 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6Zid@dA6d@dB6dCdD6dEdF6d@dG6dHdI6dCdJ6dKdL6ZRS(Ms+Configuration class from elyxer.config fileuAppendixuBookuChapteru ParagraphuPartuSectionu Subsectionu SubsubsectionuAbstractuabstractu Bibliographyu bibliographyufigureu Algorithm ufloat-algorithmuFigure u float-figureuListing u float-listinguTable u float-tableuTableau u float-tableauu Footnotesu footnotesuDocument generated by u generated-byu on u generated-onuIndexuindexu)Please enable JavaScript on your browser.u jsmath-enableuH requires JavaScript to correctly process the mathematics on this page. ujsmath-requiresu Warning: ujsmath-warninguList of Algorithmsulist-algorithmuList of Figuresu list-figureuList of Tablesu list-tableuList of Tableauxu list-tableauu Main pageu main-pageuNextunextu Nomenclatureu nomenclatureu on page uon-pageuPrevuprevu Referencesu referencesuTable of Contentsutocu Contents for utoc-foruUpuupuenuamericanubritishudeudeutschunludutchuenglishufrufrenchungermanuesuspanish(RRRRVt languages(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRkcs,tCommandLineParsercBs;eZdZdZdZdZdZdZRS(sA parser for runtime optionscCs ||_dS(N(toptions(tselfRn((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt__init__scCst|dkrdSxut|dkr|djdr|j|\}}|sed|dS|swd|dSt|j||qWdS(sParse command line optionsis--sOption s not recognizeds needs a valueN(tlenRt startswitht readoptiontsetattrRn(RotargsRAtvalue((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parseoptionss(  cCs&|dd}|d=d|kr6|j||}n|jdd}t|j|sdd|fSt|j|}t|tr|tfSt |dkr|dfS|dj dr|d}|d=||j ||fS|d}|d=t|t r|j |||fS||fS(s$Read the key and value for an optioniit=t-tt"N(t readequalskeytreplacethasattrRnRtgetattrt isinstancetbooltTrueRqRrt readquotedtlisttappend(RoRutargRAtcurrenttinitialRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRss,        cCs|d}xWt|dkrc|djd rc|djd rc|d|d7}|d=q Wt|dks|djdrdS|d|dd!7}|S(sRead a value between quotesiiR{s--t iN(RqtendswithRrR(RoRuRRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs = %cCs:|jdd}|d}|d}|jd||S(sRead a key using equalsRxii(tsplittinsert(RoRRuRRARv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR|s   (RRRRpRwRsRR|(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRms    tOptionscBseZdZd Zd ZeZeZeZ eZ eZ eZ eZ eZeZeZeZeZgZd Zd Zd ZeZdZd Zd ZeZd Zd ZeZeZ eZ!dZ"eZ#d Z$d Z%eZ&eZ'd Z(eZ)eZ*eZ+eZ,eZ-eZ.eZ/eZ0eZ1eZ2d Z3d Z4eZ5eZ6gZ7e8Z9dZ:dZ;dZ<dZ=dZ>dZ?d Z@d ZAd ZBRS( sA set of runtime optionsRzt imagemagickcCs]|dt_|d=tt}|j|}|rOtj||jn|jdS(sParse command line optionsiN(RtlocationRmRwRR tusagetprocessoptions(RoRutparsertresult((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRws    cCstjr|jntjr,|jntjrB|jntjrX|jntj rn|j ntj ry?t tj t_ tj dkrt jd|jnWqt jdtj |jqXntjstjstjrtt_n|jtjr4tj r4tjt_ntjdkrOtt_ntjgkrmdgt_ntjrtt_ntjrtj rt jdtjt_ntjrt jdnxCtt D]5}|jdrt t |t!||d qqWd S( sProcess all options parsed.is.--splitpart requires a number bigger than zeros*--splitpart needs a numeric argument, not tcopys http://elyxer.nongnu.org/lyx.csss7Option --toc is deprecated; use --tocfor "page" insteads5Option --nocopy is deprecated; it is no longer neededtmodeiN("RthelpRRKt showversiont hardversiontshowhardversiont versiondatetshowversiondatet lyxformatt showlyxformatt splitparttintRR tlowmemttocttocforRtmemorytparsefootnotest forceformatt imageformatRt copyimagestcssR/t simplematht toctargettnocopytdirRRtR(Rotparam((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR sL                   cCsYtjdtjjtjdtjdtjdtjd|jdS(sShow correct usagesUsage: s [options] [filein] [fileout]s7Convert LyX input file "filein" to HTML file "fileout".sCIf filein (or fileout) is not given use standard input (or output).s?Main program of the eLyXer package (http://elyxer.nongnu.org/).N(RR tostpathtbasenameRRt showoptions(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR5s $   cCstjs dStt_tt_tjjd}xK|D]C}|d}tt|rjtt|tq8t j d|q8Wtj rtj rtj rtt_ ntj rtj rtt_ndS(sParse footnotes options.Nt,tfootsUnknown footnotes option: (Rt footnotesRt marginfoott letterfootRR~RtRRR tendfoott hoverfoott numberfoott symbolfoot(RoRntoptiont footoption((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR=s      cCstjdtjdtjdtjdtjdtjdtjdtjdtjd tjd tjd tjd tjd tjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjd tjd!tjd"tjd#tjd$tjd%tjd&tjd'tjd(tjd)tjd*tjd+tjd,tjd-tjd.tjd/tjd0tjd1tjd2tjd3S(4sShow all possible optionss Common options:s1 --help: show this online helps9 --quiet: disables all runtime messagesRzs Advanced options:sF --debug: enable debugging messages (for developers)s@ --version: show version number and release datesD --lyxformat: return the highest LyX version supporteds Options for HTML output:s8 --title "title": set the generated page titles1 --css "file.css": use a custom CSS filesO --embedcss "file.css": embed styles from elyxer.a CSS file into the outputsH --html: output HTML 4.0 instead of the default XHTMLs/ --unicode: full Unicode outputsG --iso885915: output a document with ISO-8859-15 encodingsC --nofooter: remove the footer "generated by eLyXer"sD --simplemath: do not generate fancy math constructionss Options for image output:sF --directory "img_dir": look for images in the specified directorysD --destdirectory "dest": put converted images into this directorysI --imageformat ".ext": image output format, or "copy" to copy imagessL --noconvert: do not convert images, use in original locationssH --converter "inkscape": use an alternative program to convert imagess Options for footnote display:sJ --numberfoot: mark footnotes with numbers instead of letterssB --symbolfoot: mark footnotes with symbols (*, **...)sE --hoverfoot: show footnotes as hovering text (default)s= --marginfoot: show footnotes on the page marginsA --endfoot: show footnotes at the end of the pagesJ --supfoot: use superscript for footnote markers (default)sA --alignfoot: use aligned text for footnote markerssM --footnotes "options": specify several comma-separated footnotes optionssJ Available options are: "number", "symbol", "hover", "margin", "end",s "sup", "align"s Advanced output options:sJ --splitpart "depth": split the resulting webpage at the given depthsH --tocfor "page": generate a TOC that points to the given pagesC --target "frame": make all links point to the given framesL --notoclabels: omit the part labels in the TOC, such as ChaptersJ --lowmem: do the conversion on the fly (conserve memory)sC --raw: generate HTML without header or footer.sU --jsmath "URL": use jsMath from elyxer.the given URL to display equationssV --mathjax "URL": use MathJax from elyxer.the given URL to display equationssH --googlecharts: use Google Charts to generate formula imagessM --template "file": use a template, put everything in s@ --copyright: add a copyright notice at the bottoms Deprecated options:sC --toc: (deprecated) create a table of contentssJ --toctarget "page": (deprecated) generate a TOC for the given pagesO --nocopy: (deprecated) maintained for backwards compatibilityN(RR RR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyROsf                                                  cCsEdtjd}|dtjdd7}tj|tjdS(s(Return the current eLyXer version stringseLyXer version tnumbers (tdatet)N(RJRKRR RR (RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCs"tjtjdtjdS(sReturn just the version stringRN(RRRJRKRR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs"tjtjdtjdS(sReturn just the version dteRN(RRRJRKRR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs"tjtjdtjdS(s#Return just the lyxformat parameterRN(RRRJRKRR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRsN(CRRRRtinstanceRRRt copyrightRtquietRKRRR/RRt showlinestunicodeR0Rttitlet directoryt destdirectoryRRRRRttargetRRRtnobibt convertertrawtjsmathtmathjaxtnofooterRttemplatet noconvertt notoclabelsRRRRRRtsupfoott alignfootRRRt googlechartstembedcsstdicttbranchesRwRRRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRsz  *   6   t BranchOptionscBs2eZdZdZdZdZdZRS(sA set of options for a branchcCs||_idd6|_dS(Ns#fffffftcolor(tnameRn(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps cCsU|jtjds+tjd|dS|jtjdd}||j|scs|jjjkS(N(RRR(R(Ro(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscsj|S(N(tprocess(R(RRo(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(trecursivesearch(Rot containertlocatet recursiveR((RRosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytextracts cCsh|jj}||jkr+|j|n9||jkrS|j|j|ntjd|dS(sBAdd allowed containers, clone cloned containers and add the clone.sUnknown container class N(RRRRRt safecloneRR (RoRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  cCs1tj|}|j|_|j||_|S(sFReturn a new container with contents only in a safe list, recursively.(RRtoutputRtcontents(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs (RRRRpRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  tParsercBsMeZdZdZdZdZdZdZdZdZ RS(sA generic parsercCsd|_t|_dS(Ni(tbeginRRM(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps cCs,|jj}|j|j|_|S(sParse the header(t currentlineRtnextlinet linenumberR(Rotreadertheader((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parseheaders  cCs|jjjdrA|j|\}}||j|t>sXML parameter s should be <...>iiisEmpty XML parameter <>RxsErroneous attribute for s: s="0"R{N(NN( RRRRRR RRqRR( RoRRRRAtattrstattrtpartstattrkeyRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s,         cCsN|js$tjdt|dSx#|jj|jsI|q'WdS(s'Parse until the current ending is foundsNo ending for N(tendingRR RRRr(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parseending9s  cCs8|jj|}|r4|j|_|j|ndS(N(tfactorytcreatecontainertparentR(RoRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytparsecontainerAs cCs|jjdt|jdS(sReturn a descriptions (R(RRRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRGs( RRRRpRRRR RR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs      t LoneCommandcBseZdZdZRS(s"A parser for just one command linecCsgS(s Read nothing((RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytparseNs(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRKst TextParsercBs/eZdZgZdZdZdZRS(s(A parser for a command and a bit of textcCsQtj|d|_|jjtjkrDtj|jj|_ng|_dS(N(RRpRR RRR$R%(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpWs   cCsmtjj|jtjtjdtjd|jg|_g}x#|j|sh|j||qFW|S(s$Parse lines as long as they are texttLayouttInset(RtstackRR R$R%tisendingR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR^scCsv|jj}t|dkr(tS|d|jkrr|dtjkretjj|dn gt_tStS(sCheck if text is endingi( RRRqRR%RRtremoveR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRhs (RRRRRpRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRRs   tExcludingParsercBseZdZdZRS(s%A parser that excludes the final linecs)gjfdS(s5Parse everything up to (and excluding) the final linecsjS(N(R((RRRo(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR{s(R (RoR((RRRosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRxs(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRust BoundedParsercBseZdZdZRS(sA parser bound by a final linecCs tj||}|j|S(s*Parse everything, including the final line(RRR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR~st BoundedDummycBseZdZdZRS(s&A bound parser that ignores everythingcs'|jfdjgS(s#Parse the contents of the containercs jS(N(R((R(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(R R(RoR((RsG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRst StringParsercBs eZdZdZdZRS(sParses just a stringcCs|jd|_gS(sDo nothing, just take notei(RR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs|j}|j|S(sParse a single line(RR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  (RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs t InsetParsercBseZdZdZRS(sParses a LyX insetcCsYtjd}x9|jdkrH|jj| rH|j|qWtj||S(s(Parse inset parameters into a dictionaryRRz(R$R)RRrRRR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs +(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRstContainerOutputcBs eZdZdZdZRS(s(The generic HTML output for a container.cCstjdt|dS(sShow an error.sgethtml() not implemented for N(RR R(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgethtmlscCstS(s5Decide if the output is empty: by default, not empty.(R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytisemptys(RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs t EmptyOutputcBseZdZdZRS(cCsgS(sReturn empty HTML code.((RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCstS(s"This output is particularly empty.(R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s t FixedOutputcBseZdZdZRS(s Fixed outputcCs|jS(sReturn constant HTML code(R/(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR!stContentsOutputcBseZdZdZRS(s&Outputs the contents converted to HTMLcCsyg}|jdkr|SxY|jD]N}t|dsatjd|jjdt||S||j7}q#W|S(sReturn the HTML codeRs No html in s: N( RRR~RR RRRR(RoRR/telement((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs%(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR"st TaggedOutputcBseeZdZdZeZeZeedZdZ dZ dZ dZ dZ dZRS( s-Outputs an HTML tag surrounding the contents.cCs1||_|r||_n|r-||_n|S(s/Set the value for the tag and other attributes.(ttagt breaklinestempty(RoR%R&R'((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytsettags    cCs ||_|S(sSet the value for breaklines.(R&(RoR&((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt setbreakliness cCs[|jr|j|gS|j|g}|tj||7}|j|j||S(sReturn the HTML code.(R't selfclosingtopenR"RRtclose(RoRR/((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  cCs6|jsdSd|jd}|jr2|dS|S(sGet opening line.RzRRs (tchecktagR%R&(RoRR+((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR+s   cCsD|jsdSd|jjdd}|jr@d|dS|S(sGet closing line.Rzss (R-R%R&(RoRR*((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR* s   cCs;|js$tjdtttS|jdkr7tStS(sCheck that the tag is valid.s No tag in Rz(R%RR RRRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR-s  N(RRRRR%RR&R'R(R)RR+R,R*R-(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR$s  tFilteredOutputcBs2eZdZdZdZdZdZRS(s1Returns the output in the contents, but filtered:cCs g|_dS(sInitialize the filters.N(tfilters(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp scCs|jj||fdS(s:Add a new filter: replace the original by the replacement.N(R/R(RoRt replacement((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt addfilter$scCsCg}tj||}x$|D]}|j|j|qW|S(sReturn the HTML code(R"RRtfilter(RoRRR/tline((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR(s  cCs?x8|jD]-\}}||kr |j||}q q W|S(s0Filter a single line with all available filters.(R/R}(RoR3RR0((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR20s (RRRRpR1RR2(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR.s    t StringOutputcBseZdZdZRS(sReturns a bare string as outputcCs |jgS(sReturn a bare string(R)(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR:s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR47st LineReadercBsVeZdZdZdZdZdZdZdZdZ dZ RS( sReads a file line by linecCst|tr||_ntj|dd|_d|_d|_d|_t|_ t |_ y|j Wn<t k rddl}|j|d|_|j nXdS(NtrUsutf-8iitrb(RtfiletcodecsR+RRtlastlineRRtmustreadRtdepletedtreadlinetUnicodeDecodeErrortgzip(RotfilenameR?((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpKs        cCs1x!t|D]}|jjq W||_dS(sSet the first line to read.N(trangeR8R=R(Rot firstlineti((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytsetstart]scCs ||_dS(sSet the last line to read.N(R:(RoR:((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytsetendcscCs|jr|jn|jS(sGet the current line(R;R=R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRgs  cCs&|jrtjdnt|_dS(sGo to next linesRead beyond file endN(R<RRRR;(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRms cCs|jj|_t|jtjs?|jjd|_nt|jdkr`t|_ n|jj d|_|j d7_ t |_ dt|j dt_|j ddkrtjdnd S( sRead a line from elyxer.filesutf-8is isLine s: itParsingN(R8R=RRR9tStreamReaderWritertdecodeRqRR<trstripRRR;RRR R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR=ss  cCs<|jr|j|jkrtS|jr5|jn|jS(s Find out if the file is finished(R:RRR;R=R<(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytfinisheds   cCs|jjdS(N(R8R,(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR,s( RRRRpRDRERRR=RJR,(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR5Hs       t LineWritercBsAeZdZeZdZdZdZdZdZ RS(s"Writes a file as a series of listscCs1t|tr$||_d|_n ||_dS(N(RR8RR@(RoR@((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps  cCsZxS|D]K}t|tsEtjdt|dt|dS|j|qWdS(sWrite a list of stringssNot a string: s in N(Rt basestringRR Rt writestring(RotstringsR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  %cCsn|js'tj|jdd|_n|jtjkrZtjdkrZ|jd}n|jj|dS(sWrite a stringtwsutf-8iiN(ii( R8R9R+R@RRRRR(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRMs  !cCs|j|ddS(sWrite a line to files N(RM(RoR3((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt writelinescCs|jjdS(N(R8R,(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR,s( RRRRR8RpRRMRPR,(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRKs    tGlobablecBseZdZeZdZdZdZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZedZddZdZRS(sA bit of text which can be globbed (lumped together in bits). Methods current(), skipcurrent(), checkfor() and isout() have to be implemented by subclasses.cCst|_dS(N(t EndingListt endinglist(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpscCs9|jrdSt|jdkr5|jndS(s*Check for a Unicode byte mark and skip it.Ni(RJtordRt skipcurrent(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt checkbytemarks cCstjdtS(s+Find out if we are out of the position yet.sUnimplemented isout()(RR R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytisouts cCstjddS(sReturn the current character.sUnimplemented current()Rz(RR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCstjdtS(s3Check for the given string in the current position.sUnimplemented checkfor()(RR R(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytcheckfors cCs9|jr)|js%|jjntS|jj|S(s*Find out if the current text has finished.(RWt leavependingRSt checkpendingRtcheckin(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRJs   cCstjddS(s)Return the current character and skip it.sUnimplemented skipcurrent()Rz(RR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRUs cCs7d}x*|j r2|r2||j7}q W|S(s>Glob a bit of text that satisfies a check on the current char.Rz(RJRU(Rot currentchecktglob((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR]scsjfdS(sGlob a bit of alpha textcsjjS(N(Rtisalpha((Ro(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(R](Ro((RosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt globalphascsjfdS(sGlob a row of digits.csjjS(N(Rtisdigit((Ro(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(R](Ro((RosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt globnumberscCs,|jjs$|jdkr(tStS(s5Return if the current character is alphanumeric or _.t_(RtisalnumRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt isidentifiers$cCs|j|jS(s Glob alphanumeric and _ symbols.(R]Rd(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytglobidentifierscCs0|jjrtS|jdkr,tStS(s5Return if the current character is a value character:s{}()(RtisspaceRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytisvalues cCs|j|jS(s'Glob a value: any symbols but brackets.(R]Rg(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt globvaluescsjfdS(s(Skip all whitespace at current position.csjjS(N(RRf((Ro(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(R](Ro((RosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt skipspacescs0jfd}j|S(s4Glob a bit of text up to (including) the magic char.csjkS(N(R((t magiccharRo(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(R]tskip(RoRjR]((RjRosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt globincluding s csjfdS(s?Glob a bit of text up until (excluding) any excluded character.csjkS(N(R((texcludedRo(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(R](RoRm((RmRosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt globexcludingscCs|jj||dS(sPush a new ending to the bottomN(RStadd(RoR toptional((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt pushendingscCsj|jr|jr|S|jj|}|rY||krYtjd|d|n|j||S(s,Pop the ending found at the current positionsExpected ending s, got (RWRYRStpopRR Rk(RotexpectedR ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt popendings cCs#|jj|}|sdS|jS(s$Return the next ending in the queue.N(RSt findendingRR (Rot nextending((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRv#sN(RRRRRYRpRVRWRRXRJRUR]R_RaRdReRgRhRiRlRnRqRRtRv(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRQs,                  RRcBsYeZdZdZedZdZdZdZdZ dZ dZ RS( sA list of position endingscCs g|_dS(N(R%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp-scCs|jjt||dS(sAdd a new ending to the listN(R%RtPositionEnding(RoR Rp((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRo0scCs|j|jj7_dS(s/Pick any pending endings from a parse position.N(R%RS(Rotpos((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt pickpending4scCs|j|rtStS(sSearch for an ending(RuRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR[8scCs|jrtjddS|j|}|sMtjd|jdSxWt|jD]F}|jj|||kr|jS|j s]tjd|q]q]WtjddS(s)Remove the ending at the current positionsNo ending out of boundsRzs No ending at sRemoved non-optional ending sNo endings left( RWRR RuRtreversedR%RR Rp(RoRxR teach((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRr>s     cCsct|jdkrdSxCtt|jD],\}}|j|rN|S|js/dSq/WdS(s'Find the ending at the current positioniN(RqR%Rt enumerateRzR[Rp(RoRxtindexR ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRuPs" cCs7t|jdkr3tjdt|dndS(s&Check if there are any pending endingsisPending s left openN(RqR%RR R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRZ[scCsXd}x%|jD]}|t|d7}qWt|jdkrP|d }n|dS(sPrintable representations endings [Riit](R%RRq(RoR)R ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR`s  ( RRRRpRRoRyR[RrRuRZR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRR*s      RwcBs)eZdZdZdZdZRS(s An ending for a parsing positioncCs||_||_dS(N(R Rp(RoR Rp((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpls cCs|j|jS(sCheck for the ending(RXR (RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR[pscCs'd|j}|jr#|d7}n|S(sPrintable representationsEnding s (optional)(R Rp(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRts   (RRRRpR[R(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRwis  tPositioncBsheZdZdZdZdZdZdZdZdZ dZ d Z d Z RS( sA position in a text to parse. Including those in Globable, functions to implement by subclasses are: skip(), identifier(), extract(), isout() and current().cCstj|dS(N(RQRp(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpscCstjddS(s Skip a stringsUnimplemented skip()N(RR (RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRkscCstjddS(s.Return an identifier for the current position.sUnimplemented identifier()tError(RR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt identifiers cCstjddS(sHExtract the next string of the given length, or None if not enough text,sUnimplemented extract()N(RR R(Rotlength((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCs||jt|kS(s)Check for a string at the given position.(RRq(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRXscCsD|jt|}|stS|j|jt|jkS(s!Check for a string in lower case.(RRqRtlower(RoR)R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt checkforlowerscCs|j}|j||S(s)Return the current character and skip it.(RRk(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRUs  cCs|j|jS(s3Advance the position and return the next character.(RUR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytnexts cCs$|j|stS|j|tS(s;Check for a string at the given position; if there, skip it(RXRRkR(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt checkskips cCstj|d|jdS(s2Show an error message and the position identifier.s: N(RR R(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s( RRRRpRkRRRXRRURRR (((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR}s         t TextPositioncBsDeZdZdZdZdZdZdZdZRS(s%A parse position based on a raw text.cCs-tj|d|_||_|jdS(s*Create the position from elyxer.some text.iN(RRpRxttextRV(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps   cCs|jt|7_dS(sSkip a string of characters.N(RxRq(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRkscCs[d}|j|t|jkr;t|j|j}nd|j|j|j|!dS(s&Return a sample of the remaining text.it*(RxRqR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs|jt|jkS(s'Find out if we are out of the text yet.(RxRqR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRWscCs|j|jS(s6Return the current character, assuming we are not out.(RRx(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs8|j|t|jkr dS|j|j|j|!S(sHExtract the next string of the given length, or None if not enough text.N(RxRqRR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs( RRRRpRkRRWRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs     t FilePositioncBs_eZdZdZdZdZdZdZdZdZ dZ d Z RS( s-A parse position based on an underlying file.cCs3tj|t||_d|_|jdS(s Create the position from a file.iN(RRpR5RRxRV(RoR@((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps  cCsvt|}xT|j|t|jjkrb|t|jj|jd8}|jqW|j|7_dS(sSkip a string of characters.iN(RqRxRRR(RoR)R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRks  %$cCs |jjS(s,Get the current line of the underlying file.(RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs|jjd|_dS(sGo to the next line.iN(RRRx(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCs|jjdS(s#Return the line number of the file.i(RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCsT|jj|jd }|jj|j}dt|jd|d|S(s4Return the current line and line number in the file.isline s: R(RRRxRt getlinenumber(Rotbeforetafter((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs|jt|jjkr{|jt|jjdkrntjd|jjdt|jn|jn|jjS(s'Find out if we are out of the text yet.isOut of the line s: ( RxRqRRRR RRRJ(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRWs ". cCs|jt|jjkr"dS|jt|jjkrotjd|jjdt|jdS|jj|jS(s6Return the current character, assuming we are not out.s sOut of the line s: R(RxRqRRRR R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs +cCsD|j|t|jjkr&dS|jj|j|j|!S(sHExtract the next string of the given length, or None if not enough text.N(RxRqRRR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs"( RRRRpRkRRRRRWRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs        t ContainercBseZdZdZdZdZdZdZdZ dZ e j dZ dZdZdZd Zd Zd Zd Zd ZdZddZdZdZdZdZRS(s.A container for text and objects in a lyx filecCst|_dS(N(RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpscCsdS(sProcess contentsN((Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCsK|jj|}t|tr>tjd||g}n|j|S(sGet the resulting HTMLs Raw string (RRRRLRR t escapeall(RoR/((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR$s  cCsg}x|D]}tjr4|j|tj}ntjrd|j|tj}|j|}n!tjs|j|tj}n|j|q W|S(s=Escape all lines in an array according to the output options.( RR/tescapeR+R0tescapeentitiesRR1R(RotlinesRR3((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR,s    cCsP|j}|jx3|D]+}||kr|j|||}qqW|S(s1Escape a line with replacements from elyxer.a map(tkeystsortR}(RoR3t replacementstpiecestpiece((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR:s     cCsd}t|}x|jst|jdkrtt|j}|dkr|tt|jd}n|d|dd7}n||j7}|jqW|S(s/Escape all Unicode characters to HTML entities.Rzit0xd835is&#it;(RRJRTRthexRRU(RoR3RRxt codepoint((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRDs  cs#g|j|fdS(s2Search for all embedded containers of a given typecs j|S(N(R(R(R(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRVs(t searchprocess(RoR((RsG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt searchallSscCs7|j|}x!|D]}|jjj|qW|S(s3Search for all containers of a type and remove them(RRRR(RoRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt searchremoveYs cs|jfd|dS(s4Search for elements of a given type and process themcs t|S(N(R(R(R(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRbsN(t locateprocess(RoRR((RsG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR`scCsAx:|jD]/}|j||||r ||q q WdS(s3Search for all embedded containers and process themN(RR(RoRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRds cCsSxL|jD]A}||r2|j|||n||r ||q q WdS(s,Perform a recursive search in the container.N(RR(RoRRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRks   cCs@d}ttjj|}x|D]}||j7}q%W|S(s0Extract all text from elyxer.allowed containers.Rz(RR$R&RR)(RoRRVtconstant((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR&ss  cCs|t|jkrdSt|j|dr3dSxc|t|jkr||j|rt|j|_|jj|j||jj|q6W|jj||dS(s*Group some adjoining elements into a groupNtgrouped(RqRR~RRRRrR(RoR}Rgt isingroup((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRg{s+cCsY|j|}|jj|x5t|jdkrT|jj||jjq WdS(s)Remove a container but leave its contentsiN(RRrRqR(RoR}R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs icCsDtjd|t|x"|jD]}|j|dq%WdS(sShow in a trees iN(RRRRttree(RotlevelR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs||jkrdS|j|S(s)Get the value of a parameter, if present.N(RMR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt getparameterscCs&|j|}|sgS|jdS(s7Get the value of a comma-separated parameter as a list.R(RR(RoRt paramtext((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgetparameterlistscCs6|j}x&|r1|jjr%tS|j}q WtS(s&Check if the parent's output is empty.(RRRRR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pythasemptyoutputs    cCs.|js|jjS|jjdt|jS(sGet a descriptiont@(RRRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  N(RRRRtpartkeyRRRpRRRR+R.RRRRRRRR&RgRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs.                tBlackBoxcBseZdZdZRS(s)A container that does not output anythingcCs%t|_t|_g|_dS(N(RRR RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps  (RRRRp(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRst LyXFormatcBseZdZdZRS(sRead the lyxformat commandcCspt|jd}|dkr9tjdt|n|ttjdkrltjdt|ndS(sShow warning if version < 276iis(Warning: unsupported old format version Rs(Warning: unsupported new format version N(RRRR tstrRJRK(RoRK((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRstStringContainercBsJeZdZdZdZdZdZdZdZ dZ RS(sA container for a single stringcCs%t|_t|_d|_dS(NRz(RRR4RR)(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps  cCs.|jr*|j|j|_d|_ndS(s/Replace special chars from elyxer.the contents.N(tparsedtreplacespecialR)R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCs|j|tj}|j|}tjd|krt|dkr|jrldt|jd}nd}t j ||j n|S(s,Replace all special chars from elyxer.a lineRisUnknown command at s: sUnknown command: ( RR+R.t changelineR$R)RqRRRR R(RoR3R#R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs% cCsE|j|tj}tjd|kr,|S|j|tj}|S(NR(RR+R,R$R)R-(RoR3((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCs|jS(sReturn all text.(R)(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR&scCstd}|jr)|dt|j7}nd}t|jjdkrSd}n|d|jjd |dS(s"Return a printable representation.RRs...iRzs (R(RRRqR)R(RoRtellipsis((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  N( RRRRRRpRRRR&R(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs    tConstantcBs eZdZdZdZRS(sA constant stringcCs"g|_||_t|_dS(N(RR)R4R(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps  cCs d|jS(Ns Constant: (R)(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRRpR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs t TaggedTextcBs>eZdZdZdZedZedZdZ RS(sText inside a tagcCst||_t|_dS(N(RRR$R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp scCs%||_||j_||j_|S(s&Complete the tagged text and return it(RRR%R&(RoRR%R&((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytcomplete s   cCs"t|}|j|g||S(s(Complete the tagged text with a constant(RR(RoRR%R&R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s cCs8t|jdsdS|jjs&dSd|jjdS(s"Return a printable representation.R%sEmtpy tagged textsTagged sTagged ).R'(R$R(RR(RoR%((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt selfcomplete s(RRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  RcBs2eZdZdZdZdZdZRS(sA constant string in a formulacCs/tj||||_d|_d|_dS(sSet the constant stringiN(RRpRR^RR(RoR)((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp s  cCs|jS(s+Compute the size of the constant: always 1.(R^(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCs t|jS(sReturn a copy of itself.(RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCs d|jS(s"Return a printable representation.sFormula constant: (R)(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRRpRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s    tRawTextcBs eZdZdZdZRS(sA bit of text inside a formulacCs|jjS(sDetect a bit of raw text(RR^(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytdetect scCs,|j}|jt|d|_dS(sParse alphabetic textRN(R_RoRR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytparsebit s (RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s t FormulaSymbolcBs?eZdZejZejdZdZdZdZRS(sA symbol inside a formulat characterscCs6|jtjkrtS|jtjkr2tStS(sDetect a symbol(RRRHRRCR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s cCs|jtjkr/|j|j|dS|jtjkre|jtj|j|dStjd|jddS(sParse the symbolNsSymbol s not found(RRRHt addsymbolRCRR (RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR# scCs0|j|j||jjt|dS(s Add a symbolN(RRRRR(RotsymbolRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR- s( RRRR2RCRHRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s     t FormulaNumbercBs eZdZdZdZRS(sA string of digits in a formulacCs|jjS(sDetect a digit(RR`(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR5 scs8jfd}|jt|d|_dS(sParse a bunch of digitscsjjS(N(RR`((Rx(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR; sRN(R]RoRR(RoRxtdigits((RxsG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR9 s(RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR2 s tCommentcBs-eZdZejdZdZdZRS(s*A LaTeX comment: % to the end of the line.tcommentcCs|j|jkS(s Detect the %.(RR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRD scCs|j|jd7_dS(sParse to the end of the line.s N(RRl(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRH s(RRRR2R(RRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR? s  t WhiteSpacecBs)eZdZdZdZdZRS(s"Some white space inside a formula.cCs|jjS(sDetect the white space.(RRf(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRO scCs|j|j7_dS(sParse all whitespace.N(RRi(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRS scCsd|jdS(s"Return a printable representation.s Whitespace: *R(R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRW s(RRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRL s  tBracketcBsyeZdZejdZejdZdZdZ dZ dZ dZ dZ dZd Zd ZRS( sA {} bracket inside a formulaRcCstj|d|_dS(s'Create a (possibly literal) new bracketN(RRpRtinner(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpa s cCs|j|jS(sDetect the start of a bracket(RXR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRf scCs|j||j|S(sParse the bracket(t parsecompletet innerformula(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRj scCs|j||j|S(sParse a text bracket(Rt innertext(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parsetexto scCs|j||j|S(sParse a literal bracket(Rt innerliteral(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parseliteralt scCs|j|js8tjd|jd|jdS|j|j||j|j|||j |j |j7_ |j dS(sParse the start and end markssBracket should start with s at N( RXRRR RRRRqR RRtR(RoRxt innerparser((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRy s" cCs0x)|js+|j|jj|qWdS(s(Parse a whole formula inside the bracketN(RJRoR tparseany(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCstjj}|jtjd|jtjd|jtjxx|js|j|kr|j |j j ||j dr|j d7_ qqJ|j t|jqJWdS(s<Parse some text inside the bracket, following textual rules.RRRN(R2RFRRR(RRRJRRoR RRRRRU(RoRxt specialchars((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCsd|_xa|j rl|j|jk rl|j|jkrT|j|q |j|j7_q W|j|j7_dS(sAParse a literal inside the bracket, which does not generate HTML.RzN(tliteralRJRR RRRUR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  &(RRRR2R(RR%R RpRRRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR[ s         t SquareBracketcBs1eZdZejdZejdZdZRS(sA [] bracket inside a formulat squarebracketcCst}|j|_|S(s3Return a new square bracket with the same contents.(RR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  ( RRRR2R(RR%R R(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  tMathsProcessorcBs eZdZdZdZRS(sAA processor for a maths construction inside the FormulaProcessor.cCstjdt|dS(s$Process an element inside a formula.sUnimplemented process() in N(RR R(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCsd|jjS(sReturn a printable description.sMaths processor (RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s tFormulaProcessorcBsJeZdZgZdZdZdZdZdZdZ RS(s&A processor specifically for formulas.cCs+|j||j||j|dS(s7Process the contents of every formula bit, recursively.N(tprocesscontentstprocessinsidest traversewhole(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  cCsBt|tsdS|jx|jD]}|j|q'WdS(s&Process the contents of a formula bit.N(RRRRR(RoRR#((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  cCskt|tsdSxQt|jD]@\}}x$|jD]}|j|j|q9W|j|q#WdS(s8Process the insides (limits, brackets) in a formula bit.N(RRR|Rt processorsRR(RoRR}R#t processor((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s cCsd}x|j|D]t\}}|jdkrD|j||n@|jdkr|r|jdkr|jjdtdn|}qWdS(s>Traverse over the contents to alter variables and space units.RtfontRiu N(RttraverseRt italicizeRRR(RoRtlastRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s$ccsrxk|jD]`}t|dr9|jr9||jfVq t|tr x|j|D] }|VqXWq q WdS(sHTraverse a formula and yield a flattened structure of (bit, list) pairs.RN(RR~RRRR (RoRR#tpair((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR  s cCs/|j|}tj|gd||N(R2RIturllibt quote_plusRRR(Roturltimg((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR scCs>tj|j}tj|||_|g|_dS(sEMake the contents using classic output generation with XHTML and CSS.N(tFormulaFactoryRRRRRR(Rotwhole((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s cCs|jdr|j|np|jdr>|j|nQ|jdr`|j|dn/|jdr|j|dn |jd|j|S(s4Parse using a parse position instead of self.parser.s$$t$s\(s\)s\[s\]sUnparseable formula(Rtparsedollarblocktparsedollarinlinet parseinlinetot parseblocktoR R(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR& s  cCsdg|_|j|dS(sParse a $...$ formula.RN(Rt parsedollar(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR5 s cCs<dg|_|j||jds8|jdndS(sParse a $$...$$ formula.RRs1Formula should be $$...$$, but last $ is missing.N(RRRR (RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR: s  cCs0|jd|jd|_|jddS(sParse to the next $.RN(RqRnRRt(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRA s cCs dg|_|j||dS(sParse a \(...\) formula.RN(Rt parseupto(RoRxtlimit((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRG s cCs dg|_|j||dS(sParse a \[...\] formula.RN(RR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRL s cCs3|j||jd|_|j|dS(s1Parse a formula that ends with the given command.cSstS(N(R(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRT sN(RqR]RRt(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRQ s cCs+|jr'|jjr'd|jjdSdS(s"Return a printable representation.s Formula (RsUnnumbered formula(RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRW s(RRRRpRRRRRRRRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR  s             t WholeFormulacBs eZdZdZdZRS(sParse a whole formulacCs |j S(s"Not outside the formula is enough.(RJ(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR` scCs0x)|js+|j|jj|qWdS(sParse with any formula bitN(RJRoR R(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRd s(RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR] s RcBseZdZeeeeeegZ eegZ e Z dZ dZdZdZdZdZdZdZd ZRS( sConstruct bits of formulacCst|_dS(s Initialize the map of instances.N(Rt instances(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpq scCs&|jrtS|j|j|S(sDetect a bit of a given type.(RJRRR(RoRRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt detecttypeu s cCsA||jks|j| r6|j||j||j|S|S(s#Parse the given type and return it.N(RRRRR(RoRRxRt returnedbit((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s   cCst|}|jt}|j|r;|j||S|js}tjd|j|j t j |dn|S(s5Parse a string of text that contains a whole formula.sUnknown formula at: sspan class="unknown"( RRRRRRJRR RRoRR(RoRRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s   (RRRRRRRRRR#R"RtdefiningRpRRRR!R RRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRi s         t TranslatorcBsMeZdZdZdZeeZdZdZdZ dZ RS(s=Reads the configuration file and tries to find a translation.cCs|jj|S(s%Get the translated message for a key.(Rt getmessage(RRA((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt translate scCsd|_t|_dS(N(Rt translationRtfirst(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp s cCsd|_tjs#tjddStjtjkrMtjdtjdStjtjdkrgdStjtjg}ytj dd||_ Wn(t k rtjdt |nXdS(s/Find the translation for the document language.sNo language in documentNsUnknown language tentelyxersNo translation for ( Rt langcodesRRRR RkRltgettextR)tIOErrorR(RoR-((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytfindtranslation s    cCsi|jr|jt|_n|j|}|js;|Sy|jj|}Wntk rdnX|S(s-Get the translated message for the given key.(R*R0RtgetuntranslatedR)tugettextR/(RoRAR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR' s     cCs/|tjkr$tjd||Stj|S(sGet the untranslated message.sCannot translate (RkRVRR (RoRA((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR1 sN( RRRRRR(RRpR0R'R1(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR& s     t NumberCountercBseZdZd)Zd)Zd)Zd)ZdZe j dZ d*d+d,d-d.d/d0d1d2d3d4d5d6g Z dZ dZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(ZRS(7s#A counter for numbers (by default).tABCDEFGHIJKLMNOPQRSTUVWXYZtsymbolstMitCMitDitCDitCidtXCiZtLi2tXLi(tXi tIXi tVitIVitIicCs ||_dS(sGive a name to the counter.N(R(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp scCs ||_|S(s0Set the counter mode. Can be changed at runtime.(R(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytsetmode s cCs ||_dS(sSet an initial value.N(Rv(RoRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytinit scCs t|jS(s$Get the next value as a text string.(RRv(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR. scCs|j|jS(sGet the next value as a letter.(t getsequencetletters(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt getletter scCs|j|jS(sGet the next value as a symbol.(RER5(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt getsymbol$ scCs||jdt|S(s*Get the next value from elyxer.a sequence.i(RvRq(RoRY((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRE( scCsXd}|j}xB|jD]7\}}||kr||||7}||}qqW|S(s%Get the next value as a roman number.Rz(Rvt romannumerals(RoRRtnumeralRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgetroman, s  cCs|j s|jdkr#|jS|jdkr<|jS|jdkr[|jjS|jdkrt|jS|jdkr|jStjd|j|jS( s8Get the current value as configured in the current mode.RRtAtaRBRsUnknown counter mode (stextR(RR.RGRRKRHRR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgetvalue6 s    cCs.|jsd|_n|jd7_|jS(s@Increase the current value and get the next value as configured.ii(RvRN(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgetnextE s  cCs d|_dS(sReset the counter.iN(Rv(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytresetL scCs.d|j}|jr*|d|j7}n|S(s"Return a printable representation.sCounter s in mode (RR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRP s  N(R6i(R7i(R8i(R9i(R:id(R;iZ(R<i2(R=i((R>i (R?i (R@i(RAi(RBi(RRRRRRvRtmasterRFRWRYR5RIRpRCRDR.RGRHRERKRNRORPR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR3 s,            tDependentCountercBs)eZdZdZdZdZRS(s4A counter which depends on another one (the master).cCs||_|jj|_|S(sSet the master counter.(RQRNR (RoRQ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt setmasterZ s cCsJ|j|jjkr%|jntj|}|jj|_|S(s8Increase or, if the master counter has changed, restart.(R RQRNRPR3RO(RoRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRO` s  cCs|jjdtj|S(s8Get the value of the combined counter: master.dependent.t.(RQRNR3(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRNh s(RRRRSRORN(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRRW s  tNumberGeneratorcBseZdZdZdZgejdD]Zej ^q&Z gejdD]Zej ^qLZ e Z dZdZdZdZdZdZdZd Zd Zd Zd Zd ZdZdZdZRS(sMA number generator for unique sequences and hierarchical structures. Used in:tromantorderedcCs|jddS(s.Remove the possible asterisk in a layout type.RRz(R}(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt deasterisk| scCs |j|S(s9Find out if the layout type corresponds to a unique part.(tisroman(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytisunique scCs|j|j|jkS(s9Find out if the layout type should have roman numeration.(RXRt romanlayouts(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRY scCs|j|j|jkS(s?Find out if the layout type corresponds to an (un)ordered part.(RXRtorderedlayouts(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt isinordered scCsVd|krtS|j|r#tS|j|s6tS|j|tjkrRtStS(sCFind out if the type for a layout corresponds to a numbered layout.R(RRYRR]tgetlevelRR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt isnumbered s cCs d|kS(s5Find out if the type contains an asterisk, basically.R((RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt isunordered scCsm|j|rdS|j|s7tjd|dS|j|j}|jj|d}|tj S(s0Get the level that corresponds to a layout type.isUnknown layout type i( RZR]RR RXRR\R}RR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR^ scCs/tjr"|j|dkr"dS|j|S(s4Obtain the type for the part: without the asterisk, itAppendix(RUtappendixR^RX(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt getparttype scCs|j|jS(s$Generate a number for a layout type.(t getcounterRO(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgenerate scCs?|j}||jkr4|j||j|(R/(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRRpR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s t EmphaticTextcBseZdZdZRS(sText with emphatic modecCsd|j_dS(NRC(RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR st ShapedTextcBseZdZdZRS(sText shaped (italic, slanted)cCsd|jd|_|jtjkrJtjd|jdd|j_dStj|j|j_dS(NisUnrecognized shape tspan(RRRcRjRR RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR stVersalitasTextcBseZdZdZRS(sText in versalitascCsd|j_dS(Nsspan class="versalitas"(RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR st ColorTextcBseZdZdZRS(s Colored textcCs+|jd|_d|jd|j_dS(Nis span class="R{(RRRR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR stSizeTextcBseZdZdZRS(s Sized textcCs+|jd|_d|jd|j_dS(Nis span class="R{(RR^RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR stBoldTextcBseZdZdZRS(s Bold textcCsd|j_dS(Ntb(RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR st TextFamilycBseZdZdZRS(s,A bit of text from elyxer.a different familycCs]|jd|_|jtjkrCtjdtd|j_dStj|j|j_dS(sParse the type of familyisUnrecognized family RN(RRRcReRR RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR stHfillcBseZdZdZRS(sHorizontall fillcCsd|j_dS(Nsspan class="hfill"(RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR st BarredTextcBseZdZdZRS(sText with a bar somewherecCs`|jd|_|jtjkrFtjd|jd|j_dStj|j|j_dS(sParse the type of barisUnknown bar type RN(RRRcRdRR RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR stLangLinecBseZdZdZRS(s A line with language informationcCs|jd|_dS(Ni(Rtlang(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR st InsetLengthcBseZdZdZRS(s!A length measure inside an inset.cCs|jd|_dS(Ni(RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR stSpacecBs)eZdZdZdZdZRS(sA space of several typescCst|_t|_dS(N(RRR!R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp s cCs|jd|_|jtjkrFtjd|jdg|_dStj|jg|_|j}|srdStj dt |_ t j |j|dS(NisUnknown space type Rsspan class="hspace"(RRRZR[RR R/t getlengthR$R(RRRsRR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  cCs>t|jdks,t|jdt r0dS|jdjS(s<Get the space length from elyxer.the contents or parameters.iN(RqRRRRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s,(RRRRpRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  t VerticalSpacecBs eZdZdZdZRS(s(An inset that contains a vertical space.cCst|_t|_dS(N(RRR!R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp s cCsc|jd|_|jtjkrItjd|jdt|_dStj|jg|_dS(sSet the correct tagis"div class="vspace" style="height: s;"N( RRRZR_R$R(RRR/(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs #(RRRRpR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s tAligncBs eZdZdZdZRS(sBit of aligned textcCs%t|_tjt|_dS(N(RRR$R)RR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp s cCsd|jdd|j_dS(Ns div class="iR{(RRR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRRpR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs tNewlinecBs eZdZdZdZRS(s A newlinecCst|_t|_dS(N(RRR!R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps cCsdg|_dS(sProcess contentss
N(R/(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRRpR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs tNewPagecBseZdZdZRS(s A new pagecCsdg|_dS(sProcess contentss


N(R/(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRst SeparatorcBseZdZdZRS(s;A separator string which is not extracted by extracttext().cCs%t|_g|_|g|_dS(N(R!RRR/(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRp's  (RRRRp(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR$st StrikeOutcBseZdZdZRS(sStriken out text.cCsd|j_dS(sSet the output tag to strike.tstrikeN(RR%(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR/s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR,st StartAppendixcBseZdZdZRS(sMark to start an appendix here.cCstjjdS(sDActivate the special numbering scheme for appendices, using letters.N(RURnRl(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR7s(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR3stLinkcBsqeZdZdZdZdZdZdZdZ dZ dZ dddddZ dZ dZdZRS(s&A link to another part of the documentcCs=g|_t|_t|_tjr9tj|_ndS(s.Initialize the link, add target if configured.N(RRRt LinkOutputRRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpKs     cCs^t|g|_|r$||_n|r6||_n|rH||_n|rZ||_n|S(sComplete the link.(RRtanchorRRR(RoRRRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRSs    cCsa|js dSd|_|jjr8d|jj|_n|jjr]|jj|j|_ndS(s8Use the destination link to fill in the destination URL.NRzt#(t destinationRRtpage(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytcomputedestination`s    cCs||_||_dS(sESet another link as destination, and set its destination to this one.N(R(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytsetmutualdestinationjs cCsDd}|jr#|d|j7}n|jr@|d|j7}n|S(s"Return a printable representation.Rs #s to (RR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRos   N(RRRRRRRRRRRRpRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR@s  tURLcBseZdZdZRS(sA clickable URLcCs|j|jd}||_|jd}|rO|j|||_n|jd}|sm|}nt|g|_dS(sRead URL from elyxer.parametersRRRN(RRRRR(RoRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR{s  (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRxstFlexURLcBseZdZdZRS(sA flexible URLcCs|j|_dS(sRead URL from elyxer.contentsN(R&R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRsRcBseZdZdZRS(s#A link pointing to some destinationcCs|jj}|jr!|j}nd|d}|jrP|d|jd7}n|jrf|jn|jr|d|jd7}n|jr|d|jd7}n|jr|d|jd7}nt j |j |S(sGet the HTML code for the links a class="R{s name="s href="s target="s title="( RRRRRRRRRR$R(R(RotlinkRR%((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs         (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRst PostprocessorcBs8eZdZgZdZdZdZdZRS(s,Postprocess a container keeping some contextcCs+ttj||_d|_d|_dS(N(t StageDictRtstagesRRR (Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps cCs8|j|j|j|}|j|_||_|S(s)Postprocess a container and its contents.(t postrecursiveRt postcurrentR (RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt postprocesss   cCst|dsdSt|jdkr,dSt|drK|jsKdSnt}g}x6|jD]+}|j|}|rd|j|qdqdWx9tdD]+}|jd}|r|j|qqW||_dS(s.Postprocess the container contents recursivelyRNiRi(R~RqRRRRRAR(RoRt postprocessorRR#tpostRC((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs$  cCs;|jj|j}|s"|jS|j|j|j|S(sBPostprocess the current element taking into account next and last.(RtgetstageRRR (RoRtstage((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRRRpRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs    RcBs)eZdZdZdZdZRS(s/A dictionary of stages corresponding to classescCsA|j||}tg|D]}|j|f^q|_dS(sGInstantiate an element from elyxer.each class and store as a dictionaryN(t instantiateRtprocessedclasst stagedict(RotclassesRRRo((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpscCsJg|D]}|j|^q}x!|D]}|j||_q)W|S(s-Instantiate an element from elyxer.each class(RRpR(RoRRRoRR#((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs "   cCs$|j|jkrdS|j|jS(s=Get the stage for a given element, if the type is in the dictN(RRR(RoR#((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRRpRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  tLabelcBsVeZdZeZdZdZdZddZ dZ dZ dZ RS( sA label to be referencedcCstj|d|_dS(N(RRpRt lastnumbered(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRps cCs/|jd}|jd|tj|_dS(sProcess a label container.RRN(RRRt lastlayoutR(RoRA((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRsRcCsf||_|j|d|d||tj|<|tjkrbx!tj|D]}||_qLWn|S(s!Create the label for a given key.RR(RARRtnamest Referencet referencesR(RoRRARt reference((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  cCs)|j|}|r%|jr%|jSdS(s8Get the part key for the latest numbered container seen.Rz(RR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt findpartkey scCs:|jr |S|js*|jr&|jSdS|j|jS(s)Get the numbered container for the label.N(RRRRR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs   cCst|dsdSd|jS(s"Return a printable representation.RAs Unnamed labelsLabel (R~RA(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRsN( RRRRRRRRpRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs     RcBsAeZdZeZdZdZdZdZdZ RS(sA reference to a label.tnonecCs|jd|_|jtjkr@d|_tj|j}n$d|_tjd|jd}||_|j|jtj krgtj |j||jkrdS|s"d}n|jj|||_dS(s2Replace a key in the format template with a value.NRz(RR}(RoRARv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR}Qs  cCs d|jS(s"Return a printable representation.s Reference (RA(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRYs( RRRRRRARRR}R(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s    tFormulaCommandcBsfeZdZgZejdZd ZdZ dZ dZ dZ dZ dZdZRS( s A LaTeX command inside a formulaRcCs|jtjS(sFind the current command.(RXRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRfscCs|j|}|j||}|r+|S|jdsI|jdrh|j||}|rh|Sn|jjstjd|ntj d|_ |j t |dS(sParse the command.s\ups\UpsUnknown command sspan class="unknown"N(textractcommandtparsewithcommandRrt parseupgreekR R%RR R$R(RRoRR(RoRxRRtupgreek((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRjs cCs:x3tjD](}||jkr |j|||Sq WdS(s0Parse the command type once we have the command.N(RR#t commandmaptparsecommandtypeR(RoRRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRzscCs<|jj|}|j||j|}|r8|S|S(sParse a given command type.(R Rt setcommandR(RoRRRxRtreturned((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  cCs|jtjs*|jdtjdS|jrC|j|S|jjrytj|j}|jd|Stj|j S(s5Extract the command from elyxer.the current position.sMissing command start NR( RRRR RJt emptycommandRR^R_RU(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs   cCsJd}|js?|j}|r?|j|r?|}q?ntj|S(sqCheck for an empty command: look for command disguised as ending. Special case against '{ \{ \} }' situation.Rz(RWRvRRR(RoRxRR ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs    cCst|dkrdS|jdr6d|d}nF|jdrgd|dd!j|d}ntjd|dS|j||}|rd|_n|S( sParse the Greek \up command..is\ups\is\UpsImpossible upgreek command: NR( RqRRrRtupperRR RR(RoRRxt upcommandR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs" N(RRRR#R2R(RRRRRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR_s      t CommandBitcBsDeZdZdZdZdZdZdZdZRS(s%A formula bit that includes a commandcCs;||_|jr7|j|7_|j|j|_ndS(sSet the command in the bitN(RRRt translated(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  cCsC|jj||jr dS|jj|}|j||S(s)Parse a parameter at the current positionN(R R!RJRRRo(RoRxt parameter((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs   cCsO|jj||jjt|s)dS|jjt|}|j||S(sParse a square bracketN(R R!RRRRRo(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parsesquares  cCs|jj||jjt|sV|jsLtjd|jdS|j Stj |j}|j |j ||j S(sParse a literal bracket.sNo literal parameter found at: N(R R!RRRgRR RRRhRRoRR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  cCs[|jj||jjt|s)dStj|j}|j|j||jS(s!Parse a square bracket literally.N( R R!RRRRRoRR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytparsesquareliterals cCsl|jj||jjt|s=tjd|jdStj|jj |}|j ||S(sParse a text parameter.sNo text parameter for N( R R!RRRR RRRRRo(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs ( RRRRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  t EmptyCommandcBs eZdZejZdZRS(s%An empty command (without parameters)cCst|jg|_dS(s"Parse a command without parametersN(RRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRR2R-RR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs t SpacedCommandcBs eZdZejZdZRS(s<An empty command which should have math spacing in formulas.cCs!td|jdg|_dS(s4Place as contents the command translated and spaced.u N(RRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRR2RERR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs t AlphaCommandcBs eZdZejZdZRS(s8A command without paramters whose result is alphabeticalcCstj||d|_dS(s'Parse the command and set type to alphaRN(RRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRR2R3RR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs tOneParamFunctioncBs/eZdZejZeZdZdZ RS(sA function of one parametercCs3tj|j|_|j||jdS(s#Parse a function with one parameterN(R$R(RRRtsimplifyifpossible(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs cCsD|j|jkr@t|_|j|jg|_t|_ndS(s&Try to simplify to a single character.N(RRR!RR/Rt simplified(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs ( RRRR2RDRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s   tSymbolFunctioncBs)eZdZejZdZdZRS(s>Find a function which is represented by a symbol (like _ or ^)cCs|jtjkS(sFind the symbol(RRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR#scCsL|j|j|j|jtj|j|_|j|dS(sParse the symbolN( RRRkRR$R(RRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR's(RRRR2RFRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  t TextFunctioncBs)eZdZejZdZdZRS(s-A function where parameters are read as text.cCs)tj|j|_|j|dS(sParse a text parameterN(R$R(RRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR3scCs d|_dS(sSet the type to fontRN(R(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR8s(RRRR2RGRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR.s  t LabelFunctioncBs)eZdZejZdZdZRS(sA function that acts as a labelcCs|j||_dS(sParse a literal parameterN(RRA(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRAscCsPd|_tjd|jdd|_|jg|_|jtj|j|jdkr%tjddgStj|jdgS(s$Return the bracket as a single sign.RTRzsspan class="emptydot"sspan class="symbol"(RRR(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs( RRRRpRRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs     tFormulaEquationcBseZdZdZdZRS(sA simple numbered equation.tequationcCs,t|_|j|jjt|dS(sParse the arrayN(R"RRoR RR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs (RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRst FormulaCellcBs eZdZdZdZRS(sAn array cell inside a rowcCs-||_tjd|dt|_|S(Nsspan class="arraycell align-R{(RR$R(RR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt setalignments  cCs@|jj||jr dS|j|jjt|dS(N(R R!RJRoRR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs (RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs t FormulaRowcBs6eZdZejdZdZdZdZRS(sAn array row inside an arrayt cellseparatorcCs%||_tjdt|_|S(Nsspan class="arrayrow"(t alignmentsR$R(RR(RoR ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt setalignmentss cCsd}|j|jdtxS|jsq|j|}|j||j||d7}|j|jqWt|j dkrt |_ ndS(sParse a whole rowiRpiN( RqRRRJt createcellRRoRRqRR R(RoRxR}R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs   cCs3|j|t|j}|jjtj|S(s4Create the cell that corresponds to the given index.(R RqR RRR(RoR}R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s( RRRR2R4RR RR (((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs    tMultiRowFormulacBs2eZdZdZdZdZdZRS(sA formula with multiple rows.cCsrg|_t}xJ|j|D]9}|r4t}n |j|j||j|qWt|j|_dS(s,Parse all rows, finish when no more row endsN( RRt iteraterowsRtaddemptyRtaddrowRqR^(RoRxR*trow((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt parserowss    ccstjd}xktrz|j|t|jjt}|j|jV|j |rs|j |j |7_ qdSqWdS(s0Iterate over all rows, end when no more row endst rowseparatorN( R2R4RRqR RRR R RXRRt(RoRxRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s  cCs|jjtj|j}xSt|jdjD];\}}|j|}|j t d|j |q5W|j |dS(sAdd an empty row.iu N( R RRR R R|RRR RoRR(RoRR}t originalcellR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs #cCs!|jj||j|dS(s2Add a row to the contents and to the list of rows.N(RRRo(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs(RRRRR RR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR s   t FormulaArraycBs&eZdZdZdZdZRS(sAn array within a formulaR4cCs6tjdt|_|j||j|dS(sParse the arraysspan class="array"N(R$R(RRtparsealignmentsR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR's cCsgd|_|j|}|r*||_n|j|}g|_x|D]}|jj|qIWdS(sParse the different alignmentsRN(tvalignRRR R(RoRxRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR-s    (RRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR"s t FormulaMatrixcBseZdZdZdZRS(s'A matrix (array with center alignment).tmatrixcCs>tjdt|_d|_dg|_|j|dS(s(Parse the matrix, set alignments to 'c'.sspan class="array"RN(R$R(RRRR R(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR?s  (RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR:st FormulaCasescBseZdZdZdZRS(sA cases statementtcasescCst|_ddg|_|j|xN|jD]C}x:|jD]/}|jjdt|jjtdqBWq2Wt j |jdt}t t |jdd}|j |g|_dS(sParse the casesRsspan class="case align-l"u sspan class="bracketcases"t{N(R"RR RRR(RRRRRRRqR(RoRxRRR4tbrace((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRKs  (RRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRFstEquationEnvironmentcBseZdZdZRS(s;A \begin{}...\end equation environment with rows and cells.cCstjdt|_|jjdd}|tjkrOtj||_n t j d|jdg|_|j |dS(sParse the whole environment.sspan class="environment"RRzsUnknown equation environment RN( R$R(RRRR}R2R;R RR R(RoRxt environment((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR[s (RRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRXst BeginCommandcBsFeZdZidejd6Zeeee gZ dZ dZ RS(sEA \begin{}...\end command and what it entails (array, cases, aligned)RzRcCs|j|}|j|}tjdd|d}|j||j||j||j|j|7_|j |_ dS(sParse the begin commandtendRt}N( RtfindbitR2R4RqRRoRRtR^(RoRxRRR ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRms   cCs^x<tjD]1}|jdd|jkr |jj|Sq W|jjt}||_|S(s7Find the command bit corresponding to the \begin{piece}RRz(RR#R}RR RR(RoRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR"xs  ( RRRR2R4RRRRRR#RR"(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRfs  tCombiningFunctioncBs#eZejZdZdZRS(cCsd|_|j}|j|}|s>tjd|jnAt|jdkrtjd|jd|jdn|jj t |dS(sParse a combining function.Rs'Empty parameter for combining function isApplying combining function s to invalid string "R{N( RRtparsesingleparameterRR RRqR&RRR(RoRxt combiningR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  )cCs|jj||jr7tjd|jdS|jjt|sa|jjt |rn|j |St |j }|j ||S(s&Parse a parameter, or a single letter.s(Error while parsing single parameter at N(R R!RJRR RRRRRRRRURo(RoRxtletter((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR$s   (RRR2R8RRR$(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR#s  tDecoratingFunctioncBs eZdZejZdZRS(s*A function that decorates some bit of textcCsd|_|j}tj|d|_|j||_tjd|_ |j j d|jtjd|j_ |j dS(sParse a decorating functionRsspan class="symbolover"sspan class="withsymbol"isspan class="undersymbol"N( RRRRRRRR$R(RRRR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  (RRRR2R:RR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR's t LimitCommandcBs eZdZejZdZRS(s@A command which accepts limits above and below, in display mode.cCs^t|jj}tjd|_x-|D]%}|jjtj |dq1WdS(sParse a limit command.sspan class="limits"sspan class="limit"N( RRRR$R(RRRRR(RoRxRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs (RRRR2R@RR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR(s tLimitPreviousCommandcBs&eZdZdZdZdZRS(s(A command to limit the previous command.cCs)tjd|_|jj|dS(s Do nothing.sspan class="limits"N(R$R(RR R!(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCsdS(s"Return a printable representation.sLimit previous command((Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRsN(RRRRRRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR)s tLimitsProcessorcBs_eZdZdZdZdZdZdZdZdZ dZ d Z RS( s)A processor for limits inside an element.cCsqtjr dS|j||r2|j||n|j||rm|j||drm|j||ndS(s"Process the limits for an element.Ni(RRt checklimitst modifylimitst checkscriptt modifyscripts(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  (cCsetjs tS|j||dtr:|j||tSt||tsQtS|j||dS(s3Check if the current position has a limits command.i( RRRt checkcommandR)t limitsaheadRR(R-(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR+s cCs3||dj||jt||_dS(s,Limit the current element based on the next.iN(RoRR R(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR0scCs||}|j||d}|jj||j||dr_|j||d}ntjdd}|jjd|dS(sCModify a limits commands so that the limits appear above and below.iu ssup class="limit"iN(tgetlimitRRR-RRR(RoRR}tlimitedt subscriptt superscript((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR,s cCs4|j||}|jjjdd|j_|S(s#Get the limit for a limits command.tscriptR(t getscriptRR%R}(RoRR}R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR1scCsS|j||}|j||}tj||gd}|j||dS(s=Modify the super- and subscript to appear vertically aligned.sspan class="scripts"N(R6RRR(RoRR}R3R4tscripts((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR.scCs|j||tS(s6Check if the current element is a sub- or superscript.(R/R(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR-scCs't||krtSt|||S(s0Check for the given type as the current element.(RqRR(RoRR}R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR/scCs'||}|jjd7_||=|S(sGet the sub- or superscript.s class="script"(RR%(RoRR}R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR6 s ( RRRRR+R0R,R1R.R-R/R6(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR*s     tBracketCommandcBs)eZdZejZdZdZRS(s"A command which defines a bracket.cCstj||dS(sParse the bracket.N(RR(RoRx((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs,||_d||_t|g|_|S(s+Create the bracket for the given character.s\(RRRR(RoRt character((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs  (RRRR2R7RRR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR8s  tBracketProcessorcBsVeZdZdZdZdZdZdZdZdZ dZ RS( s!A processor for bracket commands.cCs3tjr dS|j||r/|j||SdS(s6Convert the bracket using Unicode pieces, if possible.N(RRt checkleftt processleft(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR$s cCsa|j||d}|s dS|j|||}|j||||j|||dS(sProcess a left bracket.iN(t findrighttfindmaxtresize(RoRR}t rightindexR^((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR<+s cCs|j||dS(s0Check if the command at the given index is left.s\left(tcheckdirection(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR;4scCs|j||dS(s1Check if the command at the given index is right.s\right(RA(RoRR}((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyt checkright8scCs t|tstS|j|kS(s6Check if the given bit is the desired bracket command.(RR8RR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRA<scCs{d}xn|t|krv|j||r:|d7}n|j||rY|d8}n|dkri|S|d7}q WdS(s9Find the right bracket starting at the given index, or 0.iiN(RqR;RBR(RoRR}tdepth((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR=Bs   cCs-|||!}tg|D]}|j^qS(s@Find the max size of the contents between the two given indices.(RR^(RoRt leftindexR@tslicedR#((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR>Os cCsR|j}|jjdd}t|||}t|_|j|_dS(s+Resize a bracket command to the given size.s\RzN(R&RR}RR"RRR(RoRR^R9RR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR?Ts   ( RRRRR<R;RBRAR=R>R?(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR:!s     tParameterDefinitioncBs>eZdZd d gZdZdZdZdZRS( s3The definition of a parameter in a hybrid function.t[R~RR!cCs1d|_t|_t|_d|_d|_dS(N(RRRRRpRvt literalvalue(Ro((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRpps     cCsxtjD]\}}|j|r |dkr=t|_n|jdsktjd|jddS|j |_ |jdrt|_ n|j|stjd|j dS|Sq Wtjd|j dS( s2Parse a parameter definition: [$0], {$x}, {$1!}...RGRs$Wrong parameter name, did you mean $t?t!sWrong parameter closing s'Wrong character in parameter template: N( RFt parambracketsRRRpRR RRRURR(RoRxtopeningtclosing((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRws    cCs|jrZ|jr'|j||_n|j||_|jrt|j|_qn0|jrx|j||_n|j||_dS(s/Read the parameter itself using the definition.N( RRpRRHRRRvRR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytreads    cCs>d|j}|jr0|dt|j7}n |d7}|S(s"Return a printable representation.sparam s: s (empty)(RRvR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs    (RGR~(RR!(RRRRKRpRRNR(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRFgs     tParameterFunctioncBs;eZdZdZdZdZdZdZRS(sFA function with a variable number of parameters defined in a template.cCsNt|_x;|j|D]*}|j||||jd|jtj|}|r|VqqWdS(s*Read each param definition in the templateN(RRJRFR(RoRRRxRS((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRQs  cCs||jkrdS|j|S(sGet a parameter as parsed.N(RPR(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgetparamscCs|j|jS(sGet the value of a parameter.(RURv(RoR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRNscCs+|j|}| s |j r$dS|jS(s%Get the literal value of a parameter.N(RURHR(RoRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pytgetliteralvalues(RRRRTRQRURNRV(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyROs     tHybridFunctioncBs_eZdZejZdZdZdZdZ dZ dZ dZ dZ RS( s A parameter function where the output is also defined using a template. The template can use a number of functions; each function has an associated tag. Example: [f0{$1},span class="fbox"] defines a function f0 which corresponds to a span of class fbox, yielding $1. Literal parameters can be used in tags definitions: [f0{$1},span style="color: $p;"] yields $1, where $p is a literal parameter. Sizes can be specified in hybridsizes, e.g. adding parameter sizes. By default the resulting size is the max of all arguments. Sizes are used to generate the right parameters. A function followed by a single / is output as a self-closing XHTML tag: [f0/,hr] will generate
. cCsJ|jd}|jd}|j|||j||_|jdS(s*Parse a function with [] and {} parametersiiN(RRTt writeparamsRtcomputehybridsize(RoRxRRt writetemplate((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRs   cCs|jt|S(s*Write all params according to the template(twriteposR(RoRZ((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRXscCsg}x|js|jdrL|j|}|r|j|qq |jdr|j|}|rd|_|j|qq |jdr|j|jddq |jdr|j|jddq |jt|j q W|S(s/Write all params as read in the parse position.Rtft(tleftRtrightN( RJRt writeparamRt writefunctionRRt writebracketRRU(RoRxRRR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR[s" cCs~d|j}||jkr4tjd|dS|j|sEdS|jdrp|j|j|j_n|j|jS(s*Write a single param of the form $0, $x...RsUnknown parameter RTN( RURPRR RRR_RvR(RoRxR((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR`s cCs|j|}|sdS|jdr8tj|S|jdsXtjddS|jd|j|}|j t |dkrdStj ||S(s"Write a single function f0,...,fn.t/Rs Function should be defined in {}R!iN( treadtagRRRRRR RqR[RtRqR(RoRxR%R((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRas   cCs%|jjs-tjd|jd St|j}d|t|jkrwtjdt |dd S|jd|}d|kr|Sx|j D]{}||kr|j |}|j stjd|d|dqn|j r|j }nd }|j ||}qqW|S( sJGet the tag corresponding to the given index. Does parameter substitution.sFunction should be f0,...,f9: fis Function fs is not definedRsParameters in tag s should be literal: {s!}RzN(RR`RR RRRURqRRRPRRHR}(RoRxR}R%tvariableRRv((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRds*      cCs|jjtj||S(s4Return a new bracket looking at the given direction.(R RR8(RoRR9((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRb1scCsY|jtjkr |jdStj||_x|jD]}|j|_q?WdS(s(Compute the size of the hybrid function.N(Rt HybridSizet configsizesRtgetsizeR^R(RoR#((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRY5s  (RRRR2R=RRRXR[R`RaRdRbRY(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRWs       RfcBs eZdZejZdZRS(s+The size associated with a hybrid function.cCs|j|j}xN|jD]C}||kr|j|jj}|j|t|}qqWd|krtjd|dSt |S(s*Read the size for a function and parse it.Rs%Unconverted variable in hybrid size: i( RgRRPRvRR}RRR teval(RoRt sizestringRR^((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRhDs  (RRRR2R>RgRh(((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRf?s t HeaderParsercBs2eZdZdZdZdZdZRS(sParses the LyX headercs3gjfdjS(s?Parse header parameters into a dictionary, return the preamble.csjS(N(t parseline((RRRo(sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRas(R R(RoR((RRRosG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyR^s cCs|j}|jtjdr3|j|dS|jtjdr]tj|dS|jtjdr|j|jj |dS|j |dS(s0Parse a single line as a parameter or as a starttbranchNtlstsett beginpreamble( RRrRLRMt parsebrancht LstParsert parselstsetRR R R(RoRRR3((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRlfs  cCs|jjd}|jtjtjd}|j|t|}x(|jD]}|j ||j|q\W|t j |tjj|_|jd}|jj|j|dS(s-Parse some lstparams from elyxer.a container.t lstparamsN(RqR{RR~RtupdateRz(RoRt paramlist((sG/usr/local/lib/python2.7/site-packages/docutils/utils/math/math2html.pyRscCs{t}xk|D]c}d|krQt|jdkrstjd|qsq|jdd\}}|||sR 2  K~  #(!C -M#     B  D(v?8#> 2 "h,   F 8k K 6 Yn         8/1?U;    B +  F<:$z *./X