MCM/ICM(数学建模美赛) LaTeX常用操作汇总(拿来就用!)

2024-02-09 12:36

本文主要是介绍MCM/ICM(数学建模美赛) LaTeX常用操作汇总(拿来就用!),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

官方模板

https://www.comap.com/undergraduate/contests/mcm/flyer/MCMICM_Summary.tex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MCM/ICM LaTeX Template %%
%% 2024 MCM/ICM           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{left=1in,right=0.75in,top=1in,bottom=1in}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Replace ABCDEF in the next line with your chosen problem
% and replace 1111111 with your Team Control Number
\newcommand{\Problem}{ABCDEF}
\newcommand{\Team}{1111111}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\usepackage{newtxtext}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{newtxmath} % must come after amsXXX\usepackage[pdftex]{graphicx}
\usepackage{xcolor}
\usepackage{fancyhdr}
\lhead{Team \Team}
\rhead{}
\cfoot{}\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}{Definition}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\graphicspath{{.}}  % Place your graphic files in the same directory as your main document
\DeclareGraphicsExtensions{.pdf, .jpg, .tif, .png}
\thispagestyle{empty}
\vspace*{-16ex}
\centerline{\begin{tabular}{*3{c}}\parbox[t]{0.3\linewidth}{\begin{center}\textbf{Problem Chosen}\\ \Large \textcolor{red}{\Problem}\end{center}}& \parbox[t]{0.3\linewidth}{\begin{center}\textbf{2024\\ MCM/ICM\\ Summary Sheet}\end{center}}& \parbox[t]{0.3\linewidth}{\begin{center}\textbf{Team Control Number}\\ \Large \textcolor{red}{\Team}\end{center}}	\\\hline
\end{tabular}}
%%%%%%%%%%% Begin Summary %%%%%%%%%%%
% Enter your summary here replacing the (red) text
% Replace the text from here ...
\begin{center}
\textcolor{red}{%
Use this template to begin typing the first page (summary page) of your electronic report. This \newline
template uses a 12-point Times New Roman font. Submit your paper as an Adobe PDF \newline
electronic file (e.g. 1111111.pdf), typed in English, with a readable font of at least 12-point type.	\\[2ex]
Do not include the name of your school, advisor, or team members on this or any page.	\\[2ex]
Be sure to change the control number and problem choice above.	\\
You may delete these instructions as you begin to type your report here. 	\\[2ex]
\textbf{Follow us @COMAPMath on Twitter or COMAPCHINAOFFICIAL on Weibo for the \newline
most up to date contest information.}
}
\end{center}
% to here
%%%%%%%%%%% End Summary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
\end

编辑器

  • 在线:overleaf.com
  • 本地:TeXworks editor

基础操作

换页:

\newpage

段落缩进:

\indent

字体加粗:

\textbf{abc}

字体斜体:

\textit{abc}

普通段落:

\par{content}

需要居中的内容(例如标题、Summary等)

\begin{center}\LARGE{TITLE}\vspace{0.4cm}\\\large \textbf{Summary}
\end{center}

特殊符号

\_ % 下划线
\% % 百分号

图片

\usepackage{graphicx}
\begin{figure}[H]\centering\includegraphics[width=0.5\textwidth]{1.png}\caption{Picture Caption}\label{fig1}
\end{figure}

在段内引用该图片:

\ref{fig1}

多个图组在一起:

\begin{figure}\centering\begin{minipage}[b]{0.45\textwidth}\centering\includegraphics[width=0.8\textwidth]{1.png}\caption{name 1}\label{fig:1}\end{minipage}\begin{minipage}[b]{0.45\textwidth}\centering\includegraphics[width=0.8\textwidth]{2.png}\caption{name 2}\label{fig:2}\end{minipage}
\end{figure}

无序列表

普通无序列表:

\begin{itemize}\item \item \item 
\end{itemize}

上白下黑尖无序列表:

\begin{enumerate}\item[\ding{226}] \item[\ding{226}] \item[\ding{226}] 
\end{enumerate}

表格

三线表:

在引言区引用:

\usepackage{longtable}
\usepackage{booktabs}

正文代码:

\begin{longtable}{ccc}\toprule\textbf{Tit1} & \textbf{Tit2} & \textbf{Tit3} \\\midrulea & b & c \\a & b & c \\a & b & c \\\bottomrule
\end{longtable}

如果要对某一行添加颜色,则可以在正文前添加宏包:

\usepackage[table]{xcolor}

在要添加背景色的那一行的代码前加入:

\rowcolor{green!40}

其中,green可以替换成其他的颜色(red, yellow, blue, orange, pink, …),"!"后的数字表征底色的深度。

合并单元格:(都是在这个格子最左上方所在“坐标”处写LaTeX代码)

竖向合并单元格:

\multirow{2}{*}{_Content_}

横向合并单元格:

\multicolumn{2}{c}{_Content_}

e.g.

\begin{table}[!htbp]\begin{center}\caption{Metabolic rate}\vspace{-0.5cm}\begin{tabular}{cccc}\toprule\multirow{2}{*}{Flying} & \multirow{2}{*}{weight} & \multicolumn{2}{c}{Metabolic rate} \\\cmidrule{3-4}& & Dynamic & Static \\\midrule\bottomrule \end{tabular}\end{center}
\end{table}

注:如果使用table中嵌套longtable,可能会出现两个表格之间的编号相差2。解决方法是:不要在\begin{table}后\begin{longable}前定义标题,而是在longtable内部定义标题,此时要注意在longtable内部使用\caption命令时,结尾必须加\\

\begin{table}[!h]\centering\begin{longtable}{ccc}\caption{Caption} \\ % 后面的这两条斜杠不能省略\toprule\textbf{Tit1} & \textbf{Tit2} & \textbf{Tit3} \\\midrulea & b & c \\a & b & c \\a & b & c \\\bottomrule\label{Label} % 正文中使用\ref{Label}来引用\end{longtable}
\end{table}

对于“符号说明”表格,可以仅设置第一列的宽度(例如设置为1cm):

\begin{longtable}{p{1cm}<{\centering}l}\toprule\textbf{Tit1} & \textbf{Tit2} \\\midrule$a$ & b \\$a$ & b \\$a$ & b \\\bottomrule
\end{longtable}

表格下方带小字批注可以参考如下代码:

\begin{table}[!htbp]  
\centering  
\caption{caption}  
\label{tab:example}  
\begin{threeparttable}  
\begin{longtable}{ccc}  
\toprule
1 & 2 & 3 \\
\midrule
1 & 2\textsuperscript{2} & 3 \\  
4 & 5 & 6 \\  
7 & 8 & 9 \\
\bottomrule
\end{longtable}  \begin{tablenotes} % 表格下方的小字批注\item[1] aaa  \item[2] bbb  
\end{tablenotes}  
\end{threeparttable}  
\end{table} 

公式

带编号的公式:

\begin{equation}_equation_content_\label{e1}
\end{equation}

参考文献

在文章最下方的参考文献板块,书写以下代码:

\begin{thebibliography}{99}\bibitem{reference1}\bibitem{reference2}\bibitem{reference3}
\end{thebibliography}

在文中使用\cite{}进行引用。

Report on Use of AI

参考样式:(表格式的)

宏包:

\usepackage{tabularx} % Report on Use of AI中的表格
\usepackage{array}
\usepackage{color}
\usepackage{colortbl}
\section*{\centering Report on Use of AI}
\indent
\par{1. OpenAI ChatGPT(Nov 5, 2023 version, ChatGPT-4) }
\begin{table}[!h]\centering\begin{tabularx}{0.8\textwidth}{|X|}\hline\rowcolor{gray}Query1: \\ \rowcolor{gray}There are many methods for calculating green GDP. Please help me list a literature list and briefly introduce the calculation ideas listed in the article.\\ \hlineOutput1: \\I did a quick search and here's what I found. \\The concept of Green GDP has evolved to address the limitations of traditional GDP in reflecting the qualitative aspects of well-being, such as human, social, and natural components. \\\hline\end{tabularx}
\end{table}\par{2. Baidu ERNIE Bot(2.5.2 version)}

这篇关于MCM/ICM(数学建模美赛) LaTeX常用操作汇总(拿来就用!)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/694243

相关文章

使用Java将各种数据写入Excel表格的操作示例

《使用Java将各种数据写入Excel表格的操作示例》在数据处理与管理领域,Excel凭借其强大的功能和广泛的应用,成为了数据存储与展示的重要工具,在Java开发过程中,常常需要将不同类型的数据,本文... 目录前言安装免费Java库1. 写入文本、或数值到 Excel单元格2. 写入数组到 Excel表格

Python中pywin32 常用窗口操作的实现

《Python中pywin32常用窗口操作的实现》本文主要介绍了Python中pywin32常用窗口操作的实现,pywin32主要的作用是供Python开发者快速调用WindowsAPI的一个... 目录获取窗口句柄获取最前端窗口句柄获取指定坐标处的窗口根据窗口的完整标题匹配获取句柄根据窗口的类别匹配获取句

Python位移操作和位运算的实现示例

《Python位移操作和位运算的实现示例》本文主要介绍了Python位移操作和位运算的实现示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 目录1. 位移操作1.1 左移操作 (<<)1.2 右移操作 (>>)注意事项:2. 位运算2.1

python获取网页表格的多种方法汇总

《python获取网页表格的多种方法汇总》我们在网页上看到很多的表格,如果要获取里面的数据或者转化成其他格式,就需要将表格获取下来并进行整理,在Python中,获取网页表格的方法有多种,下面就跟随小编... 目录1. 使用Pandas的read_html2. 使用BeautifulSoup和pandas3.

Java对象转换的实现方式汇总

《Java对象转换的实现方式汇总》:本文主要介绍Java对象转换的多种实现方式,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录Java对象转换的多种实现方式1. 手动映射(Manual Mapping)2. Builder模式3. 工具类辅助映

Python的time模块一些常用功能(各种与时间相关的函数)

《Python的time模块一些常用功能(各种与时间相关的函数)》Python的time模块提供了各种与时间相关的函数,包括获取当前时间、处理时间间隔、执行时间测量等,:本文主要介绍Python的... 目录1. 获取当前时间2. 时间格式化3. 延时执行4. 时间戳运算5. 计算代码执行时间6. 转换为指

Python ZIP文件操作技巧详解

《PythonZIP文件操作技巧详解》在数据处理和系统开发中,ZIP文件操作是开发者必须掌握的核心技能,Python标准库提供的zipfile模块以简洁的API和跨平台特性,成为处理ZIP文件的首选... 目录一、ZIP文件操作基础三板斧1.1 创建压缩包1.2 解压操作1.3 文件遍历与信息获取二、进阶技

Java中字符串转时间与时间转字符串的操作详解

《Java中字符串转时间与时间转字符串的操作详解》Java的java.time包提供了强大的日期和时间处理功能,通过DateTimeFormatter可以轻松地在日期时间对象和字符串之间进行转换,下面... 目录一、字符串转时间(一)使用预定义格式(二)自定义格式二、时间转字符串(一)使用预定义格式(二)自

Python正则表达式语法及re模块中的常用函数详解

《Python正则表达式语法及re模块中的常用函数详解》这篇文章主要给大家介绍了关于Python正则表达式语法及re模块中常用函数的相关资料,正则表达式是一种强大的字符串处理工具,可以用于匹配、切分、... 目录概念、作用和步骤语法re模块中的常用函数总结 概念、作用和步骤概念: 本身也是一个字符串,其中

usb接口驱动异常问题常用解决方案

《usb接口驱动异常问题常用解决方案》当遇到USB接口驱动异常时,可以通过多种方法来解决,其中主要就包括重装USB控制器、禁用USB选择性暂停设置、更新或安装新的主板驱动等... usb接口驱动异常怎么办,USB接口驱动异常是常见问题,通常由驱动损坏、系统更新冲突、硬件故障或电源管理设置导致。以下是常用解决