0

enter image description here

The space between my equation is bothering me as it looks unnecessary. I have a feeling it is because of some formatting on latex that wants every page to end specifically at the last line of that page.

I'm a newbie at latex to be honest, so any help will be much appreciated. Preferably I'm looking for a simple code I can implement maybe after the equation...

Using sharelatex.com my the relevant chunk of my code is: \begin{problem}

La siguiente función representa una curva gaussiana

\begin{equation*}

f(r)=\frac{1}{\omega_o}\exp(-r^2/\omega_o^2)

\end{equation}

TEXT....
\includegraphics[width=\textwidth]{FC_t0_3'.png}

That piece of code was probably worthless so I add the URL of my document https://www.sharelatex.com/project/55d222b6f18581b035417efa so you can see for yourself. Note that I've used a matlab template.

Thanks.

DLV
  • 113
  • 2
    Do you think you would be able to come up with a MWE not knowing at least a few peculiarities of your document it is really hard to say something. See Avoid large spaces between text and equations – moewe Aug 22 '15 at 15:48
  • Okay, let me see what I can do about that. Sorry – DLV Aug 22 '15 at 15:50
  • 2
    It certainly comes from the float placement: all vertical spacings on the preceding page stetch so that the page has height equal to \textheight. If you set the \raggedbottom directive in your preamble, you will simply have a white space at the bottom of the page. You also can try to scale the figure so that it fits on the preceding page. Btw, do you really need to have the whole matlab window in your document? – Bernard Aug 22 '15 at 15:51
  • 1
    Do you add the figure with the [H] option? Don't. – Johannes_B Aug 22 '15 at 15:52
  • 1
    Yes, my best guess would have been the float as well. Depending on how the float is currently placed, one could let it float a bit more. In the end you could re-size the image, change the order of image and text a bit, re-write the text or something along those lines. – moewe Aug 22 '15 at 15:54
  • 1
    BTW (it might be my insufficient grasp of mathematic notation), but do you really mean x = y = [-5,5], that looks ... odd, to me you define both x and y to be intervals, while in r^2 = x^2+y^2 they look like (real) numbers. – moewe Aug 22 '15 at 15:56
  • I've added a little bit of my code (probably worthless) but I've also added a URL with all the code of my short document in case anyone wants to see. Meanwhile I'll try your ideas. – DLV Aug 22 '15 at 15:58
  • 1
    Oh, see, I think no-one expected you were actually adding that \includegraphics[width=\textwidth]{FC_t0_4.png} without any float environment. – moewe Aug 22 '15 at 15:59
  • 1
    The question is: What output would you find acceptable. You could probably make the entire problem 3 go to the next page. Letting the image go to the previous page is not going to happen: it is far too large for that. – moewe Aug 22 '15 at 16:03
  • 1
    @Bernard I do have to have the whole window. This is an introductory matlab hmwk, where I have to provide evidence of my work, hehe. @.moewe The notation just specifies I'll graph x and y on the same interval, at least thats what the context of the problem implies :). @.Bernard I think \raggedbottom has solved my problem. It looks crappy having that huge pagebrreak but I don't see any other option to be honest. – DLV Aug 22 '15 at 16:06
  • 1
    You could manually force a new page before "problem 3" via \clearpage, but that also has its drawbacks. – moewe Aug 22 '15 at 16:07
  • 1
    Re your notation: Aha, I would have thought $x,y \in [-5,5]$ might work in that case? – moewe Aug 22 '15 at 16:09
  • 1
    Maybe I'll add some ramblings to make some space :P . If any of you wants to post the answer I'll be glad to accept. If you suggest I delete this simple question It'll be fine by me as well. Thanks again. – DLV Aug 22 '15 at 16:09
  • @moewe I guess it could work. The thing is I'm just copying the problem my teacher gave verbatim. – DLV Aug 22 '15 at 16:10
  • 1
    Mhhh, I would say it is more or less a duplicate of Avoid large spaces between text and equations. Also please look at the error messages you get in your document, sometimes you have a \begin{equation*} ending with \end{equation} (note the missing *). – moewe Aug 22 '15 at 16:11
  • 1
    Well in that case, you better back off from changing anything. – moewe Aug 22 '15 at 16:12
  • 1
    You will also find that your - signs in the vectors in line 32 and so on are actually evil unicode unary minuses and not normal -s that throws TeX off quite a bit, so much so that it gobbles those in the output! – moewe Aug 22 '15 at 16:15
  • 1
    Also note that is very rarely necessary to end lines with \\ yourself. Because you use non-floating images it might be necessary at times, but not all your \\ are justified. Those before equations can be dropped safely as well as the \\ after equations. If you want to start a new paragraph, leave an empty line. – moewe Aug 22 '15 at 16:21
  • 1
    Also look into \allowdisplaybreaks. – JPi Aug 22 '15 at 16:42

0 Answers0