I'm preparing slides for lectures which I will present and record on Zoom. My camera feed will appear in the top right-hand corner of the screen so that students can see me, and I'd like the text on the slides to automatically wrap around this region, without having to manually set it up on each slide.
I'm trying to use wrapfig and everypage to insert an image in the top right corner of every slide, which the text will wrap around. (For now I'm using a dummy image, but will later just make it a white rectangle.) But it's not working: the image is not appearing on the right-hand side, and the text is not properly wrapping around it. It also keeps generating a Collision between wrapping environments warning.
Here's the code I'm using:
\documentclass{article}
\usepackage[17pt]{extsizes}
\usepackage[screen, margin=2cm]{geometry}
\pagestyle{empty}
\pagenumbering{gobble}
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage{everypage}
\usepackage{graphicx}
\AddEverypageHook{
\begin{wrapfigure}{r}{0pt} \includegraphics[width=0.4\textwidth]{example-image-a} \end{wrapfigure}
}
\begin{document}
\lipsum[1-20]
\end{document}
What is going wrong here?
I'd be very happy with alternative solutions to this problem (i.e. not using wrapfig/everypage).
EDIT: I think wrapfig will ultimately not work since my notes involve theorem environments and these do not wrap.
EDIT: I have now found an alternative solution. Since the standard slide ratio is squarer than the screen, I pushed the slide over to the left on the screen to make space for the video feed on the right. To do this, I made the slide wider, but correspondingly increased the size of the right margin, and filled in the extra space with a black rectangle produced using the answers to this question. Here's the code:
\documentclass[oneside]{amsart}
\usepackage[20pt]{extsizes}
\pagenumbering{gobble}
\usepackage[paperwidth=320mm, paperheight=180mm, left=2cm, right=8cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{fancyhdr}
\usepackage{lipsum}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[R]{%
\begin{tikzpicture}[overlay,remember picture]
\fill [color=black]
(current page.north east)
rectangle
($ (current page.south east) + (-6cm,0cm) $);
\end{tikzpicture}
}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\begin{document}
\thispagestyle{fancy}
\lipsum
\end{document}