elegantnote.cls
%% start of file `elegantnote.cls'.
%% Copyright 2013-2019 ddswhu (ddswhu@gmail.com).
%
% % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantnote}[2013/07/18 v1.00 elegant note document class]
\RequirePackage{color,xcolor}
\newcommand*{\base}[1]{
\def\@base{\includegraphics[scale=0.3]{#1}
}
}
\DeclareOption{green}{
\definecolor{main}{RGB}{210,168,75}
\definecolor{seco}{RGB}{9,80,3}
\definecolor{thid}{RGB}{0,175,152}
\base{greenbase.pdf}
}
\DeclareOption{cyan}{
\definecolor{main}{RGB}{239,126,30}
\definecolor{seco}{RGB}{0,175,152}
\definecolor{thid}{RGB}{236,74,53}
\base{cyanbase.pdf}
}
\DeclareOption{blue}{
\definecolor{main}{RGB}{127,191,51}
\definecolor{seco}{RGB}{0,145,215}
\definecolor{thid}{RGB}{180,27,131}
\base{bluebase}
}
\DeclareOption{times}{
\AtBeginDocument{
\RequirePackage{times}
}
}
\DeclareOption{mtpro}{
\AtBeginDocument{
\RequirePackage{mtpro2}
}
}
%%載入基礎類
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{book}
}
\ExecuteOptions{green}
\ProcessOptions\relax
\LoadClass[12pt,a4paper,openany]{book}
\newtoks\zhtitle
\newtoks\entitle
\newtoks\email
\newtoks\version
%%數學字體宏包
%% 常用宏包
\RequirePackage{graphicx}
\RequirePackage{enumerate}
\RequirePackage{amsmath,mathrsfs,amsfonts}
\RequirePackage{booktabs}
\linespread{1.3}
\graphicspath{{./figure/}{./figures/}{./image/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
\newcommand*{\myquote}[1]{\def\@myquote{#1}}
\newcommand*{\logo}[1]{
\def\@logo{\includegraphics[height=5.8cm]{#1}
}
}
%\newcommand*{\base}[1]{
% \def\@base{\includegraphics[scale=0.3]{#1}
% }
%}
%
%\newsavebox{\mylogo}
%\sbox{\mylogo}{%
%\centering
%\includegraphics[scale=0.3]{base.pdf}}
\newcommand*{\cover}[1]{\def\@cover{
\ThisTileWallPaper{\paperwidth}{\paperheight}{#1}
}
}
%% 頁面設置
\RequirePackage{hyperref}
\hypersetup{
breaklinks,
baseurl =http://,
unicode,
bookmarksnumbered =true,
bookmarksopen =true,
pdfauthor =\@author,
pdftitle =\@title note,
pdfsubject =\@author \@title note,
pdfkeywords ={notes},
pdfcreator ={XeLaTeX with elegantnote class},
colorlinks,
linkcolor =seco,
plainpages =false,
pdfstartview =FitH,
pdfborder={0 0 0},
linktocpage
}
\RequirePackage{geometry}
\geometry{
a4paper,
left=27mm, %% or inner=23mm
right=27mm, %% or outer=18mm
top=25.4mm, bottom=25.4mm,
headheight=2.17cm,
headsep=4mm,
footskip=12mm
}
%%% base
%\newsavebox{\mylogo}
%\sbox{\mylogo}{%
%\centering
%\includegraphics[scale=0.3]{base.pdf}} %需要修改尺寸和文件名
\RequirePackage{wallpaper}
%% 章節設置
\RequirePackage[center,pagestyles]{titlesec}
\renewcommand{\chaptername}{第 \thechapter 章}
\titleformat{\chapter}[display]{\normalfont}
{\bfseries\filcenter\LARGE\enspace \color{seco}\chaptername\enspace}{1pt}{\color{seco}\LARGE\bfseries\filcenter}[\@base]
\titleformat{\section}[hang]{\sffamily}
{\hspace{-2.45em}\Large\bfseries{\color{seco}\thesection}\enspace}{1pt}{\color{seco}\Large\bfseries\filright}
\titleformat{\subsection}[hang]{\sffamily}
{\large\bfseries\color{seco}\thesubsection\enspace}{1pt}{\color{seco}\large\bfseries\filright}
\titlespacing{\chapter}{0pt}{0pt}{1.5\baselineskip}
%\titlespacing{\subsection}{0pt}{0.5\baselineskip}{-\baselineskip}
%%中文結構名字
\renewcommand{\contentsname}{\bfseries 目\hspace{2em}錄}
\renewcommand{\figurename}{\textbf{圖}}
\renewcommand{\tablename}{\text{表}}
\renewcommand{\partname}{部分}
\renewcommand{\listfigurename}{\bfseries 插圖目錄}
\renewcommand{\listtablename}{\bfseries 表格目錄}
\renewcommand{\bibname}{\bfseries 參考文獻}
\renewcommand{\appendixname}{\bfseries 附\hspace{2em}錄}
\renewcommand{\indexname}{\bfseries 索\hspace{2em}引}
%%字體設置
%\RequirePackage{lmodern,fix-cm,type1cm}
\RequirePackage{fontenc}
\RequirePackage[no-math,cm-default]{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\RequirePackage{xunicode}
\RequirePackage{xltxtra}
\setmainfont[Ligatures=TeX]{Minion Pro} % (\textrm)
\setsansfont{Myriad Pro} % (\textsf)
\setmonofont{Adobe Garamond Pro}%Palatino Linotype
%-中文字體設置-%
\RequirePackage{xeCJK}
\setCJKmainfont[BoldFont={黑體},ItalicFont={楷體}]{華文中宋}%方正書宋_GBK Adobe Song Std L
\setCJKsansfont[BoldFont={黑體}]{方正中等線簡體}
\setCJKmonofont{方正啟體簡體}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\setCJKfamilyfont{new}{方正蘇新詩柳楷簡體}
%% 定理\引理\定義樣式設置
\RequirePackage{environ}
\RequirePackage{tikz}
\usetikzlibrary{shapes,decorations}
%define the main and seco color in document
%\definecolor{main}{RGB}{210,168,75}
%\definecolor{seco}{RGB}{9,80,3}
%\definecolor{thid}{RGB}{0,175,152}
%\definecolor{main}{RGB}{239,126,30}
%\definecolor{seco}{RGB}{0,175,152}
%\definecolor{thid}{RGB}{236,74,53}
%\definecolor{main}{RGB}{127,191,51}
%\definecolor{seco}{RGB}{0,145,215}
%\definecolor{thid}{RGB}{180,27,131}
\definecolor{bule}{RGB}{18,29,57}
\definecolor{bablue}{RGB}{248,248,248}
%define the style of tikz newthemsty
\tikzstyle{newthemsty}
=[draw=seco, fill=blue!10,very thick,rectangle,
rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{newthemstytitle}
=[fill=seco, text=blue!10]
\tikzstyle{newdefinitionsty}
=[draw=main, fill=yellow!20,very thick,rectangle,
rounded corners, inner sep=10pt, inner ysep=20pt,
text=black,fill opacity=0.9]
\tikzstyle{newdefinitionstytitle}
=[fill=main, text=white]
\tikzstyle{newpropositionsty}
=[draw=thid, fill=bablue,very thick,rectangle,
rounded corners, inner sep=10pt, inner ysep=20pt,
text=black,fill opacity=0.9]
\tikzstyle{newpropositionstytitle}
=[fill=thid, text=white]
%%define the "newthem" environment
\newcounter{Newthem}[chapter]
\renewcommand{\theNewthem}{\thechapter.\arabic{Newthem}}
\NewEnviron{newthem}[1][{}]{%
\noindent\centering
\begin{tikzpicture}
\node[newthemsty] (box){
\begin{minipage}{0.93\columnwidth}
\sffamily\BODY
\end{minipage}};
\node[newthemstytitle,right=10pt] at (box.north west){
\bf\textsf{Theorem \stepcounter{Newthem}\theNewthem\; #1}};
\node[newthemstytitle, rounded corners] at (box.east) {$\clubsuit$};
\end{tikzpicture}
}[\par\vspace{.5\baselineskip}]
%%define the "newlemma" environment
\newcounter{Newlemma}[chapter]
\renewcommand{\theNewlemma}{\arabic{Newlemma}}
\NewEnviron{newlemma}[1][{}]{%
\noindent\centering
\begin{tikzpicture}
\node[newthemsty] (box){
\begin{minipage}{0.93\columnwidth}
\sffamily\BODY
\end{minipage}};
\node[newthemstytitle,right=10pt] at (box.north west){
\bf\textsf{Lemma \stepcounter{Newlemma}\theNewlemma\; #1}};
\node[newthemstytitle, rounded corners] at (box.east) {$\clubsuit$};
\end{tikzpicture}
}[\par\vspace{.5\baselineskip}]
%%define the "newcorol" environment
\newcounter{Newcorol}[chapter]
\renewcommand{\theNewcorol}{\arabic{Newcorol}}
\NewEnviron{newcorol}[1][{}]{%
\noindent\centering
\begin{tikzpicture}
\node[newthemsty] (box){
\begin{minipage}{0.93\columnwidth}
\sffamily\BODY
\end{minipage}};
\node[newthemstytitle,right=10pt] at (box.north west){
\bf\textsf{Corollary \stepcounter{Newcorol}\theNewcorol\; #1}};
\node[newthemstytitle, rounded corners] at (box.east) {$\clubsuit$};
\end{tikzpicture}
}[\par\vspace{.5\baselineskip}]
%% define the "proposition" environment
\newcounter{Newprop}[chapter]
\renewcommand{\theNewprop}{\thechapter.\arabic{Newprop}}
\NewEnviron{newprop}[1][{}]{%
\noindent\centering
\begin{tikzpicture}
\node[newpropositionsty] (box){
\begin{minipage}{0.93\columnwidth}
\sffamily\BODY
\end{minipage}};
\node[newpropositionstytitle,right=10pt] at (box.north west){
\bf\textsf{Proposition \stepcounter{Newprop}\theNewprop\; #1}};
\node[newpropositionstytitle, rounded corners] at (box.east) {$\spadesuit$};
\end{tikzpicture}
}[\par\vspace{.5\baselineskip}]
%%define the "newdef" environment
\newcounter{Newdefinition}[chapter]
\renewcommand{\theNewdefinition}{\thechapter.\arabic{Newdefinition}}
\NewEnviron{newdef}[1][{}]{%
\noindent\centering
\begin{tikzpicture}
\node [newdefinitionsty] (dbox){\begin{minipage}{0.93\textwidth}\itshape\BODY\end{minipage}};
\node[newdefinitionstytitle, right=10pt] at (dbox.north west) {\bf\textsf{Definition \stepcounter{Newdefinition}\theNewdefinition\; #1}};
\node[newdefinitionstytitle, rounded corners] at (dbox.east) {$\heartsuit$};
\end{tikzpicture}
}[\par\vspace{.5\baselineskip}]
%%define the note and newproof environment
\RequirePackage{pifont,manfnt}
\newenvironment{note}{\par\ttfamily\itshape\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{Note:}}}{\par\vspace{.5\baselineskip}}
\newenvironment{example}{\par\noindent\textbf{Example: }\color{black!90}}{\par\vspace{.5\baselineskip}}
\newenvironment{assumption}{\par\noindent\textbf{Assumptions: }\color{black!90}}{\par\vspace{.5\baselineskip}}
\newenvironment{conclusion}{\par\noindent\textbf{Conclusions: }\color{black!90}}{\par\vspace{.5\baselineskip}}
\newenvironment{newproof}{\par\noindent{\makebox[0pt][r]{\color{seco}\ding{43}\;\;}\textbf{Proof:}}\color{black!90}\small}{\hfill$\Box$\quad\par\vspace{.5\baselineskip}}
%頁眉頁腳
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\fancyhf{}
\fancyhead[EL,OR]{\color{seco}--\thepage/\pageref{LastPage}--}
\fancyhead[ER]{\color{seco}\em\nouppercase\leftmark{}}
\fancyhead[OL]{\color{seco}\em\nouppercase\rightmark}
\fancyfoot[c]{\@base}
\renewcommand{\headrule}{\color{seco}\hrule width\textwidth}
\pagestyle{fancy}
\fancypagestyle{plain}{\renewcommand{\headrulewidth}{0pt}\fancyhf{}\renewcommand{\headrule}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\; #1}{} }
\renewcommand{\chaptermark}[1]{\markboth{\chaptername \; #1\;}{}}
%\let\origdoublepage\cleardoublepage
%\newcommand{\clearemptydoublepage}{%
% \clearpage
% {\pagestyle{empty}\origdoublepage}%
%}
%\let\cleardoublepage\clearemptydoublepage
%\RequirePackage{nextpage}
%\cleartooddpage[\thispagestyle{empty}]
%\cleartoevenpage[\thispagestyle{empty}]
%%封面
\def\maketitle{%
\thispagestyle{empty}
\@cover
\vfill
\vspace*{2cm}
\begin{center}
\color{main}
\rule{0.8\textwidth}{2pt}\\
\Huge {\color{seco} \bfseries \the\entitle } {\color{main} \bfseries Note}\\
{\Huge \CJKfamily{new}{\color{seco} \the\zhtitle } 筆記}\\
\rule{0.8\textwidth}{2pt}
\end{center}
\vskip3ex
\begin{figure}[htp]
\centering
\@logo
\end{figure}
\begin{center}
\begin{minipage}{0.65\textwidth}
\Eindent\color{bule}\@myquote
\end{minipage}
\end{center}
\vfill
\vspace{2cm}
\begin{flushright}
\color{main}
\rule{0.45\textwidth}{1pt}\\
整理:{\color{seco}\@author}\\
整理時間:{\color{seco}\today}\\
Email: \hyperlink{\the\email}{\the\email}\\
\rule{0.45\textwidth}{1pt}
\end{flushright}
\vfill
\begin{center}
\color{main} Version: \the\version
\end{center}
\vfil\eject
}
%%中文兩個字符縮進
%----字寬/縮進-----
%----CJK字符寬度
%\f@size = 當前字符大小數值(pt/pt)
%\p@ = 1pt
\def\elegant@CJKChar@size{\hskip \f@size \p@}
%----定義字寬
%字寬 = 字符寬度 + 字符間距 = 相鄰字符中心的間距
\newdimen\elegant@CJKChar@size@dimen
\settowidth\elegant@CJKChar@size@dimen{\elegant@CJKChar@size\CJKglue}
%----用戶接口
%負責刷新字寬和段落縮進
\newcommand{\CJKsetfontspace}{%
%刷新字寬
\settowidth\elegant@CJKChar@size@dimen{\elegant@CJKChar@size\CJKglue}%
%刷新段落縮進
%判斷段落縮進是否被設置為0(如果是表示要求不縮進)
\ifdim\parindent=0pt%
\relax%
\else%
\parindent2\elegant@CJKChar@size@dimen%
\fi%
}
\newcommand{\Eindent}{\CJKsetfontspace\parindent2\elegant@CJKChar@size@dimen}
\newcommand{\Enoindent}{\parident\z@}
%----自動執行
\AtBeginDocument{\Eindent}
main.tex
\documentclass[cyan]{elegantnote}
\author{ddswhu \& 小L}
\email{ddswhu@gmail.com}
\zhtitle{優美的\LaTeX{}模板}
\entitle{Elegant \LaTeX{}}
\version{1.00}
\myquote{Victory won\rq t come to us unless we go to it.}
\logo{logo.pdf}
\cover{cover.pdf}
%green color
\definecolor{main1}{RGB}{210,168,75}
\definecolor{seco1}{RGB}{9,80,3}
\definecolor{thid1}{RGB}{0,175,152}
%cyan color
\definecolor{main2}{RGB}{239,126,30}
\definecolor{seco2}{RGB}{0,175,152}
\definecolor{thid2}{RGB}{236,74,53}
%cyan color
\definecolor{main3}{RGB}{127,191,51}
\definecolor{seco3}{RGB}{0,145,215}
\definecolor{thid3}{RGB}{180,27,131}
\usepackage{makecell}
\usepackage{lipsum}
\begin{document}
\maketitle
\tableofcontents
\chapter{Elegant Note模板的由來}
只有當自己想去做一件事的時候才能把事情做好!
\section{長長的歷史,長長的期待}
寫這個模板的初衷是為了簡化我在寫筆記中的工作,因為我不會寫類文件和包文件,所以,最當初是想拜托小L做出一個簡潔,清爽的\LaTeX{}模板,最好是類文件,而且因為這樣可以簡化導言區復雜的內容。后來,和小L一拍即合,遂開始一起做Elegant\LaTeX{}的設計。
在學校的時候,搞定了定理環境樣式的代碼。因為不想重復 ChinaTeX 那個經典的頁眉頁腳,我找到了計量書上的一個圖案,小L拿 Ti\emph{k}Z 一點一點把那個畫出來了,不過我最后還是用的截取的方式得到的圖案。然后慢慢地,我們把初步的樣子做出來了。
2013年的暑假開始后,我對那個初步的模板做了一點改動,然后用它寫了Dynamic Programing 的筆記,并且,在寫的過程中,對模板加了封面,也就是模板現在的封面。至此,模板的大致樣子終于出來了,不過也在寫筆記的過程中知道了某些不足,比如
\begin{enumerate}
\item 定理類的環境在我們這個模板中不能浮動,也不能跨頁,在我們這個1.00版本中,這個功能仍然沒有得到解決。
\item 某些環境不足,比如例子、假設、性質、結論等環境,在1.00版本中已經增加了這幾個環境。
\item 一些我們不可預知的錯誤將會不期而遇。
\item 一些我們目前沒有需求,但是可以繼續改進的地方,比如表格樣式,比如抄錄樣式等。
\end{enumerate}
寫完那個筆記之后越發讓我對Elegant\LaTeX{}模板的制作更有激情,在和小L相互討論的幾天里,我們終于得到了現在這個版本的ElegantNote模板。
\section{一張白紙折騰出一個模板}
我以前從未寫過類文件,所以,寫這個模板的過程必然是折騰的過程,在寫模板的過程中,最主要參考了moderncv.cls文件、武漢大學黃正華老師的論文模板,以及
各大\LaTeX{}疑問解答網站。
{\color{thid}這章還有這么大空間,忍不住插個圖!}
\begin{figure}[!hbtp]
\includegraphics[width=0.8\textwidth]{happy.jpg}
\caption{Happiness,We have it!\label{figur:happy}}
\end{figure}
\chapter{Elegant Note開服說明}
\section{關于字體}
首先呢?基于本模板追求視覺上的美觀的角度,強烈建議使用者安裝./fonts/文件夾下的字體。出于版權的考慮,務必不能將此模板用于涉及盈利目的的商業行為,否則,后果自負,本模板帶的字體僅供學習使用,如果您喜歡某種字體,請自行購買正版。本文主要使用的字體如下
\begin{itemize}
\itemsep=3pt
\parskip=0pt
\item Adobe Garamond Pro
\item Minion Pro \& Myriad Pro
\item 方正字體
\item 華文中宋
\end{itemize}
并且,如果系統內安裝了Adobe字體,建議大家把模板中的黑體,楷體,宋體等字替換成Adobe字體,這樣可以達到最佳效果。
\begin{note}
需要特別注意的是,如果筆記需要使用到抄錄環境的,請重新修改字體,此版本并未為抄錄環境設置合適字體,本note環境的字體即為抄錄環境使用到的字體。
\end{note}
\section{文檔說明}
\subsection{編譯方式}
本模板基于book文類,所以book的選項對于本模板也是有效的。但是,只支持 \XeLaTeX{},編碼為 UTF-8,推薦使用 \TeX{}live編譯。作者編寫環境為Win8(64bit)+\TeX{}live 2013。
本文特殊選項設置共有2類,分為{\color{main}顏色}和{\color{main}數學字體}。
\subsection{選項設置}
第一類為{\color{main}顏色}主題設置,內置3組顏色主題,分別為green(default),cyan,blue。默認為green顏色主題。需要改變顏色的話請自行到elegantnote.cls文件內對顏色的RGB值進行修改。
第二類為{\color{main}數學字體}設置,有兩個可選項,分別是computer modern 和 mtpro2字體,默認使用cm字體,無需在類文件前加選項,調用mtpro2字體的方法為\verb|\documentclass[mtpro]{elegantnote}|
\begin{table}[htp]
\centering
\begin{tabular}{ccccc}
\toprule
& green & cyan & blue & 主要使用的環境\\
\midrule
main & \makecell{{\color{main1}\rule{1cm}{1cm}}}& \makecell{{\color{main2}\rule{1cm}{1cm}}}&\makecell{ {\color{main3}\rule{1cm}{1cm}}}& newdef\\
seco &\makecell{ {\color{seco1}\rule{1cm}{1cm}}}& \makecell{{\color{seco2}\rule{1cm}{1cm}}}&\makecell{ {\color{seco3}\rule{1cm}{1cm}}}&newthem \ newlemma \ newcorol\\
thid &\makecell{ {\color{thid1}\rule{1cm}{1cm}}}& \makecell{{\color{thid2}\rule{1cm}{1cm}}}&\makecell{ {\color{thid3}\rule{1cm}{1cm}}}&newprop\\
\bottomrule
\end{tabular}
\caption{Elegant note 模板中的三套顏色主題\label{tab:color thm}}
\end{table}
\subsection{數學環境簡介}
在我們這個模板中,定義了三大類環境
\begin{enumerate}
\item 定理類環境,包含標題和內容兩部分。根據格式的不同分為3種
\begin{itemize}
\item {\color{main} newdef} 環境,含有一個可選項,編號以章節為單位;
\item {\color{main}newthem、newlemma、newcorol} 環境,三者顏色一致,但是定理環境編號以章節為單位,引理和推論為全文編號;
\item newprop 環境,含有可選項,編號以章節為單位。
\end{itemize}
\item 證明類環境,有{\color{main}newproof、note} 環境,特點是,有引導符和引導詞,并且證明環境有結束標志。
\item 示例環境,有{\color{main} example、assumption、conclusion} 環境,三者均以粗體的引導詞為開頭,字體以灰色,和普通段落格式一致。
\end{enumerate}
\subsection{可編輯的字段}
在模板中,可以編輯的字段分別為作者\verb|\author|、\verb|\email|、\verb|\zhtitle|、\verb|\entitle|、\verb|\version|。并且,可以根據自己的喜好把封面水印效果的\verb|cover.pdf|替換掉,以及封面中用到的\verb|logo.pdf|。
\chapter{筆記寫作示例}
\section{靈魂不隨便出賣,代碼也不隨便瞎寫}
\lipsum[3]
考慮如下的隨機動態規劃問題
\begin{align*}
&\max(\min)\quad \mathbb{E}\int_{t_0}^{t_1}f(t,x,u)\,dt\\
&\quad\mbox{s.t.} \quad dx=g(t,x,u)dt+\sigma(t,x,u)dz\\
&\quad \hspace{2.em} k(0)=k_0\;\text{given}
\end{align*}
where $z$ is stochastic process or white noise or wiener process.
\begin{newdef}[Wiener Process]
If $z$ is wiener process, then for any partition $t_0,t_1,t_2,\ldots$ of time interval, the random variables $z(t_1)-z(t_0),z(t_2)-z(t_1),\ldots$ are independently and normally distributed with zero means and variance $t_1-t_0,t_2-t_1,\ldots$
\end{newdef}
\lipsum[1-2]
\begin{newthem}[勾股定理]
勾股定理的數學表達為
\[a^2+b^2=c^2\]
其中$a,b$為直角三角形的兩條直角邊長,$c$為直角三角形斜邊長。
\end{newthem}
\begin{note}
因為引理,推論的樣式和定理的樣式一致,僅僅只有計數器的設置不一樣,在這里,我們就不寫引理和推論的例子了。
\end{note}
\lipsum[4]
\begin{newprop}[最優性原理]
如果$u^*$在$[s,T]$上為最優解,則$u^*$在$[s,T]$任意子區間都是最優解,假設區間為$[t_0,t_1]$的最優解為$u^*$,則$u(t_0)=u^{*}(t_0)$,即初始條件必須還是在$u^*$上。
\end{newprop}
\lipsum[5-6]
\begin{newcorol}
假設$V(\cdot,\cdot)$為值函數,則跟據最大值原理,有如下推論
\[
V(k,z)=\max\Big\{u\big(zf(k)-y\big)+\beta \mathbb{E}V(y,z^\prime)\Big\}
\]
\end{newcorol}
\begin{newproof}
因為 $y^*=\alpha\beta z k^\alpha$,$V(k,z)=\alpha/1-\alpha\beta\ln k_0+1/1-\alpha\beta \ln z_0+\Delta$。
\begin{align*}
\text{右邊}&=\Big\{u\big(zf(k)-y\big)+\beta \mathbb{E}V(y,z^\prime)\Big\}\\
&=\ln(zk^\alpha-\alpha\beta zk^\alpha)+\beta\mathbb{E}\Big[\frac{\alpha}{1-\alpha\beta}\ln y+\frac{1}{1-\alpha\beta}\ln z^\prime+\Delta\Big]\\
&=\ln(1-\alpha\beta)zk^\alpha+\beta\Big\{\mathbb{E}\big[\frac{\alpha}{1-\alpha\beta}\ln \alpha\beta z k^\alpha\big]+\frac{1}{1-\alpha\beta}\mathbb{E}[\ln z^\prime]+\Delta\Big\}
\end{align*}
利用$\mathbb{E}[\ln z^\prime]=0$,并將對數展開得
\begin{align*}
\text{右邊}&=\ln (1-\alpha\beta)+\ln z+\alpha\ln k+\frac{\alpha\beta}{1-\alpha\beta}\big[\ln \alpha\beta+\ln z+\alpha\ln k\big]+\frac{\beta}{1-\alpha\beta}\mu+\beta \Delta\\
&=\frac{\alpha}{1-\alpha\beta}\ln k+\frac{1}{1-\alpha\beta}\ln z+\Delta
\end{align*}
所以$\text{左邊}=\text{右邊}$,證畢。
\end{newproof}
\begin{conclusion}
今天看到一則小幽默,是這樣說的:{\color{main} 別人都關心你飛的有多高,只有我關心你的翅膀好不好吃!}說多了都是淚??!
\end{conclusion}
最后祝大家\LaTeX{}的學習之路快樂精彩!
\end{document}