utbookでatbegshiパッケージを使いたい

utbookでatbegshiパッケージを使いたい

- いな んず の投稿
返信数: 2

uplatexとdvipdfmx,ujbook,graphicxを使うと、下記ソースみたいにすれば背景を表示出来ると思います。

\documentclass[dvipdfmx]{ujbook}
\usepackage{atbegshi}
\usepackage[dvipdfmx]{graphicx}
\begin{document}
\AtBeginShipout{%
\AtBeginShipoutUpperLeft{%
      \parbox[t][\paperheight][b]{\paperwidth}{%
	\includegraphics[width=210truemm]{背景.eps}
      }
   }
}
むかしむかしあるところに……
\newpage
どこどこどこ?
\end{document}

これをutbook.styで例えばこんな風にやりたいのですが(寸法とか位置きめは適当です)

\documentclass[dvipdfmx]{utbook}
\usepackage{atbegshi}
\usepackage[dvipdfmx]{graphicx}
\begin{document}
\AtBeginShipout{%
\AtBeginShipoutUpperLeft{%
      \parbox[t][\paperheight][b]{\paperwidth}{%
	\includegraphics[width=297truemm]{背景.eps}
      }
     }
}
むかしむかしあるところに……
\newpage
どこどこどこ?

\end{document}

こんな風にエラーになってしまいます。

This is ptex2pdf[.lua] version 0.9.
Processing untitled-5.tex
This is e-upTeX, Version 3.14159265-p3.7-u1.21-160201-2.6 (utf8.uptex) (TeX Live 2016/W32TeX) (preloaded format=uplatex)
 restricted \write18 enabled.
entering extended mode
(./untitled-5.tex
pLaTeX2e <2016/11/29u01> (based on LaTeX2e <2016/03/31> patch level 3)
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(c:/texlive/2016/texmf-dist/tex/uplatex/base/utbook.cls
Document Class: utbook 2016/11/22 v1.7b-u00 Standard upLaTeX class
(c:/texlive/2016/texmf-dist/tex/uplatex/base/utbk10.clo)
(c:/texlive/2016/texmf-dist/tex/platex/base/plext.sty))
(c:/texlive/2016/texmf-dist/tex/generic/oberdiek/atbegshi.sty
(c:/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(c:/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(c:/texlive/2016/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(c:/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty
(c:/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(c:/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty
(c:/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty)
(c:/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(c:/texlive/2016/texmf-dist/tex/latex/graphics-def/dvipdfmx.def)))
(./untitled-5.aux) 《縦組モード》
<背景.eps>
! Incompatible direction list can't be unboxed.
\AtBeginShipoutAddToBox ...box \AtBeginShipoutBox
                                                  \kern 0pt}\AtBegShi@restor...
l.13 \newpage

?

つまり、atbegshiパッケージをどうにかすればどうにかなりそうなのですが、
どう直せば良いのかさっぱりです。
やりたいことは、utbookスタイルで、背景を表示できれば良いのですが、方法は無いものでしょうか。

いな んず への返信

Re: utbookでatbegshiパッケージを使いたい

- aminophen の投稿
\AtBeginShipout{\yoko
\AtBeginShipoutUpperLeft{%
  \parbox[t][\paperheight][b]{\paperwidth}{%
    \includegraphics[width=297truemm]{background.eps}}}}

のように \yoko を仕込むとどうなるでしょう?