Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LaTeX Outpu: How to replace Brakcets and add Dollars

I have

x = 1
data = [x/n for n in range (1,4)]
M = latex(m0)

print M
print M.replace('\left[', '$').replace(', ', '$, ').replace('\right]', '$')

Out Actual:

\left[1, \frac{1}{2}, $\frac{1}{3}$ \right]
$1$, \frac{1}{2}, $\frac{1}{3}$\right]

But I need:

Out Target:

$1$, $\frac{1}{2}$, $\frac{1}{3}$

LaTeX Outpu: How to replace Brakcets and add Dollars

I have

x = 1
data = [x/n for n in range (1,4)]
M = latex(m0)

print M
print M.replace('\left[', '$').replace(', ', '$, ').replace('\right]', '$')

Out Actual:

\left[1, \frac{1}{2}, $\frac{1}{3}$ \right]
$1$, \frac{1}{2}, $\frac{1}{3}$\right]

But I need:

Out Target:

$1$, $\frac{1}{2}$, $\frac{1}{3}$

LaTeX Outpu: Output: How to replace Brakcets and add Dollars

I have

x = 1
data = [x/n for n in range (1,4)]
M = latex(m0)
latex(data)

print M
print M.replace('\left[', '$').replace(', ', '$, ').replace('\right]', '$')

Out Actual:

\left[1, \frac{1}{2}, $\frac{1}{3}$ \right]
$1$, \frac{1}{2}, $\frac{1}{3}$\right]

But I need:

Out Target:

$1$, $\frac{1}{2}$, $\frac{1}{3}$
click to hide/show revision 4
None

LaTeX Output: How to replace Brakcets and add Dollars

I have

x = 1
data = [x/n for n in range (1,4)]
M = latex(data)

print M
print M.replace('\left[', '$').replace(', ', '$, ').replace('\right]', '$')

Out Actual:

\left[1, \frac{1}{2}, $\frac{1}{3}$ \right]
$1$, \frac{1}{2}, $\frac{1}{3}$\right]

But I need:

Out Target:

$1$, $\frac{1}{2}$, $\frac{1}{3}$