0

I have a document where I would insert an image at the bottom right angle of the page. I thought to do that creating a minpage environment. But I don't find the way to insert this image where I would. How can I do that?

\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}

Thank you

Renato

Zarko
  • 296,517
RenatoP
  • 791
  • It is absolutely not clear, what you mean. Why are you using a minipage? It using a minipage relevant for the question? Should the image be printed on the bottom right edge of the paper, the text area or the minipage? Please add a minimal working example and maybe additional information to make all this clear. – cabohah Mar 02 '23 at 16:25
  • I've used minpage because I thought that it is the only way to obtain my image on the bottom left corner of page. Can I do it in other way? – RenatoP Mar 02 '23 at 16:29
  • Without more information I can only speculate: textpos, eso-pic, hook shipout/background or shipout/foreground, TikZ. – cabohah Mar 02 '23 at 16:30
  • I've just to insert an jpg image on the bottom right of the page. If not necessary minpage I can obmit it. Can you give me some hint to position in non relative way an image inside a page? – RenatoP Mar 02 '23 at 16:37
  • See my previous comment and also Absolute positioning in beamer (the title may be misleading, several answers are more general). – cabohah Mar 02 '23 at 16:41
  • I've modified the title of ht thread (it is not a problem of minpagem but about of page). But I 'm still unable to obtain my goal. Can I use the LuaLatex compiler (I need it for fontspec package), and I've still not find any example on how to use textpos entry – RenatoP Mar 02 '23 at 17:05
  • The question title says: “bottom-left of page”, the text: “bottom right angle of the page”. Maybe you know, what you want. I do not. And I still do not know, if you really mean page or maybe only text area. Once again: You should edit your question to make it clear and add a MWE. This would help us a lot to help you. – cabohah Mar 02 '23 at 17:17
  • bottom left or rigt I still don't know, I will see the result. But If I don't want to use minpage How can I pkace the image? – RenatoP Mar 02 '23 at 17:34
  • Do you want the image only at one page (which one) or at every page? And I've already asked: Really the page bottom (left or right) edge of the page or the text area? It is really hard to find out, what you want. – cabohah Mar 03 '23 at 07:34
  • BTW: Using a commercial font in MWE should only be done, if using the font is essential for the problem. – cabohah Mar 03 '23 at 07:38

2 Answers2

5

It's still not really clear, what you want. However, here an example how to use textpos to print images at the four corners of one page (in the example the first one):

\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}

four images at the corners of the paper

If you want the images instead at the corners of the text area just remove option absolute and replace \paperwidth by \textwidth and \paperheight by \textheight.

If you want the images at every page, using eso-pic would be easier:

\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}

using eso-pic or hooks to add images at every page corner

Once again, you can adapt these examples to put the images at the edges of the text area instead of the paper. To do so, once again replace \paperwidth by \textwidth and also replace \AtPageUpperLeft by \AtTextUpperLeft and \AtPageLowerLeft by \AtTextLowerLeft.

You can use this suggestion also to add the image(s) to only one page using the star-variant \AddToShipoutPictureBG*.

With an up-to-date LaTeX you can also use the shipout hooks:

\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}

See the manuals of the used packages for more information about them. See the generic hook manual for information about using hooks.


Note: There are numerous other alternatives for placing images or other material in a fixed position on individual or all pages of a document. The ones shown here are probably the simplest and also the most commonly used. Another possibility, very popular with TikZ users, is shown in this answer to the already as comment linked question. As an example for rather unconventional solutions the use of package scrlayer-scrpage is shown here:

\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}

A nice feature of this suggestion is, that you can add and remove the newly declared layer to and from every page style at every page you want. You even can declare new page styles with or without this layer. So something like \pagenumbering{gobble} wouldn't be necessary to have pages with the images only:

\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}

cabohah
  • 11,455
0

Although your question is quite confusing (you should show at least one example of the output you expect and a minimal code example to reproduce your problem), I will try to "guess" what you want to do:

\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}

enter image description here

scd
  • 774
  • You should at least add an empty content above the \vfill or use \vspace*{\fill}. Otherwise the image is not at the bottom. And currently the image is not at a page edge but only the end of the text area. Maybe this is wanted, because the currently the question is unclear. However, is asks either the bottom-left or bottom-right of a page. – cabohah Mar 02 '23 at 17:10
  • I've added the example code (just a \lipsum [1-1]\ for every page) How can I add a simple image on bottom right corner of a page? – RenatoP Mar 02 '23 at 17:24