LaTeX Tip: Displaystyle with Bigger Expressions

  • LaTeX
  • Thread starter alexmahone
  • Start date
  • Tags
    Latex
In summary: Here's an example: }\:\int^5_3\frac{x^2-4}{x-2}\,dx$To produce the large integral sign, I used \displaystyle.. . It also produced the large fraction.. . $\displaystyle \int^5_3\frac{(x-2)(x+2)}{x-2}\,dx \;=\;\int^5_3(x+2)\,dx \;=\;\frac{1}{2}x^2 + 2x\,\bigg]^5_3 $To me, the $\dfrac{
  • #1
alexmahone
304
0
Use \displaystyle in the beginning for bigger expressions.

Normal: $\sum\frac{n^5}{2^n}$

Using \displaystyle: $\displaystyle\sum\frac{n^5}{2^n}$
 
Physics news on Phys.org
  • #2
Alexmahone said:
Use \displaystyle in the beginning for bigger expressions.

Normal: $\sum\frac{n^5}{2^n}$

Using \displaystyle: $\displaystyle\sum\frac{n^5}{2^n}$

We had this same issue on MHF as well.
 
  • #3
Alexmahone said:
Use \displaystyle in the beginning for bigger expressions.

Normal: $\sum\frac{n^5}{2^n}$

Using \displaystyle: $\displaystyle\sum\frac{n^5}{2^n}$

The thing is that single dollar sign delimiters $\displaystyle \frac{x}{y}$ are for in-line maths-notation, making it larger means that the maths will foul the text in following lines.
Or make the line spacing irregular, though you have too keep typing for a long time to get test wrapping to test this
 
  • #4

More uses for \displaystyle . . .\lim{x\to3}\frac{x^2-9}{x-3} . . . . . . . . . . . . . $\lim_{x\to3}\frac{x^2-9}{x-3}$

\displaystyle \lim_{x\to3}\frac{x^2-9}{x-3} . . . $\displaystyle \lim_{x\to3}\frac{x^2-9}{x-3} $sum^{\infty}_{n=1}\frac{1}{n^2} . . . . . . . . . . . . . $\sum^{\infty}_{n=1} \frac{1}{n^2}$

\displaystyle \sum^{\infty}_{n=1}\frac{1}{n^2} . . . $\displaystyle \sum^{\infty}_{n=1}\frac{1}{n^2}$\int^3_1 x^2\,dx . . . . . . . . . . . . $\int^3_1 x^2\,dx $

\displaystyle \int^3_1 x^2\,dx . . . $\displaystyle \int^3_1 x^2\,dx$
If \displaystyle makes a fraction too large:

. . \displaystyle \frac{x-3}{x+4} + \frac{1}{2}x^3 . . . . $\displaystyle \frac{x-3}{x+4} +\frac{1}{2}x^3$

it can be reduced with \tfrac:

. . \displaystyle \frac{x-3}{x+4} + \tfrac{1}{2}x^3 . . . $\displaystyle \frac{x-3}{x+4} + \tfrac{1}{2}x^3$
 
  • #5
soroban said:
If \displaystyle makes a fraction too large:

. . \displaystyle \frac{x-3}{x+4} + \frac{1}{2}x^3 . . . . $\displaystyle \frac{x-3}{x+4} +\frac{1}{2}x^3$

it can be reduced with \tfrac:

. . \displaystyle \frac{x-3}{x+4} + \tfrac{1}{2}x^3 . . . $\displaystyle \frac{x-3}{x+4} + \tfrac{1}{2}x^3$

If you want to displaystyle fractions, it's easier to use the \dfrac{}{} command.

\frac{x+1}{x-1} yields $\frac{x+1}{x-1}$, but \dfrac{x+1}{x-1} yields $\dfrac{x+1}{x-1}$

So in the example you provided, we could say \dfrac{x-3}{x+4} +\frac{1}{2}x^3, which would give $\dfrac{x-3}{x+4}+\frac{1}{2}x^3$ (thus, \tfrac{}{} can be avoided in the inline case). I would say that the \tfrac{}{} option is most useful in scenarios when the rendered code is centered by $$ or \[ (the cases where the equations are automatically displaystyled).
 
  • #6
Hello, Chris L T521!

I did know all that . . . and didn't get around to explain it,
. . but thanks for clarifying it.I intended the \tfrac feature to be used when \displaystyle must be used.$\displaystyle \text{Here's an example: }\:\int^5_3\frac{x^2-4}{x-2}\,dx$

To produce the large integral sign, I used \displaystyle.
. . It also produced the large fraction.

. . $\displaystyle \int^5_3\frac{(x-2)(x+2)}{x-2}\,dx \;=\;\int^5_3(x+2)\,dx \;=\;\frac{1}{2}x^2 + 2x\,\bigg]^5_3 $To me, the $\dfrac{1}{2}$ seems awkwardly large (but maybe that's just me).
. . I would use \tfrac here.
 

FAQ: LaTeX Tip: Displaystyle with Bigger Expressions

What is displaystyle in LaTeX?

Displaystyle is a command in LaTeX that allows for the display of mathematical expressions in a larger, more prominent size. It is particularly useful for equations that contain fractions, limits, or summations.

How do I use displaystyle in LaTeX?

To use displaystyle, simply enclose the mathematical expression you want to display in larger size within the \displaystyle command. For example, typing \displaystyle\frac{1}{2} will display the fraction 1/2 in a larger size.

Can I use displaystyle for other types of expressions besides fractions?

Yes, you can use displaystyle for other types of expressions such as limits, integrals, and summations. Simply enclose the expression within the \displaystyle command to display it in a larger size.

How do I make the displaystyle size even bigger?

If you want the displayed expression to be even bigger, you can use the \dfrac command instead of \frac. This will create an even larger fraction. Alternatively, you can use the \displaystyle command twice, as in \displaystyle\displaystyle\frac{1}{2}, to create an even larger display size.

Can I use displaystyle within other environments in LaTeX?

Yes, you can use displaystyle within other environments such as align, equation, and array. This will allow you to display larger expressions within these environments. However, be careful not to use displaystyle within inline math mode, as it may cause spacing issues.

Similar threads

Replies
4
Views
952
Replies
1
Views
2K
Replies
8
Views
2K
Replies
8
Views
2K
Replies
3
Views
3K
Replies
1
Views
1K
Replies
5
Views
3K
Replies
3
Views
2K
Back
Top