Closed michaelnt closed 8 years ago
Print messages go through stdout. At the moment, I just wrap those in a CodeBlock, mainly to signify that the text is output from a code chunk.
How can I get this to display in both html and latex?
I thought that display.display(t)
would work. The documentation says
By default all representations will be computed and sent to the frontends. Frontends can decide which representation is used and how.
However, I only see text/plain
coming through. If that returns representations for text/html
and text/pdf
I think we would correct intercept and render it.
I thought display.Markdown(t) might be a solution that could then be rendered to latex or html by pandoc
Thanks, that worked for me (for html and latex).
Thinking about it more, when display.display
says it computes all the representations, that probably means _repr_latex_
, _repr_html_
, etc. But strings don't define any of those methods, just str
.
I'll write a couple tests and merge that tonight. Thanks for trying it out.
I'd like to template some text but it is styles as a code block.
The following works when outputting to html but gets ignored when outputting to latex.
How can I get this to display in both html and latex?