Ask Your Question

Revision history [back]

As a workaround you could

  • use a name without slash
  • specify a distinct LaTeX name

The following seems to work.

sage: x = SR.symbol('x')
sage: x_0 = SR.symbol('x_0')
sage: logr = SR.symbol('L_x_over_x_0', latex_name='L_{x/x_0)')
sage: logr_ex = logr == log(x/x_0)
sage: latex(logr_ex)
L_{x/x_0) = \log\left(\frac{x}{x_{0}}\right)
sage: latex(logr_ex.solve(x)[0])
x = x_{0} e^{\left(L_{x/x_0)\right)}

As a workaround you could

  • use a name without slash
  • specify a distinct LaTeX name

The following seems to work.

sage: x = SR.symbol('x')
sage: x_0 = SR.symbol('x_0')
sage: logr = SR.symbol('L_x_over_x_0', latex_name='L_{x/x_0)')
latex_name='L_{x/x_0}')
sage: logr_ex = logr == log(x/x_0)
sage: latex(logr_ex)
L_{x/x_0) = \log\left(\frac{x}{x_{0}}\right)
sage: latex(logr_ex.solve(x)[0])
x = x_{0} e^{\left(L_{x/x_0)\right)}
e^{\left(L_{x/x_0}\right)}

As a workaround you could

  • use a name without slash
  • specify a distinct LaTeX name

The following seems to work.

sage: x = SR.symbol('x')
sage: x_0 = SR.symbol('x_0')
sage: logr = SR.symbol('L_x_over_x_0', latex_name='L_{x/x_0}')
sage: logr_ex = logr == log(x/x_0)
sage: latex(logr_ex)
L_{x/x_0) L_{x/x_0} = \log\left(\frac{x}{x_{0}}\right)
sage: latex(logr_ex.solve(x)[0])
x = x_{0} e^{\left(L_{x/x_0}\right)}