Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTeX sum help

  1. Apr 18, 2007 #1
    Hi guys,

    Basically I need to have 2 lines underneath a sum, but when I use the {\ substack} command it makes no difference. Any ideas how I can remedy this?
     
  2. jcsd
  3. Apr 18, 2007 #2

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    substack works for me. Did you put enough brackets etc. in? I just did this and it works: \sum_{\substack{m=1\\n=0}}
    [tex]\sum_{\substack{m=1\\n=0}} [/tex]
     
  4. Apr 19, 2007 #3
    Thanks for the reply.
    I seem to have enough brackets. I am inputing:

    \begin{equation}
    \sum_{\substack{{\bf 1},{\bf 2} \\{\bf 1}\neq{\bf 2}}}
    =
    \sum^\prime_{{\bf 1},{\bf 2}}
    \end{equation}
    I get the error message "undefined control sequence" ....
     
  5. Apr 19, 2007 #4

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    [tex]\sum_{\substack{{\bf 1},{\bf 2} \\{\bf 1}\neq{\bf 2}}}
    =
    \sum^\prime_{{\bf 1},{\bf 2}}
    [/tex]

    I don't see anything wrong with that-- it works here and on my editor programme.

    Can you find out which control sequence it thinks is undefined? Are you sure the error is for that equation?
     
    Last edited: Apr 19, 2007
  6. Apr 19, 2007 #5
    Are you using the AMS package?
    I just put in \usepackage{ams} or whatever, and the substack worked in the \equation environment, but then went completely mental in the \eqnarray environment- thus I guess I will have to change all of the commands to AMS ones right? Not sure I have the time to do that :(
     
  7. Apr 19, 2007 #6

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    Yea, Im using ams-- in the preamble ive got \usepackage{amsmath} and \usepackage{amssymb}.

    substack works in eqnarray for me...:confused:
     
  8. Apr 19, 2007 #7
    I will give that a try.

    Couple of other annoying problems:

    My references are printing out but the numbers in the text aren't printing. All i get is [?].

    My contents page doesn't want to seem to print out either, it just comes up with a blank page once it has been printed out?
     
  9. Apr 19, 2007 #8

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    Make sure you execute the file twice before viewing the pdf document. I don't really know why you have to do this, but I remember when I was given a brief lesson on how to use latex, the instructor said it was important to execute twice before viewing.
     
  10. Apr 19, 2007 #9
    What programs do you guys use to draw figures to insert into LaTeX?
    I only have crappy "paint" - not sure that will cut it.
     
  11. Apr 19, 2007 #10

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    The first time through it writes a file containing the reference numbers. The second time, it reads the file before it formats the document, so it knows what numbers to use.

    Strictly speaking you may need more than 2 passes, because inserting the numbers could change the pagination, so the numbers would be wrong.

    If you have the program "texify" it does all the multiple pass stuff automatically.

    Anything that will generate images in .eps format will do nicely.

    For simple diagrams, \usepackage{xy}, or \begin{picture} ... \end{picture}, can do the whole job in LaTeX.
     
  12. Apr 20, 2007 #11

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    Thanks, that makes sense now!

    I tend to draw diagrams in powerpoint and then export as a jpg-- OK, it's not all that professional, but it does the job pretty well!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: LaTeX sum help
  1. LaTeX Help (Replies: 5)

  2. Latex Help (Replies: 3)

  3. Help on LaTeX (Replies: 1)

  4. Latex Help (Replies: 9)

  5. LaTeX help (Replies: 2)

Loading...