Inline Code
This is Inline Code
Only pre
This is pre text
Code block with backticks
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<meta
name="description"
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
/>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with backticks and language specified
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <title>Example HTML5 Document</title>
6 <meta
7 name="description"
8 content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
9 />
10 </head>
11 <body>
12 <p>Test</p>
13 </body>
14</html>
Code block with backticks and language specified with line numbers
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <title>Example HTML5 Document</title>
6 <meta
7 name="description"
8 content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
9 />
10 </head>
11 <body>
12 <p>Test</p>
13 </body>
14</html>
Code block with line numbers and highlighted lines
- PaperMod supports
linenos=trueorlinenos=table
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <title>Example HTML5 Document</title>
6 <meta
7 name="description"
8 content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
9 />
10 </head>
11 <body>
12 <p>Test</p>
13 </body>
14</html>
Withlinenos=inlineline might not get highlighted properly.- This issue is fixed with 045c084
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <title>Example HTML5 Document</title>
6 <meta
7 name="description"
8 content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
9 />
10 </head>
11 <body>
12 <p>Test</p>
13 </body>
14</html>
Code block indented with four spaces
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with Hugo’s internal highlight shortcode
1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>Example HTML5 Document</title>
6</head>
7<body>
8 <p>Test</p>
9</body>
10</html>Github Gist
行内数学公式:$a^2 + b^2 = c^2$。
块公式,
$$ a^2 + b^2 = c^2 $$
$$
\boldsymbol{x}_{i+1}+\boldsymbol{x}_{i+2}=\boldsymbol{x}_{i+3}
$$