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}
AeroMaxx
  • 303
  • You should take a look at the eso-pic package. – Bernard Aug 02 '19 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 Aug 02 '19 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 Aug 02 '19 at 12:53
  • @Bernard That's ok no worries, I would like it to be at the bottom right of the physical page. – AeroMaxx Aug 02 '19 at 13:03
  • Could you post a compilable code, with the ceometry of the page, the document class, the paper format, &c.? – Bernard Aug 02 '19 at 13:40
  • @Bernard Sure I have done that now. – AeroMaxx Aug 02 '19 at 13:49
  • Would you like the logo to be on the right side or on the outer side (i.e. alternately on the left and on the right side). Also, I don't know how to wrap text at that place automatically, so the size of the logo should be slightly smaller. – Bernard Aug 02 '19 at 14:41
  • Trying to get the text to float around the logo will require things like flowfram and manually inserting fake paragraph breaks (see https://tex.stackexchange.com/questions/163075/how-to-arrange-a-large-picture-on-the-side-on-the-current-page/163104?r=SearchResults&s=1|36.2346#163104). Either shrink the logo or increase the margin. – John Kormylo Aug 02 '19 at 15:01
  • @Bernard The logo would need to be always on the right side. The logo also needs to be the same size on all pages. – AeroMaxx Aug 04 '19 at 16:42

1 Answers1

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}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120
  • 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 Aug 04 '19 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). – John Kormylo Aug 04 '19 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 Aug 04 '19 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. – John Kormylo Aug 04 '19 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 Aug 05 '19 at 08:44