€cdocutils.nodes document q)q}q(U nametypesq}q(Xdescribing html snippetsqNX html-snippetsqKuUsubstitution_defsq}q Uparse_messagesq ]q Ucurrent_sourceq NU decorationq NUautofootnote_startqKUnameidsq}q(hUdescribing-html-snippetsqhU html-snippetsquUchildrenq]q(cdocutils.nodes target q)q}q(U rawsourceqX.. _html-snippets:qUparentqhUsourceqcdocutils.nodes reprunicode qXW/Data/Code/JavaScript/MathJax/Code/SourceForge/trunk/mathjax/docs/rst/HTML-snippets.rstq…q}qbUtagnameq Utargetq!U attributesq"}q#(Uidsq$]q%Ubackrefsq&]q'Udupnamesq(]q)Uclassesq*]q+Unamesq,]q-Urefidq.huUlineq/KUdocumentq0hh]q1ubcdocutils.nodes section q2)q3}q4(hUhhhhUexpect_referenced_by_nameq5}q6hhsh Usectionq7h"}q8(h(]q9h*]q:h&]q;h$]q<(hheh,]q=(hheuh/Kh0hUexpect_referenced_by_idq>}q?hhsh]q@(cdocutils.nodes title qA)qB}qC(hXDescribing HTML snippetsqDhh3hhh UtitleqEh"}qF(h(]qGh*]qHh&]qIh$]qJh,]qKuh/Kh0hh]qLcdocutils.nodes Text qMXDescribing HTML snippetsqN…qO}qP(hhDhhBubaubcdocutils.nodes paragraph qQ)qR}qS(hX/A number of MathJax configuration options allow you to specify an HTML snippet using a JavaScript object. This lets you include HTML in your configutation files even though they are not HTML files themselves. The format is fairly simple, but flexible enough to let you represent complicated HTML trees.qThh3hhh U paragraphqUh"}qV(h(]qWh*]qXh&]qYh$]qZh,]q[uh/Kh0hh]q\hMX/A number of MathJax configuration options allow you to specify an HTML snippet using a JavaScript object. This lets you include HTML in your configutation files even though they are not HTML files themselves. The format is fairly simple, but flexible enough to let you represent complicated HTML trees.q]…q^}q_(hhThhRubaubhQ)q`}qa(hXòAn HTML snippet is an array consisting of a series elements that formt he HTML tree. Those elements are one of two things: either a string, which represents text to be included in the snippet, or an array, which represents an HTML tag to be included. In the latter case, the array consists of three items: a string that is the tag name (e.g., "img"), an optional object that gives attributes for the tag (as described below), and an optional HTML snippet array that gives the contents of the tag.qbhh3hhh hUh"}qc(h(]qdh*]qeh&]qfh$]qgh,]qhuh/K h0hh]qihMXòAn HTML snippet is an array consisting of a series elements that formt he HTML tree. Those elements are one of two things: either a string, which represents text to be included in the snippet, or an array, which represents an HTML tag to be included. In the latter case, the array consists of three items: a string that is the tag name (e.g., "img"), an optional object that gives attributes for the tag (as described below), and an optional HTML snippet array that gives the contents of the tag.qj…qk}ql(hhbhh`ubaubhQ)qm}qn(hX™When attributes are provided, they are given as `name:value` pairs, with the `name` giving the attribute name, and `value` giving its value. For exampleqohh3hhh hUh"}qp(h(]qqh*]qrh&]qsh$]qth,]quuh/Kh0hh]qv(hMX0When attributes are provided, they are given as qw…qx}qy(hX0When attributes are provided, they are given as qzhhmubcdocutils.nodes title_reference q{)q|}q}(hX `name:value`q~h"}q(h(]q€h*]qh&]q‚h$]qƒh,]q„uhhmh]q…hMX name:valueq†…q‡}qˆ(hUhh|ubah Utitle_referenceq‰ubhMX pairs, with the qŠ…q‹}qŒ(hX pairs, with the qhhmubh{)qŽ}q(hX`name`qh"}q‘(h(]q’h*]q“h&]q”h$]q•h,]q–uhhmh]q—hMXnameq˜…q™}qš(hUhhŽubah h‰ubhMX giving the attribute name, and q›…qœ}q(hX giving the attribute name, and qžhhmubh{)qŸ}q (hX`value`q¡h"}q¢(h(]q£h*]q¤h&]q¥h$]q¦h,]q§uhhmh]q¨hMXvalueq©…qª}q«(hUhhŸubah h‰ubhMX giving its value. For exampleq¬…q­}q®(hX giving its value. For exampleq¯hhmubeubcdocutils.nodes literal_block q°)q±}q²(hX#[["img",{src:"/images/mypic.jpg"}]]q³hh3hhh U literal_blockq´h"}qµ(Ulinenosq¶‰Ulanguageq·X javascriptq¸U xml:spaceq¹Upreserveqºh$]q»h&]q¼h(]q½h*]q¾h,]q¿uh/Kh0hh]qÀhMX#[["img",{src:"/images/mypic.jpg"}]]qÁ…qÂ}qÃ(hUhh±ubaubhQ)qÄ}qÅ(hX‘represents an HTML snippet that includes one element: an ```` tag with ``src`` set to ``/images/mypic.jpg``. That is, this is equivalent toqÆhh3hhh hUh"}qÇ(h(]qÈh*]qÉh&]qÊh$]qËh,]qÌuh/Kh0hh]qÍ(hMX9represents an HTML snippet that includes one element: an qÎ…qÏ}qÐ(hX9represents an HTML snippet that includes one element: an qÑhhÄubcdocutils.nodes literal qÒ)qÓ}qÔ(hX ````qÕh"}qÖ(h(]q×h*]qØh&]qÙh$]qÚh,]qÛuhhÄh]qÜhMXqÝ…qÞ}qß(hUhhÓubah UliteralqàubhMX tag with qá…qâ}qã(hX tag with qähhÄubhÒ)qå}qæ(hX``src``qçh"}qè(h(]qéh*]qêh&]qëh$]qìh,]qíuhhÄh]qîhMXsrcqï…qð}qñ(hUhhåubah hàubhMX set to qò…qó}qô(hX set to qõhhÄubhÒ)qö}q÷(hX``/images/mypic.jpg``qøh"}qù(h(]qúh*]qûh&]qüh$]qýh,]qþuhhÄh]qÿhMX/images/mypic.jpgr…r}r(hUhhöubah hàubhMX!. That is, this is equivalent tor…r}r(hX!. That is, this is equivalent torhhÄubeubh°)r}r(hXr hh3hhh h´h"}r (h¶‰h·Xhtmlr h¹hºh$]r h&]r h(]rh*]rh,]ruh/K%h0hh]rhMXr…r}r(hUhjubaubhQ)r}r(hXNote that the snippet has two sets of square brackets. The outermost one is for the array that holds the snippet, and the innermost set is because the first (and only) element in the snippet is a tag, not text. Note that the code ``["img",{src:"/images/mypic.jpg"}]`` is invalid as an HTML snippet. It would represent a snippet that starts with "img" as text in the snippet (not a tag), but the second item is neither a string nor an array, and so is illegal. This is a common mistake that should be avoided.rhh3hhh hUh"}r(h(]rh*]rh&]rh$]rh,]ruh/K&h0hh]r(hMXèNote that the snippet has two sets of square brackets. The outermost one is for the array that holds the snippet, and the innermost set is because the first (and only) element in the snippet is a tag, not text. Note that the code r…r }r!(hXèNote that the snippet has two sets of square brackets. The outermost one is for the array that holds the snippet, and the innermost set is because the first (and only) element in the snippet is a tag, not text. Note that the code r"hjubhÒ)r#}r$(hX%``["img",{src:"/images/mypic.jpg"}]``r%h"}r&(h(]r'h*]r(h&]r)h$]r*h,]r+uhjh]r,hMX!["img",{src:"/images/mypic.jpg"}]r-…r.}r/(hUhj#ubah hàubhMXó is invalid as an HTML snippet. It would represent a snippet that starts with "img" as text in the snippet (not a tag), but the second item is neither a string nor an array, and so is illegal. This is a common mistake that should be avoided.r0…r1}r2(hXó is invalid as an HTML snippet. It would represent a snippet that starts with "img" as text in the snippet (not a tag), but the second item is neither a string nor an array, and so is illegal. This is a common mistake that should be avoided.r3hjubeubhQ)r4}r5(hX(A more complex example is the following:r6hh3hhh hUh"}r7(h(]r8h*]r9h&]r:h$]r;h,]r<uh/K/h0hh]r=hMX(A more complex example is the following:r>…r?}r@(hj6hj4ubaubh°)rA}rB(hXo[ "Please read the ", ["a",{href:"instructions.html"},["instructions"]], " carefully before proceeding" ]rChh3hhh h´h"}rD(h¶‰h·X javascriptrEh¹hºh$]rFh&]rGh(]rHh*]rIh,]rJuh/K8h0hh]rKhMXo[ "Please read the ", ["a",{href:"instructions.html"},["instructions"]], " carefully before proceeding" ]rL…rM}rN(hUhjAubaubhQ)rO}rP(hXwhich is equivalent torQhh3hhh hUh"}rR(h(]rSh*]rTh&]rUh$]rVh,]rWuh/K9h0hh]rXhMXwhich is equivalent torY…rZ}r[(hjQhjOubaubh°)r\}r](hXYplease read the instructions carefully before proceeding.r^hh3hhh h´h"}r_(h¶‰h·Xhtmlr`h¹hºh$]rah&]rbh(]rch*]rdh,]reuh/K?h0hh]rfhMXYplease read the instructions carefully before proceeding.rg…rh}ri(hUhj\ubaubhQ)rj}rk(hX?A final example shows how to set style attributes on an object:rlhh3hhh hUh"}rm(h(]rnh*]roh&]rph$]rqh,]rruh/K@h0hh]rshMX?A final example shows how to set style attributes on an object:rt…ru}rv(hjlhjjubaubh°)rw}rx(hX|[["span", { id:"mySpan", style: {color:"red", "font-weight":"bold"} }, [" This is bold text shown in red "] ]]ryhh3hhh h´h"}rz(h¶‰h·X javascriptr{h¹hºh$]r|h&]r}h(]r~h*]rh,]r€uh/KKh0hh]rhMX|[["span", { id:"mySpan", style: {color:"red", "font-weight":"bold"} }, [" This is bold text shown in red "] ]]r‚…rƒ}r„(hUhjwubaubhQ)r…}r†(hXwhich is equivalent tor‡hh3hhh hUh"}rˆ(h(]r‰h*]rŠh&]r‹h$]rŒh,]ruh/KLh0hh]rŽhMXwhich is equivalent tor…r}r‘(hj‡hj…ubaubh°)r’}r“(hX` This is bold text shown in red r”hh3hhh h´h"}r•(h¶‰h·Xhtmlr–h¹hºh$]r—h&]r˜h(]r™h*]ršh,]r›uh/KSh0hh]rœhMX` This is bold text shown in red r…rž}rŸ(hUhj’ubaubeubehUU transformerr NU footnote_refsr¡}r¢Urefnamesr£}r¤Usymbol_footnotesr¥]r¦Uautofootnote_refsr§]r¨Usymbol_footnote_refsr©]rªU citationsr«]r¬h0hU current_liner­NUtransform_messagesr®]r¯cdocutils.nodes system_message r°)r±}r²(hUh"}r³(h(]r´UlevelrµKh$]r¶h&]r·Usourcer¸hh*]r¹h,]rºUliner»KUtyper¼UINFOr½uh]r¾hQ)r¿}rÀ(hUh"}rÁ(h(]rÂh*]rÃh&]rÄh$]rÅh,]rÆuhj±h]rÇhMX3Hyperlink target "html-snippets" is not referenced.rÈ…rÉ}rÊ(hUhj¿ubah hUubah Usystem_messagerËubaUreporterrÌNUid_startrÍKU autofootnotesrÎ]rÏU citation_refsrÐ}rÑUindirect_targetsrÒ]rÓUsettingsrÔ(cdocutils.frontend Values rÕorÖ}r×(Ufootnote_backlinksrØKUrecord_dependenciesrÙNU rfc_base_urlrÚUhttp://tools.ietf.org/html/rÛU tracebackrÜKUpep_referencesrÝNUstrip_commentsrÞNU toc_backlinksrßUentryràU language_coderáUenrâU datestamprãNU report_levelräKU _destinationråNU halt_levelræKU strip_classesrçNhENUerror_encoding_error_handlerrèUbackslashreplaceréUdebugrêNUembed_stylesheetrë‰Uoutput_encoding_error_handlerrìUstrictríU sectnum_xformrîKUdump_transformsrïNU docinfo_xformrðKUwarning_streamrñNUpep_file_url_templateròUpep-%04dróUexit_status_levelrôKUconfigrõNUstrict_visitorröNUcloak_email_addressesr÷ˆUtrim_footnote_reference_spacerø‰UenvrùNUdump_pseudo_xmlrúNUexpose_internalsrûNUsectsubtitle_xformrü‰U source_linkrýNUrfc_referencesrþNUoutput_encodingrÿUutf-8rU source_urlrNUinput_encodingrU utf-8-sigrU_disable_configrNU id_prefixrUU tab_widthrKUerror_encodingrUUTF-8rU_sourcer UW/Data/Code/JavaScript/MathJax/Code/SourceForge/trunk/mathjax/docs/rst/HTML-snippets.rstr U generatorr NUdump_internalsr NU pep_base_urlr Uhttp://www.python.org/dev/peps/rUinput_encoding_error_handlerrjíUauto_id_prefixrUidrUdoctitle_xformr‰Ustrip_elements_with_classesrNU _config_filesr]rUfile_insertion_enabledrKU raw_enabledrKU dump_settingsrNubUsymbol_footnote_startrKUidsr}r(hh3hh3uUsubstitution_namesr}rh h0h"}r(h(]rh$]r h&]r!Usourcer"hh*]r#h,]r$uU footnotesr%]r&Urefidsr'}r(h]r)hasub.