B “äî\M„ã@sˆdZdZddlZddlZddlmZmZmZmZddl m Z ddl m Z Gdd„dej j ƒZ Gd d „d ej jƒZGd d „d ej jƒZdS) a/ Simple HyperText Markup Language document tree Writer. The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The output contains a minimum of formatting information. The cascading style sheet "html4css1.css" is required for proper viewing with a modern graphical browser. ZreStructuredTextéN)ÚfrontendÚnodesÚwritersÚio)Ú writer_aux)Ú _html_basec@s eZdZdZdgZdej ej e ¡¡ej ej  ej ej e ¡¡d¡¡gZ dZ ej  ej ej e ¡¡e ¡Z ddde d ge d d œfd d gddejdœfdd  e¡dgddejedœfddgddejdœfddgddd œfd!e d"gd#eje d$œfd%d&gd' ¡d(d)d*œfd+d,gd-d)ejd.œfd/d0gd-d)ejd.œfd1d2gd3d4gd4d5d6d7œfd8d9gd:d;dd?gddejdœfd@dAgdBdd œfdCdDgddejdœfdEdFgdGdd œfdHdIgdJdKifdLdMgdJdNifdOdPgdQddejdRœfdSdTgdejdUœfffZdVZdWdX„ZdS)YÚWriter)ÚhtmlZhtml4Z html4css1ZxhtmlZxhtml10z html4css1.cssÚ.Zhtml5_polyglotz template.txtzHTML-Specific OptionsNz)ÚdefaultÚmetavarzhComma separated list of stylesheet URLs. Overrides previous --stylesheet and --stylesheet-path settings.z --stylesheetzZstylesheet_path)r Ú overridesÚ validatorzÙComma separated list of stylesheet paths. Relative paths are expanded if a matching file is found in the --stylesheet-dirs. With --link-stylesheet, the path is rewritten relative to the output HTML file. Default: "%s"ú,z--stylesheet-pathzZ stylesheet)r r rr zEmbed the stylesheet(s) in the output HTML file. The stylesheet files must be accessible during processing. This is the default.z--embed-stylesheetéÚ store_true)r ÚactionrzNLink to the stylesheet(s) in the output HTML file. Default: embed stylesheets.z--link-stylesheetZembed_stylesheetÚ store_false)ÚdestrzComma-separated list of directories where stylesheets are found. Used by --stylesheet-path when expanding relative path arguments. Default: "%s"z--stylesheet-dirsz)r rr z|Specify the initial header level. Default is 1 for "

". Does not affect document title & subtitle (see --no-doc-title).z--initial-header-levelz 1 2 3 4 5 6Ú1z)Úchoicesr r zÏSpecify the maximum width (in characters) for one-column field names. Longer field names will span an entire row of the table used to render the field list. Default is 14 characters. Use 0 for "no limit".z--field-name-limité)r r rzÍSpecify the maximum width (in characters) for options in option lists. Longer options will span an entire row of the table used to render the option list. Default is 14 characters. Use 0 for "no limit".z--option-limitz[Format for footnote references: one of "superscript" or "brackets". Default is "brackets".z--footnote-referencesÚ superscriptÚbracketszZtrim_footnote_reference_space)rr r r z{Format for block quote attributions: one of "dash" (em-dash prefix), "parentheses"/"parens", or "none". Default is "dash".z --attributionÚdashÚ parenthesesÚparensÚnonezpRemove extra vertical whitespace between items of "simple" bullet lists and enumerated lists. Default: enabled.z--compact-listsz3Disable compact simple bullet and enumerated lists.z--no-compact-listsÚ compact_listszXRemove extra vertical whitespace between items of simple field lists. Default: enabled.z--compact-field-listsz#Disable compact simple field lists.z--no-compact-field-listsÚcompact_field_listszJAdded to standard table classes. Defined styles: "borderless". Default: ""z --table-styler Úz[Math output format, one of "MathML", "HTML", "MathJax" or "LaTeX". Default: "HTML math.css"z --math-outputz HTML math.cssz,Omit the XML declaration. Use with caution.z--no-xml-declarationÚxml_declaration)rr rrzyObfuscate email addresses to confuse harvesters while still keeping email links usable with standards-compliant browsers.z--cloak-email-addresses)rrzhtml4css1 writercCsi|_t|_dS)N)ÚpartsÚHTMLTranslatorZtranslator_class)Úself©r%úG/tmp/pip-build-uw_ogi45/docutils/docutils/writers/html4css1/__init__.pyÚ__init__ŽszWriter.__init__)Ú__name__Ú __module__Ú __qualname__Ú supportedZdefault_stylesheetsÚosÚpathÚabspathÚdirnameÚ__file__ÚjoinZdefault_stylesheet_dirsZdefault_templateZdefault_template_pathrZvalidate_comma_separated_listZvalidate_booleanÚsplitZvalidate_nonnegative_intZ settings_specZconfig_sectionr'r%r%r%r&rs°               rc@sjeZdZdZdZdZdZeej j ƒZ de d<dddd d œZ d d „Z d d„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd˜d2d3„Zd4d5„Z d6d7„Z!d8d9„Z"d:d;„Z#dd?„Z%d@dA„Z&dBdC„Z'dDdE„Z(dFdG„Z)dHdI„Z*dJdK„Z+dLdM„Z,dNdO„Z-dPdQ„Z.dRdS„Z/dTdU„Z0dVdW„Z1dXdY„Z2dZd[d\œZ3d]d^„Z4d_d`„Z5dadb„Z6dcdd„Z7dedf„Z8dgdh„Z9didj„Z:dkdl„Z;dmdn„Zdsdt„Z?dudv„Z@dwdx„ZAdydz„ZBd{d|„ZCd}d~„ZDdd€„ZEdd‚„ZFdƒd„„ZGd…d†„ZHd‡dˆ„ZId‰dŠ„ZJd‹dŒ„ZKddŽ„ZLdd„ZMd‘d’„ZNd“d”„ZOd•d–„ZPd—S)™r#aH The html4css1 writer has been optimized to produce visually compact lists (less vertical whitespace). HTML's mixed content models allow list items to contain "
  • body elements

  • " or "
  • just text
  • " or even "
  • text

    and body elements

    combined
  • ", each with different effects. It would be best to stick with strict body elements in list items, but they affect vertical spacing in older browsers (although they really shouldn't). The html5_polyglot writer solves this using CSS2. Here is an outline of the optimization: - Check for and omit

    tags in "simple" lists: list items contain either a single paragraph, a nested simple list, or a paragraph followed by a nested simple list. This means that this list can be compact: - Item 1. - Item 2. But this list cannot be compact: - Item 1. This second paragraph forces space between list items. - Item 2. - In non-list contexts, omit

    tags on a paragraph if that paragraph is the only child of its parent (footnotes & citations are allowed a label first). - Regardless of the above, in definitions, table cells, field bodies, option descriptions, and list items, mark the first child with 'class="first"' and the last child with 'class="last"'. The stylesheet sets the margins (top & bottom respectively) to 0 for these elements. The ``no_compact_lists`` setting (``--no-compact-lists`` command-line option) disables list whitespace optimization. zz zC zO z é )z—r )ú(ú))r r )rrrrcCs | |dd¡| |dd¡dS)NÚfirstrÚlastéÿÿÿÿ)Úset_class_on_child)r$Únoder%r%r&Úset_first_lastÕszHTMLTranslator.set_first_lastcCs,|j|ddd|j |j|ddd¡dS)NÚaddressF)ÚmetaÚpre)ÚCLASS)Úvisit_docinfo_itemÚbodyÚappendÚstarttag)r$r:r%r%r&Ú visit_addressÚszHTMLTranslator.visit_addresscCs2|d dd¡|j | |d¡¡| |¡dS)NÚclassesrZ admonitionÚdiv)ÚinsertrArBrCr;)r$r:r%r%r&Úvisit_admonitionàszHTMLTranslator.visit_admonitioncCs2t|jtjƒr"|jr.|j d¡n | |d¡dS)Nz
    Úauthor)Ú isinstanceÚparentrÚauthorsÚauthor_in_authorsrArBr@)r$r:r%r%r&Ú visit_authoræszHTMLTranslator.visit_authorcCs"t|jtjƒrd|_n| ¡dS)NT)rJrKrrLrMÚdepart_docinfo_item)r$r:r%r%r&Ú depart_authoríszHTMLTranslator.depart_authorcCs| |d¡d|_dS)NrLF)r@rM)r$r:r%r%r&Ú visit_authorsós zHTMLTranslator.visit_authorscCs | ¡dS)N)rO)r$r:r%r%r&Údepart_authors÷szHTMLTranslator.depart_authorscCs&|j |¡|jj |j d¡¡dS)NZstub)ÚcolspecsrBrKZstubsÚ attributesÚget)r$r:r%r%r&Ú visit_colspecûs zHTMLTranslator.visit_colspeccCsÆt|jdddtjƒrdSd|jjdksFd|jjkrJd|jjdkrJdStdd„|jDƒƒ}|j   |  |d ¡¡xB|jD]8}t |d d |d ƒ}|j   |j |d d|d¡qzW|j   d¡dS)NFT)ZdescendZsiblingszcolwidths-autorEzcolwidths-givencss|]}|dVqdS)ÚcolwidthNr%)Ú.0r:r%r%r&ú sz0HTMLTranslator.depart_colspec..ÚcolgrouprWgY@gà?Úcolz%i%%)Úwidthz )rJZ next_noderZcolspecrKÚsettingsÚ table_styleÚsumrSrArBrCÚintZemptytag)r$r:Z total_widthrWr%r%r&Údepart_colspecs  zHTMLTranslator.depart_colspeccCs<d|dkp:|jjo:d|dko:|jp:|jdgkp:| |¡S)NÚcompactrEÚopenÚcontents)r]rÚcompact_simpleZ topic_classesZcheck_simple_list)r$r:r%r%r&Úis_compactables    zHTMLTranslator.is_compactablec Cs6|j |j|ddddd¡|j d¡| |¡dS)NÚtablezdocutils citationÚvoidr)r?ÚframeÚruleszK )rArBrCÚfootnote_backrefs)r$r:r%r%r&Úvisit_citations   zHTMLTranslator.visit_citationcCs|j d¡dS)Nz )rArB)r$r:r%r%r&Údepart_citation'szHTMLTranslator.depart_citationcCs*|j d¡|j |j|dddd¡dS)Nz- : Úspanr Ú classifier)r?)rArBrC)r$r:r%r%r&Úvisit_classifier,s zHTMLTranslator.visit_classifiercCs0|j d¡|j | |dd¡¡| |¡dS)Nz Úddr )rArBrCr;)r$r:r%r%r&Úvisit_definition1s zHTMLTranslator.visit_definitioncCs|j |j|ddd¡dS)NÚdlÚdocutils)r?)rArBrC)r$r:r%r%r&Úvisit_definition_list7sz$HTMLTranslator.visit_definition_listcCs$|j | |dd¡¡| |¡dS)NÚtdr )rArBrCr;)r$r:r%r%r&Úvisit_description;sz HTMLTranslator.visit_descriptioncCs|j d¡dS)Nz)rArB)r$r:r%r%r&Údepart_description?sz!HTMLTranslator.depart_descriptionc CsD|j t|jƒ¡|j |j|ddddd¡|j d¡d|_dS)NrgÚdocinforhr)r?rirjzR T)ÚcontextrBÚlenrArCÚ in_docinfo)r$r:r%r%r&Ú visit_docinfoCs   zHTMLTranslator.visit_docinfocCs6|j d¡d|_|j ¡}|j|d…|_g|_dS)Nz F)rArBr|rzÚpopry)r$r:Ústartr%r%r&Údepart_docinfoMs   zHTMLTranslator.depart_docinfoTcCs¢|r$d|| | ¡¡f}| |¡|j | |dd¡¡|j d|jj|¡t|ƒržt |dt j ƒr||dd d¡t |dt j ƒrž|dd d ¡dS) Nz Útrr z&%s: rrEr6r8r7) ZattvalÚastextZadd_metarArBrCÚlanguageÚlabelsr{rJrÚElement)r$r:Únamer=Zmeta_tagr%r%r&r@Ts z!HTMLTranslator.visit_docinfo_itemcCs|j d¡dS)Nz )rArB)r$r%r%r&rObsz"HTMLTranslator.depart_docinfo_itemcCs|j |j|ddd¡dS)Nr>z doctest-block)r?)rArBrC)r$r:r%r%r&Úvisit_doctest_blockfsz"HTMLTranslator.visit_doctest_blockcCs6tjj ||¡t|ƒdkr(|j d¡| |¡dS)Nrz )rrr#Ú visit_entryr{rArBr;)r$r:r%r%r&rˆjs  zHTMLTranslator.visit_entrycCs–i}d|kr|d|d<d|kr,|d|d<|j}|j |j|jf¡d|_| |¡|_|jrz|sz| dd¡d ¡|d<|j |j|df|Ž¡dS)z’ The 'start' attribute does not conform to HTML 4.01's strict.dtd, but cannot be emulated in CSS1 (HTML 5 reincludes it). rZenumtypeÚclassNr z simpleÚol) rerzrBÚ compact_prfrUÚstriprArC)r$r:ÚattsZold_compact_simpler%r%r&Úvisit_enumerated_listqs    z$HTMLTranslator.visit_enumerated_listcCs"|j ¡\|_|_|j d¡dS)Nz )rzr~rer‹rArB)r$r:r%r%r&Údepart_enumerated_list…sz%HTMLTranslator.depart_enumerated_listcCs|j |j|dddd¡dS)Nrr Úfield)r?)rArBrC)r$r:r%r%r&Ú visit_fieldŠszHTMLTranslator.visit_fieldcCs|j d¡dS)Nz )rArB)r$r:r%r%r&Ú depart_fieldszHTMLTranslator.depart_fieldcCsn|j |j|dddd¡| |dd¡|j}|js\t|jtjƒs\|j  |¡t |jƒdkrj| |dd ¡dS) Nrvr z field-body)r?r6rrr7r8) rArBrCr9rKÚcompact_field_listrJrryÚindexr{)r$r:rr%r%r&Úvisit_field_bodyszHTMLTranslator.visit_field_bodycCs|j d¡dS)Nz )rArB)r$r:r%r%r&Údepart_field_bodyœsz HTMLTranslator.depart_field_bodyc Csä|j |j|jf¡d|_d|dkr.d|_n|jjrHd|dkrHd|_|jr¸xh|D]`}|d}t|tjƒspt ‚dd„|Dƒ}t |ƒdksTt |ƒd kr¬t|dtj tj fƒsTd |_PqTW|j  |j|d d d dd¡|j  d¡dS)NrbrETrcr8cSsg|]}t|tjƒs|‘qSr%)rJrÚ Invisible)rXÚnr%r%r&ú «sz3HTMLTranslator.visit_field_list..rrFrgrhrzdocutils field-list)rirjr?zK )rzrBr“r‹r]rrJrÚ field_bodyÚAssertionErrorr{Ú paragraphZ line_blockrArC)r$r:rršÚchildrenr%r%r&Úvisit_field_listŸs,      zHTMLTranslator.visit_field_listcCs"|j d¡|j ¡\|_|_dS)Nz )rArBrzr~r“r‹)r$r:r%r%r&Údepart_field_listºs z HTMLTranslator.depart_field_listc Csi}|jrd|d<nd|d<|jjrft| ¡ƒ|jjkrfd|d<|j d|j|jddd d d ¡n |j d¡|j  |j|d df|Ž¡dS) Nz docinfo-namer‰z field-nameéÚcolspanz rr r)r?z Úth) r|r]Zfield_name_limitr{r‚rzrBrCrKrA)r$r:rr%r%r&Úvisit_field_name¾s   zHTMLTranslator.visit_field_namecCs"|j d¡|j |j ¡¡dS)Nz:)rArBrzr~)r$r:r%r%r&Údepart_field_nameÏs z HTMLTranslator.depart_field_namec Cs6|j |j|ddddd¡|j d¡| |¡dS)Nrgzdocutils footnoterhr)r?rirjzK )rArBrCrk)r$r:r%r%r&Úvisit_footnoteÔs   zHTMLTranslator.visit_footnotecCsþg}|d}|jjr¨|r¨t|ƒdkrR|j d¡|j d¡|j d|d¡qÆx*t|ƒD]\}}| d||df¡q\W|j dd  |¡¡|jddg7_n|j d¡|jddg7_t|ƒdkrú|sè|dd  d ¡|d d  d ¡dS)NÚbackrefsrr zz!rz'%sz(%s) z, rEr6r8r7)r]Zfootnote_backlinksr{rzrBÚ enumerater1)r$r:Ú backlinksr¦ÚiÚbackrefr%r%r&rkÝs&      z HTMLTranslator.footnote_backrefscCs|j d¡dS)Nz )rArB)r$r:r%r%r&Údepart_footnoteøszHTMLTranslator.depart_footnotec Csjd|d}|jj}|dkr.d}|j d¡n|dks:t‚d}|j d¡|j |j|d |d |d ¡dS) Nú#Zrefidrú[ú]rzzÚazfootnote-reference)r?Úhref)r]Zfootnote_referencesrzrBr›rArC)r$r:r°ÚformatÚsuffixr%r%r&Úvisit_footnote_referenceýs   z'HTMLTranslator.visit_footnote_referencecCs|j |j ¡d¡dS)Nz)rArBrzr~)r$r:r%r%r&Údepart_footnote_reference sz(HTMLTranslator.depart_footnote_referencecCsdS)Nr%)r$r:r%r%r&Úvisit_generatedszHTMLTranslator.visit_generatedz image/svg+xmlzapplication/x-shockwave-flash)z.svgz.swfcCs(|j |j|dd|j ¡dd¡dS)Nrvz%s[Úlabel)r?)rArBrCrzr~)r$r:r%r%r&Ú visit_labelszHTMLTranslator.visit_labelcCs$|j d|j ¡|j ¡f¡dS)Nz]%s%s)rArBrzr~)r$r:r%r%r&Ú depart_labelszHTMLTranslator.depart_labelcCs4|j | |dd¡¡t|ƒr0|dd d¡dS)NÚlir rrEr6)rArBrCr{)r$r:r%r%r&Úvisit_list_item"szHTMLTranslator.visit_list_itemcCs| dg¡}d|kr@dd„|Dƒ|d<|j | |dd¡¡dS|j |j|dddd¡| ¡}x†|j |¡D]v}| ¡r´|j  |¡r |j d |  |¡¡qæ|j |  |¡¡qp|d krÊ|j |¡qp|j d t |ƒd d ¡qpW|j d¡t j ‚dS)NrEÚcodecSsg|]}|dkr|‘qS)r»r%)rXÚclsr%r%r&r™.sz0HTMLTranslator.visit_literal..r Úttzdocutils literal)r?z%s)Ú ú z rr¿z)rUrArBrCr‚Zwords_and_spacesÚfindallrŒZin_word_wrap_pointÚsearchÚencoder{rZSkipNode)r$r:rEÚtextÚtokenr%r%r&Ú visit_literal)s&    zHTMLTranslator.visit_literalcCs|j |j|ddd¡dS)Nr>z literal-block)r?)rArBrC)r$r:r%r%r&Úvisit_literal_blockHsz"HTMLTranslator.visit_literal_blockcCs|j d¡dS)Nz )rArB)r$r:r%r%r&Údepart_literal_blockLsz#HTMLTranslator.depart_literal_blockcCs~i}|jjr6t| ¡ƒ|jjkr6d|d<|j d¡n |j d¡|j |j|dfddi|—Ž¡|j d¡|j d ¡dS) Nr r¡z  r rvr?z option-groupzr)r]Z option_limitr{r‚rzrBrArC)r$r:rr%r%r&Úvisit_option_groupPs  z!HTMLTranslator.visit_option_groupcCs,|j ¡|j d¡|j |j ¡¡dS)Nz )rzr~rArB)r$r:r%r%r&Údepart_option_group]s  z"HTMLTranslator.depart_option_groupc Cs,|j |j|ddddd¡|j d¡dS)Nrgzdocutils option-listrhr)r?rirjzH )rArBrC)r$r:r%r%r&Úvisit_option_listbs  z HTMLTranslator.visit_option_listcCs|j d¡dS)Nz )rArB)r$r:r%r%r&Údepart_option_listjsz!HTMLTranslator.depart_option_listcCs|j | |dd¡¡dS)Nrr )rArBrC)r$r:r%r%r&Úvisit_option_list_itemmsz%HTMLTranslator.visit_option_list_itemcCs|j d¡dS)Nz )rArB)r$r:r%r%r&Údepart_option_list_itempsz&HTMLTranslator.depart_option_list_itemcCsàt|jtjƒst|jtjƒr dSxB| ¡D]6\}}| |¡r*|dkr\|gdgdgddgfks*dSq*Wt|jdtjƒ}x2|jj|d…D]}t|tj ƒršqˆ||kr¤PdSWt dd„|jDƒƒ}|j sØ|j sØ|j rÜ|d krÜd SdS) zU Determine if the

    tags around paragraph ``node`` can be omitted. FrEr6r7rNcSs"g|]}t|tjtjfƒs|‘qSr%)rJrr—r¶)rXr˜r%r%r&r™‹sz>HTMLTranslator.should_be_compact_paragraph..rT)rJrKrÚdocumentZcompoundÚattlistZis_not_defaultr¶rr—r{rer“r‹)r$r:ÚkeyÚvaluer6ÚchildZ parent_lengthr%r%r&Úshould_be_compact_paragraphus*   z*HTMLTranslator.should_be_compact_paragraphcCs>| |¡r|j d¡n"|j | |dd¡¡|j d¡dS)Nr Úpz

    )rÓrzrBrArC)r$r:r%r%r&Úvisit_paragraph“s zHTMLTranslator.visit_paragraphcCs|j |j ¡¡dS)N)rArBrzr~)r$r:r%r%r&Údepart_paragraphšszHTMLTranslator.depart_paragraphcCs,|j |j|ddd¡| |¡d|_dS)NrFÚsidebar)r?T)rArBrCr;Z in_sidebar)r$r:r%r%r&Ú visit_sidebaržs zHTMLTranslator.visit_sidebarcCsDt|jtjƒr*|j |j|dddd¡n|j | |dd¡¡dS)Nrnr Z subscript)r?Úsub)rJrKrÚ literal_blockrArBrC)r$r:r%r%r&Úvisit_subscript¥s zHTMLTranslator.visit_subscriptcCs,t|jtjƒr|j d¡n |j d¡dS)Nzz)rJrKrrÚrArB)r$r:r%r%r&Údepart_subscript¬szHTMLTranslator.depart_subscriptc CsÚt|jtjƒr6|j |j|dddd¡|j d¡n t|jtjƒrx|j |j|dddd¡|j d¡t |jƒ|_ n^t|jtj ƒrÖd |j |j d }|j |j||dd d|jid dd d¡|j d |¡dS)NrÔr zsidebar-subtitle)r?z

    Úh2Úsubtitlez

    zh%srzsection-subtitlernz )rJrKrr×rArBrCrzrÎr{Úin_document_titleÚsectionZ section_levelZinitial_header_level)r$r:Útagr%r%r&Úvisit_subtitle³s  zHTMLTranslator.visit_subtitlecCs\|j |j ¡¡|jrX|j|jd…|_d|_|j |j¡|j |j¡|jdd…=dS)Nr8r) rArBrzr~rßrÞZbody_pre_docinfoÚextendZ html_subtitle)r$r:r%r%r&Údepart_subtitleÃszHTMLTranslator.depart_subtitlecCsDt|jtjƒr*|j |j|dddd¡n|j | |dd¡¡dS)Nrnr r)r?Úsup)rJrKrrÚrArBrC)r$r:r%r%r&Úvisit_superscriptÍs z HTMLTranslator.visit_superscriptcCs,t|jtjƒr|j d¡n |j d¡dS)Nzz)rJrKrrÚrArB)r$r:r%r%r&Údepart_superscriptÔsz!HTMLTranslator.depart_superscriptc Csà|j |j|ddd¡|j d¡d}t|dƒr”|d}t|ƒdkrVd|d }n>d}g}x&|D]}| d ||f¡|d7}qdWd d  |¡}| d ¡r¬d|d }nd}|j d|d|d| |d¡||f¡dS)NrFzsystem-message)r?z

    r r¦rz%; backlinkrz%sz; backlinks: %sz, Úlinez , line %sz=System Message: %s/%s (%s%s)%s

    ÚtypeÚlevelÚsource)rArBrCr{r1ÚhasattrrÂ)r$r:Z backref_textr¦r©r¨rªrèr%r%r&Úvisit_system_messageÛs*         z#HTMLTranslator.visit_system_messagecCs^|j |j¡d|_d|jjg}d|kr:| d|d¡|j |j|dd |¡dd¡dS) NTrtZalignzalign-%srgr¿r)r?Zborder)rzrBr‹r]r^rArCr1)r$r:rEr%r%r&Ú visit_tableös zHTMLTranslator.visit_tablecCs|j ¡|_|j d¡dS)Nz )rzr~r‹rArB)r$r:r%r%r&Ú depart_tableÿs zHTMLTranslator.depart_tablecCs|j |j|ddd¡dS)NÚtbodyÚtop)Úvalign)rArBrC)r$r:r%r%r&Ú visit_tbodyszHTMLTranslator.visit_tbodycCs|j d¡dS)Nz )rArB)r$r:r%r%r&Ú depart_tbodyszHTMLTranslator.depart_tbodycCs|j |j|ddd¡dS)NÚtheadZbottom)rò)rArBrC)r$r:r%r%r&Ú visit_thead szHTMLTranslator.visit_theadcCs|j d¡dS)Nz )rArB)r$r:r%r%r&Ú depart_theadszHTMLTranslator.depart_theadN)T)Qr(r)r*Ú__doc__ÚdoctypeÚ content_typeZcontent_type_mathmlÚdictrr#Zspecial_charactersZattribution_formatsr;rDrHrNrPrQrRrVrarfrlrmrprrrurwrxr}r€r@rOr‡rˆrŽrr‘r’r•r–ržrŸr£r¤r¥rkr«r³r´rµZobject_image_typesr·r¸rºrÅrÆrÇrÈrÉrÊrËrÌrÍrÓrÕrÖrØrÛrÜrârärærçrírîrïrórôrör÷r%r%r%r&r#“s )           r#c@s0eZdZdZdd„Zdd„Zdd„Zdd„Zd S) ÚSimpleListCheckerzÝ Raise `nodes.NodeFound` if non-simple list item is encountered. Here "simple" means a list item containing nothing other than a single paragraph, a simple list, or a paragraph followed by a simple list. cCs€g}x$|jD]}t|tjƒs | |¡q W|rft|dtjƒrft|dtjƒs^t|dtjƒrf| ¡t |ƒdkrvdStj ‚dS)Nrr8r) rrJrr—rBrœZ bullet_listZenumerated_listr~r{Ú NodeFound)r$r:rrÒr%r%r&rºs   z!SimpleListChecker.visit_list_itemcCs tj‚dS)N)rrý)r$r:r%r%r&ru2sz'SimpleListChecker.visit_definition_listcCs tj‚dS)N)rrý)r$r:r%r%r&r}5szSimpleListChecker.visit_docinfocCs tj‚dS)N)rrý)r$r:r%r%r&ru8sN)r(r)r*rørºrur}r%r%r%r&rüs rü)røZ __docformat__Úos.pathr,rtrrrrZdocutils.transformsrZdocutils.writersrrr#rür%r%r%r&Ú s  |