Latex使用小结
来源:互联网 发布:网络歌手苏琛照片 编辑:程序博客网 时间:2024/04/28 23:16
开始在论文写作中使用Latex,整理一下手册中常用的以及在网上搜集到的一些资料,以便以后查阅。
\textrm 公式里面出现文本格式\label{} 加标签\ref{} 引用\eqref{} 公式引用\mathbf{} 粗体(数学符号)\textbf{} 粗体(文本)\emph{} 斜体强调
公式的编辑可以借助在线公式编辑器,所见即所得
http://zh.numberempire.com/texequationeditor/equationeditor.php
插入算法
参照 http://www.ctex.org/documents/packages/verbatim/index.htm 中的algorithms章节,下面举例说明需要注意的几点
首先引入几个需要用到的包
\usepackage{algorithm} %format of the algorithm \usepackage{algorithmic} %format of the algorithm \usepackage{multirow} %multirow for format of table \usepackage{amsmath} \usepackage{xcolor}
重新定义require和ensure命令对应的关键字(此处将默认的Require/Ensure自定义为Input/Output)
\renewcommand{\algorithmicrequire}{\textbf{Input:}} \renewcommand{\algorithmicensure}{\textbf{Output:}}
分析一下示例:
\begin{algorithm} %算法开始 \caption{Sample algorithm} %算法的题目 \label{alg1} %算法的标签 \begin{algorithmic}[1] %此处的[1]控制一下算法中的每句前面都有标号 \REQUIRE Text:Today is a good day. Variables:$u,v,w$. $G=(V,E)$ %输入条件(此处的REQUIRE默认关键字为Require,在上面已自定义为Input) \ENSURE Something... %输出结果(此处的ENSURE默认关键字为Ensure在上面已自定义为Output) % if-then-else \IF{some condition is true} \STATE do some processing \ELSIF{some other condition is true} \STATE do some different processing \ELSE \STATE do the default actions \ENDIF % for loop \FOR{$i=0$ to $10$} \STATE carry out some processing \ENDFOR \FORALL{$i$ such that $0\leq i\leq 10$} \STATE carry out some processing \ENDFOR % while-loop \WHILE{some condition holds} \STATE carry out some processing \ENDWHILE % repeat-until loop \REPEAT \STATE carry out some processing \UNTIL{some condition is met} % infinite loop \LOOP \STATE this processing will be repeated forever \ENDLOOP\end{algorithmic} \end{algorithm}
输出结果如下所示:
原文:
http://www.cnblogs.com/piags/archive/2012/11/06/2757683.html
0 0
- LaTeX使用小结
- LaTeX使用小结
- Latex使用小结
- Latex使用小结
- Latex使用小结
- LaTeX使用小结
- Latex使用小结(1)
- Latex使用小结(2)
- Latex使用小结(3)
- LaTeX——小白初次使用小结
- TeX、LaTeX、TeXLive 小结
- latex 常用小结
- 使用LaTeX
- Latex使用
- Latex使用
- 使用LaTeX按IEEE模板写论文时的参考文献管理方法(BibTeX使用小结)
- latex宏包安装小结
- 【LaTeX排版】LaTeX使用--入门基础<一>
- 正版win10系统重装(更换固态硬盘等操作)保持之前正版激活教程
- mybatis+mysql insert添加数据后返回数据主键id
- 自定义相机Camera-android
- mono for android software自动更新
- paas平台之私有仓库搭建
- Latex使用小结
- 真的适合当猿吗
- TIFF影像的坐标文件.tfw
- 【day16】写代码来解决多进程/线程同时读写一个文件的问题。
- 通过PHP扩展phpredis操作redis
- 开启apache服务器gzip压缩
- Glide加载gift图
- 13、实现自己的HashMap
- 十一的题