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

feat: logo position #62

Merged
merged 35 commits into from
Sep 25, 2021
Merged

feat: logo position #62

merged 35 commits into from
Sep 25, 2021

Conversation

LogCreative
Copy link
Contributor

@LogCreative LogCreative commented Sep 17, 2021

徽标位置

由于底部的工具栏重写(为了不与脚注碰撞),导致 logo 需要换一个地方显示。

  • 使用 maxplus 会连带logo为右上角显示。
  • 使用 max 会连带logo为右下角显示。
  • 使用 min 会连带logo为右上角显示。
  • 使用 my 会连带logo为右下角显示。

也可以分别使用 bottomright, topright 覆盖显示选项。

缓存 tikz 图像(实验性)

如果打开了 --shell-escape 编译开关,将会对 tikz 图像进行缓存。对内部一些不必缓存的元素进行了保护。由于处于实验性阶段,默认将会关闭。

@LogCreative LogCreative marked this pull request as draft September 17, 2021 12:00
@LogCreative
Copy link
Contributor Author

实验性功能会导致构建上出现一定的问题(神秘的二次文档构建 xelatex: fwrite: Broken pipe),本地暂时无法复现问题,等实验性功能稳定后本 PR 再从 draft 转换出去。

Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM. l3buildtypesetopts 是不是也需要加上 --shell-escape?

src/build.lua Outdated
@@ -16,7 +16,7 @@ end

typesetfiles = {"sjtubeamerdevguide.tex","sjtubeamer.tex"}
-- typesetfiles = {"sjtubeamer.tex"}
-- typesetruns = 1 -- for debug. Some reference may not be linked.
typesetruns = 1 -- for debug. Some reference may not be linked.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起来这一行不应该更改?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉就 CI fail,第二次编译用户手册会导致写冲突,可能是某个宏包构建导致的 xelatex 冲突,我有时间试着复现这个问题...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两天 l3build 更新了 CI 就过了可还行

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们用的镜像一个月更新一次,估计要等到下个月初了(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没事已经过了

@@ -3,8 +3,8 @@
module = "sjtubeamer"

sourcefiledir = "source"
sourcefiles = {"*.ins","*.dtx","vi/"}
installfiles = {"*.sty","vi/"}
sourcefiles = {"*.ins","*.dtx","vi/","latexmkrc"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l3build 可以直接使用 latexmk 作为编译器吗?CI / 用户的编译命令是不是要换掉(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方还是实验性的,还没有想明白这个东西怎么提示用户去打开缓存开关,这个只是先放着(

@skyzh
Copy link
Member

skyzh commented Sep 18, 2021

其实我觉得 logo 位置可以用选项指定,比如 bottomleft,topright 之类的(

@LogCreative
Copy link
Contributor Author

LogCreative commented Sep 18, 2021

我觉得可以试试加开关,位置设定:

  • topleft
  • topright
  • bottomleft
  • bottomright

@LogCreative
Copy link
Contributor Author

LogCreative commented Sep 25, 2021

  • 目前的版本 topleft 会有 overfullbox 的 bug。
    image

添加 lua-visual-debug 包并使用 lualatex 生成

  • 而且现在版本outer的代码很脏,代码有重复,主要是因为条件判断会导致额外的空隙(待解)。
  • bottomleft 不稳定(覆盖问题),仅用于方形logo。
  • 后面的提交会对空隙、logo的大小进行调整。

@LogCreative LogCreative marked this pull request as ready for review September 25, 2021 09:23
@LogCreative LogCreative marked this pull request as draft September 25, 2021 09:23
@LogCreative LogCreative marked this pull request as ready for review September 25, 2021 09:57
@skyzh
Copy link
Member

skyzh commented Sep 25, 2021

感觉 logo 放左上角有点奇怪,特别是没有副标题的时候?(思考

image

@skyzh
Copy link
Member

skyzh commented Sep 25, 2021

感觉有 bottomright 和 topright 就够了(

@LogCreative
Copy link
Contributor Author

确实

但topleft是我代码写的烂导致的(

@LogCreative LogCreative changed the title feat: move logo to the top feat: logo position Sep 25, 2021
@LogCreative
Copy link
Contributor Author

这个 PR 已经足够长了,logo宏已经设定,实验性的缓存会在另一个 PR 稳定下来。

之后会合并到主分支。

@LogCreative LogCreative added this to the v3 milestone Sep 25, 2021
@LogCreative LogCreative merged commit 8a350ae into main Sep 25, 2021
@LogCreative LogCreative deleted the logcreative-externalize branch September 25, 2021 14:08
@LogCreative LogCreative mentioned this pull request Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants