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

相关文章

Linux ls命令操作详解

《Linuxls命令操作详解》通过ls命令,我们可以查看指定目录下的文件和子目录,并结合不同的选项获取详细的文件信息,如权限、大小、修改时间等,:本文主要介绍Linuxls命令详解,需要的朋友可... 目录1. 命令简介2. 命令的基本语法和用法2.1 语法格式2.2 使用示例2.2.1 列出当前目录下的文

Java String字符串的常用使用方法

《JavaString字符串的常用使用方法》String是JDK提供的一个类,是引用类型,并不是基本的数据类型,String用于字符串操作,在之前学习c语言的时候,对于一些字符串,会初始化字符数组表... 目录一、什么是String二、如何定义一个String1. 用双引号定义2. 通过构造函数定义三、St

Mysql表的简单操作(基本技能)

《Mysql表的简单操作(基本技能)》在数据库中,表的操作主要包括表的创建、查看、修改、删除等,了解如何操作这些表是数据库管理和开发的基本技能,本文给大家介绍Mysql表的简单操作,感兴趣的朋友一起看... 目录3.1 创建表 3.2 查看表结构3.3 修改表3.4 实践案例:修改表在数据库中,表的操作主要

C# WinForms存储过程操作数据库的实例讲解

《C#WinForms存储过程操作数据库的实例讲解》:本文主要介绍C#WinForms存储过程操作数据库的实例,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、存储过程基础二、C# 调用流程1. 数据库连接配置2. 执行存储过程(增删改)3. 查询数据三、事务处

Java使用Curator进行ZooKeeper操作的详细教程

《Java使用Curator进行ZooKeeper操作的详细教程》ApacheCurator是一个基于ZooKeeper的Java客户端库,它极大地简化了使用ZooKeeper的开发工作,在分布式系统... 目录1、简述2、核心功能2.1 CuratorFramework2.2 Recipes3、示例实践3

Java利用JSONPath操作JSON数据的技术指南

《Java利用JSONPath操作JSON数据的技术指南》JSONPath是一种强大的工具,用于查询和操作JSON数据,类似于SQL的语法,它为处理复杂的JSON数据结构提供了简单且高效... 目录1、简述2、什么是 jsONPath?3、Java 示例3.1 基本查询3.2 过滤查询3.3 递归搜索3.4

Python使用DrissionPage中ChromiumPage进行自动化网页操作

《Python使用DrissionPage中ChromiumPage进行自动化网页操作》DrissionPage作为一款轻量级且功能强大的浏览器自动化库,为开发者提供了丰富的功能支持,本文将使用Dri... 目录前言一、ChromiumPage基础操作1.初始化Drission 和 ChromiumPage

Linux上设置Ollama服务配置(常用环境变量)

《Linux上设置Ollama服务配置(常用环境变量)》本文主要介绍了Linux上设置Ollama服务配置(常用环境变量),Ollama提供了多种环境变量供配置,如调试模式、模型目录等,下面就来介绍一... 目录在 linux 上设置环境变量配置 OllamPOgxSRJfa手动安装安装特定版本查看日志在

利用Go语言开发文件操作工具轻松处理所有文件

《利用Go语言开发文件操作工具轻松处理所有文件》在后端开发中,文件操作是一个非常常见但又容易出错的场景,本文小编要向大家介绍一个强大的Go语言文件操作工具库,它能帮你轻松处理各种文件操作场景... 目录为什么需要这个工具?核心功能详解1. 文件/目录存javascript在性检查2. 批量创建目录3. 文件

Java常用注解扩展对比举例详解

《Java常用注解扩展对比举例详解》:本文主要介绍Java常用注解扩展对比的相关资料,提供了丰富的代码示例,并总结了最佳实践建议,帮助开发者更好地理解和应用这些注解,需要的朋友可以参考下... 目录一、@Controller 与 @RestController 对比二、使用 @Data 与 不使用 @Dat