<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>LaTeX on Kuqilin&#39;s Blog</title>
    <link>https://www.kuqilin.top/en/tags/latex/</link>
    <description>Recent content from Kuqilin&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    
    <managingEditor>kuqilin@outlook.com (Kuqilin)</managingEditor>
    <webMaster>kuqilin@outlook.com (Kuqilin)</webMaster>
    
    <copyright>All articles on this blog are licensed under the BY-NC-SA license agreement unless otherwise stated. Please indicate the source when reprinting!</copyright>
    
    <lastBuildDate>Sun, 06 Sep 2026 00:00:00 +0800</lastBuildDate>
    
    
    <atom:link href="https://www.kuqilin.top/en/tags/latex/index.xml" rel="self" type="application/rss&#43;xml" />
    

    
      
    

    <item>
      <title>高中生排版指北</title>
      <link>https://www.kuqilin.top/en/post/high-school-typography-guide/</link>
      <pubDate>Sun, 06 Sep 2026 00:00:00 &#43;0800</pubDate>
      <author>kuqilin@outlook.com (Kuqilin)</author>
      <guid>https://www.kuqilin.top/en/post/high-school-typography-guide/</guid>
      <description>
        <![CDATA[<h1>高中生排版指北</h1><p>Author: Kuqilin(kuqilin@outlook.com)</p>
        
          <h1 id="高中生排版指北">
<a class="header-anchor" href="#%e9%ab%98%e4%b8%ad%e7%94%9f%e6%8e%92%e7%89%88%e6%8c%87%e5%8c%97"></a>
高中生排版指北
</h1><blockquote>
<p>写完发现，这大概是我除了作业和论文之外写过最正经的东西了。但其实也没多正经。暂时全文 AI 生成，有些东西不太符合，我会慢慢改。</p>
</blockquote>
<hr>
<h2 id="-1-前言">
<a class="header-anchor" href="#-1-%e5%89%8d%e8%a8%80"></a>
-1. 前言
</h2><p>本文适合高中生阅读，但其他人也可以阅读。</p>
<h2 id="0-绪论">
<a class="header-anchor" href="#0-%e7%bb%aa%e8%ae%ba"></a>
0. 绪论
</h2><p>先“说文解字”一下，如题，“高中生”说明本文是为高中生排版写的，不是初中生、不是小学生，因此会稍有难度但不会太难。“排版”说明了是教你什么的，“指北”即教程。</p>
<p>为什么我要写这个呢，因为发现身边的同学们貌似对排版一点概念没有，因此决定至少让他们知道一些基本概念，比如不同字体、数学公式之类的。</p>
<p>难度方面本文基本介绍一些概念，部分涉及 Word/WPS 的使用和数学公式的输入，以及少量$\TeX$内容。</p>
<p>其实，排版不是一件那么难的事情，尤其现在的办公软件基本都是所见即所得。当你看着自己完成的一份排版作品，还是很有成就感的。不妨看看我排的那篇<a href="https://kuqilin.eu.org/mathEssay.pdf">数学论文</a>。</p>
<h2 id="1-文字排版基础">
<a class="header-anchor" href="#1-%e6%96%87%e5%ad%97%e6%8e%92%e7%89%88%e5%9f%ba%e7%a1%80"></a>
1. 文字排版基础
</h2><h3 id="11-字体">
<a class="header-anchor" href="#11-%e5%ad%97%e4%bd%93"></a>
1.1 字体
</h3><p>以前对字体真的无意识，大街小巷手机电脑基本全是黑体，书本基本全是宋体，偶尔的少量楷体，基本不会分辨字体。知道初中开始用 Markdown 写一些内容，我才意识到字体这件事，就跟穿衣服一样——穿睡衣出门也能走，但别人看你的眼神不一样。字体有很多种，但是为了简便，<strong>中文字体，认识这几个就够了：</strong></p>
<ol>
<li>
<p><strong>宋体</strong>：横细竖粗，笔画末端带个小装饰（那叫“衬线”），课本、试卷、正式文档基本都是它。看久了不累，适合正文。Windows 自带“宋体（SimSun）”，还有开源免费的“思源宋体”，公文的“方正小标宋”等等，大差不差。Windows 的 SimSun 就够了。</p>
</li>
<li>
<p><strong>黑体</strong>：粗细均匀，没那些小装饰，很“现代”，适合做标题。微软雅黑就属于黑体，Windows自带，用着挺舒服。还有 Windows 的“黑体（SimHei）”、公文用的方正的“黑体”等。</p>
</li>
<li>
<p><strong>楷体</strong>：像手写，流畅带笔锋，适合引用、注释、写诗。但不太建议写正文，不太舒服（不过貌似试卷会给阅读用楷体）。有 Windows 的“楷体（KaiTi）”、方正的“楷体”等。</p>
</li>
<li>
<p><strong>仿宋</strong>：比宋体细一点，比楷体端正一点，清秀型。公文用它，适合图注和落款。有 Windows 的“仿宋（FangSong）”等。</p>
</li>
<li>
<p><strong>隶书、幼圆</strong>：偶尔做海报还行，正式作业别用。</p>
</li>
</ol>
<blockquote>
<p>截图 1：同一段文字用宋体、黑体、楷体、仿宋、隶书、幼圆分别显示，红框标出宋体的衬线和黑体的均匀。</p>
</blockquote>
<blockquote>
<p>截图 2：Word 字体下拉菜单，红框圈出那几个常用的。</p>
</blockquote>
<p><strong>西文字体，一句话说清楚：</strong></p>
<p>中英混排的时候英文部分也要选字体，别全丢给 Word 默认。正文用 Times New Roman（正式）或者 Arial（清爽），代码、公式里的字母用 Consolas 或 Courier New（等宽，整齐）。</p>
<p>西文字体也是类似中文，比如各种衬线字体对应宋体、斜体对应楷书、等线对应黑体、等宽对应仿宋等。</p>
<p>Word 里可以分开设中文字体和西文字体，在字体对话框里两个下拉框各选各的。不设的话 Word 会用&quot;等线&quot;这个迷之字体，你作业里那些奇怪的&quot;口&quot;字多半是它害的。</p>
<blockquote>
<p>截图 3：Word字体设置对话框，红框标出&quot;中文字体&quot;和&quot;西文字体&quot;两个下拉框。</p>
</blockquote>
<p><strong>字号和行距，不用记太细：</strong></p>
<p>正文小四（12pt）或五号（10.5pt），行距 1.2 ~ 1.5 倍。标题比正文大一点就行，别把一级标题搞成海报大小。</p>
<p>最重要的原则就一条：<strong>全文同级别内容用同一套字体字号颜色</strong>。你要是三个一级标题分别用了宋体黑体楷体，老师会觉得你写文档的时候人格分裂了。</p>
<blockquote>
<p>截图 4：段落设置对话框，红框标出首行缩进 2 字符、行距、段间距。</p>
</blockquote>
<h3 id="12-中英混排空格是美德">
<a class="header-anchor" href="#12-%e4%b8%ad%e8%8b%b1%e6%b7%b7%e6%8e%92%e7%a9%ba%e6%a0%bc%e6%98%af%e7%be%8e%e5%be%b7"></a>
1.2 中英混排：空格是美德
</h3><p>这个坑很多人不注意，因为加一个空格的操作在 Word/WPS、微信等软件会自动加上半个多空格进行渲染，不用手动进行。但是自己写一些其他文章就要注意了。</p>
<p><strong>规则只有三条：</strong></p>
<ul>
<li>中文和英文之间加空格：<code>今天学习了 Newton 第二定律</code>（对），<code>今天学习了Newton第二定律</code>（错）</li>
<li>中文和数字之间加空格：<code>一共 30 名学生</code>（对），<code>一共30名学生</code>（错）</li>
<li>中文和行内公式之间加空格：<code>加速度 a 的单位是 m/s²</code>（对），<code>加速度a的单位是m/s²</code>（错）</li>
</ul>
<p><strong>什么时候不用加：</strong> 中文标点后面不加，括号引号靠文字那侧不加，百分比温度连着写（<code>37%</code>、<code>25℃</code>）。</p>
<p><strong>标点符号：</strong> 中文用全角<code>，。；：“”‘’！？（）</code>，英文用半角<code>, . ; : &quot; ' ! ? ( )</code>。别混用，中文段落里冒出英文逗号特别扎眼。</p>
<blockquote>
<p>截图5：一段文字的错误排版（无空格、标点混用）和正确排版并排放，红框标出差异。</p>
</blockquote>
<h3 id="13-数字与单位">
<a class="header-anchor" href="#13-%e6%95%b0%e5%ad%97%e4%b8%8e%e5%8d%95%e4%bd%8d"></a>
1.3 数字与单位
</h3><p>数字用半角<code>0 1 2 3</code>，别用全角<code>１２３</code>（那是中文输入法没切的锅）。</p>
<p>科学计数法：<code>1.6×10⁻¹⁹ C</code>，乘号用<code>×</code>，$\TeX$中可用<code>\times</code>，上标用 Word 的上下标功能。</p>
<p><strong>数字和单位之间加空格</strong>：<code>5 kg</code>、<code>10 m/s</code>。教材里经常写<code>10N</code>、<code>5kg</code>，那是旧习惯问题。如果老师没强制要求，你就按规范写，全文统一就行。</p>
<p><strong>值得注意：</strong> 按照国内习惯，貌似不喜欢在数值和单位之间加空格，这点上有争议，一般喜欢紧凑一点可以不加或者用<code>\,</code>，喜欢宽敞用<code>~</code>或者<code>\ </code>（指在$\TeX$中）。这篇文章我就不喜欢加空格，太宽了（</p>
<p>单位符号用正体（不斜）：</p>
<ul>
<li>小写：$\text{m kg s mol cd}$</li>
<li>大写：$\text{N Pa J W A V Ω Hz}$</li>
</ul>
<blockquote>
<p>截图6：教材上的<code>10N</code>和规范写法<code>10 N</code>放一起对比。</p>
</blockquote>
<h3 id="14-标点和其他细节">
<a class="header-anchor" href="#14-%e6%a0%87%e7%82%b9%e5%92%8c%e5%85%b6%e4%bb%96%e7%bb%86%e8%8a%82"></a>
1.4 标点和其他细节
</h3><p>中文破折号是<code>——</code>（占两格），省略号是<code>……</code>（不是六个句号<code>......</code>）。</p>
<p>段落首行缩进两字符（Word 段落设置里调）。段间距和行距分开设，别用空行代替段间距。</p>
<p><strong>千万千万别用空格键强行对齐。</strong> 我见过有人为了居中按了十几下空格，换行全乱，惨不忍睹。用 Word 的制表位、表格或者样式功能。</p>
<hr>
<h2 id="2-数学排版">
<a class="header-anchor" href="#2-%e6%95%b0%e5%ad%a6%e6%8e%92%e7%89%88"></a>
2. 数学排版
</h2><h3 id="21-几条硬规矩">
<a class="header-anchor" href="#21-%e5%87%a0%e6%9d%a1%e7%a1%ac%e8%a7%84%e7%9f%a9"></a>
2.1 几条硬规矩
</h3><p>这些不是建议，是规则。考试写错格式也会扣分那种。</p>
<ul>
<li><strong>变量斜体</strong>：$x$、$y$、$f(x)$、$a_1$。物理里的力$F$、加速度$a$都是变量，斜。</li>
<li><strong>函数名正体</strong>：$\sin x$、$\log x$、$\ln x$。<code>sin</code>不是变量，是函数，别斜。</li>
<li><strong>单位正体</strong>：<code>5 kg</code>里的<code>kg</code>正体，不斜。</li>
<li><strong>向量写法按教材统一</strong>：有的书用$F$，有的加箭头$\vec{F}$，有的加粗$\mathbf{F}$。问一下你老师，全文一致就行。</li>
<li><strong>上下标分清</strong>：下标是序号（<code>x₁</code>、<code>v₀</code>），上标是幂（<code>x²</code>、<code>10³</code>）。</li>
<li><strong>行内公式别太高</strong>：太复杂的单独成行居中。重要公式给个编号<code>(1)</code>、<code>(2)</code>，后面引用方便。</li>
</ul>
<blockquote>
<p>截图7：<code>sin x</code>（正体+空格）和<code>sinx</code>的对比。</p>
</blockquote>
<h3 id="22-怎么输公式">
<a class="header-anchor" href="#22-%e6%80%8e%e4%b9%88%e8%be%93%e5%85%ac%e5%bc%8f"></a>
2.2 怎么输公式
</h3><p><strong>方法一：Word 自带公式（最常用）</strong></p>
<p>快捷键<code>Alt + =</code>，按完直接出公式框。里面能插分数、根号、上下标、求和、积分。</p>
<p>线性输入（打字快）：</p>
<ul>
<li>分式：<code>a/b</code>然后按空格 → 变成竖排分数</li>
<li>上标：<code>x^2</code></li>
<li>下标：<code>x_1</code></li>
<li>希腊字母：<code>\alpha</code>、<code>\beta</code>、<code>\pi</code></li>
<li>根式：<code>\sqrt(x)</code></li>
</ul>
<p>还有个&quot;墨迹公式&quot;功能，鼠标手写自动识别，救急用过几次，还行。</p>
<p>优点：不用装任何软件。缺点：复杂排版不太灵活。</p>
<blockquote>
<p>截图8：按<code>Alt+=</code>后出现的公式工具栏。</p>
</blockquote>
<blockquote>
<p>截图9：线性输入<code>a/b</code>按空格变分数的前后对比。</p>
</blockquote>
<p><strong>方法二：LaTeX（进阶）</strong></p>
<p>LaTeX就是个排版系统，数学公式是王牌。你不需要学会写整篇，记住几个命令能救命。</p>
<p>常用命令：</p>
<ul>
<li>分式：<code>\frac{a}{b}</code></li>
<li>根式：<code>\sqrt{x}</code>、<code>\sqrt[n]{x}</code></li>
<li>上下标：<code>x^2</code>、<code>x_1</code></li>
<li>求和：<code>\sum_{i=1}^{n}</code></li>
<li>积分：<code>\int_a^b f(x)\,dx</code></li>
<li>矩阵：<code>\begin{bmatrix} a &amp; b \\ c &amp; d \end{bmatrix}</code></li>
</ul>
<p>推荐 Overleaf，在线编辑器，不用装，左边写代码右边预览。</p>
<p>适用场景：竞赛论文、研究性学习报告、需要统一排版的文档。</p>
<blockquote>
<p>截图10：Overleaf界面，左边代码右边预览。</p>
</blockquote>
<p><strong>方法三：Markdown + KaTeX（做笔记用）</strong></p>
<p>我博客用这个，舒服。适合平时做笔记。</p>
<p>常用软件：Typora、Obsidian、Notion。</p>
<p>用法：</p>
<ul>
<li>行内公式：<code>$a^2 + b^2 = c^2$</code></li>
<li>独立公式：<code>$$a^2 + b^2 = c^2$$</code></li>
</ul>
<p>KaTeX 渲染快，输出 SVG 放大也不糊。</p>
<blockquote>
<p>截图11：Typora或Obsidian里公式显示效果。</p>
</blockquote>
<p><strong>方法四：公式识别工具</strong></p>
<p><strong>Mathpix</strong>：截图公式转 LaTeX 代码，识别课本上的公式用这个，省手打。</p>
<p><strong>手机小程序</strong>：搜“公式识别”一堆，拍照就能转。</p>
<blockquote>
<p>截图12：Mathpix 界面，左边截图右边识别结果。</p>
</blockquote>
<h3 id="23-数学字体">
<a class="header-anchor" href="#23-%e6%95%b0%e5%ad%a6%e5%ad%97%e4%bd%93"></a>
2.3 数学字体
</h3><p>Word 默认 Cambria Math，LaTeX 默认Computer Modern，都够用。原则就一条：<strong>全文保持一致</strong>。</p>
<hr>
<h2 id="3-实战排一份作业">
<a class="header-anchor" href="#3-%e5%ae%9e%e6%88%98%e6%8e%92%e4%b8%80%e4%bb%bd%e4%bd%9c%e4%b8%9a"></a>
3. 实战：排一份作业
</h2><h3 id="31-动手前花三分钟规划">
<a class="header-anchor" href="#31-%e5%8a%a8%e6%89%8b%e5%89%8d%e8%8a%b1%e4%b8%89%e5%88%86%e9%92%9f%e8%a7%84%e5%88%92"></a>
3.1 动手前花三分钟规划
</h3><p>别急着打字。想清楚标题分几级、哪些公式要编号、图片放哪。三分钟规划省半小时调整。</p>
<h3 id="32-word-实操">
<a class="header-anchor" href="#32-word-%e5%ae%9e%e6%93%8d"></a>
3.2 Word 实操
</h3><p><strong>第一步：用样式，别手动画</strong></p>
<p>新建“正文”“标题1”“标题2”“公式”样式，设好字体字号行距，然后应用。以后改格式只改样式定义，全文自动同步。</p>
<p><strong>第二步：段落设置</strong></p>
<p>正文样式设首行缩进 2 字符、1.5 倍行距、段后 6pt。</p>
<p><strong>第三步：公式对齐</strong></p>
<p>独立公式居中、编号右对齐——我用一行三列无边框表格来实现，中间放公式右边放编号，比用空格稳定一百倍。</p>
<p><strong>第四步：导出 PDF 前检查</strong></p>
<p>检查字体是否嵌入、公式是否清晰、版面是否整齐。</p>
<blockquote>
<p>截图13：Word 样式窗格。</p>
</blockquote>
<blockquote>
<p>截图14：公式居中+编号右对齐的效果。</p>
</blockquote>
<h3 id="33-常见错误">
<a class="header-anchor" href="#33-%e5%b8%b8%e8%a7%81%e9%94%99%e8%af%af"></a>
3.3 常见错误
</h3><table>
	<thead>
			<tr>
					<th>错误</th>
					<th>正确</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>用F表示力</code></td>
					<td><code>用 F 表示力</code></td>
			</tr>
			<tr>
					<td><code>5kg</code></td>
					<td><code>5 kg</code></td>
			</tr>
			<tr>
					<td><code>sinx</code></td>
					<td><code>sin x</code></td>
			</tr>
			<tr>
					<td>贴模糊公式截图</td>
					<td>用 Word 公式或 KaTeX 重打</td>
			</tr>
			<tr>
					<td>中文段落用英文逗号</td>
					<td>中文用全角标点</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="4-工具推荐">
<a class="header-anchor" href="#4-%e5%b7%a5%e5%85%b7%e6%8e%a8%e8%8d%90"></a>
4. 工具推荐
</h2><table>
	<thead>
			<tr>
					<th>场景</th>
					<th>用这个</th>
					<th>理由</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>日常作业</td>
					<td>Word 自带公式</td>
					<td>老师能打开</td>
			</tr>
			<tr>
					<td>课堂笔记</td>
					<td>Typora/Obsidian</td>
					<td>快，好检索</td>
			</tr>
			<tr>
					<td>竞赛论文</td>
					<td>Overleaf（LaTeX）</td>
					<td>规范，公式漂亮</td>
			</tr>
			<tr>
					<td>公众号/博客</td>
					<td>Markdown + KaTeX</td>
					<td>适配网页</td>
			</tr>
			<tr>
					<td>扫描公式</td>
					<td>Mathpix 或小程序</td>
					<td>省时间</td>
			</tr>
	</tbody>
</table>
<p>链接：</p>
<ul>
<li>Overleaf：https://www.overleaf.com</li>
<li>Mathpix：https://mathpix.com</li>
<li>Typora：https://typora.io</li>
<li>Obsidian：https://obsidian.md</li>
</ul>
<hr>
<h2 id="5-交作业前检查清单">
<a class="header-anchor" href="#5-%e4%ba%a4%e4%bd%9c%e4%b8%9a%e5%89%8d%e6%a3%80%e6%9f%a5%e6%b8%85%e5%8d%95"></a>
5. 交作业前检查清单
</h2><ul>
<li><input disabled="" type="checkbox"> 中英文、数字之间加空格了吗？</li>
<li><input disabled="" type="checkbox"> 标点全角/半角分清楚了吗？</li>
<li><input disabled="" type="checkbox"> 单位正体、留空了吗？</li>
<li><input disabled="" type="checkbox"> 数学变量斜体了吗？</li>
<li><input disabled="" type="checkbox"> 函数名、单位正体了吗？</li>
<li><input disabled="" type="checkbox"> 公式是清晰打出来的不是模糊截图吧？</li>
<li><input disabled="" type="checkbox"> 全文字体、字号、行距统一吗？</li>
<li><input disabled="" type="checkbox"> 标题层级清晰吗？</li>
<li><input disabled="" type="checkbox"> 图表、公式有编号吗？</li>
<li><input disabled="" type="checkbox"> PDF导出来看过一遍了吗？</li>
</ul>
<hr>
<h2 id="附录常用公式输入速查">
<a class="header-anchor" href="#%e9%99%84%e5%bd%95%e5%b8%b8%e7%94%a8%e5%85%ac%e5%bc%8f%e8%be%93%e5%85%a5%e9%80%9f%e6%9f%a5"></a>
附录：常用公式输入速查
</h2><p><strong>LaTeX 命令</strong></p>
<table>
	<thead>
			<tr>
					<th>内容</th>
					<th>命令</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>分式</td>
					<td><code>\frac{a}{b}</code></td>
			</tr>
			<tr>
					<td>根式</td>
					<td><code>\sqrt{x}</code>、<code>\sqrt[n]{x}</code></td>
			</tr>
			<tr>
					<td>上标</td>
					<td><code>x^2</code></td>
			</tr>
			<tr>
					<td>下标</td>
					<td><code>x_1</code></td>
			</tr>
			<tr>
					<td>求和</td>
					<td><code>\sum_{i=1}^{n}</code></td>
			</tr>
			<tr>
					<td>积分</td>
					<td><code>\int_a^b f(x)\,dx</code></td>
			</tr>
			<tr>
					<td>希腊字母</td>
					<td><code>\alpha</code>、<code>\beta</code>、<code>\pi</code></td>
			</tr>
			<tr>
					<td>矩阵</td>
					<td><code>\begin{bmatrix} a &amp; b \\ c &amp; d \end{bmatrix}</code></td>
			</tr>
	</tbody>
</table>
<p><strong>Word线性输入</strong></p>
<table>
	<thead>
			<tr>
					<th>内容</th>
					<th>打法</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>分式</td>
					<td><code>a/b</code> 空格</td>
			</tr>
			<tr>
					<td>上标</td>
					<td><code>x^2</code></td>
			</tr>
			<tr>
					<td>下标</td>
					<td><code>x_1</code></td>
			</tr>
			<tr>
					<td>根式</td>
					<td><code>\sqrt(x)</code></td>
			</tr>
			<tr>
					<td>希腊字母</td>
					<td><code>\alpha</code>、<code>\beta</code>、<code>\pi</code></td>
			</tr>
	</tbody>
</table>
<hr>
<p>写这篇的时候我就在想，要是当年有人给我这么一份东西，我也不至于在 Word 里浪费那么多周末。排版不是内容的核心，但它决定了你的内容以什么形象出现在别人面前——老师、评委、或者未来的你自己。</p>
<p>好了，就这些。如果你有什么排版上的问题，可以去我博客留言（虽然我不一定回）。</p>

        
        <hr><p>Published on 2026-09-06 at <a href='https://www.kuqilin.top/'>Kuqilin's Blog</a>, last modified on 2026-09-06</p><p>All articles on this blog are licensed under the BY-NC-SA license agreement unless otherwise stated. Please indicate the source when reprinting!</p>]]>
      </description>
      
        <category>教程</category>
      
    </item>
    
      
    

    <item>
      <title>Markdown &amp; LaTeX 全量测试文档</title>
      <link>https://www.kuqilin.top/en/post/fulltest/</link>
      <pubDate>Sun, 25 Jan 2026 14:45:32 &#43;0800</pubDate>
      <author>kuqilin@outlook.com (Kuqilin)</author>
      <guid>https://www.kuqilin.top/en/post/fulltest/</guid>
      <description>
        <![CDATA[<h1>Markdown & LaTeX 全量测试文档</h1><p>Author: Kuqilin(kuqilin@outlook.com)</p>
        
          <h1 id="markdown--latex-全语法测试文档">
<a class="header-anchor" href="#markdown--latex-%e5%85%a8%e8%af%ad%e6%b3%95%e6%b5%8b%e8%af%95%e6%96%87%e6%a1%a3"></a>
Markdown &amp; LaTeX 全语法测试文档
</h1><p><strong>说明</strong>：本文件包含 Markdown 基础/进阶语法、$\mathrm{\LaTeX}$ 行内/块级公式、特殊符号、表格公式融合、HTML 标签、图表等全场景测试，可直接在支持 $\mathrm{\LaTeX}$ 的 Markdown 编辑器（Typora、VS Code + Markdown All in One、Notion、Obsidian 等）中预览。</p>
<hr>
<h2 id="一markdown-基础语法测试">
<a class="header-anchor" href="#%e4%b8%80markdown-%e5%9f%ba%e7%a1%80%e8%af%ad%e6%b3%95%e6%b5%8b%e8%af%95"></a>
一、Markdown 基础语法测试
</h2><h3 id="11-标题1-6级">
<a class="header-anchor" href="#11-%e6%a0%87%e9%a2%981-6%e7%ba%a7"></a>
1.1 标题（1-6级）
</h3><h1 id="一级标题">
<a class="header-anchor" href="#%e4%b8%80%e7%ba%a7%e6%a0%87%e9%a2%98"></a>
一级标题
</h1><h2 id="二级标题">
<a class="header-anchor" href="#%e4%ba%8c%e7%ba%a7%e6%a0%87%e9%a2%98"></a>
二级标题
</h2><h3 id="三级标题">
<a class="header-anchor" href="#%e4%b8%89%e7%ba%a7%e6%a0%87%e9%a2%98"></a>
三级标题
</h3><h4 id="四级标题">
<a class="header-anchor" href="#%e5%9b%9b%e7%ba%a7%e6%a0%87%e9%a2%98"></a>
四级标题
</h4><h5 id="五级标题">
<a class="header-anchor" href="#%e4%ba%94%e7%ba%a7%e6%a0%87%e9%a2%98"></a>
五级标题
</h5><h6 id="六级标题">
<a class="header-anchor" href="#%e5%85%ad%e7%ba%a7%e6%a0%87%e9%a2%98"></a>
六级标题
</h6><h3 id="12-文本格式">
<a class="header-anchor" href="#12-%e6%96%87%e6%9c%ac%e6%a0%bc%e5%bc%8f"></a>
1.2 文本格式
</h3><p><strong>粗体文本</strong><br>
<em>斜体文本</em><br>
<em><strong>粗斜体文本</strong></em><br>
<del>删除线文本</del><br>
<u>下划线文本</u><br>
==高亮/标记文本==<br>
H<del>2</del>O（下标）<br>
X^2^（上标）<br>
<code>行内代码</code><br>
:emojicode:（Emoji 短码）</p>
<blockquote>
<p>引用文本</p>
<blockquote>
<p>嵌套引用文本</p>
<blockquote>
<p>三级嵌套引用</p>
<blockquote>
<p>四级嵌套引用（极限测试）</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<h3 id="13-列表">
<a class="header-anchor" href="#13-%e5%88%97%e8%a1%a8"></a>
1.3 列表
</h3><h4 id="无序列表">
<a class="header-anchor" href="#%e6%97%a0%e5%ba%8f%e5%88%97%e8%a1%a8"></a>
无序列表
</h4><ul>
<li>无序列表项1
<ul>
<li>嵌套无序列表项1-1
<ul>
<li>三级嵌套列表项1-1-1</li>
</ul>
</li>
<li>嵌套无序列表项1-2</li>
</ul>
</li>
<li>无序列表项2</li>
</ul>
<ul>
<li>无序列表项3（星号格式）</li>
</ul>
<ul>
<li>无序列表项4（加号格式）</li>
</ul>
<h4 id="有序列表">
<a class="header-anchor" href="#%e6%9c%89%e5%ba%8f%e5%88%97%e8%a1%a8"></a>
有序列表
</h4><ol>
<li>有序列表项1
<ol>
<li>嵌套有序列表项1-1</li>
<li>嵌套有序列表项1-2</li>
</ol>
</li>
<li>有序列表项2</li>
<li>有序列表项3</li>
</ol>
<h4 id="混合嵌套列表">
<a class="header-anchor" href="#%e6%b7%b7%e5%90%88%e5%b5%8c%e5%a5%97%e5%88%97%e8%a1%a8"></a>
混合嵌套列表
</h4><ol>
<li>第一步
<ul>
<li>子任务A</li>
<li>子任务B
<ol>
<li>子任务B-1</li>
<li>子任务B-2</li>
</ol>
</li>
</ul>
</li>
<li>第二步</li>
</ol>
<h4 id="任务列表">
<a class="header-anchor" href="#%e4%bb%bb%e5%8a%a1%e5%88%97%e8%a1%a8"></a>
任务列表
</h4><ul>
<li><input checked="" disabled="" type="checkbox"> 已完成任务</li>
<li><input disabled="" type="checkbox"> 未完成任务</li>
<li><input disabled="" type="checkbox"> 待跟进任务</li>
<li><input checked="" disabled="" type="checkbox"> <del>已废弃的任务</del></li>
</ul>
<h3 id="14-链接与图片">
<a class="header-anchor" href="#14-%e9%93%be%e6%8e%a5%e4%b8%8e%e5%9b%be%e7%89%87"></a>
1.4 链接与图片
</h3><h4 id="超链接">
<a class="header-anchor" href="#%e8%b6%85%e9%93%be%e6%8e%a5"></a>
超链接
</h4><p><a href="https://www.baidu.com" title="百度官网">普通超链接</a><br>
<a href="/en/post/fulltest/#%e4%b8%80%e3%80%81Markdown-%e5%9f%ba%e7%a1%80%e8%af%ad%e6%b3%95%e6%b5%8b%e8%af%95">锚点链接</a><br>
<a href="https://www.example.com" title="引用式链接示例">引用式链接</a><br>
<a href="mailto:test@example.com">mailto:test@example.com</a>（邮箱链接）<br>
<a href="https://www.github.com">https://www.github.com</a>（直接链接）</p>
<h4 id="图片">
<a class="header-anchor" href="#%e5%9b%be%e7%89%87"></a>
图片
</h4><p><img src="https://picsum.photos/200/200" 
     alt="图片占位符" 
     referrerpolicy="no-referrer" 
     loading="lazy" />
![带尺寸图片](<a href="https://picsum.photos/300/200">https://picsum.photos/300/200</a> =300x200 &ldquo;固定尺寸测试&rdquo;)</p>
<blockquote>
<p>图片引用：
<img src="https://picsum.photos/150/100" 
     alt="引用内图片" 
     referrerpolicy="no-referrer" 
     loading="lazy" /></p>
</blockquote>
<h4 id="图片链接">
<a class="header-anchor" href="#%e5%9b%be%e7%89%87%e9%93%be%e6%8e%a5"></a>
图片链接
</h4><p><a href="https://www.google.com"><img src="https://picsum.photos/100/100" 
     alt="图片链接" 
     referrerpolicy="no-referrer" 
     loading="lazy" /></a></p>
<h3 id="15-代码块">
<a class="header-anchor" href="#15-%e4%bb%a3%e7%a0%81%e5%9d%97"></a>
1.5 代码块
</h3><h4 id="行内代码">
<a class="header-anchor" href="#%e8%a1%8c%e5%86%85%e4%bb%a3%e7%a0%81"></a>
行内代码
</h4><p>行内代码示例：<code>print(&quot;Hello Markdown &amp; LaTeX&quot;)</code>、<code>sudo apt update</code>、<code>const x = 42</code></p>
<h4 id="块级代码带语法高亮">
<a class="header-anchor" href="#%e5%9d%97%e7%ba%a7%e4%bb%a3%e7%a0%81%e5%b8%a6%e8%af%ad%e6%b3%95%e9%ab%98%e4%ba%ae"></a>
块级代码（带语法高亮）
</h4><div class="highlight" name="text.py"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># Python 代码测试</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">add</span><span class="p">(</span><span class="n">a</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> <span class="n">b</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="s2">&#34;&#34;&#34;两数相加&#34;&#34;&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="n">a</span> <span class="o">+</span> <span class="n">b</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&#34;__main__&#34;</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">result</span> <span class="o">=</span> <span class="n">add</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&#34;结果：</span><span class="si">{</span><span class="n">result</span><span class="si">}</span><span class="s2">&#34;</span><span class="p">)</span>
</span></span></code></pre></div><div class="highlight" name="test.sh"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Bash 代码测试</span>
</span></span><span class="line"><span class="cl"><span class="c1">#!/bin/bash</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;测试Markdown代码块&#34;</span>
</span></span><span class="line"><span class="cl">ls -l <span class="p">|</span> grep <span class="s2">&#34;.md&#34;</span>
</span></span><span class="line"><span class="cl">mkdir <span class="nb">test</span> <span class="o">&amp;&amp;</span> <span class="nb">cd</span> <span class="nb">test</span>
</span></span></code></pre></div><div class="highlight" name="test.html"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="c">&lt;!-- HTML 代码测试 --&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;container&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>Markdown测试<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>这是HTML代码片段<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</span></span></code></pre></div><div class="highlight" name="test.js"><pre tabindex="0" class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"><span class="c1">// JavaScript 代码测试
</span></span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">fibonacci</span> <span class="o">=</span> <span class="p">(</span><span class="nx">n</span><span class="p">)</span> <span class="p">=&gt;</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="k">if</span> <span class="p">(</span><span class="nx">n</span> <span class="o">&lt;=</span> <span class="mi">1</span><span class="p">)</span> <span class="k">return</span> <span class="nx">n</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="k">return</span> <span class="nx">fibonacci</span><span class="p">(</span><span class="nx">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="nx">fibonacci</span><span class="p">(</span><span class="nx">n</span> <span class="o">-</span> <span class="mi">2</span><span class="p">);</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">fibonacci</span><span class="p">(</span><span class="mi">10</span><span class="p">));</span> <span class="c1">// 55
</span></span></span></code></pre></div><div class="highlight" name="test.json"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;name&#34;</span><span class="p">:</span> <span class="s2">&#34;Markdown Test&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;version&#34;</span><span class="p">:</span> <span class="s2">&#34;2.0.0&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;description&#34;</span><span class="p">:</span> <span class="s2">&#34;全量语法测试文档&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;features&#34;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&#34;Markdown&#34;</span><span class="p">,</span> <span class="s2">&#34;LaTeX&#34;</span><span class="p">,</span> <span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;Mermaid&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><div class="highlight" name="test.yaml"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># YAML 配置测试</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">server</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">localhost</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="m">8080</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">database</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">driver</span><span class="p">:</span><span class="w"> </span><span class="l">postgresql</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">connection</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;host=localhost dbname=test&#34;</span><span class="w">
</span></span></span></code></pre></div><div class="highlight" name="test.sql"><pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- SQL 查询测试
</span></span></span><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">u</span><span class="p">.</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="k">COUNT</span><span class="p">(</span><span class="n">o</span><span class="p">.</span><span class="n">id</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">order_count</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">FROM</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="n">u</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">LEFT</span><span class="w"> </span><span class="k">JOIN</span><span class="w"> </span><span class="n">orders</span><span class="w"> </span><span class="n">o</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">u</span><span class="p">.</span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">user_id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GROUP</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">u</span><span class="p">.</span><span class="n">name</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">HAVING</span><span class="w"> </span><span class="k">COUNT</span><span class="p">(</span><span class="n">o</span><span class="p">.</span><span class="n">id</span><span class="p">)</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">5</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">order_count</span><span class="w"> </span><span class="k">DESC</span><span class="p">;</span><span class="w">
</span></span></span></code></pre></div><h3 id="16-分割线">
<a class="header-anchor" href="#16-%e5%88%86%e5%89%b2%e7%ba%bf"></a>
1.6 分割线
</h3><hr>
<hr>
<hr>
<hr>
<h3 id="17-脚注">
<a class="header-anchor" href="#17-%e8%84%9a%e6%b3%a8"></a>
1.7 脚注
</h3><p>这是带脚注的文本<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>，这是第二个脚注<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup>，这是第三个脚注<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>。</p>
<h3 id="18-定义列表">
<a class="header-anchor" href="#18-%e5%ae%9a%e4%b9%89%e5%88%97%e8%a1%a8"></a>
1.8 定义列表
</h3><dl>
<dt>Markdown</dt>
<dd>一种轻量级标记语言，易读易写</dd>
<dt>$\mathrm{\LaTeX}$</dt>
<dd>一种专业的排版系统，适用于数学公式、论文排版</dd>
<dt>Markdown+$\mathrm{\LaTeX}$</dt>
<dd>结合轻量编辑与专业公式排版的高效组合</dd>
<dt>Git</dt>
<dd>分布式版本控制系统</dd>
<dd>由 Linus Torvalds 创建</dd>
</dl>
<h3 id="19-缩写abbr">
<a class="header-anchor" href="#19-%e7%bc%a9%e5%86%99abbr"></a>
1.9 缩写（ABBR）
</h3><p>*[HTML]: Hyper Text Markup Language
*[CSS]: Cascading Style Sheets
*[API]: Application Programming Interface</p>
<p>HTML 和 CSS 是现代 Web 开发的基础，而 API 是前后端交互的桥梁。</p>
<hr>
<h2 id="二markdown-进阶语法测试">
<a class="header-anchor" href="#%e4%ba%8cmarkdown-%e8%bf%9b%e9%98%b6%e8%af%ad%e6%b3%95%e6%b5%8b%e8%af%95"></a>
二、Markdown 进阶语法测试
</h2><h3 id="21-表格基础带格式带对齐">
<a class="header-anchor" href="#21-%e8%a1%a8%e6%a0%bc%e5%9f%ba%e7%a1%80%e5%b8%a6%e6%a0%bc%e5%bc%8f%e5%b8%a6%e5%af%b9%e9%bd%90"></a>
2.1 表格（基础/带格式/带对齐）
</h3><h4 id="基础表格">
<a class="header-anchor" href="#%e5%9f%ba%e7%a1%80%e8%a1%a8%e6%a0%bc"></a>
基础表格
</h4><table>
	<thead>
			<tr>
					<th>姓名</th>
					<th>年龄</th>
					<th>职业</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>张三</td>
					<td>20</td>
					<td>学生</td>
			</tr>
			<tr>
					<td>李四</td>
					<td>30</td>
					<td>工程师</td>
			</tr>
	</tbody>
</table>
<h4 id="带文本格式的表格">
<a class="header-anchor" href="#%e5%b8%a6%e6%96%87%e6%9c%ac%e6%a0%bc%e5%bc%8f%e7%9a%84%e8%a1%a8%e6%a0%bc"></a>
带文本格式的表格
</h4><table>
	<thead>
			<tr>
					<th>语法</th>
					<th>示例</th>
					<th>效果</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>粗体</td>
					<td><strong>Markdown</strong></td>
					<td><strong>粗体文本</strong></td>
			</tr>
			<tr>
					<td>斜体</td>
					<td><em>LaTeX</em></td>
					<td><em>斜体文本</em></td>
			</tr>
			<tr>
					<td>行内代码</td>
					<td><code>print()</code></td>
					<td><code>行内代码</code></td>
			</tr>
			<tr>
					<td>删除线</td>
					<td><del>废弃</del></td>
					<td><del>删除文本</del></td>
			</tr>
	</tbody>
</table>
<h4 id="带对齐的表格">
<a class="header-anchor" href="#%e5%b8%a6%e5%af%b9%e9%bd%90%e7%9a%84%e8%a1%a8%e6%a0%bc"></a>
带对齐的表格
</h4><table>
	<thead>
			<tr>
					<th style="text-align: left">左对齐</th>
					<th style="text-align: center">居中对齐</th>
					<th style="text-align: right">右对齐</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">内容1</td>
					<td style="text-align: center">内容2</td>
					<td style="text-align: right">内容3</td>
			</tr>
			<tr>
					<td style="text-align: left">长文本左对齐测试</td>
					<td style="text-align: center">长文本居中对齐测试</td>
					<td style="text-align: right">100</td>
			</tr>
			<tr>
					<td style="text-align: left">更长的文本左对齐测试内容</td>
					<td style="text-align: center">更长的文本居中对齐测试内容</td>
					<td style="text-align: right">99.9</td>
			</tr>
	</tbody>
</table>
<h4 id="空单元格与特殊内容表格">
<a class="header-anchor" href="#%e7%a9%ba%e5%8d%95%e5%85%83%e6%a0%bc%e4%b8%8e%e7%89%b9%e6%ae%8a%e5%86%85%e5%ae%b9%e8%a1%a8%e6%a0%bc"></a>
空单元格与特殊内容表格
</h4><table>
	<thead>
			<tr>
					<th style="text-align: left">项目</th>
					<th style="text-align: left">值</th>
					<th style="text-align: left">备注</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">空值</td>
					<td style="text-align: left"></td>
					<td style="text-align: left">左侧为空</td>
			</tr>
			<tr>
					<td style="text-align: left"></td>
					<td style="text-align: left">空键</td>
					<td style="text-align: left">左侧为空</td>
			</tr>
			<tr>
					<td style="text-align: left">竖线测试</td>
					<td style="text-align: left">`a</td>
					<td style="text-align: left">b</td>
			</tr>
			<tr>
					<td style="text-align: left">HTML</td>
					<td style="text-align: left"><kbd>Ctrl</kbd>+<kbd>C</kbd></td>
					<td style="text-align: left">HTML 标签</td>
			</tr>
	</tbody>
</table>
<h3 id="22-表情符号与-emoji">
<a class="header-anchor" href="#22-%e8%a1%a8%e6%83%85%e7%ac%a6%e5%8f%b7%e4%b8%8e-emoji"></a>
2.2 表情符号与 Emoji
</h3><p>😀 😎 📝 ✅ ⚠️ 📚 🔧 🎯 🚀 💡 🔥 ⭐ ❤️ 💻 🎉<br>
:smile: :book: :rocket: :check: :warning: :bulb: :fire: :star:</p>
<h3 id="23-目录部分编辑器支持">
<a class="header-anchor" href="#23-%e7%9b%ae%e5%bd%95%e9%83%a8%e5%88%86%e7%bc%96%e8%be%91%e5%99%a8%e6%94%af%e6%8c%81"></a>
2.3 目录（部分编辑器支持）
</h3><p>[TOC]</p>
<h3 id="24-数学公式标记latex-入口">
<a class="header-anchor" href="#24-%e6%95%b0%e5%ad%a6%e5%85%ac%e5%bc%8f%e6%a0%87%e8%ae%b0latex-%e5%85%a5%e5%8f%a3"></a>
2.4 数学公式标记（LaTeX 入口）
</h3><p>行内公式：$E=mc^2$</p>
<p>块级公式：
</p>
$$
\sum_{i=1}^n i = \frac{n(n+1)}{2}
$$<h3 id="25-html-标签测试">
<a class="header-anchor" href="#25-html-%e6%a0%87%e7%ad%be%e6%b5%8b%e8%af%95"></a>
2.5 HTML 标签测试
</h3><h4 id="文本标签">
<a class="header-anchor" href="#%e6%96%87%e6%9c%ac%e6%a0%87%e7%ad%be"></a>
文本标签
</h4><p><mark>高亮文本</mark><br>
<ins>插入文本</ins><br>
<del>删除文本</del><br>
<sup>上标</sup> 和 <sub>下标</sub><br>
<kbd>Ctrl</kbd> + <kbd>S</kbd><br>
<abbr title="HyperText Markup Language">HTML</abbr></p>
<h4 id="折叠详情块">
<a class="header-anchor" href="#%e6%8a%98%e5%8f%a0%e8%af%a6%e6%83%85%e5%9d%97"></a>
折叠/详情块
</h4><details>
<summary>点击展开详情</summary>
<p>这里是折叠的内容，可以包含<strong>Markdown</strong>、公式 $E=mc^2$，甚至代码块。</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;Hello from details!&#34;</span><span class="p">)</span>
</span></span></code></pre></div></details>
<details open>
<summary>默认展开的详情块</summary>
<p>此详情块默认展开。</p>
</details>
<h4 id="内联样式">
<a class="header-anchor" href="#%e5%86%85%e8%81%94%e6%a0%b7%e5%bc%8f"></a>
内联样式
</h4><p style="color: red;">红色文字</p>
<p style="text-align: center;">居中对齐文字</p>
<hr>
<h2 id="三latex-语法全测试">
<a class="header-anchor" href="#%e4%b8%89latex-%e8%af%ad%e6%b3%95%e5%85%a8%e6%b5%8b%e8%af%95"></a>
三、LaTeX 语法全测试
</h2><h3 id="31-行内公式基础">
<a class="header-anchor" href="#31-%e8%a1%8c%e5%86%85%e5%85%ac%e5%bc%8f%e5%9f%ba%e7%a1%80"></a>
3.1 行内公式（基础）
</h3><p>$a + b = c$<br>
$\sqrt{2} \approx 1.414$<br>
$\sin(\pi/2) = 1$<br>
$x^2 + y^2 = r^2$<br>
$\frac{1}{2} + \frac{1}{3} = \frac{5}{6}$<br>
$\vec{F} = m\vec{a}$<br>
$\overline{x} = \frac{1}{n}\sum_{i=1}^n x_i$</p>
<h3 id="32-块级公式基础">
<a class="header-anchor" href="#32-%e5%9d%97%e7%ba%a7%e5%85%ac%e5%bc%8f%e5%9f%ba%e7%a1%80"></a>
3.2 块级公式（基础）
</h3>$$
a^2 + 2ab + b^2 = (a + b)^2
$$$$
\lim_{x \to \infty} \frac{1}{x} = 0
$$$$
\int_{0}^{1} x^2 \, dx = \frac{1}{3}
$$<h3 id="33-代数数论公式">
<a class="header-anchor" href="#33-%e4%bb%a3%e6%95%b0%e6%95%b0%e8%ae%ba%e5%85%ac%e5%bc%8f"></a>
3.3 代数/数论公式
</h3>$$
\forall x \in \mathbb{R}, \exists y \in \mathbb{N}, \text{ s.t. } y > x
$$$$
a_n = a_1 + (n-1)d \quad (\text{等差数列通项})
$$$$
S_n = \frac{a_1(1-q^n)}{1-q} \quad (q \neq 1,\ \text{等比数列求和})
$$$$
\gcd(a,b) \times \operatorname{lcm}(a,b) = |a \times b|
$$$$
n! = \prod_{k=1}^{n} k \quad (\text{阶乘})
$$$$
\binom{n}{k} = \frac{n!}{k!(n-k)!} \quad (\text{二项式系数})
$$<h3 id="34-微积分公式">
<a class="header-anchor" href="#34-%e5%be%ae%e7%a7%af%e5%88%86%e5%85%ac%e5%bc%8f"></a>
3.4 微积分公式
</h3>$$
\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}
$$$$
\int_{a}^{b} f'(x) \, dx = f(b) - f(a) \quad (\text{牛顿-莱布尼茨公式})
$$$$
\iint_{D} f(x,y) \, dx\,dy \quad (\text{二重积分})
$$$$
\iiint_{\Omega} f(x,y,z) \, dx\,dy\,dz \quad (\text{三重积分})
$$$$
\oint_{C} P\,dx + Q\,dy = \iint_{D} \left( \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} \right) dx\,dy \quad (\text{格林公式})
$$$$
\nabla \cdot \mathbf{F} = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} + \frac{\partial F_z}{\partial z} \quad (\text{散度})
$$$$
\nabla \times \mathbf{F} = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\
F_x & F_y & F_z
\end{vmatrix} \quad (\text{旋度})
$$<h3 id="35-线性代数公式">
<a class="header-anchor" href="#35-%e7%ba%bf%e6%80%a7%e4%bb%a3%e6%95%b0%e5%85%ac%e5%bc%8f"></a>
3.5 线性代数公式
</h3>$$
\mathbf{A} = \begin{pmatrix}
a_{11} & a_{12} & \dots & a_{1n} \\
a_{21} & a_{22} & \dots & a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{m1} & a_{m2} & \dots & a_{mn}
\end{pmatrix}
$$$$
\det(\mathbf{A}) = \begin{vmatrix}
1 & 2 \\
3 & 4
\end{vmatrix} = 1 \times 4 - 2 \times 3 = -2
$$$$
\mathbf{A} \mathbf{x} = \lambda \mathbf{x} \quad (\text{特征值方程})
$$$$
\operatorname{rank}(\mathbf{A}) = \operatorname{rank}(\mathbf{A}^T)
$$$$
\mathbf{A}^{-1} = \frac{1}{\det(\mathbf{A})} \operatorname{adj}(\mathbf{A}) \quad (\text{逆矩阵})
$$$$
\| \mathbf{x} \|_2 = \sqrt{\sum_{i=1}^n x_i^2} \quad (\text{L2 范数})
$$<h3 id="36-集合论公式">
<a class="header-anchor" href="#36-%e9%9b%86%e5%90%88%e8%ae%ba%e5%85%ac%e5%bc%8f"></a>
3.6 集合论公式
</h3>$$
A \cup B = \{x \mid x \in A \lor x \in B\}
$$$$
A \cap B = \{x \mid x \in A \land x \in B\}
$$$$
A \setminus B = \{x \mid x \in A \land x \notin B\}
$$$$
\emptyset \subseteq A \subseteq U \quad (U \text{ 为全集})
$$$$
\bigcup_{i=1}^{n} A_i,\quad \bigcap_{i=1}^{n} A_i
$$$$
|A \cup B| = |A| + |B| - |A \cap B| \quad (\text{容斥原理})
$$$$
\mathcal{P}(A) = \{B \mid B \subseteq A\} \quad (\text{幂集})
$$<h3 id="37-逻辑命题公式">
<a class="header-anchor" href="#37-%e9%80%bb%e8%be%91%e5%91%bd%e9%a2%98%e5%85%ac%e5%bc%8f"></a>
3.7 逻辑/命题公式
</h3>$$
P \implies Q \quad (\text{蕴含})
$$$$
P \iff Q \quad (\text{等价})
$$$$
\neg P \quad (\text{非})
$$$$
P \lor Q \quad (\text{或}),\quad P \land Q \quad (\text{与})
$$$$
\exists x \in A, P(x) \quad (\text{存在量词}),\quad \forall x \in A, P(x) \quad (\text{全称量词})
$$$$
\top \quad (\text{永真}),\quad \bot \quad (\text{永假})
$$<h3 id="38-几何公式">
<a class="header-anchor" href="#38-%e5%87%a0%e4%bd%95%e5%85%ac%e5%bc%8f"></a>
3.8 几何公式
</h3>$$
V_{\text{球}} = \frac{4}{3} \pi R^3 \quad (\text{球的体积})
$$$$
S_{\text{圆台}} = \pi (r_1 + r_2) l + \pi r_1^2 + \pi r_2^2 \quad (\text{圆台表面积})
$$$$
\cos C = \frac{a^2 + b^2 - c^2}{2ab} \quad (\text{余弦定理})
$$$$
\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C} = 2R \quad (\text{正弦定理})
$$$$
d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} \quad (\text{两点间距离})
$$<h3 id="39-概率与统计">
<a class="header-anchor" href="#39-%e6%a6%82%e7%8e%87%e4%b8%8e%e7%bb%9f%e8%ae%a1"></a>
3.9 概率与统计
</h3>$$
P(A|B) = \frac{P(B|A)P(A)}{P(B)} \quad (\text{贝叶斯定理})
$$$$
\mathbb{E}[X] = \sum_{i=1}^n x_i P(X=x_i) \quad (\text{期望})
$$$$
\operatorname{Var}(X) = \mathbb{E}[(X-\mu)^2] = \mathbb{E}[X^2] - \mu^2 \quad (\text{方差})
$$$$
f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} \quad (\text{正态分布})
$$<h3 id="310-特殊函数符号">
<a class="header-anchor" href="#310-%e7%89%b9%e6%ae%8a%e5%87%bd%e6%95%b0%e7%ac%a6%e5%8f%b7"></a>
3.10 特殊函数/符号
</h3>$$
\ln x,\ \log_a x,\ e^x,\ \exp(x)
$$$$
\Gamma(z) = \int_0^\infty t^{z-1} e^{-t} \, dt \quad (\text{伽马函数})
$$$$
\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} \quad (\text{黎曼 Zeta 函数})
$$<p><strong>希腊字母</strong>：<br>
$\alpha,\ \beta,\ \gamma,\ \delta,\ \epsilon,\ \zeta,\ \eta,\ \theta,\ \iota,\ \kappa,\ \lambda,\ \mu,\ \nu,\ \xi,\ \pi,\ \rho,\ \sigma,\ \tau,\ \upsilon,\ \phi,\ \chi,\ \psi,\ \omega$</p>
<p><strong>大写希腊字母</strong>：<br>
$\Gamma,\ \Delta,\ \Theta,\ \Lambda,\ \Xi,\ \Pi,\ \Sigma,\ \Upsilon,\ \Phi,\ \Psi,\ \Omega$</p>
<p><strong>关系符号</strong>：<br>
$\geq,\ \leq,\ \neq,\ \approx,\ \equiv,\ \propto,\ \sim,\ \simeq,\ \gg,\ \ll$</p>
<p><strong>集合符号</strong>：<br>
$\in,\ \notin,\ \subseteq,\ \supseteq,\ \subset,\ \supset,\ \cap,\ \cup,\ \varnothing,\ \emptyset$</p>
<p><strong>运算符</strong>：<br>
$\sum,\ \prod,\ \lim,\ \int,\ \oint,\ \nabla,\ \Delta,\ \partial,\ \infty$</p>
<p><strong>箭头</strong>：<br>
$\to,\ \implies,\ \iff,\ \mapsto,\ \leftarrow,\ \rightarrow,\ \leftrightarrow,\ \uparrow,\ \downarrow,\ \Rightarrow,\ \Leftarrow,\ \Leftrightarrow$</p>
<p><strong>修饰符号</strong>：<br>
$\vec{a},\ \overrightarrow{AB},\ \bar{x},\ \hat{\theta},\ \tilde{x},\ \dot{x},\ \ddot{x},\ \widehat{ABC},\ \widetilde{xyz}$</p>
<h3 id="311-多行公式对齐分段">
<a class="header-anchor" href="#311-%e5%a4%9a%e8%a1%8c%e5%85%ac%e5%bc%8f%e5%af%b9%e9%bd%90%e5%88%86%e6%ae%b5"></a>
3.11 多行公式（对齐/分段）
</h3><h4 id="公式对齐align">
<a class="header-anchor" href="#%e5%85%ac%e5%bc%8f%e5%af%b9%e9%bd%90align"></a>
公式对齐（align）
</h4>$$
\begin{align*}
f(x) &= x^2 + 2x + 1 \\
     &= (x+1)^2 \\[4pt]
g(x) &= \sin x + \cos x \\
     &= \sqrt{2} \sin\left(x + \frac{\pi}{4}\right)
\end{align*}
$$<h4 id="多行公式gather">
<a class="header-anchor" href="#%e5%a4%9a%e8%a1%8c%e5%85%ac%e5%bc%8fgather"></a>
多行公式（gather）
</h4>$$
\begin{gather*}
E = mc^2 \\
a^2 + b^2 = c^2 \\
e^{i\pi} + 1 = 0
\end{gather*}
$$<h4 id="分段函数cases">
<a class="header-anchor" href="#%e5%88%86%e6%ae%b5%e5%87%bd%e6%95%b0cases"></a>
分段函数（cases）
</h4>$$
f(x) =
\begin{cases}
x,    & x > 0 \\
0,    & x = 0 \\
-x,   & x < 0
\end{cases}
$$<h4 id="多条件分段函数">
<a class="header-anchor" href="#%e5%a4%9a%e6%9d%a1%e4%bb%b6%e5%88%86%e6%ae%b5%e5%87%bd%e6%95%b0"></a>
多条件分段函数
</h4>$$
F(x) =
\begin{cases}
0,                         & x < a \\
\frac{x-a}{b-a},           & a \leq x < b \\
1,                         & x \geq b
\end{cases}
$$<h3 id="312-公式标注与编号">
<a class="header-anchor" href="#312-%e5%85%ac%e5%bc%8f%e6%a0%87%e6%b3%a8%e4%b8%8e%e7%bc%96%e5%8f%b7"></a>
3.12 公式标注与编号
</h3>$$
\sum_{i=1}^n i = \frac{n(n+1)}{2} \tag{1}
$$$$
E=mc^2 \quad \text{（质能方程）} \tag{2}
$$$$
\boxed{a^2 + b^2 = c^2} \quad (\text{勾股定理，带框})
$$<h3 id="313-array-环境">
<a class="header-anchor" href="#313-array-%e7%8e%af%e5%a2%83"></a>
3.13 array 环境
</h3>$$
\begin{array}{c|c|c}
\text{函数} & \text{导数} & \text{积分} \\
\hline
x^n & nx^{n-1} & \frac{x^{n+1}}{n+1} + C \\
\sin x & \cos x & -\cos x + C \\
e^x & e^x & e^x + C \\
\ln x & \frac{1}{x} & x\ln x - x + C
\end{array}
$$<h3 id="314-化学公式mhchem">
<a class="header-anchor" href="#314-%e5%8c%96%e5%ad%a6%e5%85%ac%e5%bc%8fmhchem"></a>
3.14 化学公式（mhchem）
</h3>$$
\ce{H2O <=> H+ + OH-}
$$$$
\ce{2H2 + O2 ->[\Delta] 2H2O}
$$$$
\ce{CO2 + C <=>[\text{高温}] 2CO}
$$<hr>
<h2 id="四markdown---融合测试">
<a class="header-anchor" href="#%e5%9b%9bmarkdown---%e8%9e%8d%e5%90%88%e6%b5%8b%e8%af%95"></a>
四、Markdown + $\mathrm{\LaTeX}$ 融合测试
</h2><h3 id="41-表格内嵌入--公式">
<a class="header-anchor" href="#41-%e8%a1%a8%e6%a0%bc%e5%86%85%e5%b5%8c%e5%85%a5--%e5%85%ac%e5%bc%8f"></a>
4.1 表格内嵌入 $\mathrm{\LaTeX}$ 公式
</h3><table>
	<thead>
			<tr>
					<th style="text-align: left">公式名称</th>
					<th style="text-align: center">$\mathrm{\LaTeX}$ 公式</th>
					<th style="text-align: left">说明</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">勾股定理</td>
					<td style="text-align: center">$a^2 + b^2 = c^2$</td>
					<td style="text-align: left">直角三角形边长关系</td>
			</tr>
			<tr>
					<td style="text-align: left">自然常数</td>
					<td style="text-align: center">$\displaystyle\lim_{n \to \infty} \left(1+\frac{1}{n}\right)^n = e$</td>
					<td style="text-align: left">数列极限定义</td>
			</tr>
			<tr>
					<td style="text-align: left">高斯积分</td>
					<td style="text-align: center">$\displaystyle\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}$</td>
					<td style="text-align: left">特殊定积分</td>
			</tr>
			<tr>
					<td style="text-align: left">欧拉公式</td>
					<td style="text-align: center">$e^{i\theta} = \cos\theta + i\sin\theta$</td>
					<td style="text-align: left">复指数与三角函数</td>
			</tr>
	</tbody>
</table>
<h3 id="42-列表内嵌入--公式">
<a class="header-anchor" href="#42-%e5%88%97%e8%a1%a8%e5%86%85%e5%b5%8c%e5%85%a5--%e5%85%ac%e5%bc%8f"></a>
4.2 列表内嵌入 $\mathrm{\LaTeX}$ 公式
</h3><ol>
<li>三角函数基本关系：$\sin^2 x + \cos^2 x = 1$</li>
<li>导数运算法则：$(uv)' = u'v + uv'$</li>
<li>矩阵运算：$\mathbf{A} + \mathbf{B} = \mathbf{B} + \mathbf{A}$（交换律）</li>
<li>积分中值定理：$\exists\ \xi \in [a,b],\ \int_a^b f(x)\,dx = f(\xi)(b-a)$</li>
</ol>
<h3 id="43-引用内嵌入--公式">
<a class="header-anchor" href="#43-%e5%bc%95%e7%94%a8%e5%86%85%e5%b5%8c%e5%85%a5--%e5%85%ac%e5%bc%8f"></a>
4.3 引用内嵌入 $\mathrm{\LaTeX}$ 公式
</h3><blockquote>
<p>正如欧拉公式所示：$e^{i\pi} + 1 = 0$，该公式被称为&quot;数学最美公式&quot;，融合了指数、虚数、圆周率、1 和 0 五大核心常数。</p>
</blockquote>
<blockquote>
<p><strong>泰勒展开</strong>：$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n$ 是微积分中最重要的工具之一，它将函数展开为幂级数形式。</p>
</blockquote>
<h3 id="44-代码块旁注--公式">
<a class="header-anchor" href="#44-%e4%bb%a3%e7%a0%81%e5%9d%97%e6%97%81%e6%b3%a8--%e5%85%ac%e5%bc%8f"></a>
4.4 代码块旁注 $\mathrm{\LaTeX}$ 公式
</h3><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># 计算圆的面积 S = πr² ，对应公式 $S = \pi r^2$</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">math</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">circle_area</span><span class="p">(</span><span class="n">r</span><span class="p">:</span> <span class="nb">float</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">float</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="s2">&#34;&#34;&#34;返回半径为 r 的圆面积&#34;&#34;&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="n">math</span><span class="o">.</span><span class="n">pi</span> <span class="o">*</span> <span class="n">r</span> <span class="o">**</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 验证：r=1 时，面积应等于 π</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">circle_area</span><span class="p">(</span><span class="mi">1</span><span class="p">))</span>  <span class="c1"># 3.141592653589793</span>
</span></span></code></pre></div><h3 id="45-任务列表嵌入公式">
<a class="header-anchor" href="#45-%e4%bb%bb%e5%8a%a1%e5%88%97%e8%a1%a8%e5%b5%8c%e5%85%a5%e5%85%ac%e5%bc%8f"></a>
4.5 任务列表嵌入公式
</h3><ul>
<li><input checked="" disabled="" type="checkbox"> 证明 $\sqrt{2}$ 是无理数</li>
<li><input disabled="" type="checkbox"> 推导 $\displaystyle\int_0^\infty \frac{\sin x}{x}\,dx = \frac{\pi}{2}$</li>
<li><input disabled="" type="checkbox"> 验证 $\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$</li>
</ul>
<hr>
<h2 id="五特殊场景测试">
<a class="header-anchor" href="#%e4%ba%94%e7%89%b9%e6%ae%8a%e5%9c%ba%e6%99%af%e6%b5%8b%e8%af%95"></a>
五、特殊场景测试
</h2><h3 id="51-转义字符">
<a class="header-anchor" href="#51-%e8%bd%ac%e4%b9%89%e5%ad%97%e7%ac%a6"></a>
5.1 转义字符
</h3><p><strong>Markdown 转义</strong>：<br>
<code>\#</code> <code>\*</code> <code>\_</code> <code>\~</code> <code>\</code> <code>\!</code> <code>\|</code> <code>\{</code> <code>\}</code> <code>\[</code> <code>\]</code> <code>\(</code> <code>\)</code></p>
<p><strong>LaTeX 转义</strong>：<br>
$\S\ \%\ \&\ \#\ \_\ \{\ \}\ \backslash$</p>
<h3 id="52-混合嵌套">
<a class="header-anchor" href="#52-%e6%b7%b7%e5%90%88%e5%b5%8c%e5%a5%97"></a>
5.2 混合嵌套
</h3><blockquote>
<p><strong>嵌套1</strong>：$f(x) = \displaystyle\int_{0}^{x} \sin t \, dt = 1 - \cos x$</p>
<ul>
<li>嵌套2：公式 $\displaystyle\prod_{k=1}^n k = n!$ 为阶乘的乘积形式
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">嵌套3：行内代码与公式 $x^3 - 3x + 1 = 0$
</span></span></code></pre></div></li>
<li>嵌套4：<code>行内代码</code></li>
</ul>
<blockquote>
<p>嵌套5：双重引用内嵌公式 $\nabla^2 \phi = 0$</p>
</blockquote>
</blockquote>
<h3 id="53-大篇幅公式矩阵求和">
<a class="header-anchor" href="#53-%e5%a4%a7%e7%af%87%e5%b9%85%e5%85%ac%e5%bc%8f%e7%9f%a9%e9%98%b5%e6%b1%82%e5%92%8c"></a>
5.3 大篇幅公式（矩阵+求和）
</h3>$$
\mathbf{M} = \sum_{k=1}^{n} \begin{bmatrix}
\cos k\theta & -\sin k\theta \\
\sin k\theta & \cos k\theta
\end{bmatrix}
= \frac{1}{2\sin\left(\frac{\theta}{2}\right)}
\begin{bmatrix}
\sin\left(\frac{n\theta}{2}\right)\cos\left(\frac{(n+1)\theta}{2}\right) &
-\sin\left(\frac{n\theta}{2}\right)\sin\left(\frac{(n+1)\theta}{2}\right) \\[8pt]
\sin\left(\frac{n\theta}{2}\right)\sin\left(\frac{(n+1)\theta}{2}\right) &
\sin\left(\frac{n\theta}{2}\right)\cos\left(\frac{(n+1)\theta}{2}\right)
\end{bmatrix}
$$<h3 id="54-连续公式块">
<a class="header-anchor" href="#54-%e8%bf%9e%e7%bb%ad%e5%85%ac%e5%bc%8f%e5%9d%97"></a>
5.4 连续公式块
</h3>$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$<p>
</p>
$$
\Delta = b^2 - 4ac
$$<p>
</p>
$$
\text{若 }\Delta > 0,\text{ 则方程有两个不等实根}
$$<h3 id="55-超长行内公式测试">
<a class="header-anchor" href="#55-%e8%b6%85%e9%95%bf%e8%a1%8c%e5%86%85%e5%85%ac%e5%bc%8f%e6%b5%8b%e8%af%95"></a>
5.5 超长行内公式测试
</h3><p>这是一段包含超长行内公式的文本：$\displaystyle\oint_{\partial\Omega} \omega = \int_{\Omega} d\omega$，该公式被称为广义斯托克斯定理，是微分几何中的核心定理之一。它统一了格林公式、高斯公式和斯托克斯公式。</p>
<h3 id="56-特殊-unicode-符号">
<a class="header-anchor" href="#56-%e7%89%b9%e6%ae%8a-unicode-%e7%ac%a6%e5%8f%b7"></a>
5.6 特殊 Unicode 符号
</h3><p>数学符号：∀ ∃ ∄ ∅ ∞ ± ∓ × ÷ √ ∝ ∟ ∠ ∡ ∢ ∣ ∥<br>
箭头：→ ← ↑ ↓ ↔ ↕ ⇒ ⇐ ⇔ ➔ ➤ ➜<br>
分数：½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞<br>
其他：℃ ℉ № ℗ ™ © ® § ¶ † ‡ • … ‰ € £ ¥ ₹</p>
<h3 id="57-水平线内嵌内容部分编辑器支持">
<a class="header-anchor" href="#57-%e6%b0%b4%e5%b9%b3%e7%ba%bf%e5%86%85%e5%b5%8c%e5%86%85%e5%ae%b9%e9%83%a8%e5%88%86%e7%bc%96%e8%be%91%e5%99%a8%e6%94%af%e6%8c%81"></a>
5.7 水平线内嵌内容（部分编辑器支持）
</h3><p>以下是一个带标题的水平分割线：</p>
<hr>
<h2 id="居中断面标题">
<a class="header-anchor" href="#%e5%b1%85%e4%b8%ad%e6%96%ad%e9%9d%a2%e6%a0%87%e9%a2%98"></a>
<strong>居中断面标题</strong>
</h2><h2 id="六mermaid-图表测试">
<a class="header-anchor" href="#%e5%85%admermaid-%e5%9b%be%e8%a1%a8%e6%b5%8b%e8%af%95"></a>
六、Mermaid 图表测试
</h2><h3 id="61-流程图">
<a class="header-anchor" href="#61-%e6%b5%81%e7%a8%8b%e5%9b%be"></a>
6.1 流程图
</h3><pre class="mermaid">
  graph TD
    A[开始] --> B{判断条件}
    B -->|是| C[执行操作A]
    B -->|否| D[执行操作B]
    C --> E[结束]
    D --> E
</pre><h3 id="62-时序图">
<a class="header-anchor" href="#62-%e6%97%b6%e5%ba%8f%e5%9b%be"></a>
6.2 时序图
</h3><pre class="mermaid">
  sequenceDiagram
    participant 客户端
    participant 服务器
    participant 数据库
    客户端->>服务器: 发送请求
    服务器->>数据库: 查询数据
    数据库-->>服务器: 返回结果
    服务器-->>客户端: 响应数据
</pre><h3 id="63-甘特图">
<a class="header-anchor" href="#63-%e7%94%98%e7%89%b9%e5%9b%be"></a>
6.3 甘特图
</h3><pre class="mermaid">
  gantt
    title 项目开发计划
    dateFormat  YYYY-MM-DD
    section 阶段一
    需求分析    :a1, 2026-01-01, 7d
    概要设计    :a2, after a1, 5d
    section 阶段二
    详细设计    :b1, after a2, 10d
    编码实现    :b2, after b1, 20d
    测试        :b3, after b2, 10d
</pre><h3 id="64-类图">
<a class="header-anchor" href="#64-%e7%b1%bb%e5%9b%be"></a>
6.4 类图
</h3><pre class="mermaid">
  classDiagram
    class Animal {
        +String name
        +int age
        +eat() void
        +sleep() void
    }
    class Dog {
        +bark() void
    }
    class Cat {
        +meow() void
    }
    Animal <|-- Dog
    Animal <|-- Cat
</pre><hr>
<p><strong>文档结束</strong>：本文件覆盖 Markdown 所有主流语法（基础+进阶）、LaTeX 核心公式场景（代数、微积分、线代、概率、集合、几何、化学等）、HTML 标签、Mermaid 图表及二者/多者融合用法，可作为 Markdown/LaTeX 语法速查与编辑器兼容性测试模板。</p>
<p>内容由 AI 生成</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>第一个脚注的内容&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>第二个脚注的内容，可包含<strong>粗体</strong>、<em>斜体</em>甚至行内代码<code>code</code>&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>第三个脚注，支持多段落。</p>
<p>这是脚注的第二段。&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>

        
        <hr><p>Published on 2026-01-25 at <a href='https://www.kuqilin.top/'>Kuqilin's Blog</a>, last modified on 2026-07-14</p><p>All articles on this blog are licensed under the BY-NC-SA license agreement unless otherwise stated. Please indicate the source when reprinting!</p>]]>
      </description>
      
    </item>
    
  </channel>
</rss>
