Markdown Adding Latex Math formulas

Source: Internet
Author: User

    • Ways to add formulas
    • Latex Mathematical Formula Grammar
Ways to add formulas
    1. In-line formulas

          $行内公式$
    2. Formula between rows

          $$行间公式$$
Latex Mathematical Formula Grammar
  1. Corner mark (superscript)

    • Superscript command^{}
    • Subscript command_{}

      The superscript command is used to place the upper and lower coordinates where the superscript is to be inserted, and the curly brackets are the contents of the upper and lower brackets, and when the corners are marked as a single character, the curly braces are used, if the corners are multi-character or multi-layered.

    • Example:

      x^2, x_1^2, x^{(n)}_{22}, ^{16}O^{2-}_{32}, x^{y^{z^a}}, x^{y_z}

      \[
      X^2, x_1^2, x^{(n)}_{22}, ^{16}o^{2-}_{32}, X^{y^{z^a}}, X^{y_z}
      \]

      If you need to use text as a corner label, first put the text in \mbox{} text mode, plus the command to change the text size, for example:

      \partial f_{\mbox{\tiny 极大值}}

      Display as: \ (\partial f_{\mbox{\tiny max}}\)

      When the position of the corner mark is not obvious, you can force change the size or level of the angle, the distance is as follows:

      y_N, y_{_N}, y_{_{\scrptstyle N}

      Shown as:
      \[
      Y_n, Y_{_n},y_{_{\scriptstyle N}}
      \]

      The first output is normal output, but the output effect is not obvious; the second is to change the primary angle to a two-level angle, and the font to automatically change to a two-level corner font; The third one changes the first-level corner to a two-level corner label, but forces the font to be a one-level corner font.

  2. Fractional

      • Fractional command: \frac{numerator} {denominator}
      • Example:

        • inline fractional $\frac{x+y}{y+z}$ , display as \ (\frac{x+y}{y+z}\)
        • line fraction: $\frac{x+y}{y+z}$ \[\frac{x+y}{y+z}\]

        The above example indicates that the inline fractional font is smaller than the inline font because the in-line fraction uses a corner label font , you can manually change the font size of the in-line fraction, for example: $\displaystyle\frac{x+y}{y+z}$ appears as \ (\displaystyle\frac{x+y}{y+z}\)
        Hyphen: $x _0+\frac{1}{x_1+\frac{1}{x_2+\frac{1}{x_3+\frac{1}{x_4}}}}$ , displayed as \ (\displaystyle x_0+\frac{1}{x_1+ \frac{1}{x_2+\frac{1}{x_3+\frac{1}{x_4}}}}\)
        can make the numerator denominator font size consistent by forcing the font size to change, for example:
        $\newcommand{\fs}[2]{\ displaystyle\frac{#1} {#2}}x0+\fs{1}{x_1+\fs{1}{x_2+\fs{1}{x_3+\fs{1}{x_4}}}}$

        Display as
        \ (\ newcommand{\fs}[2]{\displaystyle\frac{#1} {#2}}x0+\fs{1}{x_1+\fs{1}{x_2+\fs{1}{x_3+\fs{1}{x_4}}}}\)

    The first line of the command defines a new fractional command, which specifies that fractions of each call to the command display fractions in \displaystyle format; the bar length value is the maximum length that is preset to the numerator denominator, and if you want to make the bar longer, you can add some space at the numerator or denominator, for example $\frac{1}{2},\frac{\;1\;} {\;2\;} $ , displayed as \ (\frac{1}{2},\frac{\;1\;} {\;2\;} \), where the first display is the normal display, and the second display is the numerator denominator before and after placing an interval command \;

  3. Radical

    • Two-time radical command: \sqrt{expression}

      If the expression is a single character, you do not need curly braces, but you need to add a space between the character and sqrt

    • N-th radical Command: \sqrt[n]{expression}

      The horizontal line of the root of the root of the root of the square may not be the same as the height of the radical expression, and in order for the line to be in the same straight lines, a mathematical pillar with only height and no width can be inserted in the formula \mathstut

      • For example: $\sqrt{a}+\sqrt{b}+\sqrt{c},\qquad \sqrt{\mathstrut a}+\sqrt{\mathstrut b}+\sqrt{\mathstrut c}$ displayed as: \ (\sqrt{a}+\sqrt{b}+\sqrt{c},\qquad \sqrt{\mathstrut a}+\sqrt{\mathstrut b}+\sqrt{\mathstrut c}\)
      • /ul>

        When the radical expression is high, the position of the root number is slightly lower, the solution is: the root is changed to superscript, and close the horizontal distance from the radicals, that is, the command is displayed in the [n] to [^n\!], where ^ is superscript, \! means the narrowing interval, For example:
        $\sqrt{1+\sqrt[p]{1+\sqrt[q]{1+a}}}$
        appears as \ (\sqrt{1+\sqrt[p]{1+\sqrt[q]{1+a}}}\)
        $\sqrt{1+\sqrt[^p\!] {1+\sqrt[^q\!] {1+a}}} $
        appears as: \ (\sqrt{1+\sqrt[^p\!] {1+\sqrt[^q\!] {1+a}}} \) (Note comparing the display position of two radical radicals)

  4. Sum and integrals

    • sum command: \sum_{k=1}^n expression (summation followed by, same as)
    • points command: \int_a^b expression
      • For example: Infinite series $\sum_{k=1}^\infty\frac{x^n}{n!} $ displayed as: \ (\sum_{k=1}^\infty\frac{x^n}{n!} \) can be displayed as a \ (\int_0^\infty e^x\) for the integral $\int_0^\infty e^x$ , which is also: \ (\sum_0^\infty \frac{x^n}{n!} =\int_0^\infty e^x\)
    • Command to change the upper and lower bounds: \limits (upper and lower bound) and \nolimits (mandatory upper and lower limits on left right)

      • For example: $\sum\limits_{k=1}^n$ and $\sum\nolimits_{k=1}^n$

        The

        Displays the result: \ (\sum\limits_{k=1}^n\) and \ (\sum\nolimits_{k=1}^n\)
        \ (\int\limits_{n=0}^\infty x and \int\nolimits_{n=0}^ \infty x\)
        Displays the result: \ (\int\limits_{n=0}^\infty x^n and \int\nolimits_{n=0}^\infty x^n\)

  5. Underline, underline, and so on

    • Underline command: \overline{formula}
    • Underline command: \underline{formula}
      • Example: $\overline{\overline{a^2}+\underline{ab}+\bar{a}^3}$ display as \ (\overline{\overline{a^2}+\underline{ab}+\bar{a}^3}\)
    • Upper Curly Bracket command: \overbrace{formula} {description}
    • Lower Curly Bracket command: \underbrace{formula}_{Description}
      • Example: $\underbrace{a+\overbrace{b+\dots+b}^{m\mbox{\tiny 个}}}_{20\mbox{\scriptsize 个}}$ display as: \ (\underbrace{a+\overbrace{b+\dots+b}^{m\mbox{\tiny a}}}_{20\mbox{\scriptsize}}\)
  6. Mathematical Stress Symbols
    Take a for example, if the letter I or J is accented, the letter i,y should be replaced with \imath, \jmath

    $$
    \hat{a}
    \check{a}
    \breve{a}
    \tilde{a}
    \bar{a}
    \vec{a}
    \acute{a}
    \grave{a}
    \mathring{a}
    \dot{a}
    \ddot{a}
    $$

    The results shown are:
    \[
    \hat{a}
    \check{a}
    \breve{a}
    \tilde{a}
    \bar{a}
    \vec{a}
    \acute{a}
    \grave{a}
    \mathring{a}
    \dot{a}
    \ddot{a}
    \]

  7. Stacked Symbols

    • \stacrel{上位符号}{基位符号}Large base sign, small upper symbol
    • {上位公式\atop 下位公式}The upper and lower symbols are as large
    • {上位公式\choose 下位公式}The upper and lower symbols are the same size; the upper and lower symbols are included inside arcs
    • For example: \vec{x}\stackrel{\mathrm{def}}{=}{x_1,\dots,x_n}\ {n+1 \choose k}={n \choose k}+{n \choose k-1}\ \sum_{k_0,k_1,\ldots>0 \atop k_0+k_1+\cdots=n}A_{k_0}A_{k_1}\cdots The display effect is: \[\vec{x}\stackrel{\mathrm{def}}{=}{x_1,\dots,x_n}\\{n+1 \choose k}={n \choose k}+{n \choose k-1}\\\ Sum_{k_0,k_1,\ldots>0 \atop K_0+k_1+\cdots=n}\]
  8. Delimiter
    $$
    ()\big(\big) \Big(\Big) \bigg(\bigg) \Bigg(\Bigg)
    \big(\Big) \bigg(\Bigg)
    $$

    Display Result: \[
    () \big (\big) \big (\big) \bigg (\bigg) \bigg (\bigg)
    \big (\big) \bigg (\bigg)
    \]
    Adaptive Zoom Command: \left and \right, this command is placed before the left and right delimiters, automatically adjusts the symbol size as the formula content size
    Example:
    \ (\left (x\right) \left (X^{y^{\scriptstyle z}}\right) \)

  9. Reference:

    http://hubl82.blog.163.com/blog/static/12676948520134510173383/

Markdown Adding Latex Math formulas

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.