Wikipedia:Reference desk/Archives/Mathematics/2007 June 7

From Wikipedia, the free encyclopedia
Mathematics desk
< June 6 << May | June | Jul >> June 8 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


June 7[edit]

LaTeX question[edit]

Not sure if it belongs here or in the Computing Reference desk, but how do I label equations in LaTeX? Say I have this:

...(1)
...(2)

How do I get the labels ...(1) and ...(2) in LaTeX? x42bn6 Talk Mess 21:15, 7 June 2007 (UTC)[reply]

Do you mean genuine LaTeX or the hamstrung approximation used for Wikipedia? --KSmrqT 22:11, 7 June 2007 (UTC)[reply]
Genuine, although the latter could become useful in the future. x42bn6 Talk Mess 22:15, 7 June 2007 (UTC)[reply]

Try this kind of stuff:

\begin{equation}
\, 5x+2y=3
"\label{Equation1}
"\end{equation}%
\begin{equation}
\, 4x+7y=24 \label{MySecondEquation}
\end{equation}%

Of course, you can use these labels later to refer to these equations. Never tried this for wikipedia. deeptrivia (talk) 22:23, 7 June 2007 (UTC)[reply]

I'm using \begin{displaymath} rather than \begin{equation} because I am using lots of chunks of mathematics that don't need referring back, plus I don't want default numbering. I am a LaTeX newcomer, so I don't mind using \begin{equation} if I can remove the default numbering, and stick my own labels in. x42bn6 Talk Mess 22:27, 7 June 2007 (UTC)[reply]

I've always liked:

\begin{eqnarray}
5x + 2y & = & 3\\
4x + 7y & = & 24
\end{eqnarray}

24.8.49.212 01:19, 8 June 2007 (UTC)[reply]

If you do what the anon above suggested, every equation will have a number on it (not always desirable). If you want some to have numbers and some not to have numbers, just append "\nonumber" to the ones you want to remain unlabeled. You must still "label" and "ref" them in the way described by deeptrivia above. –King Bee (τγ) 12:59, 9 June 2007 (UTC)[reply]
  • By the way, to avoid the numbering situation in general, you can use \begin{eqnarray*} and \end{eqnarray*}. It turns off numbering completely. Also, the asterisk has the same effect on \begin and \end {figure} and so forth. Try it out! –King Bee (τγ) 13:16, 13 June 2007 (UTC)[reply]