V!\c@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_de7fdYZ`de3fdYZade2fdYZbde2fdYZcde2fdYZdde2fdYZedeefdYZfde2fdYZgde7fdYZhde3fdYZide2fdYZjdejfdYZkdekfdYZlde"fdYZmdefdYZndefdYZodejfdYZpdejfdYZqde;fdYZrderfdYZsdesfdYZtdesfdYZudetfdYZvdesfdYZwdesfdYZxdesfdYZydesfdYZzdewfdYZ{eIj|erexg7_|evetewe{ezeyeuger_|defdYZ}de}fdYZ~desfdYZderfdYZderfdYZdesfdYZdefdYZdefdYZdefdYZdefdYZdesfdYZerj|eg7_|ddlZdewfdYZdewfdYZdetfdYZdefdYZdeEfdYZdewfdYZdeEfdYZdetfd YZerj|eeeeg7_|eFjeeg7_d efd YZd esfd YZdefdYZdefdYZerj|eg7_|defdYZdefdYZdefdYZdesfdYZde;fdYZdesfdYZdeGfdYZeIj|eg7_|erj|eg7_|d Zd!Zed"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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytdebug%scCsFtjr dStjr/tjr/tj|}ntj|tjdS(sShow a trace messageN(RRtprefixt showlinesmodeRRR(RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR+s  cCsCd|}tjr,tjr,tj|}ntj|tjdS(sShow an error messages* N(RR R RRtstderr(RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyterror3s cCstjd|tddS(s#Show an error message and terminatesFATAL: iN(RR texit(RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytfatal:scCs6tjdkr!|jd}n|j|ddS(sShow a message out of a channeliisutf-8s N(ii(Rt version_infotencodetwrite(RRtchannel((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR?sN(t__name__t __module__t__doc__tFalseRRR tNoneR RRR RRt classmethod(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs         tBibStylesConfigcBskeZdZidd6dd6dd6Zidd6dd6d d6Zid d6d d 6d d6d d6Zidd6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d6dd6Zid#d$6d%d&6d%d'6Zid(d6d)d 6d"d6d*d6Zid+d6d,d 6d-d6d.d6d"d6d/d6Z id0d6d1d 6d"d6d2d6Z RS(3s+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 @incollectionug$authors: “$title”, $booktitle,{ pp. $pages,} $year.{ URL $url.}{ $note.}u@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(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRRsd      t BibTeXConfigcBs"eZdZidd6dd6ZRS(s+Configuration class from elyxer.config fileu—u--u.u..(RRRtreplaced(((sA/tmp/pip-install-usGedi/docutils/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@dA6ddB6ddC6Zid%d)6dDdE6dDdF6ddG6dHdI6ddJ6ddK6dd6dDdL6dDdM6dDdN6dOdA6dDdP6ddQ6dRdS6dTdU6dVdW6d-dX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dwdy6dzd{6d|d}6d~d6dd6d/d6dd6dd6dd6dd6dYd6d[d6d]d6d]d6d]d6d]d6d_d6dd6ded6dkd6dmd6dcd6did6dmd6dod6d_d6dmd6dwd6dd6dd6dd6dRd6dd6dd6dd6dd6dd6dd6dd6dd6dd6ddC6dd6dd6dd6dd6dd6dd6dd6dd6dd6d+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(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR+#s$& t FormulaConfigcBseZdZiIdd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d%d-6d.d/6d0d16d0d26d3d46d5d66d5d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6dd6dJd6dd6dd6dd6dd6dd6dd6Zidd6dd6dd6dd6Zidddgd6dddgd6dddgd6dddgd6ddddgd6dgd6ddddgd6dgd6Ziddgd6ddgd6Zidd6dd6dd6dd6dd6Zidd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6ZiRdd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6dhd;6d<d=6d>d?6d@dA6dBdC6dDdE6djdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6dld[6d\d]6dnd^6dpd_6d`da6drdb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dtdw6dxdy6dzd{6d|d}6d~d6dvd6dd6dd6dxd6dd6dd6dd6dd6dzd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6ded6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96dd:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6ddG6dHdI6dJdK6dLdM6dNdO6dPdQ6dPdR6dSdT6dUdV6dWdX6dYdZ6dYd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6d'dh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d1d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d0d26dd6dd6dd6dd6dd6dd6d5d76dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dyd6dd6dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6ddY6dZd[6d\d]6d^d_6dd`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dGd6dGd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dGd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d1d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d 6d d 6d d6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6dd%6dd&6dd'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d:d>6d<d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6dbdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6did6dd6dd6dd6dd6dyd6dd6dd6d1d6dd6dd6dd6dd6dd6dd6dd6d"d6d4d6dud6dd6dd6dd6dd6dd6dd6dd6d/d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d 6d d 6d{d 6dd6did6dd6dd6dd6dd6dd6dd6dd6dd6dwd6dd6d d!6d"d#6dd$6dd%6d&d'6d(d)6d*d+6d,d-6dd.6dd/6dd06Z iZ idMd6dSd6did16Z idd26d3d46dd56d6d76dd86Z id9d:gd;6d9d<d:gd=6d:d:gd>6Z i:d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6d?dk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6dd6dd6dd6d<d6dmd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dld6dnd6dpd6drd6dtd6dvd6dxd6dzd6d|d6dd6dd6Zi,dddgd6dddgd6dddgd6dddddgd6dddgd6ddddddgd6dddgd6dddgd6dddddgd6ddddddgd6dddgd6dddgd6dddgd6dddgd6dddgd6dddgd6dddgd6ddddddgd6dddgd6dddgd6dddgd6dddgd6dddgd6dddgd6dddgd6dddgd6ddddddgd6dddgd6dddgd6ddgd6dddgd6dddgd6dddgd6dddddddgd6dddddgd6dddddgd 6dddgd 6ddd gd 6dddgd 6dddgd6dddddgd6dddgd6dddgd6dddgd6Zidd6dd6dd6dd6dd6dd 6Zidd 6Zid!d"6d#d$6d%d&6d'd(6dd)6dd*6d+d,6d-d.6dd/6d0d16dd26d3d46d5d66d7d86d9d:6d;d<6d=d>6Zid?d@6dAdB6dAdC6dDdE6dFdG6dFdH6dIdJ6ZiddK6dd6dd6dLd6ddM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXd6dYdZ6d[d6dd\6dd6Zidd]6d^d_6d`d6dadb6ddc6ddde6ddf6ddg6dhdi6djdk6dldm6dndo6dpdq6drds6dldt6dudv6dwdx6dldy6Zidzd{6dud|6d}d~6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d8d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d4d6d!d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd 6dd 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46dd56dd66dd76dd86dd96dd:6d;d<6d=d>6d?d@6dAdB6dCdD6ddE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6ddR6dSdT6d4dU6dVdW6dXdY6dZd[6d\d]6dd^6d_d`6dda6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6d4dz6d{d|6d}d~6dd6d/d6d0d6Zi dd6dd6dd26dd6dd6dd46dd6dd86dd6Ziddi6dd6Zi dd6dd6d?d6dd6dd6dd6dd6dd6dd6dd6dd6dd6Ziddd1dddddddddudg d6Zidd6ZRS(s+Configuration class from elyxer.config fileuÅu\AAuÆu\AEu#AmSu\AmSuÅu \AngstroemuÐu\DHuϞu\KoppauŁu\Luµu\MicrouØu\OuŒu\OEuϠu\SampiuϚu\StigmauÞu\THuåu\aauæu\aeuαu\alphauβu\betauδu\deltauðu\dhuϝu\digammauϵu\epsilonuηu\etau\ethuγu\gammauıu\iu\imathuιu\iotauȷu\ju\jmathuκu\kappauϟu\koppaułu\luλu\lambdauμu\muuνu\nuuøu\ouœu\oeuωu\omegauφu\phiuπu\piuψu\psiuρu\rhouϡu\sampiuσu\sigmaußu\ssuϛu\stigmauτu\tauuΩu\tcohmuħ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\varbetauε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\ACu⍝u \APLcommentu⍗u\APLdownarrowboxu⍞u \APLinputu⌹u\APLinvu⍇u\APLleftarrowboxu⍟u\APLlogu⍈u\APLrightarrowboxu⍐u\APLuparrowboxu□u\Boxu≎u\Bumpequ●u\CIRCLEu⋒u\Capuⅅu\CapitalDifferentialDu☑u \CheckedBoxu○u\Circleu⩴u \Coloneqquⅈu \ComplexIuⅉu \ComplexJu≙u \Correspondsu⋓u\CupuΔu\Deltau◇u\Diamondu◆u \Diamondblacku⟐u \Diamonddotuⅆu\DifferentialDu⇓u \Downarrowu€u\EURuℇu\Euleruⅇu \ExponetialEuℲu\Finvu⅁u\Gameu\Gammauℑu\Imu⨝u\Joinu◖u \LEFTCIRCLEu◐u \LEFTcircleu◀u\LHDu\Lambdau⟅u\Lbagu⇐u \Leftarrowu⇚u \Lleftarrowu⟸u\Longleftarrowu⟺u\Longleftrightarrowu⟹u\Longrightarrowu⦅u\Lparenu↰u\Lshu⇐|u \Mapsfromu|⇒u\Mapstou\Omegau¶u\Pu\Phiu\PiuPru\Pru\PsiuϘu\Qoppau▶u\RHDu◗u \RIGHTCIRCLEu◑u \RIGHTcircleu⟆u\Rbaguℜu\Reu⦆u\Rparenu⇛u \Rrightarrowu↱u\Rshu§u\Su\Sigmau☐u\Squareu⋐u\Subsetu☉u\Sunu⋑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\anchoru∠u\angleu♒u \aquariusuarccosu\arccosuarcsinu\arcsinuarctanu\arctanuargu\argu♈u\ariesu➢u \arrowbulletu∗u\astu≍u\asympu∍u \backepsilonu‵u \backprimeu⋍u \backsimequ\u \backslashu✗u\ballotxu⊼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 \biohazardu⧫u \blacklozengeu☻u \blacksmileyu■u \blacksquareu▲u\blacktriangleu▼u\blacktriangledownu◂u\blacktriangleleftu\blacktrianglerightu▴u\blacktriangleupu⊥u\botu⋈u\bowtieu▫u\boxu⧆u\boxastu◫u\boxbaru⧈u\boxboxu⧅u \boxbslashu⧇u \boxcircleu⊡u\boxdotu⊟u \boxminusu⊞u\boxplusu⧄u \boxslashu⊠u \boxtimesu•u\bulletu≏u\bumpequ♋u\canceru\capu♑u \capricornusu⁀u\catu⋅u\cdotu⋯u\cdotsu¢u\centu∙u \centerdotu✓u \checkmarkuχu\chiu∘u\circu≗u\circequ↺u\circlearrowleftu↻u\circlearrowrightu®u \circledRu⊛u \circledastu⦸u\circledbslashu⊚u \circledcircu⊝u \circleddashu⧁u \circledgtru⧀u \circledlessu♣u \clubsuitu: u\colonu≔u \coloneqqu∁u \complementu≅u\congu\coprodu©u \copyrightucosu\cosucoshu\coshucotu\cotucothu\cothucscu\cscu\cupu⋎u \curlyveeu⋏u \curlywedgeu↶u\curvearrowleftu↷u\curvearrowrightu†u\dagu\daggeruℸu\dalethu⇠u\dashleftarrowu⊣u\dashvu‡u\ddagu\ddaggeru⋱u\ddotsudegu\degudetu\detu╲u \diagdownu╱u\diagupu⌀u \diameteru\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\dsubu♁u\earthu♪u \eighthnoteuℓu\ellu∅u \emptysetu≖u\eqcircu≕u\eqcolonu≂u\eqsimu\eurou∃u\existsuexpu\expu≒u\fallingdotsequ⨾u\fcmpu♀u\femaleu♭u\flatu∀u\forallu⁗u\fourthu⌢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 \intercalu⫴u \interleaveu⅋u\invampu⌐u\invnegu♃u\jupiterukeru\keru\landu"u \landupintu⟪u\langu⟨u\langleu⦉u\lblotu\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\lgroupu⊲u\lhdu♎u\librau↯u \lightningu⦇u\limguliminfu\liminfulimsupu\limsupu≪u\llu⟦u \llbracketu⌞u \llcorneru⋘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 \lrcorneru⋉u\ltimesu\lyxlocku♂u\maleu✠u\malteseu↤u \mapsfromu↦u\mapstou^u\mathcircumflexumaxu\maxu∡u\measuredangleu⚫u \medbulletu⚪u\medcircu☿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✎u\pencilu\perpu♓u\piscesu⋔u \pitchforku♇u\plutou±u\pmu➪u\pointeru☞u \pointrightu£u\poundsu≺u\precu≼u \preccurlyequ\precequ≾u\precsimu′u\primeu∝u\promptouϙu\qoppau u\qquadu\quadu♩u \quarternoteu☢u \radiationu⟫u\rangu⟩u\rangleu⦊u\rblotu\rbraceu\rbrace)u\rbracku⌉u\rceilu♻u\recycleu⌋u\rflooru⟯u\rgroupu⊳u\rhdu∟u \rightangleu→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\rimgu≓u \risingdotsequ⟧u \rrbracketu⩥u\rsubu⋊u\rtimesu♐u \sagittariusu♄u\saturnu♏u\scorpiou↘u\searrowusecu\secu″u\secondu∖u \setminusu♯u\sharpu≃u\simequsinu\sinusinhu\sinhu♬u\sixteenthnoteu☠u\skullu∕u\slashu\smallsetminusu▿u\smalltriangledownu◃u\smalltriangleleftu▹u\smalltrianglerightu▵u\smalltriangleupu⌣u\smileu☺u\smileyu♠u \spadesuitu¨u\spddotu\sphatu∢u\sphericalangleu⦁u\spotu~u\sptildeu⊓u\sqcapu\sqcupu⊏u \sqsubsetu⊑u \sqsubsetequ⊐u \sqsupsetu⊒u \sqsupsetequ\squareu⫽u\sslashu⋆u\staru☕u \steamingu⫅u \subseteqqu⫋u \subsetneqqu≻u\succu≽u \succcurlyequ\succequ⋩u \succnsimu≿u\succsimu☼u\sunusupu\supu⫆u \supseteqqu⫌u \supsetneqqu√u\surdu↙u\swarrowu⚔u\swordsu⫾u \talloblongutanu\tanutanhu\tanhu♉u\taurusu\textasciicircumu\textasciitildeu\textbackslashu©'u\textcopyrightu°u \textdegreeu \textellipsisu—u \textemdashu \textendashu \texteurou>u \textgreateru## 0-  ####   *#  1t GeneralConfigcBs)eZdZidd6dd6dd6ZRS(s+Configuration class from elyxer.config fileu 2015-02-26udateu413u lyxformatu1.2.5unumber(RRRtversion(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRIst 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(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRKs t ImageConfigcBs^eZdZidd6dd6dd6Zidd6d d 6dd 6Zid d 6ddgd6ZRS(s+Configuration class from elyxer.config fileuOconvert[ -density $scale][ -define $format:use-cropbox=true] "$input" "$output"u imagemagicku(inkscape "$input" --export-png="$output"uinkscapeulyx -C "$input" "$output"ulyxupsu.epsupdfu.pdfu.psu.pngudefaultu.svguvector(RRRt converterstcropboxformatstformats(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRN2s t LayoutConfigc Bs?eZdZiddddddddd d d d g d 6ZRS(s+Configuration class from elyxer.config fileuStringContaineruConstantu TaggedTextuAlignu TextFamilyu EmphaticTextuVersalitasTextu BarredTextuSizeTextu ColorTextuLangLineuFormulauallowed(RRRt groupable(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRRDstNewfangleConfigcBs7eZdZidd6dd6dd6dd6d d 6ZRS( s+Configuration class from elyxer.config fileu chunkref{uchunkrefu}u endcommandu>uendmarku\u startcommandu=<u startmark(RRRt constants(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRTLstNumberingConfigc 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(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRVTs 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(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRYas.###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(((sA/tmp/pip-install-usGedi/docutils/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-6Z id.d/6d.d06d1d26Z RS(3s+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 GreyedoutuNoteusubu subscriptusupu superscriptuiuitalicuslanteduspan class="versalitas"u smallcaps( RRRtbarredtfamilytflextgroupRWt listitemstnotestscripttshaped(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRbs0 tTranslationConfigcBsUeZdZi$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?6Zi d@dA6d@dB6dCdD6dEdF6d@dG6dHdI6dCdJ6dKdL6dMdN6ZRS(Os+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-foruUpuupuenuamericanubritishudeudeutschunludutchuenglishufrufrenchungermanuruurussianuesuspanish(RRRRUt languages(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRks.tCommandLineParsercBs;eZdZdZdZdZdZdZRS(sA parser for runtime optionscCs ||_dS(N(toptions(tselfRn((sA/tmp/pip-install-usGedi/docutils/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(Rotargstkeytvalue((sA/tmp/pip-install-usGedi/docutils/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|dj d}|d=t|t r%|j|||fS||fS( s$Read the key and value for an optioniit=t-tt"sutf-8N(t readequalskeytreplacethasattrRnRtgetattrt isinstancetbooltTrueRqRrt readquotedtdecodetlisttappend(RoRutargRvtcurrenttinitialRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRss,       cCstjd|d}xlt|dkr|djd r|djd rtjd|d|d|d7}|d=qWt|dks|djdrd S|d|dd!7}|S( sRead a value between quotestOopsiiR|s--s Appending t iN(RR RqtendswithRrR(RoRuRRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  = %cCs:|jdd}|d}|d}|jd||S(sRead a key using equalsRyii(tsplittinsert(RoRRuRRvRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR}s   (RRRRpRxRsRR}(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRms    tOptionscBseZdZd Zd ZeZeZeZ eZ eZ eZ eZ eZeZeZeZeZgZdZd Zd Zd ZeZdZd Zd ZeZd Zd ZeZ eZ!eZ"dZ#eZ$d Z%d Z&eZ'eZ(d Z)eZ*eZ+eZ,eZ-eZ.eZ/eZ0eZ1eZ2eZ3d Z4d Z5eZ6eZ7gZ8e9Z:dZ;dZ<dZ=dZ>dZ?dZ@d ZAd ZBd ZCRS( sA set of runtime optionsR{t imagemagickcCs]|dt_|d=tt}|j|}|rOtj||jn|jdS(sParse command line optionsiN(RtlocationRmRxRR tusagetprocessoptions(RoRutparsertresult((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRx`s    cCs?tjr|jntjr,|jntjrB|jntjrX|jntj rn|j ntj ry?t tj t_ tj dkrt jd|jnWqt jdtj |jqXntjstjstjrtt_n|jtjr4tj r4tjt_ntjdkrOtt_ntjgkrmdgt_ntjdkrntjrtt_ntjrtj rt jdtjt_ntjrt jdntjrt jd nxCt t D]5}|j!d rt"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.cssR{s7Option --toc is deprecated; use --tocfor "page" insteads5Option --nocopy is deprecated; it is no longer neededs4Option --jsmath is deprecated; use --mathjax insteadtmodeiN($RthelpRRJt showversiont hardversiontshowhardversiont versiondatetshowversiondatet lyxformatt showlyxformatt splitparttintRR tlowmemttocttocforRtmemorytparsefootnotest forceformatt imageformatRt copyimagestcsstfaviconR/t simplematht toctargettnocopytjsmathtdirRRtR(Rotparam((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRksT                    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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs $   cCstjs dStt_tt_tt_tjjd}xK|D]C}|d}tt|rstt|t qAt j d|qAWtj rtj rtj rt t_ntj rtj rt t_ndS(sParse footnotes options.Nt,tfootsUnknown footnotes option: (Rt footnotesRt marginfoott letterfoott hoverfootRRRtRRR tendfoott numberfoott symbolfoot(RoRntoptiont footoption((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs       cCstjdtjdtjdtjdtjdtjdtjdtjdtjd tjd tjd tjd tjd tjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjd tjd!tjd"tjd#tjd$tjd%tjd&tjd'tjd(tjd)tjd*tjd+tjd,tjd-tjd.tjd/tjd0tjd1tjd2tjd3tjd4tjd5S(6sShow all possible optionss Common options:s1 --help: show this online helps9 --quiet: disables all runtime messagesR{s 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 filesH --embedcss "file.css": embed styles from a CSS file into the outputsG --favicon "icon.ico": insert the specified favicon in the header.sH --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.sE --mathjax remote: use MathJax remotely to display equationssO --mathjax "URL": use MathJax from 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 compatibilitysN --jsmath "URL": use jsMath from the given URL to display equationsN(RR RR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRsj                                                    cCsEdtjd}|dtjdd7}tj|tjdS(s(Return the current eLyXer version stringseLyXer version tnumbers (tdatet)N(RIRJRR RR (RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs cCs"tjtjdtjdS(sReturn just the version stringRN(RRRIRJRR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs"tjtjdtjdS(sReturn just the version dteRN(RRRIRJRR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs"tjtjdtjdS(s#Return just the lyxformat parameterRN(RRRIRJRR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRsN(DRRRRtinstanceRRRt copyrightRtquietRJRRR/RRt showlinestunicodeR0RRttitlet directoryt destdirectoryRRRRRttargetRRRtnobibt convertertrawRtmathjaxtnofooterRttemplatet noconvertt notoclabelsRRRRRRtsupfoott alignfootRRRt googlechartstembedcsstdicttbranchesRxRRRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR&s|  .   8   t BranchOptionscBs2eZdZdZdZdZdZRS(sA set of options for a branchcCs||_idd6|_dS(Ns#fffffftcolor(tnameRn(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps cCsU|jtjds+tjd|dS|jtjdd}||j|Iscs|jjjkS(N(RRR(R(Ro(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRJscsj|S(N(tprocess(R(RRo(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRKs(trecursivesearch(Rot containertlocatet recursiveR((RRosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytextractFs 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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyROs  cCs1tj|}|j|_|j||_|S(sFReturn a new container with contents only in a safe list, recursively.(RRtoutputRtcontents(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRYs (RRRRpRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR8s  tParsercBsMeZdZdZdZdZdZdZdZdZ RS(sA generic parsercCsd|_t|_dS(Ni(tbeginRRL(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRphs cCs,|jj}|j|j|_|S(sParse the header(t currentlineRtnextlinet linenumberR(Rotreadertheader((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt parseheaderls  cCs|jjjdrA|j|\}}||j|t>sXML parameter s should be <...>iiisEmpty XML parameter <>RysErroneous attribute for s: s="0"R|N(NN( RRRRRR RRqRR( RoRRRRvtattrstattrtpartstattrkeyRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs,         cCsN|js$tjdt|dSx#|jj|jsI|q'WdS(s'Parse until the current ending is foundsNo ending for N(tendingRR RRRr(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt parseendings  cCs8|jj|}|r4|j|_|j|ndS(N(tfactorytcreatecontainertparentR(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytparsecontainers cCs|jjdt|jdS(sReturn a descriptions (R(RRRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs( RRRRpRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRes      t LoneCommandcBseZdZdZRS(s"A parser for just one command linecCsgS(s Read nothing((RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytparses(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst TextParsercBs/eZdZgZdZdZdZRS(s(A parser for a command and a bit of textcCsQtj|d|_|jjtjkrDtj|jj|_ng|_dS(N(RRpRRRRR$R%(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps   cCsmtjj|jtjtjdtjd|jg|_g}x#|j|sh|j||qFW|S(s$Parse lines as long as they are texttLayouttInset(RtstackRRR$R%tisendingR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCsv|jj}t|dkr(tS|d|jkrr|dtjkretjj|dn gt_tStS(sCheck if text is endingi( RRRqRR%RRtremoveR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs (RRRRRpRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs   tExcludingParsercBseZdZdZRS(s%A parser that excludes the final linecs)gjfdS(s5Parse everything up to (and excluding) the final linecsjS(N(R((RRRo(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(R(RoR((RRRosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst BoundedParsercBseZdZdZRS(sA parser bound by a final linecCs tj||}|j|S(s*Parse everything, including the final line(RRR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst BoundedDummycBseZdZdZRS(s&A bound parser that ignores everythingcs'|jfdjgS(s#Parse the contents of the containercs jS(N(R((R(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RR(RoR((RsA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst StringParsercBs eZdZdZdZRS(sParses just a stringcCs|jd|_gS(sDo nothing, just take notei(RR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs|j}|j|S(sParse a single line(RR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs t InsetParsercBseZdZdZRS(sParses a LyX insetcCsYtjd}x9|jdkrH|jj| rH|j|qWtj||S(s(Parse inset parameters into a dictionaryRR{(R$R)RRrRRR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s +(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR stContainerOutputcBs eZdZdZdZRS(s(The generic HTML output for a container.cCstjdt|dS(sShow an error.sgethtml() not implemented for N(RR R(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgethtmlscCstS(s5Decide if the output is empty: by default, not empty.(R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytisemptys(RRRR"R#(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR!s t EmptyOutputcBseZdZdZRS(cCsgS(sReturn empty HTML code.((RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR"#scCstS(s"This output is particularly empty.(R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR#'s(RRR"R#(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR$!s t FixedOutputcBseZdZdZRS(s Fixed outputcCs|jS(sReturn constant HTML code(R/(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR".s(RRRR"(((sA/tmp/pip-install-usGedi/docutils/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 codeR"s No html in s: N( RRRRR RRRR"(RoRR/telement((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR"5s%(RRRR"(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR&2st 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+((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytsettagHs    cCs ||_|S(sSet the value for breaklines.(R*(RoR*((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt setbreaklinesQs cCs[|jr|j|gS|j|g}|tj||7}|j|j||S(sReturn the HTML code.(R+t selfclosingtopenR&R"Rtclose(RoRR/((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR"Vs  cCs6|jsdSd|jd}|jr2|dS|S(sGet opening line.R{RR s (tchecktagR)R*(RoRR/((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR/_s   cCsD|jsdSd|jjdd}|jr@d|dS|S(sGet closing line.R{ss (R1R)R*(RoRR.((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR.qs   cCs;|js$tjdtttS|jdkr7tStS(sCheck that the tag is valid.s No tag in R{(R)RR RRRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR1zs  N(RRRRR)RR*R+R,R-R"R/R0R.R1(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR(As  tFilteredOutputcBs2eZdZdZdZdZdZRS(s1Returns the output in the contents, but filtered:cCs g|_dS(sInitialize the filters.N(tfilters(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpscCs|jj||fdS(s:Add a new filter: replace the original by the replacement.N(R3R(RoRt replacement((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt addfilterscCsCg}tj||}x$|D]}|j|j|qW|S(sReturn the HTML code(R&R"Rtfilter(RoRRR/tline((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR"s  cCs?x8|jD]-\}}||kr |j||}q q W|S(s0Filter a single line with all available filters.(R3R~(RoR7RR4((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR6s (RRRRpR5R"R6(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR2s    t StringOutputcBseZdZdZRS(sReturns a bare string as outputcCs |jgS(sReturn a bare string(R)(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR"s(RRRR"(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR8st 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(RotfilenameRC((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps        cCs1x!t|D]}|jjq W||_dS(sSet the first line to read.N(trangeR<RAR(Rot firstlineti((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytsetstartscCs ||_dS(sSet the last line to read.N(R>(RoR>((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytsetendscCs|jr|jn|jS(sGet the current line(R?RAR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  cCs&|jrtjdnt|_dS(sGo to next linesRead beyond file endN(R@RRRR?(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs 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(R<RARRR=tStreamReaderWriterRRqRR@trstripRRR?RRR R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRAs  cCs<|jr|j|jkrtS|jr5|jn|jS(s Find out if the file is finished(R>RRR?RAR@(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytfinisheds   cCs|jjdS(N(R<R0(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR0s( RRRRpRHRIRRRARMR0(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR9s       t LineWritercBsAeZdZeZdZdZdZdZdZ RS(s"Writes a file as a series of listscCs1t|tr$||_d|_n ||_dS(N(RR<RRD(RoRD((sA/tmp/pip-install-usGedi/docutils/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)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  %cCsn|js'tj|jdd|_n|jtjkrZtjdkrZ|jd}n|jj|dS(sWrite a stringtwsutf-8iiN(ii( R<R=R/RDRRRRR(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRPs  !cCs|j|ddS(sWrite a line to files N(RP(RoR7((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt writelinescCs|jjdS(N(R<R0(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR0s( RRRRR<RpRRPRSR0(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRNs    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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp"scCs9|jrdSt|jdkr5|jndS(s*Check for a Unicode byte mark and skip it.Ni(RMtordRt skipcurrent(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt checkbytemark%s cCstjdtS(s+Find out if we are out of the position yet.sUnimplemented isout()(RR R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytisout,s cCstjddS(sReturn the current character.sUnimplemented current()R{(RR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR1s cCstjdtS(s3Check for the given string in the current position.sUnimplemented checkfor()(RR R(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytcheckfor6s cCs9|jr)|js%|jjntS|jj|S(s*Find out if the current text has finished.(RZt leavependingRVt checkpendingRtcheckin(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRM;s   cCstjddS(s)Return the current character and skip it.sUnimplemented skipcurrent()R{(RR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRXCs cCs7d}x*|j r2|r2||j7}q W|S(s>Glob a bit of text that satisfies a check on the current char.R{(RMRX(Rot currentchecktglob((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR`HscsjfdS(sGlob a bit of alpha textcsjjS(N(Rtisalpha((Ro(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQs(R`(Ro((RosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt globalphaOscsjfdS(sGlob a row of digits.csjjS(N(Rtisdigit((Ro(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRUs(R`(Ro((RosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt globnumberSscCs,|jjs$|jdkr(tStS(s5Return if the current character is alphanumeric or _.t_(RtisalnumRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt isidentifierWs$cCs|j|jS(s Glob alphanumeric and _ symbols.(R`Rg(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytglobidentifier]scCs0|jjrtS|jdkr,tStS(s5Return if the current character is a value character:s{}()(RtisspaceRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytisvalueas cCs|j|jS(s'Glob a value: any symbols but brackets.(R`Rj(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt globvaluejscsjfdS(s(Skip all whitespace at current position.csjjS(N(RRi((Ro(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps(R`(Ro((RosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt skipspacenscs0jfd}j|S(s4Glob a bit of text up to (including) the magic char.csjkS(N(R((t magiccharRo(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRts(R`tskip(RoRmR`((RmRosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt globincludingrs csjfdS(s?Glob a bit of text up until (excluding) any excluded character.csjkS(N(R((texcludedRo(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRzs(R`(RoRp((RpRosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt globexcludingxscCs|jj||dS(sPush a new ending to the bottomN(RVtadd(RoRtoptional((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt pushending|scCsj|jr|jr|S|jj|}|rY||krYtjd|d|n|j||S(s,Pop the ending found at the current positionsExpected ending s, got (RZR\RVtpopRR Rn(RotexpectedR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt popendings cCs#|jj|}|sdS|jS(s$Return the next ending in the queue.N(RVt findendingRR(Rot nextending((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRysN(RRRRR\RpRYRZRR[RMRXR`RbRdRgRhRjRkRlRoRqRtRRwRy(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRTs,                  RUcBsYeZdZdZedZdZdZdZdZ dZ dZ RS( sA list of position endingscCs g|_dS(N(R%(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpscCs|jjt||dS(sAdd a new ending to the listN(R%RtPositionEnding(RoRRs((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRrscCs|j|jj7_dS(s/Pick any pending endings from a parse position.N(R%RV(Rotpos((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt pickpendingscCs|j|rtStS(sSearch for an ending(RxRR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR^scCs|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 boundsR{s No ending at sRemoved non-optional ending sNo endings left( RZRR RxRtreversedR%RRRs(RoR{Rteach((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRus     cCsct|jdkrdSxCtt|jD],\}}|j|rN|S|js/dSq/WdS(s'Find the ending at the current positioniN(RqR%Rt enumerateR}R^Rs(RoR{tindexR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRxs" cCs7t|jdkr3tjdt|dndS(s&Check if there are any pending endingsisPending s left openN(RqR%RR R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR]scCsXd}x%|jD]}|t|d7}qWt|jdkrP|d }n|dS(sPrintable representations endings [Riit](R%RRq(RoR)R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  ( RRRRpRRrR|R^RuRxR]R(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRUs      RzcBs)eZdZdZdZdZRS(s An ending for a parsing positioncCs||_||_dS(N(RRs(RoRRs((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps cCs|j|jS(sCheck for the ending(R[R(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR^scCs'd|j}|jr#|d7}n|S(sPrintable representationsEnding s (optional)(RRs(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs   (RRRRpR^R(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRzs  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(RTRp(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpscCstjddS(s Skip a stringsUnimplemented skip()N(RR (RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRnscCstjddS(s.Return an identifier for the current position.sUnimplemented identifier()tError(RR (Ro((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs cCs||jt|kS(s)Check for a string at the given position.(RRq(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR[scCsD|jt|}|stS|j|jt|jkS(s!Check for a string in lower case.(RRqRtlower(RoR)R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt checkforlowerscCs|j}|j||S(s)Return the current character and skip it.(RRn(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRXs  cCs|j|jS(s3Advance the position and return the next character.(RXR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytnext s cCs$|j|stS|j|tS(s;Check for a string at the given position; if there, skip it(R[RRnR(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt checkskips cCstj|d|jdS(s2Show an error message and the position identifier.s: N(RR R(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s( RRRRpRnRRR[RRXRRR (((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs         t TextPositioncBsDeZdZdZdZdZdZdZdZRS(s%A parse position based on a raw text.cCs-tj|d|_||_|jdS(s*Create the position from elyxer.some text.iN(RRpR{ttextRY(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps   cCs|jt|7_dS(sSkip a string of characters.N(R{Rq(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRn&scCs[d}|j|t|jkr;t|j|j}nd|j|j|j|!dS(s&Return a sample of the remaining text.it*(R{RqR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR*scCs|jt|jkS(s'Find out if we are out of the text yet.(R{RqR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRZ1scCs|j|jS(s6Return the current character, assuming we are not out.(RR{(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR5scCs8|j|t|jkr dS|j|j|j|!S(sHExtract the next string of the given length, or None if not enough text.N(R{RqRR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR9s( RRRRpRnRRZRR(((sA/tmp/pip-install-usGedi/docutils/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(RRpR9RR{RY(RoRD((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpBs  cCsvt|}xT|j|t|jjkrb|t|jj|jd8}|jqW|j|7_dS(sSkip a string of characters.iN(RqR{RRR(RoR)R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRnIs  %$cCs |jjS(s,Get the current line of the underlying file.(RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQscCs|jjd|_dS(sGo to the next line.iN(RRR{(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRUs cCs|jjdS(s#Return the line number of the file.i(RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRZscCsT|jj|jd }|jj|j}dt|jd|d|S(s4Return the current line and line number in the file.isline s: R(RRR{Rt getlinenumber(Rotbeforetafter((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR^scCs|jt|jjkr{|jt|jjdkrntjd|jjdt|jn|jn|jjS(s'Find out if we are out of the text yet.isOut of the line s: ( R{RqRRRR RRRM(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRZds ". 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(R{RqRRRR R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRls +cCsD|j|t|jjkr&dS|jj|j|j|!S(sHExtract the next string of the given length, or None if not enough text.N(R{RqRRR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRus"( RRRRpRnRRRRRZRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR?s        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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpscCsdS(sProcess contentsN((Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCsK|jj|}t|tr>tjd||g}n|j|S(sGet the resulting HTMLs Raw string (RR"RRORR t escapeall(RoR/((sA/tmp/pip-install-usGedi/docutils/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(RotlinesRR7((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs    cCsP|j}|jx3|D]+}||kr|j|||}qqW|S(s1Escape a line with replacements from elyxer.a map(tkeystsortR~(RoR7t replacementstpiecestpiece((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs     cCsd}t|}x|jst|jdkrtt|j}|dkr|tt|jd}n|d|dd7}n||j7}|jqW|S(s/Escape all Unicode characters to HTML entities.R{it0xd835is&#it;(RRMRWRthexRRX(RoR7RR{t codepoint((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  cs#g|j|fdS(s2Search for all embedded containers of a given typecs j|S(N(R(R(R(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(t searchprocess(RoR((RsA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt searchallscCs7|j|}x!|D]}|jjj|qW|S(s3Search for all containers of a type and remove them(RRRR(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt searchremoves cs|jfd|dS(s4Search for elements of a given type and process themcs t|S(N(R(R(R(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRsN(t locateprocess(RoRR((RsA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCsAx:|jD]/}|j||||r ||q q WdS(s3Search for all embedded containers and process themN(RR(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs cCsSxL|jD]A}||r2|j|||n||r ||q q WdS(s,Perform a recursive search in the container.N(RR(RoRRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs   cCs@d}ttjj|}x|D]}||j7}q%W|S(s0Extract all text from elyxer.allowed containers.R{(RR$R&RR)(RoRRUtconstant((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR&s  cCs|t|jkrdSt|j|dr3dSxc|t|jkr||j|rt|j|_|jj|j||jj|q6W|jj||dS(s*Group some adjoining elements into a groupNtgrouped(RqRRRRRRuR(RoRRft isingroup((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRfs+cCsY|j|}|jj|x5t|jdkrT|jj||jjq WdS(s)Remove a container but leave its contentsiN(RRuRqR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs icCsDtjd|t|x"|jD]}|j|dq%WdS(sShow in a trees iN(RRRRttree(RotlevelR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs||jkrdS|j|S(s)Get the value of a parameter, if present.N(RLR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt getparameterscCs&|j|}|sgS|jdS(s7Get the value of a comma-separated parameter as a list.R(RR(RoRt paramtext((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgetparameterlist scCs6|j}x&|r1|jjr%tS|j}q WtS(s&Check if the parent's output is empty.(RRR#RR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pythasemptyoutput s    cCs.|js|jjS|jjdt|jS(sGet a descriptiont@(RRRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  N(RRRRtpartkeyRRRpRR"RR+R.RRRRRRRR&RfRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR}s.                tBlackBoxcBseZdZdZRS(s)A container that does not output anythingcCs%t|_t|_g|_dS(N(RRR$RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp s  (RRRRp(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR st 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 tstrRIRJ(RoRJ((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR" s  (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR stStringContainercBsJeZdZdZdZdZdZdZdZ dZ RS(sA container for a single stringcCs%t|_t|_d|_dS(NR{(RRR8RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp/ s  cCs.|jr*|j|j|_d|_ndS(s/Replace special chars from elyxer.the contents.N(tparsedtreplacespecialR)R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR4 s 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(RoR7R#R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR: s% cCsE|j|tj}tjd|kr,|S|j|tj}|S(NR(RR+R,R$R)R-(RoR7((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRG s cCs|jS(sReturn all text.(R)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR&N scCstd}|jr)|dt|j7}nd}t|jjdkrSd}n|d|jjd |dS(s"Return a printable representation.RRs...iR{s (R(RRRqR)R(RoRtellipsis((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRR s  N( RRRRRRpRRRR&R(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR* s    tConstantcBs eZdZdZdZRS(sA constant stringcCs"g|_||_t|_dS(N(RR)R8R(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp_ s  cCs d|jS(Ns Constant: (R)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRd s(RRRRpR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR\ s t TaggedTextcBs>eZdZdZdZedZedZdZ RS(sText inside a tagcCst||_t|_dS(N(RRR(R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpl scCs%||_||j_||j_|S(s&Complete the tagged text and return it(RRR)R*(RoRR)R*((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytcompletep s   cCs"t|}|j|g||S(s(Complete the tagged text with a constant(RR(RoRR)R*R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRw s cCs8t|jdsdS|jjs&dSd|jjdS(s"Return a printable representation.R)sEmtpy tagged textsTagged sTagged ).R+(R(R,RR(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt selfcompleteT s(RRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRE s  RcBs2eZdZdZdZdZdZRS(sA constant string in a formulacCs/tj||||_d|_d|_dS(sSet the constant stringiN(RRpRR]RR(RoR)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp\ s  cCs|jS(s+Compute the size of the constant: always 1.(R](Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRc scCs t|jS(sReturn a copy of itself.(RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRg scCs d|jS(s"Return a printable representation.sFormula constant: (R)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRk s(RRRRpRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRY s    tRawTextcBs eZdZdZdZRS(sA bit of text inside a formulacCs|jjS(sDetect a bit of raw text(RRa(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytdetectr scCs,|j}|jt|d|_dS(sParse alphabetic textRN(RbRrRR(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytparsebitv s (RRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRo s t FormulaSymbolcBs?eZdZejZejdZdZdZdZRS(sA symbol inside a formulat characterscCs6|jtjkrtS|jtjkr2tStS(sDetect a symbol(RRRGRRBR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s cCs|jtjkr/|j|j|dS|jtjkre|jtj|j|dStjd|jddS(sParse the symbolNsSymbol s not found(RRRGt addsymbolRBRR (RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCs0|j|j||jjt|dS(s Add a symbolN(RRRRR(RotsymbolR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s( RRRR2RBRGRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR| s     t FormulaNumbercBs eZdZdZdZRS(sA string of digits in a formulacCs|jjS(sDetect a digit(RRc(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scs8jfd}|jt|d|_dS(sParse a bunch of digitscsjjS(N(RRc((R{(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR sRN(R`RrRR(RoR{tdigits((R{sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s tCommentcBs-eZdZejdZdZdZRS(s*A LaTeX comment: % to the end of the line.tcommentcCs|j|jkS(s Detect the %.(RR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCs|j|jd7_dS(sParse to the end of the line.s N(RRo(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRR2R(RRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  t WhiteSpacecBs)eZdZdZdZdZRS(s"Some white space inside a formula.cCs|jjS(sDetect the white space.(RRi(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCs|j|j7_dS(sParse all whitespace.N(RRl(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCsd|jdS(s"Return a printable representation.s Whitespace: *R(R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR 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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp s cCs|j|jS(sDetect the start of a bracket(R[R(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCs|j||j|S(sParse the bracket(t parsecompletet innerformula(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCs|j||j|S(sParse a text bracket(Rt innertext(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt parsetext scCs|j||j|S(sParse a literal bracket(Rt innerliteral(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt parseliteral 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( R[RRR RRRRtRRRwR(RoR{t innerparser((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s" cCs0x)|js+|j|jj|qWdS(s(Parse a whole formula inside the bracketN(RMRrRtparseany(RoR{((sA/tmp/pip-install-usGedi/docutils/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(R2RERRR(RRRMRRrRRRRRRX(RoR{t specialchars((sA/tmp/pip-install-usGedi/docutils/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.R{N(tliteralRMRRRRRXR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  &(RRRR2R(RR%RRpRRRRRRRR(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  ( RRRR2R(RR%RR(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCsd|jjS(sReturn a printable description.sMaths processor (RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRRR(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR& s  cCsBt|tsdS|jx|jD]}|j|q'WdS(s&Process the contents of a formula bit.N(RRRRR(RoRR'((sA/tmp/pip-install-usGedi/docutils/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(RRRRt processorsRR(RoRRR't processor((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR4 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((sA/tmp/pip-install-usGedi/docutils/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(RRRRRR (RoRR'tpair((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR H s cCs/|j|}tj|gd||N(R2RHturllibt quote_plusRRR(Roturltimg((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/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(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  cCsdg|_|j|dS(sParse a $...$ formula.RN(Rt parsedollar(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s cCs<dg|_|j||jds8|jdndS(sParse a $$...$$ formula.RRs1Formula should be $$...$$, but last $ is missing.N(RRRR (RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  cCs0|jd|jd|_|jddS(sParse to the next $.RN(RtRqRRw(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s cCs dg|_|j||dS(sParse a \(...\) formula.RN(Rt parseupto(RoR{tlimit((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s cCs dg|_|j||dS(sParse a \[...\] formula.RN(RR(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s cCs3|j||jd|_|j|dS(s1Parse a formula that ends with the given command.cSstS(N(R(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR sN(RtR`RRw(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s cCs+|jr'|jjr'd|jjdSdS(s"Return a printable representation.s Formula (RsUnnumbered formula(RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRRpRRRRRRRRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRY s             t WholeFormulacBs eZdZdZdZRS(sParse a whole formulacCs |j S(s"Not outside the formula is enough.(RM(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR scCs0x)|js+|j|jj|qWdS(sParse with any formula bitN(RMRrRR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRRR(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp scCs&|jrtS|j|j|S(sDetect a bit of a given type.(RMRRR(RoRR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt detecttype s cCsA||jks|j| r6|j||j||j|S|S(s#Parse the given type and return it.N(RRR!RR(RoRR{Rt returnedbit((sA/tmp/pip-install-usGedi/docutils/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"( RRR RRRMRR RRrRR(RoRR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s   (RRRRRRRRRR&R%RtdefiningRpR"RRR$R#RRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR 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(RRv((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt translate1 scCsd|_t|_dS(N(Rt translationRtfirst(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRp7 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(RoR0((sA/tmp/pip-install-usGedi/docutils/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-R3RtgetuntranslatedR,tugettextR2(RoRvR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR*L s     cCs/|tjkr$tjd||Stj|S(sGet the untranslated message.sCannot translate (RkRURR (RoRv((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR4Z sN( RRRRRR+RRpR3R*R4(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpv scCs ||_|S(s0Set the counter mode. Can be changed at runtime.(R(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytsetmodez s cCs ||_dS(sSet an initial value.N(Rw(RoRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytinit scCs t|jS(s$Get the next value as a text string.(RRw(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR1 scCs|j|jS(sGet the next value as a letter.(t getsequencetletters(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt getletter scCs|j|jS(sGet the next value as a symbol.(RHR8(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt getsymbol scCs||jdt|S(s*Get the next value from elyxer.a sequence.i(RwRq(RoRX((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRH scCsXd}|j}xB|jD]7\}}||kr||||7}||}qqW|S(s%Get the next value as a roman number.R{(Rwt romannumerals(RoRRtnumeralRw((sA/tmp/pip-install-usGedi/docutils/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.RRtAtaRERsUnknown counter mode (stextR(RR1RJRRNRKRR (Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgetvalue s    cCs.|jsd|_n|jd7_|jS(s@Increase the current value and get the next value as configured.ii(RwRQ(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgetnext s  cCs d|_dS(sReset the counter.iN(Rw(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytreset scCs.d|j}|jr*|d|j7}n|S(s"Return a printable representation.sCounter s in mode (RR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  N(R9i(R:i(R;i(R<i(R=id(R>iZ(R?i2(R@i((RAi (RBi (RCi(RDi(REi(RRRRRRwRtmasterRIRVRXR8RLRpRFRGR1RJRKRHRNRQRRRSR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR6e s,            tDependentCountercBs)eZdZdZdZdZRS(s4A counter which depends on another one (the master).cCs||_|jj|_|S(sSet the master counter.(RTRQR(RoRT((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt setmaster s cCsJ|j|jjkr%|jntj|}|jj|_|S(s8Increase or, if the master counter has changed, restart.(RRTRQRSR6RR(RoRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRR s  cCs|jjdtj|S(s8Get the value of the combined counter: master.dependent.t.(RTRQR6(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQ s(RRRRVRRRQ(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRU 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.RR{(R~(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt deasterisk scCs |j|S(s9Find out if the layout type corresponds to a unique part.(tisroman(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytisunique scCs|j|j|jkS(s9Find out if the layout type should have roman numeration.(R[Rt romanlayouts(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR\ scCs|j|j|jkS(s?Find out if the layout type corresponds to an (un)ordered part.(R[Rtorderedlayouts(RoR((sA/tmp/pip-install-usGedi/docutils/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(RR\RR`tgetlevelRR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt isnumbered s cCs d|kS(s5Find out if the type contains an asterisk, basically.R((RoR((sA/tmp/pip-install-usGedi/docutils/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( R]R`RR R[RR_RRR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRa scCs/tjr"|j|dkr"dS|j|S(s4Obtain the type for the part: without the asterisk, itAppendix(RXtappendixRaR[(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt getparttype scCs|j|jS(s$Generate a number for a layout type.(t getcounterRR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgenerate scCs?|j}||jkr4|j||j|(R/(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRRpR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s t EmphaticTextcBseZdZdZRS(sText with emphatic modecCsd|j_dS(NRG(RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR st ShapedTextcBseZdZdZRS(sText shaped (italic, slanted)cCsd|jd|_|jtjkrJtjd|jdd|j_dStj|j|j_dS(NisUnrecognized shape tspan(RRRbRjRR RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR stVersalitasTextcBseZdZdZRS(sText in versalitascCsd|j_dS(Nsspan class="versalitas"(RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst ColorTextcBseZdZdZRS(s Colored textcCs+|jd|_d|jd|j_dS(Nis span class="R|(RRRR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRstSizeTextcBseZdZdZRS(s Sized textcCs+|jd|_d|jd|j_dS(Nis span class="R|(RR]RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRstBoldTextcBseZdZdZRS(s Bold textcCsd|j_dS(Ntb(RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst 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(RRRbRdRR RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRstHfillcBseZdZdZRS(sHorizontall fillcCsd|j_dS(Nsspan class="hfill"(RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR+s(RRRR(((sA/tmp/pip-install-usGedi/docutils/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(RRRbRcRR RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR1s  (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR.stLangLinecBseZdZdZRS(s A line with language informationcCs]|jd}|tjkr,t|_dStj|}tjd|dt|_dS(sDOnly generate a span with lang info when the language is recognized.iNs span lang="R|(RRkRlR&RR(R,R(Rotlangtisolang((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR=s    (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR:st InsetLengthcBseZdZdZRS(s!A length measure inside an inset.cCs|jd|_dS(Ni(RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRIs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRFstSpacecBs)eZdZdZdZdZRS(sA space of several typescCst|_t|_dS(N(R RR%R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpOs cCs|jd|_|jtjkrFtjd|jdg|_dStj|jg|_|j}|srdStj dt |_ t j |j|dS(NisUnknown space type Rsspan class="hspace"(RRRYRZRR R/t getlengthR(R,RRRvRR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRSs  cCs>t|jdks,t|jdt r0dS|jdjS(s<Get the space length from elyxer.the contents or parameters.iN(RqRRRRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR`s,(RRRRpRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRLs  t VerticalSpacecBs eZdZdZdZRS(s(An inset that contains a vertical space.cCst|_t|_dS(N(R RR%R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpis cCsc|jd|_|jtjkrItjd|jdt|_dStj|jg|_dS(sSet the correct tagis"div class="vspace" style="height: s;"N( RRRYR^R(R,RRR/(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRms #(RRRRpR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRfs tAligncBs eZdZdZdZRS(sBit of aligned textcCs%t|_tjt|_dS(N(RRR(R-RR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpxs cCsd|jdd|j_dS(Ns div class="iR|(RRR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR|s(RRRRpR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRus tNewlinecBs eZdZdZdZRS(s A newlinecCst|_t|_dS(N(RRR%R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps cCsdg|_dS(sProcess contentss
N(R/(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRRpR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs tNewPagecBseZdZdZRS(s A new pagecCsdg|_dS(sProcess contentss


N(R/(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps  (RRRRp(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst StrikeOutcBseZdZdZRS(sStriken out text.cCsd|j_dS(sSet the output tag to strike.tstrikeN(RR)(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst StartAppendixcBseZdZdZRS(sMark to start an appendix here.cCstjjdS(sDActivate the special numbering scheme for appendices, using letters.N(RXRqRo(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRstLinkcBsqeZdZdZdZdZdZdZdZ 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(RR Rt LinkOutputRRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps     cCs^t|g|_|r$||_n|r6||_n|rH||_n|rZ||_n|S(sComplete the link.(RRtanchorRRR(RoRRRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs    cCsa|js dSd|_|jjr8d|jj|_n|jjr]|jj|j|_ndS(s8Use the destination link to fill in the destination URL.NR{t#(t destinationRRtpage(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytcomputedestinations    cCs||_||_dS(sESet another link as destination, and set its destination to this one.N(R(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytsetmutualdestinations cCsDd}|jr#|d|j7}n|jr@|d|j7}n|S(s"Return a printable representation.Rs #s to (RR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs   N(RRRRRRRRRRRRpRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  tURLcBseZdZdZRS(sA clickable URLcCs|j|jd}||_|jd}|rO|j|||_n|jd}|sm|}nt|g|_dS(sRead URL from elyxer.parametersRRRN(RRRRR(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRstFlexURLcBseZdZdZRS(sA flexible URLcCs|j|_dS(sRead URL from elyxer.contentsN(R&R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR(((sA/tmp/pip-install-usGedi/docutils/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)((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR"s         (RRRR"(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst PostprocessorcBs8eZdZgZdZdZdZdZRS(s,Postprocess a container keeping some contextcCs+ttj||_d|_d|_dS(N(t StageDictRtstagesRRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps cCs8|j|j|j|}|j|_||_|S(s)Postprocess a container and its contents.(t postrecursiveRt postcurrentR(RoRR((sA/tmp/pip-install-usGedi/docutils/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(RRqRRRRRER(RoRt postprocessorRR'tpostRG((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR's$  cCs;|jj|j}|s"|jS|j|j|j|S(sBPostprocess the current element taking into account next and last.(RtgetstageRRR(RoRtstage((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR=s(RRRRRpRRR(((sA/tmp/pip-install-usGedi/docutils/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(RotclassesRR!Rr((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpGscCsJg|D]}|j|^q}x!|D]}|j||_q)W|S(s-Instantiate an element from elyxer.each class(RRpR(RoRRRrRR'((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRLs "   cCs$|j|jkrdS|j|jS(s=Get the stage for a given element, if the type is in the dictN(RRR(RoR'((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRTs(RRRRpRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRDs  tLabelcBsVeZdZeZdZdZdZddZ dZ dZ dZ RS( sA label to be referencedcCstj|d|_dS(N(RRpRt lastnumbered(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRpbs cCs/|jd}|jd|tj|_dS(sProcess a label container.RRN(RRRt lastlayoutR(RoRv((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRfsRcCsf||_|j|d|d||tj|<|tjkrbx!tj|D]}||_qLWn|S(s!Create the label for a given key.RR(RvRRtnamest Referencet referencesR(RoRRvRt reference((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRls  cCs)|j|}|r%|jr%|jSdS(s8Get the part key for the latest numbered container seen.R{(RR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt findpartkeyvscCs:|jr |S|js*|jr&|jSdS|j|jS(s)Get the numbered container for the label.N(RRRRR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR}s   cCst|dsdSd|jS(s"Return a printable representation.Rvs Unnamed labelsLabel (RRv(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRsN( RRRRRRRRpRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR\s     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.NR{(RR~(RoRvRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR~s  cCs d|jS(s"Return a printable representation.s Reference (Rv(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs( RRRRRRvRRR~R(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs    tFormulaCommandcBsfeZdZgZejdZd ZdZ dZ dZ dZ dZ dZdZRS( s A LaTeX command inside a formulaRcCs|jtjS(sFind the current command.(R[RR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs|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 parseupgreekRR(RR R(R,RRrRR(RoR{RRtupgreek((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs cCs:x3tjD](}||jkr |j|||Sq WdS(s0Parse the command type once we have the command.N(RR&t commandmaptparsecommandtypeR(RoRR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs<|jj|}|j||j|}|r8|S|S(sParse a given command type.(RRt setcommandR(RoRRR{Rtreturned((sA/tmp/pip-install-usGedi/docutils/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 RMt emptycommandRRaRbRX(RoR{R((sA/tmp/pip-install-usGedi/docutils/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.R{(RZRyRRR(RoR{RR((sA/tmp/pip-install-usGedi/docutils/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(RoRR{t upcommandR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs" N(RRRR&R2R(RRRRRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs      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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR#s  cCsC|jj||jr dS|jj|}|j||S(s)Parse a parameter at the current positionN(RR$RMRRRr(RoR{t parameter((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR*s   cCsO|jj||jjt|s)dS|jjt|}|j||S(sParse a square bracketN(RR$R"RRRRr(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt parsesquare3s  cCs|jj||jjt|sV|jsLtjd|jdS|j Stj |j}|j |j ||j S(sParse a literal bracket.sNo literal parameter found at: N(RR$R"RRjRR RRRkRRrRR(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR<s  cCs[|jj||jjt|s)dStj|j}|j|j||jS(s!Parse a square bracket literally.N( RR$R"RRRRrRR(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytparsesquareliteralHs cCsl|jj||jjt|s=tjd|jdStj|jj |}|j ||S(sParse a text parameter.sNo text parameter for N( RR$R"RRR RRRRRr(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQs ( RRRRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR s  t EmptyCommandcBs eZdZejZdZRS(s%An empty command (without parameters)cCst|jg|_dS(s"Parse a command without parametersN(RRR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR`s(RRRR2R-RR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR[s 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(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRis(RRRR2RDRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRds t AlphaCommandcBs eZdZejZdZRS(s8A command without paramters whose result is alphabeticalcCstj||d|_dS(s'Parse the command and set type to alphaRN(RRR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRrs(RRRR2R3RR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRms tOneParamFunctioncBs/eZdZejZeZdZdZ RS(sA function of one parametercCs3tj|j|_|j||jdS(s#Parse a function with one parameterN(R(R,RRRtsimplifyifpossible(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR}s cCsD|j|jkr@t|_|j|jg|_t|_ndS(s&Try to simplify to a single character.N(RRR%RR/Rt simplified(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs ( RRRR2RCRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRws   tSymbolFunctioncBs)eZdZejZdZdZRS(s>Find a function which is represented by a symbol (like _ or ^)cCs|jtjkS(sFind the symbol(RRR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCsL|j|j|j|jtj|j|_|j|dS(sParse the symbolN( RRRnRR(R,RRR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR2RERRR(((sA/tmp/pip-install-usGedi/docutils/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(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs d|_dS(sSet the type to fontR N(R(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRR2RFRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  t LabelFunctioncBs)eZdZejZdZdZRS(sA function that acts as a labelcCs|j||_dS(sParse a literal parameterN(RRv(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCsPd|_tjd|jdd|_|jg|_|jtj|j|jdkr%tjddgStj|jdgS(s$Return the bracket as a single sign.RWR{sspan class="emptydot"sspan class="symbol"(RRR(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR$s( RRRRpRRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs     tFormulaEquationcBseZdZdZdZRS(sA simple numbered equation.tequationcCs,t|_|j|jjt|dS(sParse the arrayN(R&RRrRRR (RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR4s (RRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR/st FormulaCellcBs eZdZdZdZRS(sAn array cell inside a rowcCs-||_tjd|dt|_|S(Nsspan class="arraycell align-R|(RR(R,RR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt setalignment<s  cCs@|jj||jr dS|j|jjt|dS(N(RR$RMRrRR (RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRAs (RRRR R(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR 9s t FormulaRowcBs6eZdZejdZdZdZdZRS(sAn array row inside an arrayt cellseparatorcCs%||_tjdt|_|S(Nsspan class="arrayrow"(t alignmentsR(R,RR(RoR ((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt setalignmentsLs cCsd}|j|jdtxS|jsq|j|}|j||j||d7}|j|jqWt|j dkrt |_ ndS(sParse a whole rowiRsiN( RtR RRMt createcellRRrRRqRR$R(RoR{RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQs   cCs3|j|t|j}|jjtj|S(s4Create the cell that corresponds to the given index.(R RqRRR R (RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR^s( RRRR2R4R RRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR Gs    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](RoR{R-trow((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt parserowsfs    ccstjd}xktrz|j|t|jjt}|j|jV|j |rs|j |j |7_ qdSqWdS(s0Iterate over all rows, end when no more row endst rowseparatorN( R2R4RRtRRR RR R[RRw(RoR{RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRts  cCs|jjtj|j}xSt|jdjD];\}}|j|}|j t d|j |q5W|j |dS(sAdd an empty row.iu N( RRR RR RRRRRrRR(RoRRt originalcellR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs #cCs!|jj||j|dS(s2Add a row to the contents and to the list of rows.N(RRRr(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RRRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRcs   t FormulaArraycBs&eZdZdZdZdZRS(sAn array within a formulaR4cCs6tjdt|_|j||j|dS(sParse the arraysspan class="array"N(R(R,RRtparsealignmentsR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs cCsgd|_|j|}|r*||_n|j|}g|_x|D]}|jj|qIWdS(sParse the different alignmentsRN(tvalignRRR R(RoR{RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs    (RRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs 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(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRst 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(RoR{RRR4tbrace((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRstEquationEnvironmentcBseZdZdZRS(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"RR{sUnknown equation environment RN( R(R,RRRR~R2R;R RR R(RoR{t environment((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs (RRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR!st BeginCommandcBsFeZdZidejd6Zeeee gZ dZ dZ RS(sEA \begin{}...\end command and what it entails (array, cases, aligned)R{RcCs|j|}|j|}tjdd|d}|j||j||j||j|j|7_|j |_ dS(sParse the begin commandtendRt}N( RtfindbitR2R4RtRRrRRwR](RoR{RRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs   cCs^x<tjD]1}|jdd|jkr |jj|Sq W|jjt}||_|S(s7Find the command bit corresponding to the \begin{piece}RR{(R#R&R~RRRR!(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR&s  ( RRRR2R4RRRRRR&RR&(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR#s  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(RoR{t combiningR((sA/tmp/pip-install-usGedi/docutils/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(RR$RMRR RRR"RRRRRXRr(RoR{tletter((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR(s   (RRR2R8RRR((((sA/tmp/pip-install-usGedi/docutils/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(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRR2R:RR(((sA/tmp/pip-install-usGedi/docutils/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(RoR{RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR$s (RRRR2R@RR(((sA/tmp/pip-install-usGedi/docutils/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,RRR$(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR0scCsdS(s"Return a printable representation.sLimit previous command((Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR5sN(RRRRRRR(((sA/tmp/pip-install-usGedi/docutils/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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR<s  (cCsetjs tS|j||dtr:|j||tSt||tsQtS|j||dS(s3Check if the current position has a limits command.i( RRRt checkcommandR-t limitsaheadRR,R1(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR/Es cCs3||dj||jt||_dS(s,Limit the current element based on the next.iN(RrRR$R(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR4PscCs||}|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(tgetlimitRRR1RRR(RoRRtlimitedt subscriptt superscript((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR0Us cCs4|j||}|jjjdd|j_|S(s#Get the limit for a limits command.RiR(t getscriptRR)R~(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR5`scCsS|j||}|j||}tj||gd}|j||dS(s=Modify the super- and subscript to appear vertically aligned.sspan class="scripts"N(R9RRR(RoRRR7R8tscripts((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR2fscCs|j||tS(s6Check if the current element is a sub- or superscript.(R3R(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR1nscCs't||krtSt|||S(s0Check for the given type as the current element.(RqRR(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR3rscCs'||}|jjd7_||=|S(sGet the sub- or superscript.s class="script"(RR)(RoRRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR9xs ( RRRRR/R4R0R5R2R1R3R9(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR.9s     tBracketCommandcBs)eZdZejZdZdZRS(s"A command which defines a bracket.cCstj||dS(sParse the bracket.N(RR(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRscCs,||_d||_t|g|_|S(s+Create the bracket for the given character.s\(RRRR(RoRt character((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs  (RRRR2R7RRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR;s  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((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs cCsa|j||d}|s dS|j|||}|j||||j|||dS(sProcess a left bracket.iN(t findrighttfindmaxtresize(RoRRt rightindexR]((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR?s cCs|j||dS(s0Check if the command at the given index is left.s\left(tcheckdirection(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR>scCs|j||dS(s1Check if the command at the given index is right.s\right(RD(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyt checkrightscCs t|tstS|j|kS(s6Check if the given bit is the desired bracket command.(RR;RR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRDscCs{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>RER(RoRRtdepth((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR@s   cCs-|||!}tg|D]}|j^qS(s@Find the max size of the contents between the two given indices.(RR](RoRt leftindexRCtslicedR'((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRAs cCsR|j}|jjdd}t|||}t|_|j|_dS(s+Resize a bracket command to the given size.s\R{N(R&RR~RR&RRR(RoRR]R<RR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRBs   ( RRRRR?R>RERDR@RARB(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR=s     t TodayCommandcBseZdZdZdZRS(sShows today's date.cCs.t|_tjjjdg|_dS(s"Parse a command without parameterss %b %d, %YN(R%RtdatetimeRttodaytstrftimeR/(RoR{((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs N(RRRRRR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRIstParameterDefinitioncBs>eZdZd d gZdZdZdZdZRS( s3The definition of a parameter in a hybrid function.t[RRR%cCs1d|_t|_t|_d|_d|_dS(N(RRRRRsRwt literalvalue(Ro((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRps     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!}...RNRs$Wrong parameter name, did you mean $t?t!sWrong parameter closing s'Wrong character in parameter template: N( RMt parambracketsRRRsRR RRRXRR(RoR{topeningtclosing((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs    cCs|jrZ|jr'|j||_n|j||_|jrt|j|_qn0|jrx|j||_n|j||_dS(s/Read the parameter itself using the definition.N( RRsRRORRRwRR(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytreads    cCs>d|j}|jr0|dt|j7}n |d7}|S(s"Return a printable representation.sparam s: s (empty)(RRwR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs    (RNR(RR%(RRRRRRpRRUR(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRMs     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(RRMRMR(RoRYR{RZ((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRX$s  cCs||jkrdS|j|S(sGet a parameter as parsed.N(RWR(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgetparam,scCs|j|jS(sGet the value of a parameter.(R\Rw(RoR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQ2scCs+|j|}| s |j r$dS|jS(s%Get the literal value of a parameter.N(R\ROR(RoRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pytgetliteralvalue6s(RRRR[RXR\RQR](((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRVs     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(RR[t writeparamsRtcomputehybridsize(RoR{RYt writetemplate((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRQs   cCs|jt|S(s*Write all params according to the template(twriteposR(RoRa((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR_YscCsg}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( RMRt writeparamRt writefunctionRRt writebracketRRX(RoR{RRR((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRb]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 RWN( RXRWRR RRRbRwR(RoR{R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRgrs 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 RtRbRwRqR(RoR{R)R((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRh~s   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!}R{N(RRcRR RRRXRqRRRWRROR~(RoR{RR)tvariableRRw((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRks*      cCs|jjtj||S(s4Return a new bracket looking at the given direction.(RRR;(RoRR<((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRiscCsY|jtjkr |jdStj||_x|jD]}|j|_q?WdS(s(Compute the size of the hybrid function.N(Rt HybridSizet configsizesRtgetsizeR]R(RoR'((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR`s  (RRRR2R=RRR_RbRgRhRkRiR`(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR^=s       RmcBs 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( RnRRWRwRR~RRR teval(RoRt sizestringRR]((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRos  (RRRR2R>RnRo(((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRms t HeaderParsercBs2eZdZdZdZdZdZRS(sParses the LyX headercs3gjfdjS(s?Parse header parameters into a dictionary, return the preamble.csjS(N(t parseline((RRRo(sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs(RR(RoR((RRRosA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRs 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( RRrRKRLt parsebrancht LstParsert parselstsetRRRR(RoRRR7((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyRss  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(RxRRRRtupdateR(RoRt paramlist((sA/tmp/pip-install-usGedi/docutils/docutils/utils/math/math2html.pyR&scCs{t}xk|D]c}d|krQt|jdkrstjd|qsq|jdd\}}|||sV 2  K  #,"E -M#     B  D(v?8#> 2 "h,   F 8k K 6 Yn          8/1>U;    B +   F; :$z *./X