
    dd                    2   d Z ddlZddlZddlZddlZddlZddlmZ ddlm	Z	 ddl
Z
ddlZddlmZmZmZmZmZ ddlmZ ddlmZ ddlmZ dd	lmZmZmZmZmZ  G d
 dej:                        Z G d dej<                        Z G d dej@                        Z!y)z,common definitions for Docutils HTML writers    N)unquote)url2pathname)frontend	languagesnodesutilswriters) length_or_percentage_or_unitless)PIL)
writer_aux)unichar2texpick_math_environment	math2htmllatex2mathmltex2mathml_externc                   L    e Zd ZdZ	 ddddgddifdd	gd
dej
                  dfddgddej
                  dfddgdej
                  dfddgddej                  dfddgdddfdd gd!j                         d"d#d$fd%d&gd'd(gd(d)d*d+fd,d-gg d.d/d)d$fd0d1gd2dej                  dfd3d4gd5ddfd6d7gd2dej                  dfd8d9gd:ddfd;d<gd=d>ifd?d@gd=dAifdBdCgdDdej                  dfdEdFgdGddfdHdIgdej                  dJfffZdKdLiZ	dMZ
dNZdOZ fdPZdQ ZdR ZdS ZdT Z xZS )UWriter)htmlxhtmlzHTML Writer OptionsNzFSpecify the template file (UTF-8 encoded). (default: writer dependent)z
--templatemetavarz<file>zhComma separated list of stylesheet URLs. Overrides previous --stylesheet and --stylesheet-path settings.z--stylesheetz<URL[,URL,...]>stylesheet_path)r   	overrides	validatorzComma 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: writer dependent)z--stylesheet-pathz<file[,file,...]>
stylesheetzComma-separated list of directories where stylesheets are found. Used by --stylesheet-path when expanding relative path arguments. (default: writer dependent)z--stylesheet-dirsz<dir[,dir,...]>)r   r   zvEmbed the stylesheet(s) in the output HTML file.  The stylesheet files must be accessible during processing. (default)z--embed-stylesheet   
store_true)defaultactionr   z3Link to the stylesheet(s) in the output HTML file. z--link-stylesheetembed_stylesheetstore_false)destr   z}Specify the initial header level. Does not affect document title & subtitle (see --no-doc-title).(default: writer dependent).z--initial-header-levelz1 2 3 4 5 62z<level>)choicesr   r   zYFormat for footnote references: one of "superscript" or "brackets". (default: "brackets")z--footnote-referencessuperscriptbracketsz<format>trim_footnote_reference_space)r#   r   r   r   zyFormat for block quote attributions: one of "dash" (em-dash prefix), "parentheses"/"parens", or "none". (default: "dash")z--attributiondashparenthesesparensnoner(   zgRemove extra vertical whitespace between items of "simple" bullet lists and enumerated lists. (default)z--compact-listsTz3Disable compact simple bullet and enumerated lists.z--no-compact-listscompact_listszORemove extra vertical whitespace between items of simple field lists. (default)z--compact-field-listsz#Disable compact simple field lists.z--no-compact-field-listscompact_field_listszAdded to standard table classes. Defined styles: borderless, booktabs, align-left, align-center, align-right, colwidths-auto, colwidths-grid.z--table-styler    zmMath output format (one of "MathML", "HTML", "MathJax", or "LaTeX") and option(s). (default: "HTML math.css")z--math-outputzHTML math.csszPrepend an XML declaration. z--xml-declarationFzOmit the XML declaration.z--no-xml-declarationxml_declarationzyObfuscate email addresses to confuse harvesters while still keeping email links usable with standards-compliant browsers.z--cloak-email-addresses)r   r   output_encoding_error_handlerxmlcharrefreplacezhtml base writer)r	   zhtml writers)head_prefixheadr   body_prefixbody_pre_docinfodocinfobodybody_suffixtitlesubtitleheaderfootermetafragmenthtml_prolog	html_head
html_titlehtml_subtitle	html_bodyc                 D    t         |          t        j                  gz   S N)superget_transformsr   Admonitions)self	__class__s    =/usr/lib/python3/dist-packages/docutils/writers/_html_base.pyrG   zWriter.get_transforms   s    w%':+A+A*BBB    c           	          | j                  | j                        x| _        }| j                  j                  |       | j                  D ]  }t        | |t        ||              | j                         | _        y rE   )	translator_classdocumentvisitor	walkaboutvisitor_attributessetattrgetattrapply_templateoutput)rI   rP   attrs      rK   	translatezWriter.translate   sg    !%!6!6t}}!EEw(++ 	8DD$ 67	8))+rL   c                     t        | j                  j                  j                  d      5 }|j	                         }d d d        | j                         }|z  S # 1 sw Y   xY w)Nutf-8encoding)openrO   settingstemplatereadinterpolation_dict)rI   fpr_   subss       rK   rU   zWriter.apply_template   sV    $--((11GD 	!wwyH	!&&($	! 	!s   AA#c                     i }| j                   j                  }| j                  D ]/  }dj                  t	        | |            j                  d      ||<   1 |j                  |d<   t        j                  |d<   |S )Nr.   
r\   version)	rO   r^   rR   joinrT   rstripoutput_encodingdocutils__version__)rI   rc   r^   rW   s       rK   ra   zWriter.interpolation_dict   su    ==))++ 	CDt!45<<TBDJ	C#33Z"..YrL   c                     t         j                  j                  |        | j                  D ]*  }dj	                  t        | |            | j                  |<   , y Nr.   )r	   r   assemble_partsrR   rg   rT   parts)rI   parts     rK   rn   zWriter.assemble_parts   sG    %%d+++ 	<D!wwwtT':;DJJt	<rL   )__name__
__module____qualname__	supportedr   validate_comma_separated_listvalidate_booleansplitsettings_specsettings_defaultsconfig_sectionconfig_section_dependenciesrR   rG   rX   rU   ra   rn   __classcell__)rJ   s   @rK   r   r   %   s   !I' 	(.h

!L
'6G >>@
A
(
 
) >>@
A( 
' >>@	
AB
 < 113
4
 @
%
?
A) $
$#))+!	
"."
#$j1j 79
: 
?5	
62
l 113
4
 @
 "m
<
>"
#l 113
4
 0%
&(M
B
D, 
b/
' 
o
&	
(
 )
| 113
4 &!
"$
>
@J$
%!0I0I
J
LgW	[
Mz 9:MN'N"=C,<rL   r   c                      e Zd ZdZdZeZdZdZdej                   dZ
ddd	Zd
ZdZ	 dZdZ ej"                  d      Z ej"                  d      ZdZ ed      d ed      d ed      d ed      d ed      diZ	 d Zd Zd Zd Zd Z ej"                  d       fd!Zdd#Zdd$Zdd%Zdd&Z d' Z!d( Z"d) Z#d* Z$d+ Z%d, Z&d- Z'd. Z(d/ Z)dd0Z*d1d2d2d3d4Z+d5 Z,d6 Z-d7 Z.d8 Z/d9 Z0d: Z1d; Z2d< Z3d= Z4d> Z5d? Z6d@ Z7dA Z8dB Z9dC Z:dD Z;dE Z<dF Z=dG Z>dH Z?dI Z@dJ ZA ej"                  dK      j                  fdLZCdM ZDdN ZEdO ZFdP ZGdQ ZHdR ZIdS ZJdT ZKdU ZLdV ZMdW ZNdX ZOdY ZPdZ ZQd[ ZRd\ ZSd] ZTd^ ZUd_ ZVd` ZWda ZXdb ZYddcZZdd Z[de Z\df Z]dg Z^dh Z_di Z`dj Zadk Zbdl Zcdm Zddn Zedo Zfdp Zgdq Zhdr Zids Zjdt Zkdu Zldv Zmdw Zndx Zody Zpdz Zqd{ Zrd| Zsd} Ztd~ Zud Zvd Zwd Zxd Zyd Zzd Z{d Z|d Z}d Z~d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdddddZddZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdÄ ZdĄ Zdń ZdƄ ZdǄ ZdȄ ZdɄ Zdʄ Zd˄ Zd̄ Zd̈́ Zd΄ Zdτ ZdЄ Zdф Zd҄ Zdӄ ZdԄ ZdՄ Zdք Zdׄ Zd؄ Zdل Zdڄ Zdۄ Zd܄ Zd݄ Zdބ Zd߄ Zd Zd Zd Zd Zd Zy")HTMLTranslatorai  
    Generic Docutils to HTML translator.

    See the `html4css1` and `html5_polyglot` writers for full featured
    HTML writers.

    .. IMPORTANT::
      The `visit_*` and `depart_*` methods use a
      heterogeneous stack, `self.context`.
      When subclassing, make sure to be consistent in its use!

      Examples for robust coding:

      a) Override both `visit_*` and `depart_*` methods, don't call the
         parent functions.

      b) Extend both and unconditionally call the parent functions::

           def visit_example(self, node):
               if foo:
                   self.body.append('<div class="foo">')
               html4css1.HTMLTranslator.visit_example(self, node)

           def depart_example(self, node):
               html4css1.HTMLTranslator.depart_example(self, node)
               if foo:
                   self.body.append('</div>')

      c) Extend both, calling the parent functions under the same
         conditions::

           def visit_example(self, node):
               if foo:
                   self.body.append('<div class="foo">
')
               else: # call the parent method
                   _html_base.HTMLTranslator.visit_example(self, node)

           def depart_example(self, node):
               if foo:
                   self.body.append('</div>
')
               else: # call the parent method
                   _html_base.HTMLTranslator.depart_example(self, node)

      d) Extend one method (call the parent), but don't otherwise use the
         `self.context` stack::

           def depart_example(self, node):
               _html_base.HTMLTranslator.depart_example(self, node)
               if foo:
                   # implementation-specific code
                   # that does not use `self.context`
                   self.body.append('</div>
')

      This way, changes in stack use will not bite you.
    z<!DOCTYPE html>
zW<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%(lang)s" lang="%(lang)s">
<head>
z<meta charset="%s" />
z)<meta name="generator" content="Docutils z': https://docutils.sourceforge.io/" />
divrO   )tagnameCLASSz2<script type="text/javascript" src="%s"></script>
z-file:/usr/share/javascript/mathjax/MathJax.jsz4<link rel="stylesheet" href="%s" type="text/css" />
z%<style type="text/css">

%s
</style>
z[^ \n]+| +|\nz.+\W\W.+|[-?].+lang&z&amp;<z&lt;"z&quot;>z&gt;@&#64;c                    t         j                  j                  | |       |j                  x| _        }t	        j
                  |j                  |j                        | _        t        |j                        | _
        t        |dd       | _        t        |dd       du r/t        j                  dt        d       | j                  d| _        t        |dd       du rt        j                  d	t        d       | j                  d
| _        |j                   j#                         | _        | j                   dd  | _        | j                   d   j'                         | _        g | _        dg| _        g | _        dg| _        g | _        g | _        g | _        g | _        g | _        g | _        g | _        | j>                  g| _         g | _!        g | _"        g | _#        | jH                  g| _%        tM        jN                  |      D cg c]  }| jQ                  |       c}| _)        g | _*        g | _+        |jX                  rf| j8                  j[                  tM        jX                  |j\                               | jB                  j[                  tM        jX                  d             |j\                  rP|j\                  j'                         dk7  r3| jJ                  j_                  d| j>                  |j\                  z         g | _0        	 d| _1        g | _2        d| _3        d| _4        d| _5        d| _6        d| _7        d| _8        d| _9        d| _:        g | _;        y c c}w )Nimage_loadingembed_imagesTzeThe configuration setting "embed_images" will be removed in Docutils 2.0. Use "image_loading: embed".   )
stacklevelembedFzdThe configuration setting "embed_images" will be removed in Docutils 2.0. Use "image_loading: link".linkr   r   z</head>
<body>
z</body>
</html>
z%sunicode)<r   NodeVisitor__init__r^   r   get_languagelanguage_codereporterlanguageintinitial_header_levelrT   r   warningswarnFutureWarningmath_outputrw   math_output_optionslowerr7   r4   r5   r8   r6   r<   r>   r3   r2   r;   rC   content_typer@   r?   rB   rA   	generatorr=   r   get_stylesheet_liststylesheet_callr   r9   r:   r/   appendri   insertcontextsection_levelcolspecs	compact_pcompact_simplecompact_field_list
in_docinfo
in_sidebarin_document_title	in_mailtoauthor_in_authorsmath_header)rI   rO   r^   paths       rK   r   zHTMLTranslator.__init__  s   ""42#+#4#44!..$22H4E4EG$'(E(E$F!$XE8^T2d:MM 8 (A7 !!)%,"8^T2e;MM 7 (A7 %!'D#//557#'#3#3AB#7 ++A.446 	/0 "01	++,^^$	','@'@'JL#  //5 L
####%%h&>&>?A##%%d+-$$((..0I=IIQ 1 1H4L4L LM 	
 #"'!"!&?Ls   ?Mc                     dj                  | j                  | j                  z   | j                  z   | j                  z   | j
                  z   | j                  z   | j                  z   | j                  z         S rm   )	rg   r2   r3   r   r4   r5   r6   r7   r8   rI   s    rK   astextzHTMLTranslator.astexth  sv    wwt''$))3)+/+;+;<../15> # &*%5%56 7 	7rL   c                 N    t        |      }|j                  | j                        S )z-Encode special characters in `text` & return.)strrX   special_characters)rI   texts     rK   encodezHTMLTranslator.encoden  s"    
 4y~~d5566rL   c                 &    |j                  dd      S )z*Try to hide a mailto: URL from harvesters.r   %40replace)rI   uris     rK   cloak_mailtozHTMLTranslator.cloak_mailtov  s    
 {{3&&rL   c                 J    |j                  dd      }|j                  dd      S )z;Try to hide the link text of a email link from harversters.r   z<span>&#64;</span>.z<span>&#46;</span>r   )rI   addrs     rK   cloak_emailzHTMLTranslator.cloak_email}  s'     ||G%9:||C!566rL   z[
	]c                     | j                  |j                  d|            }| j                  r:| j                  j                  r$|j                  dd      }|j                  dd      }|S )z6Cleanse, HTML encode, and return attribute value text. r   z&#37;&#52;&#48;r   z&#46;)r   subr   r^   cloak_email_addressesr   )rI   r   
whitespaceencodeds       rK   attvalzHTMLTranslator.attval  sV     ++jnnS$78>>dmmAAooe->?Gooc73GrL   Nc                 \   |t        | j                  j                        }| j                  j                  r[	 t	        |d      5 }|j                         }ddd       | j                  j                  j                  |       | j                  z  S |r*t        j                  | j                  j                  |      }| j                   | j#                  |      z  S # 1 sw Y   xY w# t        $ r9}d| }| j                  j                  j                  |       d|z  cY d}~S d}~ww xY w)z8Return code to reference or embed stylesheet file `path`NrZ   r[   zCannot embed stylesheet: z<--- %s --->
)boolr^   r   r   r]   r`   record_dependenciesaddOSErrorrO   r   errorembedded_stylesheetr   relative_path_destinationstylesheet_linkr   )rI   r   adjust_pathfcontenterrmsgs          rK   r   zHTMLTranslator.stylesheet_call  s    t}}<<=K==))<$1 'QffhG' 1155d;++g55&&t}}'A'A4HD##dkk$&777' ' .1#7&&,,S1'#--.s5   C) CC) C&"C) )	D+2.D& D+&D+c           
         |j                         }g }i }|j                         D ]  \  }}	|	||j                         <    |j                  dg       }
g }|j                  dg       |j                  dd      j	                         z   D ]P  }|j                  d      r |j                  |dd        *|j                         s;||
vs@|
j                  |       R |r|d   || j                  <   d}t        |t        j                        r|
D cg c]	  }||vs| }
}|
rd	j                  |
      |d<   d
|vsJ |j                  dg       }|j                  |j                  dg              |rj|d   |d
<   |dd D ]Z  }|s9t        |t        j                  t        j                  t        j                  f      r|j                  d|z         S|d|z  z  }\ t!        |j                               }|g}|D ]  \  }}	|	J t        |	t"              r\|	D cg c]  }t%        |       }}|j                  |j                         d| j'                  d	j                  |            d       v|j                  |j                         d| j'                  t%        |	            d        |rd}nd}dj                  |      dd	j                  |      |dz   |z   S c c}w c c}w )z
        Construct and return a start tag given a node (id & class attributes
        are extracted), tag name, and optional attributes.
        classesclassr.   z	language-	   Nr   )colwidths-autocolwidths-givencolwidths-gridr   ididsr   z<span id="%s"></span>z="r   z /r   r   )r   itemspopgetrw   
startswithr   striplang_attribute
isinstancer   tablerg   extend
Sequentialr6   sortedlistr   r   )rI   noder   suffixempty
attributesprefixattsnamevaluer   r   clsinternalr   r   attlistro   vvaluesinfixs                        rK   starttagzHTMLTranslator.starttag  s   
 --/'--/ 	'MT5!&D	'((9b)	88Ir*TXXgr-B-H-H-JJ 	$C~~k* 	  QR)G!3s#		$
 (1!D$$%JdEKK(&-EsH1DsEGEHHW-DM4hhub!

488E2&'QDJ!"g ; Jte.>.>.3mm.3kk.; < MM"9B">? 5::F; &	" 
	DKD% $$$%&*/0Q#a&00$**,*.++chhv6F*GI J $**,*.++c%j*AC D
	D EEwwvSXXe_e!DDvMMQ F< 1s   	KKK$c                 0     | j                   |||fddi|S )z1Construct and return an XML-compatible empty tag.r   T)r   )rI   r   r   r   r   s        rK   emptytagzHTMLTranslator.emptytag  s!    t}}T7FM$M*MMrL   c                     |D cg c]  }t        |t        j                        r|! }}	 ||   }|d   j	                  |       yc c}w # t        $ r Y yw xY w)z
        Set class `class_` on the visible child no. index of `node`.
        Do nothing if node has fewer children than `index`.
        Nr   )r   r   	Invisible
IndexErrorr   )rI   r   class_indexnchildrenchilds          rK   set_class_on_childz!HTMLTranslator.set_class_on_child  sa    
  $J!:a+IAJJ	UOE 	i' K  		s   AAA 	AAc                     |j                         }| j                  |      }| j                  r'| j                  j                  r| j                  |      }| j                  j                  |       y rE   )r   r   r   r^   r   r   r7   r   )rI   r   r   r   s       rK   
visit_TextzHTMLTranslator.visit_Text  sP    {{}++d#>>dmmAA&&w/G		!rL   c                      y rE    rI   r   s     rK   depart_TextzHTMLTranslator.depart_Text      rL   c                 \    | j                   j                  | j                  |dd             y )Nabbrr.   r7   r   r   r  s     rK   visit_abbreviationz!HTMLTranslator.visit_abbreviation  s!    		tVR89rL   c                 :    | j                   j                  d       y )Nz</abbr>r7   r   r  s     rK   depart_abbreviationz"HTMLTranslator.depart_abbreviation      		#rL   c                 \    | j                   j                  | j                  |dd             y )Nacronymr.   r  r  s     rK   visit_acronymzHTMLTranslator.visit_acronym  s!    		tY;<rL   c                 :    | j                   j                  d       y )Nz
</acronym>r  r  s     rK   depart_acronymzHTMLTranslator.depart_acronym
      		&rL   c                     | j                  |dd       | j                  j                  | j                  |ddd             y )NaddressFr=   prer.   r   r   )visit_docinfo_itemr7   r   r   r  s     rK   visit_addresszHTMLTranslator.visit_address  sD    ie<		tU.0	 ' C 	DrL   c                 Z    | j                   j                  d       | j                          y N
</pre>
)r7   r   depart_docinfo_itemr  s     rK   depart_addresszHTMLTranslator.depart_address  s     		&  "rL   c                 `    | j                   j                  | j                  |ddg             y )Naside
admonitionr   r  r  s     rK   visit_admonitionzHTMLTranslator.visit_admonition  s%    		tW|nMNrL   c                 :    | j                   j                  d       y N	</aside>
r  r  s     rK   depart_admonitionz HTMLTranslator.depart_admonition  r  rL   )u   —r.   )())r.   r.   r'   c                     | j                   | j                  j                     \  }}| j                  j	                  |       | j
                  j	                  | j                  |d|d             y )Npattributionr   )attribution_formatsr^   r7  r   r   r7   r   )rI   r   r   r   s       rK   visit_attributionz HTMLTranslator.visit_attribution!  sY    11$--2K2KLF#		MM$V=MA	CrL   c                 p    | j                   j                  | j                  j                         dz          y N</p>
r7   r   r   r   r  s     rK   depart_attributionz!HTMLTranslator.depart_attribution'  s&    		))+h67rL   c                     t        |j                  t        j                        s| j	                  |d       | j
                  j                  d       y )Nauthorz<p>)r   parentr   authorsr#  r7   r   r  s     rK   visit_authorzHTMLTranslator.visit_author*  s6    $++u}}5##D(3		rL   c                     | j                   j                  d       t        |j                  t        j
                        r| j                   j                  d       y | j                          y )N</p>re   )r7   r   r   rB  r   rC  r(  r  s     rK   depart_authorzHTMLTranslator.depart_author/  sD    		 dkk5==1IIT"$$&rL   c                 (    | j                  |d       y )NrC  r#  r  s     rK   visit_authorszHTMLTranslator.visit_authors6  s    i0rL   c                 $    | j                          y rE   r(  r  s     rK   depart_authorszHTMLTranslator.depart_authors9        "rL   c                 Z    | j                   j                  | j                  |d             y )N
blockquoter  r  s     rK   visit_block_quotez HTMLTranslator.visit_block_quote<  s    		t\:;rL   c                 :    | j                   j                  d       y )Nz</blockquote>
r  r  s     rK   depart_block_quotez!HTMLTranslator.depart_block_quote?  s    		*+rL   c                     t        | j                        }	 |j                  |       y# t        j                  $ r Y yw xY w)z7Check for a simple list that can be rendered compactly.TF)SimpleListCheckerrO   walkr   	NodeFound)rI   r   rP   s      rK   check_simple_listz HTMLTranslator.check_simple_listB  s>    #DMM2	IIg   		s   ) ??c                 l   d|d   v ryd|d   v ryt        |t        j                  t        j                  f      r| j                  j
                  syt        |t        j                  t        j                  f      r| j                  j                  syd|j                  d   v ry| j                  |      S )Ncompactr   Tr]   Fcontents)r   r   
field_listdefinition_listr^   r-   enumerated_listbullet_listr,   rB  rX  r  s     rK   is_compactablezHTMLTranslator.is_compactableS  s    Y'T)_$te..0E0EFGMM55te33U5F5FGHMM//Y//%%d++rL   c                 <   i }| j                   }| j                  j                  | j                   | j                  f       d | _        | j	                  |      | _         | j                   r|sd|d<   | j
                  j                   | j                  |dfi |       y )Nsimpler   ul)r   r   r   r   r`  r7   r   )rI   r   r   old_compact_simples       rK   visit_bullet_listz HTMLTranslator.visit_bullet_listf  s    !00T00$..AB"11$7'9$DM		tT:T:;rL   c                     | j                   j                         \  | _        | _        | j                  j                  d       y )Nz</ul>
)r   r   r   r   r7   r   r  s     rK   depart_bullet_listz!HTMLTranslator.depart_bullet_listp  s0    .2ll.>.>.@+T^		#rL   c                 `    | j                   j                  | j                  |ddd             y )Nr6  r.   captionr8  r  r  s     rK   visit_captionzHTMLTranslator.visit_captiont  s%    		tS"IFGrL   c                 :    | j                   j                  d       y r<  r  r  s     rK   depart_captionzHTMLTranslator.depart_captionw      		"rL   c                     t        |j                         t        |            s| j                  j	                  d       | j                  j	                  | j                  |d|j                  gd             y )Nz(<div role="list" class="citation-list">
r   zdoc-biblioentryr   role)r   previous_siblingtyper7   r   r   r   r  s     rK   visit_citationzHTMLTranslator.visit_citation{  s`     $//14:>IIHI		tUT\\N,= ' ? 	@rL   c                     | j                   j                  d       t        |j                  dd      t	        |            s| j                   j                  d       y y )N</div>
FTdescendsiblingsr7   r   r   	next_noderr  r  s     rK   depart_citationzHTMLTranslator.depart_citation  sI    		$$...Ft*&IIZ(&rL   c           
          d}d|v r	||d   z  }n#d|v r|| j                   j                  |d      z  }| j                  j                  | j	                  |dd|dgd             y )	N#refidrefnamea[zcitation-referencezdoc-biblioref)r   hrefr   rp  )rO   nameidsr7   r   r   )rI   r   r  s      rK   visit_citation_referencez'HTMLTranslator.visit_citation_reference  sv    d?DM!D$DMM))$y/::D 			tS40D/E,; ' = 	>rL   c                 :    | j                   j                  d       y )Nz]</a>r  r  s     rK   depart_citation_referencez(HTMLTranslator.depart_citation_reference      		!rL   c                 `    | j                   j                  | j                  |ddd             y )Nspanr.   
classifierr8  r  r  s     rK   visit_classifierzHTMLTranslator.visit_classifier  s%    		tVR|LMrL   c                 :    | j                   j                  d       y N</span>r  r  s     rK   depart_classifierz HTMLTranslator.depart_classifier  r  rL   c                     | j                   j                  |       |j                  j                  j                  |j                  j                  d             y )Nstub)r   r   rB  stubsr   r   r  s     rK   visit_colspeczHTMLTranslator.visit_colspec  s;    T"  !4!4V!<=rL   c           
      R   t        |j                  dd      t        j                        ry d|j                  j                  d   v s3d| j
                  j                  vrd|j                  j                  d   vry | j                  j                  | j                  |d             t        d	 | j                  D              }| j                  D ];  }|d
   |z  }| j                  j                  | j                  |dd|d             = | j                  j                  d       y )NFTrv  r   r   r   r   colgroupc              3   &   K   | ]	  }|d      yw)colwidthNr  ).0r   s     rK   	<genexpr>z0HTMLTranslator.depart_colspec.<locals>.<genexpr>  s     Et$z*Es   r  colzwidth: z.1%)stylez</colgroup>
)r   rz  r   colspecrB  r^   table_styler7   r   r   sumr   r   )rI   r   total_widthr  s       rK   depart_colspeczHTMLTranslator.depart_colspec  s   dnnUTnBmm%t{{11)<<DMM$=$==!););I)FF		tZ89Et}}EEMM 	LDJ'+5HIIT]]43:8C.1I + K L	L 			)rL   z-(?=-)c                     | j                   j                  d |d|j                               z         t        j                  )z%Escape double-dashes in comment text.z<!-- %s -->
z- )r7   r   r   r   SkipNode)rI   r   r   s      rK   visit_commentzHTMLTranslator.visit_comment  s2     			3tT[[]+CCDnnrL   c                 ^    | j                   j                  | j                  |dd             y )Nr   compoundr8  r  r  s     rK   visit_compoundzHTMLTranslator.visit_compound  s#    		tU*EFrL   c                 :    | j                   j                  d       y Nru  r  r  s     rK   depart_compoundzHTMLTranslator.depart_compound      		$rL   c                 ^    | j                   j                  | j                  |dd             y )Nr   zdocutils containerr8  r  r  s     rK   visit_containerzHTMLTranslator.visit_container  s-    		tU-A ' C 	DrL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_containerzHTMLTranslator.depart_container  r  rL   c                 ,    | j                  |dd       y )NcontactFr   rI  r  s     rK   visit_contactzHTMLTranslator.visit_contact      ie<rL   c                 $    | j                          y rE   rL  r  s     rK   depart_contactzHTMLTranslator.depart_contact  rN  rL   c                 (    | j                  |d       y )N	copyrightrI  r  s     rK   visit_copyrightzHTMLTranslator.visit_copyright  s    k2rL   c                 $    | j                          y rE   rL  r  s     rK   depart_copyrightzHTMLTranslator.depart_copyright  rN  rL   c                 (    | j                  |d       y )NdaterI  r  s     rK   
visit_datezHTMLTranslator.visit_date  s    f-rL   c                 $    | j                          y rE   rL  r  s     rK   depart_datezHTMLTranslator.depart_date  rN  rL   c                      y rE   r  r  s     rK   visit_decorationzHTMLTranslator.visit_decoration  r  rL   c                      y rE   r  r  s     rK   depart_decorationz HTMLTranslator.depart_decoration  r  rL   c                     d|j                   j                   d   v r| j                  j                  d       y | j                  j                  d       | j                  j                  | j                  |dd             y )Ndetailsr   z</summary>
z</dt>
ddr.   rB  r7   r   r   r  s     rK   visit_definitionzHTMLTranslator.visit_definition  s\    **955II^,IIY'IIT]]4r:;rL   c                 r    d|j                   j                   d   vr| j                  j                  d       y y )Nr  r   </dd>
rB  r7   r   r  s     rK   depart_definitionz HTMLTranslator.depart_definition  s0    DKK..y99IIY' :rL   c                     d|d   v r,| j                   j                  | j                  |d             y | j                  |      rdgng }| j                   j                  | j                  |d|             y )Nr  r   r   rb  dlr-  )r7   r   r   r`  rI   r   r   s      rK   visit_definition_listz$HTMLTranslator.visit_definition_list  sb    Y'IIT]]478$($7$7$=xj2GIIT]]4w]GHrL   c                     d|d   v r| j                   j                  d       y | j                   j                  d       y )Nr  r   ru  </dl>
r  r  s     rK   depart_definition_listz%HTMLTranslator.depart_definition_list  s2    Y'IIZ(IIY'rL   c                     d|j                   d   v rFi }d|j                   d   v rd|d<   | j                  j                   | j                  |dfi |       y y )Nr  r   r]   r  rI   r   r   s      rK   visit_definition_list_itemz)HTMLTranslator.visit_definition_list_item  s[    I..DY//%VII]T]]4CdCD	 /rL   c                 ^    d|j                   d   v r| j                  j                  d       y y )Nr  r   z</details>
r  r  s     rK   depart_definition_list_itemz*HTMLTranslator.depart_definition_list_item  s*    I..II^, /rL   c                 \    | j                   j                  | j                  |dd             y )Nr  r.   r  r  s     rK   visit_descriptionz HTMLTranslator.visit_description
  !    		tT267rL   c                 :    | j                   j                  d       y Nr  r  r  s     rK   depart_descriptionz!HTMLTranslator.depart_description  r  rL   c                    | j                   j                  t        | j                               dg}| j	                  |      r|j                  d       | j                  j                  | j                  |d|             y )Nr6   rb  r  r-  )r   r   lenr7   r`  r   r  s      rK   visit_docinfozHTMLTranslator.visit_docinfo  s^    C		N++t$NN8$		tT7CDrL   c                     | j                   j                  d       | j                  j                         }| j                   |d  | _        g | _         y Nr  )r7   r   r   r   r6   )rI   r   starts      rK   depart_docinfozHTMLTranslator.depart_docinfo  s?    		#  "yy(	rL   c           	      T   |r?| j                   j                  d| d| j                  |j                                d       | j                  j                  d| d| j
                  j                  |    d       | j                  j                  | j                  |dd|	             y )
Nz<meta name="z" content="z" />
z<dt class="">"<span class="colon">:</span></dt>
r  r.   r8  )r=   r   r   r   r7   r   labelsr   )rI   r   r   r=   s       rK   r#  z!HTMLTranslator.visit_docinfo_item  s    II|D6 2))-T[[])C(DFL M		;tfBt}}/C/CD/I.J>? 	@		tT2TBCrL   c                 :    | j                   j                  d       y r  r  r   s    rK   r(  z"HTMLTranslator.depart_docinfo_item%  r  rL   c           	      d    | j                   j                  | j                  |ddg d             y )Nr!  r.   )codepythondoctest)r   r   r  r  s     rK   visit_doctest_blockz"HTMLTranslator.visit_doctest_block(  s/    		tU2/L ' N 	OrL   c                 :    | j                   j                  d       y r&  r  r  s     rK   depart_doctest_blockz#HTMLTranslator.depart_doctest_block,  r  rL   c                     |j                  d      xs& t        j                  j                  |d         xs d}| j                  j                  d| j                  |       d       y )Nr9   sourcezuntitled Docutils documentz<title>z	</title>
)r   osr   basenamer3   r   r   )rI   r   r9   s      rK   visit_documentzHTMLTranslator.visit_document/  sZ    '" 1bgg&6&6tH~&F 10 			74;;u#5"6jABrL   c                    | j                   j                  | j                  | j                  d| j                  j
                  iz  g       | j                  j                  | j                         | j                  d d  | j                  z   | _	        ddj                  | j                        v r| j                  j                  d       | j                  rZ| j                  dk(  r&| j                  j                  | j                         n%| j                  j                  | j                         | j                  j                  | j                  dd         | j                  j                   | j                   |fi | j"                         | j$                  j'                  dd| j"                  d	    d
       | j(                  j                  | j*                         | j,                  j                  | j                  dd  | j.                  z   | j0                  z   | j*                  z   | j$                  d d z          | j2                  rJ dt5        | j2                                y )Nr   zname="dcterms.r.   z=<link rel="schema.dcterms" href="http://purl.org/dc/terms/"/>mathjaxr   r   z</r   z>
zlen(context) = )r2   r   doctypehead_prefix_templater^   r   r?   r   r=   r3   rg   r   r   r   r@   r4   r   documenttag_argsr8   r   r>   r7   rC   r5   r6   r   r  r  s     rK   depart_documentzHTMLTranslator.depart_document4  s   !%!:!:"($--*E*E!F"G!H 	I 	-IIaL499,	rwwtyy11II C D9,		  !1!12&&t'7'78diim,d Ld6K6K LMR(=(=i(H'I#MNTYY'd..qr2T5J5JJ $-/3yy9 $ 0 0" 56 	7 <<F?3t||3D2E!FF<rL   c                 \    | j                   j                  | j                  |dd             y )Nemr.   r  r  s     rK   visit_emphasiszHTMLTranslator.visit_emphasisL  r  rL   c                 :    | j                   j                  d       y )Nz</em>r  r  s     rK   depart_emphasiszHTMLTranslator.depart_emphasisO  r  rL   c                    dg i}t        |j                  j                  t        j                        r|d   j	                  d       |j                  j                  j                  j
                  |j                  j                     r|d   j	                  d       |d   rd}nd}|j                  xj                  dz  c_        d|v r|d   dz   |d<   d	|v r-|d	   dz   |d
<   |j                  xj                  |d	   z  c_        | j                  j	                   | j                  ||dfi |       | j                  j	                  d|j                         z         y )Nr   r3   r  thtdr   morerowsrowspanmorecolscolspanr.   </%s>
)r   rB  r   theadr   r  columnr7   r   r   r   )rI   r   r   r   s       rK   visit_entryzHTMLTranslator.visit_entryR  s(   2dkk((%++6O""6*;;$$**4;;+=+=>O""6*	?GGa":.2DO":.2DOKK$z"22		tWbADABI78rL   c                 j    | j                   j                  | j                  j                                y rE   r>  r  s     rK   depart_entryzHTMLTranslator.depart_entryf  !    		))+,rL   c                     dg i}d|v r|d   |d<   d|v r|d   j                  |d          | j                  |      r|d   j                  d       | j                  j                   | j                  |dfi |       y )Nr   r  enumtyperb  ol)r   r`  r7   r   r  s      rK   visit_enumerated_listz$HTMLTranslator.visit_enumerated_listi  s    2d? MDMO""4
#34t$O""8,		tT:T:;rL   c                 :    | j                   j                  d       y )Nz</ol>
r  r  s     rK   depart_enumerated_listz%HTMLTranslator.depart_enumerated_lists  r  rL   c                    i }|j                  dg       }t        |      D ]A  \  }}|j                  d      s	 t        |dd  d      }d|z  |d<   |j                  |        n |j                  d       | j                  |      r|j                  d       | j                  j                   | j                  |d	fi |       y # t        $ r Y  mw xY w)
Nr   zfield-indent-   pxz--field-indent: %s;r  z
field-listrb  r  )

setdefault	enumerater   r
   
ValueErrorr   r   r`  r7   r   )rI   r   r   r   ir   indent_lengths          rK   visit_field_listzHTMLTranslator.visit_field_listv  s    //)R0( 		FAs~~o.$D8;BC$%HM !6 EWA		 	|$t$NN8$		tT:T:; " s   C	CCc                 :    | j                   j                  d       y r  r  r  s     rK   depart_field_listz HTMLTranslator.depart_field_list  r  rL   c                      y rE   r  r  s     rK   visit_fieldzHTMLTranslator.visit_field  r  rL   c                      y rE   r  r  s     rK   depart_fieldzHTMLTranslator.depart_field  r  rL   c           	      z    | j                   j                  | j                  |dd|j                  d                y )Ndtr.   r   r-  )r7   r   r   rB  r  s     rK   visit_field_namezHTMLTranslator.visit_field_name  s8    		tT2/3{{9/E ' G 	HrL   c                 :    | j                   j                  d       y )Nr  r  r  s     rK   depart_field_namez HTMLTranslator.depart_field_name  s    		>?rL   c           	          | j                   j                  | j                  |dd|j                  d                |j                  s| j                   j                  d       y y )Nr  r.   r   r-  z<p></p>)r7   r   r   rB  r  r  s     rK   visit_field_bodyzHTMLTranslator.visit_field_body  sX    		tT2/3{{9/E ' G 	H }}IIY' rL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_field_bodyz HTMLTranslator.depart_field_body  r  rL   c                     ddi}|j                  d      rd|d   z  |d<   |j                  d      r|dxx   d|d   z   z  cc<   | j                  j                   | j                  |dfi |       y )	Nr   figurewidthz	width: %sr  alignz align-r   )r   r7   r   r   r  s      rK   visit_figurezHTMLTranslator.visit_figure  sq    "88G'$w-7DM88GMYg66M		tU;d;<rL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_figurezHTMLTranslator.depart_figure  r  rL   c                 `    | j                   j                  t        | j                               y rE   r   r   r  r7   r  s     rK   visit_footerzHTMLTranslator.visit_footer      C		N+rL   c                 4   | j                   j                         }| j                  |dd      dg}|j                  | j                  |d         |j                  d       | j                  j                  |       || j                  d d | j                  |d = y )Nr   r<   r8  z<hr class="footer" />
z
</div>
r   )r   r   r   r   r7   r   r<   r8   )rI   r   r  r<   s       rK   depart_footerzHTMLTranslator.depart_footer  s      "--e8-<+-dii'(l#6"%!IIefrL   c                 (   | j                   j                  }t        |j                         t	        |            s| j
                  j                  d| d       | j
                  j                  | j                  |d|j                  |gd             y )Nz<aside class="footnote-list z">
r+  zdoc-footnotero  )	r^   footnote_referencesr   rq  rr  r7   r   r   r   )rI   r   label_styles      rK   visit_footnotezHTMLTranslator.visit_footnote  s{     mm77$//14:>II;K=MN		tW04k/J,: ' < 	=rL   c                     | j                   j                  d       t        |j                  dd      t	        |            s| j                   j                  d       y y )Nr1  FTrv  ry  r  s     rK   depart_footnotezHTMLTranslator.depart_footnote  sI    		&$...Ft*&II\*&rL   c           
          d|d   z   }d| j                   j                  g}| j                  j                  | j	                  |dd|d|             | j                  j                  d       y )	Nr}  r~  zfootnote-referencer  r.   zdoc-noteref)r   r   rp  r  !<span class="fn-bracket">[</span>)r^   r<  r7   r   r   )rI   r   r  r   s       rK   visit_footnote_referencez'HTMLTranslator.visit_footnote_reference  sh    T']"')J)JK		tSW,9 ' F 	G		<=rL   c                 p    | j                   j                  d       | j                   j                  d       y )Nz!<span class="fn-bracket">]</span></a>r  r  s     rK   depart_footnote_referencez(HTMLTranslator.depart_footnote_reference  s'    		<=		 rL   c                     d|d   v r\|j                         j                  d      }| j                  j                  d| j	                  |      z         t
        j                  y )Nsectnumr       z <span class="sectnum">%s </span>)r   rh   r7   r   r   r   r  )rI   r   rH  s      rK   visit_generatedzHTMLTranslator.visit_generated  s[    Y'kkm**40GII?#{{734 5 ..  (rL   c                      y rE   r  r  s     rK   depart_generatedzHTMLTranslator.depart_generated  r  rL   c                 `    | j                   j                  t        | j                               y rE   r6  r  s     rK   visit_headerzHTMLTranslator.visit_header  r8  rL   c                 J   | j                   j                         }| j                  |dd      g}|j                  | j                  |d         |j                  d       | j                  j                  |       | j                  j                  |       | j                  |d = y )Nr   r;   r8  z
<hr class="header"/>
</div>
)r   r   r   r   r7   r   r4   r;   )rI   r   r  r;   s       rK   depart_headerzHTMLTranslator.depart_header  s      "--e8-<=dii'(89'6"IIefrL   c                    i }|d   }t        j                  |      d   }d|v r|d   |d<   d|v r|d   |d<   d|v r#t        rd|vsd|vr| j                  j                  rt        |      }	 t        j                  j                  |      5 }|j                  }d d d        | j                  j                  j                  |j                  dd             d|vrdd   z  |d<   d|vrdd	   z  |d<   ~d
D ]f  }||v st        j                  d||         }	|	sJ t!        |	j#                  d	            t!        |d         dz  z  |	j#                  d      ||<   h g }
d
D ]J  }||v st        j                  d||         r||xx   dz  cc<   |
j%                  |d||   d       ||= L |
rdj'                  |
      |d<   t)        |j*                  t,        j.                        sRt)        |j*                  t,        j0                        r1t)        |j*                  j*                  t,        j.                        sd}nd}d|v rd|d   z  |d<   | j2                  dk(  r	 t        t        |      d      5 }|j5                         }d d d        | j                  j                  j                  t7        |             t9        j:                        j=                         }d|d|}n| j2                  dk(  rd|d<   |d k(  r6||d!<    | jF                  |d"dfd#|i||jI                  d$|      z   d%z   |z   }n/|jI                  d$|d         |d$<    | jJ                  |d&|fd'|i|}| jL                  j%                  |       y # 1 sw Y   xY w# t        t        f$ r Y w xY w# 1 sw Y   !xY w# t        $ r?}| j>                  j@                  jC                  d|d|jD                         Y d }~d }~ww xY w)(Nr   r   r0  heightscale\/z%dpxr   )r0  rR  z([0-9.]+)(\S*)$d      z	^[0-9.]+$r  z: ;r   r  r.   re   r1  align-%sr   r   rbzdata:z;base64,zCannot embed image lazyloadingzapplication/x-shockwave-flashrr  objectdataaltz	</object>imgsrc)'	mimetypes
guess_typer   r^   file_insertion_enabledr   Imager]   sizer   r   r   r   UnicodeEncodeErrorrematchfloatgroupr   rg   r   rB  r   TextElement	referencer   r`   unquote_urlbase64	b64encodedecoderO   r   r   strerrorr   r   r   r7   )rI   r   r   r   mimetype	imagepathr`  imgsizeatt_nameri  r  r   	imagefile	imagedatadata64r   tags                    rK   visit_imagezHTMLTranslator.visit_image  s   5k'',Q/d? MDMt!(^DNd?,0DMM88(-		2 +c"%((+
 MM5599!))$46d*(.(;Wt+)/'!*)<X- (t#HH%7hHE L5ekk!n-tG}1E1KLA&(DN	( ) 	#H488L$x.9Nd*N(DNCDN	# HHUODMt{{E$5$564;;8"4;;#5#5u7H7HIFFd?&g6DM(?,s+T2 1i ) 0I1 1155k#6FG
  )))4;;=-5v>6)$DO66#DL 4==xF#FFXXeS)*,78:@AC ((5$u+6DK$--eVEEEC		A+ +!34 N1 1 D&&,,03S\\.C D DDsZ   -N NN !N3 6N&N3 NN N#"N#&N0+N3 3	O;<5O66O;c                      y rE   r  r  s     rK   depart_imagezHTMLTranslator.depart_image@  r  rL   c                 \    | j                   j                  | j                  |dd             y )Nr  r.   r  r  s     rK   visit_inlinezHTMLTranslator.visit_inlineC  !    		tVR89rL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_inlinezHTMLTranslator.depart_inlineF  r  rL   c                 6   | j                   j                  d       | j                   j                  d       | j                  j                  rM|j                  j                  dg       }t        |      dk(  r"| j                   j                  d|d   z         y y y )Nz<span class="label">rB  backrefsr   z"<a role="doc-backlink" href="#%s">r   )r7   r   r^   footnote_backlinksrB  r   r  )rI   r   r  s      rK   visit_labelzHTMLTranslator.visit_labelJ  s    		/0		<===++{{z26H8}!		   "02:1+"> ? " ,rL   c           	         g }| j                   j                  r|j                  j                  d|      }t	        |      dk(  r| j
                  j                  d       | j
                  j                  d       t	        |      dkD  rSt        |d      D cg c]  \  }}d|d|d }}}| j
                  j                  ddj                  |      z         y y c c}}w )	Nr  r   rE  z)<span class="fn-bracket">]</span></span>
z<a role="doc-backlink" href="#r  z#<span class="backrefs">(%s)</span>
,)	r^   r  rB  r   r  r7   r   r  rg   )rI   r   r  r  ref	backlinkss         rK   depart_labelzHTMLTranslator.depart_labelT  s    ==++{{z8<Hx=AIIV$		EFx=1)28Q)?A%a HKAN AI AIIC"xx	23 4 As   Cc                 ^    | j                   j                  | j                  |dd             y )Nr   legendr8  r  r  s     rK   visit_legendzHTMLTranslator.visit_legenda  s#    		tU(CDrL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_legendzHTMLTranslator.depart_legendd  r  rL   c                     | j                   j                  | j                  |ddd             t        |      s| j                   j                  d       y y )Nr   r.   liner"  z<br />)r7   r   r   r  r  s     rK   
visit_linezHTMLTranslator.visit_lineg  sC    		tU2VLM4yIIX& rL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_linezHTMLTranslator.depart_linel  r  rL   c                 ^    | j                   j                  | j                  |dd             y )Nr   z
line-blockr8  r  r  s     rK   visit_line_blockzHTMLTranslator.visit_line_blocko  s#    		tU,GHrL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_line_blockz HTMLTranslator.depart_line_blockr  r  rL   c                 \    | j                   j                  | j                  |dd             y )Nlir.   r  r  s     rK   visit_list_itemzHTMLTranslator.visit_list_itemu  r  rL   c                 :    | j                   j                  d       y )Nz</li>
r  r  s     rK   depart_list_itemzHTMLTranslator.depart_list_itemx  r  rL   c                 2   |d   }d|v rM|j                  |j                  d             | j                  j                  | j	                  |dd             y | j                  j                  | j	                  |ddd             |j                         }t        |j                  t        j                        s|j                  dd      }| j                  j                  |      D ]  }|j                         rI| j                  j                  |      r.| j                  j                  d	| j!                  |      z         \| j                  j                  | j!                  |              | j                  j                  d
       t        j"                  )Nr   r  r.   r  zdocutils literalr8  re   r   z<span class="pre">%s</span>r  )r   r  r7   r   r   r   r   rB  r   literal_blockr   words_and_spacesfindallr   in_word_wrap_pointsearchr   r  )rI   r   r   r   tokens        rK   visit_literalzHTMLTranslator.visit_literal|  s@   y/WKKf-.IIT]]4<=		MM$2DME	G{{}$++u':':;<<c*D **2248 	5E{{}!8!8!?!?!F		  !>#';;u#5"6 7 		  U!34	5 			#nnrL   c                 :    | j                   j                  d       y )N</code>r  r  s     rK   depart_literalzHTMLTranslator.depart_literal  s    		#rL   c                     | j                   j                  | j                  |ddd             d|d   v r| j                   j                  d       y y )Nr!  r.   literal-blockr8  r  r   z<code>r  r  s     rK   visit_literal_blockz"HTMLTranslator.visit_literal_block  sH    		tUBoNOT)_$IIX& %rL   c                 ~    d|d   v r| j                   j                  d       | j                   j                  d       y )Nr  r   r  z</pre>
r  r  s     rK   depart_literal_blockz#HTMLTranslator.depart_literal_block  s2    T)_$IIY'		$rL   )r   r  formula)r!  ttmath)r   r.   r.   )r   r  r  r   latexmathmlr  c           
         | j                   | j                  vr:| j                  j                  j	                  d| j                    d       d| _         | j                  | j                      |dk(     }| j                  | j                      d   }ddddd	}|| j                      |dk7     }| j                   d
k(  r | j
                  r| j
                  d   dk(  rd }|j                         j                  t        j                        }|r		 ||||fz  }| j                   dv r| j                  |      }| j                   dk(  re| j                  sY	 | j
                  d   | _        d| j                  vr| xj                  dz  c_        | j                   | j                  z  g| _        n.| j                   dk(  r| j
                  rv| j                  sj| j
                  d   j#                  d      D cg c]=  }| j%                  t'        j(                  || j*                  j,                        d      ? c}| _        |dk7  t.        j0                  _        t/        j.                  |      }nn| j                   d
k(  r^d| j4                  v r"| j6                  | _        | j8                  | _        dj=                  | j
                        j?                         }		 |	dk(  r+tA        jB                  || j                  j                        }n|	dk(  r+tA        jD                  || j                  j                        }n|	dk(  r.tA        jF                  || | j                  j                        }nq|	dk(  r,tA        jH                  || j                  j                        }n@|	stK        jL                  ||       }n%| j                  j                  j	                  d       |r:| jT                  jW                  | jY                  ||d'tc        |      z  |(             | jT                  jW                  |       |r| jT                  jW                  d'       |r| jT                  jW                  d)|z         |r| jT                  jW                  d'       t^        j`                  # t        $ r	 ||z  }Y w xY w# t        $ r) | j                  j                  j                  d       Y yw xY wc c}w # tN        $ r tO        d      tP        $ rJ}
| j                  j                  j	                  |
|       }| jS                  |       | jT                  jW                  | jY                  |d!             | jT                  jW                  dj=                  |
jZ                               | jT                  jW                  d"       | jT                  jW                  | jY                  |d#d$%             | jT                  jW                  | j                  |             | jT                  jW                  d&       | j]                  |       t^        j`                  d }
~
ww xY w)*Nzmath-output format "z'" not supported falling back to "latex"r  r.   rW  )z$%s$\begin{%s}
%s
\end{%s})NN)z\(%s\)r  r  r  r   	blahtexml)r  r  r  z@No MathJax URL specified, using local fallback (see config.html)?z?config=TeX-AMS_CHTMLr   r  T)r   zXHTML 1r   latexmlttm)inliner   pandoc)r   )r  z3option "%s" not supported with math-output "MathML"zis "latexmlmath" in your PATH?)	base_noder6  r=  r!  r  r8  r'  re   r"  </%s>)2r   	math_tagsrO   r   r   r   r   rX   r   uni2tex_table	TypeErrorr   r   mathjax_urlr  warningmathjax_scriptrw   r   r   find_file_in_dirsr^   stylesheet_dirsr   DocumentParametersdisplaymoder  doctype_mathmlcontent_type_mathmlr   rg   r   r   r  r  r  r  r   
tex2mathmlr   SyntaxErrorvisit_system_messager7   r   r   argsdepart_system_messager   r  r   )rI   r   math_envrz  clsargwrapperswrapper	math_codes	converterr   err_nodes               rK   
visit_mathzHTMLTranslator.visit_math  s    4>>1MM""((&t'7'7&8 9* *+  'DnnT--.x2~> 0 01!4 C)DH 4++,X^<(--,,Q/;>GKKM++K,E,EF	0#xH&EE	 33I.Iy(1A1AD#'#;#;A#>  $***  $;;  $ 3 3d6F6F FGD'''0@0@ "55a8>>sC$E  %)$8$8++At}}/L/LM $ %9 %& $E 
 9ABI((4!++I6I)DLL(#22$($<$<!!9!9:@@BI#%	) 1 9 9$-t}}/E/E!GI%' 1 5 5$-t}}/E/E!GI+- 1 ; ;$-08L-1]]-C-C!EI (* 1 8 8$--1]]-C-C!EI # , 7 7$-8|!FI MM**00 2M N" IIT]]426tH~2E17 + 9 : 			#IIT"IIWs]+IIT"nna  0#i/	0  D&&.. 0C DD$ED  @>?? %==1177t7L))(3		  tS!9:		  #((!34		  *		  tU5D "/ "F G		  Y!78		  .**84nn$%sE   	R R( +ASDS" R%$R%(.SS"Y	?EYY	c                      y rE   r  r  s     rK   depart_mathzHTMLTranslator.depart_math  r  rL   c                 \    t        |j                               }| j                  ||       y )N)r  )r   r   r  )rI   r   r  s      rK   visit_math_blockzHTMLTranslator.visit_math_block   s"    (7x0rL   c                      y rE   r  r  s     rK   depart_math_blockz HTMLTranslator.depart_math_block$  r  rL   c                 z    | j                   j                   | j                  |dfi |j                                y )Nr=   )r=   r   r   non_default_attributesr  s     rK   
visit_metazHTMLTranslator.visit_meta)  s9    		tV H)-)D)D)FH 	IrL   c                      y rE   r  r  s     rK   depart_metazHTMLTranslator.depart_meta-  r  rL   c                 `    | j                   j                  | j                  |ddd             y )Nr  r.   optionr8  r  r  s     rK   visit_optionzHTMLTranslator.visit_option0  s%    		tVRxHIrL   c                     | j                   j                  d       t        |j                  dd      t        j
                        r| j                   j                  d       y y )Nr  FTrv  , )r7   r   r   rz  r   r  r  s     rK   depart_optionzHTMLTranslator.depart_option3  sI    		#dnnUTnBll$IIT"$rL   c                     | j                   j                  |j                  dd             | j                   j                  | j                  |dd             y )N	delimiterr   varr.   )r7   r   r   r   r  s     rK   visit_option_argumentz$HTMLTranslator.visit_option_argument9  s>    		+s34		tUB78rL   c                 :    | j                   j                  d       y )Nz</var>r  r  s     rK   depart_option_argumentz%HTMLTranslator.depart_option_argument=  rm  rL   c                     | j                   j                  | j                  |dd             | j                   j                  d       y )Nr&  r.   z<kbd>r  r  s     rK   visit_option_groupz!HTMLTranslator.visit_option_group@  s3    		tT267		!rL   c                 :    | j                   j                  d       y )Nz</kbd></dt>
r  r  s     rK   depart_option_groupz"HTMLTranslator.depart_option_groupD  s    		)rL   c                 ^    | j                   j                  | j                  |dd             y )Nr  zoption-listr8  r  r  s     rK   visit_option_listz HTMLTranslator.visit_option_listG  s&    		MM$MM:	<rL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_option_listz!HTMLTranslator.depart_option_listK  r  rL   c                      y rE   r  r  s     rK   visit_option_list_itemz%HTMLTranslator.visit_option_list_itemN  r  rL   c                      y rE   r  r  s     rK   depart_option_list_itemz&HTMLTranslator.depart_option_list_itemQ  r  rL   c                      y rE   r  r  s     rK   visit_option_stringz"HTMLTranslator.visit_option_stringT  r  rL   c                      y rE   r  r  s     rK   depart_option_stringz#HTMLTranslator.depart_option_stringW  r  rL   c                 (    | j                  |d       y )NorganizationrI  r  s     rK   visit_organizationz!HTMLTranslator.visit_organizationZ  s    n5rL   c                 $    | j                          y rE   rL  r  s     rK   depart_organizationz"HTMLTranslator.depart_organization]  rN  rL   c                 \    | j                   j                  | j                  |dd             y )Nr6  r.   r  r  s     rK   visit_paragraphzHTMLTranslator.visit_paragrapho  s!    		tS"56rL   c                 
   | j                   j                  d       t        |j                  t        j
                  t        j                  f      rt        |j                        dk(  s| j                   j                  d       y y )NrF  r   re   )r7   r   r   rB  r   	list_itementryr  r  s     rK   depart_paragraphzHTMLTranslator.depart_paragraphr  sW    		 4;;%++(FG%*IIT" +rL   c                 2   |j                  d      r=| j                  j                  d|d   z         | j                  j                  d       n| j                  j                  d       | j                  j                  | j	                  |ddd             y )Nr~  z<a href="#%s">rE  r.   r  problematicr8  )hasattrr7   r   r   r   r  s     rK   visit_problematicz HTMLTranslator.visit_problematicx  sq    << II-W=>LL'LL#		tVR}MNrL   c                     | j                   j                  d       | j                   j                  | j                  j                                y r  r>  r  s     rK   depart_problematicz!HTMLTranslator.depart_problematic  s3    		#		))+,rL   c                    d|j                  dd      j                         v rt        |j                  t        j
                        rd}nd}|d   r-| j                  j                  | j                  ||d             | j                  j                  |j                                |d   r| j                  j                  d|z         t        j                  )	Nr   formatr.   r  r   r   r   r  )r   rw   r   rB  r   rl  r7   r   r   r   r  )rI   r   r   s      rK   	visit_rawzHTMLTranslator.visit_raw  s    TXXh+1133$++u'8'89 I		  tWR!HIIIT[[]+I		  7!23nnrL   c                    ddi}d|v r^|d   |d<   | j                   j                  r2|d   j                  d      r| j                  |d         |d<   d| _        |dxx   dz  cc<   n#d|v sJ d	       d
|d   z   |d<   |dxx   dz  cc<   t        |      dk(  r*t        |d   t        j                        r|dxx   dz  cc<   t        |j                  t        j                        s:t        |      dk(  rt        |d   t        j                        sJ |dxx   dz  cc<   | j                  j                   | j                  |ddfi |       y )Nr   rm  refurir  zmailto:Tz	 externalr~  z3References must have "refuri" or "refid" attribute.r}  z	 internalr   r   z image-referencer  r.   )r^   r   r   r   r   r  r   r   imagerB  rl  r7   r   r   r  s      rK   visit_referencezHTMLTranslator.visit_reference  s;   %t>DL33L++I6#00f>V!%M[(Md? IHI?g.DLM[(Mt9>ja%++>M//M$++u'8'89t9>ja%++&FFFM//M		tS"==>rL   c                     | j                   j                  d       t        |j                  t        j
                        s| j                   j                  d       d| _        y )NrE  re   F)r7   r   r   rB  r   rl  r   r  s     rK   depart_referencezHTMLTranslator.depart_reference  sA    		 $++u'8'89IIT"rL   c                 ,    | j                  |dd       y )NrevisionFr   rI  r  s     rK   visit_revisionzHTMLTranslator.visit_revision  s    ju=rL   c                 $    | j                          y rE   rL  r  s     rK   depart_revisionzHTMLTranslator.depart_revision  rN  rL   c                 j    | j                   j                  | j                  |dd             d|_        y )Ntrr.   r   )r7   r   r   r  r  s     rK   	visit_rowzHTMLTranslator.visit_row  s(    		tT267rL   c                 :    | j                   j                  d       y )Nz</tr>
r  r  s     rK   
depart_rowzHTMLTranslator.depart_row  r  rL   c                 `    | j                   j                  | j                  |ddd             y )Nr6  r.   rubricr8  r  r  s     rK   visit_rubriczHTMLTranslator.visit_rubric  s%    		tS"HEFrL   c                 :    | j                   j                  d       y r<  r  r  s     rK   depart_rubriczHTMLTranslator.depart_rubric  rm  rL   c                     | xj                   dz  c_         | j                  j                  | j                  |dd             y )Nr   r   sectionr8  )r   r7   r   r   r  s     rK   visit_sectionzHTMLTranslator.visit_section  s7    a		MM$YM7	9rL   c                 d    | xj                   dz  c_         | j                  j                  d       y )Nr   ru  )r   r7   r   r  s     rK   depart_sectionzHTMLTranslator.depart_section  s%    a		$rL   c                 l    | j                   j                  | j                  |dd             d| _        y )Nr   sidebarr8  T)r7   r   r   r   r  s     rK   visit_sidebarzHTMLTranslator.visit_sidebar  s-    		MM$YM7	9rL   c                 H    | j                   j                  d       d| _        y )Nru  F)r7   r   r   r  s     rK   depart_sidebarzHTMLTranslator.depart_sidebar  s    		$rL   c                 ,    | j                  |dd       y )NstatusFr   rI  r  s     rK   visit_statuszHTMLTranslator.visit_status  s    hU;rL   c                 $    | j                          y rE   rL  r  s     rK   depart_statuszHTMLTranslator.depart_status  rN  rL   c                 \    | j                   j                  | j                  |dd             y )Nstrongr.   r  r  s     rK   visit_strongzHTMLTranslator.visit_strong  s!    		tXr:;rL   c                 :    | j                   j                  d       y )Nz	</strong>r  r  s     rK   depart_strongzHTMLTranslator.depart_strong  s    		%rL   c                 \    | j                   j                  | j                  |dd             y )Nr   r.   r  r  s     rK   visit_subscriptzHTMLTranslator.visit_subscript  !    		tUB78rL   c                 :    | j                   j                  d       y )Nz</sub>r  r  s     rK   depart_subscriptzHTMLTranslator.depart_subscript  rm  rL   c                 "    t         j                  )zInternal only.r   r  r  s     rK   visit_substitution_definitionz,HTMLTranslator.visit_substitution_definition      nnrL   c                 &    | j                  |       y rE   )unimplemented_visitr  s     rK   visit_substitution_referencez+HTMLTranslator.visit_substitution_reference  s      &rL   c                    t        |j                  t        j                        rdg}nlt        |j                  t        j                        r!dg}t        | j                        dz   | _        n't        |j                  t        j                        rdg}| j                  j                  | j                  |dd             y )Nzsidebar-subtitler:   r   zsection-subtitler6  r.   r-  )r   rB  r   r0  rO   r  r7   r   r+  r   r   r  s      rK   visit_subtitlezHTMLTranslator.visit_subtitle  s    dkk5==1)*GU^^4!lG%(^a%7D"U]]3)*G		tS"gFGrL   c                    | j                   j                  d       t        |j                  t        j
                        r| j                   | j                  d | _        d| _        | j                  j                  | j                          | j                  j                  | j                          | j                   d d = y y )Nr=  r  r   )r7   r   r   rB  r   rO   r   r:   r5   r   rB   r  s     rK   depart_subtitlezHTMLTranslator.depart_subtitle  s    		"dkk5>>2 IId&<&<R@DM%&D"!!((3%%dii0		! 3rL   c                 \    | j                   j                  | j                  |dd             y )Nsupr.   r  r  s     rK   visit_superscriptz HTMLTranslator.visit_superscript  r@  rL   c                 :    | j                   j                  d       y )Nz</sup>r  r  s     rK   depart_superscriptz!HTMLTranslator.depart_superscript  rm  rL   c                 "   | j                   j                  | j                  |dd             | j                   j                  d       d}t        |d         rX|d   }t        |      dk(  r	d|d	   z  }n<d}g }|D ]  }|j                  d
|d|d       |dz  }! ddj	                  |      z  }|j                  d      r	d|d   z  }nd}| j                   j                  d|d   d|d   d| j                  |d         d|d|d       y )Nr+  zsystem-messager8  z <p class="system-message-title">r.   r  r   z%; <em><a href="#%s">backlink</a></em>r   z
<a href="#r  rE  z; <em>backlinks: %s</em>r  r  z	, line %szSystem Message: rr  rU  levelz! (<span class="docutils literal">r  r  r4  r=  )r7   r   r   r  rg   r  r   )rI   r   backref_textr  r  r  backrefr  s           rK   r  z#HTMLTranslator.visit_system_message	  s   		tW<LMN		;<tJ J'H8}! G"*1+!. 	' G$$w%JKFA !;"&))I"6!7<<f-DD		 L$w- KKX7|M 	NrL   c                 :    | j                   j                  d       y r0  r  r  s     rK   r  z$HTMLTranslator.depart_system_message#  r  rL   c                 (   d| j                   j                  j                  dd      j                         i}d|v r|d   j	                  d|d   z         d|v rd|d   z  |d<    | j
                  |d	fi |}| j                  j	                  |       y )
Nr   r  r   r1  rY  r0  z
width: %s;r  r   )r^   r  r   rw   r   r   r7   )rI   r   r   rz  s       rK   visit_tablezHTMLTranslator.visit_table&  s    4==44<<S#FLLNOd?O"":W#=>d?(4=8DMdmmD'2T2		rL   c                 :    | j                   j                  d       y )Nz	</table>
r  r  s     rK   depart_tablezHTMLTranslator.depart_table/  r  rL   c                     d|vrRd|vrNd|vrJ| j                   j                  | j                  |ddd             | j                  j                  d       y | j                  j                  d       y )	Nr  r~  r  r  r.   targetr8  r  )r7   r   r   r   r  s     rK   visit_targetzHTMLTranslator.visit_target2  sa    D 4'T)IIT]]48]LMLL	*LL#rL   c                 j    | j                   j                  | j                  j                                y rE   r>  r  s     rK   depart_targetzHTMLTranslator.depart_target;  r  rL   c                 Z    | j                   j                  | j                  |d             y )Ntbodyr  r  s     rK   visit_tbodyzHTMLTranslator.visit_tbody?      		tW56rL   c                 :    | j                   j                  d       y )Nz	</tbody>
r  r  s     rK   depart_tbodyzHTMLTranslator.depart_tbodyB  r  rL   c           
      (   d|j                   j                   d   v r.| j                  j                  | j                  |dd             y | j                  j                  | j                  |dd|j                   d   |j                   d                y )	Nr  r   summaryr.   r  r&  r   )r   r   r   r  r  s     rK   
visit_termzHTMLTranslator.visit_termE  s~    **955IIT]]42]FG IIT]]4b37;;y3I/3{{5/A + C DrL   c                      y rE   r  r  s     rK   depart_termzHTMLTranslator.depart_termN  s     	rL   c                      g | _         g |_        y rE   )r   r  r  s     rK   visit_tgroupzHTMLTranslator.visit_tgroupS  s    
rL   c                      y rE   r  r  s     rK   depart_tgroupzHTMLTranslator.depart_tgroupW  r  rL   c                 Z    | j                   j                  | j                  |d             y )Nr
  r  r  s     rK   visit_theadzHTMLTranslator.visit_theadZ  rd  rL   c                 :    | j                   j                  d       y )Nz	</thead>
r  r  s     rK   depart_theadzHTMLTranslator.depart_thead]  r  rL   c                 b   i }| j                   | j                  z   dz
  }dt        |d      z  }|dkD  r||d<    | j                  ||dfi |}|j	                  d      rJi }d|d<   d	|d
<   d|d   z   |d<   | | j                  t        j                         ddfi |z  }d|z  }||fS d|z  }||fS )Nr   zh%i   z
aria-levelr.   r~  ztoc-backrefr   zdoc-backlinkrp  r}  r  r  z
</a></%s>
r	  )r   r   minr   r  r   rm  )rI   r   r   h_levelr   	start_tag	close_tags          rK   section_title_tagsz!HTMLTranslator.section_title_tags`  s    $$t'@'@@1D#gq/)Q;!(D!DMM$<t<	<< D)DM)DLg.DLu'8#rJTJJI%/I )## "G+I)##rL   c                 d   d}t        |j                  t        j                        r0| j                  j                  | j                  |ddd             nt        |j                  t        j                        r0| j                  j                  | j                  |ddd             nkt        |j                  t        j                        r0| j                  j                  | j                  |ddd             nt        |j                  t        j                        r/| j                  j                  | j                  |dd             d	}nt        |j                  t        j                        rK| j                  j                  | j                  |d
dd             d}t        | j                        | _        nUt        |j                  t        j                        sJ | j                  |      \  }}| j                  j                  |       | j                  j                  |       y )Nr=  r6  r.   ztopic-titler8  zsidebar-titlezadmonition-titleri  z</caption>
h1r9   z</h1>
)r   rB  r   topicr7   r   r   r0  
Admonitionr   rO   r  r   r+  rz  r   )rI   r   ry  rx  s       rK   visit_titlezHTMLTranslator.visit_titles  s   	dkk5;;/IIdC=ACU]]3IIdC?CEU%5%56II--c25G-HJU[[1II--i46&IU^^4IIT]]4r]IJ!I%(^D"dkk5==999#'#:#:4#@ IyIIY'I&rL   c                    | j                   j                  | j                  j                                | j                  r| j                   | j                  d | _        d| _        | j                  j                  | j                          | j                  j                  | j                          | j                   d d = y y )Nr  r   )	r7   r   r   r   r   r9   r5   r   rA   r  s     rK   depart_titlezHTMLTranslator.depart_title  s    		))+,!!4#9#9"=DJ%&D"!!((3OO""499-		! "rL   c                 \    | j                   j                  | j                  |dd             y )Nciter.   r  r  s     rK   visit_title_referencez$HTMLTranslator.visit_title_reference  r  rL   c                 :    | j                   j                  d       y )Nz</cite>r  r  s     rK   depart_title_referencez%HTMLTranslator.depart_title_reference  r  rL   c                 ^    | j                   j                  | j                  |dd             y )Nr   r}  r8  r  r  s     rK   visit_topiczHTMLTranslator.visit_topic  s#    		tU'BCrL   c                 :    | j                   j                  d       y r  r  r  s     rK   depart_topiczHTMLTranslator.depart_topic  r  rL   c                 ^    | j                   j                  | j                  |dd             y )Nhrrj   r8  )r7   r   r   r  s     rK   visit_transitionzHTMLTranslator.visit_transition  s#    		tTDErL   c                      y rE   r  r  s     rK   depart_transitionz HTMLTranslator.depart_transition  r  rL   c                 ,    | j                  |dd       y )Nrf   Fr   rI  r  s     rK   visit_versionzHTMLTranslator.visit_version  r  rL   c                 $    | j                          y rE   rL  r  s     rK   depart_versionzHTMLTranslator.depart_version  rN  rL   c                 F    t        d|j                  j                  z        )Nz$visiting unimplemented node type: %s)NotImplementedErrorrJ   rq   r  s     rK   rH  z"HTMLTranslator.unimplemented_visit  s$    !"H$(NN$;$;#< = 	=rL   rE   )re   F)re   )r   )T)r.   )rq   rr   rs   __doc__r  r  r  r   rj   rk   r   r  r  r  r   r   rh  compiler  r  r   ordr   r   r   r   r   r   r   r   r   r   r  r
  r  r  r  r  r  r$  r)  r.  r2  r9  r:  r?  rD  rG  rJ  rM  rQ  rS  rX  r`  re  rg  rj  rl  rs  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(  r  r  r  r  r  r  r  r  r  r  r  r   r"  r$  r'  r)  r+  r-  r2  r4  r7  r:  r>  r@  rC  rF  rJ  rL  rN  rP  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  r  r  r  r  r  r  r  r
  r  r  r  r  r  r  r  r"  r$  r'  r)  r,  r.  r1  r3  r6  r8  r;  r=  r?  rB  rE  rI  rK  rM  rP  rR  r  r  rY  r[  r^  r`  rc  rf  ri  rk  rm  ro  rq  rs  rz  r  r  r  r  r  r  r  r  r  r  rH  r  rL   rK   r~   r~      s   6p "GNN,L
3H4H4H3I J1 	1  $):> KNAK NOE!rzz"23#$67Nc(Gc(Fc(Hc(Fc(G	 NM^77'7 %"**^48*@NDN
(":$='D
#O' $2*4%/#+-
C8 
'1#<,",&<$H#@)
>"N$>
*$ %"**X.22G%D%=#3#.#<(I(E-8$ED$O'C
G08"9(-<$<$$H@($=%,	=+>!
!,N`:$?4E%'
%I%8$0$'
% 4/*3Il\1
IJ#9#"*<$6#$7#O-?*>#$G#9
%

 <#<&9#'H9#N4''$-7'D
7'$&'8:$D%F=#=rL   r~   c                       e Zd ZdZd Zd Zd Zd ZeZeZ	eZ
eZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZ eZ!eZ"y)rU  a  
    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.

    This version also checks for simple field lists and docinfo.
    c                 "    t         j                  rE   )r   rW  r  s     rK   default_visitzSimpleListChecker.default_visit  s    oorL   c                    |j                   D cg c]  }t        |t        j                        s|  }}|rt        |d   t        j                        rgt        |d   t        j
                        s:t        |d   t        j                        st        |d   t        j                        r|j                          t        |      dk  ry t        j                  c c}w )Nr   r  r   )r  r   r   r  	paragraphr_  r^  r\  r   r  rW  )rI   r   r  r  s       rK   r  z!SimpleListChecker.visit_list_item  s    '+}} ?e%eU__=  ? ?HQKAHRL%*;*;<x|U-B-BCx|U-=-=>LLNx=A//!?s   #Cc                      y rE   r  r  s     rK   	pass_nodezSimpleListChecker.pass_node  r  rL   c                 "    t         j                  rE   rD  r  s     rK   ignore_nodezSimpleListChecker.ignore_node  rF  rL   N)#rq   rr   rs   r  r  r  r  r  r
  r  re  r  r  rD  rJ  r$  r  r  r  r  r6  r  r  r  ri  r  r  r  r"  r+  r'  r  rE  r^  visit_pendingr  rL   rK   rU  rU    s    "
 J!O "%M L#M#MM!OJ$L#M &!*J & !K&"  M$/!LMrL   rU  )"r  ro  rb  r  os.pathrh  urllib.requestr   rn  r   r   rj   r   r   r   r   r	   docutils.parsers.rst.directivesr
   &docutils.parsers.rst.directives.imagesr   docutils.transformsr   docutils.utils.mathr   r   r   r   r   r   r   r~   GenericNodeVisitorrU  r  rL   rK   <module>r     s|   " 3   	  	 1 '   ? ? L 6 *M MJ<W^^ J<Z@=U&& @=F0H 00 H rL   