当前位置:首页教育技巧office技巧office办公软件

word如何贴代码才美观

减小字体 增大字体 2025-01-07 09:50:37


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:效果如下

教育评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分)

【免责声明】本站信息来自网友投稿及网络整理,内容仅供参考,如果有错误请反馈给我们及时更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任。
版权所有:学窍知识网 Copyright © 2011-2025 www.at317.com All Rights Reserved .