
    Mh
                     B    d Z ddlmZmZ ddlmZ  G d de          ZdS )zWModule that allows latex output notebooks to be conditioned before
they are converted.
    )ListUnicode   )Preprocessorc                   8   e Zd ZdZ eddd                              d          Z eddd                              d          Z e e            ddd	                              d          Z	 ed
d                              d          Z
d ZdS )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} |                    di            |d                             d || j                                                             |d                             d| j                   | j        d | j        D             |j        d	<   | j        | j        |j        d
<   | j        | j        |j        d<   ||fS )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_nameNc                     g | ]}d |iS )name ).0authors     ]/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/nbconvert/preprocessors/latex.py
<listcomp>z0LatexPreprocessor.preprocess.<locals>.<listcomp>I   s    %W%W%W6vv&6%W%W%W    authorsdatetitle)	pygments.formattersr   
setdefaultr   get_style_defsauthor_namesmetadatar   r   )selfnb	resourcesr   s       r   
preprocesszLatexPreprocessor.preprocess4   s     	766666Wb)))'%%"NN$D$D$D$S$S$U$U	
 	
 	
 	'%%&;TZHHH(%W%WTEV%W%W%WBK	"9 "&)BK:!#':BK 9}r   )__name__
__module____qualname____doc__r   tagr   r   r   r"   r   r'   r   r   r   r   r      s          7*   
cc	 	 GD =4PPPTT\`TaaE4		:	  
 
cc  GI$GHHHLLTXLYYE    r   r   N)r+   	traitletsr   r   baser   r   r   r   r   <module>r/      so     $ # # # # # # #      8 8 8 8 8 8 8 8 8 8r   