
    f
                     :    d Z ddlmZmZ ddlmZ  G d de      Zy)zWModule that allows latex output notebooks to be conditioned before
they are converted.
    )ListUnicode   )Preprocessorc                       e Zd ZdZ eddd      j                  d      Z eddd      j                  d      Z e e       ddd	      j                  d      Z	 ed
d      j                  d      Z
d Zy)LatexPreprocessora  Preprocessor for latex destined documents.

    Populates the ``latex`` key in the resources dict,
    adding definitions for pygments highlight styles.

    Sets the authors, date and title of the latex document,
    overriding the values given in the metadata.
    NzDate of the LaTeX documentT)help
allow_none)configzTitle of the LaTeX documentz*Author names to list in the LaTeX document)default_valuer	   r
   defaultz!Name of the pygments style to use)r	   c                    ddl m} |j                  di        |d   j                  d || j                        j	                                |d   j                  d| j                         | j
                  )| j
                  D cg c]  }d|i c}|j                  d<   | j                  | j                  |j                  d	<   | j                  | j                  |j                  d
<   ||fS c c}w )aB  Preprocessing to apply on each notebook.

        Parameters
        ----------
        nb : NotebookNode
            Notebook being converted
        resources : dictionary
            Additional resources used in the conversion process.  Allows
            preprocessors to pass variables into the Jinja engine.
        r   )LatexFormatterlatexpygments_definitions)stylepygments_style_namenameauthorsdatetitle)	pygments.formattersr   
setdefaultr   get_style_defsauthor_namesmetadatar   r   )selfnb	resourcesr   authors        X/var/www/cvtools/html/venv/lib/python3.12/site-packages/nbconvert/preprocessors/latex.py
preprocesszLatexPreprocessor.preprocess4   s     	7Wb)'%%"N$D$S$S$U	
 	'%%&;TZZH(EIEVEV%W6vv&6%WBKK	"99 "&))BKK::!#'::BKK 9} &Xs   C/)__name__
__module____qualname____doc__r   tagr   r   r   r   r   r"        r!   r   r      s     * 
cc	 	 D =4PTT\`TaE	:	
 
cc  I$GHLLTXLYEr)   r   N)r&   	traitletsr   r   baser   r   r(   r)   r!   <module>r,      s    $ 8 8r)   