Ask Your Question
2

Typeset latex in SMC

asked 2015-10-29 17:28:20 +0200

updated 2016-06-06 21:48:07 +0200

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.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2015-10-29 17:48:16 +0200

updated 2015-11-04 09:54:58 +0200

To answer my own question for future reference:

Use

latex.eval(latex(G))

But this only works in SMC.

edit flag offensive delete link more
1

answered 2015-11-04 10:24:03 +0200

eric_g gravatar image

updated 2015-11-04 10:27:05 +0200

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

edit flag offensive delete link more

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: 2015-10-29 17:28:20 +0200

Seen: 327 times

Last updated: Nov 04 '15