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

隠しノンブルが全て1になる #1720

Closed
huideyeren opened this issue Aug 22, 2021 · 7 comments
Closed

隠しノンブルが全て1になる #1720

huideyeren opened this issue Aug 22, 2021 · 7 comments

Comments

@huideyeren
Copy link
Contributor

概要

現在書いている本でPDFでねこのしっぽ仕様のノンブルを設定しようとしていますが、隠しノンブルが全て1になってしまいます。

完成したPDF

XiandaiFenshuVol5.pdf

望むこと

隠しノンブルが通し番号でふられるようにする。

参考ファイル

@kmuto
Copy link
Owner

kmuto commented Aug 22, 2021

TeXLive 2020, 2021で再現確認しました。
TeXカーネルの変更に伴う何かだと思われます。修正を試みます。

急ぎの場合はvvakame/review Dockerイメージが正常な動作の確認の取れているTeXLIveバージョンですので、これでビルドしてみてください。

@huideyeren
Copy link
Contributor Author

修正を試みるとのこと、ありがとうございます。

まだ入稿までに余裕があるので修正を待ちます。

@kmuto
Copy link
Owner

kmuto commented Aug 22, 2021

とりあえず場当たりな対応としては、sty/review-jsbook.clsの47行目

\RequirePackage{xkeyval,everypage}%%,etoolbox

\RequirePackage{xkeyval,everypage-1x}%%,etoolbox

としてみてください(-1xを追加する)。TeXLive2021ではこれで戻るのを確認しました。

@huideyeren
Copy link
Contributor Author

TeXLive2020を使った私の環境でも正しくノンブルが表示されていることを確認しました。
ひとまず、これで対処してみるとします。

@kmuto
Copy link
Owner

kmuto commented Aug 22, 2021

@munepi こういうとき-1x以外だとどうするのが妥当なんでしょう。EverypageHookでのthepageが初回のみしか評価されなくなってる、ということですよね。新カーネルでフックはいろいろ増えたようなのですが動的に変わるものへの手段が見当たらず…(jlreqはexpl3化されてよく読めない…)。

@munepi
Copy link
Contributor

munepi commented Aug 22, 2021

@kmuto (Re:VIEW公式でどこまでTeX Live年次バージョンを面倒見るかにもよりますが、余計なものを使わない方向で対応するならば、)
とりあえず、(u(p))LaTeX2e kernelのバージョンを見て、処理を変えることになりそうです。

ここらへんのダンプしたフォーマットのバージョンを見るコードの例は、latexrelease.sty, platexrelease.styやそれらのドキュメントが参考になります。

\makeatletter
\edef\recls@sourcepLaTeXdate{%
  \expandafter\@parse@version\pfmtversion//00\@nil}
\@onlypreamble\recls@sourcepLaTeXdate

%% 20200202 は例というだけです。
\ifnum\recls@sourcepLaTeXdate<20200202
\RequirePackage{everypage}
\else
\RequirePackage{everypage-1x}
\fi
\makeatother

本件の背景として、昨今、TL20, 21の大幅な変更は、「tagged pdf」のための過渡期ですね……。
次は、エンジンを一つに絞って、LuaTeXに切り替えてしまってよいかもしれません。

@kmuto
Copy link
Owner

kmuto commented Aug 22, 2021

なるほど。現状でeverypage-1xを使うしかなさそうということだと、IfFileExistsでもよいのかな。
LuaTeX絞りですか、そろそろ考えないとですね。

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

3 participants