Displaying equations using Tex

Discussion in 'Physics & Math' started by Pete, Dec 20, 2006.

  1. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    Yes. I wasn't sure about that until I tried, and I was glad to see that it ignores the layout.
    It makes coding continued fractions (and matrices, and other layered equations) much easier.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Steve100 O͓͍̯̬̯̙͈̟̥̳̩͒̆̿ͬ̑̀̓̿͋ͬ ̙̳ͅ ̫̪̳͔O Valued Senior Member

    Messages:
    2,346
    \(There \hspace{3} has \hspace{3} to \hspace{3} be \hspace{3} a \hspace{3} better \hspace{3} way \hspace{3} of \hspace{3} doing \hspace{3} spaces \hspace{3} than \hspace{3} this.\)

    Code:
    There \hspace{3} has \hspace{3} to \hspace{3} be \hspace{3} a \hspace{3} better \hspace{3} way \hspace{3} of \hspace{3} doing \hspace{3} spaces \hspace{3} than \hspace{3} this.
    \(\mbox{Never mind, found one. You use an "mbox" function.}\)

    Code:
    \mbox{Never mind, found one. You use an "mbox" function.}
    \(You \ can \ also \ use \ a \ single \ backslash \ for \ a \ space. \\ And \ a \ double \ backslash \ for \ a \ linebreak \ if \ you \ don't \ want \ to \ use \ the \ mbox \ function.\)

    Code:
    You \ can \ also \ use \ a \ single \ backslash \ for \ a \ space. \\ And \ a \ double \ backslash \ for \ a \ linebreak \ if \ you \ don't \ want \ to \ use \ the \ mbox \ function.
    \(\fbox{\mbox{You can also make your text framed by using an "fbox", like this.}}\)

    Code:
    \fbox{\mbox{You can also make your text framed by using an "fbox", like this.}}
    Hope all that helps someone.
     
    Last edited: Oct 10, 2008
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    *bump*
    This thread is linked in the subforum FAQ, but the FAQ isn't stickied any more (what happened?)

    Perhaps this thread could be stickied on its own?
    I don't think the Alpha rules threads are used any more, so they could maybe be unstickied if the top area is feels cluttered.

    Anyway... having some difficulties with formatting. According to the tutorial page, this:
    \displaystyle f(x)=\int_{-\infty}^x e^{-t^2}dt​
    ...should render as:

    Please Register or Log in to view the hidden image!



    , but instead, I get:

    \(\displaystyle f(x)=\int_{-\infty}^x e^{-t^2}dt\)

    Not quite the same... see the position of the integral bounds?
    The \displaytyle tag seems to do nothing.

    It's not a big problem, but it makes this look a bit clunky:

    \(\begin{align} \frac{25x^2}{9}+y^2 &= 25 \\ (dc')^2 &= (dx)^2 + (\frac{dy}{\gamma})^2 \\ c' &= 4\int_{x=0}^{x=3}dc' \end{align}\)

    btw... to align equations like that, do this:
    Code:
    \begin{align}
    ... &= ... \\
    ... &= ... \\
    ... &= ...
    \end{align}
    The double backslashes mark a new line, and the ampersands tell it where to align each line.
     
    Last edited: Jul 11, 2011
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    Got it. The details of where the limits go seem to be in the details of the implementation, but \displaystyle is the default style which is why it doesn't seem to do anything.

    To explicitly dictate where the bounds or limits go, put \limits or \nolimits immediately after the \int, \sum, or whatever:

    \int\limits_0^1 gives: \(\int\limits_0^1\)

    \int\nolimits_0^1 gives: \(\int\nolimits_0^1\)
     
  8. Fudge Muffin Fudge Muffin Registered Senior Member

    Messages:
    148
  9. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    Can we sticky this thread?

    Reminder to self: how to do limits

    \lim_{n \rightarrow \infty }

    \(\lim_{n \rightarrow \infty }\)

    \lim_{n \rightarrow infty \\ m \rightarrow 0}

    \(\lim_{n \rightarrow \infty \\ m \rightarrow 0}\)
     
    Last edited: Oct 24, 2011
  10. prometheus viva voce! Registered Senior Member

    Messages:
    2,045
    Certainly!

    Please Register or Log in to view the hidden image!

     
  11. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    Thanks!
     
  12. jonathan8940 Registered Member

    Messages:
    1
    Math is my favorite subject. I love to read this subject.
     
  13. Trooper Secular Sanity Valued Senior Member

    Messages:
    1,784

    Please Register or Log in to view the hidden image!

    :deal: The grass is always greener.

    Please Register or Log in to view the hidden image!

    I'm not judgin'...I'm just sayin'
     
  14. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    Fun fact!
    You can make simple diagrams in tex using the \picture tag.
    In a picture tag, you can place any tex element at a specific location, and draw lines and circles/ellipses/arcs.
    Check the picture section of the mimetex manual

    Example 1:
    \picture(100) {
    (50,50){\circle(99)} %%head%%
    (20,55;50,0;2){\fs{+1}\hat\bullet} %%eyes%%
    (50,40){\bullet} %%nose%%
    (50,35){\circle(50,25;34)} %%upper lip%%
    (50,35){\circle(50,45;34)} %%lower lip%% }
    \(\picture(100) { (50,50){\circle(99)} %%head%% (20,55;50,0;2){\fs{+1}\hat\bullet} %%eyes%% (50,40){\bullet} %%nose%% (50,35){\circle(50,25;34)} %%upper lip%% (50,35){\circle(50,45;34)} %%lower lip%% }\)​

    Example 2:
    \picture(600,100){
    %% Number line %%
    (0,50){\line(600,0)}
    (50,40;100,0;6){\line(0,15)}
    (c50,30){0}
    (c150,30){10}
    (c250,30){20}
    (c350,30){30}
    (c450,30){40}
    (c550,30){50}

    %% Data points %%
    (c110,60){\bullet}
    (c170,60){\bullet}
    (c200,60){\bullet}
    (c230,60){\bullet}
    (c290,60){\bullet}

    %% Mean %%
    (200,45){\line(0,-10)}
    (200,45){\line(-3,-5)}
    (200,45){\line(3,-5)}
    (c200,25){\small{\textit{mean}}}

    %% Standard deviation %%
    (140,75){\line(120,0)}
    (140,75){\line(5,3)}
    (140,75){\line(5,-3)}
    (260,75){\line(-5,3)}
    (260,75){\line(-5,-3)}
    (c200,85){\small{\textit{standard deviation}}}
    }
    \( \picture(600,100){ %% Number line %% (0,50){\line(600,0)} (50,40;100,0;6){\line(0,15)} (c50,30){0} (c150,30){10} (c250,30){20} (c350,30){30} (c450,30){40} (c550,30){50} %% Data points %% (c110,60){\bullet} (c170,60){\bullet} (c200,60){\bullet} (c230,60){\bullet} (c290,60){\bullet} %% Mean %% (200,45){\line(0,-10)} (200,45){\line(-3,-5)} (200,45){\line(3,-5)} (c200,25){\small{\textit{mean}}} %% Standard deviation %% (140,75){\line(120,0)} (140,75){\line(5,3)} (140,75){\line(5,-3)} (260,75){\line(-5,3)} (260,75){\line(-5,-3)} (c200,85){\small{\textit{standard deviation}}} }\)​
     
  15. Trooper Secular Sanity Valued Senior Member

    Messages:
    1,784
    \(\nabla_\ uT^{\mu\nu}=0\\)

    Just trying it out...

    Please Register or Log in to view the hidden image!

     
  16. Beer w/Straw Transcendental Ignorance! Valued Senior Member

    Messages:
    6,549
    \(\\frac{\alpha ^e \infty ^{1/\mu }}{\frac{\pi }{e}}\leq \int_{\psi }^{\sigma } \zeta \, d\gamma\)

    \(\Large \frac{\alpha ^e \infty ^{1/\mu }}{\frac{\pi }{e}}\leq \int_{\psi }^{\sigma } \zeta \, d\gamma\)

    Makes perfect sense!

    \(\\frac{(2.54 \text{cm}) (5280 \text{ft}) (12 \text{in}) \text{km} m \text{mi}}{(100 \text{cm}) \text{ft} \text{in} (1000 m) \text{mi}}\)

    \(\Large \frac{(2.54 \text{cm}) (5280 \text{ft}) (12 \text{in}) \text{km} m \text{mi}}{(100 \text{cm}) \text{ft} \text{in} (1000 m) \text{mi}}\)
     
    Last edited: Mar 21, 2013
  17. Tach Banned Banned

    Messages:
    5,265
    you mean :


    \(\frac{\alpha ^e \infty ^{1/\mu }}{\frac{\pi }{e}}\leq \int_{\psi }^{\sigma } \zeta \, d\gamma\)
     
  18. eram Sciengineer Valued Senior Member

    Messages:
    1,877

    That looks like a demented ear-less Mickey.

    Please Register or Log in to view the hidden image!



    Pretty cool.
     
  19. ash64449 Registered Senior Member

    Messages:
    795
    \(\frac{T}{\tau}=\frac{1}{\sqrt{1-\frac{v^2}{c^2}}}\)


    \({T}=\frac{\tau}{\sqrt{1-\frac{v^2}{c^2}}}\)
     
  20. ash64449 Registered Senior Member

    Messages:
    795
    \(\mbox{ i really like using this!!}\)
     
  21. ash64449 Registered Senior Member

    Messages:
    795
    \( v=u+at \)
    \( x_t(A) \)
     
  22. Wojciech Registered Member

    Messages:
    1
    You may be interested to try different LaTeX in a WYSIWYG environment right here:
    equationmap.com
     
  23. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    Problem:
    The forum software adds an untyped space after 50 consecutive non-whitespace characters starting with a backslash (except in
    Code:
     blocks?):
    \123456789012345678901234567890123456789012345678901234567890
    
    This can cause problems with tex:
    [code]\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda
    \(\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\)

    Solution: Add whitespace.
    Code:
    \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda
    \(\lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda \lambda\)
     

Share This Page