🔄Update: 引入模板框架

This commit is contained in:
2026-01-14 09:57:04 +08:00
parent f73b3308ce
commit 1a3a7f5a23
33 changed files with 2676 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.
+350
View File
@@ -0,0 +1,350 @@
\documentclass{article}
\input{../note-setup}
\title{\LaTeX{} Note Template}
\author{Author}
\date{\today}
\extrainfo{Github: \href{https://github.com/fenglielie/latexzero}{https://github.com/fenglielie/latexzero}}
\begin{document}
% \maketitle
\makecover{../cover/cover.png}
\section{Theorem, Proposition, Proof}
\begin{theorem}
If $1<p<\infty$ and $m > n/p$, or $p=1$ and $m \ge n$, there exist a constant $C = C(m,n,\gamma,p)$, such that
\begin{equation*}
\Vert R^m u \Vert_{L^\infty(\Omega)} \le C d^{m-n/p} |u|_{W^m_p(\Omega)}
\end{equation*}
for all $u \in W^m_p(\Omega)$.
\end{theorem}
\begin{proof}
First, we assume that $u \in C^m(\Omega) \cap W^m_p(\Omega)$. We can use the pointwise representation of $R^mu(x)$.
\begin{align*}
|R^mu(x)| ={} & m \left| \sum_{|\alpha| = m} \int_{C_x} k_{\alpha}(x,z) D^\alpha u(z)\,dz \right| \notag \\
\le{} & C \sum_{|\alpha|=m} \int_{\Omega} |x-z|^{-n+m} |D^\alpha u(z)|\,dz \notag \\
\le{} & C' d^{m-n/p} |u|_{W^m_p(\Omega)}.
\end{align*}
The proof can be completed via a density argument.
\end{proof}
\begin{theorem}[xxx]
If $1<p<\infty$ and $m > n/p$, or $p=1$ and $m \ge n$, there exist a constant $C = C(m,n,\gamma,p)$, such that
\begin{equation*}
\Vert R^m u \Vert_{L^\infty(\Omega)} \le C d^{m-n/p} |u|_{W^m_p(\Omega)}
\end{equation*}
for all $u \in W^m_p(\Omega)$.
\end{theorem}
\begin{proof}[\upshape\bfseries Proof of xxx]
First, we assume that $u \in C^m(\Omega) \cap W^m_p(\Omega)$. We can use the pointwise representation of $R^mu(x)$.
\begin{align*}
|R^mu(x)| ={} & m \left| \sum_{|\alpha| = m} \int_{C_x} k_{\alpha}(x,z) D^\alpha u(z)\,dz \right| \notag \\
\le{} & C \sum_{|\alpha|=m} \int_{\Omega} |x-z|^{-n+m} |D^\alpha u(z)|\,dz \notag \\
\le{} & C' d^{m-n/p} |u|_{W^m_p(\Omega)}.
\end{align*}
The proof can be completed via a density argument.
\end{proof}
\begin{theorem*}
If $1<p<\infty$ and $m > n/p$, or $p=1$ and $m \ge n$, there exist a constant $C = C(m,n,\gamma,p)$, such that
\begin{equation*}
\Vert R^m u \Vert_{L^\infty(\Omega)} \le C d^{m-n/p} |u|_{W^m_p(\Omega)}
\end{equation*}
for all $u \in W^m_p(\Omega)$.
\end{theorem*}
\begin{proof}
First, we assume that $u \in C^m(\Omega) \cap W^m_p(\Omega)$. We can use the pointwise representation of $R^mu(x)$.
\begin{align*}
|R^mu(x)| ={} & m \left| \sum_{|\alpha| = m} \int_{C_x} k_{\alpha}(x,z) D^\alpha u(z)\,dz \right| \notag \\
\le{} & C \sum_{|\alpha|=m} \int_{\Omega} |x-z|^{-n+m} |D^\alpha u(z)|\,dz \notag \\
\le{} & C' d^{m-n/p} |u|_{W^m_p(\Omega)}.
\end{align*}
The proof can be completed via a density argument.
\end{proof}
\begin{proposition}
\begin{equation*}
Q^m u(x) = \sum_{|\lambda| < m} \left( \int_B \psi_\lambda(y) u(y)\,dy \right) x^\lambda
\end{equation*}
where $\psi_\lambda \in C_0^\infty(\mathbb{R}^n)$ and $\mathrm{supp}(\phi_\lambda) \in \overline{B}$.
\end{proposition}
\begin{proof}
This follows from xxx if we define
\begin{equation*}
\psi_\lambda(y) = \sum_{\alpha \ge \lambda,|\alpha|<m}
\frac{(-1)^{|\alpha|}}{\alpha !} a_{[\lambda,\alpha-\lambda]} D^\alpha(y^{\alpha-\lambda} \phi(y)).
\end{equation*}
\end{proof}
\begin{proposition}[xxx]
\begin{equation*}
Q^m u(x) = \sum_{|\lambda| < m} \left( \int_B \psi_\lambda(y) u(y)\,dy \right) x^\lambda
\end{equation*}
where $\psi_\lambda \in C_0^\infty(\mathbb{R}^n)$ and $\mathrm{supp}(\phi_\lambda) \in \overline{B}$.
\end{proposition}
\begin{proof}[\upshape\bfseries Proof of xxx]
This follows from xxx if we define
\begin{equation*}
\psi_\lambda(y) = \sum_{\alpha \ge \lambda,|\alpha|<m}
\frac{(-1)^{|\alpha|}}{\alpha !} a_{[\lambda,\alpha-\lambda]} D^\alpha(y^{\alpha-\lambda} \phi(y)).
\end{equation*}
\end{proof}
\begin{proposition*}
\begin{equation*}
Q^m u(x) = \sum_{|\lambda| < m} \left( \int_B \psi_\lambda(y) u(y)\,dy \right) x^\lambda
\end{equation*}
where $\psi_\lambda \in C_0^\infty(\mathbb{R}^n)$ and $\mathrm{supp}(\phi_\lambda) \in \overline{B}$.
\end{proposition*}
\begin{proof}
This follows from xxx if we define
\begin{equation*}
\psi_\lambda(y) = \sum_{\alpha \ge \lambda,|\alpha|<m}
\frac{(-1)^{|\alpha|}}{\alpha !} a_{[\lambda,\alpha-\lambda]} D^\alpha(y^{\alpha-\lambda} \phi(y)).
\end{equation*}
\end{proof}
\section{Corollary, Lemma, Claim}
\begin{corollary}
Under the assumption of xxx, the following inequality holds
\begin{equation*}
\inf_{v \in P^{m-1}} \Vert u - v \Vert_{W^k_p(\Omega)} \le C_{m,n,\gamma} d^{m-k} |u|_{W^k_p(\Omega)}, \,\, k = 0,1,\dots,m,
\end{equation*}
\end{corollary}
\begin{corollary}[xxx]
Under the assumption of xxx, the following inequality holds
\begin{equation*}
\inf_{v \in P^{m-1}} \Vert u - v \Vert_{W^k_p(\Omega)} \le C_{m,n,\gamma} d^{m-k} |u|_{W^k_p(\Omega)}, \,\, k = 0,1,\dots,m,
\end{equation*}
\end{corollary}
\begin{corollary*}
Under the assumption of xxx, the following inequality holds
\begin{equation*}
\inf_{v \in P^{m-1}} \Vert u - v \Vert_{W^k_p(\Omega)} \le C_{m,n,\gamma} d^{m-k} |u|_{W^k_p(\Omega)}, \,\, k = 0,1,\dots,m,
\end{equation*}
\end{corollary*}
\begin{lemma}
Let $f \in L^p(\Omega)$ for $p \ge 1$ and $m \ge 1$ and let
\[
g(x) = \int_\Omega |x-z|^{-n+m} |f(z)|\,dz
\]
Then
\begin{equation*}
\Vert g \Vert_{L^p(\Omega)} \le C_{m,n} d^m \Vert f\Vert_{L^p(\Omega)}.
\end{equation*}
\end{lemma}
\begin{lemma}[xxx]
Let $f \in L^p(\Omega)$ for $p \ge 1$ and $m \ge 1$ and let
\[
g(x) = \int_\Omega |x-z|^{-n+m} |f(z)|\,dz
\]
Then
\begin{equation*}
\Vert g \Vert_{L^p(\Omega)} \le C_{m,n} d^m \Vert f\Vert_{L^p(\Omega)}.
\end{equation*}
\end{lemma}
\begin{lemma*}
Let $f \in L^p(\Omega)$ for $p \ge 1$ and $m \ge 1$ and let
\[
g(x) = \int_\Omega |x-z|^{-n+m} |f(z)|\,dz
\]
Then
\begin{equation*}
\Vert g \Vert_{L^p(\Omega)} \le C_{m,n} d^m \Vert f\Vert_{L^p(\Omega)}.
\end{equation*}
\end{lemma*}
\begin{claim}
$Q^m u$ is a polynomial of degree less than $m$ in $x$.
\end{claim}
\begin{claim}[xxx]
$Q^m u$ is a polynomial of degree less than $m$ in $x$.
\end{claim}
\begin{claim*}
$Q^m u$ is a polynomial of degree less than $m$ in $x$.
\end{claim*}
\section{Definition}
\begin{definition}
$\Omega$ is star-shaped with respect to the ball $B$ if , for all $x \in \Omega$, the closed convex hull of $\{x\} \cup B$ is a subset of $\Omega$.
\end{definition}
\begin{definition}[xxx]
$\Omega$ is star-shaped with respect to the ball $B$ if , for all $x \in \Omega$, the closed convex hull of $\{x\} \cup B$ is a subset of $\Omega$.
\end{definition}
\begin{definition*}
$\Omega$ is star-shaped with respect to the ball $B$ if , for all $x \in \Omega$, the closed convex hull of $\{x\} \cup B$ is a subset of $\Omega$.
\end{definition*}
\section{Example}
\begin{example}
The integral form of the Taylor remainder for $f \in C^m([0,1])$ is given by
\begin{equation*}
f(s) = \sum_{k=0}^{m-1}\frac{1}{k!} f^{(k)}(0) + \int_0^s \frac{1}{(m-1)!} f^{(m)}(t)(s-t)^{m-1}\,dt.
\end{equation*}
\end{example}
\begin{example}[xxx]
The integral form of the Taylor remainder for $f \in C^m([0,1])$ is given by
\begin{equation*}
f(s) = \sum_{k=0}^{m-1}\frac{1}{k!} f^{(k)}(0) + \int_0^s \frac{1}{(m-1)!} f^{(m)}(t)(s-t)^{m-1}\,dt.
\end{equation*}
\end{example}
\begin{example*}
The integral form of the Taylor remainder for $f \in C^m([0,1])$ is given by
\begin{equation*}
f(s) = \sum_{k=0}^{m-1}\frac{1}{k!} f^{(k)}(0) + \int_0^s \frac{1}{(m-1)!} f^{(m)}(t)(s-t)^{m-1}\,dt.
\end{equation*}
\end{example*}
\section{Problem, Solution}
\begin{problem}
Calculate the integral of the function $g(x) = 3x^2$ with respect to $x$.
\end{problem}
\begin{solution}
To calculate the integral of $g(x) = 3x^2$, we use the power rule for integration:
\[
\int 3x^2 \, dx = x^3 + C
\]
where $C$ is the constant of integration.
\end{solution}
\begin{problem}[xxx]
Calculate the integral of the function $g(x) = 3x^2$ with respect to $x$.
\end{problem}
\begin{solution}[xxx]
To calculate the integral of $g(x) = 3x^2$, we use the power rule for integration:
\[
\int 3x^2 \, dx = x^3 + C
\]
where $C$ is the constant of integration.
\end{solution}
\begin{problem*}
Calculate the integral of the function $g(x) = 3x^2$ with respect to $x$.
\end{problem*}
\begin{solution*}
To calculate the integral of $g(x) = 3x^2$, we use the power rule for integration:
\[
\int 3x^2 \, dx = x^3 + C
\]
where $C$ is the constant of integration.
\end{solution*}
\section{Remark}
\begin{remark}
Such a polynomial is not unique, due to the choice od cut-off function $\phi$.
\end{remark}
\begin{remark}[xxx]
Such a polynomial is not unique, due to the choice od cut-off function $\phi$.
\end{remark}
\begin{remark*}
Such a polynomial is not unique, due to the choice od cut-off function $\phi$.
\end{remark*}
\section{Note}
\begin{note}
The degree of $Q^m u$ is at most $m-1$.
\end{note}
\begin{note}[xxx]
The degree of $Q^m u$ is at most $m-1$.
\end{note}
\begin{note*}
The degree of $Q^m u$ is at most $m-1$.
\end{note*}
\section{lstlisting}
\begin{lstlisting}[language=Python,caption={hello world}]
def hello():
print("Hello, world!")
hello()
\end{lstlisting}
\begin{lstlisting}[language=Python,caption={hanoi.py}]
step = 1
def hanoi(n, a, b, c, depth=0):
def move(n, a, c):
global step
print(" " * depth, end="")
print(f"{step=}: move [{n}] from {a} to {c}")
step += 1
if n == 1:
move(n, a, c)
else:
hanoi(n - 1, a, c, b, depth=depth + 1)
move(n, a, c)
hanoi(n - 1, b, a, c, depth=depth + 1)
if __name__ == "__main__":
n = int(input("Hanoi Problem, N = "))
hanoi(n, "A", "B", "C")
\end{lstlisting}
\section{algorithm}
\begin{algorithm}[H]
\KwIn{This is some input}
\KwOut{This is some output}
\SetAlgoLined
\SetNoFillComment
\tcc{This is a comment}
\vspace{3mm}
some code here\;
$x \leftarrow 0$\;
$y \leftarrow 0$\;
\uIf{$ x > 5$} {
x is greater than 5 \tcp*{This is also a comment}
}
\Else {
x is less than or equal to 5\;
}
\ForEach{y in 0..5} {
$y \leftarrow y + 1$\;
}
\For{$y$ in $0..5$} {
$y \leftarrow y - 1$\;
}
\While{$x > 5$} {
$x \leftarrow x - 1$\;
}
\Return Return something here\;
\caption{what}
\end{algorithm}
\section{cbox}
\begin{cbox}
Whenever you feel like criticizing any one, just remember that all the people in this world haven't had the advantages that you've had. (The Great Gatsby)
\end{cbox}
\end{document}
+88
View File
@@ -0,0 +1,88 @@
\documentclass{article}
\input{../note-setup-leftsidebox}
\title{\LaTeX{} Note Template}
\author{}
\date{}
\begin{document}
\section{Demo}
\begin{theorem}[xxx]
If $1<p<\infty$ and $m > n/p$, or $p=1$ and $m \ge n$, there exist a constant $C = C(m,n,\gamma,p)$, such that
\begin{equation*}
\Vert R^m u \Vert_{L^\infty(\Omega)} \le C d^{m-n/p} |u|_{W^m_p(\Omega)}
\end{equation*}
for all $u \in W^m_p(\Omega)$.
\end{theorem}
\begin{proof}[\upshape\bfseries Proof of xxx]
First, we assume that $u \in C^m(\Omega) \cap W^m_p(\Omega)$. We can use the pointwise representation of $R^mu(x)$.
\begin{align*}
|R^mu(x)| ={} m \left| \sum_{|\alpha| = m} \int_{C_x} k_{\alpha}(x,z) D^\alpha u(z)\,dz \right|
\le{} C \sum_{|\alpha|=m} \int_{\Omega} |x-z|^{-n+m} |D^\alpha u(z)|\,dz
\le{} C' d^{m-\frac{n}{p}} |u|_{W^m_p(\Omega)}.
\end{align*}
The proof can be completed via a density argument.
\end{proof}
\begin{proposition}[xxx]
\begin{equation*}
Q^m u(x) = \sum_{|\lambda| < m} \left( \int_B \psi_\lambda(y) u(y)\,dy \right) x^\lambda
\end{equation*}
where $\psi_\lambda \in C_0^\infty(\mathbb{R}^n)$ and $\mathrm{supp}(\phi_\lambda) \in \overline{B}$.
\end{proposition}
\begin{corollary}[xxx]
Under the assumption of xxx, the following inequality holds
\begin{equation*}
\inf_{v \in P^{m-1}} \Vert u - v \Vert_{W^k_p(\Omega)} \le C_{m,n,\gamma} d^{m-k} |u|_{W^k_p(\Omega)}, \,\, k = 0,1,\dots,m,
\end{equation*}
\end{corollary}
\begin{lemma}[xxx]
Let $f \in L^p(\Omega)$ for $p \ge 1$ and $m \ge 1$ and let $g(x) = \int_\Omega |x-z|^{-n+m} |f(z)|\,dz$.
Then $\Vert g \Vert_{L^p(\Omega)} \le C_{m,n} d^m \Vert f\Vert_{L^p(\Omega)}$.
\end{lemma}
\begin{claim}[xxx]
$Q^m u$ is a polynomial of degree less than $m$ in $x$.
\end{claim}
\begin{definition}[xxx]
$\Omega$ is star-shaped with respect to the ball $B$ if , for all $x \in \Omega$, the closed convex hull of $\{x\} \cup B$ is a subset of $\Omega$.
\end{definition}
\begin{example}[xxx]
The integral form of the Taylor remainder for $f \in C^m([0,1])$ is given by
\begin{equation*}
f(s) = \sum_{k=0}^{m-1}\frac{1}{k!} f^{(k)}(0) + \int_0^s \frac{1}{(m-1)!} f^{(m)}(t)(s-t)^{m-1}\,dt.
\end{equation*}
\end{example}
\begin{problem}[xxx]
Calculate the integral of the function $g(x) = 3x^2$ with respect to $x$.
\end{problem}
\begin{solution}[xxx]
To calculate the integral of $g(x) = 3x^2$, we use the power rule for integration:
\[
\int 3x^2 \, dx = x^3 + C
\]
where $C$ is the constant of integration.
\end{solution}
\begin{remark}[xxx]
Such a polynomial is not unique, due to the choice od cut-off function $\phi$.
\end{remark}
\begin{note}[xxx]
The degree of $Q^m u$ is at most $m-1$.
\end{note}
\end{document}
+15
View File
@@ -0,0 +1,15 @@
\documentclass{article}
\input{./note-setup}
% \usepackage{biblatex}
% \addbibresource{reference.bib}
\title{Title}
\author{Author}
\date{\today}
\begin{document}
\maketitle
\end{document}
+160
View File
@@ -0,0 +1,160 @@
%================================
% note-setup-borderless.tex
% fenglielie@qq.com 2025-09-12
%================================
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{extarrows}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{anyfontsize}
\usepackage{booktabs,multirow,multicol}
\usepackage[shortlabels,inline]{enumitem}
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{
{./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/}
}
\usepackage{subcaption}
\usepackage[ruled,linesnumbered,noline]{algorithm2e}
\usepackage{listings}
\lstdefinestyle{simpleStyle}{
basicstyle=\ttfamily\small,
breaklines=true,
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\color{violet},
commentstyle=\color[RGB]{34,139,34},
showstringspaces=false,
numbers=left,
numbersep=2em,
numberstyle=\footnotesize,
frame=single,
framesep=1em,
}
\lstset{style=simpleStyle}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,linkcolor=,urlcolor=cyan
}
\renewcommand*{\proofname}{\normalfont\bfseries Proof}
\usepackage{thmtools}
%% define environments
\declaretheorem[style=plain, name=Theorem, numbered=yes, numberwithin=section]{theorem}
\declaretheorem[style=plain, name=Theorem, numbered=no]{theorem*}
\declaretheorem[style=plain, name=Proposition, numbered=yes, sibling=theorem]{proposition}
\declaretheorem[style=plain, name=Proposition, numbered=no]{proposition*}
\declaretheorem[style=plain, name=Corollary, numbered=yes, sibling=theorem]{corollary}
\declaretheorem[style=plain, name=Corollary, numbered=no]{corollary*}
\declaretheorem[style=plain, name=Lemma, numbered=yes, sibling=theorem]{lemma}
\declaretheorem[style=plain, name=Lemma, numbered=no]{lemma*}
\declaretheorem[style=plain, name=Claim, numbered=yes, sibling=theorem]{claim}
\declaretheorem[style=plain, name=Claim, numbered=no]{claim*}
\declaretheorem[style=definition, name=Definition, numbered=yes, numberwithin=section]{definition}
\declaretheorem[style=definition, name=Definition, numbered=no]{definition*}
\declaretheorem[style=definition, name=Example, numbered=yes, numberwithin=section]{example}
\declaretheorem[style=definition, name=Example, numbered=no]{example*}
\declaretheorem[style=definition, name=Problem, numbered=yes, numberwithin=section]{problem}
\declaretheorem[style=definition, name=Problem, numbered=no]{problem*}
\declaretheorem[style=remark, name=Remark, numbered=yes, numberwithin=section]{remark}
\declaretheorem[style=remark, name=Remark, numbered=no]{remark*}
\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle}
\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note}
\declaretheorem[style=notestyle, name=Note, numbered=no]{note*}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle}
\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution}
\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*}
\usepackage[most]{tcolorbox}
\newcommand{\newtcbenvironment}[2]{
\tcolorboxenvironment{#1}{#2, enhanced, breakable, sharp corners, boxrule=0pt, colframe=white}
\tcolorboxenvironment{#1*}{#2, enhanced, breakable, rounded corners, boxrule=0pt, colframe=white}
}
%% define styles
\newtcbenvironment{theorem}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{proposition}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{corollary}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{lemma}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{claim}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{definition}{colframe=ForestGreen, colback=ForestGreen!5}
\newtcbenvironment{example}{colframe=RawSienna, colback=RawSienna!5}
\newtcbenvironment{problem}{colframe=WildStrawberry!30, colback=WildStrawberry!5}
%% cbox
\newtcolorbox{cbox}[1][]{%
enhanced,
breakable,
sharp corners,
leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt,
colframe=SkyBlue,
colback=SkyBlue!8,
#1
}
%% cover
\usepackage{titling}
\newcommand{\extrainfo}{}
\renewcommand{\extrainfo}[1]{\renewcommand{\extrainfocontent}{#1}}
\newcommand{\extrainfocontent}{}
\newcommand{\makecover}[1]{%
\begin{titlepage}
\newgeometry{margin=0in}
\parindent=0pt
\includegraphics[width=\linewidth]{#1} % size = 1280*1024
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft{\bfseries \Huge \thetitle} \\[0.6pt]
\rule{0.618\textwidth}{4pt} \\
}
\end{center}
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft\Large
\begin{tabular}{r}
\theauthor \\
\thedate \\
\end{tabular}%
}
\end{center}
\vfill
\begin{center}
\parbox[t]{0.7\textwidth}{\centering \itshape \extrainfocontent}
\end{center}
\vfill
\end{titlepage}
\restoregeometry
\thispagestyle{empty}
}
% USAGE
% \extrainfo{xxx}
% \makecover{/path/to/cover.png}
+160
View File
@@ -0,0 +1,160 @@
%================================
% note-setup-box.tex
% fenglielie@qq.com 2025-09-12
%================================
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{extarrows}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{anyfontsize}
\usepackage{booktabs,multirow,multicol}
\usepackage[shortlabels,inline]{enumitem}
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{
{./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/}
}
\usepackage{subcaption}
\usepackage[ruled,linesnumbered,noline]{algorithm2e}
\usepackage{listings}
\lstdefinestyle{simpleStyle}{
basicstyle=\ttfamily\small,
breaklines=true,
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\color{violet},
commentstyle=\color[RGB]{34,139,34},
showstringspaces=false,
numbers=left,
numbersep=2em,
numberstyle=\footnotesize,
frame=single,
framesep=1em,
}
\lstset{style=simpleStyle}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,linkcolor=,urlcolor=cyan
}
\renewcommand*{\proofname}{\normalfont\bfseries Proof}
\usepackage{thmtools}
%% define environments
\declaretheorem[style=plain, name=Theorem, numbered=yes, numberwithin=section]{theorem}
\declaretheorem[style=plain, name=Theorem, numbered=no]{theorem*}
\declaretheorem[style=plain, name=Proposition, numbered=yes, sibling=theorem]{proposition}
\declaretheorem[style=plain, name=Proposition, numbered=no]{proposition*}
\declaretheorem[style=plain, name=Corollary, numbered=yes, sibling=theorem]{corollary}
\declaretheorem[style=plain, name=Corollary, numbered=no]{corollary*}
\declaretheorem[style=plain, name=Lemma, numbered=yes, sibling=theorem]{lemma}
\declaretheorem[style=plain, name=Lemma, numbered=no]{lemma*}
\declaretheorem[style=plain, name=Claim, numbered=yes, sibling=theorem]{claim}
\declaretheorem[style=plain, name=Claim, numbered=no]{claim*}
\declaretheorem[style=definition, name=Definition, numbered=yes, numberwithin=section]{definition}
\declaretheorem[style=definition, name=Definition, numbered=no]{definition*}
\declaretheorem[style=definition, name=Example, numbered=yes, numberwithin=section]{example}
\declaretheorem[style=definition, name=Example, numbered=no]{example*}
\declaretheorem[style=definition, name=Problem, numbered=yes, numberwithin=section]{problem}
\declaretheorem[style=definition, name=Problem, numbered=no]{problem*}
\declaretheorem[style=remark, name=Remark, numbered=yes, numberwithin=section]{remark}
\declaretheorem[style=remark, name=Remark, numbered=no]{remark*}
\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle}
\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note}
\declaretheorem[style=notestyle, name=Note, numbered=no]{note*}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle}
\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution}
\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*}
\usepackage[most]{tcolorbox}
\newcommand{\newtcbenvironment}[2]{
\tcolorboxenvironment{#1}{#2, enhanced, breakable, sharp corners, boxrule=1pt}
\tcolorboxenvironment{#1*}{#2, enhanced, breakable, rounded corners, boxrule=1pt}
}
%% define styles
\newtcbenvironment{theorem}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{proposition}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{corollary}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{lemma}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{claim}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{definition}{colframe=ForestGreen, colback=ForestGreen!5}
\newtcbenvironment{example}{colframe=RawSienna, colback=RawSienna!5}
\newtcbenvironment{problem}{colframe=WildStrawberry!30, colback=WildStrawberry!5}
%% cbox
\newtcolorbox{cbox}[1][]{%
enhanced,
breakable,
sharp corners,
leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt,
colframe=SkyBlue,
colback=SkyBlue!8,
#1
}
%% cover
\usepackage{titling}
\newcommand{\extrainfo}{}
\renewcommand{\extrainfo}[1]{\renewcommand{\extrainfocontent}{#1}}
\newcommand{\extrainfocontent}{}
\newcommand{\makecover}[1]{%
\begin{titlepage}
\newgeometry{margin=0in}
\parindent=0pt
\includegraphics[width=\linewidth]{#1} % size = 1280*1024
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft{\bfseries \Huge \thetitle} \\[0.6pt]
\rule{0.618\textwidth}{4pt} \\
}
\end{center}
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft\Large
\begin{tabular}{r}
\theauthor \\
\thedate \\
\end{tabular}%
}
\end{center}
\vfill
\begin{center}
\parbox[t]{0.7\textwidth}{\centering \itshape \extrainfocontent}
\end{center}
\vfill
\end{titlepage}
\restoregeometry
\thispagestyle{empty}
}
% USAGE
% \extrainfo{xxx}
% \makecover{/path/to/cover.png}
+160
View File
@@ -0,0 +1,160 @@
%================================
% note-setup-leftsidebox.tex
% fenglielie@qq.com 2025-09-12
%================================
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{extarrows}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{anyfontsize}
\usepackage{booktabs,multirow,multicol}
\usepackage[shortlabels,inline]{enumitem}
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{
{./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/}
}
\usepackage{subcaption}
\usepackage[ruled,linesnumbered,noline]{algorithm2e}
\usepackage{listings}
\lstdefinestyle{simpleStyle}{
basicstyle=\ttfamily\small,
breaklines=true,
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\color{violet},
commentstyle=\color[RGB]{34,139,34},
showstringspaces=false,
numbers=left,
numbersep=2em,
numberstyle=\footnotesize,
frame=single,
framesep=1em,
}
\lstset{style=simpleStyle}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,linkcolor=,urlcolor=cyan
}
\renewcommand*{\proofname}{\normalfont\bfseries Proof}
\usepackage{thmtools}
%% define environments
\declaretheorem[style=plain, name=Theorem, numbered=yes, numberwithin=section]{theorem}
\declaretheorem[style=plain, name=Theorem, numbered=no]{theorem*}
\declaretheorem[style=plain, name=Proposition, numbered=yes, sibling=theorem]{proposition}
\declaretheorem[style=plain, name=Proposition, numbered=no]{proposition*}
\declaretheorem[style=plain, name=Corollary, numbered=yes, sibling=theorem]{corollary}
\declaretheorem[style=plain, name=Corollary, numbered=no]{corollary*}
\declaretheorem[style=plain, name=Lemma, numbered=yes, sibling=theorem]{lemma}
\declaretheorem[style=plain, name=Lemma, numbered=no]{lemma*}
\declaretheorem[style=plain, name=Claim, numbered=yes, sibling=theorem]{claim}
\declaretheorem[style=plain, name=Claim, numbered=no]{claim*}
\declaretheorem[style=definition, name=Definition, numbered=yes, numberwithin=section]{definition}
\declaretheorem[style=definition, name=Definition, numbered=no]{definition*}
\declaretheorem[style=definition, name=Example, numbered=yes, numberwithin=section]{example}
\declaretheorem[style=definition, name=Example, numbered=no]{example*}
\declaretheorem[style=definition, name=Problem, numbered=yes, numberwithin=section]{problem}
\declaretheorem[style=definition, name=Problem, numbered=no]{problem*}
\declaretheorem[style=remark, name=Remark, numbered=yes, numberwithin=section]{remark}
\declaretheorem[style=remark, name=Remark, numbered=no]{remark*}
\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle}
\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note}
\declaretheorem[style=notestyle, name=Note, numbered=no]{note*}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle}
\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution}
\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*}
\usepackage[most]{tcolorbox}
\newcommand{\newtcbenvironment}[2]{
\tcolorboxenvironment{#1}{#2, enhanced, breakable, sharp corners,leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt}
\tcolorboxenvironment{#1*}{#2, enhanced, breakable, rounded corners,leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt}
}
%% define styles
\newtcbenvironment{theorem}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{proposition}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{corollary}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{lemma}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{claim}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{definition}{colframe=ForestGreen, colback=ForestGreen!5}
\newtcbenvironment{example}{colframe=RawSienna, colback=RawSienna!5}
\newtcbenvironment{problem}{colframe=WildStrawberry!30, colback=WildStrawberry!5}
%% cbox
\newtcolorbox{cbox}[1][]{%
enhanced,
breakable,
sharp corners,
leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt,
colframe=SkyBlue,
colback=SkyBlue!8,
#1
}
%% cover
\usepackage{titling}
\newcommand{\extrainfo}{}
\renewcommand{\extrainfo}[1]{\renewcommand{\extrainfocontent}{#1}}
\newcommand{\extrainfocontent}{}
\newcommand{\makecover}[1]{%
\begin{titlepage}
\newgeometry{margin=0in}
\parindent=0pt
\includegraphics[width=\linewidth]{#1} % size = 1280*1024
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft{\bfseries \Huge \thetitle} \\[0.6pt]
\rule{0.618\textwidth}{4pt} \\
}
\end{center}
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft\Large
\begin{tabular}{r}
\theauthor \\
\thedate \\
\end{tabular}%
}
\end{center}
\vfill
\begin{center}
\parbox[t]{0.7\textwidth}{\centering \itshape \extrainfocontent}
\end{center}
\vfill
\end{titlepage}
\restoregeometry
\thispagestyle{empty}
}
% USAGE
% \extrainfo{xxx}
% \makecover{/path/to/cover.png}
+157
View File
@@ -0,0 +1,157 @@
%================================
% note-setup-mdframed.tex
% fenglielie@qq.com 2025-10-22
%================================
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{extarrows}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{anyfontsize}
\usepackage{booktabs,multirow,multicol}
\usepackage[shortlabels,inline]{enumitem}
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{
{./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/}
}
\usepackage{subcaption}
\usepackage[ruled,linesnumbered,noline]{algorithm2e}
\usepackage{listings}
\lstdefinestyle{simpleStyle}{
basicstyle=\ttfamily\small,
breaklines=true,
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\color{violet},
commentstyle=\color[RGB]{34,139,34},
showstringspaces=false,
numbers=left,
numbersep=2em,
numberstyle=\footnotesize,
frame=single,
framesep=1em,
}
\lstset{style=simpleStyle}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,linkcolor=,urlcolor=cyan
}
\renewcommand*{\proofname}{\normalfont\bfseries Proof}
\usepackage{thmtools}
\usepackage[framemethod=TikZ]{mdframed}
\mdfsetup{skipabove=0.5em,skipbelow=0.5em}
\newcommand{\mydeclaretheoremstyle}[3]{
\declaretheoremstyle[headfont=\bfseries\sffamily#2, bodyfont=\normalfont, mdframed={#3}]{#1}
}
\mydeclaretheoremstyle{purplehalfbox}{\color{RoyalPurple!70!black}}{linewidth=2pt, rightline=false, topline=false, bottomline=false, linecolor=RoyalPurple, backgroundcolor=RoyalPurple!8}
\mydeclaretheoremstyle{bluehalfbox}{\color{SkyBlue!70!black}}{linewidth=2pt, rightline=false, topline=false, bottomline=false, linecolor=NavyBlue, backgroundcolor=SkyBlue!8}
\mydeclaretheoremstyle{greenfullbox}{\color{ForestGreen!40!black}}{linewidth=1pt, linecolor=ForestGreen, backgroundcolor=ForestGreen!5}
\mydeclaretheoremstyle{redfullbox}{\color{RawSienna!70!black}}{linewidth=1pt, linecolor=RawSienna, backgroundcolor=RawSienna!5}
\mydeclaretheoremstyle{pinkemptybox}{\color{WildStrawberry!70!black}}{linewidth=0pt, linecolor=WildStrawberry, backgroundcolor=WildStrawberry!5}
\mydeclaretheoremstyle{brownemptybox}{\color{brown!70!black}}{leftline=false, rightline=false, topline=false, bottomline=false, skipabove=0em, skipbelow=0em}
\mydeclaretheoremstyle{greenemptybox}{\color{ForestGreen!40!black}}{leftline=false, rightline=false, topline=false, bottomline=false, skipabove=0em, skipbelow=0em}
\declaretheorem[style=purplehalfbox, name=Theorem, numbered=yes, numberwithin=section]{theorem}
\declaretheorem[style=purplehalfbox, name=Theorem, numbered=no]{theorem*}
\declaretheorem[style=purplehalfbox, name=Proposition, numbered=yes, sibling=theorem]{proposition}
\declaretheorem[style=purplehalfbox, name=Proposition, numbered=no]{proposition*}
\declaretheorem[style=bluehalfbox, name=Corollary, numbered=yes, sibling=theorem]{corollary}
\declaretheorem[style=bluehalfbox, name=Corollary, numbered=no]{corollary*}
\declaretheorem[style=bluehalfbox, name=Lemma, numbered=yes, sibling=theorem]{lemma}
\declaretheorem[style=bluehalfbox, name=Lemma, numbered=no]{lemma*}
\declaretheorem[style=bluehalfbox, name=Claim, numbered=yes, sibling=theorem]{claim}
\declaretheorem[style=bluehalfbox, name=Claim, numbered=no]{claim*}
\declaretheorem[style=greenfullbox, name=Definition, numbered=yes, numberwithin=section]{definition}
\declaretheorem[style=greenfullbox, name=Definition, numbered=no]{definition*}
\declaretheorem[style=redfullbox, name=Example, numbered=yes, numberwithin=section]{example}
\declaretheorem[style=redfullbox, name=Example, numbered=no]{example*}
\declaretheorem[style=pinkemptybox, name=Problem, numbered=yes, numberwithin=section]{problem}
\declaretheorem[style=pinkemptybox, name=Problem, numbered=no]{problem*}
\declaretheorem[style=brownemptybox, name=Remark, numbered=yes, numberwithin=section]{remark}
\declaretheorem[style=brownemptybox, name=Remark, numbered=no]{remark*}
\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle}
\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note}
\declaretheorem[style=notestyle, name=Note, numbered=no]{note*}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle}
\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution}
\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*}
%% cbox
\newmdenv[
linecolor=SkyBlue,
backgroundcolor=SkyBlue!8,
leftline=true,
rightline=false,
topline=false,
bottomline=false,
linewidth=2pt,
roundcorner=0pt, % sharp corners
frametitlebackgroundcolor=SkyBlue!20,
]{cbox}
%% cover
\usepackage{titling}
\newcommand{\extrainfo}{}
\renewcommand{\extrainfo}[1]{\renewcommand{\extrainfocontent}{#1}}
\newcommand{\extrainfocontent}{}
\newcommand{\makecover}[1]{%
\begin{titlepage}
\newgeometry{margin=0in}
\parindent=0pt
\includegraphics[width=\linewidth]{#1} % size = 1280*1024
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft{\bfseries \Huge \thetitle} \\[0.6pt]
\rule{0.618\textwidth}{4pt} \\
}
\end{center}
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft\Large
\begin{tabular}{r}
\theauthor \\
\thedate \\
\end{tabular}%
}
\end{center}
\vfill
\begin{center}
\parbox[t]{0.7\textwidth}{\centering \itshape \extrainfocontent}
\end{center}
\vfill
\end{titlepage}
\restoregeometry
\thispagestyle{empty}
}
% USAGE
% \extrainfo{xxx}
% \makecover{/path/to/cover.png}
+132
View File
@@ -0,0 +1,132 @@
%================================
% note-setup-simple.tex
% fenglielie@qq.com 2025-10-22
%================================
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{extarrows}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{anyfontsize}
\usepackage{booktabs,multirow,multicol}
\usepackage[shortlabels,inline]{enumitem}
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{
{./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/}
}
\usepackage{subcaption}
\usepackage[ruled,linesnumbered,noline]{algorithm2e}
\usepackage{listings}
\lstdefinestyle{simpleStyle}{
basicstyle=\ttfamily\small,
breaklines=true,
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\color{violet},
commentstyle=\color[RGB]{34,139,34},
showstringspaces=false,
numbers=left,
numbersep=2em,
numberstyle=\footnotesize,
frame=single,
framesep=1em,
}
\lstset{style=simpleStyle}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,linkcolor=,urlcolor=cyan
}
\renewcommand*{\proofname}{\normalfont\bfseries Proof}
\usepackage{thmtools}
%% define environments
\declaretheorem[style=plain, name=Theorem, numbered=yes, numberwithin=section]{theorem}
\declaretheorem[style=plain, name=Theorem, numbered=no]{theorem*}
\declaretheorem[style=plain, name=Proposition, numbered=yes, sibling=theorem]{proposition}
\declaretheorem[style=plain, name=Proposition, numbered=no]{proposition*}
\declaretheorem[style=plain, name=Corollary, numbered=yes, sibling=theorem]{corollary}
\declaretheorem[style=plain, name=Corollary, numbered=no]{corollary*}
\declaretheorem[style=plain, name=Lemma, numbered=yes, sibling=theorem]{lemma}
\declaretheorem[style=plain, name=Lemma, numbered=no]{lemma*}
\declaretheorem[style=plain, name=Claim, numbered=yes, sibling=theorem]{claim}
\declaretheorem[style=plain, name=Claim, numbered=no]{claim*}
\declaretheorem[style=definition, name=Definition, numbered=yes, numberwithin=section]{definition}
\declaretheorem[style=definition, name=Definition, numbered=no]{definition*}
\declaretheorem[style=definition, name=Example, numbered=yes, numberwithin=section]{example}
\declaretheorem[style=definition, name=Example, numbered=no]{example*}
\declaretheorem[style=definition, name=Problem, numbered=yes, numberwithin=section]{problem}
\declaretheorem[style=definition, name=Problem, numbered=no]{problem*}
\declaretheorem[style=remark, name=Remark, numbered=yes, numberwithin=section]{remark}
\declaretheorem[style=remark, name=Remark, numbered=no]{remark*}
\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle}
\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note}
\declaretheorem[style=notestyle, name=Note, numbered=no]{note*}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle}
\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution}
\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*}
\newenvironment{cbox}{\begin{quote}}{\end{quote}}
%% cover
\usepackage{titling}
\newcommand{\extrainfo}{}
\renewcommand{\extrainfo}[1]{\renewcommand{\extrainfocontent}{#1}}
\newcommand{\extrainfocontent}{}
\newcommand{\makecover}[1]{%
\begin{titlepage}
\newgeometry{margin=0in}
\parindent=0pt
\includegraphics[width=\linewidth]{#1} % size = 1280*1024
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft{\bfseries \Huge \thetitle} \\[0.6pt]
\rule{0.618\textwidth}{4pt} \\
}
\end{center}
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft\Large
\begin{tabular}{r}
\theauthor \\
\thedate \\
\end{tabular}%
}
\end{center}
\vfill
\begin{center}
\parbox[t]{0.7\textwidth}{\centering \itshape \extrainfocontent}
\end{center}
\vfill
\end{titlepage}
\restoregeometry
\thispagestyle{empty}
}
% USAGE
% \extrainfo{xxx}
% \makecover{/path/to/cover.png}
+160
View File
@@ -0,0 +1,160 @@
%================================
% note-setup.tex
% fenglielie@qq.com 2025-09-12
%================================
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{extarrows}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{anyfontsize}
\usepackage{booktabs,multirow,multicol}
\usepackage[shortlabels,inline]{enumitem}
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{
{./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/}
}
\usepackage{subcaption}
\usepackage[ruled,linesnumbered,noline]{algorithm2e}
\usepackage{listings}
\lstdefinestyle{simpleStyle}{
basicstyle=\ttfamily\small,
breaklines=true,
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\color{violet},
commentstyle=\color[RGB]{34,139,34},
showstringspaces=false,
numbers=left,
numbersep=2em,
numberstyle=\footnotesize,
frame=single,
framesep=1em,
}
\lstset{style=simpleStyle}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,linkcolor=,urlcolor=cyan
}
\renewcommand*{\proofname}{\normalfont\bfseries Proof}
\usepackage{thmtools}
%% define environments
\declaretheorem[style=plain, name=Theorem, numbered=yes, numberwithin=section]{theorem}
\declaretheorem[style=plain, name=Theorem, numbered=no]{theorem*}
\declaretheorem[style=plain, name=Proposition, numbered=yes, sibling=theorem]{proposition}
\declaretheorem[style=plain, name=Proposition, numbered=no]{proposition*}
\declaretheorem[style=plain, name=Corollary, numbered=yes, sibling=theorem]{corollary}
\declaretheorem[style=plain, name=Corollary, numbered=no]{corollary*}
\declaretheorem[style=plain, name=Lemma, numbered=yes, sibling=theorem]{lemma}
\declaretheorem[style=plain, name=Lemma, numbered=no]{lemma*}
\declaretheorem[style=plain, name=Claim, numbered=yes, sibling=theorem]{claim}
\declaretheorem[style=plain, name=Claim, numbered=no]{claim*}
\declaretheorem[style=definition, name=Definition, numbered=yes, numberwithin=section]{definition}
\declaretheorem[style=definition, name=Definition, numbered=no]{definition*}
\declaretheorem[style=definition, name=Example, numbered=yes, numberwithin=section]{example}
\declaretheorem[style=definition, name=Example, numbered=no]{example*}
\declaretheorem[style=definition, name=Problem, numbered=yes, numberwithin=section]{problem}
\declaretheorem[style=definition, name=Problem, numbered=no]{problem*}
\declaretheorem[style=remark, name=Remark, numbered=yes, numberwithin=section]{remark}
\declaretheorem[style=remark, name=Remark, numbered=no]{remark*}
\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle}
\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note}
\declaretheorem[style=notestyle, name=Note, numbered=no]{note*}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle}
\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution}
\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*}
\usepackage[most]{tcolorbox}
\newcommand{\newtcbenvironment}[2]{
\tcolorboxenvironment{#1}{#2, enhanced, breakable, sharp corners, boxrule=1pt}
\tcolorboxenvironment{#1*}{#2, enhanced, breakable, rounded corners, boxrule=1pt}
}
%% define styles
\newtcbenvironment{theorem}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{proposition}{colframe=RoyalPurple, colback=RoyalPurple!8}
\newtcbenvironment{corollary}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{lemma}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{claim}{colframe=NavyBlue, colback=SkyBlue!8}
\newtcbenvironment{definition}{colframe=ForestGreen, colback=ForestGreen!5}
\newtcbenvironment{example}{colframe=RawSienna, colback=RawSienna!5}
\newtcbenvironment{problem}{colframe=WildStrawberry!30, colback=WildStrawberry!5}
%% cbox
\newtcolorbox{cbox}[1][]{%
enhanced,
breakable,
sharp corners,
leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt,
colframe=SkyBlue,
colback=SkyBlue!8,
#1
}
%% cover
\usepackage{titling}
\newcommand{\extrainfo}{}
\renewcommand{\extrainfo}[1]{\renewcommand{\extrainfocontent}{#1}}
\newcommand{\extrainfocontent}{}
\newcommand{\makecover}[1]{%
\begin{titlepage}
\newgeometry{margin=0in}
\parindent=0pt
\includegraphics[width=\linewidth]{#1} % size = 1280*1024
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft{\bfseries \Huge \thetitle} \\[0.6pt]
\rule{0.618\textwidth}{4pt} \\
}
\end{center}
\vfill
\begin{center}
\parbox{0.618\textwidth}{%
\raggedleft\Large
\begin{tabular}{r}
\theauthor \\
\thedate \\
\end{tabular}%
}
\end{center}
\vfill
\begin{center}
\parbox[t]{0.7\textwidth}{\centering \itshape \extrainfocontent}
\end{center}
\vfill
\end{titlepage}
\restoregeometry
\thispagestyle{empty}
}
% USAGE
% \extrainfo{xxx}
% \makecover{/path/to/cover.png}