Go Back   Physics Help Forum > Physics Forums > LateX Help

LateX Help LateX Help - Test your LaTex skills and get help with using LaTex

LinkBack Thread Tools Display Modes
Old May 3rd 2011, 02:46 PM   #1
Forum Admin
topsquark's Avatar
Join Date: Apr 2008
Location: On the dance floor, baby!
Posts: 2,818
Posting more than one line in LaTeX

We have had an issue in some posts where we go over the 5 image limit. (I'd ask for this limit to be extended, but I don't want to waste my breath.)

Fortunately there is a solution thanks to Moo over on MHF.

The solution uses the "array" command:
\begin{array}{lll} x^2 + y^2 = r^2 \\ x = r~cos(\theta) \\ y = r~sin(\theta) \end{array}

The {lll} tells the complier to align each (of the three) line to the "left." You can also use a "c" to center a line.

This line gives:

If we use, say, the matrix command the lines are somewhat centered. Using this we can write multiple lines without using more than one image.

Do not meddle in the affairs of dragons for you are crunchy and taste good with ketchup.

See the forum rules here.
topsquark is offline   Reply With Quote
Old May 3rd 2011, 11:04 PM   #2
Physics Team
Unknown008's Avatar
Join Date: Jun 2010
Location: Mauritius
Posts: 609
Yes, I've thought about this some time ago too

And actually, having only 1 column would require only 1 l, unless it's different here, which I don't think is the case.

Anyway, in case you want your equations to be left aligned, you edit that like this:

Stuff in left column & Stuff in central column & Stuff in right column \\

This would give a table without any border, with 3 columns, the first column being left aligned, the central column being centre aligned and the right column being right aligned. Then the '&' tells the latex to move to the next column while the \\ tells the latex to switch row.

Otherwise, for a table with borders, you can do this:

\begin{array}{|l|c|r|} \hline
Stuff in left column & Stuff in central column & Stuff in right column \\ \hline

The modulus (|) creates vertical borders (in this example, they border all the columns), and the \headline creates a horizontal border above the current row.
Jerry (Got my results!)
It is easier to protect your feet with slippers than to cover the earth with carpet.
No one can go back and change a bad beginning; but anyone can start now and create a successful ending.

If a problem can be solved, no need to worry about it. If it cannot be solved what is the use of worrying?
Unknown008 is offline   Reply With Quote

  Physics Help Forum > Physics Forums > LateX Help

latex, line, posting

Thread Tools
Display Modes

Similar Physics Forum Discussions
Thread Thread Starter Forum Replies Last Post
The line formula philipishin Philosophy of Physics 2 Sep 27th 2016 11:32 PM
How does one use LaTeX? DrPhil LateX Help 7 Mar 4th 2013 02:41 PM
motion along a line centenial Kinematics and Dynamics 1 Sep 8th 2010 09:35 AM
Learning latex physicsquest LateX Help 7 May 26th 2009 08:41 AM
Velocity-time line/Acceleration-time line graph. ariol Kinematics and Dynamics 1 Jan 8th 2009 10:08 PM

Facebook Twitter Google+ RSS Feed