a simple example Text Cell Style with a inline Cell (DisplayFormula)
Cell[TextData[{"inline mode ",Cell[BoxData[FormBox[RowBox[{"f", "(", "x", ")"}], TraditionalForm]], "DisplayFormula", FormatType->"TraditionalForm"], " "}], "Text"]
setting in Options DefaultNewInlineCellStyle
is DisplayFormula
.
If setting in Options DefaultNewInlineCellStyle
is Text
this would not happen.
I think someone would also encounter the situation: Converting between TraditinalForm and StandardForm sometimes auto-add or remove some ().
When copy as Latex, it's ok to compile in WinEdt(my tex compiler‘s access)
f \text{inline} \text{mode} x
f(x)
\text{Null}
but when save notebook as .tex, load in file f(x)
becomes
\(\(f(x)\)\)
The right should be
\(f(x)\)
I asked on the TeX StackExchange site and got some comments"
I am not on the other site, but in your Mathematica set-up it does not make much sense to say that inline should be rendered as
DisplayFormula
. My guess is the converter used to output$…$
for inline math and$$…$$
for display. Now\(…\)
is often to be preferred for inline, but the display equivalent is\[…\]
not\(\(…\)\)
. – Andrew Swann
This is a good point.
DisplayFormula
==> $$
InlineFormula
==> $
This is MathJax.
However, maybe the same to \(
.
As Silvia's former suggestion, I should just not use DisplayFormula
in inline cells.
But I still need to check: would some other inline styles generate such double \(
s?
DisplayFormula
for inline formula.. Just like you should not use $$\int_a^b f(x)\,\mathrm{d}x$$ for inline formula in LaTeX. $\endgroup$DisplayFormula
which really not so necessary. But I'm not sure about this question, I should take time to do more tries. $\endgroup$DisplayFormula
in inline cells. Though still need to keep the track of whether other styles would generate such double\(
s $\endgroup$