style_python.tplx 792 B

12345678910111213141516171819202122232425
  1. ((= Python input/output style =))
  2. ((*- extends 'base.tplx' -*))
  3. % Custom definitions
  4. ((* block definitions *))
  5. ((( super() )))
  6. % Pygments definitions
  7. ((( resources.latex.pygments_definitions )))
  8. ((* endblock definitions *))
  9. %===============================================================================
  10. % Input
  11. %===============================================================================
  12. ((* block input scoped *))
  13. \begin{Verbatim}[commandchars=\\\{\}]
  14. ((*- if resources.global_content_filter.include_input_prompt *))
  15. ((( cell.source | highlight_code(strip_verbatim=True, metadata=cell.metadata) | add_prompts )))
  16. ((* else *))
  17. ((( cell.source | highlight_code(strip_verbatim=True, metadata=cell.metadata) )))
  18. ((* endif *))
  19. \end{Verbatim}
  20. ((* endblock input *))