Fix: example のビルドにローカル CSL 修正が反映されない問題を修正 - #57
Merged
Merged
Conversation
mscs/rsj-conf は CSL を公開 package (@preview/jaconf:0.7.1) 内で 解決しており、repo 内の CSL コピーが読まれない死にコピーだった。 rengo/sci/sice-si と同じ bytes(read()) 方式に統一する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
現象
#54・#55 で CSL を修正したのに、
examples/example.typをコンパイルしても mscs (既定)・rsj-conf では反映されない (「と」のまま)。原因
mscs / rsj-conf の lib.typ は CSL を公開 package 内で解決しており、repo 内の CSL コピーがビルドで読まれていなかった。
examples/mscs/lib.typ:bibliography-style未指定 → package 既定の"sice.csl"が@preview/jaconf:0.7.1(パッケージキャッシュ) 内で解決されるexamples/rsj-conf/lib.typ: 文字列"rsj.csl"は Typst の仕様で文字列リテラルのある側ではなく package 内パスとして解決されるつまり
examples/mscs/sice.csl・examples/rsj-conf/rsj-conf.cslはビルドに使われない死にコピーで、#54/#55 の同期更新も出力に影響していなかった。rengo / sci / sice-si は既にbytes(read("○○.csl"))でローカル読みのため問題なし。修正
mscs / rsj-conf も他 3 例と同じ
bytes(read())方式に統一。examples/mscs/lib.typ:bibliography-style: bytes(read("sice.csl"))を追加examples/rsj-conf/lib.typ:"rsj.csl"→bytes(read("rsj-conf.csl"))これで examples 配下の CSL コピーが実際にビルドで読まれ、repo の修正が即座に example の出力へ反映される。
確認
example.typ の import を 5 テンプレートすべてに切り替えてコンパイルし、pdftotext で検証:
tests/test-compile-doc.typのコンパイル通過も確認済み。補足
template/main.typは@preview/jaconf:0.7.1固定のため、エンドユーザーに #54/#55 が届くには 0.7.2 のリリースが別途必要 (本 PR の範囲外)。