【Miktex】使用教程以及数学符号整理总结

  LaTeX是当今世界上最流行和使用最为广泛的 TeX格式。它构筑在 Plain TeX的基础之上,并加进了很多的功能以使得使用者可以更为方便的利用 TeX的强大功能。使用 LaTeX基本上不需要使用者自己设计命令和宏等,因为 LaTeX已经替你做好了。

一、下载安装

下载地址:http://www.miktex.org/download

二、数学公式

1、数学公式的前后要加上 $ 或 \( 和 \)

比如:$f(x) = 3x + 7$\(f(x) = 3x + 7\) 效果是一样的;
如果用 \[\],或者使用 $$$$,则该公式独占一行;
如果用
\begin{equation}\end{equation},则公式除了独占一行还会自动被添加序号, 如何公式不想编号则使用 \begin{equation*}\end{equation*}.

2、字符

普通字符在数学公式中含义一样,除了
# $ % & ~ _ ^ \ { }
若要在数学环境中表示这些符号# $ % & _ { },需要分别表示为\# \$ \% \& \_ \{ \},即在个字符前加上\

3、上标和下标

^ 来表示上标,用 _ 来表示下标,看一简单例子:

$$\sum_{i=1}^n a_i=0$$
$$f(x)=x^{x^x}$$

效果:

LaTeX技巧10:LaTeX数学公式输入初级入门

这里有更多的LaTeX上标下标的设置


4、希腊字母

更多请参见这里


5、数学函数

例如sin x, 输入应该为\sin x

6、在公式中插入文本可以通过 \mbox{text} 在公式中添加text

比如:

\documentclass{article}
\usepackage{CJK}
\begin{CJK*}{GBK}{song}
\begin{document}
$$\mbox{对任意的$x>0$}, \mbox{有 }f(x)>0. $$
\end{CJK*}
\end{document}

效果:

LaTeX技巧10:LaTeX数学公式输入初级入门

7、分数及开方

\frac{numerator}{denominator} \sqrt{expression_r_r_r}表示开平方,
\sqrt[n]{expression_r_r_r} 表示开 n 次方.


8、省略号(3个点)

\ldots 表示跟文本底线对齐的省略号;\cdots 表示跟文本中线对齐的省略号,

比如:

LaTeX技巧10:LaTeX数学公式输入初级入门

表示为 $$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$


9、括号和分隔符

()[ ] 对应于自己;
{} 对应于 \{ \}
|| 对应于 \|
当要显示大号的括号或分隔符时,要对应用 \left\right,如:

\[f(x,y,z) = 3y^2 z \left( 3 + \frac{7x+5}{1 + y^2} \right).\]对应于

 

\left. \right. 只用与匹配,本身是不显示的,比如,要输出:

LaTeX技巧10:LaTeX数学公式输入初级入门

则用 $$\left. \frac{du}{dx} \right|_{x=0}.$$


10、多行的数学公式

LaTeX技巧10:LaTeX数学公式输入初级入门

可以表示为:

\begin{eqnarray*}
\cos 2\theta & = & \cos^2 \theta - \sin^2 \theta \\
& = & 2 \cos^2 \theta - 1.
\end{eqnarray*}

其中&是对其点,表示在此对齐。
*使latex不自动显示序号,如果想让latex自动标上序号,则把*去掉


11、矩阵

LaTeX技巧10:LaTeX数学公式输入初级入门

表示为:

The \emph{characteristic polynomial} $\chi(\lambda)$ of the
$3 \times 3$~matrix
\[ \left( \begin{array}{ccc}
a & b & c \\
d & e & f \\
g & h & i \end{array} \right)\]
is given by the formula
\[ \chi(\lambda) = \left| \begin{array}{ccc}
\lambda - a & -b & -c \\
-d & \lambda - e & -f \\
-g & -h & \lambda - i \end{array} \right|.\]

c表示向中对齐,l表示向左对齐,r表示向右对齐。


12、导数、极限、求和、积分(Derivatives, Limits, Sums and Integrals)

The expression_r_r_rs

LaTeX技巧10:LaTeX数学公式输入初级入门

are obtained in LaTeX by typing

\frac{du}{dt} and \frac{d^2 u}{dx^2}

respectively. The mathematical symbol LaTeX技巧10:LaTeX数学公式输入初级入门 is produced using \partial. Thus the Heat Equation

LaTeX技巧10:LaTeX数学公式输入初级入门

is obtained in LaTeX by typing

\[ \frac{\partial u}{\partial t}
= h^2 \left( \frac{\partial^2 u}{\partial x^2}
+ \frac{\partial^2 u}{\partial y^2}
+ \frac{\partial^2 u}{\partial z^2}\right)\]

To obtain mathematical expression_r_r_rs such as

LaTeX技巧10:LaTeX数学公式输入初级入门

in displayed equations we type \lim_{x \to +\infty}, \inf_{x > s} and \sup_K respectively. Thus to obtain

LaTeX技巧10:LaTeX数学公式输入初级入门

(in LaTeX) we type

\[ \lim_{x \to 0} \frac{3x^2 +7x^3}{x^2 +5x^4} = 3.\]

Added by Goldman2000@126:-------------------------

 

To compulsively display "u \to \infty" under the limit, 

 

LaTeX数学公式 - goldman - 重头再来

 

 

we type in LaTeX

 

\frac{1}{\lim_{u \rightarrow \infty}}, \frac{1}{\lim\limits_{u \rightarrow \infty}} or

\frac{1}{ \displaystyle \lim_{u \rightarrow \infty}} respectively.

Ended by Goldman2000@126: -------------------------

 

To obtain a summation sign such as

LaTeX技巧10:LaTeX数学公式输入初级入门

we type \sum_{i=1}^{2n}. Thus

LaTeX技巧10:LaTeX数学公式输入初级入门

is obtained by typing

\[ \sum_{k=1}^n k^2 = \frac{1}{2} n (n+1).\]

We now discuss how to obtain integrals in mathematical documents. A typical integral is the following:

LaTeX技巧10:LaTeX数学公式输入初级入门

This is typeset using

\[ \int_a^b f(x)\,dx.\]

The integral sign is typeset using the control sequence \int, and the limits of integration (in this case a and b are treated as a subscript and a superscript on the integral sign.
Most integrals occurring in mathematical documents begin with an integral sign and contain one or more instances of d followed by another (Latin or Greek) letter, as in dx, dy and dt. To obtain the correct appearance one should put extra space before the d, using \,. Thus

LaTeX技巧10:LaTeX数学公式输入初级入门

LaTeX技巧10:LaTeX数学公式输入初级入门

LaTeX技巧10:LaTeX数学公式输入初级入门

and

LaTeX技巧10:LaTeX数学公式输入初级入门

are obtained by typing

\[ \int_0^{+\infty} x^n e^{-x} \,dx = n!.\]

\[ \int \cos \theta \,d\theta = \sin \theta.\]

\[ \int_{x^2 + y^2 \leq R^2} f(x,y)\,dx\,dy
= \int_{\theta=0}^{2\pi} \int_{r=0}^R
f(r\cos\theta,r\sin\theta) r\,dr\,d\theta.\]

and

\[ \int_0^R \frac{2x\,dx}{1+x^2} = \log(1+R^2).\]

respectively.

In some multiple integrals (i.e., integrals containing more than one integral sign) one finds that LaTeX puts too much space between the integral signs. The way to improve the appearance of of the integral is to use the control sequence \! to remove a thin strip of unwanted space. Thus, for example, the multiple integral

LaTeX技巧10:LaTeX数学公式输入初级入门

is obtained by typing

\[ \int_0^1 \! \int_0^1 x^2 y^2\,dx\,dy.\]

Had we typed

\[ \int_0^1 \int_0^1 x^2 y^2\,dx\,dy.\]

we would have obtained

LaTeX技巧10:LaTeX数学公式输入初级入门

A particularly noteworthy example comes when we are typesetting a multiple integral such as

LaTeX技巧10:LaTeX数学公式输入初级入门

Here we use \! three times to obtain suitable spacing between the integral signs. We typeset this integral using

\[ \int \!\!\! \int_D f(x,y)\,dx\,dy.\]

Had we typed

\[ \int \int_D f(x,y)\,dx\,dy.\]

we would have obtained

LaTeX技巧10:LaTeX数学公式输入初级入门

The following (reasonably complicated) passage exhibits a number of the features which we have been discussing:

LaTeX技巧10:LaTeX数学公式输入初级入门

One would typeset this in LaTeX by typing In non-relativistic wave mechanics, the wave function
$\psi(\mathbf{r},t)$ of a particle satisfies the
\emph{Schr\"{o}dinger Wave Equation}
\[ i\hbar\frac{\partial \psi}{\partial t}
= \frac{-\hbar^2}{2m} \left(
\frac{\partial^2}{\partial x^2}
+ \frac{\partial^2}{\partial y^2}
+ \frac{\partial^2}{\partial z^2}
\right) \psi + V \psi.\]
It is customary to normalize the wave equation by
demanding that
\[ \int \!\!\! \int \!\!\! \int_{\textbf{R}^3}
\left| \psi(\mathbf{r},0) \right|^2\,dx\,dy\,dz = 1.\]
A simple calculation using the Schr\"{o}dinger wave
equation shows that
\[ \frac{d}{dt} \int \!\!\! \int \!\!\! \int_{\textbf{R}^3}
\left| \psi(\mathbf{r},t) \right|^2\,dx\,dy\,dz = 0,\]
and hence
\[ \int \!\!\! \int \!\!\! \int_{\textbf{R}^3}
\left| \psi(\mathbf{r},t) \right|^2\,dx\,dy\,dz = 1\]
for all times~$t$. If we normalize the wave function in this
way then, for any (measurable) subset~$V$ of $\textbf{R}^3$
and time~$t$,
\[ \int \!\!\! \int \!\!\! \int_V
\left| \psi(\mathbf{r},t) \right|^2\,dx\,dy\,dz\]
represents the probability that the particle is to be found
within the region~$V$ at time~$t$.

三、在线公式编辑器

http://latex.codecogs.com/eqneditor/editor.php

 

四、Miktex模板

% This is LLNCSDE2.TEX, a variation of LLNCS.DEM
% (the demonstration file of
% the LaTeX macro package from Springer-Verlag
% for Lecture Notes in Computer Science,
% version 2.3 for LaTeX2e),
% which can be used by volume editors for the preparation
% of the front matter pages and the author index
%
% Last changes: 16.10.2006, Frank Holzwarth (texhelp@springer.de)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% In order to generate an Author Index do the following:
% After TeXing this document start the program MakeIndex by typing
% MAKEINDX -S SPRMINDX.STY <filename>
% (generates an IND file for the Author Index)
% into the DOS command line.
% (At other systems you may have to use the command MAKEINDEX.)
% Now TeX this file once again, then you will get an Author Index.
% TeX this file once more, then the TOC will be complete.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{llncs}
%
\usepackage{makeidx}  % allows for indexgeneration
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{array}
\usepackage{amsmath}
\usepackage{algorithm}

\makeindex
%
\begin{document}
%
\frontmatter          % for the preliminaries
\setcounter{page}{5}
%
\pagestyle{headings}  % switches on printing of running heads
\addtocmark{Hamiltonian Mechanics} % additional mark in the TOC
%


\title{LaTeX Template}
%命名方式:研究领域-年-月-日-周报
%例如:Knowledge Representation, 2017, Mar.22, weekly report
%
%\titlerunning{Hamiltonian Mechanics}  % abbreviated title (for running head)
%                                     also used for the TOC unless
%                                     \toctitle is used
%
\author{Zeze Chen\inst{1}}
%
%\authorrunning{Ivar Ekeland et al.}   % abbreviated author list (for running head)
%
%%%% list of authors for the TOC (use if author list has to be modified)
\tocauthor{Ivar Ekeland, Roger Temam, Jeffrey Dean, David Grove,
Craig Chambers, Kim B. Bruce, Elisa Bertino}

\index{Ekeland, Ivar}
\index{Temam, Roger}
\index{Dean, Jeffrey}
\index{Grove, David}
\index{Chambers, Craig}
\index{Bruce, Kim B.}
\index{Bertino, Elisa}
% use the command \index{<name>} for index entries

%
\institute{Princeton University, Princeton NJ 08544, USA,\\
\email{I.Ekeland@princeton.edu},\\ WWW home page:
\texttt{http://users/\homedir iekeland/web/welcome.html}
}

\maketitle              % typeset the title of the contribution

\abstract{2017.3.22. \\ \textbf{Keyword:} XXX; XXX; XXX.}



\section{First Paper}

Well, it is just testing. I don't know what will happen...


\begin{equation}
e^{\pi{i}}+1=0
\end{equation}


\section{Second Paper}

another testing...

\begin{eqnarray*}
\cos 2\theta & = & \cos^2 \theta - \sin^2 \theta \\
& = & 2 \cos^2 \theta - 1.
\end{eqnarray*}


\section{Third Paper}

testing...


\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{fig.png}  
\caption{Test figure}
\label{Figure name}
\end{figure}


\end{document}

 五、默认字体设置

Preference->Editor

 

转载于:https://www.cnblogs.com/zeze/p/6610275.html

这些模块有哪些要安装的 在数学建模竞赛中,Python 凭借其丰富的科学计算库和灵活性成为重要工具。以下是 Python数学建模中的核心应用领域及相关工具,按模块分类整理: --- ### **一、基础科学计算与数据处理** 1. **数值计算** - **NumPy**:矩阵运算、线性代数、随机数生成 - **SciPy**:积分/微分求解、优化算法、插值、傅里叶变换 - **SymPy**:符号计算(符号求导、方程解析解) 2. **数据处理** - **Pandas**:数据清洗、时间序列分析、表格操作 - **OpenPyXL**:Excel 文件交互 - **SQLAlchemy**:数据库连接(如需外部数据) --- ### **二、建模与算法实现** 1. **经典数学模型** - **Scikit-learn**:回归/分类/聚类(如线性回归、SVM、K-Means) - **Statsmodels**:统计模型(假设检验、时间序列ARIMA) 2. **优化问题** - **PuLP/CVXPY**:线性/整数规划建模 - **SciPy.optimize**:非线性规划求解器 - **GEKKO**:动态系统优化(化工、控制领域) 3. **图论与网络分析** - **NetworkX**:复杂网络建模(最短路径、PageRank算法) 4. **微分方程** - **ODEINT(SciPy)**:常微分方程数值解 - **FEniCS**:偏微分方程有限元法(高阶需求) --- ### **三、数据可视化** 1. **基础绘图** - **Matplotlib**:2D/3D静态图绘制 - **Seaborn**:统计图表美化(热力图、分布图) 2. **交互式可视化** - **Plotly**:动态可交互图表(地图、3D轨迹) - **Bokeh**:网页端交互可视化 3. **地理信息** - **Basemap/Cartopy**:地理空间数据可视化 --- ### **四、高级工具链** 1. **自动化建模** - **AutoML(TPOT/Auto-Sklearn)**:自动机器学习(时间紧迫时) 2. **高性能计算** - **Numba**:加速数值计算(基于JIT编译) - **Dask**:并行计算(大数据集处理) 3. **文档生成** - **Jupyter Notebook**:代码/公式/图表混合排版 - **Latex**:通过`pythontex`包与Python联动 --- ### **五、特殊场景工具** 1. **图像处理** - **OpenCV**:图像识别、特征提取(如卫星图像分析) 2. **文本分析** - **NLTK/Spacy**:自然语言处理(舆情类赛题) 3. **物理仿真** - **PyBullet**:刚体动力学模拟(机械控制类题目) --- ### **六、效率提升技巧** - **代码调试**:`pdb`调试器 + `logging`日志记录 - **版本控制**:Git + GitHub/Gitee 团队协作 - **环境管理**:`conda`虚拟环境隔离依赖项 - **API调用**:`requests`库获取实时数据(如天气、经济指标) --- ### **典型应用场景示例** 1. **预测类题目**:ARIMA(Statsmodels) + LSTM(PyTorch) 2. **优化调度题**:整数规划(PuLP) + 遗传算法(DEAP) 3. **评价模型题**:熵权法(NumPy) + TOPSIS(Pandas) 4. **动态系统题**:微分方程(SciPy) + 相空间图(Matplotlib) --- ### **注意事项** 1. **避免过度复杂**:优先使用成熟库而非重复造轮子 2. **结果可解释性**:关键步骤添加注释,便于论文复现 3. **资源管理**:大数据场景注意内存控制(使用生成器/分块读取) 建议赛前重点掌握:NumPy/Pandas数据处理链 + Matplotlib/Seaborn可视化 + Scikit-learn基础模型,这些覆盖80%常规需求。特殊题型(如神经网络、复杂优化)可针对性扩展。
最新发布
03-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值