Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

escape caracters for LaTeX

Hello to all,

I am using sagetex and latex to produce several variations of an exam, using sagetex and Latex with a script that makes several iterations. I do this:

var('x,y,z')

v = vector([x,y,z])

a = vector([1,-2,-1]) These will chgnage from one iteration to the next.

sortie = str(latex(a.dot_product(v)))

This leads to x - 2 \\, y - z, which is correct, and I would like to turn into \bbm{x} -2 \\, \bbm{y} - \bbm{z} for the Latex processing so that x,y and z are whohn like vectors.

Suggestions?

escape caracters for LaTeX

Hello to all,

I am using sagetex SageTeX and latex LaTeX to produce several variations of an exam, using sagetex and Latex with a script that makes several iterations. I do this:

var('x,y,z')var('x, y, z')
v = vector([x, y, z])
a = vector([1, -2, -1])

v = vector([x,y,z])

a = vector([1,-2,-1]) These will chgnage change from one iteration to the next.

sortie = str(latex(a.dot_product(v)))str(latex(a.dot_product(v)))

This leads to to

x - 2 \\, y - zz
, 

which is correct, and I would like to turn into into

\bbm{x} -2 \\, \bbm{y} - \bbm{z}\bbm{z}
 

for the Latex LaTeX processing so that x,y x, y and z z are whohn shown like vectors.

Suggestions? Suggestions?

escape caracters for LaTeX

I am using SageTeX and LaTeX to produce several variations of an exam, with a script that makes several iterations. I do this:

var('x, y, z')
v = vector([x, y, z])
a = vector([1, -2, -1])

These will change from one iteration to the next.

sortie = str(latex(a.dot_product(v)))

This leads to

x - 2 \\, y - z

which is correct, and I would like to turn into

\bbm{x} -2 \\, \bbm{y} - \bbm{z}

for the LaTeX processing so that x, y and z are shown like vectors.

Suggestions?