Contents

Test Post: Markdown and LaTeX Styling

My First Post Content. This article is a test to showcase various formatting options including mathematical equations, code blocks, blockquotes, and tables.


Headings and Paragraphs

Here’s a sample of different heading levels to check their styling.

Heading 1

This is H1. It won’t be contained in “Content”. (Not recommended)

Heading 2

This is H2.

Heading 3

This is H3.

Heading 3

This is H3.

Heading 3

This is H3.

Heading 4

This is H4. (Not recommended)

My First Post Content. This section tests basic text rendering and paragraph breaks.


LaTeX and Mathematical Equations

This part of the post tests both inline and display-style LaTeX equations.

Inline Equations

Let’s consider the quadratic formula: $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$. This is a classic example of an inline equation. We can also write a simple variable, like $E=mc^2$.

Display Equations

Here is a more complex equation displayed on its own line:

$$\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$$

Multi-line Equations

Equations can also span multiple lines using an align environment. This is perfect for complex derivations or systems of equations.

$$ c = \pm\sqrt{a^2 + b^2} $$

\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\]

\begin{equation*}
  \rho \frac{\mathrm{D} \mathbf{v}}{\mathrm{D} t}=\nabla \cdot \mathbb{P}+\rho \mathbf{f}
\end{equation*}

\begin{equation}
  \mathbf{E}=\sum_{i} \mathbf{E}\_{i}=\mathbf{E}\_{1}+\mathbf{E}\_{2}+\mathbf{E}_{3}+\cdots
\end{equation}

\begin{align}
  a&=b+c \\\\
  d+e&=f
\end{align}

\begin{alignat}{2}
   10&x+&3&y = 2 \\\\
   3&x+&13&y = 4
\end{alignat}

\begin{gather}
   a=b \\\\
   e=b+c
\end{gather}

The result is like following:

$$ c = \pm\sqrt{a^2 + b^2} $$

\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \]

\begin{equation*} \rho \frac{\mathrm{D} \mathbf{v}}{\mathrm{D} t}=\nabla \cdot \mathbb{P}+\rho \mathbf{f} \end{equation*}

\begin{equation} \mathbf{E}=\sum_{i} \mathbf{E}_{i}=\mathbf{E}_{1}+\mathbf{E}_{2}+\mathbf{E}_{3}+\cdots \end{equation}

\begin{align} a&=b+c \\ d+e&=f \end{align}

\begin{alignat}{2} 10&x+&3&y = 2 \\ 3&x+&13&y = 4 \end{alignat}

\begin{gather} a=b \\ e=b+c \end{gather}


Code Blocks

This section demonstrates how both inline and multi-line code blocks are rendered.

Inline Code

To add an inline code snippet, you can use backticks, like git status.

Multi-line Code

The following block shows syntax highlighting for C++ code. The block should also handle long lines without issue.

#include <iostream>
using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    
    // A very long line to test wrapping and scrolling
    cout << "This is a very long line of code to test how the code block handles horizontal scrolling." << endl;
    
    for (int i = 0; i < 10; ++i) {
        if (i % 2 == 0) {
            cout << i << " is even." << endl;
        } else {
            cout << i << " is odd." << endl;
        }
    }
    return 0;
}

Text Formatting

This is bold text using two asterisks. This is also bold text using two underscores.

This is italic text using one asterisk. This is also italic text using one underscore.

This is bold and italic text. This is also bold and italic text.

This is strikethrough text.


Lists

Unordered List

  • Item 1
  • Item 2
    • Item 2.1
    • Item 2.2
      • Item 2.2.1

Ordered List

  1. First item
  2. Second item
    1. Sub-item 1
    2. Sub-item 2
  3. Third item

This is an example link.

This is a link with a title attribute: example link with title.

This is an image:

https://www.markdownguide.org/assets/images/markdown-mark-white.svg
Markdown Logo


Quote

This is a blockquote. It can span multiple lines.

Blockquotes can also contain other Markdown elements.

  • A list item inside a blockquote.
  • Another item.

This is a nested blockquote.


Table

FeatureDescriptionStatus
HugoStatic site generatorExcellent
MarkdownLightweight markup languageStandard
LaTeXTypesetting system for mathematicsSupported
LoveIt ThemeA beautiful and functional Hugo themeActive

试试看中文标题

试试看中文标题

试试看中文字渲染效果如何!