Translucent text as a background of minipage

minipagetableswatermark

I would be happy, if somebody helps me to achieve this result — make something like watermark but put it in my particular minipage (as on screenshot shown)

enter image description here

Here is my code:

\documentclass[a4paper,14pt]{extreport}
\usepackage[left=0.5cm,right=0.5cm,
top=1.5cm,bottom=1.5cm,bindingoffset=0cm]{geometry}
%------------------  
\usepackage{lstautogobble}  % Fix relative indenting
\usepackage{color}          % Code coloring
\usepackage{zi4}            % Nice font
  \definecolor{bluekeywords}{rgb}{0.13, 0.13, 1}
  \definecolor{greencomments}{rgb}{0, 0.5, 0}
  \definecolor{redstrings}{rgb}{0.9, 0, 0}
  \definecolor{graynumbers}{rgb}{0.5, 0.5, 0.5}
  \usepackage{listings}
  \lstset{
  basicstyle=\ttfamily,
  columns=fullflexible,
  frame=single,
  breaklines=true,
  postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
  }
%------------------  


\begin{document}

\begin{table}[h!]
  \begin{tabular}{c | c}
  \begin{minipage}[m]{0.4\textwidth}
  some text or picture
  \end{minipage}
  &
  \begin{minipage}[m]{0.55\textwidth}
  \begin{lstlisting}[basicstyle=\scriptsize]
  some text
  \end{lstlisting}
  \end{minipage}
  \end{tabular}
  \end{table}

\end{document}

Best Answer

You have left out code that produces the chapter headings and section headings (section 3.1 in this case), but guessing that part, you can advance backwards manually (that is, move in the negative direction) to re-arrange the positions of items vertically, and then use overlap etc.

Using fontspec package to set the colour and opacity of the font, and titlesec package to apply it to the section label, as an illustration:

label overlap

MWE

\documentclass[a4paper,14pt]{extreport}
\usepackage[left=0.5cm,right=0.5cm,
top=1.5cm,bottom=1.5cm,bindingoffset=0cm]{geometry}
%------------------  
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{fontspec}
\newfontfamily\fmysec{Noto Serif}[Scale=5,Colour=red,Opacity=0.3]
\usepackage{titlesec}
\titlelabel{{\fmysec \thetitle}}

\usepackage{lstautogobble}  % Fix relative indenting
%\usepackage{color}          % Code coloring
\usepackage{zi4}            % Nice font
  \definecolor{bluekeywords}{rgb}{0.13, 0.13, 1}
  \definecolor{greencomments}{rgb}{0, 0.5, 0}
  \definecolor{redstrings}{rgb}{0.9, 0, 0}
  \definecolor{graynumbers}{rgb}{0.5, 0.5, 0.5}
  \usepackage{listings}
  \lstset{
  basicstyle=\ttfamily,
  columns=fullflexible,
  frame=single,
  breaklines=true,
  postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
  }
%------------------  


\begin{document}
\chapter{x}
\chapter{x}
\chapter{\ \\[-1em] Code, listings, minted \ldots}
\section{\hspace{1.5in}\llap{\normalsize\mdseries\raisebox{7em}{Code listing using \textit{minted} in \colorbox{red!7}{Beamer}}}}
%\begin{table}[h!] % table float not needed
\vspace{-5em}
  \begin{tabular}{c | c}
  \begin{minipage}[m]{0.4\textwidth}
  some text or picture
  \end{minipage}
  &
  \begin{minipage}[m]{0.55\textwidth}
  \begin{lstlisting}[basicstyle=\scriptsize]
  some text
  \end{lstlisting}
  \end{minipage}
  \end{tabular}
  
%  \end{table}

\end{document}