Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: lualatex 下摘要标题前有换行 #248

Open
4 tasks done
xlucn opened this issue Mar 21, 2024 · 5 comments
Open
4 tasks done

[Bug]: lualatex 下摘要标题前有换行 #248

xlucn opened this issue Mar 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@xlucn
Copy link

xlucn commented Mar 21, 2024

先决条件

期望的现象

摘要中的标题前不换行(下图为xelatex编译结果)
20240322_02h11m30s_grim

发生了什么

摘要中的标题前有换行(下图为lualatex编译结果)
20240322_02h07m54s_grim

最小工作示例

\documentclass[draft, type=doctor]{njuthesis}
\begin{document}
\maketitle
\begin{abstract}
  测试
\end{abstract}
\end{document}

njuthesis 模板版本

v1.4.0

模板获取途径

通过 GitHub Releases 或镜像站下载

操作系统

Linux

TeX 发行版

Texlive 2024.0

编译程序

LuaLaTeX

额外信息

我更新texlive之前就有这个问题,也就是适用于texlive 2023.x

@xlucn xlucn added the bug Something isn't working label Mar 21, 2024
@xlucn
Copy link
Author

xlucn commented Mar 23, 2024

若(不)可以复现,麻烦先告知,我好知道是不是我自己的问题,谢谢!

@atxy-blip
Copy link
Member

确实可以复现。排查要点时间,先用 xelatex 吧。

@atxy-blip
Copy link
Member

atxy-blip commented Apr 3, 2024

问题是 LuaTeX 下全角冒号测出来的宽度和实际占用宽度不一致,我写模板时也没想到加 glue,这些内容超出一点宽度就自己跑到下一行了。我也试着在对应位置加了一点 glue,感觉伸缩后样式不太统一,不好看。

当然,一种很有效的解决办法就是把默认用到的中文冒号都换成英文冒号(……)

\njusetname{colon}{:~}

@xlucn
Copy link
Author

xlucn commented Apr 4, 2024

@atxy-blip ,谢谢上面的修复!下载artifact文件试了一下,摘要页换行确实解决了。

但是,尽管不严重,貌似还有一些副作用,一些模板中的全角冒号显得很窄了:
20240404_15h31m43s_grim
20240404_15h38m02s_grim
也不算大问题。如果仅将伸缩量加在受影响的地方,可能会好些。

如果你觉得没问题,也可以关掉issue,我没有异议。

@atxy-blip
Copy link
Member

先不关闭吧,等以后找到办法彻底解决这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants