File: //lib/python3.6/site-packages/docutils/writers/latex2e/__pycache__/__init__.cpython-36.pyc
3
�2�e�� � @ s� d Z dZddlZddlZddlZddlZddlZddlZddl Zddl
ZyddlZW n ek
rt ddl
jjZY nX ddlmZmZmZmZmZmZ ddlmZ ddlmZ ddlmZmZ G dd � d ej�ZG d
d� de�ZG dd
� d
e�Z G dd� de�Z!de!_"de!_#de!_$de!_%de!_&de!_'de!_(de!_)de!_*de!_+de!_,de!_-de!_.de!_/de!_0de!_1d e!_2d!e!_3d"e!_4d#e!_5d$e!_6d%e!_7d&e!_8d'e!_9d(e!_:d)e!_;d*e!_<d+e!_=d,e!_>G d-d.� d.e�Z?G d/d0� d0e�Z@G d1d2� d2e�ZAG d3d4� d4ejB�ZCdS )5zLaTeX2e document tree Writer.ZreStructuredText� N)�frontend�nodes� languages�writers�utils�io)�
SafeString)�
writer_aux)�pick_math_environment�unichar2texc ( @ s e Zd Zd�ZdZejjejje ��Z
djddddg�Zd�Z
ddddgddifddgddifddgddejd�fddgdd gdd!d"d#�fd$d%gd&dejd�fd'd(gd)d*ejd+�fd,d-gd.d/d0d1gd.d!d2�fd3d4gd5d6d7ejd8�fd9d:gd6d;ejd<�fd=d>gd?d*d@�fdAdBgd&dejd�fdCdDgdEejdFgdG�fdHdIgdeifdJe dKgedLdM�fdNdOgdPdejd�fdQdRgdSd*ejd+�fdTdUgd&dejd�fdVdWgdXd*ejd+�fdYdZgd&dejd�fd[d\gd]d*ejd+�fd^d_gd&dejd�fd`dagddbifdcddgdd5ifdedfgddejd�fdgdhgd*didj�fdkdlgddejd�fdmdngd*dodj�fdpdqgdrdsdM�fdtdugdd5ifdvdwgd&dejd�fdxdygd gd!dzeje
d{�fd|d}gdd5ifd~dgdd�ifd�d�gddifd�d�gddiff#fZd�d&iZd�Zd�Zd�Zed� ZdZd�d�� Zd�d�� Zd�d�� Zd�d�� ZdS )��Writer�latex�latex2ezdefault.tex�
z% PDF Standard Fontsz\usepackage{mathptmx} % Timesz\usepackage[scaled=.90]{helvet}z\usepackage{courier}�standard�booktabs�nolines�
borderless�colwidths-auto�colwidths-givenzLaTeX-Specific OptionsNz-Specify documentclass. Default is "article".z--documentclass�defaultZarticlezeSpecify document options. Multiple options can be given, separated by commas. Default is "a4paper".z--documentoptionsZa4paperz5Footnotes with numbers/symbols by Docutils. (default)z--docutils-footnotesT�
store_true)r �action� validatorz^Format for footnote references: one of "superscript" or "brackets". Default is "superscript".z--footnote-references�superscript�bracketsz<format>Ztrim_footnote_reference_space)�choicesr �metavar� overridesz!Use \cite command for citations. z--use-latex-citationsr zNUse figure floats for citations (might get mixed with real figures). (default)z--figure-citations�use_latex_citationsZstore_false)�destr r z{Format for block quote attributions: one of "dash" (em-dash prefix), "parentheses"/"parens", or "none". Default is "dash".z
--attribution�dash�parentheses�parens�none)r r r z�Specify LaTeX packages/stylesheets. A style is referenced with \usepackage if extension is ".sty" or omitted and with \input else. Overrides previous --stylesheet and --stylesheet-path settings.z--stylesheet� z<file[,file,...]>�stylesheet_path)r r r r z�Comma separated list of LaTeX packages/stylesheets. Relative paths are expanded if a matching file is found in the --stylesheet-dirs. With --link-stylesheet, the path is rewritten relative to the output *.tex file. z--stylesheet-path�
stylesheet)r r r z7Link to the stylesheet(s) in the output file. (default)z--link-stylesheet�embed_stylesheet)r r z^Embed the stylesheet(s) in the output file. Stylesheets must be accessible during processing. z--embed-stylesheetz�Comma-separated list of directories where stylesheets are found. Used by --stylesheet-path when expanding relative path arguments. Default: "."z--stylesheet-dirsz<dir[,dir,...]>�.)r r r zlCustomization by LaTeX code in the preamble. Default: select PDF standard fonts (Times, Helvetica, Courier).z--latex-preamblez)Specify the template file. Default: "%s".z
--templatez<file>)r r z&Table of contents by LaTeX. (default) z--use-latex-toc� z6Table of contents by Docutils (without page numbers). z--use-docutils-toc�
use_latex_tocz*Add parts on top of the section hierarchy.z--use-part-sectionz=Attach author and date to the document info table. (default) z--use-docutils-docinfo�use_latex_docinfoz-Attach author and date to the document title.z--use-latex-docinfoz$Typeset abstract as topic. (default)z--topic-abstract�use_latex_abstractz<Use LaTeX abstract environment for the document's abstract. z--use-latex-abstractzOColor of any hyperlinks embedded in text (default: "blue", "false" to disable).z--hyperlink-colorZbluez;Additional options to the "hyperref" package (default: "").z--hyperref-optionsz^Enable compound enumerators for nested enumerated lists (e.g. "1.2.a.ii"). Default: disabled.z--compound-enumeratorszNDisable compound enumerators for nested enumerated lists. This is the default.z--no-compound-enumerators�compound_enumerators)r r z�Enable section ("." subsection ...) prefixes for compound enumerators. This has no effect without --compound-enumerators.Default: disabled.z --section-prefix-for-enumeratorszHDisable section prefixes for compound enumerators. This is the default.z#--no-section-prefix-for-enumerators�section_prefix_for_enumeratorszgSet the separator between section number and enumerator for compound enumerated lists. Default is "-".z--section-enumerator-separator�-z<char>zuWhen possibile, use the specified environment for literal-blocks. Default is quoting of whitespace and special chars.z--literal-block-envzhWhen possibile, use verbatim for literal-blocks. Compatibility alias for "--literal-block-env=verbatim".z--use-verbatim-when-possiblez�Table style. "standard" with horizontal and vertical lines, "booktabs" (LaTeX booktabs style) only horizontal lines above and below the table and below the header or "borderless". Default: "standard"z
--table-style�append)r r r r r z�LaTeX graphicx package option. Possible values are "dvips", "pdftex". "auto" includes LaTeX code to use "pdftex" if processing with pdf(la)tex and dvips otherwise. Default is no option.z--graphicx-optionz�LaTeX font encoding. Possible values are "", "T1" (default), "OT1", "LGR,T1" or any other combination of options to the `fontenc` package. z--font-encoding�T1z�Per default the latex-writer puts the reference title into hyperreferences. Specify "ref*" or "pageref*" to get the section number or the page number.z--reference-labelzVSpecify style and database for bibtex, for example "--use-bibtex=mystyle,mydb1,mydb2".z--use-bibtex�
sectnum_depthzlatex2e writerr �head_prefix�requirements�latex_preamble� fallbacks�pdfsetup�title�subtitle� titledata�body_pre_docinfo�docinfo�
dedication�abstract�bodyc C s t jj| � t| _d S )N)r r �__init__�LaTeXTranslator�translator_class)�self� rE �/usr/lib/python3.6/__init__.pyrA � s zWriter.__init__c C s t jj| �tjg S )N)r r �get_transformsr ZAdmonitions)rD rE rE rF rG � s
zWriter.get_transformsc C s� | j | j�}| jj|� x | jD ]}t| |t||�� q W yt| jjjd�}W n0 t k
r~ tt
jj| j
| jjj�d�}Y nX tjt|j� d��}|j� | j� |j| j�| _d S )N�rbzutf-8)rC �document� walkabout�visitor_attributes�setattr�getattr�open�settings�template�IOError�os�path�join�default_template_path�stringZTemplate�str�read�close�assemble_partsZ
substitute�parts�output)rD Zvisitor�partZ
template_filerP rE rE rF � translate� s zWriter.translatec C sd t jj| � xR| jD ]H}t| |�}|| jkrL|r:|jd� dj|�| j|<