
wallpaper
패키지를 사용하여 페이지 하단에 배경 이미지를 성공적으로 배치했습니다.\LLCornerWallPaper
. 홀수/짝수 페이지에 따라 파노라마의 왼쪽/오른쪽 부분을 배경으로 설정하고 싶습니다.이것답변은 KOMA-Script의 홀수/균등성을 기반으로 작업을 수행하는 방법을 보여줍니다.
이제 내 문제는 두 이미지가 홀수 페이지와 짝수 페이지 모두에 나타난다는 것입니다. 내 (간단한) 코드는 다음과 같습니다.
\documentclass[twoside,titlepage=false]{scrartcl}
\usepackage{wallpaper}
\usepackage{scrextend}
\begin{document}
\ifthispageodd{\LLCornerWallPaper{1}{pano-left}}{}
Text odd.\newpage
\ifthispageodd{\LLCornerWallPaper{1}{pano-right}}{}
Text even.
\end{document}
답변1
빠르고 더러운
\documentclass[twoside,titlepage=false]{scrartcl}
\usepackage{ifthen,mwe,wallpaper,everypage,lipsum}
\AddEverypageHook{\ClearWallPaper\ifthenelse{\isodd{\arabic{page}}}%
{\LRCornerWallPaper{0.1}{example-image-a.jpg}}%
{\LLCornerWallPaper{0.1}{example-image-b.jpg}}}
\begin{document}
\lipsum[1-25]
\end{document}
\AddThispageHook
로컬에서 작업을 원하는 경우 사용할 수 있습니다 . 요령은 \ClearWallPaper
필요할 때 사용하는 것입니다.
답변2
scrlayer-scrpage
KOMA-Script 번들의 일부인 패키지를 로드할 수 있습니다 . 그런 다음 모든 페이지 스타일에 짝수 및 홀수 페이지에 대한 레이어를 추가할 수 있습니다.
\documentclass[twoside,titlepage=false]{scrartcl}
\usepackage{scrlayer-scrpage}
\usepackage{graphicx}
\DeclareNewLayer[
background,
evenpage,
mode=picture,
contents={\putLL{\includegraphics[scale=.2]{example-image-a.jpg}}}
]{bg.even}
\DeclareNewLayer[
background,
oddpage,
mode=picture,
contents={\putLR{\makebox[0pt][r]{\includegraphics[scale=.2]{example-image-b.jpg}}}}
]{bg.odd}
\AddLayersToPageStyle{@everystyle@}{bg.odd,bg.even}
\usepackage{lipsum}
\begin{document}
\lipsum
\lipsum
\end{document}