- ·上一篇教育:微型word如何设为默认
- ·下一篇教育:word里如何加红框
word如何贴代码才美观
1.各位大神,如何在word文档里面插入漂亮的伪代码
Word中使用Aurora插入算法伪代码 1. properties-->packages\usepackage{amsmath}\usepackage{amssymb}\usepackage{amsfonts}\usepackage{mathrsfs} \usepackage{algorithm}\usepackage{algorithmic}\usepackage{multirow}\alglanguage{pseudocode}% \usepackage{euler}\providecommand{\abs}[1]{\left\lvert#1\right\rvert}\providecommand{\norm}[1]{\left\lVert#1\right\rVert}2. insert latex code\renewcommand{\algorithmicrequire}{\textbf{Input:}}\renewcommand{\algorithmicensure}{\textbf{Initialization:}} \renewcommand{\algorithmiclastcon}{\textbf{Output:}}\algsetup{indent=2em}\begin{algorithm}[H]\caption{Likelihood free rejection sampler}\label{ABCLFRS}\begin{algorithmic}[1] \REQUIRE \ENSURE $y = x^n% \State $y \Leftarrow 1 $ ~~\\% \FOR {i=1 to N}$ ~~\\% \REPEAT $ % \STATE aa$ \\% \UNTIL {}$% % \ENDFOR ~~\\$\WHILE {$i \leq 10$} \STATE i=i+1;\ENDWHILE $\lastcon ~~\\aa\end{algorithmic}\end{algorithm}3. 算法编号algorithm number Options chapter nothing \numberwithin{algorithm}{chapter}or\renewcommand{\thealgorithm}{\arabic{chapter}.\arabic{algorithm}}or\renewcommand{\thealgorithm}{} 分享。
2.Word中怎么设置代码高亮
工具:word2010
通过工具栏的荧光笔可以设置代码高亮。
步骤1:打开word文档
步骤2:如要高亮函数名test,则选中test,点击【荧光笔】。
步骤3:效果如下