1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
3

T'íc½Ïã@s„dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZmZddlmZmZmZddlmZmZddlmZdd	lm Z dd
l!m"Z"ddl#m$Z$ddl%m&Z&m'Z'm(Z(dd
l)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0erddl1m2Z2e*j3e4ƒZ5dZ6dedZ7eeej8dœdd„Z9de:e:e:dœdd„Z;Gdd„dej<ƒZ=Gdd„de,ƒZ>dS) z#Custom docutils writer for Texinfo.éN)Úpath)Ú
TYPE_CHECKINGÚAnyÚDictÚIterableÚIteratorÚListÚOptionalÚPatternÚSetÚTupleÚUnionÚcast)ÚnodesÚwriters)ÚElementÚNodeÚText)Ú__display_version__Úaddnodes)ÚRemovedInSphinx50Warning)Ú
IndexEntry)ÚIndexDomain)ÚExtensionError)Ú_Ú__Úadmonitionlabels)Úlogging)ÚSphinxTranslator)Úformat_date)Úcollected_footnote)ÚTexinfoBuilderzn@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
@definfoenclose strong,`,'
@definfoenclose emph,`,'
@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
)ÚsectionÚreturncCsJg}x@|D]8}t|tjƒr(|j|ƒq
q
t|tjƒr
|jt|ƒƒq
W|S)z7Return a list of subsections for the given ``section``.)Ú
isinstancerr"ÚappendrÚextendÚfind_subsections)r"ÚresultÚchild©r*ú8/tmp/pip-build-gk9425m9/sphinx/sphinx/writers/texinfo.pyr'Vs

r')ÚsÚsepr#cCsL|j|ƒ}x2t|ƒD]&\}}tdd„|Dƒƒr|jƒ||<qW|pDdj|ƒS)z_Like string.capwords() but does not capitalize words that already
    contain a capital letter.css|]}|jƒVqdS)N)Úislower)Ú.0Úxr*r*r+ú	<genexpr>gsz!smart_capwords.<locals>.<genexpr>ú )ÚsplitÚ	enumerateÚallÚ
capitalizeÚjoin)r,r-ÚwordsÚiÚwordr*r*r+Úsmart_capwordsbs

r;c
s¾eZdZUdZdZddddgdd	ifd
dgdd	ifdd
gdd	ifddgddifffZeeeeeee	ee
eeffdffiZe
dZedZ
dddœ‡fdd„Zddœdd„Z‡ZS)Ú
TexinfoWriterz0Texinfo writer for generating Texinfo documents.ÚtexinfoÚtexizTexinfo Specific OptionsNzName of the Info filez--texinfo-filenameÚdefaultÚz	Dir entryz--texinfo-dir-entryÚDescriptionz--texinfo-dir-descriptionZCategoryz--texinfo-dir-categoryZ
Miscellaneous.ÚoutputÚfragmentr!)Úbuilderr#cstƒjƒ||_dS)N)ÚsuperÚ__init__rD)ÚselfrD)Ú	__class__r*r+rF~s
zTexinfoWriter.__init__)r#cCs\|jj|j|jƒ}tt|ƒ|_|jj|ƒ|jjƒx"|jD]}t	||t
|j|ƒƒq<WdS)N)rDZcreate_translatorÚdocumentrÚTexinfoTranslatorÚvisitorÚ	walkaboutÚfinishÚvisitor_attributesÚsetattrÚgetattr)rGrKÚattrr*r*r+Ú	translate‚s
zTexinfoWriter.translate)r=r>)rBrC)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	supportedZ
settings_specrÚstrrrrZsettings_defaultsrBrNrFrRÚ
__classcell__r*r*)rHr+r<ls
8r<c
s’eZdZUdZddZdddddddddddddœZejdddœ‡fd	d
„Zddœdd
„Z	ddœdd„Z
ddœdd„Zddœdd„Zddœdd„Z
eedœdd„Zeedœdd„Zeedœdd„Zeedœdd„Zddœdd „Zeeeed!œd"d#„Zejd$ƒfeeedd%œd&d'„Zedd(œd)d*„Zeed+œd,d-„Zddœd.d/„Zeeeeee e!ffd0œd1d2„Z"eed3œd4d5„Z#ee$dd6œd7d8„Z%eee$dd9œd:d;„Z&edd0œd<d=„Z'edd0œd>d?„Z(e)dd0œd@dA„Z*e)dd0œdBdC„Z+edd0œdDdE„Z,edd0œdFdG„Z-dÛZ.dÜZ/edd0œdPdQ„Z0edd0œdRdS„Z1edd0œdTdU„Z2edd0œdVdW„Z3edd0œdXdY„Z4edd0œdZd[„Z5edd0œd\d]„Z6edd0œd^d_„Z7edd0œd`da„Z8edd0œdbdc„Z9edd0œddde„Z:edd0œdfdg„Z;edd0œdhdi„Z<edd0œdjdk„Z=edd0œdldm„Z>edd0œdndo„Z?edd0œdpdq„Z@edd0œdrds„ZAe@ZBeAZCedd0œdtdu„ZDedd0œdvdw„ZEedd0œdxdy„ZFedd0œdzd{„ZGedd0œd|d}„ZHedd0œd~d„ZIedd0œd€d„ZJedd0œd‚dƒ„ZKee!d0œd„d…„ZLedd0œd†d‡„ZMedd0œdˆd‰„ZNedd0œdŠd‹„ZOedd0œdŒd„ZPedd0œdŽd„ZQedd0œdd‘„ZRedd0œd’d“„ZSedd0œd”d•„ZTedd0œd–d—„ZUedd0œd˜d™„ZVedd0œdšd›„ZWedd0œdœd„ZXedd0œdždŸ„ZYedd0œd d¡„ZZedd0œd¢d£„Z[edd0œd¤d¥„Z\edd0œd¦d§„Z]edd0œd¨d©„Z^edd0œdªd«„Z_edd0œd¬d­„Z`edd0œd®d¯„Zaedd0œd°d±„Zbedd0œd²d³„Zcedd0œd´dµ„Zdedd0œd¶d·„Zeedd0œd¸d¹„Zfedd0œdºd»„Zgedd0œd¼d½„Zhedd0œd¾d¿„Ziedd0œdÀdÁ„Zjedd0œdÂdÄZkedd0œdÄdńZledd0œdÆdDŽZmedd0œdÈdɄZnedd0œdÊd˄Zoedd0œdÌd̈́Zpedd0œdÎdτZqedd0œdÐdфZredd0œdÒdӄZsedd0œdÔdՄZtedd0œdÖdׄZuedd0œdØdلZvedd0œdÚdۄZwedd0œdÜd݄Zxedd0œdÞd߄Zyedd0œdàdá„Zzedd0œdâdã„Z{edd0œdädå„Z|edd0œdædç„Z}edd0œdèdé„Z~edd0œdêdë„Zedd0œdìdí„Z€edd0œdîdï„Zedd0œdðdñ„Z‚edd0œdòdó„Zƒedd0œdôdõ„Z„edd0œdöd÷„Z…edd0œdødù„Z†edd0œdúdû„Z‡edd0œdüdý„Zˆedd0œdþdÿ„Z‰edd0œdd„ZŠedd0œdd„Z‹edd0œdd„ZŒedd0œdd„Zedd0œdd	„ZŽedd0œd
d„Zedd0œdd
„ZdÝeeddœdd„Z‘edd0œdd„Z’edd0œd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¥edd0œdd„Z¦edd0œdd„Z§edd0œdd„Z¨edd0œdd„Z©edd0œdd„Zªedd0œdd „Z«edd0œd!d"„Z¬edd0œd#d$„Z­edd0œd%d&„Z®edd0œd'd(„Z¯edd0œd)d*„Z°edd0œd+d,„Z±edd0œd-d.„Z²edd0œd/d0„Z³edd0œd1d2„Z´edd0œd3d4„Zµedd0œd5d6„Z¶edd0œd7d8„Z·edd0œd9d:„Z¸edd0œd;d<„Z¹edd0œd=d>„Zºedd0œd?d@„Z»edd0œdAdB„Z¼edd0œdCdD„Z½edd0œdEdF„Z¾edd0œdGdH„Z¿edd0œdIdJ„ZÀedd0œdKdL„ZÁedd0œdMdN„ZÂedd0œdOdP„ZÃedd0œdQdR„ZÄedd0œdSdT„ZÅedd0œdUdV„ZÆedd0œdWdX„ZÇedd0œdYdZ„ZÈedd0œd[d\„ZÉedd0œd]d^„ZÊe$dd0œd_d`„ZËedd0œdadb„ZÌedd0œdcdd„ZÍedd0œdedf„ZÎedd0œdgdh„ZÏedd0œdidj„ZÐedd0œdkdl„ZÑedd0œdmdn„ZÒedd0œdodp„ZÓedd0œdqdr„ZÔedd0œdsdt„ZÕedd0œdudv„ZÖedd0œdwdx„Z×edd0œdydz„ZØedd0œd{d|„ZÙedd0œd}d~„ZÚedd0œdd€„ZÛedd0œdd‚„ZÜedd0œdƒd„„ZÝedd0œd…d†„ZÞeßjàdd0œd‡dˆ„Záeßjàdd0œd‰dŠ„Zâedd0œd‹dŒ„Zãedd0œddŽ„Zäedd0œdd„Zåedd0œd‘d’„Zæedd0œd“d”„Zçedd0œd•d–„Zèedd0œd—d˜„Zéedd0œd™dš„Zêedd0œd›dœ„Zëedd0œddž„Zìedd0œdŸd „Zíedd0œd¡d¢„Zîedd0œd£d¤„Zïedd0œd¥d¦„Zðedd0œd§d¨„Zñedd0œd©dª„Zòedd0œd«d¬„Zóedd0œd­d®„Zôedd0œd¯d°„Zõedd0œd±d²„Zöedd0œd³d´„Z÷edd0œdµd¶„Zøedd0œd·d¸„Zùedd0œd¹dº„Zúedd0œd»d¼„Zûedd0œd½d¾„Züedd0œd¿dÀ„Zýedd0œdÁd„Zþedd0œdÐdĄZÿedd0œdŐdƄZedd0œdǐdȄZedd0œdɐdʄZedd0œdːd̄Zedd0œd͐d΄Zedd0œdϐdЄZedd0œdѐd҄Zedd0œdӐdԄZedd0œdՐdքZedd0œdאd؄Z	e
eeßjàdœdِdڄƒZà‡ZS(ÞrJNr!Fr@ér)ÚauthorÚbodyÚcopyingÚdateÚdirentryZ
exampleindentÚfilenameZparagraphindentÚpreambleÚprojectÚreleaseÚtitle)rIrDr#csÆtƒj||ƒ|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|_tƒ|_d|_dS)NrF)rErFÚ
init_settingsÚsetÚwritten_idsÚreferenced_idsÚindicesÚ	short_idsÚ
node_namesÚ
node_menusÚrellinksÚcollect_indicesÚcollect_node_namesÚcollect_node_menusÚcollect_rellinksr\ÚcontextÚdescsÚprevious_sectionÚ
section_levelÚ
seen_titleÚnext_section_idsÚescape_newlinesÚescape_hyphensÚcurfilestackÚ
footnotestackÚin_footnoteÚin_sampÚ
handled_abbrsÚ	colwidths)rGrIrD)rHr*r+rFŸs8zTexinfoTranslator.__init__)r#cCsÎ|jdkr|jdƒxN|jD]D}|\}}t|g|j|ƒ}|jjd|ƒ|jjd||fƒqWx6|jrš|jjƒ}||j	krf|jjd|ddfƒqfW|j
ƒdj|jƒ|_|j|j
d<t|j
|_dS)	NÚTopz
@node %s,%s,%s,%s
z@unnumbered %s

%s
z@anchor{%s}@w{%s}
r2ér@r\)rtÚadd_menuriÚtuplermr\r%rhÚpoprgÚ
ensure_eolr7rCÚelementsÚTEMPLATErB)rGÚindexÚnameÚcontentÚpointersÚrr*r*r+rMÁs



zTexinfoTranslator.finishcCsz|jjƒ}|_|j|jj|jj|jj|j|j	j
ƒ|j|j	jƒ|j|j	jƒ|j|j	j
ppt|j	jpftdƒ|j	jdƒdœƒ|jj}|s¤|jjtjƒ}|r |jƒnd}|j|ƒp°d|d<|ds|jjdƒpÎd|d<|ddd…dkrþ|ddd…|d<|dd7<|jjr\|j|j|jjƒd
|d|j|jjƒƒ}d|j|jjƒ|f|d<t||d<|j|jjƒdS)Nz	%b %d, %Y)Úlanguage)rdr[r`rcrbÚ	copyrightr^z
<untitled>rdr`ÚsourceZuntitledrZú.txtú.rstz.infoz(%s)z*@dircategory %s
@direntry
%s@end direntry
r_r]éüÿÿÿ)rr‘r’) Údefault_elementsÚcopyr†ÚupdateÚsettingsrdr[Ztexinfo_filenameÚescapeÚconfigrcrbrŽÚtodayrZ	today_fmtrrrIÚ	next_noderÚastextÚ	escape_idÚgetZtexinfo_dir_entryÚformat_menu_entryÚescape_menuÚ
escape_argZtexinfo_dir_descriptionZtexinfo_dir_categoryÚCOPYINGZtexinfo_elements)rGr†rdZ
title_nodeÚentryr*r*r+reÖs<


zTexinfoTranslator.init_settingscsttdœ‡fdd„‰dˆjd<ˆdƒˆdƒ‡fdd„ˆjDƒˆ_xFˆjjtjƒD]4}ttj|jtj	ƒƒ}|rx|j
ƒnd	}ˆ|ƒ|d<qTWd
S)zeGenerates a unique id for each section.

        Assigns the attribute ``node_name`` to each section.)r‰r#csfˆj|ƒ}d\}}x0||ˆjks0||ˆjkrB|d7}d|}qW||7}ˆjj|ƒ|ˆj|<|S)Nér@z<%s>)r£r@)rœrgrkÚadd)r‰Znode_idZnthÚsuffix)rGr*r+Ú
add_node_names

z;TexinfoTranslator.collect_node_names.<locals>.add_node_namer€Ú	node_nameÚtopcsg|]\}}ˆ|ƒ|f‘qSr*r*)r/r‰rŠ)r¦r*r+ú
<listcomp>sz8TexinfoTranslator.collect_node_names.<locals>.<listcomp>z
<untitled>N)rXrIriÚfindallrr"rZTextElementršZTitularr›)rGr"rdr‰r*)r¦rGr+ros

z$TexinfoTranslator.collect_node_namesc	Cs
|j}|jg}|j|jjtjƒƒx>|D]6}d|kr<|ds@t‚dd„t|ƒDƒ}|||d<q(W|jjtj	ƒ}|rz|j
n|j}t|tjtjfƒs˜|j}||jk	rÜ||d}||ddd…7}||d<||d=d|d<x(|jD]\}}g||<|dj
|ƒqäWdS)z1Collect the menu entries for each "node" section.r§cSsg|]}|d‘qS)r§r*)r/r,r*r*r+r©%sz8TexinfoTranslator.collect_node_menus.<locals>.<listcomp>r€r£N)rlrIr&rªrr"ÚAssertionErrorr'ršrdÚparentr$rir%)	rGrlÚtargetsÚnodeÚentriesrdr¨r‰Ú_contentr*r*r+rps(


z$TexinfoTranslator.collect_node_menuscCs|j}|j}x|D]}dddg||<qWx.|jƒD]"\}}x|D]}|||d<q@Wq2Wxj|jƒD]^\}}xTt|ƒD]H\}}|dkr˜||d||d<|t|ƒdkrt||d||d<qtWqbWy|dd}Wntk
rèYnX||dd<d||d<dS)z@Collect the relative links (next, previous, up) for each "node".r@érr£r€N)rmrlÚitemsr4ÚlenÚ
IndexError)rGrmrlÚidr¯Úer9Úfirstr*r*r+rq7s&

z"TexinfoTranslator.collect_rellinks)r,r#cCs@|jddƒ}|jddƒ}|jddƒ}|jddƒ}|jd	d
ƒ}|S)z8Return a string with Texinfo command characters escaped.ú@z@@Ú{z@{Ú}z@}z``z`@w{`}z''z'@w{'})Úreplace)rGr,r*r*r+r—XszTexinfoTranslator.escapecCs,|j|ƒ}|jddƒ}dj|jƒƒjƒ}|S)zVReturn an escaped string suitable for use as an argument
        to a Texinfo command.ú,z@comma{}r2)r—r»r7r3Ústrip)rGr,r*r*r+r bs
zTexinfoTranslator.escape_argcCsRd}x|D]}|j|dƒ}q
Wtjd|ƒr6|jddƒ}dj|jƒƒjƒ}|j|ƒS)z=Return an escaped string suitable for node names and anchors.z,:()r2z[^ .]Ú.)r»ÚreÚsearchr7r3r½r—)rGr,Z	bad_charsZbcr*r*r+rœls
zTexinfoTranslator.escape_idcCs,|j|ƒ}|jddƒ}dj|jƒƒjƒ}|S)z3Return an escaped string suitable for menu entries.ú:ú;r2)r r»r7r3r½)rGr,r*r*r+rŸws
zTexinfoTranslator.escape_menucCs,|jr(|jddd…dkr(|jjdƒdS)z7Ensure the last line in body is terminated by new line.r£NÚ
éÿÿÿÿrÄ)r\r%)rGr*r*r+r…~szTexinfoTranslator.ensure_eol)r‰r§Údescr#csn||krd|f}nd||f}tdt|ƒddfƒ‰dj‡fdd„tj|dˆd	Dƒƒ}||jƒdS)
Nz* %s:: z
* %s: %s. érZéNrÃc3s|]}dˆ|VqdS)r2Nr*)r/Úl)Úoffsetr*r+r1‰sz6TexinfoTranslator.format_menu_entry.<locals>.<genexpr>)Úwidth)Úmaxr³r7ÚtextwrapÚwrapr½)rGr‰r§rÅr,Zwdescr*)rÉr+ržƒsz#TexinfoTranslator.format_menu_entryz
\s+---?\s+)r¯Úregr#cCsŒx†|D]~}|j|}y|j|dƒ}Wntk
r>|g}YnXt|ƒdkrV|\}}nd}|j|ƒ}|j|ƒ}|jj|j|||ƒƒqWdS)Nr£r±r@)	rkr3Ú	TypeErrorr³rŸr—r\r%rž)rGr¯rÎr¢r‰ÚpartsrÅr*r*r+Úadd_menu_entriess




z"TexinfoTranslator.add_menu_entries)r§r#cs ˆj|}|sdSˆjjdƒˆj|ƒ|dksHˆj|dsHˆjjrXˆjjdƒdStddœ‡‡fdd„‰ˆjjdƒx|D]}ˆ|ƒq€Wˆjjd	ƒdS)
Nz
@menu
r€rz
@end menu
)r‰r#csRˆj|}|sdSˆjjdˆjˆj|ƒƒˆj|ƒx|D]}ˆ|ƒq>WdS)Nz
%s

)rlr\r%r—rkrÑ)r‰r¯Zsubentry)Ú_add_detailed_menurGr*r+rÒ«s


z6TexinfoTranslator.add_menu.<locals>._add_detailed_menuz0
@detailmenu
 --- The Detailed Node Listing ---
z
@end detailmenu
@end menu
)rlr\r%rÑr˜Ztexinfo_no_detailmenurX)rGr§r¯r¢r*)rÒrGr+r‚Ÿs

	
zTexinfoTranslator.add_menu)Ú	width_strr#cCsZtjd|ƒ}|s|S|}|jƒdd…\}}|s:|dkr>dS|dkrVdt|ƒd}|S)Nz(\d*\.?\d*)\s*(\S*)r±Zpxr@ú%z%d.0ptgDIíêº@)r¿ÚmatchÚgroupsÚfloat)rGrÓrÕÚresÚamountÚunitr*r*r+Útex_image_length»sz"TexinfoTranslator.tex_image_lengthc	sütttttfttdœ‡fdd„}ˆjj}|r²x~ˆjjj	j
ƒD]l}xf|jD]\}d|j|jf}t
|tƒrv||krvqN||ƒjˆjjƒ\}}|s’qNˆjj|j|||ƒfƒqNWqBWttˆjjjdƒƒ}x0ˆjjD]$}|j|rЈjjtdƒdfƒPqÐWdS)N)rŠÚ	collapsedr#c
s’dg}xv|D]n\}}xd|D]\}|ds(qˆj|dƒ}ˆjd|d|dfƒ}ˆj|dƒ}ˆj|||ƒ}	|j|	ƒqWqW|jdƒdj|ƒS)	Nz
@menu
érz%s:%sr±éz
@end menu
r@)rŸÚget_short_idr ržr%r7)
rŠrÜÚretZ_letterr¯r¢r‰ÚsidrÅÚme)rGr*r+ÚgenerateËs

z3TexinfoTranslator.collect_indices.<locals>.generatez%s-%srˆÚIndexz
@printindex ge
)rrrXrÚboolr˜Ztexinfo_domain_indicesrDÚenvÚdomainsÚvaluesrir‰r$ÚlistrãZdocnamesr%Ú	localnamerrÚ
get_domainr¯r)	rGrãZindices_configÚdomainZindexclsZ	indexnamerŠrÜÚdocnamer*)rGr+rnÊs(&


z!TexinfoTranslator.collect_indices)r®r#csftttjdœ‡fdd„‰i}xBˆ|ƒD]6}ttj|dƒ}|jƒjƒ}td|j	žŽdg||<q(W|S)N)Únr#c3sRt|tjƒr|Vn:x8|jD].}t|tjƒr0qqt|tjƒrˆ|ƒEdHqWdS)N)r$rÚfootnoteÚchildrenrZ
start_of_filer)rîÚc)Úfootnotes_underr*r+ròòsz<TexinfoTranslator.collect_footnotes.<locals>.footnotes_underrr@F)r@)
rrrrïrÚlabelr›r½r rð)rGr®ZfnotesÚfnróÚnumr*)ròr+Úcollect_footnotesñs	z#TexinfoTranslator.collect_footnotes)rµr#cCsHy|j|}Wn4tk
rBtt|jƒƒdd…}||j|<YnX|S)z-Return a shorter 'id' associated with ``id``.r±N)rjÚKeyErrorÚhexr³)rGrµrár*r*r+rßszTexinfoTranslator.get_short_id)rµr®r#cCsp|jdƒrdS|jdd|}|j|ƒ}|j|ƒ}x6||fD]*}||jkr>|jjd|ƒ|jj|ƒq>WdS)Nzindex-r£rÁz@anchor{%s}rÄ)Ú
startswithrzrœrßrgr\r%r¤)rGrµr®Zeidrár*r*r+Ú
add_anchors



zTexinfoTranslator.add_anchor)rµr‰r®r#cCs`|j|ƒ}|j|ƒ}|jjrP|jjd||fƒ|jj|ƒ|jj|j|ƒƒn|jj|ƒdS)Nz@ref{%s,,%s})	rŸrßr˜Ztexinfo_cross_referencesr\r%rhr¤rœ)rGrµr‰r®rár*r*r+Úadd_xrefs

zTexinfoTranslator.add_xrefcCs>|jj|j|ƒƒ|jj|jddƒƒd|kr:|jd|ƒdS)Nrír@z:doc)r{r%rörzrrú)rGr®r*r*r+Úvisit_document&sz TexinfoTranslator.visit_documentcCs|jjƒ|jjƒdS)N)r{r„rz)rGr®r*r*r+Údepart_document,s
z!TexinfoTranslator.depart_documentcCsB|j|jƒƒ}|jr |jddƒ}|jr2|jddƒ}|jj|ƒdS)NrÃr2ú-z@w{-})r—r›rxr»ryr\r%)rGr®r,r*r*r+Ú
visit_Text0szTexinfoTranslator.visit_TextcCsdS)Nr*)rGr®r*r*r+Údepart_Text9szTexinfoTranslator.depart_TextcCs¶|jj|jdgƒƒ|jsdS|jr6|j|jdƒn
|jdƒ|d}t|g|j|ƒ}|jj	d|ƒxt
|jƒD]}|j||ƒqxW|jjƒt
tj|ƒ|_|jd7_dS)NÚidsr§r€z
@node %s,%s,%s,%s
r£)rwr•rrvrtr‚rƒrmr\r%ÚsortedrúÚclearrrr"ru)rGr®r§r‹rµr*r*r+Ú
visit_section<s

zTexinfoTranslator.visit_sectioncCs|jd8_dS)Nr£)ru)rGr®r*r*r+Údepart_sectionOsz TexinfoTranslator.depart_sectionú@unnumberedú@chapterú@sectionú@subsectionú@subsubsectionú@headingú@subheadingú@subsubheadingcCs´|jsd|_tj‚|j}t|tjƒr(dSt|tjtjtjfƒrFtj‚njt|tj	ƒspt
jtdƒ|d|j
|ƒn@y|j|j}Wntk
rž|jd}YnX|jjd|ƒdS)NTzJencountered title node not in section, topic, table, admonition or sidebar)Úlocationr£z
%s rÄ)rvrÚSkipNoder¬r$ÚtableZ
AdmonitionZsidebarZtopicr"ÚloggerÚwarningrÚvisit_rubricÚheadingsrur´r\r%)rGr®r¬Úheadingr*r*r+Úvisit_title`s"
zTexinfoTranslator.visit_titlecCs|jjdƒdS)Nz

)r\r%)rGr®r*r*r+Údepart_titleuszTexinfoTranslator.depart_titlecCsxt|ƒdkr&|jƒdtdƒfkr&tj‚y|j|j}Wntk
rT|jd}YnX|jj	d|ƒ|j
d7_
dS)Nr£Z	Footnotesz
%s rÄ)r³r›rrrÚrubricsrur´r\r%rx)rGr®Zrubricr*r*r+rxs zTexinfoTranslator.visit_rubriccCs|jd8_|jjdƒdS)Nr£z

)rxr\r%)rGr®r*r*r+Ú
depart_rubric‚szTexinfoTranslator.depart_rubriccCs|jjdƒdS)Nz

@noindent
)r\r%)rGr®r*r*r+Úvisit_subtitle†sz TexinfoTranslator.visit_subtitlecCs|jjdƒdS)Nz

)r\r%)rGr®r*r*r+Údepart_subtitle‰sz!TexinfoTranslator.depart_subtitlecCsì|jj|ƒ}y~y|j|d}Wn,tk
rL|jj|jjj|jƒ}YnXt|tjƒrˆ|jdƒrt|jj|dƒ|jj	|dƒdSWntt
fk
r¢YnXd|kr°dS|jdƒrÊ|j|d|ƒx|dD]}|j||ƒqÔWdS)Nr£ÚrefidrÚrefuri)r¬rˆr´r$rr"rrwr¤r•ÚAttributeErrorrú)rGr®ZparindexÚnextrµr*r*r+Úvisit_targetŽs&

zTexinfoTranslator.visit_targetcCsdS)Nr*)rGr®r*r*r+Ú
depart_target¦szTexinfoTranslator.depart_targetcCsªt|jtjtjfƒrdSt|dtjƒr,dS|jd|jƒƒj	ƒ}|jddƒ}|rv|jdƒrvd|j
dd|d}|s~dS|jd	ƒrÜ|j|d
d…ƒ}|j|ƒ}|s²||krÄ|j
jd|ƒn|j
jd||fƒnÄ|jdƒr|j
dd
|dd…}|j|||ƒnŒ|jdƒrl|jdƒ}|dkrF|dd…d}n|dd…jdd
ƒ}|j|||ƒn4|jdƒr|dd…jddƒ}|j|ƒ}d}d|kr´|jddƒ\}}|j|ƒ}|j|ƒ}||krè|j
jd||fƒn|j
jd|||fƒn |j|ƒ}|j|ƒ}|jj}|jr(d}|s:||krL|j
jd|ƒnT|dkrl|j
jd||fƒn4|dkrŒ|j
jd||fƒn|j
jd||fƒtj‚dS)Nrr‰rr@rrÔr£ú#zmailto:éz
@email{%s}z
@email{%s,%s}rÁz::doczinfo:érr2r€z
@ref{%s,,,%s}z@ref{%s,,%s,%s}Úinlinez@indicateurl{%s}z@uref{%s,%s}Únoz
@uref{%s,,%s}z%s@footnote{%s}rÄrÄrÄ)r$r¬rrdrZ	desc_typeÚimagerr›r½rzrùr r\r%rûÚfindr»r3rœrŸr˜Ztexinfo_show_urlsr|r)rGr®r‰ÚurirµZ	hashindexZ	show_urlsr*r*r+Úvisit_reference©sb












z!TexinfoTranslator.visit_referencecCsdS)Nr*)rGr®r*r*r+Údepart_referenceèsz"TexinfoTranslator.depart_referencecCs&tj|jddƒƒ}|j|ƒtj‚dS)Nrdr")rrrrÿr)rGr®Útextr*r*r+Úvisit_number_referenceës
z(TexinfoTranslator.visit_number_referencecCs(|jƒ}|jjd|j|ƒƒtj‚dS)Nz	@cite{%s})r›r\r%r rr)rGr®r,r*r*r+Úvisit_title_referenceðsz'TexinfoTranslator.visit_title_referencecCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Úvisit_paragraph÷sz!TexinfoTranslator.visit_paragraphcCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Údepart_paragraphúsz"TexinfoTranslator.depart_paragraphcCs|jjdƒdS)Nz
@quotation
)r\r%)rGr®r*r*r+Úvisit_block_quoteýsz#TexinfoTranslator.visit_block_quotecCs|jƒ|jjdƒdS)Nz@end quotation
)r…r\r%)rGr®r*r*r+Údepart_block_quotesz$TexinfoTranslator.depart_block_quotecCs|jjdƒdS)Nz

@example
)r\r%)rGr®r*r*r+Úvisit_literal_blocksz%TexinfoTranslator.visit_literal_blockcCs|jƒ|jjdƒdS)Nz
@end example
)r…r\r%)rGr®r*r*r+Údepart_literal_blocksz&TexinfoTranslator.depart_literal_blockcCs*t|jtjƒs|jjdƒ|jjdƒdS)Nz

z	@display
)r$r¬rÚ
line_blockr\r%)rGr®r*r*r+Úvisit_line_blocksz"TexinfoTranslator.visit_line_blockcCs*|jjdƒt|jtjƒs&|jjdƒdS)Nz
@end display
z

)r\r%r$r¬rr5)rGr®r*r*r+Údepart_line_blocksz#TexinfoTranslator.depart_line_blockcCs|jd7_dS)Nr£)rx)rGr®r*r*r+Ú
visit_lineszTexinfoTranslator.visit_linecCs|jjdƒ|jd8_dS)Nz@w{ }
r£)r\r%rx)rGr®r*r*r+Údepart_lineszTexinfoTranslator.depart_linecCs|jjdƒdS)Nz@strong{)r\r%)rGr®r*r*r+Úvisit_strong!szTexinfoTranslator.visit_strongcCs|jjdƒdS)Nrº)r\r%)rGr®r*r*r+Ú
depart_strong$szTexinfoTranslator.depart_strongcCs"|js
dnd}|jjd|ƒdS)NZemphÚvarz@%s{)r}r\r%)rGr®Úelementr*r*r+Úvisit_emphasis'sz TexinfoTranslator.visit_emphasiscCs|jjdƒdS)Nrº)r\r%)rGr®r*r*r+Údepart_emphasis+sz!TexinfoTranslator.depart_emphasiscCsd|dkS)NZsampÚclassesr*)rGr®r*r*r+Úis_samp.szTexinfoTranslator.is_sampcCs(|j|ƒr|jd7_|jjdƒdS)Nr£z@code{)rAr}r\r%)rGr®r*r*r+Ú
visit_literal1s
zTexinfoTranslator.visit_literalcCs(|j|ƒr|jd8_|jjdƒdS)Nr£rº)rAr}r\r%)rGr®r*r*r+Údepart_literal6s
z TexinfoTranslator.depart_literalcCs|jjdƒdS)Nz@w{^)r\r%)rGr®r*r*r+Úvisit_superscript;sz#TexinfoTranslator.visit_superscriptcCs|jjdƒdS)Nrº)r\r%)rGr®r*r*r+Údepart_superscript>sz$TexinfoTranslator.depart_superscriptcCs|jjdƒdS)Nz@w{[)r\r%)rGr®r*r*r+Úvisit_subscriptAsz!TexinfoTranslator.visit_subscriptcCs|jjdƒdS)Nz]})r\r%)rGr®r*r*r+Údepart_subscriptDsz"TexinfoTranslator.depart_subscriptcCs
tj‚dS)N)rr)rGr®r*r*r+Úvisit_footnoteIsz TexinfoTranslator.visit_footnotecCs|jd7_|jjdƒdS)Nr£z
@footnote{)r|r\r%)rGr®r*r*r+Úvisit_collected_footnoteLsz*TexinfoTranslator.visit_collected_footnotecCs|jjdƒ|jd8_dS)Nrºr£)r\r%r|)rGr®r*r*r+Údepart_collected_footnotePsz+TexinfoTranslator.depart_collected_footnotecCsf|jƒjƒ}y|jd|\}}Wn.ttfk
rP}ztj|‚WYdd}~XnX|j|ƒtj‚dS)Nr£rÄ)	r›r½r{r÷r´rrrLZSkipChildren)rGr®rõZfootnodeÚusedÚexcr*r*r+Úvisit_footnote_referenceTs
z*TexinfoTranslator.visit_footnote_referencecCs>|jjdƒx|jdƒD]}|j||ƒqW|jd7_dS)NrÃrr£)r\r%rrúrx)rGr®rµr*r*r+Úvisit_citation^sz TexinfoTranslator.visit_citationcCs|jd8_dS)Nr£)rx)rGr®r*r*r+Údepart_citationdsz!TexinfoTranslator.depart_citationcCs|jjdƒdS)Nz@w{[)r\r%)rGr®r*r*r+Úvisit_citation_referencegsz*TexinfoTranslator.visit_citation_referencecCs|jjdƒdS)Nz]})r\r%)rGr®r*r*r+Údepart_citation_referencejsz+TexinfoTranslator.depart_citation_referencecCs |jddƒ}|jjd|ƒdS)NÚbulletÚ*z

@itemize %s
)rr\r%)rGr®rRr*r*r+Úvisit_bullet_listosz#TexinfoTranslator.visit_bullet_listcCs|jƒ|jjdƒdS)Nz
@end itemize
)r…r\r%)rGr®r*r*r+Údepart_bullet_listssz$TexinfoTranslator.depart_bullet_listcCs@|jddƒ}ddddœ}|jd|j|dƒƒ}|jjd|ƒdS)	NZenumtypeÚarabicr@ÚaÚA)rVZ
loweralphaZ
upperalphaÚstartz

@enumerate %s
)rr\r%)rGr®ÚenumZstartersrYr*r*r+Úvisit_enumerated_listwsz'TexinfoTranslator.visit_enumerated_listcCs|jƒ|jjdƒdS)Nz@end enumerate
)r…r\r%)rGr®r*r*r+Údepart_enumerated_list€sz(TexinfoTranslator.depart_enumerated_listcCs|jjdƒdS)Nz
@item )r\r%)rGr®r*r*r+Úvisit_list_item„sz!TexinfoTranslator.visit_list_itemcCsdS)Nr*)rGr®r*r*r+Údepart_list_item‡sz"TexinfoTranslator.depart_list_itemcCs|jjdƒdS)Nz

@table @option
)r\r%)rGr®r*r*r+Úvisit_option_listŒsz#TexinfoTranslator.visit_option_listcCs|jƒ|jjdƒdS)Nz@end table
)r…r\r%)rGr®r*r*r+Údepart_option_listsz$TexinfoTranslator.depart_option_listcCsdS)Nr*)rGr®r*r*r+Úvisit_option_list_item“sz(TexinfoTranslator.visit_option_list_itemcCsdS)Nr*)rGr®r*r*r+Údepart_option_list_item–sz)TexinfoTranslator.depart_option_list_itemcCs
d|_dS)Nz@item)Ú	at_item_x)rGr®r*r*r+Úvisit_option_group™sz$TexinfoTranslator.visit_option_groupcCsdS)Nr*)rGr®r*r*r+Údepart_option_groupœsz%TexinfoTranslator.depart_option_groupcCs*|jd7_|jjd|jƒd|_dS)Nr£z
%s z@itemx)ryr\r%rc)rGr®r*r*r+Úvisit_optionŸszTexinfoTranslator.visit_optioncCs|jd8_dS)Nr£)ry)rGr®r*r*r+Ú
depart_option¤szTexinfoTranslator.depart_optioncCsdS)Nr*)rGr®r*r*r+Úvisit_option_string§sz%TexinfoTranslator.visit_option_stringcCsdS)Nr*)rGr®r*r*r+Údepart_option_stringªsz&TexinfoTranslator.depart_option_stringcCs|jj|jddƒƒdS)NÚ	delimiterr2)r\r%r)rGr®r*r*r+Úvisit_option_argument­sz'TexinfoTranslator.visit_option_argumentcCsdS)Nr*)rGr®r*r*r+Údepart_option_argument°sz(TexinfoTranslator.depart_option_argumentcCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Úvisit_description³sz#TexinfoTranslator.visit_descriptioncCsdS)Nr*)rGr®r*r*r+Údepart_description¶sz$TexinfoTranslator.depart_descriptioncCs|jjdƒdS)Nz

@table @asis
)r\r%)rGr®r*r*r+Úvisit_definition_list»sz'TexinfoTranslator.visit_definition_listcCs|jƒ|jjdƒdS)Nz@end table
)r…r\r%)rGr®r*r*r+Údepart_definition_list¾sz(TexinfoTranslator.depart_definition_listcCs
d|_dS)Nz@item)rc)rGr®r*r*r+Úvisit_definition_list_itemÂsz,TexinfoTranslator.visit_definition_list_itemcCsdS)Nr*)rGr®r*r*r+Údepart_definition_list_itemÅsz-TexinfoTranslator.depart_definition_list_itemcCsxx|jdƒD]}|j||ƒqWx:|dd…D]*}t|tjtjfƒr.|j|ƒ|j|ƒq.W|j	j
d|jƒd|_dS)Nrz
%s z@itemx)rrúr$rrˆrÚtargetrLÚremover\r%rc)rGr®rµrîr*r*r+Ú
visit_termÈs
zTexinfoTranslator.visit_termcCsdS)Nr*)rGr®r*r*r+Údepart_termÓszTexinfoTranslator.depart_termcCs|jjdƒdS)Nz : )r\r%)rGr®r*r*r+Úvisit_classifierÖsz"TexinfoTranslator.visit_classifiercCsdS)Nr*)rGr®r*r*r+Údepart_classifierÙsz#TexinfoTranslator.depart_classifiercCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Úvisit_definitionÜsz"TexinfoTranslator.visit_definitioncCsdS)Nr*)rGr®r*r*r+Údepart_definitionßsz#TexinfoTranslator.depart_definitioncCs
d|_dS)Nz@item)Ú	entry_sep)rGr®r*r*r+Úvisit_tableäszTexinfoTranslator.visit_tablecCs|jjdƒdS)Nz
@end multitable

)r\r%)rGr®r*r*r+Údepart_tableçszTexinfoTranslator.depart_tablecCsdS)Nr*)rGr®r*r*r+Úvisit_tabular_col_specêsz(TexinfoTranslator.visit_tabular_col_speccCsdS)Nr*)rGr®r*r*r+Údepart_tabular_col_specísz)TexinfoTranslator.depart_tabular_col_speccCs\|jj|dƒt|jƒ|jkr$dS|jjdƒx&|jD]}|jjdd|dƒq8WdS)NÚcolwidthz

@multitable z{%s} r0r±)rr%r³Ún_colsr\)rGr®rîr*r*r+Ú
visit_colspecðszTexinfoTranslator.visit_colspeccCsdS)Nr*)rGr®r*r*r+Údepart_colspecøsz TexinfoTranslator.depart_colspeccCsg|_|d|_dS)NÚcols)rr)rGr®r*r*r+Úvisit_tgroupûszTexinfoTranslator.visit_tgroupcCsdS)Nr*)rGr®r*r*r+Ú
depart_tgroupÿszTexinfoTranslator.depart_tgroupcCs
d|_dS)Nz	@headitem)r{)rGr®r*r*r+Úvisit_theadszTexinfoTranslator.visit_theadcCsdS)Nr*)rGr®r*r*r+Údepart_theadszTexinfoTranslator.depart_theadcCsdS)Nr*)rGr®r*r*r+Úvisit_tbodyszTexinfoTranslator.visit_tbodycCsdS)Nr*)rGr®r*r*r+Údepart_tbodyszTexinfoTranslator.depart_tbodycCsdS)Nr*)rGr®r*r*r+Ú	visit_rowszTexinfoTranslator.visit_rowcCs
d|_dS)Nz@item)r{)rGr®r*r*r+Ú
depart_rowszTexinfoTranslator.depart_rowcCs|jjd|jƒd|_dS)Nz
%s
z@tab)r\r%r{)rGr®r*r*r+Úvisit_entryszTexinfoTranslator.visit_entrycCs*x$t|jddƒƒD]}|jjdƒqWdS)NZmorecolsrz
@tab
)Úrangerr\r%)rGr®Z_ir*r*r+Údepart_entryszTexinfoTranslator.depart_entrycCsdS)Nr*)rGr®r*r*r+Úvisit_field_listsz"TexinfoTranslator.visit_field_listcCsdS)Nr*)rGr®r*r*r+Údepart_field_list!sz#TexinfoTranslator.depart_field_listcCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Úvisit_field$szTexinfoTranslator.visit_fieldcCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Údepart_field'szTexinfoTranslator.depart_fieldcCs|jƒ|jjdƒdS)Nz@*)r…r\r%)rGr®r*r*r+Úvisit_field_name*sz"TexinfoTranslator.visit_field_namecCs|jjdƒdS)Nz: )r\r%)rGr®r*r*r+Údepart_field_name.sz#TexinfoTranslator.depart_field_namecCsdS)Nr*)rGr®r*r*r+Úvisit_field_body1sz"TexinfoTranslator.visit_field_bodycCsdS)Nr*)rGr®r*r*r+Údepart_field_body4sz#TexinfoTranslator.depart_field_body)r®r‰r#cCs6|s"ttj|dƒ}|j|jƒƒ}|jjd|ƒdS)Nrz
@cartouche
@quotation %s )rrrdr—r›r\r%)rGr®r‰rdr*r*r+Úvisit_admonition9sz"TexinfoTranslator.visit_admonitioncCst|j}|jjd|ƒdS)Nz
@cartouche
@quotation %s )rÚtagnamer\r%)rGr®rór*r*r+Ú_visit_named_admonition?s
z)TexinfoTranslator._visit_named_admonitioncCs|jƒ|jjdƒdS)Nz@end quotation
@end cartouche
)r…r\r%)rGr®r*r*r+Údepart_admonitionCsz#TexinfoTranslator.depart_admonitioncCs
tj‚dS)N)rr)rGr®r*r*r+Ú
visit_docinfo]szTexinfoTranslator.visit_docinfocCs
tj‚dS)N)rr)rGr®r*r*r+Úvisit_generated`sz!TexinfoTranslator.visit_generatedcCs
tj‚dS)N)rr)rGr®r*r*r+Úvisit_headercszTexinfoTranslator.visit_headercCs
tj‚dS)N)rr)rGr®r*r*r+Úvisit_footerfszTexinfoTranslator.visit_footercCs|jdƒr|jjdƒdS)NÚ
literal_blockz

@float LiteralBlock
)rr\r%)rGr®r*r*r+Úvisit_containeris
z!TexinfoTranslator.visit_containercCs|jdƒr|jjdƒdS)Nr z
@end float

)rr\r%)rGr®r*r*r+Údepart_containerms
z"TexinfoTranslator.depart_containercCsdS)Nr*)rGr®r*r*r+Úvisit_decorationqsz"TexinfoTranslator.visit_decorationcCsdS)Nr*)rGr®r*r*r+Údepart_decorationtsz#TexinfoTranslator.depart_decorationcCsXd|jdgƒkrtj‚ttj|dƒ}|j|ƒ|jjd|j|j	ƒƒƒ|j
|ƒdS)NÚcontentsr@rz%s
)rrrrrdrr\r%r—r›r)rGr®rdr*r*r+Úvisit_topicws
zTexinfoTranslator.visit_topiccCsdS)Nr*)rGr®r*r*r+Údepart_topic€szTexinfoTranslator.depart_topiccCs|jjdddƒdS)Nz

%s

réB)r\r%)rGr®r*r*r+Úvisit_transitionƒsz"TexinfoTranslator.visit_transitioncCsdS)Nr*)rGr®r*r*r+Údepart_transition†sz#TexinfoTranslator.depart_transitioncCs|jjdƒdS)Nz

@center --- )r\r%)rGr®r*r*r+Úvisit_attribution‰sz#TexinfoTranslator.visit_attributioncCs|jjdƒdS)Nz

)r\r%)rGr®r*r*r+Údepart_attributionŒsz$TexinfoTranslator.depart_attributioncCs:|jddƒjƒ}d|ks d|kr0|jj|jƒƒtj‚dS)NÚformatr@r=r>)rr3r\r%r›rr)rGr®r­r*r*r+Ú	visit_rawszTexinfoTranslator.visit_rawcCs|jjdƒdS)Nz

@float Figure
)r\r%)rGr®r*r*r+Úvisit_figure•szTexinfoTranslator.visit_figurecCs|jjdƒdS)Nz
@end float

)r\r%)rGr®r*r*r+Ú
depart_figure˜szTexinfoTranslator.depart_figurecCsLt|jtjƒs(t|jtjƒr6|jjdƒr6|jjdƒntj	t
dƒ|ddS)Nr z

@caption{zcaption not inside a figure.)r)r$r¬rÚfigureÚ	containerrr\r%rrr)rGr®r*r*r+Ú
visit_caption›s
zTexinfoTranslator.visit_captioncCs8t|jtjƒs(t|jtjƒr4|jjdƒr4|jjdƒdS)Nr z}
)r$r¬rr±r²rr\r%)rGr®r*r*r+Údepart_caption¤sz TexinfoTranslator.depart_captionc		CsÊ|d|jjkr"|jj|d}n|jr,dS|d}|jdƒdkrFdStj|ƒ\}}|j|jddƒƒ}|j|jddƒƒ}|j|jddƒƒ}d|j	d	dd
…|f}|j
jd|||||dd…fƒdS)Nr)z://r£rÊr@ÚheightÚaltz
%s-figures/%sr`r$z
@image{%s,%s,%s,%s,%s}
rÄéûÿÿÿ)rDZimagesÚignore_missing_imagesr(rÚsplitextrÛrr r†r\r%)	rGr®r)r‰ÚextrÊrµr¶r`r*r*r+Úvisit_imageªszTexinfoTranslator.visit_imagecCsdS)Nr*)rGr®r*r*r+Údepart_image¾szTexinfoTranslator.depart_imagecCsdS)Nr*)rGr®r*r*r+Úvisit_compoundÁsz TexinfoTranslator.visit_compoundcCsdS)Nr*)rGr®r*r*r+Údepart_compoundÄsz!TexinfoTranslator.depart_compoundcCs|j|ƒdS)N)r¦)rGr®r*r*r+Ú
visit_sidebarÇszTexinfoTranslator.visit_sidebarcCs|j|ƒdS)N)r§)rGr®r*r*r+Údepart_sidebarÊsz TexinfoTranslator.depart_sidebarcCs|jrtj‚n|jjdƒdS)Nz@w{()r|rrr\r%)rGr®r*r*r+Úvisit_labelÍszTexinfoTranslator.visit_labelcCs|jjdƒdS)Nz)} )r\r%)rGr®r*r*r+Údepart_labelÔszTexinfoTranslator.depart_labelcCsdS)Nr*)rGr®r*r*r+Úvisit_legend×szTexinfoTranslator.visit_legendcCsdS)Nr*)rGr®r*r*r+Ú
depart_legendÚszTexinfoTranslator.depart_legendcCsdS)Nr*)rGr®r*r*r+Úvisit_substitution_referenceÝsz.TexinfoTranslator.visit_substitution_referencecCsdS)Nr*)rGr®r*r*r+Údepart_substitution_referenceàsz/TexinfoTranslator.depart_substitution_referencecCs
tj‚dS)N)rr)rGr®r*r*r+Úvisit_substitution_definitionãsz/TexinfoTranslator.visit_substitution_definitioncCs|jjd|jƒƒtj‚dS)Nz.
@verbatim
<SYSTEM MESSAGE: %s>
@end verbatim
)r\r%r›rr)rGr®r*r*r+Úvisit_system_messageæsz&TexinfoTranslator.visit_system_messagecCs<|jjdƒx$|jƒjƒD]}|jjd|ƒqWtj‚dS)NrÃz@c %s
)r\r%r›Ú
splitlinesrr)rGr®Úliner*r*r+Ú
visit_commentìszTexinfoTranslator.visit_commentcCs|jjdƒdS)Nz>>)r\r%)rGr®r*r*r+Úvisit_problematicòsz#TexinfoTranslator.visit_problematiccCs|jjdƒdS)Nz<<)r\r%)rGr®r*r*r+Údepart_problematicõsz$TexinfoTranslator.depart_problematiccCstjtdƒ||ddS)Nzunimplemented node type: %r)r)rrr)rGr®r*r*r+Úunimplemented_visitøsz%TexinfoTranslator.unimplemented_visitcCsdS)Nr*)rGr®r*r*r+Úunknown_departureüsz#TexinfoTranslator.unknown_departurecCsâ|jdƒg}tttj|ƒ}x|D]}|j|dƒq$Wtdd„|Dƒƒ}x€|D]x}|dr’x|jdƒD]}|j||ƒqjW|dj	|ƒd}ndd|}|j
j|j|ƒƒ|j
j|j|jƒdƒƒqRW|j
dƒtj‚dS)	NZ	tokennamecss|]}t|ƒVqdS)N)r³)r/r‰r*r*r+r1sz9TexinfoTranslator.visit_productionlist.<locals>.<genexpr>rz ::=z%s    r2rÃ)r3rrrÚ
productionr%rËrrúÚljustr\r—r›r4rr)rGr®ÚnamesZproductionlistrÐÚmaxlenrµr,r*r*r+Úvisit_productionlists 



z&TexinfoTranslator.visit_productionlistcCsdS)Nr*)rGr®r*r*r+Úvisit_productionsz"TexinfoTranslator.visit_productioncCsdS)Nr*)rGr®r*r*r+Údepart_productionsz#TexinfoTranslator.depart_productioncCs|jjdƒdS)Nz@code{)r\r%)rGr®r*r*r+Úvisit_literal_emphasissz(TexinfoTranslator.visit_literal_emphasiscCs|jjdƒdS)Nrº)r\r%)rGr®r*r*r+Údepart_literal_emphasissz)TexinfoTranslator.depart_literal_emphasiscCs|jjdƒdS)Nz@code{)r\r%)rGr®r*r*r+Úvisit_literal_strong sz&TexinfoTranslator.visit_literal_strongcCs|jjdƒdS)Nrº)r\r%)rGr®r*r*r+Údepart_literal_strong#sz'TexinfoTranslator.depart_literal_strongcCsbt|jtjƒr|jƒn|jjdƒx8|dD],}|\}}}}}|j|ƒ}|jjd|ƒq.WdS)NrÃr¯z@geindex %s
)r$r¬rZ	paragraphr…r\r%rŸ)rGr®r¢Útypr,ÚtidZtext2Úkey_r*r*r+Úvisit_index&s

zTexinfoTranslator.visit_indexcCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Úvisit_versionmodified1sz'TexinfoTranslator.visit_versionmodifiedcCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Údepart_versionmodified4sz(TexinfoTranslator.depart_versionmodifiedcCs2|jjdƒ|jj|dƒ|jj|j|ƒƒdS)Nz:docrí)rwr¤rzr%r{rö)rGr®r*r*r+Úvisit_start_of_file7sz%TexinfoTranslator.visit_start_of_filecCs|jjƒ|jjƒdS)N)rzr„r{)rGr®r*r*r+Údepart_start_of_file=s
z&TexinfoTranslator.depart_start_of_filecCs(|j|jƒƒ}|jjd|ƒtj‚dS)Nz

@center %s

)r r›r\r%rr)rGr®Útxtr*r*r+Úvisit_centeredAsz TexinfoTranslator.visit_centeredcCs|jjdtdƒdS)Nz

@subsubheading %s

Zseealso)r\r%r)rGr®r*r*r+Ú
visit_seealsoFszTexinfoTranslator.visit_seealsocCs|jjdƒdS)NrÃ)r\r%)rGr®r*r*r+Údepart_seealsoJsz TexinfoTranslator.depart_seealsocCs
tj‚dS)N)rr)rGr®r*r*r+Ú
visit_metaMszTexinfoTranslator.visit_metacCsdS)Nr*)rGr®r*r*r+Úvisit_glossaryPsz TexinfoTranslator.visit_glossarycCsdS)Nr*)rGr®r*r*r+Údepart_glossarySsz!TexinfoTranslator.depart_glossarycCsbttj|dƒ}tttj|ƒ}|jjdƒ|jjdjdd„|Dƒƒdƒ|jjdƒtj‚dS)Nrz

z, css|]}|jƒVqdS)N)r›)r/rîr*r*r+r1Zsz/TexinfoTranslator.visit_acks.<locals>.<genexpr>r¾)	rrÚbullet_listrZ	list_itemr\r%r7r)rGr®rêZ
list_itemsr*r*r+Ú
visit_acksVs zTexinfoTranslator.visit_ackscCs|jj|ƒd|_dS)Nz@deffn)rsr%Ú	at_deffnx)rGr®r*r*r+Ú
visit_desceszTexinfoTranslator.visit_desccCs"|jjƒ|jƒ|jjdƒdS)Nz@end deffn
)rsr„r…r\r%)rGr®r*r*r+Údepart_descis
zTexinfoTranslator.depart_desccCsÆ|jd7_|jd}|dkr@x|jdƒD]}|j||ƒq,Wy4|jjj|jdƒ}|j|j||j	j
|jkƒ}Wntt
fk
r|}YnX|jt|ƒƒ}|jjd|j|fƒd|_||_dS)Nr£ÚobjtypeZdescriberrìz	
%s {%s} z@deffnx)ryr¬rrúrDrærëZ
get_type_nameZobject_typesr˜Zprimary_domainr‰r÷rr r;r\r%rìÚdesc_type_name)rGr®rïrµrìr‰Úcategoryr*r*r+Úvisit_desc_signaturens

z&TexinfoTranslator.visit_desc_signaturecCs$|jjdƒ|jd8_d|_dS)NrÃr£)r\r%ryrð)rGr®r*r*r+Údepart_desc_signaturesz'TexinfoTranslator.depart_desc_signaturecCsdS)Nr*)rGr®r*r*r+Úvisit_desc_signature_line†sz+TexinfoTranslator.visit_desc_signature_linecCsdS)Nr*)rGr®r*r*r+Údepart_desc_signature_line‰sz,TexinfoTranslator.depart_desc_signature_linecCsdS)Nr*)rGr®r*r*r+Úvisit_desc_contentŒsz$TexinfoTranslator.visit_desc_contentcCsdS)Nr*)rGr®r*r*r+Údepart_desc_contentsz%TexinfoTranslator.depart_desc_contentcCsdS)Nr*)rGr®r*r*r+Úvisit_desc_inline’sz#TexinfoTranslator.visit_desc_inlinecCsdS)Nr*)rGr®r*r*r+Údepart_desc_inline•sz$TexinfoTranslator.depart_desc_inlinecCsdS)Nr*)rGr®r*r*r+Úvisit_desc_name›sz!TexinfoTranslator.visit_desc_namecCsdS)Nr*)rGr®r*r*r+Údepart_desc_namežsz"TexinfoTranslator.depart_desc_namecCsdS)Nr*)rGr®r*r*r+Úvisit_desc_addname¡sz$TexinfoTranslator.visit_desc_addnamecCsdS)Nr*)rGr®r*r*r+Údepart_desc_addname¤sz%TexinfoTranslator.depart_desc_addnamecCsdS)Nr*)rGr®r*r*r+Úvisit_desc_type§sz!TexinfoTranslator.visit_desc_typecCsdS)Nr*)rGr®r*r*r+Údepart_desc_typeªsz"TexinfoTranslator.depart_desc_typecCs|jjdƒdS)Nz -> )r\r%)rGr®r*r*r+Úvisit_desc_returns­sz$TexinfoTranslator.visit_desc_returnscCsdS)Nr*)rGr®r*r*r+Údepart_desc_returns°sz%TexinfoTranslator.depart_desc_returnscCs|jjdƒd|_dS)Nz (r£)r\r%Úfirst_param)rGr®r*r*r+Úvisit_desc_parameterlist³sz*TexinfoTranslator.visit_desc_parameterlistcCs|jjdƒdS)Nú))r\r%)rGr®r*r*r+Údepart_desc_parameterlist·sz+TexinfoTranslator.depart_desc_parameterlistcCsJ|js|jjdƒnd|_|j|jƒƒ}|jddƒ}|jj|ƒtj‚dS)Nz, rõ z@w{ })rr\r%r—r›r»rr)rGr®r,r*r*r+Úvisit_desc_parameterºsz&TexinfoTranslator.visit_desc_parametercCs|jjdƒdS)Nú[)r\r%)rGr®r*r*r+Úvisit_desc_optionalÅsz%TexinfoTranslator.visit_desc_optionalcCs|jjdƒdS)Nú])r\r%)rGr®r*r*r+Údepart_desc_optionalÈsz&TexinfoTranslator.depart_desc_optionalcCsB|jƒjƒ}|jr$||jddks8|jr>||jjƒkr>tj‚dS)Nr£rïrÄ)r›r½rsrðr3rr)rGr®rãr*r*r+Úvisit_desc_annotationËsz'TexinfoTranslator.visit_desc_annotationcCsdS)Nr*)rGr®r*r*r+Údepart_desc_annotationÖsz(TexinfoTranslator.depart_desc_annotationcCsdS)Nr*)rGr®r*r*r+Úvisit_inlineÛszTexinfoTranslator.visit_inlinecCsdS)Nr*)rGr®r*r*r+Ú
depart_inlineÞszTexinfoTranslator.depart_inlinecCs`|jƒ}|jjdƒ|jdƒrP||jkrP|jjd|j|dƒƒ|jj|ƒn|jjdƒdS)Nz@abbr{Zexplanationz,%s}rº)r›r\r%Úhasattrr~rrr r¤)rGr®Zabbrr*r*r+Úvisit_abbreviationász$TexinfoTranslator.visit_abbreviationcCs|jj|jjƒƒdS)N)r\r%rrr„)rGr®r*r*r+Údepart_abbreviationêsz%TexinfoTranslator.depart_abbreviationcCs
|j|ƒS)N)r×)rGr®r*r*r+Ú
visit_manpageíszTexinfoTranslator.visit_manpagecCs
|j|ƒS)N)rØ)rGr®r*r*r+Údepart_manpageðsz TexinfoTranslator.depart_manpagecCsdS)Nr*)rGr®r*r*r+Úvisit_download_referenceósz*TexinfoTranslator.visit_download_referencecCsdS)Nr*)rGr®r*r*r+Údepart_download_referenceösz+TexinfoTranslator.depart_download_referencecCs|j|ƒdS)N)rT)rGr®r*r*r+Úvisit_hlistùszTexinfoTranslator.visit_hlistcCs|j|ƒdS)N)rU)rGr®r*r*r+Údepart_hlistüszTexinfoTranslator.depart_hlistcCsdS)Nr*)rGr®r*r*r+Úvisit_hlistcolÿsz TexinfoTranslator.visit_hlistcolcCsdS)Nr*)rGr®r*r*r+Údepart_hlistcolsz!TexinfoTranslator.depart_hlistcolcCsdS)Nr*)rGr®r*r*r+Úvisit_pending_xrefsz$TexinfoTranslator.visit_pending_xrefcCsdS)Nr*)rGr®r*r*r+Údepart_pending_xrefsz%TexinfoTranslator.depart_pending_xrefcCs(|jjd|j|jƒƒdƒtj‚dS)Nz@math{rº)r\r%r r›rr)rGr®r*r*r+Ú
visit_mathszTexinfoTranslator.visit_mathcCs>|jdƒr|j|d|ƒ|jjd|j|jƒƒƒtj‚dS)Nróz

@example
%s
@end example

)rrúr\r%r r›rr)rGr®r*r*r+Úvisit_math_blocks

z"TexinfoTranslator.visit_math_blockcCs(tjdtƒt|jƒr |jdSdSdS)Nz!TexinfoWriter.desc is deprecated.r£rÄ)ÚwarningsÚwarnrr³rs)rGr*r*r+rÅs

zTexinfoTranslator.desc)rrrr	r
)rrr
)r@(
rSrTrUrDr¸r“rrIrFrMrerorprqrXr—r rœrŸr…ržr¿Úcompilerr
rÑr‚rÛrnrrr
r rårörßrrúrûrürýrrÿrrrrrrrrrrrr r!r*r+r-r.r/r0r1r2r3r4Zvisit_doctest_blockZdepart_doctest_blockr6r7r8r9r:r;r>r?rArBrCrDrErFrGrHrIrJrMrNrOrPrQrTrUr[r\r]r^r_r`rarbrdrerfrgrhrirkrlrmrnrorprqrrrurvrwrxryrzr|r}r~rr‚rƒr…r†r‡rˆr‰rŠr‹rŒrrrr‘r’r“r”r•r–r—r˜ršr›Zvisit_attentionZdepart_attentionZ
visit_cautionZdepart_cautionZvisit_dangerZ
depart_dangerZvisit_errorZdepart_errorZ
visit_hintZdepart_hintZvisit_importantZdepart_importantZ
visit_noteZdepart_noteZ	visit_tipZ
depart_tipZ
visit_warningZdepart_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ërrÅrírîròrórôrõrör÷rørùrúrûrürýrþrÿrrrrrr	rrr
rrrrrrrrrrrrrrrrÚpropertyr	rYr*r*)rHr+rJ‹s
"*!


'$	
?
				rJ)N)?rVr¿rÌrÚosrÚtypingrrrrrrr	r
rrr
rZdocutilsrrZdocutils.nodesrrrZsphinxrrZsphinx.deprecationrZsphinx.domainsrZsphinx.domains.indexrZ
sphinx.errorsrZ
sphinx.localerrrZsphinx.utilrZsphinx.util.docutilsrZsphinx.util.i18nrZsphinx.writers.latexr Zsphinx.builders.texinfor!Ú	getLoggerrSrr¡r‡r"r'rXr;ÚWriterr<rJr*r*r*r+Ú<module>s68
$