ó ÿgdSc@sdZddlZddlmZddlmZddlmZddlmZddl m Z ddl m Z m Z dd lmZdd lmZdd lmZdd lmZdd lmZddlmZmZddlmZmZddlmZdefd„ƒYZ dS(s» sphinx.builders.latex ~~~~~~~~~~~~~~~~~~~~~ LaTeX builder. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. iÿÿÿÿN(tpath(tnodes(t FileOutput(t new_document(t OptionParser(t package_dirtaddnodes(t texescape(t_(tBuilder(tNoUri(tinline_all_toctrees(tSEPtcopyfile(tboldt darkgreen(t LaTeXWritert LaTeXBuildercBszeZdZdZdZddddgZd„Zd„Zdd„Z dd „Z d „Z d „Z d „Z d „ZRS(s, Builds LaTeX output to create PDF. tlatexsapplication/pdfs image/pngs image/gifs image/jpegcCs g|_g|_tjƒdS(N(tdocnamest document_dataRtinit(tself((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pyR(s  cCsdS(Ns all documents((R((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pytget_outdated_docs-scCs$||jkrt‚nd|SdS(Nt%(RR (Rtdocnamettyp((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pytget_target_uri0s cCs|j||ƒS(N(R(Rtfrom_ttoR((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pytget_relative_uri6scCsÇtt|jjƒ}|s,|jdƒdSg|_x‹|D]ƒ}|d}||jjkru|jd|ƒq<n|jj |ƒ|j t dƒr¥|d }n|jj ||dfƒq<WdS(NsEno "latex_documents" config value found; no documents will be writtenis="latex_documents" config value references unknown document %stindexiûÿÿÿi( tmaptlisttconfigtlatex_documentstwarnttitlestenvtall_docsRtappendtendswithR (Rtpreliminary_document_datatentryR((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pytinit_document_data:s      c Gs{t|ƒ}td|jjd|fdtƒjƒ}|jƒx4|jD])}|d \}}}}} t} t |ƒdkrŽ|d} nt dt j |j |ƒddƒ} |jd|d d d ƒ|j|| d | d krô|jjp÷gƒ} |j| ƒ|jdd d ƒ|| _|| j_|| j_|| j_| | j_|j| | ƒ|jdƒqJWdS(Ntdefaultst componentstread_config_filesitdestination_pathtencodingsutf-8s processing s... tnonlit appendicesthowtos writing... tdone(RRR&tsettingstTruetget_default_valuesR,RtFalsetlenRRtjointoutdirtinfotassemble_doctreeR"tlatex_appendicestpost_process_imagestauthorttitleRtdocclasstwrite( Rtignoredt docwritert docsettingsR+Rt targetnameRBRARCt toctree_onlyt destinationtdoctree((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pyRDMs6             cCs$t|g|ƒ|_|jt|ƒdddƒ|jj|ƒ}||d<|r½tdƒ}tjƒ}|tj ddƒ7}||7}x$|j t j ƒD]}||7}q W|}nt ||j||tƒ}||dusresolving references...t refdocnamet refsectnames (in t)(tsetRR=RR&t get_doctreeRRtsectionRBttraverseRttoctreeR R(tresolve_referencest pending_xreftemphasisR%t startswithtTextRt replace_self(Rt indexfileRIR3ttreetnew_treetnew_secttnodet largetreeRtappendixt pendingnodetsectnametnewnodestsubdirRB((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pyR>lsF               %cCs|jr‘|jtdƒddƒx_|jjƒD]N\}}|jd|ddƒttj|j|ƒtj|j|ƒƒq2W|jƒn|jtdƒƒtjt dƒ}xQt j |ƒD]@}|j dƒsÆttj||ƒtj|j|ƒƒqÆqÆW|j jrž|jtdƒddƒx_|j jD]Q}|jd|ddƒttj|j|ƒtj|jtj|ƒƒƒq<W|jƒn|j jrótj|j jƒ}ttj|j|j jƒtj|j|ƒƒn|jd ƒdS( Nscopying images...R2iRLscopying TeX support files...t texinputst.scopying additional files...R5(timagesR=Rt iteritemsR RR;tsrcdirR<RtostlistdirRXR"tlatex_additional_filestconfdirtbasenamet latex_logo(Rtsrctdestt staticdirnametfilenametlogobase((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pytfinish—s2   #  N(t__name__t __module__t__doc__tnametformattsupported_image_typesRRtNoneRRR,RDR>Rv(((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pyRs        +(!RyRkRtdocutilsRt docutils.ioRtdocutils.utilsRtdocutils.frontendRtsphinxRRt sphinx.utilRt sphinx.localeRtsphinx.buildersR tsphinx.environmentR tsphinx.util.nodesR tsphinx.util.osutilR R tsphinx.util.consoleRRtsphinx.writers.latexRR(((s?/usr/local/lib/python2.7/site-packages/sphinx/builders/latex.pyt s