0

I have made a Latex document that has a front page, and I have a logo on the front page in the bottom left corner. But this logo now needs to be placed in the bottom right corner instead and also on every page, if I place my current logo in the bottom left corner of every page the text overlaps the logo, so when the logo is in the bottom right corner the text also needs to float around the logo.

If the margins of the document are changes I would still like the logo to move to the bottom right if at all possible.

To do the logo in the bottom left I have used the eso-pic package.

\AddToShipoutPictureFG*{\put(0,0){\includegraphics[width=40mm,scale=1]{images/logo.png}}}

\documentclass[a4paper, twoside, 12pt, hidelinks, final]{article}

\usepackage[top=1in, bottom=1in, left=0.75in, right=0.75in, headheight=35.4pt, footskip=35.4pt]{geometry}

\usepackage{eso-pic} % https://ctan.org/pkg/eso-pic?lang=en
\usepackage{graphicx} % https://ctan.org/pkg/graphicx?lang=en

\AddToShipoutPictureFG*{\put(0,0){\includegraphics[width=40mm,scale=1]{images/logo.png}}}

\begin{document}

\clearpage\mbox{}\clearpage

\end{document}
9
  • You should take a look at the eso-pic package.
    – Bernard
    Commented Aug 2, 2019 at 12:47
  • @Bernard I have already, I did mention above that I am using it already, but how to place the logo in the bottom right and have the text wrap around it?
    – AeroMaxx
    Commented Aug 2, 2019 at 12:51
  • Sorry, I read too fast your question. You want the logo at the bottom right of the text area or of the physical page?
    – Bernard
    Commented Aug 2, 2019 at 12:53
  • @Bernard That's ok no worries, I would like it to be at the bottom right of the physical page.
    – AeroMaxx
    Commented Aug 2, 2019 at 13:03
  • Could you post a compilable code, with the ceometry of the page, the document class, the paper format, &c.?
    – Bernard
    Commented Aug 2, 2019 at 13:40

1 Answer 1

2

This shows how to move the image to the lower right corner. It shrinks the image to fit the margin.

\documentclass[a4paper, twoside, 12pt, hidelinks, final]{article}

\usepackage[top=1in, bottom=1in, left=0.75in, right=0.75in, headheight=35.4pt, footskip=35.4pt]{geometry}

\usepackage{eso-pic} % https://ctan.org/pkg/eso-pic?lang=en
\usepackage{graphicx} % https://ctan.org/pkg/graphicx?lang=en

\newsavebox{\logo}
\savebox{\logo}{\includegraphics[width=0.75in]{example-image}}% do once, then copy

\AddToShipoutPictureFG*{\put(\LenToUnit{\dimexpr \paperwidth-0.75in},0){\usebox\logo}}

\begin{document}

\clearpage\mbox{}\clearpage

\end{document}

This solution sets the margin to match the image size.

\documentclass[a4paper, twoside, 12pt, hidelinks, final]{article}
\usepackage{graphicx} % https://ctan.org/pkg/graphicx?lang=en

\newsavebox{\logo}
\savebox{\logo}{\includegraphics[scale=0.3]{example-image}}% do once, then copy

\usepackage[top=1in, bottom=1in, left=\wd\logo, right=\wd\logo, headheight=35.4pt, footskip=35.4pt]{geometry}

\usepackage{eso-pic} % https://ctan.org/pkg/eso-pic?lang=en

\AddToShipoutPictureFG*{\put(\LenToUnit{\dimexpr \paperwidth-\wd\logo},0){\usebox\logo}}

\begin{document}

\clearpage\mbox{}\clearpage

\end{document}

This solution uses flowfram. I added an \intextsep gap above and a \columnsep gap beside the logo. I also added a \dp\strutbox gap between the two flow frames to try to emulate \baselineskip.

In this case, the first break occurs between two paragraphs, but you still need to add a \framebreak to prevent the next paragraph from being formatted at the wrong width. To manually insert \framebreak and \nopar, run it without and the appropriate location should be obvious.

\documentclass[a4paper, twoside, 12pt, hidelinks, final]{article}
\usepackage[top=1in, bottom=1in, left=0.75in, right=0.75in, headheight=35.4pt, footskip=35.4pt]{geometry}
\usepackage{graphicx} % https://ctan.org/pkg/graphicx?lang=en
\usepackage{flowfram}
\usepackage{lipsum}% MWE only

%framebreak within a paragraph
\newcommand{\nopar}{\parfillskip=0pt\framebreak\parfillskip=0pt plus1fil\noindent}

\newsavebox{\logo}
\savebox{\logo}{\includegraphics[scale=0.5]{example-image}}% get width and height

\newstaticframe{\wd\logo}{\ht\logo}{\dimexpr \paperwidth-0.75in-\wd\logo}{-1in}
\setstaticcontents{1}{\usebox\logo}

\newflowframe{\textwidth}{\dimexpr \textheight+1in-\ht\logo-\intextsep}{0pt}{\dimexpr \ht\logo-1in+\intextsep}
\newflowframe{\dimexpr \textwidth+0.75in-\wd\logo-\columnsep}{\dimexpr \ht\logo-1in+\intextsep-\dp\strutbox}{0pt}{0pt}

\begin{document}

\lipsum[1-6]\framebreak

Sed commodo posuere pede. Mauris ut est. Ut quis purus. Sed ac odio. Sed vehicula
hendrerit sem. Duis non odio. Morbi ut dui. Sed accumsan risus eget odio. In hac habitasse
platea dictumst. Pellentesque non elit. Fusce sed justo eu urna porta tincidunt. Mauris felis odio,\nopar
sollicitudin sed, volutpat a, ornare ac, erat. Morbi quis dolor. Donec pellentesque, erat ac sagittis
semper, nunc dui lobortis purus, quis congue purus metus ultricies tellus. Proin et quam. Class
aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Praesent
sapien turpis, fermentum vel, eleifend faucibus, vehicula eu, lacus.

\lipsum[8-10]

\end{document}
5
  • This resolved half of my question, the 2nd solution worked best for me, the first cut the logo in half with half being on the page and the other half off the page. Now if only I could get the text wrapping around the image that would be great, I look at the link you posted, but didn't understand any of what was said, I sort of understood what they was trying to do with the help of the pictures.
    – AeroMaxx
    Commented Aug 4, 2019 at 17:51
  • The link was mostly to show the manual addition of \nopar when the column width changed. As for the logo, you must have removed the [width=0.75in] argument (or replaced it with [width=40mm] as in the original). Commented Aug 4, 2019 at 17:57
  • Ah you are correct, I did do that! Is there not an easier solution to achieve MS Word like wrapping around images?
    – AeroMaxx
    Commented Aug 4, 2019 at 18:01
  • You can use \parshape to implement word wrapping on a single paragraph, but not to synchronize the gaps to page locations. Flowfram will change the column width automatically, but when you split a paragraph, the formatted width does not change until the next paragraph starts. Commented Aug 4, 2019 at 18:11
  • thank you for your help, but I have been unable to figure out the word wrapping with \parshape, so instead have just decided that I'll put the logo on the front cover of the document only. Not what I was really wanting but it'll have to do.
    – AeroMaxx
    Commented Aug 5, 2019 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .