![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Latex
Leafnode
这个作者很懒,什么都没留下…
展开
-
Latex插入Matlab代码
\usepackage{listings} \lstset{language=Matlab}\lstset{breaklines}%自动将长的代码行换行排版\begin{document} \lstinputlisting{xx.m}%将待插入的xx.m文件放到正在编写的文件夹中\end{document}原创 2014-04-01 00:52:01 · 5138 阅读 · 0 评论 -
Latex beamer 分左右两栏(一边文字,一边图片)并动态显示
\documentclass{beamer}\begin{document}\begin{frame}\begin{columns}\begin{column}{.5\linewidth}\includegraphics<1>[width=\linewidth]{Figs/1.jpg}\includegraphics<2>[width=\linewidth]{...原创 2019-04-25 14:15:10 · 25706 阅读 · 0 评论 -
学习伪代码
参考:http://tex.stackexchange.com/questions/261610/algorithmicrequire-undefined-when-using-algorithmicx\documentclass{article}\usepackage{dsfont}\usepackage{algorithm}\usepackage{algorithmicx}\use原创 2017-01-20 01:01:21 · 1647 阅读 · 0 评论 -
Latex中公式的编辑
做Slides的时候经常需要编辑数学公式,特别是优化方面的,比如min, arg min等。下面给出这类公式的编辑方法。1)min比较简单的情况,可以直接用$f(e)=\underset{s}{\mathop{\min}}\frac{1}{2}(e-s)^{2}+\lambda|s|$如果复杂一点 \begin{equation*} \begin{aligned} &a...原创 2014-10-14 17:36:09 · 1349 阅读 · 0 评论 -
Latex插入伪代码
\begin{center}\begin{minipage}{0.8\textwidth}%控制宽度\begin{algorithm}[H]\caption{\scriptsize{Summary of the Online Tracking Algorithm}}\begin{algorithmic}[1]%行编号\scriptsize\State \textbf{Input:} V原创 2014-08-27 23:33:21 · 5296 阅读 · 0 评论 -
Latex插入附录,证明,引理以及参考文献
插入附录\begin{appendix}\section{1}x\section{2}y\end{appendix}插入证明\begin{proof}xx\end{proof}插入引理\newtheorem{lemma}{Lemma}%只需在第一个引理开始之前出现一次\begin{lemma}If $f\in C_{L}^{1,1}(\mathbb{R}^{n原创 2016-11-13 00:32:50 · 38545 阅读 · 6 评论 -
Latex中插入图片
将待插入的图片1.jpg拷贝到正在编辑的Latex文件夹中。\begin{figure}[h]\centering%图片居中\includegraphics[scale=0.9]{1.jpg}%长宽比例为原来的0.9倍%\caption{This is an inserted JPG graphic}%位于图片下面的标题\end{figure}原创 2014-04-01 00:49:51 · 933 阅读 · 0 评论 -
Latex中常用的几个\begin
1.公式居中且左对齐,align带上*号,表示省略掉公式后的编号\begin{align*} & {{x}_{k}}=f({{x}_{k-1}},{{v}_{k-1}}) \\ & {{z}_{k}}=h({{x}_{k}},{{n}_{k}}) \\\end{align*} \begin{align*}将公式中不同行的等号对齐 E(X+Y)&=\sum原创 2014-04-01 01:01:04 · 16543 阅读 · 0 评论 -
Latex中插入罗马数字
LaTeX不直接支持显示大小写罗马数字, 但是可以通过自定义命理来实现.定义新的命令\rmnum,\Rmnum,用来显示大小写罗马数字用法:\rmnum{数字},\Rmnum{数字}\makeatletter\newcommand{\rmnum}[1]{\romannumeral #1}\newcommand{\Rmnum}[1]{\expandafter\@slowroman原创 2014-05-15 00:11:51 · 15144 阅读 · 2 评论 -
Latex缩短公式之间的距离
\newenvironment{shrinkeq}[1]%缩短公式之间的距离{ \bgroup \addtolength\abovedisplayshortskip{#1} \addtolength\abovedisplayskip{#1} \addtolength\belowdisplayshortskip{#1} \addtolength\belowdisplayskip{#原创 2014-07-07 21:17:50 · 12796 阅读 · 0 评论 -
Slides中插入脚注
Latex中一般情况下使用命令\footnote原创 2014-04-24 21:15:45 · 1918 阅读 · 0 评论 -
Latex中添加页眉页脚
在\begin{document}之后加入下面的代码:\newpagestyle{main}{ \sethead{xx}{yy}{zz} %设置页眉 \setfoot{左页脚}{中页脚}{\thepage} %设置页脚,可以在页脚添加 \thepage 显示页数 \headrule原创 2014-04-01 01:05:08 · 12666 阅读 · 0 评论 -
Latex的总体框架
\documentclass[12pt,a4paper]{article}%\documentclass{article}\usepackage{ctex}\usepackage{CJK}%%%%%%%%%%%%%%%%\usepackage{listings}\usepackage{multirow}\usepackage{hyperref}\usepackage{c原创 2014-04-01 01:06:37 · 783 阅读 · 0 评论 -
Latex将某一行文本居中
\centerline{\large{Homework 1}}%将一行文本单独居中原创 2014-04-01 01:03:55 · 47267 阅读 · 1 评论 -
Latex插入表格
\begin{table}[htbp]\centering % 表居中\begin{tabular}{lccc} % {lccc} 表示各列元素对齐方式,left-l,right-r,center-c\hlinePlayer &Round 1 &Round 2 &Round 3\\ \hline % \hline 在此行下面画一横线Dave &89 &91 &88\\原创 2014-04-01 00:52:52 · 868 阅读 · 0 评论 -
Latex使\section中的内容左对齐
在\begin{ducoment}前加上下面的代码:\makeatletter %使\section中的内容左对齐\renewcommand{\section}{\@startsection{section}{1}{0mm} {-\baselineskip}{0.5\baselineskip}{\bf\leftline}}\makeatother如果想去掉\sec原创 2014-04-01 01:03:07 · 21192 阅读 · 0 评论 -
使用algorithm2e环境插入算法伪代码
之前的算法伪代码环境是algorithmicx和algpseudocode, 今天介绍algorithm2e环境。个人感觉algorithm2e更适合CS领域。代码如下:\documentclass{article}\usepackage[linesnumbered,algoruled,boxed,lined]{algorithm2e}%环境\begin{document}\beg...原创 2019-04-25 15:16:22 · 3315 阅读 · 0 评论