Math Expression Test

The tests of LaTeX for math expressions.

  • Inline Math Here is an inline formula: $E = mc^2$

  • Display Math Here is a display formula: $$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

  • More Examples

    • Fraction: $\frac{1}{2}$
    • Sum: $\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$
    • Matrix: $$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$
    • Alternative Matrix: $$\begin{bmatrix} a & b \\ c & d \end{bmatrix}$$
    • Larger Matrix: $$\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$$
    • Complex Matrix: $$\begin{bmatrix} \alpha & \beta & \gamma \\ \delta & \epsilon & \zeta \\ \eta & \theta & \iota \end{bmatrix}$$

Code Block Test

The tests of code block for Python.

  • Single Line Code Block

    print("Hello, World!")
  • Multi Line Code Block

    import numpy as np

    a = np.array([1, 2, 3, 4, 5])
    b = np.array([6, 7, 8, 9, 10])

    c = a + b

    print(c)
  • Code with HTML Characters

    def check_html_entities():
    # This function contains HTML special characters
    html_content = "<div>Hello & World</div>"
    comparison = "5 < 10 && 10 > 5"
    ampersand_test = "AT&T"

    print(f"HTML: {html_content}")
    print(f"Comparison: {comparison}")
    print(f"Ampersand: {ampersand_test}")

    return True