I'd like to make an custom environment for a page decoration like the following gray angled banner:

enter image description here

I'm unsure how to draw it so that it that goes the full width of the page. I don't have an high res-image for it, but I'd like to keep the two column style in the banner.

Here's the text:

Personalisation

A virtual personal tutor guides students through new topics, and gives real time hints and encouragement – almost like 1:1 coaching.

As we learn more about you, our algorithms can seamlessly adapt and personalise the content, allowing everyone to achieve mastery.

  • 1
    The banner is not too difficult to get, however not many are keen on typing the text in. So could you please provide us with the code that produces the text without the banner? – marmot Nov 8 at 18:34
up vote 3 down vote accepted

Obviously I do not know how you do your twocolumn stuff. Is it a table or multicol, impossible to tell without an MWE. So here is a generic answer that can be applied to both. Obviously, I made no effort in punching in the text from your screen shot.

\documentclass{article}
\usepackage{multirow}
\usepackage{eso-pic}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc}
\usepackage{lipsum}
\begin{document}
\lipsum[1]

\bigskip\bigskip

\centering
\begin{tabular}{rl}
Personalization &
\multirow{2}{*}{\tikzmarknode{duck}{\includegraphics{example-image-duck}}}\\
some more text
\end{tabular}
\AddToShipoutPictureBG*{%
\begin{tikzpicture}[overlay,remember picture]
\fill[gray!20]
    ($(current page.west |- duck.north)+(0,1)$)
    -- ($(current page.east |- duck.north)+(0,0.1)$)
    -- ($(current page.east |- duck.south)+(0,-0.1)$)
    -- ($(current page.west |- duck.south)+(0,-1)$);
\end{tikzpicture}
}

\clearpage
This is a normal page
\end{document}

enter image description here

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.