Fix: テストの参考文献が実利用と異なる言語設定で組まれる問題を修正 - #56
Merged
Merged
Conversation
tests/test-compile-doc.typ だけが bibliography を #set text(lang: "en") のブロックで囲んでおり、template/main.typ の素の #bibliography(...) と組版言語が異なっていた。このため #54 の ja ロケール語彙混入をテスト文書で検出できなかった。
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 の「と」バグ (欧文著者接続が日本語の「と」になる) は長期間テスト文書で検出できなかった。原因は
tests/test-compile-doc.typだけが bibliography をと
lang: "en"のブロックで囲んでいたため。template/main.typ(実際にユーザーが使う雛形) は素の#bibliography("refs.yml", full: false)であり、文書言語 ja のまま参考文献が組まれる。つまりテスト文書だけが問題を回避する書き方になっており、ja ロケール語彙の混入 (「と」「巻/号/ページ」等) はテスト側では再現しなかった。修正
ブロックと
#set text(lang: "en")を外し、template/main.typと同じ素の#bibliography("refs.yml", full: false)にする。なお
src/lib.typのshow bibliography内にあるset text(lang: "en")は表示 (フォント・ハイフネーション等) にのみ効き、hayagriva の term 解決には影響しない (#54 以前の実文書で「と」が出ていたことから確認済み)。ここは変更しない。確認
#block除去による二段組内の配置がわずかに変わるのみ