I am newbie to Latex and I am just making some lists of some common commands and learning the syntax.
This is what I have at the end of my first page.
using left and right bracketing commands\\
$$3\left(\frac{2}{5}\right)$$
$$3\left[\frac{2}{5}\right]$$
$$3\left\{\frac{2}{5}\right\}$$
This produces three lines. On the first line is my comment. On the second and third line are the examples with parentheses and square brackets. But then the third example is output to the second page.
I have found the \nopagebreak and tried applying that. But I can't make it work.
using left and right bracketing commands\\
$$3\left(\frac{2}{5}\right)$$
$$3\left[\frac{2}{5}\right]$$
\nopagebreak $$3\left\{\frac{2}{5}\right\}$$
The last part still jumps to the second page. I'm not sure... should the \nopagebreak command sit on the same line in the code like that?
I tried placing it at the end, in front, and at the beginning of this paragraph (in the code). I also tried setting the argument to 4 to insist on preventing page break. Like \nopagebreak[4]. But that didn't help.
So how do I prevent page break at this point?
There is page number indicator (index) that sits in the foot of the page. This sits very high up on the page. So there is actually some real estate here, where the last example could sit, if Latex could only make the foot note margin smaller on all or for the current page, just somehow move the number in the foot note down a little.
So I'm curious why this is not working out for me. I can post a screenshot if that helps.
Edit 1: Here's a screenshot.

You can see how high up that number one is. There is more than enough space there to place both the fraction example and the page index.
Edit 2: Here is the whole working example.
\documentclass[11pt]{article}
\begin{document}
bracketing symbols;
parenthesis;
$$(x+1)$$
square brackets;
$$3[2+(x+1)]$$
curly brackets;\\
these are reserved symbols for coding in Latex\\
they are therefore normally not displayed
$${a,b,c}$$
so to display curly brackets in math mode\\
there needs to be a back slash in front\\
of each bracket
$$\{a,b,c\}$$
dollar sign;\\
the same is true for dollar sign\\
dollar signs are reserved to indicate\\
math mode in Latex\\
so to display a dollar sign in math mode\\
there needs to be a back slash in front of it
$$\$12.55$$
adjusting bracketing symbols to the height\\
of tall objects like fractions;
typing in only the bracket signs\\
$$3(\frac{2}{5})$$
$$3[\frac{2}{5}]$$
$$3\{\frac{2}{5}\}$$%curly brackets require an additional back slash
using left and right bracketing commands\\
$$3\left(\frac{2}{5}\right)$$
$$3\left[\frac{2}{5}\right]$$
\nopagebreak $$3\left\{\frac{2}{5}\right\}$$
\end{document}
As you can see here I do have a document class and a begin and end command. In case you thought I forgot those.
\nopagebreakis a polite request. TeX is free to do as it damn well pleases if its algorithm determines that preventing a page break there would lead to too high "badness" – kahen Mar 29 '13 at 13:15\\before displayed math, it sounds like your page layout is wrong, have you specifieda4paperif you are using A4 (the default layout is US letter paper) or you could increase\textheightin the preamble or better use thegeometrypackage. It is always worth posting a complete (small) document that shows the problem. – David Carlisle Mar 29 '13 at 13:23\\not allowed? The format is A4, I remember choosing that option when I installed MikTex. Should I change that to Letter? – Samir Mar 29 '13 at 14:13nopagebreaksit on the same line like this\nopagebreak $$3\left\{\frac{2}{5}\right\}$$? – Samir Mar 29 '13 at 14:15LaTeXbeginners' guides recommend the use of double dollar signs? – Ian Thompson Mar 29 '13 at 14:29[a4paper]. You should generally avoid explicit spacing because the document class defines the spacing between the logical units of a document and putting explicit spaces defeats that, but especially\\is almost always a mistake and a blank line should be used instead. – David Carlisle Mar 29 '13 at 14:33\\). TeX doesn't care whether you use newlines or spaces in your source they are generally all treated as spaces. – David Carlisle Mar 29 '13 at 15:16