LaTeX I need a LaTeX workaround for the array function

  • Thread starter Thread starter benorin
  • Start date Start date
Click For Summary
The discussion centers on challenges faced while converting a paper into an Insight article using TeX, particularly regarding the array function, which the TeX interpreter does not process correctly. The user has replaced the array function with double dollar code tags for alignment of equalities, but this has resulted in misalignment. Suggestions include using environments from the amsmath package, which are compatible with the Insights blog editor. The user also shares their experience with exporting LaTeX from MS Office 365 and MathType, initially assuming compatibility with the forum's MathJax. Key takeaways include avoiding manual carriage returns to ensure proper formatting and recognizing that both eqnarray* and align* can produce similar outputs, with the latter being sufficient for simpler equations. Ultimately, the user resolves their issues by understanding the formatting requirements of the Insights editor.
benorin
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.
 
  • #10
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
 
  • #11
I got it now. Thank you all who replied. It was the carriage return thing.
 
  • Like
Likes Greg Bernhardt

Similar threads

  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
10K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K