Ask Your Question

Using quotes inside sageplot environment in SageTeX

asked 2012-04-06 06:54:34 -0500

kcrisman gravatar image

updated 2012-04-06 06:54:48 -0500

Here's the question: how do I get the following to work in SageTeX? The quotes always lead to an error.


Double quotes, escaping them, ... nothing seems to work. Thanks!

(See also this question if you want to answer it in both places for more visibility.)

edit retag flag offensive close merge delete


And yes, I do get the deprecation warning in Sage itself. That is not the point; `'legend_label'` has the same problem.

kcrisman gravatar imagekcrisman ( 2012-04-06 06:58:19 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2012-04-06 07:44:19 -0500

dazedANDconfused gravatar image

I'll post just so people don't have to jump to Tex Stack Exchange. Here's a method that will give you some freedom on your text label:

H+= text("$\cos(x)$", (3, 1), fontsize=16, color='black')
\[ \sageplot{G+H}\] 

See the Stack Exchange post for a more complete answer. And yes, the code above could be cleaned up (simplified) as well.

edit flag offensive delete link more


As I pointed out on SX, this works, and you could probably just get rid of everything except the last two lines, where you'd just do `G = ...` etc. There must be something wrong with the sageplot parser, I'm going to email the SageTeX author about this. He owes me a few anyway ;-)

kcrisman gravatar imagekcrisman ( 2012-04-10 05:16:56 -0500 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2012-04-06 06:54:34 -0500

Seen: 229 times

Last updated: Apr 06 '12