diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9b0213 --- /dev/null +++ b/.gitignore @@ -0,0 +1,77 @@ +# ======================== +# LaTeX 编译产物(排除) +# ======================== + +# DVI 输出文件 +*.dvi + +# PS 输出文件 +*.ps + +# Auxiliary files generated by LaTeX +*.aux +*.bbl +*.blg +*.fdb_latexmk +*.fls +*.log +*.out +*.toc +*.lof +*.lot +*.loa +*.glo +*.glg +*.idx +*.ind +*.ilg +*.bak +*.synctex.gz +*.nav +*.snm +*.vrb +*.xdv + +# 编译缓存和临时文件 +*.toc +*.lof +*.lot +*.loa +*.glo +*.glg +*.idx +*.ind +*.ilg +*.out +*.aux + +# LaTeXmk 生成的文件 +*.fls +*.log +*.synctex.gz +latexmk.log + +# 编辑器备份文件(可选,根据需要添加) +*~ + +# Vim swap files +.*.swp +.*.swo + +# Emacs backup files +\#* +*~ +\.#* + +# VS Code workspace settings +.vscode/ + +# 编译工具(如 make、latexmk)生成的目录 +.build/ +build/ +tmp/ +temp/ + +# 其他可能的编译输出目录(根据项目结构调整) +*.bcf +*.run.xml diff --git a/README.md b/README.md index 67f8785..f108c6d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # LaTeX -📦 存放 LaTeX 相关代码 \ No newline at end of file +📦 存放 LaTeX 相关代码 + +> 模板来源:https://github.com/fenglielie/latexzero \ No newline at end of file diff --git a/beamer/beamer-quickstart.tex b/beamer/beamer-quickstart.tex new file mode 100644 index 0000000..6edf80a --- /dev/null +++ b/beamer/beamer-quickstart.tex @@ -0,0 +1,77 @@ +\documentclass[compress,aspectratio=169]{beamer} +\input{./beamer-setup} + +% \usepackage[style=authoryear]{biblatex} +% \addbibresource{reference.bib} + +\title{Title} +\subtitle{Subtitle} +\author{Author} +\date{\today} +\institute{University of XXXX} + +\AtBeginSection[] +{ + \begin{frame}{Outline} + \tableofcontents[currentsection,currentsubsection, + hideothersubsections,sectionstyle=show/shaded] + \end{frame} +} + +\begin{document} + +\begin{frame}[plain] + \titlepage + + \begin{center} + \small Joint work with XXX and XXX. + \end{center} +\end{frame} + +\begin{frame}{Outline} + \tableofcontents[sectionstyle=show,subsectionstyle=show/shaded/hide, + subsubsectionstyle=show/shaded/hide] +\end{frame} + +\section{Introduction} + +\begin{frame}{Frame 1} + +\end{frame} + +\section{Body section A} + +\subsection{Subsection A1} + +\begin{frame}{Frame 2} + +\end{frame} + +\begin{frame}{Frame 3} + +\end{frame} + +\subsection{Subsection A2} + +\begin{frame}{Frame 4} + +\end{frame} + +\section{Body section B} + +\begin{frame}{Frame 5} + +\end{frame} + +\section{Conclusion} + +\begin{frame}{Conclusion \& Future work} + +\end{frame} + +\begin{frame}[plain] + \vspace{0.3\textheight} + \Huge{\centerline{\color{simplebeamercolor}\textbf{Thank You!}}} +\end{frame} + +\end{document} diff --git a/beamer/beamer-setup-console.tex b/beamer/beamer-setup-console.tex new file mode 100644 index 0000000..0173a50 --- /dev/null +++ b/beamer/beamer-setup-console.tex @@ -0,0 +1,79 @@ +%================================ +% beamer-setup-console.tex +% fenglielie@qq.com 2025-11-12 +%================================ + +\usetheme{default} +\useoutertheme{default} +\usefonttheme[onlymath]{serif} +\definecolor{simplebeamercolor}{RGB}{255,216,80} +\usecolortheme[named=simplebeamercolor]{structure} + +\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true] +\setbeamertemplate{section in toc}[sections numbered] +\setbeamertemplate{subsection in toc}[subsections numbered] +\addtobeamertemplate{subsection in toc}{\hspace{2em}}{} +\setbeamertemplate{itemize items}[circle] +\setbeamertemplate{enumerate items}[default] +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{footline}[frame number]{} +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{frametitle}{\hspace*{-1em}{\usebeamercolor[fg]{normal text}\texttt{\mdseries>\hbox{}>\hbox{}> }}\boldmath\insertframetitle} +\setbeamercolor{background canvas}{bg=black!80} +\setbeamercolor{normal text}{fg=white} + +% \setbeamercolor{title}{use=structure} +\setbeamercolor{section in head/foot}{fg=white,bg=black!85} +\setbeamercolor{block body}{fg=structure!10,bg=black!70} +\setbeamercolor{block title}{fg=structure!50,bg=black!60} +\setbeamercolor{block body alerted}{fg=alerted text.fg!10,bg=black!70} +\setbeamercolor{block title alerted}{fg=alerted text.fg!60,bg=black!60} +\setbeamercolor{block body example}{fg=green!10,bg=black!70} +\setbeamercolor{block title example}{fg=green!50,bg=black!60} + +% fonts +\usepackage[T1]{fontenc} +\usepackage{mathrsfs} +\usepackage{calligra} +\usepackage{bm} + +% math +\usepackage{amsmath,amsthm,amsfonts,amssymb} + +\usepackage{extarrows} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{multicol} + +\usepackage[most]{tcolorbox} +\tcbset{ + highlight math style={enhanced, colframe=blue!40,colback=yellow!20,arc=4pt,boxrule=1pt} +} + +\usepackage{hyperref} +\hypersetup{ + colorlinks=true,linkcolor=,urlcolor=cyan +} + +\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\color{white!90}, + breaklines=true, + keywordstyle=\color{cyan!70!white}, + identifierstyle=\color{white}, + stringstyle=\color{yellow!80!orange}, + commentstyle=\color{green!60!black}, + showstringspaces=false, + frame=single, + rulecolor=\color{white!30}, + framesep=1em, +} +\lstset{style=simpleStyle} diff --git a/beamer/beamer-setup-plain.tex b/beamer/beamer-setup-plain.tex new file mode 100644 index 0000000..753372a --- /dev/null +++ b/beamer/beamer-setup-plain.tex @@ -0,0 +1,76 @@ +%================================ +% beamer-setup-plain.tex +% fenglielie@qq.com 2025-07-27 +%================================ + +\usetheme{default} +\useoutertheme{default} +\usefonttheme[onlymath]{serif} +\definecolor{simplebeamercolor}{RGB}{57,89,199} +\usecolortheme[named=simplebeamercolor]{structure} + +\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true] +\setbeamertemplate{section in toc}[sections numbered] +\setbeamertemplate{subsection in toc}[subsections numbered] +\addtobeamertemplate{subsection in toc}{\hspace{2em}}{} +\setbeamertemplate{itemize items}[circle] +\setbeamertemplate{enumerate items}[default] +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{footline}[frame number]{} +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{frametitle}{\vspace*{0.5em}\insertframetitle\par\vskip-6pt\hrulefill\vspace{-0.1em}} + +\setbeamercolor{title}{use=structure,fg=white,bg=structure.fg} +\setbeamercolor{section in head/foot}{fg=white,bg=structure.fg} +\setbeamercolor{block body}{bg=structure!10} +\setbeamercolor{block title}{bg=structure!20} +\setbeamercolor{block body alerted}{bg=alerted text.fg!10} +\setbeamercolor{block title alerted}{bg=alerted text.fg!20} +\setbeamercolor{block body example}{bg=green!10} +\setbeamercolor{block title example}{bg=green!20} + +% fonts +\usepackage[T1]{fontenc} +\usepackage{mathrsfs} +\usepackage{calligra} +\usepackage{bm} + +% math +\usepackage{amsmath,amsthm,amsfonts,amssymb} + +\usepackage{extarrows} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{multicol} + +\usepackage[most]{tcolorbox} +\tcbset{ + highlight math style={enhanced, colframe=blue!40,colback=yellow!20,arc=4pt,boxrule=1pt} +} + +\usepackage{hyperref} +\hypersetup{ + colorlinks=true,linkcolor=,urlcolor=cyan +} + +\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, + frame=single, + framesep=1em, +} +\lstset{style=simpleStyle} diff --git a/beamer/beamer-setup.tex b/beamer/beamer-setup.tex new file mode 100644 index 0000000..b08bea2 --- /dev/null +++ b/beamer/beamer-setup.tex @@ -0,0 +1,76 @@ +%================================ +% beamer-setup.tex +% fenglielie@qq.com 2025-07-27 +%================================ + +\usetheme{default} +\useoutertheme[subsection=false]{miniframes} +\usefonttheme[onlymath]{serif} +\definecolor{simplebeamercolor}{RGB}{57,89,199} +\usecolortheme[named=simplebeamercolor]{structure} + +\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true] +\setbeamertemplate{section in toc}[sections numbered] +\setbeamertemplate{subsection in toc}[subsections numbered] +\addtobeamertemplate{subsection in toc}{\hspace{2em}}{} +\setbeamertemplate{itemize items}[circle] +\setbeamertemplate{enumerate items}[default] +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{footline}[frame number]{} +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{frametitle}{\vspace*{0.5em}\insertframetitle\par\vskip-6pt\hrulefill\vspace{-0.1em}} + +\setbeamercolor{title}{use=structure,fg=white,bg=structure.fg} +\setbeamercolor{section in head/foot}{fg=white,bg=structure.fg} +\setbeamercolor{block body}{bg=structure!10} +\setbeamercolor{block title}{bg=structure!20} +\setbeamercolor{block body alerted}{bg=alerted text.fg!10} +\setbeamercolor{block title alerted}{bg=alerted text.fg!20} +\setbeamercolor{block body example}{bg=green!10} +\setbeamercolor{block title example}{bg=green!20} + +% fonts +\usepackage[T1]{fontenc} +\usepackage{mathrsfs} +\usepackage{calligra} +\usepackage{bm} + +% math +\usepackage{amsmath,amsthm,amsfonts,amssymb} + +\usepackage{extarrows} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{multicol} + +\usepackage[most]{tcolorbox} +\tcbset{ + highlight math style={enhanced, colframe=blue!40,colback=yellow!20,arc=4pt,boxrule=1pt} +} + +\usepackage{hyperref} +\hypersetup{ + colorlinks=true,linkcolor=,urlcolor=cyan +} + +\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, + frame=single, + framesep=1em, +} +\lstset{style=simpleStyle} diff --git a/beamer/demo/demo-console.pdf b/beamer/demo/demo-console.pdf new file mode 100644 index 0000000..a065fc2 Binary files /dev/null and b/beamer/demo/demo-console.pdf differ diff --git a/beamer/demo/demo-plain.pdf b/beamer/demo/demo-plain.pdf new file mode 100644 index 0000000..c7ded42 Binary files /dev/null and b/beamer/demo/demo-plain.pdf differ diff --git a/beamer/demo/demo.pdf b/beamer/demo/demo.pdf new file mode 100644 index 0000000..9191127 Binary files /dev/null and b/beamer/demo/demo.pdf differ diff --git a/beamer/demo/figures/img.png b/beamer/demo/figures/img.png new file mode 100644 index 0000000..75257ba Binary files /dev/null and b/beamer/demo/figures/img.png differ diff --git a/beamer/demo/figures/img1.png b/beamer/demo/figures/img1.png new file mode 100644 index 0000000..953491a Binary files /dev/null and b/beamer/demo/figures/img1.png differ diff --git a/beamer/demo/figures/img2.png b/beamer/demo/figures/img2.png new file mode 100644 index 0000000..5700f9b Binary files /dev/null and b/beamer/demo/figures/img2.png differ diff --git a/beamer/demo/main.pdf b/beamer/demo/main.pdf new file mode 100644 index 0000000..887c4d3 Binary files /dev/null and b/beamer/demo/main.pdf differ diff --git a/beamer/demo/main.tex b/beamer/demo/main.tex new file mode 100644 index 0000000..85c0bfa --- /dev/null +++ b/beamer/demo/main.tex @@ -0,0 +1,364 @@ +\documentclass[compress,aspectratio=169]{beamer} +\input{../beamer-setup-plain} + +\usepackage[style=authoryear]{biblatex} +\addbibresource{reference.bib} + +\title{Title} +\subtitle{Subtitle} +\author{Author} +\date{July 27, 2025} +\institute{University of XXXX} + +\AtBeginSection[]{ + \begin{frame}{Outline} + \tableofcontents[currentsection,currentsubsection] + \end{frame} +} +\AtBeginSubsection[]{ + \begin{frame}{Outline} + \tableofcontents[currentsection,currentsubsection] + \end{frame} +} + +\begin{document} + +\begin{frame}[plain] + \titlepage + + \begin{center} + \small Joint work with XXX and XXX. + \end{center} +\end{frame} + +\begin{frame}{Outline} + \tableofcontents +\end{frame} + +\section{Guide} + +\begin{frame}{Global Structure} + To create the ``global structure" of a presentation, with the time constraints in mind, proceed as follows: + + \medskip + \begin{enumerate} + \item Make a mental inventory of the things you can reasonably talk about within the time available. + + \item Categorize the inventory into sections and subsections. Both the sections and the subsections should follow a logical pattern. + + \item Do not use more than four sections and not less than two per part. + + \item Keep section and subsection titles self-explaining. + \end{enumerate} + +\end{frame} + +\begin{frame}{Time Control} + \begin{itemize} + \item A simple rule for the number of frames is that you should have at most one frame per minute. + + \medskip + \item In most situations, you will have less time for your presentation than you would like. + + \medskip + \item Do not try to squeeze more into a presentation than time allows for. + \end{itemize} +\end{frame} + + +\begin{frame}{Beginning and End} + People pay most attention at the beginning and at the end of talks. + + \medskip + \begin{itemize} + \item Begin with an explanation of what your talk is all about. Then explain what you or someone else has found out concerning the subject matter. + + \medskip + \item Always conclude your talk with a summary that repeats the main message of the talk in a short and simple way. + \end{itemize} + +\end{frame} + +\begin{frame}{Frame Title} + \begin{enumerate} + \item The title should really explain things, not just give a cryptic summary that cannot be understood unless one has understood the whole slide. + + \medskip + \item In English, you should either always capitalize all words in a frame title except for words like ``a" or ``the" (as in a title), or you always use the normal lowercase letters. + \begin{itemize} + \item Introduction to Algorithms. + \item Introduction to algorithms. + \end{itemize} + \end{enumerate} +\end{frame} + +\begin{frame}{Frame Content} + \begin{enumerate} + \item Use block environments like `theorem' and so on. + + \medskip + \item Prefer enumerations and itemize environments over plain text. + + \medskip + \item Do not use more than two levels of subitemizing. + + \medskip + \item A frame with too little on it is better than a frame with too much on it. + \end{enumerate} + + \bigskip + Alert: \alert{Avoid using animations in Beamer slides.} +\end{frame} + +\begin{frame}{Graphic} + \begin{enumerate} + \item Visualization is helpful to the audience. + + \medskip + \item Like text, you should explain everything that is shown on a graphic. + + \medskip + \item Sometimes the complexity of a graphic is intentional and you are willing to spend much time explaining the graphic in great detail. + \end{enumerate} + +\end{frame} + +\section{Demo}\label{sec:demo} + +\subsection{Basic} + +\begin{frame}{Highlighted Math} + Some important formulas will be \alert{highlighted} because it's important. + + \medskip + We consider the system of linear equations + \begin{equation}\label{eq:LE} + \tcbhighmath{Ax = b} + \end{equation} + where $A\in\mathbb{R}^{n \times n}$, $b\in\mathbb{R}^n$. +\end{frame} + + +\begin{frame}{Columns \& Description \& List} + + \begin{columns} + + \begin{column}{0.49\textwidth} + \begin{description}[leftmargin=1cm] + \item[Description 1] Explanation 1 + \item[Description 2] Explanation 2 + \item[Description 3] Explanation 3 + \end{description} + \end{column} + + \hfill + + \begin{column}{0.49\textwidth} + \begin{itemize} + \item Item 1 + \item Item 2 + \begin{enumerate} + \item First item + \item Second item + \item Third item + \end{enumerate} + \item Item 3 + \begin{enumerate} + \item First item + \item Second item + \end{enumerate} + \end{itemize} + \end{column} + \end{columns} + +\end{frame} + +\begin{frame}{Reference \& URL} + \begin{itemize} + \item A citation example~\cite{vaswaniAttentionAllYou2023}. + + \item A foot full citation example~\footfullcite{vaswaniAttentionAllYou2023}. + + \item See Section~\ref{sec:demo} for details. + + \item Here is a URL link to \href{https://www.openai.com}{OpenAI website}. + \end{itemize} +\end{frame} + +\subsection{Block} + +\begin{frame} + \frametitle{Blocks 1} + \begin{block}{Block Title} + This is a regular block. + \end{block} + + \begin{alertblock}{Alert Block Title} + This is an alert block. + \end{alertblock} + + \begin{exampleblock}{Example Block Title} + This is an example block. + \end{exampleblock} +\end{frame} + +\begin{frame} + \frametitle{Blocks 2} + \begin{definition}[XXX] + This is a definition block. + \end{definition} + + \begin{lemma}[XXX] + This is a lemma block. + \end{lemma} + + \begin{corollary}[XXX] + This is a corollary block. + \end{corollary} + + \begin{example}[XXX] + This is an example block. + \end{example} + +\end{frame} + +\begin{frame} + \frametitle{Blocks 3} + \begin{theorem}[XXX] + This is a theorem block. + \[ + a^2 + b^2 = c^2 + \] + \end{theorem} + + \begin{proof} + This is a proof block. + \end{proof} + +\end{frame} + +\subsection{Table \& Figure} + +\begin{frame}{Tables} + \begin{table} + \caption{Example Table} + \begin{tabular}{|c|c|c|} + \hline + Header 1 & Header 2 & Header 3 \\ + \hline + Cell 1 & Cell 2 & Cell 3 \\ + Cell 4 & Cell 5 & Cell 6 \\ + \hline + \end{tabular} + \end{table} + + \begin{table}[ht] + \centering + \caption{Error and order}\label{tab:1} + \begin{tabular}{c|ccccc} + \hline + m & 80 & 160 & 320 & 640 \\ + \hline + error & 1.95e-4 & 4.88e-5 & 1.22e-5 & 3.05e-6 \\ + order & - & 2.00 & 2.00 & 2.00 \\ + \hline + error & 1.95e-4 & 4.88e-5 & 1.22e-5 & 3.05e-6 \\ + order & - & 2.00 & 2.00 & 2.00 \\ + \hline + \end{tabular} + \end{table} +\end{frame} + +\begin{frame}{Figure} + \begin{figure} + \includegraphics[width=0.3\linewidth]{img.png} + \caption{XXX} + \end{figure} +\end{frame} + +\begin{frame}{Figures} + \begin{figure}[htbp] + \centering + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.7\textwidth]{img1.png} + \caption{XXX}\label{fig:subfig-a} + \end{subfigure} + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.7\textwidth]{img2.png} + \caption{XXX}\label{fig:subfig-b} + \end{subfigure} + \caption{XXX}\label{fig:example} + \end{figure} +\end{frame} + + +\begin{frame}{Figure + Columns} + \begin{columns} + \column{0.6\textwidth} + \begin{figure} + \includegraphics[width=0.5\linewidth]{img.png} + \end{figure} + \column{0.4\textwidth} + This is column one with 0.4 text width. + \end{columns} +\end{frame} + +\subsection{Algorithm \& Code} + +\begin{frame}{Algorithm} + \begin{algorithm}[H] + \caption{Euclid's algorithm} + \KwData{Two nonnegative integers $a$ and $b$} + \KwResult{Their greatest common divisor $d = \gcd(a, b)$} + \While{$b \neq 0$}{ + $r \leftarrow a \bmod b$\; + $a \leftarrow b$\; + $b \leftarrow r$\; + } + $d \leftarrow a$\; + \end{algorithm} + +\end{frame} + +\begin{frame}[fragile]{Code} + + \begin{lstlisting}[language=c++] +#include + +int main() { // Hello World + std::cout << "Hello, world!" << std::endl; + return 0; +} +\end{lstlisting} + \begin{lstlisting}[language=python] +def greet(name): + print(f"Hello, {name}!") + +greet("John") +\end{lstlisting} + +\end{frame} + + +\section{Conclusion} + +\begin{frame}{Conclusion \& Future work} + \begin{itemize} + \item This is the conclusion + \medskip + \item This is the future work + \end{itemize} +\end{frame} + +\begin{frame} + \vspace{0.05\textheight} + \Huge{\centerline{\color{simplebeamercolor}\textbf{Thank You!}}} + \vspace{0.2\textheight} + + % \nocite{*} + \printbibliography[keyword=important,heading=none] +\end{frame} + +\end{document} diff --git a/beamer/demo/reference.bib b/beamer/demo/reference.bib new file mode 100644 index 0000000..92b12f3 --- /dev/null +++ b/beamer/demo/reference.bib @@ -0,0 +1,9 @@ +@online{vaswaniAttentionAllYou2023, + title = {Attention {{Is All You Need}}}, + author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N. and Kaiser, Lukasz and Polosukhin, Illia}, + number = {arXiv:1706.03762}, + doi = {10.48550/arXiv.1706.03762}, + url = {http://arxiv.org/abs/1706.03762}, + pubstate = {prepublished}, + keywords = {important} +} diff --git a/docs/beamer-setup-doc-cn.md b/docs/beamer-setup-doc-cn.md new file mode 100644 index 0000000..dccad02 --- /dev/null +++ b/docs/beamer-setup-doc-cn.md @@ -0,0 +1,131 @@ +# beamer-setup 配置说明 + +## Beamer 样式配置 + +设置主题,包括导航栏样式,数学字体,主题颜色 +```latex +\usetheme{default} +\useoutertheme[subsection=false]{miniframes} +\usefonttheme[onlymath]{serif} +\definecolor{simplebeamercolor}{RGB}{57,89,199} +\usecolortheme[named=simplebeamercolor]{structure} +``` + +设置标题页样式:圆角,加阴影 +```latex +\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true] +``` + +设置目录样式:section和subsection均开启编号,subsection加上缩进 +```latex +\setbeamertemplate{section in toc}[sections numbered] +\setbeamertemplate{subsection in toc}[subsections numbered] +\addtobeamertemplate{subsection in toc}{\hspace{2em}}{} +``` + +设置无序列表和有序列表的样式 +```latex +\setbeamertemplate{itemize items}[circle] +\setbeamertemplate{enumerate items}[default] +``` + +设置caption样式:开启编号 +```latex +\setbeamertemplate{caption}[numbered] +``` + +设置底部样式:仅显示页码,移除导航按钮 +```latex +\setbeamertemplate{footline}[frame number]{} +\setbeamertemplate{navigation symbols}{} +``` + +设置帧标题样式:在帧标题下面添加一条横线 +```latex +\setbeamertemplate{frametitle}{\vspace*{0.5em}\insertframetitle\par\vskip-6pt\hrulefill\vspace{-0.1em}} +``` + +设置标题样式 +```latex +\setbeamercolor{title}{use=structure,fg=white,bg=structure.fg} +``` + +设置顶部导航栏中的section样式 +```latex +\setbeamercolor{section in head/foot}{fg=white,bg=structure.fg} +``` + +设置各个元素的颜色样式 +```latex +\setbeamercolor{block body}{bg=structure!10} +\setbeamercolor{block title}{bg=structure!20} +\setbeamercolor{block body alerted}{bg=alerted text.fg!10} +\setbeamercolor{block title alerted}{bg=alerted text.fg!20} +\setbeamercolor{block body example}{bg=green!10} +\setbeamercolor{block title example}{bg=green!20} +``` + +## 其它配置 + +导入常用的基础宏包 +```latex +% fonts +\usepackage[T1]{fontenc} +\usepackage{mathrsfs} +\usepackage{calligra} +\usepackage{bm} + +% math +\usepackage{amsmath,amsthm,amsfonts,amssymb} + +\usepackage{extarrows} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{multicol} +``` + +导入盒子宏包,并为`\tcbhighmath`命令设置预设样式 +```latex +\usepackage[most]{tcolorbox} +\tcbset{ + highlight math style={enhanced, colframe=blue!40,colback=yellow!20,arc=4pt,boxrule=1pt} +} +``` + +导入超链接支持的宏包 +```latex +\usepackage{hyperref} +\hypersetup{ + colorlinks=true,linkcolor=,urlcolor=cyan +} +``` + +插入图片以及子图的相关宏包,对图片文件夹路径进行配置 +```latex +\usepackage{graphicx} +\graphicspath{ + {./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/} +} +\usepackage{subcaption} +``` + +导入算法环境的宏包 +```latex +\usepackage[ruled,linesnumbered,noline]{algorithm2e} +``` + +导入代码环境的宏包并配置样式 +```latex +\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, + frame=single, + framesep=1em, +} +\lstset{style=simpleStyle} diff --git a/docs/note-setup-doc-cn.md b/docs/note-setup-doc-cn.md new file mode 100644 index 0000000..0997755 --- /dev/null +++ b/docs/note-setup-doc-cn.md @@ -0,0 +1,275 @@ +# note-setup 配置说明 + +## 基本配置 + +导入常用的基础宏包 +```latex +\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} +``` + +导入颜色支持的宏包 +```latex +\usepackage[dvipsnames]{xcolor} +``` + +插入图片以及子图的相关宏包,对图片文件夹路径进行配置 +```latex +\usepackage{graphicx} +\graphicspath{ + {./figure/}{./figures/}{./image/}{./images/}{./graphic/} + {./graphics/}{./picture/}{./pictures/} +} +\usepackage{subcaption} +``` + +导入算法环境的宏包 +```latex +\usepackage[ruled,linesnumbered,noline]{algorithm2e} +``` + +导入代码环境的宏包并配置样式 +```latex +\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} +``` + +导入超链接支持的宏包 +```latex +\usepackage{hyperref} +\hypersetup{ + colorlinks=true,linkcolor=,urlcolor=cyan +} +``` + + +## 定理环境 + +修改 proof 环境的引导词为 Proof,样式为加粗无斜体 +```latex +\renewcommand*{\proofname}{\normalfont\bfseries Proof} +``` + +导入 thmtools 宏包,使用 `\declaretheorem` 命令来定义各种定理环境(比`\newtheorem`命令更加方便) +```latex +\usepackage{thmtools} +``` + +使用的 `\declaretheorem` 命令参数包括: + +- `style`: 定理环境样式,amsthm 内置的样式包括 + - plain(默认):引导词是正体,内容是斜体 + - definition:引导词和内容都是正体 + - remark:引导词是斜体,内容是正体 +- `name`:显示在正文中的引导词(不等于环境的名称) +- `numbered`:是否开启编号 +- `numberwithin`、`sibling`:定义编号规则,例如 + - `numberwithin=section`:基于 section 编号 + - `sibling=theorem`:共享 `theorem` 环境的编号 + + +具体包括: + +- 采用 plain 样式,定义 `theorem`/`theorem*`、`proposition`/`proposition*`、`corollary`/`corollary*`、`lemma`/`lemma*`、`claim`/`claim*` 环境 +```latex +%% 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*} +``` +- 采用 definition 样式,定义 `definition`/`definition*`、`example`/`example*`、`problem`/`problem*` 环境 +```latex +\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*} +``` +- 采用 remark 样式,定义 `remark`/`remark*` 环境 +```latex +\declaretheorem[style=remark, name=Remark, numbered=yes, numberwithin=section]{remark} +\declaretheorem[style=remark, name=Remark, numbered=no]{remark*} +``` +- 使用 `\declaretheoremstyle` 命令定义新的 notestyle 样式,类似 remark 环境,但是引导词变成 Note,并且有颜色 +```latex +\declaretheoremstyle[headfont=\color{orange!80}\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt]{notestyle} +``` +- 采用新定义的 notestyle 样式,定义 `note`/`note*` 环境 +```latex +\declaretheorem[style=notestyle, name=Note, numbered=yes, numberwithin=section]{note} +\declaretheorem[style=notestyle, name=Note, numbered=no]{note*} +``` +- 使用 `\declaretheoremstyle` 命令定义新的 solutionstyle 样式,类似 proof 环境,但是引导词变成 Solution +```latex +\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, spaceabove=3pt, spacebelow=3pt, qed=\ensuremath{\square}]{solutionstyle} +``` +- 采用新定义的 solutionstyle 样式,定义 `solution`/`solition*` 环境 +```latex +\declaretheorem[style=solutionstyle, name=Solution, numbered=yes, numberwithin=section]{solution} +\declaretheorem[style=solutionstyle, name=Solution, numbered=no]{solution*} +``` + + +## 定理环境的美化 + +导入 tcolorbox 宏包以使用盒子美化现有的定理环境 +```latex +\usepackage[most]{tcolorbox} +``` + +tcolorbox 宏包的功能非常复杂,这里只需要使用 `\tcolorboxenvironment` 命令。 + +首先封装一个 `\newtcbenvironment` 命令 +```latex +\newcommand{\newtcbenvironment}[2]{ + \tcolorboxenvironment{#1}{#2, enhanced, breakable, sharp corners, boxrule=1pt} + \tcolorboxenvironment{#1*}{#2, enhanced, breakable, rounded corners, boxrule=1pt} +} +``` + +它可以同时为 `#1` 以及 `#1*` 这两个环境加上盒子,公共参数: + +- `#2`:在定义时传入的参数,这里主要是边框颜色和背景色 +- `enhanced`:样式增强 +- `breakable`:允许跨页 +- `boxrule=1pt`:边框宽度为 1pt + +还有不同的参数: + +- `#1` 盒子使用直角边框(`sharp corners`) +- `#1*` 盒子使用圆角边框(`rounded corners`) + +> 对 `\newtcbenvironment` 内部的公共参数部分进行调整,就可以实现所有盒子只保留左侧边框或者四周无边框等不同的效果。 + +下面就是为前面的各种定理环境加上盒子,参数是盒子的边框颜色 `colframe` 和背景色 `colback` +```latex +%% 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} +``` + +具体颜色如下表 + +| 环境名 | 盒子边框颜色 | 盒子背景色 | +| :---------------------------: | :---------------: | :--------------: | +| `theorem`, `proposition` | RoyalPurple | RoyalPurple!8 | +| `corollary`, `lemma`, `claim` | NavyBlue | SkyBlue!8 | +| `definition` | ForestGreen | ForestGreen!5 | +| `example` | RawSienna | RawSienna!5 | +| `problem` | WildStrawberry!30 | WildStrawberry!5 | + +说明: + +- 这里采用 `xcolor` 宏包所提供的标准颜色,`xxx!n`代表将颜色 `xxx` 以 `n%` 比例和白色混合得到的浅颜色。 +- 为了避免颜色过多,对语义类似的环境合并采用相同的盒子颜色。 + +此外,还添加了一个没有标题的简单盒子 `cbox` +```latex +%% cbox +\newtcolorbox{cbox}[1][]{% + enhanced, + breakable, + sharp corners, + leftrule=2pt, rightrule=0pt, toprule=0pt, bottomrule=0pt, + colframe=SkyBlue, + colback=SkyBlue!8, + #1 +} +``` + + +## 自定义封面页 + +自定义封面页(参考 [ElegantBook](https://github.com/ElegantLaTeX/ElegantBook) 以及它的若干衍生模板) +```latex +%% 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} +``` + +这里没有选择覆盖`\maketitle`,而是改成新命令`\makecover`,接收的一个必要参数为封面图的路径。 + +封面图建议尺寸为1280*1024,尤其对于jpg格式的图片,尺寸不同会导致编译报错。 diff --git a/lab-report/example.py b/lab-report/example.py new file mode 100644 index 0000000..00eb1fe --- /dev/null +++ b/lab-report/example.py @@ -0,0 +1,13 @@ +# example.py + +def factorial_generator(n): + result = 1 + for i in range(1, n + 1): + result *= i + yield result + + +gen = factorial_generator(5) + +for value in gen: + print(value) diff --git a/lab-report/figures/demo1.png b/lab-report/figures/demo1.png new file mode 100644 index 0000000..45eaab9 Binary files /dev/null and b/lab-report/figures/demo1.png differ diff --git a/lab-report/figures/demo2-1.png b/lab-report/figures/demo2-1.png new file mode 100644 index 0000000..bfc56d8 Binary files /dev/null and b/lab-report/figures/demo2-1.png differ diff --git a/lab-report/figures/demo2-2.png b/lab-report/figures/demo2-2.png new file mode 100644 index 0000000..bbac8c4 Binary files /dev/null and b/lab-report/figures/demo2-2.png differ diff --git a/lab-report/lab-report.tex b/lab-report/lab-report.tex new file mode 100644 index 0000000..85907bf --- /dev/null +++ b/lab-report/lab-report.tex @@ -0,0 +1,114 @@ +%!TEX program = xelatex +\documentclass{article} +\usepackage[UTF8,scheme=plain]{ctex} +\usepackage[a4paper,left=1.25in,right=1.25in,top=1in,bottom=1in]{geometry} + +\usepackage{amsmath,amsthm,amsfonts,amssymb} +\usepackage{graphicx} +\usepackage{float} +\usepackage{subcaption} +\usepackage{booktabs,multirow,multicol} +\usepackage{indentfirst} +\usepackage{hyperref} +\usepackage{setspace} +\usepackage{listings} +\usepackage[ruled,noline]{algorithm2e} +\usepackage{bm} +\usepackage{xcolor} + +\graphicspath{ + {./figure/}{./figures/}{./image/}{./images/}{./graphic/}{./graphics/}{./picture/}{./pictures/} +} + +\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} + +\title{Lab Report Template} +\author{Author} +\date{\today} + +\begin{document} + +\maketitle + +\section{Introduction} + +xxxx. + +\section{Method} + +xxxx. + +\section{Results} + +xxxx. + +\begin{table}[ht] + \centering + \caption{Error and Order Table}\label{tab:demo0} + \begin{tabular}{c|ccccc} + \hline + & 10 & 20 & 40 & 80 & 160 \\ + \hline + $L^{\infty}$~error & 0.283284 & 0.0758226 & 0.0192964 & 0.00484029 & 0.00121093 \\ + order & - & 1.90 & 1.97 & 2.00 & 2.00 \\ + \hline + \end{tabular} +\end{table} + +\begin{figure}[htbp] + \centering + \includegraphics[width=.8\textwidth]{demo1.png} + \caption{Figure}\label{fig:demo1} +\end{figure} + +\begin{figure}[htbp] + \centering + \begin{subfigure}[b]{0.47\textwidth} + \centering + \includegraphics[width=\textwidth]{demo2-1.png} + \caption{Subplot 1} + \label{fig:demo2-a} + \end{subfigure} + \begin{subfigure}[b]{0.47\textwidth} + \centering + \includegraphics[width=\textwidth]{demo2-2.png} + \caption{Subplot 2} + \label{fig:demo2-b} + \end{subfigure} + \caption{Subplots} + \label{fig:demo2} +\end{figure} + +\section{Conclusion} + +xxxx. + +\section{Code Demo} + +\begin{lstlisting}[style=simpleStyle, caption=Demo (C++), language=c++, label=lst:cpp] +#include + +int main(){ + std::cout << "Hello World!" << std::endl; + return 0; +} +\end{lstlisting} + +\lstinputlisting[style=simpleStyle, caption=Demo (Python), language=python, label=lst:python]{example.py} + + +\end{document} diff --git a/note/cover/cover.png b/note/cover/cover.png new file mode 100644 index 0000000..e39bdc2 Binary files /dev/null and b/note/cover/cover.png differ diff --git a/note/demo/demo.pdf b/note/demo/demo.pdf new file mode 100644 index 0000000..3a4f617 Binary files /dev/null and b/note/demo/demo.pdf differ diff --git a/note/demo/main.tex b/note/demo/main.tex new file mode 100644 index 0000000..0045bc1 --- /dev/null +++ b/note/demo/main.tex @@ -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 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 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 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| 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} diff --git a/note/demo/onepage-demo.tex b/note/demo/onepage-demo.tex new file mode 100644 index 0000000..02e6d87 --- /dev/null +++ b/note/demo/onepage-demo.tex @@ -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 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} diff --git a/note/note-quickstart.tex b/note/note-quickstart.tex new file mode 100644 index 0000000..bb9aabe --- /dev/null +++ b/note/note-quickstart.tex @@ -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} diff --git a/note/note-setup-borderless.tex b/note/note-setup-borderless.tex new file mode 100644 index 0000000..e3d9a29 --- /dev/null +++ b/note/note-setup-borderless.tex @@ -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} diff --git a/note/note-setup-box.tex b/note/note-setup-box.tex new file mode 100644 index 0000000..b3867fb --- /dev/null +++ b/note/note-setup-box.tex @@ -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} diff --git a/note/note-setup-leftsidebox.tex b/note/note-setup-leftsidebox.tex new file mode 100644 index 0000000..a65b567 --- /dev/null +++ b/note/note-setup-leftsidebox.tex @@ -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} diff --git a/note/note-setup-mdframed.tex b/note/note-setup-mdframed.tex new file mode 100644 index 0000000..c54144e --- /dev/null +++ b/note/note-setup-mdframed.tex @@ -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} diff --git a/note/note-setup-simple.tex b/note/note-setup-simple.tex new file mode 100644 index 0000000..4a2f8db --- /dev/null +++ b/note/note-setup-simple.tex @@ -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} diff --git a/note/note-setup.tex b/note/note-setup.tex new file mode 100644 index 0000000..fa41482 --- /dev/null +++ b/note/note-setup.tex @@ -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}