Skip to content

Instantly share code, notes, and snippets.

@kmuto
Created April 13, 2018 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmuto/fc522e9755714df9ebc314b394ac8af8 to your computer and use it in GitHub Desktop.
Save kmuto/fc522e9755714df9ebc314b394ac8af8 to your computer and use it in GitHub Desktop.
カバー用設定例
# …既存の設定…
pdfmaker:
cover: cover.tex
% cover.jpgは実際のカバー画像名に合わせること
\includecover[width=\paperwidth,height=\paperheight]{images/cover.jpg}
% ……既存の設定……
% 紙全体に配置
\newcommand*\includecover[2][]{%
\clearpage
\thispagestyle{empty}%
\vbox to \textheight{%
\vskip-\dimexpr\headheight + 1in\relax%
\vbox to \paperheight{\vss%
\hbox to \textwidth{%
\hskip-\dimexpr\oddsidemargin + 1in\relax%
\hbox to \paperwidth{\hss
\includegraphics[#1]{#2}%
\hss}%
\hss}%
\vss}%
\vss}%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment