Latex实⽤例⼦之常⽤功能
本⽂总结了近来⽤Latex常⽤的⼩段代码,都是实⽤,可直接放⼊tex⽂件的。
1. 涉及到统计,样本来⾃于某⼀分布函数,独⽴同分布或iid,在latex中代码
\stackrel{\text{i.i.d}}{\sim}
2. 常⽤的列举环境
\begin{enumerate}
\item xxx;
\item yyy;
\end{enumerate}
3. 插图
两幅图并列
\begin{figure}[H] % htbp
\centering
\begin{minipage}[c]{0.5\textwidth}
\centering
\includegraphics[scale = 0.55]{problem_descri_rigid}
\end{minipage}%
\begin{minipage}[c]{0.5\textwidth}
\centering
\includegraphics[scale = 0.4]{problem_descri_articulate.eps}
\end{minipage}
\caption{Different types of robot}
\label{fig:robot_arm_descri}
\end{figure}
三幅图并列
\begin{figure}[H]\centering
\includegraphics[width=.32\textwidth]{test_b.eps}
\includegraphics[width=.32\textwidth]{test_ba.eps}
\includegraphics[width=.32\textwidth]{test_c.eps}
\caption{Example 1: 60 nodes used in space}
\end{figure}
4. 优化问题:⽬标函数和约束条件
\begin{equation}\label{ad}
\begin{array}{ll}
\min_T & \int_0^T C(\btheta(t))dt \\
<  & \bx(\btheta(0))= \bx_{\mathrm{initial}}, \quad \bx(\btheta(T))= \bx_{\mathrm{goal}}, \quad F(\bx(\btheta(t))) \geq 0  \end{array}
\end{equation}
5. 做表
\begin{table}[htbp]
\centering
\caption{Test Example}
\begin{tabular}{c|c|ccc}
\hline
&  & bM  &  usM & CM \\
\hline
& Free/Total Node & 40/60 & 55/60  & 55/60  \\
1.1 & Success Rate & 0  & 0  &  50\% \\
& Time      & 0.623  & 0.927  &  10.655 \\
\hline
& Free/Total Node &  55/80 & 75/80  &  75/80 \\
1.2 & Success Rate &  0 & 16.7\%  & 66.7\%  \\
& Time      &  0.392 &  0.831 &  20.366 \\
\hline
& Free/Total Node &  74/100 & 91/100  & 91/100  \\
1.3 & Success Rate &  0 & 50.5\%  & 83.3\%  \\
& Time      & 0.984 &  1.281 &  38.531 \\
\hline
\end{tabular}
\label{tlb:test_ex}
\end{table}
6. 做⾸页
\begin{titlepage}
\newcommand{\HRule}{\rule{\linewidth}{0.2 mm}} % Defines a new command for the horizontal lines, change thickness here \center
\HRule \\ [1.2 cm]
{\LARGE \sc Study Note, } \\[0.5 cm]  % Title
{\LARGE \sc VI Method} \\[0.8 cm]
\HRule \\[1 cm]  % Title
{\Large \it "Start with a simple toy example" } \\ [2 cm]
{\Large E W} \\[0.3 cm]
{\Large \it Email} \\ [0.5 cm]
centering{\large \today} \\
\end{titlepage}
7. 换页
\newpage % Begins the essay on a new page instead of on the same page as the table of contents
8. 新建⼀页
\tableofcontents % Include a table of contents
9. ⽂中使⽤超链接
加⼊:\usepackage{hyperref}
使⽤:\href{u.edu/nsp/course/15-464/Spring11/afs/asst2/svdcmp.cpp}{here}
10. 分段函数
$$
F(x) = \left\{ \begin{array}{ll}
0, & x < 0 \\
\int_0^x \frac{1}{2}xdx, & 0 < x < 1 \\
\int_0^1 \frac{1}{2}xdx + \int_1^{\frac{5}{2}}\frac{1}{2}dx, & 1 \leq x \leq \frac{5}{2}    \\
1, & x > \frac{5}{2}
\end{array} \right.
$$

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。