Facebook Page
Twitter
Welcome to Math Help Boards, Guest!
If this is your first visit, be sure to check out the FAQ for any questions you have. You will have to register before you can post: Register Today. To start viewing messages, select the forum that you want to visit from the selection below.
Results 1 to 6 of 6
Thanks Tree6Thanks
  • 1 Post By Alexmahone
  • 1 Post By CaptainBlack
  • 2 Post By soroban
  • 1 Post By Chris L T521
  • 1 Post By soroban

LaTeX tip: displaystyle

This is a discussion on LaTeX tip: displaystyle within the LaTeX Help forums, part of the MHB Help and Feedback category; Use \displaystyle in the beginning for bigger expressions. Normal: $\sum\frac{n^5}{2^n}$ Using \displaystyle: $\displaystyle\sum\frac{n^5}{2^n}$...

  1. MHB Craftsman
    Alexmahone's Avatar
    Users Flag!
    Status
    Offline
    Join Date
    Jan 2012
    Posts
    196
    Thanks
    98 times
    Thanked
    47 times
    #1
    Use \displaystyle in the beginning for bigger expressions.

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

    Using \displaystyle: $\displaystyle\sum\frac{n^5}{2^n}$
    Jameson thanked this.
    "Now I will have less distraction." -- Leonhard Euler upon losing the use of his right eye

  2. MHB Master

    Users Flag!
    Status
    Offline
    Join Date
    Feb 2012
    Posts
    1,216
    Thanks
    441 times
    Thanked
    271 times
    #2
    Quote Originally Posted by Alexmahone View Post
    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. MHB Journeyman

    Status
    Offline
    Join Date
    Jan 2012
    Posts
    932
    Thanks
    344 times
    Thanked
    1043 times
    #3
    Quote Originally Posted by Alexmahone View Post
    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
    Chris L T521 thanked this.

  4. MHB Craftsman

    Status
    Offline
    Join Date
    Feb 2012
    Location
    Lexington, MA, USA
    Posts
    131
    Thanks
    86 times
    Thanked
    499 times
    #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$
    Jameson and Sudharaka thanked this.

  5. アドミニストレータ
    Chris L T521's Avatar
    Users Flag!
    Status
    Online
    Join Date
    Jan 2012
    Location
    Santa Cruz, CA
    Posts
    472
    Thanks
    798 times
    Thanked
    953 times
    #5
    Quote Originally Posted by soroban View Post
    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).
    Jameson thanked this.

  6. MHB Craftsman

    Status
    Offline
    Join Date
    Feb 2012
    Location
    Lexington, MA, USA
    Posts
    131
    Thanks
    86 times
    Thanked
    499 times
    #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.
    Jameson thanked this.

Similar Threads

  1. Are there colors in latex?
    By Amer in forum LaTeX Help
    Replies: 4
    Last Post: May 30th, 2013, 21:31
  2. MHB Latex Guide PDF
    By Jameson in forum Announcements
    Replies: 0
    Last Post: May 30th, 2012, 16:29
  3. MHB Latex Guide PDF
    By Jameson in forum LaTeX Help
    Replies: 0
    Last Post: May 30th, 2012, 16:26
  4. More Latex
    By soroban in forum LaTeX Help
    Replies: 2
    Last Post: April 6th, 2012, 12:00
  5. [SOLVED] Latex not translating for me on IE9
    By masters in forum Questions, Comments, and Feedback
    Replies: 5
    Last Post: March 30th, 2012, 05:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Math Help Boards