我想调整此传单某一部分的背景,但图片有其他尺寸,我该如何使其适应?

我想调整此传单某一部分的背景,但图片有其他尺寸,我该如何使其适应?
\documentclass[10pt, notumble, letterpaper]{leaflet}
\usepackage[utf8]{inputenc}
\pagestyle{empty}
\title{$7^\circ$ Congreso Internacional sobre Enseñanza de la
Matemática Asistida por Computadora}
\author{Instituto Tecnológico de Costa Rica}
\date{16-18, Noviembre, 2011 }
\CutLine*{1}% linea punteada sin tijeras
\CutLine*{3}% linea punteada sin tijeras
\CutLine*{4}% linea punteada sin tijeras
\CutLine{6}% linea punteada con tijeras

\usepackage[dvipsnames,usenames, x11names, table]{xcolor}
\definecolor{LIGHTGRAY}{gray}{.95}

\AddToBackground{3}{% Fondo de la página pequeña 1
\put(0,0){\includegraphics[scale=0.5]{leaflet.jpg}}}

%\AddToBackground{6}{% Fondo de la página pequeña 6
%\put(0,0){\textcolor{Cyan!50}{\rule{\paperwidth }{\paperheight }}}}

\begin{document}
\maketitle
\thispagestyle{empty}
\section{Sección 1}
Texto en la sección 1



\newpage
\section{Sección 2}
Texto en la sección 2
\newpage
\section{Sección 3}
Texto en la sección 3
\newpage
\section{Sección 4}
Texto en la sección 4
\newpage
\section{Sección 5}
Texto en la sección 5
\newpage
\section{Sección 6}
Texto en la sección 6
\section{Sección 7}
Texto en la sección 7
\end{document}

enter image description here

答案1

要用图像填充页面而不保留其纵横比,请替换scale=0.5width=\pagewidth,height=\pageheight

\documentclass[10pt,notumble,letterpaper]{leaflet}
\usepackage[utf8]{inputenc}
\pagestyle{empty}% this is the default in leaflet, so you don’t need this line
\title{$7^\circ$ Congreso Internacional sobre Enseñanza de la
  Matemática Asistida por Computadora}
\author{Instituto Tecnológico de Costa Rica}
\date{16--18, Noviembre, 2011}% I’ve changed your hyphen to an en-dash
\CutLine*{1}
\CutLine*{3}
\CutLine*{4}
\CutLine{6}
\usepackage[dvipsnames,usenames,x11names,table]{xcolor}
\definecolor{LIGHTGRAY}{gray}{.95}
\AddToBackground{3}{%
  \put(0,0){\includegraphics[width=\pagewidth,height=\pageheight]{example-image-1x1}}}% image supplied by mwe package
\begin{document}
\maketitle
\thispagestyle{empty}
\section{Sección 1}
Texto en la sección 1
\newpage
\section{Sección 2}
Texto en la sección 2
\newpage
\section{Sección 3}
Texto en la sección 3
\newpage
\section{Sección 4}
Texto en la sección 4
\newpage
\section{Sección 5}
Texto en la sección 5
\newpage
\section{Sección 6}
Texto en la sección 6
\section{Sección 7}
Texto en la sección 7
\end{document}

output of sample

要以图像的原始纵横比平铺页面,可以使用以下wallpaper包:

\documentclass[10pt,notumble,letterpaper]{leaflet}
\usepackage[utf8]{inputenc}
\title{$7^\circ$ Congreso Internacional sobre Enseñanza de la
  Matemática Asistida por Computadora}
\author{Instituto Tecnológico de Costa Rica}
\date{16--18, Noviembre, 2011}
\CutLine*{1}
\CutLine*{3}
\CutLine*{4}
\CutLine{6}
\usepackage[dvipsnames,usenames,x11names,table]{xcolor}
\definecolor{LIGHTGRAY}{gray}{.95}
\usepackage{wallpaper}
\begin{document}
\maketitle
\thispagestyle{empty}
\section{Sección 1}
Texto en la sección 1
\newpage
\section{Sección 2}
Texto en la sección 2
\newpage
\ThisTileSquareWallPaper{1}{example-image-1x1}
\section{Sección 3}
Texto en la sección 3
\newpage
\section{Sección 4}
Texto en la sección 4
\newpage
\section{Sección 5}
Texto en la sección 5
\newpage
\section{Sección 6}
Texto en la sección 6
\section{Sección 7}
Texto en la sección 7
\end{document}

output of second sample

相关内容