B
    ]\                 @   s@   d Z ddlmZmZ ddlmZ ddlmZ G dd deZdS )	zWModule that allows latex output notebooks to be conditioned before
they are converted.
    )print_functionabsolute_import   )Preprocessor)Unicodec               @   s,   e Zd ZdZedddjddZdd Zd	S )
LatexPreprocessorzPreprocessor for latex destined documents.
    
    Mainly populates the `latex` key in the resources dict,
    adding definitions for pygments highlight styles.
    defaultz!Name of the pygments style to use)helpT)Zconfigc             C   sN   ddl m} |di  |d d|| jd  |d d| j ||fS )aJ  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   )LatexFormatterZlatexZpygments_definitions)styleZpygments_style_name)Zpygments.formattersr
   
setdefaultr   Zget_style_defs)selfZnbZ	resourcesr
    r   <lib/python3.7/site-packages/nbconvert/preprocessors/latex.py
preprocess$   s
    zLatexPreprocessor.preprocessN)__name__
__module____qualname____doc__r   tagr   r   r   r   r   r   r      s
   r   N)	r   Z
__future__r   r   baser   Z	traitletsr   r   r   r   r   r   <module>   s   