近期在整理《信号与系统》笔记时,通过Claude Code和DeepSeek的配合,在我稍加修改后,最后生成了一个我比较满意的Latex模板。

\documentclass[12pt,a4paper,openany]{ctexbook}

% ============ 页面设置 ============
\usepackage[top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}

% ============ 数学宏包 ============
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{mathtools}

% ============ 图形与颜色 ============
\usepackage{graphicx}
\usepackage{float}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
\graphicspath{./assets/}



% ============ 页眉页脚 ============
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\leftmark}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0.8pt}
\setlength{\headheight}{14.5pt}

% ============ 超链接 ============
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    urlcolor=cyan
}

% ============ 自定义盒子样式 ============
\newtcolorbox{definitionbox}{
    colback=blue!5!white,
    colframe=blue!75!black,
    fonttitle=\bfseries,
    title=定义,
    breakable
}

\newtcolorbox{propertybox}{
    colback=green!5!white,
    colframe=green!50!black,
    fonttitle=\bfseries,
    title=性质,
    breakable
}

\newtcolorbox{examplebox}{
    colback=yellow!5!white,
    colframe=yellow!50!black,
    fonttitle=\bfseries,
    title=例题,
    breakable
}

\newtcolorbox{formulabox}{
    colback=red!3!white,
    colframe=red!50!black,
    fonttitle=\bfseries,
    title=重要公式,
    breakable
}

\newtcolorbox{notebox}{
    colback=orange!5!white,
    colframe=orange!70!black,
    fonttitle=\bfseries,
    title=注意,
    breakable
}

% ============ 章节标题格式 ============
\ctexset{
    chapter={
        format={\centering\Huge\bfseries},
        name={第,章},
        number={\arabic{chapter}},
        beforeskip=20pt,
        afterskip=30pt
    },
    section={
        format={\Large\bfseries},
        beforeskip=15pt,
        afterskip=10pt
    },
    subsection={
        format={\large\bfseries},
        beforeskip=10pt,
        afterskip=5pt
    }
}

% ============ 行距 ============
\usepackage{setspace}
\onehalfspacing

\begin{document}

% ============ 封面 ============
\begin{titlepage}
    \begin{center}
        \vspace*{3cm}

        {\Huge\bfseries 信号与系统}

        \vspace{1cm}

        {\Large 课程讲义}

        \vspace{2cm}

        {\large 涵盖内容:}

        \vspace{0.5cm}
        \begin{itemize}
            \item 1
            \item 2
        \end{itemize}

        \vspace{2cm}

        {\large 作者:开心每一秒}

        \vspace{1cm}

        {\small 个人博客:www.happyeasec.top}

        \vfill

        \rule{0.6\textwidth}{0.4pt}

        \vspace{1cm}

        {\large \today}

    \end{center}
\end{titlepage}

\newpage
{\Large\bfseries 前言}

\vspace{1cm}

经过半个月的时间,这本讲义也是终于基本完成。讲义覆盖了信号与系统的基本概念、常见信号及其特性、
连续时域系统的时域分析、连续信号的频域分析、拉普拉斯变换、信号采样等内容。

个人能力有限,文章在编写过程中难免会有错误,欢迎指正。您可以通过我的个人邮箱联系我:happyeasec@yeah.net。
除此之外您也可以在我的个人博客上找到这篇文章的原稿以及其他配套资源:https://www.happyeasec.top/archives/67 。

文章在发现错误后会在我的金山文档知识库中更新。你还可以通过下面的二维码获得文章电子版。

本文严格遵循 CC BY-NC-SA 4.0 许可协议,欢迎分享、修改、重新发布。

\begin{flushright}
    开心每一秒

    {\today}
\end{flushright}

% ============ 目录 ============
\tableofcontents

% ============================================================
% 第一章:基本概念
% ============================================================
\chapter{章节标题}

\section{标题}

\subsection{子标题}

\begin{examplebox}

\end{examplebox}

\end{document}

image.png