latex表格模板

发布时间: 2023-11-30 10:34 阅读: 文章来源:1MUMB100234PS

大家在写论文或者笔记的时候,很可能会用到tex文档,网路上很多的模板都比较冗长,加了一些可能不适合自己的命令。这里结束一下latex中的命令,并提供一个简单的中文latex模板(在texstudio运行)。

导言区起始。加载何种PDF文档

\documentclass[UTF8,a4paper,12pt]{ctexart}

首先看几个数学包

\usepackage{amssymb} %数学字体与符号,必备。注意此宏包已经包括了 amsfonts,不要重复使用

\usepackage{amsmath} %主要的目的是用来排版数学符号和公式

\usepackage{amsfonts}

%美国数学学会根据其印刷和电子出版物以及在线资料库的样式要求,编造的一组用于排版数学出版物的数学符号字体库宏包套件,它包含有:amsfonts、amssymb、eufrak 和 eucal 四个宏包。

%eucal 可修改 LaTeX 的数学字体命令 mathcal 。当加载该宏包后,使用 mathcal 命令,调出的是欧拉书写体,而不是通常的计算机现代书写体。它还有一个 mathscr 选项,使其可与数学字体命令 mathscr 结合使用。

%eufrak 设置了哥特字体,这是一种书写或印刷字体,外观非常华丽,多见于中世纪时的神学文献。如果已加载了 amsfonts 宏包,该宏包就是多余的。

%amsfonts 它定义了大写空心粗体字命令 mathbb 和欧拉字体命令 mathfrak 以及数学公式中各种相应的字体,如:粗数学斜体和粗希腊字母下标、求和积分等大符号下标、欧拉数学字体、斯拉夫字体等。

%amssymb 宏包套件 AMSFonts 中的一个宏包,它定义了 amsfonts 宏包里 msam 和 mabm 字库中全部数学符号的命令。当调用该宏包时,amsfonts 宏包也同时被加载了。

%amsmath 它定义了各种显示多行公式的环境和一系列排版数学公式的命令,可用以改进和提高方程式、多行上下标等数学结构的排版效果。例如,它提供的一条命令:cfrac,用来排版连分数,要比标准 LaTeX 中的 frac 命令输出效果更加美观。该宏包还有11个选项,可以影响极限、方程和方程序号等数学式的放置,而这些选项的设置要优先于源文件中其他相关选项的设置。当调用该宏包的同时,另外三个与之相关的宏包:amsbsy、amsopn amstext,也自动被加载了。

\usepackage{latexsym} %LATEX 的数学符号宏包

图片相关的宏包

\usepackage{graphicx} %图片宏包

\usepackage{graphics} %图片宏包

\usepackage{subfigure} %控制绘图子图宏包

\usepackage{color} %支持彩色

\usepackage{epsfig} %eps图像

\usepackage{epstopdf} %eps图像转PDF

表格处理宏包及用法

\usepackage{multirow} %表中的跨行合并宏包

\usepackage{multicol} %表中的跨列合并宏包

用法: https://blog.csdn.net/weixin_41519463/article/details/103737464

字体的设置% 数学字体

\usepackage{mathrsfs} %数学花体,手写体(相当于汉字的草体,连笔较多)

% -- 中文字体 -- 使用 fontspec 宏包设置字体

\setmainfont{Microsoft YaHei} % 微软雅黑

\setmainfont{YouYuan} % 幼圆

\setmainfont{NSimSun} % 新宋体

\setmainfont{KaiTi} % 楷体

\setmainfont{SimSun} % 宋体

\setmainfont{SimHei} % 黑体

% -- 英文字体 --

\usepackage{times}

\usepackage{mathpazo}

\usepackage{fourier}

\usepackage{charter}

\usepackage{helvet}

超链接使用

\usepackage[colorlinks,linkcolor=blue]{hyperref}

\hypersetup{colorlinks, bookmarks, unicode} %unicode

\documentclass[UTF8,a4paper,12pt]{ctexart}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%常用的一些宏包%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\usepackage{amsmath}% math equations, symbols\usepackage{amsfonts}% math equations, symbols\usepackage{amssymb}% math equations, symbols\usepackage{color}% color content\usepackage{url}% hyperlinks\usepackage{bm} % bold type for equations\usepackage{multirow}%\usepackage{booktabs}% 插入表格时需要调用的包\usepackage{epstopdf}% eps 转 pdf\usepackage{epsfig}\usepackage{graphicx}% 插入图片时需要调用的包\usepackage{subfigure}% 插入图片时需要调用的包\usepackage{algorithm}% 写算法时需要调用的包\usepackage{algorithmic}% 写算法时需要调用的包\usepackage{setspace}% 修改行间距需要调用的包%\usepackage{ccmap}%pdf中文复制%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 字体设置%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- 中文字体 --%\setmainfont{Microsoft YaHei}% 微软雅黑%\setmainfont{YouYuan}% 幼圆%\setmainfont{NSimSun}% 新宋体%\setmainfont{KaiTi}% 楷体%\setmainfont{SimSun}% 宋体%\setmainfont{SimHei}% 黑体% -- 英文字体 --%\usepackage{times}%\usepackage{mathpazo}%\usepackage{fourier}%\usepackage{charter}\usepackage{helvet}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%------------------页边距---------------------%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\usepackage[left=2.50cm, right=2.50cm, top=2.0cm, bottom=2.0cm]{geometry} %------------设置章标题居左--------------------------\CTEXsetup[format={\Large\bfseries}]{section}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%--------------------超链接---------------------\usepackage[colorlinks,linkcolor=blue]{hyperref}\hypersetup{colorlinks, bookmarks, unicode} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%多个文件独立时,如何包含%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\renewcommand{\algorithmicrequire}{ \textbf{Input:}} % use Input in the format of Algorithm\renewcommand{\algorithmicensure}{ \textbf{Initialize:}} % use Initialize in the format of Algorithm\renewcommand{\algorithmicreturn}{ \textbf{Output:}} % use Output in the format of Algorithm%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%设置页眉、页脚%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\usepackage{fancyhdr}\lhead{}\chead{}\lfoot{}\cfoot{}\rfoot{}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%标题、作者、日期等信息%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\title{\textbf{深度学习处理偏微分方程问题}}\author{ Simmel \thanks{学号:xx2017xxxx} }\date{\today}\begin{document}\maketitle %添加这一句才能够显示标题等信息. 是制作首页的意思,一般包括author,title,date之类的\tableofcontents %制作目录(加上这个,目录是根据标题自动生成的)\section{一般的拉普拉斯问题}多维空间~$\Omega$~上的拉普拉斯问题定义如下(Dirichlet边界条件)\begin{equation}\label{0101}\begin{cases}-\Delta u(\bm{x}) = f(\bm{x}),\bm{x} \in \Omega,\\u(\bm{x}) = g(\bm{x}), ~~~~~~~ \bm{x}\in \partial \Omega\end{cases}\end{equation}\subsection{一维拉普拉斯问题}\begin{equation}\label{010101}\begin{cases}- u_{xx} = f(x), ~~~~~x \in (a, b),\\u(a) = g(a), \\u(b) = h(b).\end{cases}\end{equation}\subsection{二维拉普拉斯问题}考虑二维拉普拉斯问题, 设定区域~$\Omega = [a,b]\times[a,b]$(规则区域), 并令 $\bm{x}=(x,y)$.\begin{equation}\label{010102}\begin{cases}-\Delta u(x,y) = f(x,y), (x,y)\in \Omega,\\u(a,y)=g_1\\u(b,y)=g_2\\u(x, a)=h_1\\u(x, b)=h_2\end{cases}\end{equation}利用神经网络~$L(\bm{x};\theta)$~逼近~$u$, 则可以得到\begin{equation*}u\approx L(\theta^*) = \underset{\theta\in\Theta}{\arg\min}\left[\frac{1}{2}\underset{\Omega}{\iint} \|\nabla L(\bm{x};\theta)\|^2 dS-\underset{\Omega}{\iint} f L(\bm{x};\theta)dS\right],\end{equation*}利用蒙特卡洛方法\footnote{MCMC详解1——蒙特卡洛方法~https://blog.csdn.net/u012290039/article/details/105694596}, \footnote{蒙特卡洛方法~ https://blog.csdn.net/itnerd/article/details/104982042},得到\begin{equation*}u\approx L(\theta^*)=\frac{1}{M}L(x,\theta)\end{equation*}\end{document}

运行结果:

•••展开全文