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

脚注参照忘れの警告 #1725

Closed
kmuto opened this issue Sep 2, 2021 · 2 comments
Closed

脚注参照忘れの警告 #1725

kmuto opened this issue Sep 2, 2021 · 2 comments

Comments

@kmuto
Copy link
Owner

kmuto commented Sep 2, 2021

翻訳原稿などで //footnote を用意したものの @<fn> を忘れて紙面から落ちている、ということがたまにあります。
手元ではreファイルをなめてチェックする内製ツールを使っているのですが、コンパイラ/IndexBuilder側でfootnoteの未参照を拾えそうならWARNを出したいです(image,list,tableは参照しないこともままあるので現状確認したいのはfootnoteのみ)。

@takahashim
Copy link
Collaborator

これは普通に実現できそうな気もします

@kmuto
Copy link
Owner Author

kmuto commented Sep 5, 2021

素朴にはハッシュ用意して#footnote, #endnoteでキー:ID、値0 として定義、#inline_fn, #inline_endnoteでキーIDに値+1、最後のresult前にハッシュで値0のものを一覧というのを考えたところで、ビルダであちこちメソッド上書きしているので大変…と詰まりました。
lndexBuilder内か、Indexクラスに何か持たせるかするといいんでしょうかね。

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

No branches or pull requests

2 participants