Physics Help Forum Posting more than one line in LaTeX

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

 May 3rd 2011, 02:46 PM #1 Forum Admin     Join Date: Apr 2008 Location: On the dance floor, baby! Posts: 2,239 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: $\begin{array}{lll} x^2 + y^2 = r^2 \\ x = r~cos(\theta) \\ y = r~sin(\theta) \end{array}$ 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. -Dan __________________ Do not meddle in the affairs of dragons for you are crunchy and taste good with ketchup. See the forum rules here.
 May 3rd 2011, 11:04 PM #2 Physics Team     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: \begin{array}{lcr} Stuff in left column & Stuff in central column & Stuff in right column \\ \end{array} 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 \end{array} 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?

 Tags latex, line, posting

 Thread Tools Display Modes Linear Mode

 Similar Physics Forum Discussions Thread Thread Starter Forum Replies Last Post philipishin Philosophy of Physics 2 Sep 27th 2016 11:32 PM DrPhil LateX Help 7 Mar 4th 2013 02:41 PM centenial Kinematics and Dynamics 1 Sep 8th 2010 09:35 AM physicsquest LateX Help 7 May 26th 2009 08:41 AM ariol Kinematics and Dynamics 1 Jan 8th 2009 10:08 PM