今天是2月2號,還有三天就打美賽了,我在2021美賽Latex排版美化 完整代碼1的基礎上又做了一些補充,希望可以幫助到大家,
文章目錄
- 一、2021美賽新要求
- 二、帶顏色的表格
- 三、公式
一、2021美賽新要求
今年的總頁數不能超過25頁(4),并且從摘要的下一頁開始需要加上頁眉,之前的代碼是從正文開始算頁數的,而且右上角的格式是Page XX而不是 Page 當前頁數 of 總頁碼數(這里感謝某位同學的提醒),

這是原來的代碼部分,需要將\setcounter{page}{1}和\rhead{Page \thepage\ }分別修改并放在對應的位置:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\pagestyle{fancy}
% Uncomment the next line to generate a Table of Contents
%\tableofcontents
\newpage
\setcounter{page}{1}
\rhead{Page \thepage\ }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Begin your paper here
進行以下修改:
\begin{document}
\setcounter{page}{1} %將這一行代碼放在\begin{document}的最前面
\clearpage
\pagestyle{fancy}
% Uncomment the next line to generate a Table of Contents
\rhead{Page \thepage\ of 20}%將這一行放在\tableofcontents 前面,這樣做從目錄頁就有頁眉顯示
\tableofcontents %目錄
\newpage
修改好效果圖如下圖:

二、帶顏色的表格
除了最基本的三線表格,也許還需要用到比較表格(譬如幾個方法的比較):

需要的宏包以及自定義部分:
\usepackage[table]{xcolor}
\usepackage{colortbl}
\definecolor{mygray}{gray}{.9}
\definecolor{mypink}{rgb}{.99,.91,.95}
\definecolor{mycyan}{cmyk}{.3,0,0,0}
這里貌似需要將\usepackage{xcolor}給注釋掉,與上面的宏包有沖突:
\usepackage{graphicx}
%\usepackage{xcolor}
\usepackage{fancyhdr}
\lhead{Team \Team}
\rhead{}
\cfoot{}
編譯代碼舉例(顯示效果即為上圖Table 2):
\begin{table}[H]
\centering
\caption{ four method}\label{y}
\begin{tabularx}{0.9\textwidth}{cllll}
\toprule
method & total precision & Pacific Wren & Hermit Thrush&Varied Thrush \\
\midrule
Bayes & 50 & 100 & 16.67& 0 \\
\rowcolor{mygray}
K-Nearest Neighbors & 29.94 &50 & 16.67 & 16.67 \\
Kernel SVM & 36.84 & 12.5 & 16.67 &0 \\
\rowcolor{mygray}
Logistic Regression & 52.63 & 62.5 & 16.67 &0 \\
\bottomrule
\end{tabularx}
\end{table}
三、公式
美賽肯定需要寫公式,有些美賽論文公式寫得真的是很漂亮,看起來老舒服了,人家拿O獎也是有一定道理的,

對應的代碼如下:
\subsection{Model Settings}
The transition process is a discrete-time stochastic process.The occurence of immigrants satisfies Markov conditions.Regard to the condition probability $P(N_{n+1}=j|F_n)$,it satisfies the following expression.
\begin{equation}
P(N_{n+1}=j|N_0=i_0,N_1=i_1,\cdots,N_{n-1}=i_{n-1})=P(N_{n+1}=j|N_n=i_n)
\end{equation}
This means that when the status of the immigrations process at time $n$ is known,the status of immigration process after time $n$ has nothing to do with the status before $n$,that is ,no post-validity.We define $p_{i,j}=P(N_{n=1}=j|N_n=i_n)$,then the entire migration of process ${N_n}$ is determined by the $p_{i,j}$and the initial distribution of $N_0$.As we know from assumption,$p_{i,j}$ is only related to country $i,j$,but has nothing to do with $n$,then Markov chain is time-aligned Markov chain.Then write the $p_{i,j}$in matrix from:
\begin{equation}
P=(p_{i,j})
\begin{pmatrix}
p_{1,1}&p_{1,2} & \cdots &p_{1,226} \\
p_{2,1}& p_{2,2} &\cdots & p_{2,226}\\
\vdots &\vdots & \ddots & \vdots\\
p_{226,1}& p_{226,2}& \cdots & p_{226,226}
\end{pmatrix}
\end{equation}
Because the transition probability is positive,and residents will certainly either stay in their own country or move to other countries in the next period, thus,tha matrix has the following properities.
(1)$\underset{226}{p_{i,j}}> 0,\quad i,j=1,2,\cdots,226$
(2)$\sum p_{i,j}=1,\quad \forall i=1,2,\cdots,226$
這里比較考驗大家的latex功底,但是不要害怕,給大家介紹一個非常666的線上latex編輯器,非常方便,還可以實時查看編譯是否正確,
https://latex.codecogs.com/eqneditor/editor.php

歡迎大家留言私信交流~
鏈接:https://pan.baidu.com/s/1kkqBJcAWXWK-l2XCsxPhIA
提取碼:uxo3
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/255931.html
標籤:其他
下一篇:STL系列(二) 二分查找
