Re: [sympy] Printing a string and latex together in a notebook

18 views
Skip to first unread message

Aaron Meurer

unread,
Nov 17, 2012, 5:49:38 PM11/17/12
to sy...@googlegroups.com
You'll probably get a better response if you ask on the IPython user list. I think you might need to output Markdown (I don't even know if it's possible).

Aaron Meurer


On Sat, Nov 17, 2012 at 1:53 PM, Mike Witt <msg...@gmail.com> wrote:
In an ipython notebook, I'd like to do something like this:

  x = Symbol('x')
  print('The answer is: $%s$' %latex(x**2))

The closest I've figured out how to get is:

  print('The answer is:')
  display(x**2)

Or something equivalent to that. I'd like to mix the string
and the math output on the same line, but I can't figure
out the syntax.

-Mike

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/BwhBks1e7y4J.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.

Reply all
Reply to author
Forward
0 new messages