Latex problem with alignment character and &

  • Context: LaTeX 
  • Thread starter Thread starter HMPARTICLE
  • Start date Start date
  • Tags Tags
    alignment Latex
Click For Summary

Discussion Overview

The discussion revolves around a LaTeX problem related to the use of the alignment character "&" in a mathematical expression. Participants are exploring the issue of an error message indicating a misplaced alignment character while trying to render LaTeX code in different editors.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents a LaTeX code snippet that generates an error message regarding a misplaced alignment character "&".
  • Another participant notes that the LaTeX code works in the forum but not in their local LaTeX editor, suggesting a potential issue with the editors themselves.
  • A third participant agrees that the problem likely lies with the LaTeX editors rather than the code itself.
  • One participant speculates that the error might be caused by preceding code in the document.

Areas of Agreement / Disagreement

Participants generally agree that the issue may be related to the LaTeX editors, but there is no consensus on the exact cause of the error or how to resolve it.

Contextual Notes

There may be limitations related to the context in which the LaTeX code is used, such as preceding code that could affect the alignment character's behavior.

HMPARTICLE
Messages
95
Reaction score
0
\begin{align*}
AB &= \sqrt{(2-(-1))^2+(3-4)^2}\\
&= \sqrt{3^2+(-1)^2}\\
&= \sqrt{10}.
\end{align*}

is what i am entering.
This is the error i am getting;

misplaced alignment character &.I am baffled.
 
Physics news on Phys.org
for some reason it is working on here, but not in my latex editor, i have tried 2 different latex editors :(
 
I guess it is a problem with the LaTeX editors, not a problem with the forum then.
 
HMPARTICLE said:
for some reason it is working on here, but not in my latex editor, i have tried 2 different latex editors :(
The error might be due to the code appearing before this.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K