1

I have still the following problem: I have a logo.png image that should be put on every odd page in the top right corner (until turned off). The image is higher than the header-region. The auto-generated Text (*) in the body shall wrap around the image

page1:

header                  logo
----------------------- logo
text text text text te- logo
xt text text text text  text
text text text text text te-
xt
---------------------------
footer                  img

page 2:

                     header
---------------------------
text text text text text t-
ext
...
---------------------------
                     footer

page 3:

header                  logo
----------------------- logo
text text text text te- logo
xt text text text text  text
text text text text text te-
xt
---------------------------
footer                  img

what I tried:

\documentclass[10pt,twoside]{article}
\usepackage[german]{babel}
\usepackage[c4paper]{geometry}
\geometry{textheight=85mm,left=15mm,right=5mm,top=5mm,bottom=15mm,paperwidth=210mm,paperheight=99mm}
\usepackage{graphicx}
\usepackage{wrapfig}
\setmainfont[Mapping=tex-text]{Frutiger 45 Light}
\setlength{\parindent}{0pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[OL,ER]{header}
\fancyhead[OR]{\begin{wrapfigure}{R}{50mm}\includegraphics{logo.png}\end{wrapfigure}}
\fancyfoot[OR]{\includegraphics[width=35mm]{image.png}}
\fancyfoot[OL,ER]{footer}
\begin{document}
\lipsum
\end{document}

(*) The text is generated by an external source and can vary from run to run in length of paragraph and therefore where the next paragraph or even page starts.

  • The only mechanism which will shorten two lines in the middle of a paragraph is \parshape, which must be done at the beginning of the paragraph. If you could determine which paragraphs needed to be shaped and how many lines to skip at the beginning, then one could use \everypar to implement it. – John Kormylo Sep 27 '16 at 14:36
  • I wish to share how I solved something similar, but using LibreOffice. I believe that the same approach could be used with this problem. I specified two styles: one for odd pages and the other for even pages. With that mechanism I controlled that every two pages appear the logo, which was inside a box allowing the text to surround that box. Mr. Kormylo, suggested 'parshape' and that is equivalent to the second part of the idea sugested. – djnavas Sep 28 '16 at 4:22
  • the text is generated and of variable length. – Peter Miehle Sep 28 '16 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.