
    ^h:                     h    S r SSKJrJrJrJrJrJr  SSKJ	r	J
r
Jr  SSKJr  \
 " S S\	5      5       rg)z!Simple magics for display formats    )display
JavascriptLatexSVGHTMLMarkdown)Magicsmagics_class
cell_magic)magic_argumentsc                       \ rS rSrSr\S 5       r\S 5       r\S 5       r\S 5       r	\
R                  " 5       \
R                  " SSS	S
S9\S 5       5       5       r\S 5       rSrg)DisplayMagics   zMagics for displaying various output types with literals

Defines javascript/latex/svg/html cell magics for writing
blocks in those languages, to be rendered in the frontend.
c                 &    U R                  X5        g)zRun the cell block of Javascript code

Alias of `%%javascript`

Starting with IPython 8.0 %%javascript is pending deprecation to be replaced
by a more flexible system

Please See https://github.com/ipython/ipython/issues/13376
N)
javascriptselflinecells      U/home/james-whalen/.local/lib/python3.13/site-packages/IPython/core/magics/display.pyjsDisplayMagics.js"   s     	#    c                 ,    [        [        U5      5        g)zRun the cell block of Javascript code

Starting with IPython 8.0 %%javascript is pending deprecation to be replaced
by a more flexible system

Please See https://github.com/ipython/ipython/issues/13376
N)r   r   r   s      r   r   DisplayMagics.javascript/   s     	
4 !r   c                 ,    [        [        U5      5        g)a  Render the cell as a block of LaTeX

The subset of LaTeX which is supported depends on the implementation in
the client.  In the Jupyter Notebook, this magic only renders the subset
of LaTeX defined by MathJax
[here](https://docs.mathjax.org/en/v2.5-latest/tex.html).N)r   r   r   s      r   latexDisplayMagics.latex;   s     	dr   c                 ,    [        [        U5      5        g)z!Render the cell as an SVG literalN)r   r   r   s      r   svgDisplayMagics.svgE   s     	D	r   z
--isolated
store_trueFzZAnnotate the cell as 'isolated'.
Isolated cells are rendered inside their own <iframe> tag)actiondefaulthelpc                     [         R                  " U R                  U5      n[        U5      nUR                  (       a  [        USSS00S9  g[        U5        g)z"Render the cell as a block of HTMLz	text/htmlisolatedT)metadataN)r   parse_argstringhtmlr   r'   r   )r   r   r   argsr*   s        r   r*   DisplayMagics.htmlJ   sE     ..tyy$?Dz==DKD0A#BCDMr   c                 ,    [        [        U5      5        g)z&Render the cell as Markdown text blockN)r   r   r   s      r   markdownDisplayMagics.markdownZ   s     	r    N)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r    r   argumentr*   r.   __static_attributes__r0   r   r   r   r      s     
$ 
$ " "     $$&\5=
   '    r   r   N)r5   IPython.displayr   r   r   r   r   r   IPython.core.magicr	   r
   r   IPython.corer   r   r0   r   r   <module>r;      s>    ' L K  ) B F B  B r   