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

表紙のノンブルをcoverに変更し、利便性のために偶数ページにしておく #1402

Merged
merged 6 commits into from
Oct 26, 2019

Conversation

kmuto
Copy link
Owner

@kmuto kmuto commented Sep 16, 2019

デフォルトの状態だとノンブル文字列は

表紙 1
白 2
大扉 i
 …

になるのですが、これを

表紙 cover
大扉 i
 …

となるようにします。大扉は奇数でなければならない都合で、表紙は偶数(p.2)としています。

後方互換性を壊すことにはなります。
表紙込みで入稿するというやり方をしている場合だと問題になるかも。クラスパラメータで持ったほうがよい?

@kmuto kmuto mentioned this pull request Sep 16, 2019
@kmuto
Copy link
Owner Author

kmuto commented Sep 21, 2019

後方互換をどうしてもとりたいという場合のために、pdfmaker/use_covernmbl を用意しました

@munepi
Copy link
Contributor

munepi commented Sep 21, 2019

\pagenumbering に与える値として、例えば、以下の coverpagezero を作ってしまって、\frontmatter よりも前に宣言する \covermatter でカウンタを変え、 \makecover で実際にカバー画像を挿入するとします。

\def\coverpagezero#1{\expandafter\@coverpagezero\csname c@#1\endcsname}
\def\@coverpagezero#1{cover}

\newcommand*\covermatter{%
  \pagenumbering{coverpagezero}%
}

\newcommand*\makecover{%
  \covermatter
  \expandafter\includefullpagegraphics\expandafter[\review@coverimageoption]{\review@coverimage}
}

もちろん、\begin{document} 直後は、以下のようになります。

\begin{document}
\makecover
\frontmatter
...
\end{document}

これで、出力も実際のカウンタも「cover」になります。

以下に、hyperref パッケージを前提とした完全な最小例を記します。

%#! ptex2pdf -l -u
\documentclass[dvipdfmx,a5j,uplatex]{jsbook}
\usepackage[dvipdfmx]{hyperref}
\usepackage{pxjahyper}
\makeatletter
\def\coverpagezero#1{\expandafter\@coverpagezero\csname c@#1\endcsname}
\def\@coverpagezero#1{cover}

\newcommand*\covermatter{%
  \pagenumbering{coverpagezero}%
}
\makeatother

\begin{document}
\covermatter
カバーページのページラベルは「cover」です。

\frontmatter
はじまります。

\mainmatter
本文です。
\end{document}

@kmuto
Copy link
Owner Author

kmuto commented Sep 22, 2019

ありがとうございます、coverpagezeroとcovermatterを導入してみました。

@takahashim
Copy link
Collaborator

ちなみにノンブルはnombreですが、オプション名は use_covmer_nmbl で良いですか?

@kmuto
Copy link
Owner Author

kmuto commented Oct 26, 2019

あ、nombreにしますね

@kmuto kmuto merged commit d6faa1d into master Oct 26, 2019
@kmuto kmuto deleted the cover-nmbl branch October 26, 2019 05:52
kmuto added a commit that referenced this pull request Oct 27, 2019
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.

3 participants