
Tenho um documento onde inseriria uma imagem no canto inferior direito da página. Pensei em fazer isso criando um ambiente minpage. Mas não encontro como inserir esta imagem onde gostaria. Como eu posso fazer isso?
\documentclass[14pt]{extarticle}
\usepackage{fontspec}
\setmainfont{industry-blackitalic}
\usepackage{lipsum}
\usepackage{mwe}
\usepackage{textpos}
\usepackage{graphics}
\pagenumbering{gobble}
\begin{document}
\lipsum [1-1]\\
\newpage %------ II pagina ------------
\lipsum [1-1]\\
\newpage %-------- III pagina ------------
\lipsum [1-1]\\
\newpage %--------IV pagina --------------
\lipsum[1-1]
\end{document}
Obrigado
Renato
Responder1
Ainda não está muito claro o que você quer. Porém, aqui está um exemplo de como textpos
imprimir imagens nos quatro cantos de uma página (no exemplo a primeira):
\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage[absolute]{textpos}
\usepackage{graphics}
\pagenumbering{gobble}
\begin{document}
\begin{textblock*}{\paperwidth}(0mm,0mm)% Upper
\raggedright% left edge of page
\includegraphics[page=1,width=4cm]{example-image-a4-numbered}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0mm,0mm)% Upper
\raggedleft% right edge of page
\includegraphics[page=2,width=4cm]{example-image-a4-numbered}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0mm,\paperheight)% Lower
\raggedright% left edge of page
\raisebox{0pt}[0pt][0pt]{\includegraphics[page=3,width=4cm]{example-image-a4-numbered}}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0mm,\paperheight)% Lower
\raggedleft% right edge of page
\raisebox{0pt}[0pt][0pt]{\includegraphics[page=4,width=4cm]{example-image-a4-numbered}}
\end{textblock*}
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %------ II pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %-------- III pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %--------IV pagina --------------
\lipsum[1-1]
\end{document}
Se você quiser que as imagens fiquem nos cantos da área de texto, basta remover a opção absolute
e substituir \paperwidth
por \textwidth
e \paperheight
por \textheight
.
Se você quiser as imagens em todas as páginas, eso-pic
seria mais fácil usar:
\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{eso-pic}
\usepackage{adjustbox}
\usepackage{graphics}
\pagenumbering{gobble}
\AddToShipoutPictureBG{% put the images in the background of every page
\AtPageUpperLeft{% upper left corner of the page
\adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
}%
\AtPageUpperLeft{% upper
\makebox[\paperwidth][r]{% right corner of the page
\adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
}%
}%
\AtPageLowerLeft{% lower left corner of the page
\includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
}%
\AtPageLowerLeft{% lower
\makebox[\paperwidth][r]{% right corner of the page
\includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
}%
}%
}
\begin{document}
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %------ II pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %-------- III pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %--------IV pagina --------------
\lipsum[1-1]
\end{document}
Mais uma vez, você pode adaptar esses exemplos para colocar as imagens nas bordas da área de texto em vez do papel. Para fazer isso, substitua mais uma vez \paperwidth
por \textwidth
e também substitua \AtPageUpperLeft
por \AtTextUpperLeft
e \AtPageLowerLeft
por \AtTextLowerLeft
.
Você também pode usar esta sugestão para adicionar imagens a apenas uma página usando star-variant \AddToShipoutPictureBG*
.
Com um LaTeX atualizado você também pode usaros ganchos de embarque:
\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{adjustbox}
\usepackage{graphics}
\pagenumbering{gobble}
\AddToHook{shipout/background}{% Put the images in the background of every page
\put(0,0){% upper left corner
\adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
}%
\put(0,0){% upper
\makebox[\paperwidth][r]{% right corner
\adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
}%
}%
\put(0,-\pageheight){% lower left corner
\includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
}%
\put(0,-\pageheight){% lower
\makebox[\paperwidth][r]{% right corner
\includegraphics[page=4,width=4cm]{example-image-a4-numbered}%
}%
}%
}
\begin{document}
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %------ II pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %-------- III pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %--------IV pagina --------------
\lipsum[1-1]
\end{document}
Consulte os manuais dos pacotes utilizados para mais informações sobre eles. Veja omanual de gancho genéricopara obter informações sobre o uso de ganchos.
Nota: Existem inúmeras outras alternativas para colocar imagens ou outros materiais numa posição fixa em páginas individuais ou em todas as páginas de um documento. Os mostrados aqui são provavelmente os mais simples e também os mais comumente usados. Outra possibilidade, muito popular entreTikZusuários, é mostrado emesta respostaparaa pergunta já vinculada ao comentário. Como exemplo de soluções pouco convencionais, o uso do pacote scrlayer-scrpage
é mostrado aqui:
\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{adjustbox}
\usepackage{graphics}
\pagenumbering{gobble}
\usepackage{scrlayer-scrpage}
\pagestyle{plain}
\DeclareNewLayer[%
background,%
mode=picture,%
page,
contents={%
\put(0,\paperheight){%
\adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
}%
\put(\paperwidth,\paperheight){%
\makebox[0pt][r]{%
\adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
}%
}%
\put(0,0){%
\includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
}%
\put(\paperwidth,0){%
\makebox[0pt][r]{%
\includegraphics[page=4,width=4cm]{example-image-a4-numbered}%
}%
}%
}%
]
{cornerimages}
\AddLayersToPageStyle{plain.scrheadings}{cornerimages}
\begin{document}
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %------ II pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %-------- III pagina ------------
\lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!
\newpage %--------IV pagina --------------
\lipsum[1-1]
\end{document}
Um recurso interessante desta sugestão é que você pode adicionar e remover a camada recém-declarada de e para cada estilo de página em cada página que desejar. Você ainda pode declarar novos estilos de página com ou sem esta camada. Então \pagenumbering{gobble}
não seria necessário ter páginas apenas com imagens:
\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{adjustbox}
\usepackage{graphics}
\usepackage{scrlayer-scrpage}
\DeclareNewLayer[%
background,%
mode=picture,%
page,
contents={%
\put(0,\paperheight){%
\adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
}%
\put(\paperwidth,\paperheight){%
\makebox[0pt][r]{%
\adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
}%
}%
\put(0,0){%
\includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
}%
\put(\paperwidth,0){%
\makebox[0pt][r]{%
\includegraphics[page=4,width=4cm]{example-image-a4-numbered}%
}%
}%
}%
]
{cornerimages}
\DeclareNewPageStyleByLayers{imagepagestyle}{cornerimages}
\pagestyle{imagepagestyle}
\begin{document}
\pagestyle{empty}
\lipsum[1-3]
\thispagestyle{imagepagestyle}% Use the images only on this page
\lipsum[4-10]
\pagestyle{imagepagestyle}% And from this page.
\lipsum
\end{document}
Responder2
Embora sua pergunta seja bastante confusa (você deve mostrar pelo menos um exemplo da saída que espera e um exemplo mínimo de código para reproduzir seu problema), tentarei "adivinhar" o que você deseja fazer:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\begin{document}
% Your document content here
\vfill % push the minipage to the bottom of the page
\noindent % prevent indentation
\begin{minipage}[b]{\linewidth}
\raggedleft % right-align the content of the minipage
\includegraphics[width=0.3\linewidth]{example-image} % replace 'example-image' with your image file name
\end{minipage}
\end{document}