stone-zeng / fduthesis

LaTeX thesis template for Fudan University
LaTeX Project Public License v1.3c
834 stars 208 forks source link

TeX Live 编译问题 #212

Closed ktrNozomi closed 3 years ago

ktrNozomi commented 3 years ago

采用 docker hub 上的 texlive/texlive:latest 镜像编译时, 产生报错; 而采用 texlive/texlive:TL2019-historic 镜像编译, 一切正常.

报错信息

! Package fduthesis Error: Package "ctex" is too old.
(fduthesis)                The fduthesis class only supports "ctex" with a
(fduthesis)                version
(fduthesis)                higher than v2.4.10.
(fduthesis)
(fduthesis)                Please update an up-to-date version of it using
(fduthesis)                your
(fduthesis)                TeX package manager or from CTAN.

Type <return> to continue.
 ...

l.239 ... ctex         } { 2017/08/07 } { 2.4.10 }

?
! Emergency stop.
 ...

l.239 ... ctex         } { 2017/08/07 } { 2.4.10 }

No pages of output.
Transcript written on out/thesis.log.
Collected error summary (may duplicate other messages):
  xelatex: Command for 'xelatex' gave return code 1
      Refer to 'out/thesis.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
Latexmk: Examining 'out/thesis.log'
=== TeX engine is 'XeTeX'
Latexmk: Errors, so I did not complete making targets

通过 tlmgr info ctex 检查发现 ctex 宏包版本信息如下

# texlive/texlive:latest
package:     ctex
category:    Package
shortdesc:   LaTeX classes and packages for Chinese typesetting
longdesc:    ctex is a collection of macro packages and document classes for LaTeX Chinese typesetting.
installed:   Yes
revision:    59654
sizes:       run: 1749k
relocatable: No
cat-version: 2.5.7
cat-license: lppl1.3c
cat-topics:  chinese book-pub class
cat-contact-support: https://github.com/CTeX-org/ctex-kit/issues
cat-contact-home: http://www.ctex.org/HomePage
cat-contact-bugs: https://github.com/CTeX-org/ctex-kit/issues
cat-contact-repository: https://github.com/CTeX-org/ctex-kit
collection:  collection-langchinese

MWE

% thesis.tex
\documentclass{fduthesis}
\begin{document}
    \chapter{欢迎}
    \section{Welcome to fduthesis!}
    你好,\LaTeX{}!
\end{document}

编译命令

docker run --rm -w /data -v <PATH>:/data texlive/texlive:latest \
latexmk -pdfxe -pdfxelatex="xelatex --shell-escape %O %S" -outdir=/data/out /data/thesis.tex
sikouhjw commented 3 years ago

因为 https://t.me/chinesetex/28690

ctexbook v2.5.7 不再定义 \csname ver@ctex.sty\endcsname

这个问题在 fduthesis 最新版被修复了,你用最新版就没事了

ktrNozomi commented 3 years ago

谢谢 @sikouhjw ! 采用文档中 2.1.3 节的方法即可正常编译. 就是不知道为什么 tlmgr 显示没得更新?

sikouhjw commented 3 years ago

谢谢 @sikouhjw ! 采用文档中 2.1.3 节的方法即可正常编译. 就是不知道为什么 tlmgr 显示没得更新?

因为确实是最新版,问题在于 ctex 宏集改了版本标识,导致 fduthesis 检测错误。

ktrNozomi commented 3 years ago

我看了一下, texlive/texlive:latest 镜像中 tlmgr 说是最新的, 但实际上对比了一下扁平化安装出来的, 发现扁平化安装的是更新的. 我也不懂这是镜像问题还是 CTAN 同步问题还是啥的, 总之先能用就行了, 不折腾了.

image

sikouhjw commented 3 years ago

我看了一下, texlive/texlive:latest 镜像中 tlmgr 说是最新的, 但实际上对比了一下扁平化安装出来的, 发现扁平化安装的是更新的. 我也不懂这是镜像问题还是 CTAN 同步问题还是啥的, 总之先能用就行了, 不折腾了.

image

嗯……是这样的。 宏包作者更新版本→提交 CTAN→texlive 之类的才能更新。 fduthesis 没有 release,也就不会提交 CTAN。 你可以催 @stone-zeng 更新(

stone-zeng commented 3 years ago

我可能最近再修几个 bug 然后 release 一波。

RenBaixiao commented 3 years ago

为什么我用文档2.1.3节中的方法执行脚本并编译自带的test还是报这个错误呢?是因为我已经从texlive中安装了吗? 请问这个问题还有其他解决方法吗?我之前是在老版本的ctex环境下写的,后来重装了系统,重新安装texlive后版本升级了,原来写的文档无法编译了

sikouhjw commented 3 years ago

为什么我用文档2.1.3节中的方法执行脚本并编译自带的test还是报这个错误呢?是因为我已经从texlive中安装了吗? 请问这个问题还有其他解决方法吗?我之前是在老版本的ctex环境下写的,后来重装了系统,重新安装texlive后版本升级了,原来写的文档无法编译了

  1. 报什么错?跟 texlive 是否安装无关;
  2. 什么老版本?什么 ctex?ctex 套装?ctex 宏集?什么安装 texlive 版本升级?什么原来的文档?
RenBaixiao commented 3 years ago

@sikouhjw 报ctex版本不支持的问题。我之前用的应该是老版本的ctex包,编译是没问题的。昨天重装了系统,重新安装了texlive,看了下安装的ctex包是2.5.9了,编译我之前写的文档是报错的,看到这个issue里讲到报错原因是在于 ctex 宏集改了版本标识,导致 fduthesis 检测错误,我看到用文档里扁平化安装方法可以解决问题,就试了一下还是报错,想问一下怎么找最新版的fduthesis,我现在的版本是0.7e

为什么我用文档2.1.3节中的方法执行脚本并编译自带的test还是报这个错误呢?是因为我已经从texlive中安装了吗? 请问这个问题还有其他解决方法吗?我之前是在老版本的ctex环境下写的,后来重装了系统,重新安装texlive后版本升级了,原来写的文档无法编译了

  1. 报什么错?跟 texlive 是否安装无关;
  2. 什么老版本?什么 ctex?ctex 套装?ctex 宏集?什么安装 texlive 版本升级?什么原来的文档?
sikouhjw commented 3 years ago

@sikouhjw 报ctex版本不支持的问题。我之前用的应该是老版本的ctex包,编译是没问题的。昨天重装了系统,重新安装了texlive,看了下安装的ctex包是2.5.9了,编译我之前写的文档是报错的,看到这个issue里讲到报错原因是在于 ctex 宏集改了版本标识,导致 fduthesis 检测错误,我看到用文档里扁平化安装方法可以解决问题,就试了一下还是报错,想问一下怎么找最新版的fduthesis,我现在的版本是0.7e

为什么我用文档2.1.3节中的方法执行脚本并编译自带的test还是报这个错误呢?是因为我已经从texlive中安装了吗? 请问这个问题还有其他解决方法吗?我之前是在老版本的ctex环境下写的,后来重装了系统,重新安装texlive后版本升级了,原来写的文档无法编译了

  1. 报什么错?跟 texlive 是否安装无关;
  2. 什么老版本?什么 ctex?ctex 套装?ctex 宏集?什么安装 texlive 版本升级?什么原来的文档?
  1. 测试发行版及模板请编译最小示例,而不是编译之前的文档。
    \documentclass{fduthesis}
    \begin{document}
    \chapter{欢迎}
    \section{Welcome to fduthesis!}
    你好,\LaTeX{}!
    \end{document}
  2. 你要详细说你怎么下载的,是从 Releases 还是从 https://github.com/stone-zeng/fduthesis.git? 前者是会报错的,后者是最新版。
RenBaixiao commented 3 years ago

@sikouhjw 报ctex版本不支持的问题。我之前用的应该是老版本的ctex包,编译是没问题的。昨天重装了系统,重新安装了texlive,看了下安装的ctex包是2.5.9了,编译我之前写的文档是报错的,看到这个issue里讲到报错原因是在于 ctex 宏集改了版本标识,导致 fduthesis 检测错误,我看到用文档里扁平化安装方法可以解决问题,就试了一下还是报错,想问一下怎么找最新版的fduthesis,我现在的版本是0.7e

为什么我用文档2.1.3节中的方法执行脚本并编译自带的test还是报这个错误呢?是因为我已经从texlive中安装了吗? 请问这个问题还有其他解决方法吗?我之前是在老版本的ctex环境下写的,后来重装了系统,重新安装texlive后版本升级了,原来写的文档无法编译了

  1. 报什么错?跟 texlive 是否安装无关;
  2. 什么老版本?什么 ctex?ctex 套装?ctex 宏集?什么安装 texlive 版本升级?什么原来的文档?
  1. 测试发行版及模板请编译最小示例,而不是编译之前的文档。
\documentclass{fduthesis}
\begin{document}
\chapter{欢迎}
\section{Welcome to fduthesis!}
你好,\LaTeX{}!
\end{document}
  1. 你要详细说你怎么下载的,是从 Releases 还是从 https://github.com/stone-zeng/fduthesis.git? 前者是会报错的,后者是最新版。

弄明白了,把运行脚本后位于thesis目录下的文件复制到我文章的目录下就可以了,感谢!