0

I want to make an image background in Overleaf and I have no I idea how to do that.

I want to be able to write over it just like one can change background color with \pagecolor{color}, I also want to change the color of the text so as to be white in the output but I don't want to use \textcolor{white}{} every time I write something.

Is there a way to make white the standard color?

CarLaTeX
  • 62,716

1 Answers1

2

With eso-pic and \color:

\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{xcolor}
\AddToShipoutPictureBG{\includegraphics[width=\paperwidth,height=\paperheight]{example-image}}

\begin{document}\color{white} It is not clear if you would like only one page with background or more. \newpage This example shows all pages with background. \end{document}

enter image description here

CarLaTeX
  • 62,716
  • "It is not clear if you would like only one page with background or more" I want all of pages to have the same background – Mathematics enjoyer Mar 23 '24 at 09:18
  • @Mathematicsenjoyer My example is OK, then. Thank you for accepting my answer. – CarLaTeX Mar 23 '24 at 09:33
  • this will not make everything white as it doesn't change \normalcolor. E.g. look at the page number which is still black. If everything should be white move the \color{white} into the preamble, then \normalcolor will pick that up at begin document. – Ulrike Fischer Mar 23 '24 at 11:29
  • @Mathematicsenjoyer Would you like the page numbers black or white? – CarLaTeX Mar 23 '24 at 12:38
  • I am facing a problem that the image of the background color seem to have some kind of whitish effect (I mean its color seem to be more white that the original image ) – Mathematics enjoyer Mar 24 '24 at 06:11
  • @Mathematicsenjoyer Try with eso-pic, see my renewed answer. – CarLaTeX Mar 24 '24 at 06:19