Sjtuthesis: 找不到algorithm.sty

Created on 3 Oct 2018  ·  7Comments  ·  Source: sjtug/SJTUThesis

编译的时候报错
! LaTeX Error: File `algorithm.sty' not found.

tlmgr也没法安装,因为在CTAN上找不到algorithm,倒是有algorithms

arebuild-release typquestion

Most helpful comment

感觉 sjtuthesis 依赖的包有点多啊,建议利用 ctexhook 对额外的包提供支持,而不必直接依赖。这样有两个好处:

  1. 提升编译效率,不必载入非必须的宏包,比如数学系的就基本不需要 siunitx;
  2. 方便用户个性化选择宏包;比如算法环境的实现有 algorithms, algorithmicx, algorithm2e 三种方式,用户可能有所偏好,这样就可以选择自己习惯的宏包

All 7 comments

你的环境是 win? 算法这个我改过 https://github.com/sjtug/SJTUThesis/pull/150 用了 algorithmicx

我在mac下
我看situthesis.cls文件中确实有
\RequirePackage{algorithm, algorithmicx, algpseudocode}

Ref https://www.cnblogs.com/qq952693358/p/8040110.html

请问解决了么,可以告知一下你的软件版本么 (TexLive 16?17? MacTeX?)

我只是安装了basictex,通过tlmgr逐步安装所需
我换台linux应该就没有问题
但是CTAN上找不到algorithm,是不是这个包过时了?

应该是某个包里带着这个,可以参考 https://github.com/sjtug/SJTUThesis/blob/master/.ci/tl.profile 来安装,没必要一步步缺什么装什么,暂时先关闭问题了,如果有问题可以继续回复

感觉 sjtuthesis 依赖的包有点多啊,建议利用 ctexhook 对额外的包提供支持,而不必直接依赖。这样有两个好处:

  1. 提升编译效率,不必载入非必须的宏包,比如数学系的就基本不需要 siunitx;
  2. 方便用户个性化选择宏包;比如算法环境的实现有 algorithms, algorithmicx, algorithm2e 三种方式,用户可能有所偏好,这样就可以选择自己习惯的宏包

The file algorithm.sty is a part of the package algorithms.

If you prefer BasicTex, you can tlmgr install algorithms.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjtuminhang picture sjtuminhang  ·  4Comments

gaocegege picture gaocegege  ·  14Comments

Erich-Chen picture Erich-Chen  ·  6Comments

gaocegege picture gaocegege  ·  12Comments

majestichou picture majestichou  ·  7Comments