Notices
Results 1 to 85 of 85
Like Tree5Likes
  • 2 Post By JaneBennet
  • 1 Post By Guitarist
  • 1 Post By Strange
  • 1 Post By Neverfly

Thread: TeX tutorial

  1. #1 TeX tutorial 
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    So a new feature has been implemented, called TeX. A new formatting button has also been added for it. So, some of you may ask, what is TeX, and how to use it? Okay, Ill try and explain. Suggestions, comments and corrections welcome.

    (i) What is TeX?
    TeX is a neat way of formatting mathematical equations and other expressions in posts by means of GIF or PNG images (in this forum its PNG). These images are compact and can be inserted in lines of text. Although it is mostly used in mathematics, it can also be used in other areas for example, in chemistry:
    (ii) How do I use TeX?
    Simply wrap your TeX expression in [tex] [/tex] tags. Notice that there is a new TeX formatting button available for this. For example, if you wrap
    • y=ax^2+bx+c
    in TeX tags, you get this:

    Neat, huh? Notice a couple of things:

    (1) The TeX formatter ignores spacing and single line breaks. It automatically parses your equation and inserts relevant spaces so you dont have to do it yourself. In the example above, there is a space before and after the = and before and after each +.

    (2) TeX follows typographical convention by formatting all variables in .

    (iii) What expressions can I type using TeX?
    In our example above, the caret symbol ^ is used to format superscript. Similarly the underscore _ is used to format subscript:
    • x^2 gives

      x_0 gives
    Note that only the character immediately following the ^ or _ is formatted. If you wish to format more than one character in super-/subscript, you must enclose the characters in braces { }. For example, if you type
    • x^12
    you would get
    If you mean x to the power of 12 instead, you must type x^{12}:
    • x^{12} gives

    The backslash \ generally precedes TeX commands. Here are a few examples of commonly typed expressions in TeX:
    • \frac{1}{2} gives

      \sqrt{2} gives

      \sqrt[3]{2} gives (NB: square brackets [ ] around the 3, braces { } around the 2)

      \alpha, \beta, \gamma, \delta etc give , , , etc

      \mathbb{Z}, \mathbb{Q}, \mathbb{R}, \mathbb{C} give
      , , ,
    It is important to note that all TeX commands are case-sensitive.


    Yash and Beaker like this.
    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Now suppose you want to type an expression like z = cos(x); + isin(x). If you simply wrap that expression in TeX tags, you would get this:
    Doesnt look pretty, does it? As Ive said, TeX will format all variables in italics; if you dont tell the formatter what youre doing, it will interpret what you type as variables by default. In the formula above, you dont really wnat your cos and sin to be in italics.

    Fortunately, there are special TeX commands to take care of common functions like sine and cosine. Simply type \cos and \sin:
    • z=\cos(x)+i\sin(x) gives
    Also, you might want to remove the brackets. But there is some minor thing to note here: if you type \cosx and \sinx, the formatter will try and parse these as TeX commands and youll end up with a TeX error as cosx and sinx arent valid TeX commands. To tell the formatter what to do, you have to insert a space before the x:
    • z=\cos x+i\sin x gives
    Although the formatter generally ignores spaces, so you dont generally need to type them, this is a case where the space is important: it serves to separate a TeX command from the variables you are using.

    TeX commands for other commonly used functions include \tan, \cot, \sec, \lim, \max, \min, \gcd, etc.


    Reply With Quote  
     

  4. #3  
    Moderator Moderator
    Join Date
    Jun 2005
    Posts
    1,612
    \in =

    \ni =

    \subseteq =

    \subset =

    \supseteq =

    \supset = Actually I generally prefer

    and its analogue

    \ne =

    \ge =

    \le =

    \to =

    \Rightarrow =

    f \cdot g =

    f \circ g =

    \times =

    \otimes =

    \oplus =

    \equiv =

    \cong =

    \mathcal{X} =

    \overline{X} =

    \hat{i} =

    \vec{v} =
    Beaker likes this.
    Reply With Quote  
     

  5. #4  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Useful TeX expressions in set theory:
    • x\in A gives

      A\subset B gives

      A\subseteq B gives

      A\cup B gives (union)

      A\cap B gives (intersection)

      A\times B gives (Cartesian product)

      f:A\to B gives
    There are two symbols for the empty set:
    • \emptyset gives

      \O gives
    I prefer the latter because not only is it easier to type, it also looks much nicer than the other one.

    To type the negation of a symbol, you can use the TeX command \not e.g.
    • x\not\in A gives

    To be continued

    [Oops, clash of posting with Guitarist. :P]
    Reply With Quote  
     

  6. #5  
    Moderator Moderator
    Join Date
    Jun 2005
    Posts
    1,612
    No worries! I learned something. I had never encountered \O = . Thanks.

    You can learn something too, Jane; \notin = , i.e. you don't need the extra slash.

    While I am here, let's all say a HUGE thanks to In(Sanity) for making this facility available.

    I mean it, man - I also think (hope) it will bring the truckers in for breakfast dinner and tea!
    Reply With Quote  
     

  7. #6  
    Forum Masters Degree bit4bit's Avatar
    Join Date
    Jul 2007
    Posts
    621


    Thanks IS...bout time I learned to use it properly
    Chance favours the prepared mind.
    Reply With Quote  
     

  8. #7  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Quote Originally Posted by Guitarist
    You can learn something too, Jane; \notin = , i.e. you don't need the extra slash.
    Thanks for the tip. I was howeer making the point that the command \not can be used in general cases, especially when the symbol to be negated is not in common use and so doesnt have its own TeX command: e.g. \not\cong = .

    On to more examples. (NB: \displaystyle is there only to improve the appearance of some TeX expressions; it can be omitted if you dont need to be overly neat in your TeX formatting. )
    • \{

      \}

      \sim

      \infty

      \displaystyle\sum_{n=1}^k a_n

      \displaystyle\prod_{n=1}^k a_n

      \displaystyle\bigcup_{\lambda\in\Lambda}C_\lambda

      \displaystyle\bigcap_{\lambda\in\Lambda}C_\lambda

      \int_a^b\sin x\:dx
    Notice the command \: in the last line? I use it to add a small space between the x and the dx otherwise the characters after the sin would be all bunched up together like this: , which isnt quite so neat. This brings us to this useful topic:

    Adding and removing spaces in TeX
    Although TeX parses what you type and adds relevant spaces, you can add extra spaces of your own. The command \, adds a small space, \: adds a slightly bigger space and \; adds a still slightly bigger space, while \ followed an ordinary space adds an ordinary-sized space:
    • a\,b

      a\:b

      a\;b

      a\ b
    To add a wide space, use \quad:
    • a\quad b
    And if youre a real precisionist, you can even specify exactly how wide you want your space to be by using \hspace followed by a precise measurement in curly brackets:
    • a\hspace{10mm}b
    Note however that these space commands will only work between characters in a TeX expression. They will be ignored if theyre used right at the beginning or right at the end of your expression.

    Now, what if you want to remove spaces in TeX? For example, if you type a+b in TeX, you get with a little space before and after the + sign. However, if you really want to bunch the three characters together without any spaces in between, then use \! before each space you want to remove:
    • a\!+\!b
    More to come. 8)
    Reply With Quote  
     

  9. #8  
    Suspended
    Join Date
    Apr 2008
    Posts
    2,178
    Is how I learned the formula for ammonia. I like it. I like it. Nice work.

    Sincerely,


    William McCormick
    Reply With Quote  
     

  10. #9  
    Forum Isotope (In)Sanity's Avatar
    Join Date
    Oct 2004
    Location
    Mesa AZ
    Posts
    2,697
    Quote Originally Posted by Guitarist
    No worries! I learned something. I had never encountered \O = . Thanks.

    You can learn something too, Jane; \notin = , i.e. you don't need the extra slash.

    While I am here, let's all say a HUGE thanks to In(Sanity) for making this facility available.

    I mean it, man - I also think (hope) it will bring the truckers in for breakfast dinner and tea!
    Welcome, sorry it took so long. I spent about 12 hours of my long weekend trying to get the thing working. It should have been about an hours work, but Murphy stepped in and made it about 12
    Pleased to meet you. Hope you guess my name
    Reply With Quote  
     

  11. #10  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Quote Originally Posted by William McCormick
    Is how I learned the formula for ammonia. I like it. I like it. Nice work.
    Not exactly, William. If you want the formula for ammonia, you should type this:
    • \mbox{NH}_3
    Well, Im glad to know youre enjoying TeX as well.

    And this brings us nicely to another topic:

    Text formatting in TeX
    TeX format raw letters of the alphabet in italics: wrapping the tags around abc de gives (with the space removed). Suppose you want regular font, no italics? Well, there are at least four ways of formatting regular font in TeX. One of them, as Ive used above, is the command \mbox. The others are \text, \textrm and \mathrm.
    • \mbox{abc de}

      \text{abc de}

      \textrm{abc de}

      \mathrm{abc de}
    Notice that the typed space is ignored in the last one, \mathrm. In fact, with \mathrm, the whole input is parsed like any TeX expression, with relevant spaces added and redundant spaces removed, the sole exception being that variables are not italicized. Example:
    • G=6.674\times10^{-11}\ \mathrm{m^3\:kg^{-1}\:s^{-2}} =
    With the other three, what you type is parsed as plain text. If you need to format a small amout of your text as a math or math-type expression, it is handy to enclose it within a pair of dollar ($) signs:
    • \textrm{Water is H$_2$O.}
    In a moment, we shall see that \mbox together with $ has a very special property of its own.

    To format TeX expressions in italics, use \textit or \mathit. Since letters of the alphabet are already formatted in italics by default, this will probably be used for formatting other characters, particularly numerals.
    • \textit{123 45}

      \mathit{123 45}
    Bold is \textbf and \mathbf.
    • \textibf{abc 123}

      \mathbf{abc 123}
    And with a bit of ingenuity, you can combine the two.
    • \textbf{$\textit{123 45}$}
    Finally, a word about \mbox{$$}. This has the property that it preserves the size of whatever it is formatting. Take an example: X^X gives . The superscripted X is slightly smaller than the other X. Suppose you want both Xs to be of the same size? Then use \mbox{$$}!
    • X^X

      X^\mbox{$X$}
    Note: the dollar signs can be omitted if only numerals are being formatted. This is particularly handy when you have fractions within a fraction and you dont want TeX to make things too small to be legible:
    • \frac{1}{1+\frac{1}{2}}
      \frac{\mbox{1}}{\mbox{$1+\frac{\mbox{1}}{\mbox{2}} }$}
    The down side, obviously, is that your expression can quickly become too complicated with too many mboxes, so this will probably be something youll only want to use occasionally.

    EDIT: Ive just learnt that with fractions, you can actually use \dfrac rather than \frac:
    • \dfrac{1}{1+\dfrac{1}{2}}
    Reply With Quote  
     

  12. #11  
    Forum Masters Degree bit4bit's Avatar
    Join Date
    Jul 2007
    Posts
    621
    Quote Originally Posted by JaneBennet
    Quote Originally Posted by William McCormick
    Is how I learned the formula for ammonia. I like it. I like it. Nice work.
    Not exactly, William. If you want the formula for ammonia, you should type this:
    • \mbox{NH}_3
    Well, I’m glad to know you’re enjoying TeX as well.
    Whats more, "" is not a valid molecular formula. It should be for nitrogen dioxide, for nitrous oxide (laughing gas), or for two moles of Nitric oxide.
    Chance favours the prepared mind.
    Reply With Quote  
     

  13. #12  
    Universal Mind John Galt's Avatar
    Join Date
    Jul 2005
    Posts
    14,169
    Irrelevant posts by William McCormick have been moved to the Chemistry section.
    Reply With Quote  
     

  14. #13  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Thanks Ophi!

    Williams off-topic posts, originally posted here, have been moved to here. So lets crack on here.

    Variable-sized brackets
    Consider this
    • (x-1)(\dfrac{1}{x-2)+\dfrac{1}{x-3})

    The first pair of brackets are fine, but the second pair look funny: theyre a bit too small! To rectify the problem, use the commands \left and \right.
    • (x-1)\left(\dfrac{1}{x-2)+\dfrac{1}{x-3}\right)

    \left and \right can also be used with square brackes [ and ], angle brackets < and > and curly brackets \{ and \} (note that you need a backslash for curly brackets); they also work with the pipe |.

    You can even use one or other of them on its own (use \left\. if you dont want the left bracket to show).
    • y=\left\{\begin{array}{ll}1&x\ge0\\0&x<0\end{array }




      \left.\begin{array}{c}ax+by=0\\cx+dy=0\end{array}\ right\}

    Which introduces this gadget \begin{array}. Thats the tool used for doing matrices but well leave it for next time.
    Reply With Quote  
     

  15. #14  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Arrays and tables
    This is going to be the most complicated of all the things discussed in this tutorial so far, so pay attention.

    Here is a sample matrix:
    • \left(
      \begin{array}
      {rcl}
      1 & 2 & 3 \\
      11 & 22 & 33 \\
      111 & 222 & 333
      \end{array}
      \right)



    I have added spaces and linebreaks to help you see better whats going on. When you type the code yourself, you can ignore some or all of the spaces and linebreaks. Basically, you follow these steps:

    Step 1: Type \begin{array} to start.

    Step 2: Specify the number of columns and alignment of text within each column. This is done by typing l, r and/or c within curly brackets { and }; l = left, r = right, c = centred. The number of l/r/cs will be the number of columns in your array.

    In the example above, there are three columns: text is right-aligned in the first column, centre-aligned in the middle column, and left-aligned in the third column.

    Step 3: Type the first row of your array, separating the contents of different columns with an ampersand &. If you have N columns, there should N−1 &s. You can type {} for a blank cell in a column of your row.

    Step 4: If you have another row to enter, type \\ (double backslash). You can type \\\\ (double double backslash) for a bigger line spacing, \\\\\\ for an even bigger line spacing, etc. The number of backslashes should always be even.

    Step 5: Type \end{array} to finish.

    You can enclose an array in brackets. Use \left and \right with the type of brackets you want to use; you can also use the pipe | to enclose an array within vertical lines:
    • \left|
      \begin{array}{cc}a & b\\c & d\end{array}
      \right|
      =ad-bc



    The array method can also be used to build tables. In a table, you may often want to separate columns and/or rows with lines.

    (i) To separate adjacent columns with a vertical line, use the pipe | in Step 2 in the instructions for doing an array above.
    (ii) To separate adjacent rows with a horizontal line, type \hline after \\ in Step 4 above.

    The following example (a table of the multiplication of the nonzero integers modulo 5) will demonstrate how its done.
    • \begin{array}
      {c|cccc}
      \times_5 & 1 & 2 & 3 & 4 \\
      \hline
      1 & 1 & 2 & 3 & 4 \\
      2 & 2 & 4 & 1 & 3 \\
      3 & 3 & 1 & 4 & 2 \\
      4 & 4 & 3 & 2 & 1
      \end{array}



    Reply With Quote  
     

  16. #15  
    Moderator Moderator
    Join Date
    Jun 2005
    Posts
    1,612
    For straightforward matrices, the following is a nice shortcut:

    \begin{pmatrix}
    a & b &c\\
    d & e & f\\
    g & h & i
    \end{pmatrix}

    Giving

    I believe, though I haven't checked, that bmatrix uses [ ] as delimiters, Bmatrix uses { } and vmatrix uses | |
    Reply With Quote  
     

  17. #16  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Quote Originally Posted by Guitarist
    For straightforward matrices, the following is a nice shortcut:

    \begin{pmatrix}
    a & b &c\\
    d & e & f\\
    g & h & i
    \end{pmatrix}

    Giving

    I believe, though I haven't checked, that bmatrix uses [ ] as delimiters, Bmatrix uses { } and vmatrix uses | |
    Wow, thats neat! Thanks! :-D
    Reply With Quote  
     

  18. #17  
    Forum Freshman Inevidence's Avatar
    Join Date
    Jul 2008
    Posts
    55


    That's cool, although I have no use for it at all, having studied mathematics nor chemistry.

    Still though, that's cool. *nod*
    The wonderful thing about escalators is that they cannot break. They can only become stairs.
    Reply With Quote  
     

  19. #18  
    Forum Sophomore
    Join Date
    Jul 2007
    Location
    South Africa
    Posts
    196
    What is the TeX command for inserting a short graphics file?
    It also matters what isn't there - Tao Te Ching interpreted.
    Reply With Quote  
     

  20. #19  
    Forum Freshman Faldo_Elrith's Avatar
    Join Date
    Jul 2008
    Posts
    76
    There is probably a TeX command to insert graphics (\insertgraphics or something like that) but I don't think you can do it on the forum. You don't have to anyway, you can just use the IMG tag.
    Reply With Quote  
     

  21. #20  
    Moderator Moderator AlexP's Avatar
    Join Date
    Jul 2006
    Location
    NY
    Posts
    1,838
    Quote Originally Posted by Inevidence


    That's cool, although I have no use for it at all, having studied mathematics nor chemistry.

    Still though, that's cool. *nod*
    The 'm' and 'c' should be lower case. Sorry, had to say it.
    "There is a kind of lazy pleasure in useless and out-of-the-way erudition." -Jorge Luis Borges
    Reply With Quote  
     

  22. #21  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Heres another handy shortcut alternative to the {array} format.
    • |x|=
      \begin{cases}
      x & \mbox{if}\ x \ge 0 \\
      -x & \mbox{if}\ x < 0
      \end{cases}


    This automatically adds a left brace for you, so you dont have to do it yourself. :-D Note that all column contents are left-aligned in this procedure.
    Reply With Quote  
     

  23. #22  
    Forum Freshman Inevidence's Avatar
    Join Date
    Jul 2008
    Posts
    55
    Quote Originally Posted by Chemboy
    Quote Originally Posted by Inevidence


    That's cool, although I have no use for it at all, having studied mathematics nor chemistry.

    Still though, that's cool. *nod*
    The 'm' and 'c' should be lower case. Sorry, had to say it.
    Fixed >.>
    The wonderful thing about escalators is that they cannot break. They can only become stairs.
    Reply With Quote  
     

  24. #23  
    Moderator Moderator AlexP's Avatar
    Join Date
    Jul 2006
    Location
    NY
    Posts
    1,838
    Quote Originally Posted by Inevidence
    Quote Originally Posted by Chemboy
    Quote Originally Posted by Inevidence


    That's cool, although I have no use for it at all, having studied mathematics nor chemistry.

    Still though, that's cool. *nod*
    The 'm' and 'c' should be lower case. Sorry, had to say it.
    Fixed >.>
    haha. thanks. just picking on you though, of course.
    "There is a kind of lazy pleasure in useless and out-of-the-way erudition." -Jorge Luis Borges
    Reply With Quote  
     

  25. #24  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    \dfrac{-b +- \sqrt{b^2 - 4ac}}{2a} gives

    but how do I display + or - correctly?

    is there a good webpage with these commands listed on it?
    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  26. #25  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    • \pm x

    Reply With Quote  
     

  27. #26  
    Forum Masters Degree bit4bit's Avatar
    Join Date
    Jul 2007
    Posts
    621
    Is there a way to display text directly above or underneath a symbol or expression? e.g. like the upper and lower bounds of an integral? I know you can have superscript/subscript, but what about completely above/below?

    Is it using display style?
    Chance favours the prepared mind.
    Reply With Quote  
     

  28. #27  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Like this?
    • \underbrace{1+2+3}_{6}+\overbrace{4+5+6}^{15}

    Reply With Quote  
     

  29. #28  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Quote Originally Posted by bit4bit
    e.g. like the upper and lower bounds of an integral?
    Aha.

    • \int \limits_{a}^{b} f(x)\,dx

      \displaystyle \int \limits_{a}^{b} f(x)\,dx






    More interesting stuff here: http://latex.wikia.com/wiki/Main_Page 8)
    Reply With Quote  
     

  30. #29  
    Moderator Moderator
    Join Date
    Jun 2005
    Posts
    1,612
    For stylistic purposes, e.g. inline formulae, you can also have

    \int \nolimits^a_b f(x)\, dx



    (Notice, btw, that curly braces are not required for single sub/super-scripts)
    Reply With Quote  
     

  31. #30  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    Is this the best way to write a limit?

    \lim_{x \to \dfrac{10}{2}} x^2 = 25
    gives


    Wow, that looks bad.
    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  32. #31  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Quote Originally Posted by Demen Tolden
    Is this the best way to write a limit?

    \lim_{x \to \dfrac{10}{2}} x^2 = 25
    gives


    Wow, that looks bad.
    Type \displaystyle in front of the whole formula (and use \frac rather than \dfrac):

    • \displaystyle \lim_{x \to \frac{10}{2}} x^2 = 25

    Reply With Quote  
     

  33. #32  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    I am having trouble trying to find a symbol for "change of"



    and is there a symbol that is a "v" or an "a" with a line over it? I believe it means average velocity or average acceleration.
    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  34. #33  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    • \Delta f_x


    • \overline{v}

    Reply With Quote  
     

  35. #34  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    Thanks a lot Jane, but I have a tough one. How about the greater integer function?
    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  36. #35  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Which one? Theres the ceiling function
    • \lceil x \rceil

    and theres the floor function
    • \lfloor x \rfloor

    Reply With Quote  
     

  37. #36 absolute value 
    . DrRocket's Avatar
    Join Date
    Aug 2008
    Posts
    5,486
    Question. How does one show an absolute value in TEX ? I have been able to get by with a copy and paste, but cannot find a key on my keyboard that produces a vertical line within a TEX expression. TEX seems to turn a small "l" into .
    Reply With Quote  
     

  38. #37  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    Use the pipe symbol: | (which should be located above the backslash on both UK and US qwerty keyboards).

    • |x|

    Reply With Quote  
     

  39. #38  
    . DrRocket's Avatar
    Join Date
    Aug 2008
    Posts
    5,486
    Quote Originally Posted by JaneBennet
    Use the pipe symbol: | (which should be located above the backslash on both UK and US qwerty keyboards).

    • |x|

    Reply With Quote  
     

  40. #39  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    One really nice thing I've recently learned about TeX is that you can copy your TeX and paste in into Microsoft Word with a simple Control C / Control V. No extra set up is really necesary. Pretty nifty for those physics papers!
    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  41. #40  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    How might one type P = F "dot" v, as in a scalar product or dot product?

    I see I could use \cdot, but that looks very small.



    but I guess its good enough.

    What about vector lines above F and v?

    Note:
    I've found that \vector makes an unreasonable amount of black space in a post.
    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  42. #41  
    Forum Ph.D.
    Join Date
    Apr 2008
    Posts
    956
    P = \vec{F} \centerdot \vec{v}

    Reply With Quote  
     

  43. #42  
    Forum Freshman
    Join Date
    Oct 2008
    Posts
    33
    okey,I try this,maybe it should be edited by:P = \vec{F} \centerdot \vec{v}
    Reply With Quote  
     

  44. #43  
    Forum Sophomore oceanwave's Avatar
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    113
    Quote Originally Posted by William McCormick
    Is how I learned the formula for ammonia. I like it. I like it. Nice work.

    Sincerely,


    William McCormick
    really, i gotta ask this question: where on earth are u educated in/at? do u have kids? do they attend the same school as u did? cause i think that u r seriously whacked....
    What do you do when the last day of your life is approaching...........?
    Me?
    I still go about living life the way I always have.
    Reply With Quote  
     

  45. #44  
    Forum Freshman holysword's Avatar
    Join Date
    Apr 2008
    Posts
    41
    I would love to write those characters with a circle above.
    I saw it a lot in some books of interior-points algorithms. If you have as a bounded polytope, the polytope *omega with a circle above* would be its interior.
    Anyone knows how to write it?

    EDIT#1: I found it, its \mathring:
    "Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium"
    Yeshua Ha Mashiach
    Reply With Quote  
     

  46. #45  
    Forum Masters Degree thyristor's Avatar
    Join Date
    Feb 2008
    Location
    Sweden
    Posts
    542
    Sorry, just had to try
    373 13231-mbm-13231 373
    Reply With Quote  
     

  47. #46  
    Forum Freshman
    Join Date
    Dec 2008
    Posts
    13
    Here's a link to a site with a ton of codes for TeX.
    Reply With Quote  
     

  48. #47  
    New Member
    Join Date
    Feb 2009
    Location
    Turkey
    Posts
    1
    thanks friend
    Reply With Quote  
     

  49. #48  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    Is there a way to use TeX to display the Gradient of some function ?

    Edit: nevermind, I got it
    Reply With Quote  
     

  50. #49  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    \approx
    Wise men speak because they have something to say; Fools, because they have to say something.
    -Plato

    Reply With Quote  
     

  51. #50  
    Moderator Moderator AlexP's Avatar
    Join Date
    Jul 2006
    Location
    NY
    Posts
    1,838
    How does one do a double overline? It's for the "mean of the sample means" in a statistics context. Can't figure out how to get two lines on top of each other over an x.
    "There is a kind of lazy pleasure in useless and out-of-the-way erudition." -Jorge Luis Borges
    Reply With Quote  
     

  52. #51  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    like this?

    \overline{\overline{X}} =>
    Wise men speak because they have something to say; Fools, because they have to say something.
    -Plato

    Reply With Quote  
     

  53. #52  
    Moderator Moderator AlexP's Avatar
    Join Date
    Jul 2006
    Location
    NY
    Posts
    1,838
    Yeah, there's that. I was kind of curious if there's a single code for it though. But I don't really care too much any more since statistics is officially over (thankfully).
    "There is a kind of lazy pleasure in useless and out-of-the-way erudition." -Jorge Luis Borges
    Reply With Quote  
     

  54. #53  
    Guest
    Reply With Quote  
     

  55. #54  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    are you looking for the plus minus symbol? \pm and likewise \mp
    Wise men speak because they have something to say; Fools, because they have to say something.
    -Plato

    Reply With Quote  
     

  56. #55  
    Guest
    lol--yes. As you probably noted, I was practicing using the notation of the quadratic formula for the quadratic equation 3x^2 - 4x - 3 through LaTex. Thank you. If I practice in the future I will be sure to delete my posts.
    Reply With Quote  
     

  57. #56  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    no worries, deletion isn't necessary. BTW, though, there is a preview button next to submit, it's very handy for the tex formulas.
    Wise men speak because they have something to say; Fools, because they have to say something.
    -Plato

    Reply With Quote  
     

  58. #57  
    Forum Freshman jammer's Avatar
    Join Date
    Oct 2008
    Location
    Colorado
    Posts
    60
    Thanks for the quick tutorial! I know of many engineers that use LaTex for publishing their papers and books. It is much better than using MS Office, which always screws up the formatting. I plan to use this for equations I type in the Electronics forum.
    Reply With Quote  
     

  59. #58  
    Guest
    Is it possible to use Tex/LaTeX in yahoo?
    Reply With Quote  
     

  60. #59  
    Forum Ph.D. Heinsbergrelatz's Avatar
    Join Date
    Aug 2009
    Location
    Singapore
    Posts
    994
    how do you write the Tex symbol for pi?
    Reply With Quote  
     

  61. #60  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    \pi ->
    \Pi ->
    Reply With Quote  
     

  62. #61  
    Forum Ph.D. Heinsbergrelatz's Avatar
    Join Date
    Aug 2009
    Location
    Singapore
    Posts
    994
    thank you for that, and one more, how about the derivative symbol (dx/dy) and the ones like for product rule and stuff, also for rates of change?
    Reply With Quote  
     

  63. #62  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    = \dfrac{dy}{dx}

    = \dfrac{\delta y}{\delta x}

    = \dfrac{\Delta Y}{\Delta X}
    Wise men speak because they have something to say; Fools, because they have to say something.
    -Plato

    Reply With Quote  
     

  64. #63  
    Forum Ph.D. Heinsbergrelatz's Avatar
    Join Date
    Aug 2009
    Location
    Singapore
    Posts
    994
    thanks alot for that
    Reply With Quote  
     

  65. #64  
    Forum Ph.D. Heinsbergrelatz's Avatar
    Join Date
    Aug 2009
    Location
    Singapore
    Posts
    994
    One more question, how do you write in Tex language for theta and phi?
    thank you
    Reply With Quote  
     

  66. #65  
    Moderator Moderator AlexP's Avatar
    Join Date
    Jul 2006
    Location
    NY
    Posts
    1,838
    theta = \ theta =
    phi = \ phi =

    Same with all the Greek letters. And for capitals, just capitalize. For example,

    \ Theta =
    \ Phi =
    "There is a kind of lazy pleasure in useless and out-of-the-way erudition." -Jorge Luis Borges
    Reply With Quote  
     

  67. #66  
    Forum Bachelors Degree x(x-y)'s Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    462


    Good, good... I was just testing it out.



    Yep, that works too! Thanks for the tutorial!

    More Practice:











    How do I get the /2a to the bottom (dividing by the whole thing)?
    "Nature doesn't care what we call it, she just does it anyway" - R. Feynman
    Reply With Quote  
     

  68. #67  
    Forum Ph.D. Heinsbergrelatz's Avatar
    Join Date
    Aug 2009
    Location
    Singapore
    Posts
    994
    \frac{-b \pm \sqrt{b^{2}-4ac}}{2a}

    ------------------




    "Mathematicians stand on each other's shoulders."- Carl Friedrich Gauss


    -------------------
    Reply With Quote  
     

  69. #68 jkj, 
    New Member
    Join Date
    Nov 2010
    Posts
    1
    its a great.~
    Reply With Quote  
     

  70. #69  
    Forum Bachelors Degree x(x-y)'s Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    462
    Sorry, this may have been covered but I didn't see it, how do you use TeX to get the wavelength symbol? And the proper Plank's Constant symbol, instead of just using "h"?

    Thanks...
    "Nature doesn't care what we call it, she just does it anyway" - R. Feynman
    Reply With Quote  
     

  71. #70  
    Veracity Vigilante inow's Avatar
    Join Date
    Oct 2009
    Location
    Austin, TX
    Posts
    3,500
    Quote Originally Posted by x(x-y)
    Sorry, this may have been covered but I didn't see it, how do you use TeX to get the wavelength symbol? And the proper Plank's Constant symbol, instead of just using "h"?
    The first is called lambda (with a lowercase L) and the second is called hbar. You just put a backslash and then that word within the tex tags.

    So, if you type (without spaces):
    It will render like this:

    If you type (without spaces):
    It will render like this:


    Cheers.
    Reply With Quote  
     

  72. #71  
    Forum Bachelors Degree x(x-y)'s Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    462
    Thank you very much, much appreciated!
    "Nature doesn't care what we call it, she just does it anyway" - R. Feynman
    Reply With Quote  
     

  73. #72  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    If you hit Edit in Wikipedia, you can see the code they use for the math formula. Tex works the same way here (except for the [ tex ] tags).
    Reply With Quote  
     

  74. #73  
    Forum Bachelors Degree x(x-y)'s Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    462
    How come I can't use this formula- I'd normally be able to do something like this:

    \frac{1}{R_T}=\frac{1}{R_1} + \frac{1}{R_2} + ... + \frac{1}{R_n}

    It just becomes

    "Nature doesn't care what we call it, she just does it anyway" - R. Feynman
    Reply With Quote  
     

  75. #74  
    Suspended
    Join Date
    Nov 2011
    Posts
    276
    How do I show a tetrative degree before its base? Like 32=16 in TeX?
    Reply With Quote  
     

  76. #75  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    16,602
    Quote Originally Posted by brody View Post
    How do I show a tetrative degree before its base? Like 32=16 in TeX?
    [tex]^{3}2 = 16[/tex]

    Reply With Quote  
     

  77. #76  
    Suspended
    Join Date
    Nov 2011
    Posts
    276
    Thanks Strange! Some things are much more simple with tetration.

    Reply With Quote  
     

  78. #77  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    16,602
    And there is an interactive, online editor here: Online LaTeX Equation Editor - create, integrate and download
    Ascended likes this.
    Without wishing to overstate my case, everything in the observable universe definitely has its origins in Northamptonshire -- Alan Moore
    Reply With Quote  
     

  79. #78  
    Forum Freshman
    Join Date
    Dec 2012
    Posts
    74
    Testing ...

    Last edited by trfrm; December 1st, 2012 at 04:35 AM.
    Reply With Quote  
     

  80. #79  
    Suspended
    Join Date
    Nov 2012
    Location
    Apocalyptic Paradise
    Posts
    6,613
    girfl spittle snarl WHAT?
    I hunted and hunted for a tex tutorial on this forum and came up empty handed.

    Trfrm, you mighta posted that test a few hours ago. Welcome to The Science Forum aaaand Ihateyou
    trfrm likes this.
    Reply With Quote  
     

  81. #80  
    Forum Junior epidecus's Avatar
    Join Date
    Aug 2012
    Posts
    268
    Quote Originally Posted by trfrm View Post
    Testing ...

    You can also display the bounds directly above and below the summation operator by putting "\displaystyle" before the sum.

    .

    The display-style command works similarly for other various notation.
    Dis muthufukka go hard. -Quote
    Reply With Quote  
     

  82. #81  
    Forum Freshman
    Join Date
    Dec 2012
    Posts
    74
    @ epidecus

    Thank you very much ....
    Reply With Quote  
     

  83. #82  
    Forum Freshman Crimson Sunbird's Avatar
    Join Date
    Jan 2013
    Posts
    39
    Quote Originally Posted by AlexP View Post
    theta = \ theta =
    phi = \ phi =

    Same with all the Greek letters. And for capitals, just capitalize. For example,

    \ Theta =
    \ Phi =
    Some Greek-letter symbols also have variants:


    \epsilon =
    \theta =
    \phi =

    \varepsilon =
    \vartheta =
    \varphi =
    Reply With Quote  
     

  84. #83  
    KJW
    KJW is online now
    Forum Professor
    Join Date
    Jun 2013
    Posts
    1,175
    Quote Originally Posted by Arcane_Mathematician View Post
    = \dfrac{dy}{dx}

    = \dfrac{\delta y}{\delta x}

    = \dfrac{\Delta Y}{\Delta X}
    What about partial derivatives?
    Reply With Quote  
     

  85. #84  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    16,602
    = \dfrac{\partial x}{\partial t}
    Without wishing to overstate my case, everything in the observable universe definitely has its origins in Northamptonshire -- Alan Moore
    Reply With Quote  
     

  86. #85  
    Suspended
    Join Date
    Oct 2013
    Posts
    1,034
    {n^3,\color{red}{n^3},n^3}



    MathJax Dynamic Math Test Page

    The first line in this post gives me a different answer from the link above.

    :EDIT:

    http://arachnoid.com/latex/?equ={n^3...d}{n^3}%2Cn^3}
    Last edited by Beer w/Straw; January 23rd, 2014 at 09:55 PM.
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •