2

I should preface that I discovered LaTeX a few hours ago but I've googled and searched the documentation and haven't found an answer. Here is the line I've written

Question 1: $\int \frac{x-3}{x^2-6x+5} \mathrm{d}x$

When I compile and view as a pdf, the equation has shrunk to fit the sentence and it's difficult to make out because it's so small. Is there a way I can have the equation and text on the same line while having an equation that's the same size as if I used:

\begin{equation}
\int \frac{x-3}{x^2-6x+5} \mathrm{d}x
\end{equation}

?

Masroor
  • 17,842

1 Answers1

3

There is also an intermediate solution with the nccmath package, which defines medium sized mathematics. These medium sized formulae do not have the same effect on interlinespacing as \displaystyle, and usually have none if this spacing is globally slightly increased with the \setstretch{…}command from the setspacepackage. Compare with this code:

    \documentclass[12pt]{article}
    \usepackage{mathtools}

   \usepackage{nccmath} 

    \newcommand{\dd}{\,\mathrm{d}}
    \newcommand{\mint}{\medint\int}

    \begin{document}

    Let's compute  $ \int\! \frac{x-3}{x^2-6x+5} \dd x $  or  $ \mint\! \mfrac{x-3}{x^2-6x+5}  \dd x$  or even $\displaystyle \int \!\frac{x-3}{x^2-6x+5}\dd x$. 

    \end{document} 

enter image description here

Bernard
  • 271,350
  • Cool, this is just what I was looking for. Thanks! – user47989 Mar 15 '14 at 02:12
  • The package can also be interesting in displayed formulae, e.g. when you have a factor 1/2 in front of an expression: often you do not want it in displaystyle, but textstyle is really too small. In such a case, \mfrac{1}{2} is a good solution. – Bernard Mar 15 '14 at 02:24
  • @user47989: Before you start using nccmath too much in your code I thought I'd refer you to: Is there a replacement for nccmath?. I was using nccmath for a while but then abandoned it due to the problems listed in that question. – Peter Grill Mar 15 '14 at 05:51
  • @Peter Grill; Iwasn't awware of those problems – I must say I almost never use minipage. To my eyes, the most interesting feature is the possibility of medium sized mathematics, and to a lesser extent, the \useshortskip command. Unfortunately, mathtools (which should be recommanded rather than the bare amsmath, in my opinion) doesn't have these features. – Bernard Mar 15 '14 at 10:22