Maximizing LaTeX Sum Function with Substack: Quick Fix Tips

  • Context: LaTeX 
  • Thread starter Thread starter tom1985
  • Start date Start date
  • Tags Tags
    Latex Sum
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting the use of the LaTeX sum function with the substack command, addressing issues related to undefined control sequences, reference printing, and figure drawing for LaTeX documents. Participants share their experiences and solutions regarding LaTeX formatting and compilation problems.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant reports difficulty using the substack command in a sum, while another claims it works correctly for them.
  • A participant shares their LaTeX input that results in an "undefined control sequence" error, prompting others to question the source of the error.
  • There is a suggestion to ensure the AMS package is included, with mixed experiences reported regarding its effect on substack functionality.
  • Several participants mention issues with references not displaying correctly in the text and a blank contents page, with advice given to execute the LaTeX file multiple times to resolve these issues.
  • Participants discuss various programs for creating figures to insert into LaTeX, with some expressing dissatisfaction with their current tools.

Areas of Agreement / Disagreement

Participants express differing experiences with the substack command and the AMS package, indicating that there is no consensus on the resolution of these issues. Additionally, there are multiple approaches suggested for handling references and figure creation, reflecting a variety of preferences and practices.

Contextual Notes

Some participants mention the need for multiple passes in LaTeX compilation to ensure references are correctly displayed, highlighting potential limitations in understanding the compilation process. There are also unresolved questions regarding specific control sequences and their definitions.

Who May Find This Useful

This discussion may be useful for LaTeX users encountering similar formatting issues, particularly those working with mathematical expressions and document references.

tom1985
Messages
16
Reaction score
0
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?
 
Physics news on Phys.org
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]
 
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" ...
 
[tex]\sum_{\substack{{\bf 1},{\bf 2} \\{\bf 1}\neq{\bf 2}}}<br /> = <br /> \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:
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 :(
 
Yea, I am using ams-- in the preamble I've got \usepackage{amsmath} and \usepackage{amssymb}.

substack works in eqnarray for me...:confused:
 
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?
 
tom1985 said:
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?

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.
 
What programs do you guys use to draw figures to insert into LaTeX?
I only have crappy "paint" - not sure that will cut it.
 
  • #10
cristo said:
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.

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.

What programs do you guys use to draw figures to insert into LaTeX?

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.
 
  • #11
AlephZero said:
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.

Thanks, that makes sense now!

tom1985 said:
What programs do you guys use to draw figures to insert into LaTeX?
I only have crappy "paint" - not sure that will cut it.

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!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 20 ·
Replies
20
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K