latex伪代码一些记录

参考一

参考二

参考三

使用minipage

最终调整好的效果:

$
\begin{document}
\begin{center}
\begin{minipage}{15.92cm}
\renewcommand{\thealgorithm}{1}
\begin{CJK}{GBK}{song}
\begin{algorithm}[H]
	\caption{ \text{算法1:xxx}}
	\begin{algorithmic}[1]
	\Require
		\text{输入}
	\Ensure
		\text{输出}
	\end{algorithmic}
\end{algorithm}
\end{CJK}
\end{minipage}
\end{center}
\end{document}

$

如下图:页面宽度不超出边距
在这里插入图片描述

中英文版本的修改

表格能够实现的例子:l(left)居左显示 r(right)居右显示 c居中显示

\begin{document}
\begin{center}
\begin{CJK}{GBK}{song}
\begin{tabular}{@{}llllll@{}}
\toprule  %添加表格头部粗线
\text{数据集}&\text{节点数} & \text{边数} & \text{属性数} & \text{类标数} & \text{异常}\\
\midrule  %添加表格中横线
Cora&2,708 & 5,429 & 1,433 & 7 & 150\\
Citeseer&3,327 &4,732 & 4,703 & 6 & 200 \\
Blog&5,196 &171,743 & 8,189 & 6 & 300 \\
Flickr& 7,575 & 239,738 & 12,047 & 9 & 450 \\
Pubmed&19,717 &44,338 & 500 & 3 & 600 \\
\bottomrule %添加表格底部粗线
\end{tabular}
\end{CJK}
\end{center}
\end{document}

表格参考

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-01 02:00:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-01 02:00:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-01 02:00:01       82 阅读
  4. Python语言-面向对象

    2024-04-01 02:00:01       91 阅读

热门阅读

  1. python装饰器的使用

    2024-04-01 02:00:01       37 阅读
  2. COMP2017 9017

    2024-04-01 02:00:01       29 阅读
  3. [TS面试]TS中如何设计Class声明

    2024-04-01 02:00:01       38 阅读
  4. 算法练习----力扣每日一题------3

    2024-04-01 02:00:01       40 阅读
  5. 数据集视频编码(自用)

    2024-04-01 02:00:01       39 阅读
  6. 对 CSS Sprites(精灵图) 的理解

    2024-04-01 02:00:01       38 阅读
  7. v-for 中的模板引用

    2024-04-01 02:00:01       44 阅读
  8. Nginx入门 -- 理解Nginx基础概念:连接(Connection)

    2024-04-01 02:00:01       42 阅读
  9. LeetCode342. 4的幂

    2024-04-01 02:00:01       37 阅读