I need a LaTeX workaround for the array function

  • Context: LaTeX 
  • Thread starter Thread starter benorin
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
10 replies · 1K views
Science Advisor
Insights Author
Messages
1,442
Reaction score
191
I'm currently writing an Insight article and the TeX interpreter for this doesn't process the array function, it just dumps code for it whenever it appears. I make extensive use of the array function in the paper I'm converting to be an Insight. Is there a workaround you know of for this? I was mostly using array to align my long chains of equalities but for the moment I've just replaced the array with dbl $ code tags and it is functional but the alignment is off still, (they don't line up at the '=' sign). For matrices and binomial coefficients I have just done component form and alternate notation. I'm ok with how it displays but I want it to be perfect. Thanks for your time,
-Ben
 
Physics news on Phys.org
I usually use:
Code:
\begin{eqnarray*}
F & = & ma \\
& = & \frac{GMm}{r^2}
\end{eqnarray*}
Looks like this:$$\begin{eqnarray*} F & = & ma \\ & = & \frac{GMm}{r^2} \end{eqnarray*} $$

Today I learned that you apparently don't need the dollar signs around a LaTeX environment like eqnarray* - it gets interpreted anyway. Hence the CODE tags...
 
Last edited:
benorin said:
I'm currently writing an Insight article and the TeX interpreter for this doesn't process the array function, it just dumps code for it whenever it appears. I make extensive use of the array function in the paper I'm converting to be an Insight. Is there a workaround you know of for this? I was mostly using array to align my long chains of equalities but for the moment I've just replaced the array with dbl $ code tags and it is functional but the alignment is off still, (they don't line up at the '=' sign). For matrices and binomial coefficients I have just done component form and alternate notation. I'm ok with how it displays but I want it to be perfect. Thanks for your time,
-Ben
It's better to use the environments of amsmath. AFAIK they all work in the forums and the Insights.
 
@vanhees71 I originally wrote the paper using MS Office 365 > Word and MathType (which is a handy GUI interface for math typesetting with assignable hot-keys for your favorite symbols or macros or expressions, etc) and I can export LaTeX, but I did so using the MathJax library because I assumed the Insights blog editor would naturally use the same MathJax that this forum uses. But evidently I was wrong. I know how to typeset for forums, at least enough to cover most calculus needs but LaTeX is not something I'm well-versed in. There be other libraries I can use to export my paper, which of those would be the correct one for Insights blog editor? (I can't list them all, too many).
 
@Ibix forgive my cluelessness please, but I must ask how exactly do I get this eqnarray* to work in the Insights editor? I've tried a variety of ways and they result in not what is shown here
 
Input:

1584092990055.png


Output:

1584093011109.png

Conclusion:


1.) A manual carriage return leads to an unformatted / not interpreted output. So they must be avoided. Just type everything in a row and let the system perform the carriage returns.

2.) eqnarray* and align* lead to the same output. The first should be used for multiple tabulators per line, the second is sufficient for equations as in the example.
 
benorin said:
I assumed the Insights blog editor would naturally use the same MathJax that this forum uses. But evidently I was wrong.
It is the same, perhaps wordpress does something a little funny to mess with MathJax a little, I don't know
 
I got it now. Thank you all who replied. It was the carriage return thing.
 
  • Like
Likes   Reactions: Greg Bernhardt