[Tex/LaTex] Transparent textbox behind text on title page

titles

I'm new to LaTeX and I would like to put a semi-transparent text box behind some text on a title page, similar to what is found here: https://www.overleaf.com/articles/clustering-the-interstellar-medium/mtthgyyfrdkn#.VbTxrZNVK1E. My title page has an image as the background.

I have tried using their code, but was unsuccessful. I also tried using the package mdframed (such as from one of the answers here: How to put a framed box around text + math environment), but I could not make this show the background partially through it.

Below is a template of what I have done for my title page:

\documentclass{article}

\usepackage{eso-pic}
\usepackage{graphicx}
\usepackage{bmpsize}

\usepackage{color}

\newcommand\BackgroundPic{%
\put(0, 0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth, height = \paperheight,%
keepaspectratio]{desired_background_image.png}%
\vfill
}}}

\begin{document}

\pagenumbering{gobble}
\AddToShipoutPicture*{\BackgroundPic}
\centering
\vspace*{0.5cm}

\huge\textcolor{magenta}{\textbf{Some large title}}
\\

\vspace*{0.5cm}

\large\textcolor{magenta}{Author Name}
\\

\vspace*{11cm}

\begin{flushright}
\small\textcolor{magenta}{Image Credit: Some Source}
\\

\end{flushright}

\end{document}

I would like the text "Some large title" and "Author Name" to have either a magenta or cyan background, with the text either being black, cyan, or magenta (undecided which at this point).

I do not want the text at the bottom right ("Image Credit: Some Source") to have a colored text box behind it.

I may also want to generalize it and have the title and author name separated by more than 0.5cm, in which case I may want to have two different text boxes behind each set of text (not sure how this would turn out yet).

Any suggestions to accomplish this would be greatly appreciated!

Best Answer

Combining tcolorbox and background images it's possible to get (perhaps) something the O.P. requests.

I've defined transparent boxes, the degree of transparancy is left over to the O.P.

The image credits are used in a separated box.

\documentclass{article}

\usepackage{graphicx}

\usepackage{ragged2e}
\usepackage{xcolor}

\usepackage[most]{tcolorbox}
\usepackage[firstpage=true]{background}

\newcommand{\mybgimage}{%
  \includegraphics[width=\paperwidth,height=\paperheight,%
    keepaspectratio]{Duck.png}%
}

\backgroundsetup{placement=center,angle=0,scale=1,contents=\mybgimage}

\newtcolorbox{mytransparentbox}[1][]{%
  coltext=magenta,
  arc=0pt,
  auto outer arc,
  enhanced jigsaw,
  opacityback=0.6,
  opacityframe=0.0,
  colback=cyan,
  width=\paperwidth,
  boxrule=0pt,
  oversize=9cm,
  #1
}

\begin{document}

\pagenumbering{gobble}

\begin{mytransparentbox}[height=12cm]
  \huge\textbf{The secret and the transparent life of Brazilian Ducks}
\vspace*{0.5cm}

\large By Paulo Roberto Massa Cereda
\end{mytransparentbox}

\begin{mytransparentbox}[coltext=blue,opacityback=0.0,colback=white,opacityframe=0.0]
\RaggedLeft
\small Image Credit: OpenClipart
\end{mytransparentbox}
\clearpage

Another page

\end{document}

enter image description here

Related Question