Files
pengxiao c85bbd3c55 docs: 调整附录与第二章排版,补充模块/包说明
- AGENTS.md: 新增 Codex 代理说明文件
- .gitignore: 屏蔽第三方工具目录 (.prism/, .claudeprism/, .agents/)
- preamble: 启用 xcolor dvipsnames 选项,新增 GREEN 颜色与 \greenheading 命令
- ch02-framework: 修正智能体段落引号格式
- ap01-programming: 补充 Python 模块与包的对比说明(esp_engine 示例)
- ap02-vibe-coding: 应用 \greenheading 标题样式,强调 commit 作为审核检查点
- 移除 2026_DesignAI.code-workspace(放弃 workspace 持久化方案)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 11:31:25 +08:00

105 lines
2.5 KiB
TeX

% ========== 页面布局 ==========
\usepackage[top=2.54cm, bottom=2.54cm, left=3.17cm, right=3.17cm]{geometry}
% ========== 行距 ==========
\usepackage{setspace}
\doublespacing
% ========== 修复页眉高度警告 ==========
\setlength{\headheight}{14.49998pt}
% ========== 页眉页脚 ==========
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE]{\thepage}
\fancyhead[RE]{\leftmark}
\fancyhead[LO]{\rightmark}
\fancyhead[RO]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
% ========== 数学 ==========
\usepackage{amsmath,amssymb,mathtools}
% ========== 表格 ==========
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{longtable}
\usepackage{diagbox}
% ========== 图形 ==========
\usepackage{graphicx}
\usepackage{subfig}
\graphicspath{{figures/}{figures/ch01/}{figures/ch02/}{figures/ch03/}{figures/ch04/}{figures/ch05/}{figures/ch06/}{figures/ch07/}{figures/ch08/}{figures/ch09/}{figures/ch10/}{figures/ch11/}{figures/ch12/}{figures/ch13/}}
% ========== 代码 ==========
\usepackage{listings}
\lstset{
basicstyle=\ttfamily\small,
breaklines=true,
frame=single,
backgroundcolor=\color{gray!10},
keywordstyle=\color{blue},
commentstyle=\color{green!60!black},
stringstyle=\color{red},
numbers=left,
numberstyle=\tiny\color{gray},
xleftmargin=2em,
}
% ========== 颜色 ==========
\usepackage[dvipsnames]{xcolor}
\definecolor{GREEN}{RGB}{0,128,0}
% ========== 超链接 ==========
\usepackage{hyperref}
\usepackage{bookmark}
\hypersetup{
colorlinks=true,
linkcolor=blue!70!black,
citecolor=green!50!black,
urlcolor=blue!80!black,
bookmarksopen=true,
}
% ========== 参考文献 ==========
\usepackage[numbers,sort&compress]{natbib}
\bibliographystyle{plainnat}
% ========== 其他 ==========
\usepackage{enumitem}
\usepackage{tcolorbox}
% ========== 修复 pandoc longtable 无标题表格 ==========
\newcounter{none}
% ========== 修复 pandoc tightlist ==========
\providecommand{\tightlist}{}
% ========== 修复 pandoc passthrough ==========
\providecommand{\passthrough}[1]{#1}
% ========== 章节格式 ==========
\ctexset{
chapter = {
format = \huge\bfseries\centering,
nameformat = {},
titleformat = {},
beforeskip = 1ex,
afterskip = 2ex,
},
section = {
format = \Large\bfseries,
},
subsection = {
format = \large\bfseries,
},
}
% ========== 章节编号深度 ==========
\setcounter{secnumdepth}{3}
% ========== 绿色底色标题 ==========
\newcommand{\greenheading}[1]{\texorpdfstring{\colorbox{green!20}{\ #1\ }}{#1}}