Ask Your Question
2

Typeset latex in SMC

asked 9 years ago

Jeremias Epperlein gravatar image

updated 8 years ago

FrédéricC gravatar image

In the classical Sage notebook there is the "view" command that can be used to e.g. get a plot of a graph rendered by pdflatex. Is there an equivalent in SMC?

For example I want the following code to give me a graph plot rendered by pdflatex.

G=graphs.BullGraph()
G.set_latex_options(format='dot2tex', prog='dot')
view(G)

I can get the corresponding latex code in SMC by

latex(G)

but I have no idea how to render it.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 9 years ago

Jeremias Epperlein gravatar image

updated 9 years ago

To answer my own question for future reference:

Use

latex.eval(latex(G))

But this only works in SMC.

Preview: (hide)
link
1

answered 9 years ago

eric_g gravatar image

updated 9 years ago

Thanks to some recent change by William Stein, the command view(G) does just work now in the SMC; see here for your example.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 9 years ago

Seen: 480 times

Last updated: Nov 04 '15