3

I would like to insert an image (in ligth grays) created with PsTricks (similar to the popular TikZ) as a background image in moderncv. In the PsTricks images I would insert some LaTeX formulas in light gray in the background.

An alternative option were put some images in some particular positions as ligth gray backgrounds.

How could we do that?

\documentclass[10pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}                   % replace by the encoding you are using
\usepackage{geometry}
\usepackage{microtype}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\firstname{\Huge{Manuel}}
\familyname{Dopazo Souto}
\title{\Large{Carpinteiro\newline{}\newline{}Wood worker}}
\address{Rúa dabaixo}{36.000, Pontevedra}    % optional, remove the line if not wanted
\mobile{649.45.74.35}                    % optional, remove the line if not wanted                     % optional, remove the line if not wanted
%MICHI%\fax{fax (optional)}                          % optional, remove the line if not wanted
\email{carpinteiro@carpinteiros.com}
\extrainfo{Data de nacemento: 2 de Xaneiro de 1.492}
\photo[60pt]{example-image-a.jpg}
\nopagenumbers{}

\begin{document}
\newgeometry{top=1.25cm, bottom=1.25cm,right=1.61cm, left=1.61cm}% inner=1cm, outer=0.618\textwidth
\vspace*{-0.56cm}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\vspace*{-1.24cm}
\vspace*{-0.18cm}

\section{Formación Académica}
\cventry{2015}{Carpinteria de arriba.}{}{}{\newline{}\scriptsize{Up's wood factory.}}{}{}{\scriptsize{Xan.}}
\cventry{2009--2014}{Carpinteria de abaixo}{}{}{\newline{}\scriptsize{Down wood factory. Galicia.}}{}{}{\scriptsize{Xaquin}}

\section{Experiencia}
\cventry{2015}{Carpinteria de arriba.}{}{}{\newline{}\scriptsize{Up's wood factory.}}{}{}{\scriptsize{Xan.}}

\end{document}
Mensch
  • 65,388
Mika Ike
  • 3,751

1 Answers1

2

Well, you gave no image that you want to use. So I used an image from package mwe, called example-image.

You can use package background for your needs:

\usepackage[scale=1.5,opacity=0.5,color=black,placement=bottom]{background} % top bottom center
\backgroundsetup{%
  contents={\includegraphics[width=\textwidth]{example-image}}
}% backgroundsetup

The documentation you will find with texdoc background on your console/terminal.

BTW: You have some errors in your code, resulting in warnings and a "strange" behaviour/layout.

Please see the two lines:

\cventry{2015}{Carpinteria de arriba.}{}{}{\scriptsize{Up's wood factory.}}{\scriptsize{Xan.}}
%         1      2                     3 4  5                                6 

Command \cventry is designed to use 6 parameters, so you have to use 6 pairs of {}. In your code you used more than 6 with bad behaviour ...

Using \newline in the title results in an message that it is not allowed to be add into the pdf token (used for the pdf infos: author, title, pages, etc.)

With the complete MWE:

\documentclass[10pt,a4paper]{moderncv}

\moderncvstyle{classic}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{microtype}
\usepackage{blindtext}
\usepackage{graphicx}
%\usepackage[export]{adjustbox} % why???????????????????

\usepackage[scale=1.5,opacity=0.5,color=black,placement=bottom]{background} % top bottom center
\backgroundsetup{%
  contents={\includegraphics[width=\textwidth]{example-image}}
}% backgroundsetup

\firstname{\Huge{Manuel}}
\familyname{Dopazo Souto}
\title{\Large{Carpinteiro Wood worker}}% deleted \newline{}\newline{}
\address{Rúa dabaixo}{36.000, Pontevedra}
\mobile{649.45.74.35}
\email{carpinteiro@carpinteiros.com}
\extrainfo{Data de nacemento: 2 de Xaneiro de 1.492}
\photo[60pt]{example-image-a.jpg}

\nopagenumbers{}


\begin{document}
\newgeometry{top=1.25cm, bottom=1.25cm,right=1.61cm, left=1.61cm}% inner=1cm, outer=0.618\textwidth
\vspace*{-0.56cm}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\vspace*{-1.24cm}
\vspace*{-0.18cm}

\section{Formación Académica}
\cventry{2015}{Carpinteria de arriba.}{}{}{\scriptsize{Up's wood factory.}}{\scriptsize{Xan.}}
%         1      2                     3 4  5                                6 
\cventry{2009--2014}{Carpinteria de abaixo}{}{}{\newline{}\scriptsize{Down wood factory. Galicia.}}{\scriptsize{Xaquin}}

\section{Experiencia}
\cventry{2015}{Carpinteria de arriba.}{}{}{\newline{}\scriptsize{Up's wood factory.}}{\scriptsize{Xan.}}

\section{Experiencia}
\cventry{2015}{Carpinteria de arriba.}{}{}{\newline{}\scriptsize{Up's wood factory.}}{\scriptsize{Xan.}}

\section{Experiencia}
\cventry{2015}{Carpinteria de arriba.}{}{}{\newline{}\scriptsize{Up's wood factory.}}{\scriptsize{Xan.}}

\end{document}

you get the result:

With added background

Just play with the option to get your needed result.

Remark: Depending on what you want to insert, you can also insert TeX code in content. Try it with your mathematics you want to show ...

Mensch
  • 65,388