
    Ri                    v   d Z ddlmZ ddlZddlZddlZddlmZm	Z	 ddl
mZmZ ddlmZmZ ddl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 er&ddlmZmZ ddlmZm Z  ddl!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z(  ejR                  e*      Z+dZ,de dZ-ddZ.dddZ/ G d dej`                        Z1 G d de      Z2y)z#Custom docutils writer for Texinfo.    )annotationsN)TYPE_CHECKINGcast)nodeswriters)__display_version__addnodes)___admonitionlabels)logging)SphinxTranslator)format_date)collected_footnote)IterableIterator)AnyClassVar)ElementNodeText)TexinfoBuilder)
IndexEntryzn@quotation
%(project)s %(release)s, %(date)s

%(author)s

Copyright @copyright{} %(copyright)s
@end quotation
z\input texinfo   @c -*-texinfo-*-
@c %%**start of header
@setfilename %(filename)s
@documentencoding UTF-8
@ifinfo
@*Generated by Sphinx a  .@*
@end ifinfo
@settitle %(title)s
@defindex ge
@paragraphindent %(paragraphindent)s
@exampleindent %(exampleindent)s
@finalout
%(direntry)s
@c %%**end of header

@copying
%(copying)s
@end copying

@titlepage
@title %(title)s
@insertcopying
@end titlepage
@contents

@c %%** start of user preamble
%(preamble)s
@c %%** end of user preamble

@ifnottex
@node Top
@top %(title)s
@insertcopying
@end ifnottex

@c %%**start of body
%(body)s
@c %%**end of body
@bye
c                    g }| D ]c  }t        |t        j                        r|j                  |       /t        |t        j                        sJ|j                  t        |             e |S )z7Return a list of subsections for the given ``section``.)
isinstancer   sectionappendr   extendfind_subsections)r   resultchilds      N/home/agent/.friday_env/lib/python3.12/site-packages/sphinx/writers/texinfo.pyr   r   U   sZ    F 3eU]]+MM% eU]]+MM*5123 M    c                    | j                  |      }t        |      D ]+  \  }}t        d |D              s|j                         ||<   - |xs dj	                  |      S )zdLike string.capwords() but does not capitalize words that already
    contain a capital letter.
    c              3  <   K   | ]  }|j                           y wN)islower).0xs     r"   	<genexpr>z!smart_capwords.<locals>.<genexpr>g   s     )qqyy{)    )split	enumerateall
capitalizejoin)ssepwordsiwords        r"   smart_capwordsr7   a   s^     GGCLEU# )4)D))(E!H) J3U##r#   c            	           e Zd ZU dZdZddddgddifd	d
gddifddgddifddgddifffZi Zded<   ded<   dZd fdZ	ddZ
 xZS )TexinfoWriterz0Texinfo writer for generating Texinfo documents.)texinfotexizTexinfo Specific OptionsNzName of the Info filez--texinfo-filenamedefault z	Dir entryz--texinfo-dir-entryDescriptionz--texinfo-dir-descriptionCategoryz--texinfo-dir-categoryMiscellaneouszClassVar[dict[str, Any]]settings_defaultsstroutput)rC   fragmentc                0    t         |           || _        y r&   )super__init__builder)selfrH   	__class__s     r"   rG   zTexinfoWriter.__init__   s    r#   c           	        t        | j                  t        j                        sJ | j                  j	                  | j                  | j                        }t        d|      | _        | j                  j                  |       | j                  j                          | j                  D ]#  }t        | |t        | j                  |             % y )NTexinfoTranslator)r   documentr   rH   create_translatorr   visitor	walkaboutfinishvisitor_attributessetattrgetattr)rI   rO   attrs      r"   	translatezTexinfoWriter.translate   s    $--888,,00M/9(++ 	=DD$d ;<	=r#   )rH   r   returnNonerW   rX   )__name__
__module____qualname____doc__	supportedsettings_specrA   __annotations__rR   rG   rV   __classcell__rJ   s   @r"   r9   r9   l   s    :#I 	#$';&<y"oN01Ir?C89Ir?K23i5QR		
	M 35/4K/=r#   r9   c                      e Zd ZU dZded<   dddddddddddddZd fdZdd	Zdd
ZddZ	ddZ
ddZddZddZddZddZddZddZ ej&                  d      f	 	 	 	 	 ddZddZddZddZ	 	 	 	 ddZddZddZddZddZddZddZdd Zdd!Z dd"Z!d#Z"d$Z#dd%Z$dd&Z%dd'Z&dd(Z'dd)Z(dd*Z)dd+Z*dd,Z+dd-Z,dd.Z-dd/Z.dd0Z/dd1Z0dd2Z1dd3Z2dd4Z3dd5Z4dd6Z5e4Z6e5Z7dd7Z8dd8Z9dd9Z:dd:Z;dd;Z<dd<Z=dd=Z>dd>Z?dd?Z@dd@ZAddAZBddBZCddCZDddDZEddEZFddFZGddGZHddHZIddIZJddJZKddKZLddLZMddMZNddNZOddOZPddPZQddQZRddRZSddSZTddTZUddUZVddVZWddWZXddXZYddYZZddZZ[dd[Z\dd\Z]dd]Z^dd^Z_dd_Z`dd`ZaddaZbddbZcddcZddddZeddeZfddfZgddgZhddhZiddiZjddjZkddkZlddlZmddmZnddnZoddoZpddpZqddqZrddrZsddsZtddtZudduZvddvZwddwZxddxZyddyZzddzZ{dd{Z|dd|Z}dd}Z~dd~ZddZddZddZddZddZdddZddZddZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddÄZddĄZddńZddƄZddǄZddȄZddɄZddʄZdd˄Zdd̄Zdd̈́Zdd΄ZddτZddЄZddфZdd҄ZddӄZddԄZddՄZddքZddׄZdd؄ZddلZddڄZddۄZdd܄Zdd݄ZddބZdd߄ZddZddZddZddZddZddZddZddZddZddZddZd dZddZ xZ S (  rL   Fr   rH   r=      r   )authorbodycopyingdatedirentryexampleindentfilenameparagraphindentpreambleprojectreleasetitlec                H   t         |   ||       | j                          t               | _        t               | _        g | _        i | _        i | _        i | _	        i | _
        | j                          | j                          | j                          | j                          g | _        g | _        g | _        d | _        d| _        d| _        t               | _        d| _        d| _        g | _        g | _        d| _        d| _        d| _        t               | _        g | _        y )Nr   F)rF   rG   init_settingssetwritten_idsreferenced_idsindices	short_ids
node_names
node_menusrellinkscollect_indicescollect_node_namescollect_node_menuscollect_rellinksrf   contextdescsprevious_sectionsection_level
seen_titlenext_section_idsescape_newlinesescape_hyphenscurfilestackfootnotestackin_production_listin_footnotein_samphandled_abbrs	colwidths)rI   rM   rH   rJ   s      r"   rG   zTexinfoTranslator.__init__   s   7+%(U(+.0)+*,02.0!!!	"$*,
6:*-% ')OQ"''*u$&r#   c                   | j                   | j                  d       | j                  D ]c  }|\  }}t        |g| j                  |   z         }| j
                  j                  d|z         | j
                  j                  d| d| d       e | j                  r`| j                  j                         }|| j                  vr+| j
                  j                  dj                  |d             | j                  r`| j                          dj                  | j
                        | _        | j                  | j                  d	<   t        | j                  z  | _        y )
NTop
@node %s,%s,%s,%s
z@unnumbered 


z@anchor{{{}}}@w{{{}}}
z                              r=   rf   )r   add_menurv   tuplerz   rf   r   ru   poprt   format
ensure_eolr1   rD   elementsTEMPLATErC   )rI   indexnamecontentpointersrs         r"   rQ   zTexinfoTranslator.finish   s%     (MM% \\ 	CE!MD'dVdmmD&99:HII4x?@II|D6gYbAB		C !!##'')A(((		  !:!A!A!X!NO	 !!
 			* $f.r#   c                   | j                   j                  xs t        d      }| j                   j                  xs! t	        || j                   j
                        }| j                  j                         x}| _        |j                  | j                  j                  | j                  j                  | j                  j                  | j                  | j                   j                        | j                  | j                   j                         | j                  | j                   j"                        | j                  |      d       | j                  j                  }|s=| j$                  j'                  t(        j                        }|r|j+                         nd}| j-                  |      xs d|d<   |d   sD| j$                  j/                  d      xs d|d<   |d   d	d  d
v r|d   d d	 |d<   |dxx   dz  cc<   | j                  j0                  r| j3                  | j5                  | j                  j0                        d|d   z  | j7                  | j                  j8                              }d| j-                  | j                  j:                        d|d|d<   t<        |z  |d<   |j                  | j                  j>                         y )Nz	%b %d, %Y)language)rp   re   rk   ro   rn   	copyrightrh   
<untitled>rp   rk   sourceuntitled>   .rst.txtz.infoz(%s)z@dircategory z
@direntry
z@end direntry
ri   rg   ) config	today_fmtr
   todayr   r   default_elementscopyr   updatesettingsrp   re   texinfo_filenameescapero   rn   r   rM   	next_noder   astext	escape_idgettexinfo_dir_entryformat_menu_entryescape_menu
escape_argtexinfo_dir_descriptiontexinfo_dir_categoryCOPYINGtexinfo_elements)rI   r   r   r   rp   
title_nodeentrys          r"   rr   zTexinfoTranslator.init_settings   sD   KK));Q{^	!! 
[ 4 4&
 $(#8#8#=#=#??4=]]((mm**66{{4;;#6#67{{4;;#6#67T[[%:%:;KK&

 
	 ]]((00=J+5J%%'<E NN51A\
##'==#4#4X#>#L*HZ 
#BC(,<<'/
';CR'@$Z G+ ==****  !@!@A*-- E EFE t}}AAB$HZ  &0667r#   c                    d fd}d j                   d<    |d        |d        j                  D cg c]  \  }} ||      |f c}} _         j                   j                  t        j                        D ]\  }|j                  t        j                        }t        |t        j                        sJ |r|j                         nd} ||      |d<   ^ yc c}}w )znGenerates a unique id for each section.

        Assigns the attribute ``node_name`` to each section.
        c                2   j                  |       }d\  }}||z   j                  v s||z   j                  v r.|dz  }d|z  }||z   j                  v r||z   j                  v r.||z  }j                  j                  |       | j                  |<   |S )N)   r=   r   z<%s>)r   rt   rx   add)r   node_idnthsuffixrI   s       r"   add_node_namez;TexinfoTranslator.collect_node_names.<locals>.add_node_name  s    nnT*GKC& D$4$44V#t6q#	 & D$4$44V#t6 vG  )'+DOOG$Nr#   r   	node_nametopr   N)r   rB   rW   rB   )
rM   rv   findallr   r   r   Titularr   r   r   )rI   r   r   r   r   rp   s   `     r"   r|   z$TexinfoTranslator.collect_node_names  s    	 &+k"ee AE
/<tW]4 '*
 }},,U]]; 	7G %%emm4EeUZZ000%*5<<>D#0#6GK 	7	
s   Cc                   | j                   }| j                  g}|j                  | j                  j                  t        j
                               |D ]9  }|j                  dd      sJ t        |      D cg c]  }|d   	 }}|||d   <   ; | j                  j                  t        j                        }|r|j                  n| j                  }t        |t        j                  t        j
                  f      s| j                  }|| j                  ur#||d      }||d   dd z  }||d<   ||d   = d|d<   | j                  D ]  \  }}	g ||<   |d   j                  |         yc c}w )z1Collect the menu entries for each "node" section.r   Fr   r   N)ry   rM   r   r   r   r   r   r   r   rp   parentr   rv   r   )
rI   ry   targetsnoder2   entriesrp   r   r   _contents
             r"   r}   z$TexinfoTranslator.collect_node_menus,  sZ   __
"&--t}},,U]];< 	4D88K////?/EF!q~FGF,3JtK()	4
 ''4#ell#>?--Cdmm# [!12Gz%(,,G 'Ju3{+,$C"ll 	+ND(!Jtu$$T*	+ Gs   8E(c                   | j                   }| j                  }|D ]	  }g d||<    |j                         D ]  \  }}|D ]
  }|||   d<     |j                         D ]K  \  }}t        |      D ]8  \  }}|dk7  r||dz
     ||   d<   |t	        |      dz
  k7  s+||dz      ||   d<   : M 	 |d   d   }||d   d<   d||   d<   y# t
        $ r Y yw xY w)z@Collect the relative links (next, previous, up) for each "node".)r=   r=   r=      r   r   r   N)rz   ry   itemsr.   len
IndexError)rI   rz   ry   idr   er5   firsts           r"   r~   z"TexinfoTranslator.collect_rellinksE  s$   ==__
 	(B'HRL	( &++- 	$KB $!#A$	$ &++- 	5KB"7+ 526&-a!enHRLOGq((&-a!enHRLO5	5	'u%a(E "'HUOA!&HUOA	  		s   -C 	CCc                    |j                  dd      }|j                  dd      }|j                  dd      }|j                  dd      }|j                  d	d
      }|S )z8Return a string with Texinfo command characters escaped.@z@@{z@{}z@}z``z`@w{`}z''z'@w{'})replacerI   r2   s     r"   r   zTexinfoTranslator.escapef  sW    IIc4 IIc4 IIc4 IIdH%IIdH%r#   c                    | j                  |      }|j                  dd      }dj                  |j                               j	                         }|S )z_Return an escaped string suitable for use as an argument
        to a Texinfo command.
        ,z@comma{}r,   )r   r   r1   r-   stripr   s     r"   r   zTexinfoTranslator.escape_argp  sC     KKNIIc:&HHQWWY%%'r#   c                   d}|D ]  }|j                  |d      } t        j                  d|      r|j                  dd      }dj                  |j	                               j                         }| j                  |      S )z=Return an escaped string suitable for node names and anchors.z,:()r,   z[^ .].)r   researchr1   r-   r   r   )rI   r2   	bad_charsbcs       r"   r   zTexinfoTranslator.escape_id{  so    	 	#B		"c"A	#99Wa 		#s#AHHQWWY%%'{{1~r#   c                    | j                  |      }|j                  dd      }dj                  |j                               j	                         }|S )z3Return an escaped string suitable for menu entries.:;r,   )r   r   r1   r-   r   r   s     r"   r   zTexinfoTranslator.escape_menu  sB    OOAIIc3HHQWWY%%'r#   c                    | j                   r2| j                   d   dd dk7  r| j                   j                  d       yyy)z7Ensure the last line in body is terminated by new line.Nr   rf   r   )rI   s    r"   r   zTexinfoTranslator.ensure_eol  s8    992rs+t3IIT" 49r#   c                    ||k(  rd| d}n	d| d| d}t        dt        |      dz   dz  f      dj                  fd	t        j                  |dz
  
      D              }||j                         z   dz   S )Nz* z:: : z.    rd   N   r   c              3  .   K   | ]  }d z  |z     yw)r,   N )r(   loffsets     r"   r*   z6TexinfoTranslator.format_menu_entry.<locals>.<genexpr>  s      
!"C&L1
s   )width)maxr   r1   textwrapwrapr   )rI   r   r   descr2   wdescr   s         @r"   r   z#TexinfoTranslator.format_menu_entry  s    9TF#ATF"YKr*Ab3t9q=B./0		 
&.mmDV&L
 
 5;;= 4''r#   z
\s+---?\s+c                D   |D ]  }| j                   |   }	 |j                  |d      }t        |      dk(  r|\  }}nd}| j	                  |      }| j                  |      }| j                  j                  | j                  |||              y # t        $ r |g}Y uw xY w)Nr   )maxsplitr   r=   )	rx   r-   	TypeErrorr   r   r   rf   r   r   )rI   r   regr   r   partsr   s          r"   add_menu_entriesz"TexinfoTranslator.add_menu_entries  s    
  	HE??5)D		$	3 5zQ"
d##D)D;;t$DIIT33D%FG	H
  s   BBBc                     j                   |   }|sy  j                  j                  d        j                  |       |dk7  s( j                   |d      r j                  j
                  r j                  j                  d       y d fd j                  j                  d       |D ]
  } |         j                  j                  d       y )	N
@menu
r   r   z
@end menu
c                    j                   |    }|sy j                  j                  dj                  j                  |           d       j                  |       |D ]
  } |        y )Nr   r   )ry   rf   r   r   rx   r  )r   r   subentry_add_detailed_menurI   s      r"   r  z6TexinfoTranslator.add_menu.<locals>._add_detailed_menu  sj    ood+GIIr$++dood.C"D!ETJK!!'*# -"8,-r#   z0
@detailmenu
 --- The Detailed Node Listing ---
z
@end detailmenu
@end menu
)r   rB   rW   rX   )ry   rf   r   r  r   texinfo_no_detailmenu)rI   r   r   r   r  s   `   @r"   r   zTexinfoTranslator.add_menu  s    //),		%g&??71:.{{00II_-	- 			NO 	&Eu%	&		9:r#   c                    t        j                  d|      }|s|S |}|j                         d d \  }}|r|dk(  ry|dk(  rdt        |      dz  z  }|S )Nz(\d*\.?\d*)\s*(\S*)r   pxr=   %z%d.0ptgDI@)r   matchgroupsfloat)rI   	width_strr  resamountunits         r"   tex_image_lengthz"TexinfoTranslator.tex_image_length  sb    /;||~bq)tt|S[eFmi78C
r#   c           	         	 	 	 	 	 	 d fd} j                   j                  x}rt        |t              sd}t	        |      }nd} j
                  j                         D ]  }|j                  D ]  }|j                   d|j                   }|r||vr% ||      j                   j                  j                        \  }}|sV j                  j                  |j                   |||      f          j
                  j                  } j                  j                  D ]9  }	|j                  |	   s j                  j                  t!        d      df        y  y )Nc                L   dg}| D ]z  \  }}|D ]p  }|d   s	
j                  |d         }
j                  |d    d|d          }
j                  |d         }
j                  |||      }	|j	                  |	       r | |j	                  d       dj                  |      S )	Nr     r   r   r      z
@end menu
r=   )r   get_short_idr   r   r   r1   )r   	collapsedret_letterr   r   r   sidr   merI   s             r"   generatez3TexinfoTranslator.collect_indices.<locals>.generate  s     -C$+ # $ #E 8 ++E!H5D++uQxj%(,DEC??584D//c4@BJJrN## JJ}%773<r#   TF-Indexz
@printindex ge
)r   z"list[tuple[str, list[IndexEntry]]]r  boolrW   rB   )r   texinfo_domain_indicesr   r   	frozenset_domainssortedrv   r   r  rH   docnamesr   	localnameindex_domainr   r
   )
rI   r  indices_configcheck_namesdomain	index_cls
index_namer   r  docnames
   `         r"   r{   z!TexinfoTranslator.collect_indices  sU   	 7	 DH	 	   "[[???>?nd3"!*>!:#--..0 !' I$*KK=)..1A!BJ"z'G )26):)C)C--*&GY ++%//$Wi8-  ++||,, 	G~~g&##QwZ1E$FG	r#   c                    dfdi } |      D ]J  }t        d|d         }|j                         j                         }t        dg|j                   dg||<   L |S )Nc              3     K   t        | t        j                        r|  y | j                  D ]H  }t        |t        j
                        rt        |t        j                        s9 |      E d {    J y 7 wr&   )r   r   footnotechildrenr	   start_of_filer   )ncfootnotes_unders     r"   r5  z<TexinfoTranslator.collect_footnotes.<locals>.footnotes_under  sa     !U^^, 6A!!X%;%;< #Au}}5#21#555	6 6s   A$A=(A=3A;4A=znodes.labelr   r=   F)r3  r   rW   zIterator[nodes.footnote])r   r   r   r   r1  )rI   r   fnotesfnlabelnumr5  s         @r"   collect_footnotesz#TexinfoTranslator.collect_footnotes  sm    	6 >@!$' 	HB1.E,,.&&(C-b?2;;?GF3K	H r#   c                    	 | j                   |   }|S # t        $ r* t        | j                         d}|| j                   |<   Y |S w xY w)z-Return a shorter 'id' associated with ``id``.r)   )rw   KeyErrorr   )rI   r   r  s      r"   r  zTexinfoTranslator.get_short_id!  sS    	%..$C 
  	%(+C!$DNN2
	%s    /AAc                8   |j                  d      ry | j                  d   dz   |z   }| j                  |      }| j                  |      }||fD ]J  }|| j                  vs| j
                  j                  d|z         | j                  j                  |       L y )Nzindex-r   r   z@anchor{%s})
startswithr   r   r  rt   rf   r   r   )rI   r   r   eidr  s        r"   
add_anchorzTexinfoTranslator.add_anchor,  s    =="r"S(2-nnR #* 	)B)))		  !34  $$R(	)r#   c                z   | j                  |      }| j                  |      }| j                  j                  rh| j                  j                  d| d| d       | j                  j                  |       | j                  j                  | j                  |             y | j                  j                  |       y )N@ref{,,r   )	r   r  r   texinfo_cross_referencesrf   r   ru   r   r   )rI   r   r   r   r  s        r"   add_xrefzTexinfoTranslator.add_xref7  s    %#;;//IIvcU"TF"56##C(##DNN2$67IIT"r#   c                    | j                   j                  | j                  |             | j                  j                  |j	                  dd             d|v r| j                  d|       y y )Nr-  r=   :doc)r   r   r:  r   r   r@  rI   r   s     r"   visit_documentz TexinfoTranslator.visit_documentC  s[    !!$"8"8">?  )R!89OOFD) r#   c                l    | j                   j                          | j                  j                          y r&   )r   r   r   rH  s     r"   depart_documentz!TexinfoTranslator.depart_documentI  s&     r#   c                    | j                  |j                               }| j                  r|j                  dd      }| j                  r|j                  dd      }| j
                  j                  |       y )Nr   r,   r  z@w{-})r   r   r   r   r   rf   r   )rI   r   r2   s      r"   
visit_TextzTexinfoTranslator.visit_TextM  sZ    KK&		$$A		#w'A		r#   c                     y r&   r   rH  s     r"   depart_TextzTexinfoTranslator.depart_TextV      r#   c                B   | j                   j                  |j                  dg              | j                  sy | j                  r| j                  | j                  d          n| j                  d       |d   }t        |g| j                  |   z         }| j                  j                  d|z         t        | j                         D ]  }| j                  ||        | j                   j                          t        d|      | _        | xj                  dz  c_        y )Nidsr   r   r   znodes.sectionr   )r   r   r   r   r   r   r   rz   rf   r   r$  r@  clearr   r   )rI   r   r   r   r   s        r"   visit_sectionzTexinfoTranslator.visit_sectionY  s    $$TXXeR%89  MM$//<=MM% %	)t}}Y'??@		08;<../ 	&BOOB%	& 	##% $_d ;ar#   c                .    | xj                   dz  c_         y Nr   )r   rH  s     r"   depart_sectionz TexinfoTranslator.depart_sectionl  s    ar#   )z@unnumberedz@chapterz@sectionz@subsectionz@subsubsection)z@headingz@subheadingz@subsubheadingc                n   | j                   sd| _         t        j                  |j                  }t	        |t        j
                        ry t	        |t        j                  t        j                  t        j                  f      rt        j                  t	        |t        j                        s2t        j                  t        d      |       | j                  |       y 	 | j                  | j                     }| j"                  j%                  d|z         y # t         $ r | j                  d   }Y 9w xY w)NTzJencountered title node not in section, topic, table, admonition or sidebarlocationr   
%s )r   r   SkipNoder   r   table
Admonitionsidebartopicr   loggerwarningr   visit_rubricheadingsr   r   rf   r   )rI   r   r   headings       r"   visit_titlezTexinfoTranslator.visit_title}  s    "DO.. fekk*fu//LM.. &%--0NN,    d#,--(:(:; IIWw./  ,--+,s   !D D43D4c                :    | j                   j                  d       y Nr   r   rH  s     r"   depart_titlezTexinfoTranslator.depart_title      		 r#   c                P   t        |      dk(  r-|j                         dt        d      hv rt        j                  	 | j
                  | j                     }| j                  j                  d|z         | xj                  dz  c_
        y # t        $ r | j
                  d   }Y Nw xY w)Nr   	Footnotesr   r[  )r   r   r
   r   r\  rubricsr   r   rf   r   r   )rI   r   rubrics      r"   rc  zTexinfoTranslator.visit_rubric  s    t9>dkkmQ{^/LL.. 	&\\$"4"45F 			6)*!  	&\\"%F	&s   B
 
B%$B%c                d    | xj                   dz  c_         | j                  j                  d       y )Nr   r   )r   rf   r   rH  s     r"   depart_rubriczTexinfoTranslator.depart_rubric  s%    !		 r#   c                :    | j                   j                  d       y )Nz

@noindent
r   rH  s     r"   visit_subtitlez TexinfoTranslator.visit_subtitle  s    		*+r#   c                :    | j                   j                  d       y rh  r   rH  s     r"   depart_subtitlez!TexinfoTranslator.depart_subtitle  rj  r#   c                   |j                   j                  |      }	 	 |j                   |dz      }t        |t        j
                        rN|j                  d      r| j                  j                  |d          | j                  j                  |d          y 	 d|v ry |j                  d      r| j                  |d   |       |d   D ]  }| j                  ||        y # t        $ rJ |j                   j                   |j                   j                   j                  |j                            }Y w xY w# t        t        f$ r Y w xY w)Nr   refidrR  refuri)r   r   r   r   r   r   r   r   r   r   AttributeErrorr@  )rI   r   parindexnextr   s        r"   visit_targetzTexinfoTranslator.visit_target  s-   ;;$$T*	Q{{8a<0
 $.88G$))--d7m<%%,,T%[9	 / t88GOODM40u+ 	&BOOB%	&  Q {{))$++*<*<*B*B4;;*OPQ N+ 		s0   C! A'D7 !AD40D7 3D44D7 7E	E	c                     y r&   r   rH  s     r"   depart_targetzTexinfoTranslator.depart_target  rP  r#   c           	     <   t        |j                  t        j                  t        j
                  f      ry t        |      dk7  rt        |d   t        j                        ry |j                  d|j                               j                         }|j                  dd      }|s,|j                  d      rd| j                  d   z   dz   |d   z   }|sy |j                  d	      r| j                  |d
d        }| j                  |      }|r||k(  r.| j                  j                  d|z         t        j2                  | j                  j                  d| d| d       t        j2                  |j                  d      r;| j                  d   dz   |dd  z   }| j!                  |||       t        j2                  |j                  d      rW|j#                  d      }|dk(  r	|dd  dz   }n|dd  j%                  dd      }| j!                  |||       t        j2                  |j                  d      r|dd  j%                  dd      }| j                  |      }d}d|v r|j'                  d      \  }}}| j)                  |      }| j+                  |      }||k(  r2| j                  j                  d| d| d       t        j2                  | j                  j                  d| d| d| d       t        j2                  | j                  |      }| j                  |      }| j,                  j.                  }| j0                  rd}|r||k(  r.| j                  j                  d|z         t        j2                  |dk(  r2| j                  j                  d| d| d       t        j2                  |dk(  r2| j                  j                  d| d| d       t        j2                  | j                  j                  | d| d       t        j2                  )Nr   r   rw  r=   rv  r
  r   #zmailto:   z
@email{%s}z@email{r   r   r   r   z::doczinfo:   r
   r,   r   rB  z,,,rC  inlinez@indicateurl{%s}z@uref{no
@footnote{)r   r   r   rp   r	   	desc_typer   imager   r   r   r   r>  r   rf   r   rE  findr   	partitionr   r   r   texinfo_show_urlsr   r\  )rI   r   r   urir   	hashindexr
   	show_urlss           r"   visit_referencez!TexinfoTranslator.visit_reference  s    dkkEKK1C1C#DEt9>ja%++>xx.446hhx$txx())"--3d7mCC>>)$//#ab'*C??4(D43;		  !34X nnU 		  8C5$r!:;T nnS ^^C ""2&,s12w6BMM"dD)L nnK ^^C IBWw& W__S#.MM"dD)8 nn7 ^^G$ab'//#s+C//#&CBcz ]]3/
Q#B##D)Drz		  6"SR!89" nn 		  6"RvQse2!>? nn //#&C??4(D55I$	3$;		  !3c!9: nn h&		  73%qb!9:
 nn	 d"		  73%r$r!:; nn 		  D6SE!<=nnr#   c                     y r&   r   rH  s     r"   depart_referencez"TexinfoTranslator.depart_reference	  rP  r#   c                    t        j                  |j                  dd            }| j                  |       t         j                  )Nrp   r  )r   r   r   rM  r\  rI   r   texts      r"   visit_number_referencez(TexinfoTranslator.visit_number_reference  s1    zz$((7C01nnr#   c                    |j                         }| j                  j                  d| j                  |      z         t        j
                  )Nz	@cite{%s})r   rf   r   r   r   r\  r  s      r"   visit_title_referencez'TexinfoTranslator.visit_title_reference  s7    {{}		tt'<<=nnr#   c                :    | j                   j                  d       y Nr   r   rH  s     r"   visit_paragraphz!TexinfoTranslator.visit_paragraph      		r#   c                :    | j                   j                  d       y r  r   rH  s     r"   depart_paragraphz"TexinfoTranslator.depart_paragraph  r  r#   c                :    | j                   j                  d       y )Nz
@quotation
r   rH  s     r"   visit_block_quotez#TexinfoTranslator.visit_block_quote  s    		)*r#   c                Z    | j                          | j                  j                  d       y )Nz@end quotation
r   rf   r   rH  s     r"   depart_block_quotez$TexinfoTranslator.depart_block_quote!      		+,r#   c                :    | j                   j                  d       y )Nz

@example
r   rH  s     r"   visit_literal_blockz%TexinfoTranslator.visit_literal_block%  s    		(r#   c                Z    | j                          | j                  j                  d       y )Nz@end example
r  rH  s     r"   depart_literal_blockz&TexinfoTranslator.depart_literal_block(      		)*r#   c                    t        |j                  t        j                        s| j                  j                  d       | j                  j                  d       y )Nr   z	@display
)r   r   r   
line_blockrf   r   rH  s     r"   visit_line_blockz"TexinfoTranslator.visit_line_block/  s:    $++u'7'78IIV$		&r#   c                    | j                   j                  d       t        |j                  t        j
                        s| j                   j                  d       y y )Nz@end display
r   )rf   r   r   r   r   r  rH  s     r"   depart_line_blockz#TexinfoTranslator.depart_line_block4  s@    		)*$++u'7'78IIV$ 9r#   c                .    | xj                   dz  c_         y rV  r   rH  s     r"   
visit_linezTexinfoTranslator.visit_line9      !r#   c                d    | j                   j                  d       | xj                  dz  c_        y )Nz@w{ }
r   )rf   r   r   rH  s     r"   depart_linezTexinfoTranslator.depart_line<  s%    		#!r#   c                :    | j                   j                  d       y )N`r   rH  s     r"   visit_strongzTexinfoTranslator.visit_strongB      		r#   c                :    | j                   j                  d       y )N'r   rH  s     r"   depart_strongzTexinfoTranslator.depart_strongE  r  r#   c                    | j                   r7| j                  j                  d       | j                  j                  d       y | j                  j                  d       | j                  j                  d       y )Nz@var{r   r  r  )r   rf   r   r   rH  s     r"   visit_emphasisz TexinfoTranslator.visit_emphasisH  sQ    <<IIW%LL$IIS!LL$r#   c                j    | j                   j                  | j                  j                                y r&   rf   r   r   r   rH  s     r"   depart_emphasisz!TexinfoTranslator.depart_emphasisP  !    		))+,r#   c                    d|d   v S )Nsampclassesr   rH  s     r"   is_sampzTexinfoTranslator.is_sampS  s    i((r#   c                    | j                  |      r| xj                  dz  c_        | j                  j                  d       y )Nr   @code{r  r   rf   r   rH  s     r"   visit_literalzTexinfoTranslator.visit_literalV  s.    <<LLAL		"r#   c                    | j                  |      r| xj                  dz  c_        | j                  j                  d       y )Nr   r   r  rH  s     r"   depart_literalz TexinfoTranslator.depart_literal[  s.    <<LLAL		r#   c                :    | j                   j                  d       y )Nz@w{^r   rH  s     r"   visit_superscriptz#TexinfoTranslator.visit_superscript`  rj  r#   c                :    | j                   j                  d       y Nr   r   rH  s     r"   depart_superscriptz$TexinfoTranslator.depart_superscriptc  r  r#   c                :    | j                   j                  d       y Nz@w{[r   rH  s     r"   visit_subscriptz!TexinfoTranslator.visit_subscriptf  rj  r#   c                :    | j                   j                  d       y Nz]}r   rH  s     r"   depart_subscriptz"TexinfoTranslator.depart_subscripti  r  r#   c                "    t         j                  r&   r   r\  rH  s     r"   visit_footnotez TexinfoTranslator.visit_footnoten      nnr#   c                d    | xj                   dz  c_         | j                  j                  d       y )Nr   r  )r   rf   r   rH  s     r"   visit_collected_footnotez*TexinfoTranslator.visit_collected_footnoteq  s%    A		&r#   c                d    | j                   j                  d       | xj                  dz  c_        y )Nr   r   )rf   r   r   rH  s     r"   depart_collected_footnotez+TexinfoTranslator.depart_collected_footnoteu  s%    		Ar#   c                    |j                         j                         }	 | j                  d   |   \  }}|j                  |        t
        j                  # t        t        f$ r}t
        j                  |d }~ww xY w)Nr   )	r   r   r   r<  r   r   r\  rP   SkipChildren)rI   r   r9  footnode_usedexcs         r"   visit_footnote_referencez*TexinfoTranslator.visit_footnote_referencey  ss    kkm!!#	*"004S9OHe 	4    	 *% 	*..c)	*s   A A;%A66A;c                    | j                   j                  d       |j                  d      D ]  }| j                  ||        | xj                  dz  c_        y )Nr   rR  r   )rf   r   r   r@  r   )rI   r   r   s      r"   visit_citationz TexinfoTranslator.visit_citation  sJ    		((5/ 	&BOOB%	&!r#   c                .    | xj                   dz  c_         y rV  r  rH  s     r"   depart_citationz!TexinfoTranslator.depart_citation  r  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   visit_citation_referencez*TexinfoTranslator.visit_citation_reference  rj  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   depart_citation_referencez+TexinfoTranslator.depart_citation_reference  r  r#   c                d    |j                  dd      }| j                  j                  d|z         y )Nbullet*z

@itemize %s
r   rf   r   )rI   r   r  s      r"   visit_bullet_listz#TexinfoTranslator.visit_bullet_list  s*    (C(		,v56r#   c                Z    | j                          | j                  j                  d       y )Nz@end itemize
r  rH  s     r"   depart_bullet_listz$TexinfoTranslator.depart_bullet_list  r  r#   c                    |j                  dd      }dddd}|j                  d|j                  |d            }| j                  j                  d|z         y )	Nenumtypearabicr=   aA)r  
loweralpha
upperalphastartz

@enumerate %s
r  )rI   r   enumstartersr  s        r"   visit_enumerated_listz'TexinfoTranslator.visit_enumerated_list  sQ    xx
H- 3G(,,tR"89		.67r#   c                Z    | j                          | j                  j                  d       y )Nz@end enumerate
r  rH  s     r"   depart_enumerated_listz(TexinfoTranslator.depart_enumerated_list  r  r#   c                :    | j                   j                  d       y )Nz
@item r   rH  s     r"   visit_list_itemz!TexinfoTranslator.visit_list_item  s    		$r#   c                     y r&   r   rH  s     r"   depart_list_itemz"TexinfoTranslator.depart_list_item  rP  r#   c                :    | j                   j                  d       y )Nz

@table @option
r   rH  s     r"   visit_option_listz#TexinfoTranslator.visit_option_list  s    		/0r#   c                Z    | j                          | j                  j                  d       y Nz@end table
r  rH  s     r"   depart_option_listz$TexinfoTranslator.depart_option_list      		(r#   c                     y r&   r   rH  s     r"   visit_option_list_itemz(TexinfoTranslator.visit_option_list_item  rP  r#   c                     y r&   r   rH  s     r"   depart_option_list_itemz)TexinfoTranslator.depart_option_list_item  rP  r#   c                    d| _         y Nz@item	at_item_xrH  s     r"   visit_option_groupz$TexinfoTranslator.visit_option_group  	     r#   c                     y r&   r   rH  s     r"   depart_option_groupz%TexinfoTranslator.depart_option_group  rP  r#   c                    | xj                   dz  c_         | j                  j                  d| j                  z         d| _        y )Nr   r[  @itemx)r   rf   r   r  rH  s     r"   visit_optionzTexinfoTranslator.visit_option  s5    q 		4>>12!r#   c                .    | xj                   dz  c_         y rV  )r   rH  s     r"   depart_optionzTexinfoTranslator.depart_option  s    q r#   c                     y r&   r   rH  s     r"   visit_option_stringz%TexinfoTranslator.visit_option_string  rP  r#   c                     y r&   r   rH  s     r"   depart_option_stringz&TexinfoTranslator.depart_option_string  rP  r#   c                Z    | j                   j                  |j                  dd             y )N	delimiterr,   )rf   r   r   rH  s     r"   visit_option_argumentz'TexinfoTranslator.visit_option_argument  s    		+s34r#   c                     y r&   r   rH  s     r"   depart_option_argumentz(TexinfoTranslator.depart_option_argument  rP  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   visit_descriptionz#TexinfoTranslator.visit_description  r  r#   c                     y r&   r   rH  s     r"   depart_descriptionz$TexinfoTranslator.depart_description  rP  r#   c                :    | j                   j                  d       y )Nz

@table @asis
r   rH  s     r"   visit_definition_listz'TexinfoTranslator.visit_definition_list  s    		-.r#   c                Z    | j                          | j                  j                  d       y r  r  rH  s     r"   depart_definition_listz(TexinfoTranslator.depart_definition_list  r  r#   c                    d| _         y r  r  rH  s     r"   visit_definition_list_itemz,TexinfoTranslator.visit_definition_list_item  r  r#   c                     y r&   r   rH  s     r"   depart_definition_list_itemz-TexinfoTranslator.depart_definition_list_item  rP  r#   c                `   |j                  d      D ]  }| j                  ||        |d d  D ]O  }t        |t        j                  t
        j                  f      s.|j                  |        |j                  |       Q | j                  j                  d| j                  z         d| _        y )NrR  r[  r  )r   r@  r   r	   r   r   targetrP   removerf   r   r  )rI   r   r   r3  s       r"   
visit_termzTexinfoTranslator.visit_term  s    ((5/ 	&BOOB%	& b 	A!hnnell;<D!A	 			4>>12!r#   c                     y r&   r   rH  s     r"   depart_termzTexinfoTranslator.depart_term  rP  r#   c                :    | j                   j                  d       y )Nz : r   rH  s     r"   visit_classifierz"TexinfoTranslator.visit_classifier      		r#   c                     y r&   r   rH  s     r"   depart_classifierz#TexinfoTranslator.depart_classifier  rP  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   visit_definitionz"TexinfoTranslator.visit_definition  r  r#   c                     y r&   r   rH  s     r"   depart_definitionz#TexinfoTranslator.depart_definition  rP  r#   c                    d| _         y r  	entry_seprH  s     r"   visit_tablezTexinfoTranslator.visit_table  r  r#   c                :    | j                   j                  d       y )Nz
@end multitable

r   rH  s     r"   depart_tablezTexinfoTranslator.depart_table
  s    		01r#   c                     y r&   r   rH  s     r"   visit_tabular_col_specz(TexinfoTranslator.visit_tabular_col_spec  rP  r#   c                     y r&   r   rH  s     r"   depart_tabular_col_specz)TexinfoTranslator.depart_tabular_col_spec  rP  r#   c                &   | j                   j                  |d          t        | j                         | j                  k7  ry | j                  j                  d       | j                   D ]&  }| j                  j                  dd|dz   z  z         ( y )Ncolwidthz

@multitable z{%s} r)   r   )r   r   r   n_colsrf   )rI   r   r3  s      r"   visit_colspeczTexinfoTranslator.visit_colspec  sv    d:./t~~$++-		+, 	8AIIWq1u67	8r#   c                     y r&   r   rH  s     r"   depart_colspecz TexinfoTranslator.depart_colspec  rP  r#   c                &    g | _         |d   | _        y )Ncols)r   rI  rH  s     r"   visit_tgroupzTexinfoTranslator.visit_tgroup  s    6lr#   c                     y r&   r   rH  s     r"   depart_tgroupzTexinfoTranslator.depart_tgroup"  rP  r#   c                    d| _         y )Nz	@headitemr>  rH  s     r"   visit_theadzTexinfoTranslator.visit_thead%  s	    $r#   c                     y r&   r   rH  s     r"   depart_theadzTexinfoTranslator.depart_thead(  rP  r#   c                     y r&   r   rH  s     r"   visit_tbodyzTexinfoTranslator.visit_tbody+  rP  r#   c                     y r&   r   rH  s     r"   depart_tbodyzTexinfoTranslator.depart_tbody.  rP  r#   c                     y r&   r   rH  s     r"   	visit_rowzTexinfoTranslator.visit_row1  rP  r#   c                    d| _         y r  r>  rH  s     r"   
depart_rowzTexinfoTranslator.depart_row4  r  r#   c                b    | j                   j                  d| j                  z         d| _        y )Nz
%s
z@tab)rf   r   r?  rH  s     r"   visit_entryzTexinfoTranslator.visit_entry7  s$    		DNN23r#   c                z    t        |j                  dd            D ]  }| j                  j                  d        y )Nmorecolsr   z
@tab
)ranger   rf   r   )rI   r   _is      r"   depart_entryzTexinfoTranslator.depart_entry;  s3    Q/0 	)BIIZ(	)r#   c                     y r&   r   rH  s     r"   visit_field_listz"TexinfoTranslator.visit_field_listA  rP  r#   c                     y r&   r   rH  s     r"   depart_field_listz#TexinfoTranslator.depart_field_listD  rP  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   visit_fieldzTexinfoTranslator.visit_fieldG  r  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   depart_fieldzTexinfoTranslator.depart_fieldJ  r  r#   c                Z    | j                          | j                  j                  d       y )Nz@*r  rH  s     r"   visit_field_namez"TexinfoTranslator.visit_field_nameM  s    		r#   c                :    | j                   j                  d       y )Nr   r   rH  s     r"   depart_field_namez#TexinfoTranslator.depart_field_nameQ  r  r#   c                     y r&   r   rH  s     r"   visit_field_bodyz"TexinfoTranslator.visit_field_bodyT  rP  r#   c                     y r&   r   rH  s     r"   depart_field_bodyz#TexinfoTranslator.depart_field_bodyW  rP  r#   c                    |s.t        d|d         }| j                  |j                               }| j                  j	                  d|z         y )Nnodes.titler   
@cartouche
@quotation %s )r   r   r   rf   r   )rI   r   r   rp   s       r"   visit_admonitionz"TexinfoTranslator.visit_admonition\  sA    Q0E;;u||~.D		7$>?r#   c                f    t         |j                     }| j                  j                  d|z         y )Nrw  )r   tagnamerf   r   )rI   r   r8  s      r"   _visit_named_admonitionz)TexinfoTranslator._visit_named_admonitionb  s(     .		7%?@r#   c                Z    | j                          | j                  j                  d       y )Nz@end quotation
@end cartouche
r  rH  s     r"   depart_admonitionz#TexinfoTranslator.depart_admonitionf  s    		;<r#   c                "    t         j                  r&   r  rH  s     r"   visit_docinfozTexinfoTranslator.visit_docinfo  r  r#   c                "    t         j                  r&   r  rH  s     r"   visit_generatedz!TexinfoTranslator.visit_generated  r  r#   c                "    t         j                  r&   r  rH  s     r"   visit_headerzTexinfoTranslator.visit_header  r  r#   c                "    t         j                  r&   r  rH  s     r"   visit_footerzTexinfoTranslator.visit_footer  r  r#   c                ^    |j                  d      r| j                  j                  d       y y )Nliteral_blockz

@float LiteralBlock
r  rH  s     r"   visit_containerz!TexinfoTranslator.visit_container  s&    88O$II89 %r#   c                ^    |j                  d      r| j                  j                  d       y y )Nr  
@end float

r  rH  s     r"   depart_containerz"TexinfoTranslator.depart_container  s&    88O$II/0 %r#   c                     y r&   r   rH  s     r"   visit_decorationz"TexinfoTranslator.visit_decoration  rP  r#   c                     y r&   r   rH  s     r"   depart_decorationz#TexinfoTranslator.depart_decoration  rP  r#   c                ,   |j                  dd      x}rd|v rt        j                  t        d|d         }| j	                  |       | j
                  j                  d| j                  |j                               z         | j                  |       y )Nr  r   contentsrv  r   z%s
)
r   r   r\  r   rc  rf   r   r   r   rp  )rI   r   r  rp   s       r"   visit_topiczTexinfoTranslator.visit_topic  s{    xx	2..G.J'4I.. ]DG,% 		$++elln"==>5!r#   c                     y r&   r   rH  s     r"   depart_topiczTexinfoTranslator.depart_topic  rP  r#   c                @    | j                   j                  ddz         y )Nz

%s

B__________________________________________________________________r   rH  s     r"   visit_transitionz"TexinfoTranslator.visit_transition  s    		23r#   c                     y r&   r   rH  s     r"   depart_transitionz#TexinfoTranslator.depart_transition  rP  r#   c                :    | j                   j                  d       y )Nz

@center --- r   rH  s     r"   visit_attributionz#TexinfoTranslator.visit_attribution      		+,r#   c                :    | j                   j                  d       y rh  r   rH  s     r"   depart_attributionz$TexinfoTranslator.depart_attribution  rj  r#   c                    |j                  dd      j                         }d|v sd|v r)| j                  j                  |j	                                t
        j                  )Nr   r=   r:   r;   )r   r-   rf   r   r   r   r\  )rI   r   r   s      r"   	visit_rawzTexinfoTranslator.visit_raw  sL    (B'--/&F"2IIT[[]+nnr#   c                :    | j                   j                  d       y )Nz

@float Figure
r   rH  s     r"   visit_figurezTexinfoTranslator.visit_figure  s    		./r#   c                :    | j                   j                  d       y )Nr  r   rH  s     r"   depart_figurezTexinfoTranslator.depart_figure  r  r#   c                B   t        |j                  t        j                        s?t        |j                  t        j                        r7|j                  j                  d      r| j                  j                  d       y t        j                  t        d      |       y )Nr  z

@caption{zcaption not inside a figure.rY  )r   r   r   figure	containerr   rf   r   ra  rb  r   rH  s     r"   visit_captionzTexinfoTranslator.visit_caption  s^    dkk5<<0t{{EOO40II]+NN2<=NMr#   c                   t        |j                  t        j                        s?t        |j                  t        j                        r8|j                  j                  d      r| j                  j                  d       y y y )Nr  }
)r   r   r   r  r  r   rf   r   rH  s     r"   depart_captionz TexinfoTranslator.depart_caption  sR    dkk5<<0t{{EOO40IIU# 1 5r#   c                V   |d   | j                   j                  v r| j                   j                  |d      }n| j                  ry |d   }|j                  d      dk7  ry t        j
                  j                  |      \  }}| j                  |j                  dd            }| j                  |j                  dd            }| j                  |j                  dd            }| j                  d   d d	  d
| }| j                  j                  d| d| d| d| d|dd   d       y )Nr  z://r   r   r=   heightaltrk   z	-figures/z
@image{r   r   r  )rH   imagesignore_missing_imagesr  ospathsplitextr  r   r   r   rf   r   )	rI   r   r  r   extr   r  r  rk   s	            r"   visit_imagezTexinfoTranslator.visit_image  s   ;$,,---,,%%d5k2C ))u+C88E?b GG$$S)	c%%dhhw&;<&&txx"'=>oodhhub12mmJ/45YtfE		:hZqq#aAByPTUVr#   c                     y r&   r   rH  s     r"   depart_imagezTexinfoTranslator.depart_image  rP  r#   c                     y r&   r   rH  s     r"   visit_compoundz TexinfoTranslator.visit_compound  rP  r#   c                     y r&   r   rH  s     r"   depart_compoundz!TexinfoTranslator.depart_compound  rP  r#   c                &    | j                  |       y r&   )r  rH  s     r"   visit_sidebarzTexinfoTranslator.visit_sidebar  s    r#   c                &    | j                  |       y r&   )r  rH  s     r"   depart_sidebarz TexinfoTranslator.depart_sidebar  s    $r#   c                r    | j                   rt        j                  | j                  j	                  d       y )Nz@w{()r   r   r\  rf   r   rH  s     r"   visit_labelzTexinfoTranslator.visit_label  s'    .. 		 r#   c                :    | j                   j                  d       y )Nz)} r   rH  s     r"   depart_labelzTexinfoTranslator.depart_label  r6  r#   c                     y r&   r   rH  s     r"   visit_legendzTexinfoTranslator.visit_legend  rP  r#   c                     y r&   r   rH  s     r"   depart_legendzTexinfoTranslator.depart_legend  rP  r#   c                     y r&   r   rH  s     r"   visit_substitution_referencez.TexinfoTranslator.visit_substitution_reference  rP  r#   c                     y r&   r   rH  s     r"   depart_substitution_referencez/TexinfoTranslator.depart_substitution_reference  rP  r#   c                "    t         j                  r&   r  rH  s     r"   visit_substitution_definitionz/TexinfoTranslator.visit_substitution_definition  r  r#   c                z    | j                   j                  d|j                         z         t        j                  )Nz.
@verbatim
<SYSTEM MESSAGE: %s>
@end verbatim
)rf   r   r   r   r\  rH  s     r"   visit_system_messagez&TexinfoTranslator.visit_system_message  s.    		@4;;=P	
 nnr#   c                    | j                   j                  d       |j                         j                         D ]   }| j                   j                  d|z         " t        j
                  )Nr   z@c %s
)rf   r   r   
splitlinesr   r\  )rI   r   lines      r"   visit_commentzTexinfoTranslator.visit_comment  sS    		KKM,,. 	/DIIY-.	/nnr#   c                :    | j                   j                  d       y )Nz>>r   rH  s     r"   visit_problematicz#TexinfoTranslator.visit_problematic  r  r#   c                :    | j                   j                  d       y )Nz<<r   rH  s     r"   depart_problematicz$TexinfoTranslator.depart_problematic  r  r#   c                F    t         j                  t        d      ||       y )Nzunimplemented node type: %rrY  )ra  rb  r   rH  s     r"   unimplemented_visitz%TexinfoTranslator.unimplemented_visit  s    r78$Nr#   c                     y r&   r   rH  s     r"   unknown_departurez#TexinfoTranslator.unknown_departure  rP  r#   c                4    | j                  d        d| _        y )NT)r  r   rH  s     r"   visit_productionlistz&TexinfoTranslator.visit_productionlist!  s      &"&r#   c                4    d| _         | j                  d        y )NF)r   r  rH  s     r"   depart_productionlistz'TexinfoTranslator.depart_productionlist%  s    "'!!$'r#   c                     y r&   r   rH  s     r"   visit_productionz"TexinfoTranslator.visit_production)  rP  r#   c                     y r&   r   rH  s     r"   depart_productionz#TexinfoTranslator.depart_production,  rP  r#   c                :    | j                   j                  d       y )Nr  r   rH  s     r"   visit_literal_emphasisz(TexinfoTranslator.visit_literal_emphasis/  s    		"r#   c                :    | j                   j                  d       y r  r   rH  s     r"   depart_literal_emphasisz)TexinfoTranslator.depart_literal_emphasis2  r  r#   c                    | j                   r|d   D ]  }| j                  ||        y | j                  j                  d       y )NrR  r  )r   r@  rf   r   )rI   r   id_s      r"   visit_literal_strongz&TexinfoTranslator.visit_literal_strong5  sA    ""E{ +T*+		"r#   c                T    | j                   ry | j                  j                  d       y r  )r   rf   r   rH  s     r"   depart_literal_strongz'TexinfoTranslator.depart_literal_strong<  s     ""		r#   c                "   t        |j                  t        j                        r| j	                          n| j
                  j                  d       |d   D ]7  \  }}}}}| j                  |      }| j
                  j                  d|z         9 y )Nr   r   z@geindex %s
)r   r   r   	paragraphr   rf   r   r   )rI   r   _entry_typevalue
_target_id_main_category_keyr  s           r"   visit_indexzTexinfoTranslator.visit_indexA  su    dkk5??3OOIIT"DHO 	5@K
E=##E*DII_t34	5r#   c                :    | j                   j                  d       y r  r   rH  s     r"   visit_versionmodifiedz'TexinfoTranslator.visit_versionmodifiedK  r  r#   c                :    | j                   j                  d       y r  r   rH  s     r"   depart_versionmodifiedz(TexinfoTranslator.depart_versionmodifiedN  r  r#   c                    | j                   j                  d       | j                  j                  |d          | j                  j                  | j                  |             y )NrG  r-  )r   r   r   r   r   r:  rH  s     r"   visit_start_of_filez%TexinfoTranslator.visit_start_of_fileQ  sM    !!&)  i1!!$"8"8">?r#   c                l    | j                   j                          | j                  j                          y r&   )r   r   r   rH  s     r"   depart_start_of_filez&TexinfoTranslator.depart_start_of_fileW  s&     r#   c                    | j                  |j                               }| j                  j                  d|z         t        j
                  )Nz

@center %s

)r   r   rf   r   r   r\  rI   r   txts      r"   visit_centeredz TexinfoTranslator.visit_centered[  s8    oodkkm,		-34nnr#   c                N    | j                   j                  dt        d   z         y )Nz

@subsubheading %s

seealso)rf   r   r   rH  s     r"   visit_seealsozTexinfoTranslator.visit_seealso`  s     		47G	7RRSr#   c                :    | j                   j                  d       y r  r   rH  s     r"   depart_seealsoz TexinfoTranslator.depart_seealsoc  r  r#   c                "    t         j                  r&   r  rH  s     r"   
visit_metazTexinfoTranslator.visit_metaf  r  r#   c                     y r&   r   rH  s     r"   visit_glossaryz TexinfoTranslator.visit_glossaryi  rP  r#   c                     y r&   r   rH  s     r"   depart_glossaryz!TexinfoTranslator.depart_glossaryl  rP  r#   c                ,   t        d|d         }t        d|      }| j                  j                  d       | j                  j                  dj                  d |D              dz          | j                  j                  d       t        j
                  )Nznodes.bullet_listr   zIterable[nodes.list_item]r   , c              3  <   K   | ]  }|j                           y wr&   )r   )r(   r3  s     r"   r*   z/TexinfoTranslator.visit_acks.<locals>.<genexpr>s  s     "B!188:"Br+   r   )r   rf   r   r1   r   r\  )rI   r   bullet_list
list_itemss       r"   
visit_ackszTexinfoTranslator.visit_ackso  st    .Q85{C
		 		"Bz"BBSHI		 nnr#   c                H    | j                   j                  |       d| _        y )Nz@deffn)r   r   	at_deffnxrH  s     r"   
visit_desczTexinfoTranslator.visit_desc~  s    

$!r#   c                    | j                   j                          | j                          | j                  j	                  d       y )Nz@end deffn
)r   r   r   rf   r   rH  s     r"   depart_desczTexinfoTranslator.depart_desc  s,    

		(r#   c                *   | xj                   dz  c_         |j                  d   }|dk7  r(|j                  d      D ]  }| j                  ||        	 | j                  |j                  d      }|j                  |j                  |   | j                  j                  |j                  k(        }| j                  t        |            }| j                  j                  d| j                   d| d       d	| _        || _        y # t        $ r |}Y bw xY w)
Nr   objtypedescriberR  r*  r   z {z} z@deffnx)r   r   r   r@  r#  get_type_nameobject_typesr   primary_domainr   r<  r   r7   rf   r   r  desc_type_name)rI   r   r  r   r*  r   categorys          r"   visit_desc_signaturez&TexinfoTranslator.visit_desc_signature  s    q ++i(j hhuo *D)*	]]4;;x#89F''##G,dkk.H.HFKK.WD ??>$#78		2dnn-S
#>?"*.  	D	s   AD DDc                r    | j                   j                  d       | xj                  dz  c_        d | _        y )Nr   r   )rf   r   r   r  rH  s     r"   depart_desc_signaturez'TexinfoTranslator.depart_desc_signature  s-    		q "r#   c                     y r&   r   rH  s     r"   visit_desc_signature_linez+TexinfoTranslator.visit_desc_signature_line  rP  r#   c                     y r&   r   rH  s     r"   depart_desc_signature_linez,TexinfoTranslator.depart_desc_signature_line  rP  r#   c                     y r&   r   rH  s     r"   visit_desc_contentz$TexinfoTranslator.visit_desc_content  rP  r#   c                     y r&   r   rH  s     r"   depart_desc_contentz%TexinfoTranslator.depart_desc_content  rP  r#   c                     y r&   r   rH  s     r"   visit_desc_inlinez#TexinfoTranslator.visit_desc_inline  rP  r#   c                     y r&   r   rH  s     r"   depart_desc_inlinez$TexinfoTranslator.depart_desc_inline  rP  r#   c                     y r&   r   rH  s     r"   visit_desc_namez!TexinfoTranslator.visit_desc_name  rP  r#   c                     y r&   r   rH  s     r"   depart_desc_namez"TexinfoTranslator.depart_desc_name  rP  r#   c                     y r&   r   rH  s     r"   visit_desc_addnamez$TexinfoTranslator.visit_desc_addname  rP  r#   c                     y r&   r   rH  s     r"   depart_desc_addnamez%TexinfoTranslator.depart_desc_addname  rP  r#   c                     y r&   r   rH  s     r"   visit_desc_typez!TexinfoTranslator.visit_desc_type  rP  r#   c                     y r&   r   rH  s     r"   depart_desc_typez"TexinfoTranslator.depart_desc_type  rP  r#   c                :    | j                   j                  d       y )Nz -> r   rH  s     r"   visit_desc_returnsz$TexinfoTranslator.visit_desc_returns  rj  r#   c                     y r&   r   rH  s     r"   depart_desc_returnsz%TexinfoTranslator.depart_desc_returns  rP  r#   c                H    | j                   j                  d       d| _        y )Nz (r   rf   r   first_paramrH  s     r"   visit_desc_parameterlistz*TexinfoTranslator.visit_desc_parameterlist      		r#   c                :    | j                   j                  d       y )N)r   rH  s     r"   depart_desc_parameterlistz+TexinfoTranslator.depart_desc_parameterlist  r  r#   c                H    | j                   j                  d       d| _        y )Nz [r   r@  rH  s     r"   visit_desc_type_parameter_listz0TexinfoTranslator.visit_desc_type_parameter_list  rC  r#   c                :    | j                   j                  d       y N]r   rH  s     r"   depart_desc_type_parameter_listz1TexinfoTranslator.depart_desc_type_parameter_list  r  r#   c                   | j                   s| j                  j                  d       nd| _         | j                  |j	                               }|j                  dd      }| j                  j                  |       t        j                  )Nr  r       z@w{ })rA  rf   r   r   r   r   r   r\  r  s      r"   visit_desc_parameterz&TexinfoTranslator.visit_desc_parameter  sf    IIT" D{{4;;=)||0':		nnr#   c                &    | j                  |       y r&   )rO  rH  s     r"   visit_desc_type_parameterz+TexinfoTranslator.visit_desc_type_parameter  s    !!$'r#   c                :    | j                   j                  d       y )N[r   rH  s     r"   visit_desc_optionalz%TexinfoTranslator.visit_desc_optional  r  r#   c                :    | j                   j                  d       y rJ  r   rH  s     r"   depart_desc_optionalz&TexinfoTranslator.depart_desc_optional  r  r#   c                    |j                         j                         }| j                  r|| j                  d   d   k(  s(| j                  r-|| j                  j	                         v rt
        j                  y y )Nr   r  )r   r   r   r  r-   r   r\  r  s      r"   visit_desc_annotationz'TexinfoTranslator.visit_desc_annotation  se     kkm!!#JJ3$**R.";;C4+>+>+D+D+F$F..  %Gr#   c                     y r&   r   rH  s     r"   depart_desc_annotationz(TexinfoTranslator.depart_desc_annotation  rP  r#   c                     y r&   r   rH  s     r"   visit_inlinezTexinfoTranslator.visit_inline   rP  r#   c                     y r&   r   rH  s     r"   depart_inlinezTexinfoTranslator.depart_inline  rP  r#   c                f   |j                  dd      }|j                         }| j                  j                  d       |rW|| j                  vrI| j
                  j                  d| j                  |      z         | j                  j                  |       y | j
                  j                  d       y )Nexplanationr=   z@abbr{z,%s}r   )r   r   rf   r   r   r   r   r   )rI   r   r`  abbrs       r"   visit_abbreviationz$TexinfoTranslator.visit_abbreviation  s    hh}b1{{}		"4t'9'99LL)E EF""4(LL$r#   c                j    | j                   j                  | j                  j                                y r&   r  rH  s     r"   depart_abbreviationz%TexinfoTranslator.depart_abbreviation  r  r#   c                $    | j                  |      S r&   )r  rH  s     r"   visit_manpagezTexinfoTranslator.visit_manpage  s    **400r#   c                $    | j                  |      S r&   )r  rH  s     r"   depart_manpagez TexinfoTranslator.depart_manpage  s    ++D11r#   c                     y r&   r   rH  s     r"   visit_download_referencez*TexinfoTranslator.visit_download_reference  rP  r#   c                     y r&   r   rH  s     r"   depart_download_referencez+TexinfoTranslator.depart_download_reference  rP  r#   c                &    | j                  |       y r&   )r  rH  s     r"   visit_hlistzTexinfoTranslator.visit_hlist  s    t$r#   c                &    | j                  |       y r&   )r  rH  s     r"   depart_hlistzTexinfoTranslator.depart_hlist"  s    %r#   c                     y r&   r   rH  s     r"   visit_hlistcolz TexinfoTranslator.visit_hlistcol%  rP  r#   c                     y r&   r   rH  s     r"   depart_hlistcolz!TexinfoTranslator.depart_hlistcol(  rP  r#   c                     y r&   r   rH  s     r"   visit_pending_xrefz$TexinfoTranslator.visit_pending_xref+  rP  r#   c                     y r&   r   rH  s     r"   depart_pending_xrefz%TexinfoTranslator.depart_pending_xref.  rP  r#   c                    | j                   j                  d| j                  |j                               z   dz          t        j
                  )Nz@math{r   )rf   r   r   r   r   r\  rH  s     r"   
visit_mathzTexinfoTranslator.visit_math1  s7    		DOODKKM$BBSHInnr#   c                    |j                  d      r| j                  |d   |       | j                  j                  d| j	                  |j                                d       t        j                  )Nr8  z

@example
z
@end example

)r   r@  rf   r   r   r   r   r\  rH  s     r"   visit_math_blockz"TexinfoTranslator.visit_math_block5  s[    88GOODM40		T__T[[];<<NO	
 nnr#   )rM   znodes.documentrH   r   rW   rX   rY   )r2   rB   rW   rB   )r   rB   r   rB   r   rB   rW   rB   )r   z	list[str]r   zre.Pattern[str]rW   rX   )r   rB   rW   rX   )r  rB   rW   rB   )r   r   rW   z*dict[str, list[collected_footnote | bool]])r   rB   rW   rB   )r   rB   r   r   rW   rX   )r   rB   r   rB   r   r   rW   rX   )r   r   rW   rX   )r   r   rW   rX   )r   zElement | NonerW   rX   )r   r   rW   r   )r=   )r   r   r   rB   rW   rX   )r   r   rW   rX   )r   zaddnodes.descrW   rX   )r   z
nodes.mathrW   rX   )r   znodes.math_blockrW   rX   (  rZ   r[   r\   r  r`   r   rG   rQ   rr   r|   r}   r~   r   r   r   r   r   r   r   compiler  r   r  r{   r:  r  r@  rE  rI  rK  rM  rO  rT  rW  rd  rm  rf  ri  rc  rp  rr  rt  r{  r}  r  r  r  r  r  r  r  r  r  r  visit_doctest_blockdepart_doctest_blockr  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  r5  r8  r:  r<  r@  rB  rD  rF  rJ  rL  rO  rQ  rS  rU  rW  rY  r[  r]  r_  rd  rf  rh  rj  rl  rn  rp  rr  rt  rx  r{  r}  visit_attentiondepart_attentionvisit_cautiondepart_cautionvisit_dangerdepart_dangervisit_errordepart_error
visit_hintdepart_hintvisit_importantdepart_important
visit_notedepart_note	visit_tip
depart_tipvisit_warningdepart_warningr  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  r
  r  r  r  r  r   r"  r$  r&  r(  r*  r,  r.  r0  r2  r4  r6  r8  r:  r<  r>  rB  rF  rH  rL  rO  rQ  rT  rV  rX  rZ  r\  r^  rb  rd  rf  rh  rj  rl  rn  rp  rr  rt  rv  rx  rz  r|  ra   rb   s   @r"   rL   rL      ss   ! !'F/**8X#7J+2'B		#
	(  *rzz-8HH H 
	H*;8)\	3,		)#*  & HG02!"!,!
&0=~
+-)+ ./'
%
""%-)#

!!
'!""!
7+8-%
1)!"
!5
/)!	" 
!28#%! )
@A= .O(+M&N*L%M)K$L(J#K-O((J#K'I"J+M&N:1"4-!0-N$W& ! O
'(##
5@!
T")
/(#
!	(
!
%-12%& r#   rL   )r   r   rW   zlist[nodes.section]r&   )r2   rB   r3   z
str | NonerW   rB   )3r]   
__future__r   os.pathr  r   r   typingr   r   docutilsr   r   sphinxr   r	   sphinx.localer
   r   r   sphinx.utilr   sphinx.util.docutilsr   sphinx.util.i18nr   sphinx.writers.latexr   collections.abcr   r   r   r   docutils.nodesr   r   r   sphinx.builders.texinfor   sphinx.domainsr   	getLoggerrZ   ra  r   r   r   r7   Writerr9   rL   r   r#   r"   <module>r     s    ) "  	  & # 0 1 1  1 ( 32$226) 
		8	$ ++ ",(V	$!=GNN !=Hk( kr#   