$\overrightarrow{A}=3\text{\hat{i}}+4\text{\hat{j}}+5\text{\hat{k}}$
the above latex code is not working using JSMATH. If I remove \text its working.
Kindly let me know how to make \text to work in JSMATH.
$\overrightarrow{A}=3\text{\hat{i}}+4\text{\hat{j}}+5\text{\hat{k}}$
the above latex code is not working using JSMATH. If I remove \text its working.
Kindly let me know how to make \text to work in JSMATH.
Your expression is not valid LaTeX code. The
\hat
macro is a math-mode macro, not a text-mode one, and so you can't use
\hat
inside
\text
(except by doing something like
\text{$\hat{i}$}
). Also, jsMath doesn't process macros inside text-mode material (other than within embedded math like above), because jsMath only handle mathematical typesetting, not text typesetting.
If you are trying to get an upright i, j, and k rather than italics, try
3\hat{\rm i} + 4\hat{\rm j}+5\hat{\rm k}
instead.