GeneralAdding a photo to a CV

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Adding a photo to a CV

Post by dmt »

I've written my CV using a latex template I found on the net that I rather like. So far so good. I just found out that for one application I need to add a photo to the CV, which I am having trouble figuring out how to do. I am used to adding normal floats to papers and documents, but not something like this to another template.

I think the easiest would be in the top right corner. The CV template using a new command called makeheading to generate a heading from my name. I was thinking if there was a way to incorporate the photo above the line drawn with this heading, but on the right side of the page. Here is the code use to generate the heading:

Code: Select all

% The title (name) with a horizontal rule under it
%
% Usage: \makeheading{name}
%
% Place at top of document. It should be the first thing.
\newcommand{\makeheading}[1]%
        {\hspace*{-\marginparsep minus \marginparwidth}%
         \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
                {\large \bfseries #1}\\[-0.15\baselineskip]%
                 \rule{\columnwidth}{1pt}%
         \end{minipage}}
Then the code to generate the heading is simply:

Code: Select all

\begin{document}
\makeheading{My Name}
Is this enough information to help me figure out how to add photo above the line drawn in the heading, on the right side? Or do I need to create some sort of minimal CV example to include here instead?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Adding a photo to a CV

Post by kaiserkarl13 »

You might check out the wrapfig package if you're trying to get text to wrap around your image (or at least be on the same line).
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Adding a photo to a CV

Post by dmt »

I've been trying some experiments with wrapfig, but can't get any good results. Integrating that with the way the CV template is set up is beyond my Latex skill set. I've tried integrating it into the header, but without any good results.

Also, there seems to be something strange with wrapfig (or I assume it's the package). Normally if I have the same image as a .png and .eps and I use "includegraphics" I can just give the file name without an extension and see the result in the DVI viewer (I'm using Led on Windows) and the same result in the pdf file. But now with wrapfig there is no visible image in the DVI viewer.

Here, I have a minimal working example of the CV template to get the idea of how it works. So any good detailed instructions on how to include a picture on the upper right would be much appreciated.

Code: Select all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% Simple LaTeX CV Template %%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NOTE: If you find that it says                                     %%
%%                                                                    %%
%%                           1 of ??                                  %%
%%                                                                    %%
%% at the bottom of your first page, this means that the AUX file     %%
%% was not available when you ran LaTeX on this source. Simply RERUN  %% 
%% LaTeX to get the ``??'' replaced with the number of the last page  %% 
%% of the document. The AUX file will be generated on the first run   %%
%% of LaTeX and used on the second run to fill in all of the          %%
%% references.                                                        %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%% Document Setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Don't like 10pt? Try 11pt or 12pt
\documentclass[10pt]{article}

% This is a helpful package that puts math inside length specifications
\usepackage{calc}

% Get Swedish characters to work right
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{wrapfig}

% Layout: Puts the section titles on left side of page
\reversemarginpar

%
%         PAPER SIZE, PAGE NUMBER, AND DOCUMENT LAYOUT NOTES:
%
% The next \usepackage line changes the layout for CV style section
% headings as marginal notes. It also sets up the paper size as either
% letter or A4. By default, letter was used. If A4 paper is desired,
% comment out the letterpaper lines and uncomment the a4paper lines.
%
% As you can see, the margin widths and section title widths can be
% easily adjusted.
%
% ALSO: Notice that the includefoot option can be commented OUT in order
% to put the PAGE NUMBER *IN* the bottom margin. This will make the
% effective text area larger.
%
% IF YOU WISH TO REMOVE THE ``of LASTPAGE'' next to each page number,
% see the note about the +LP and -LP lines below. Comment out the +LP
% and uncomment the -LP.
%
% IF YOU WISH TO REMOVE PAGE NUMBERS, be sure that the includefoot line
% is uncommented and ALSO uncomment the \pagestyle{empty} a few lines
% below.
%

%% Use these lines for letter-sized paper
%\usepackage[paper=letterpaper,
%            %includefoot, % Uncomment to put page number above margin
%            marginparwidth=1.2in,     % Length of section titles
%            marginparsep=.05in,       % Space between titles and text
%            margin=1in,               % 1 inch margins
%            includemp]{geometry}

%% Use these lines for A4-sized paper
\usepackage[paper=a4paper,
            %includefoot, % Uncomment to put page number above margin
            marginparwidth=30.5mm,    % Length of section titles
            marginparsep=1.5mm,       % Space between titles and text
            margin=25mm,              % 25mm margins
            includemp]{geometry}

%% More layout: Get rid of indenting throughout entire document
\setlength{\parindent}{0in}

%% This gives us fun enumeration environments. compactenum will be nice.
\usepackage{paralist}

%% Reference the last page in the page number
%
% NOTE: comment the +LP line and uncomment the -LP line to have page
%       numbers without the ``of ##'' last page reference)
%
% NOTE: uncomment the \pagestyle{empty} line to get rid of all page
%       numbers (make sure includefoot is commented out above)
%
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
%\pagestyle{empty}      % Uncomment this to get rid of page numbers
\fancyhf{}\renewcommand{\headrulewidth}{0pt}
\fancyfootoffset{\marginparsep+\marginparwidth}
\newlength{\footpageshift}
\setlength{\footpageshift}
          {0.5\textwidth+0.5\marginparsep+0.5\marginparwidth-2in}
\lfoot{\hspace{\footpageshift}%
       \parbox{4in}{\, \hfill %
%                    \arabic{page} av \protect\pageref*{LastPage} % +LP
                    \arabic{page}                               % -LP
                    \hfill \,}}

% Finally, give us PDF bookmarks
\usepackage{color,hyperref}
\definecolor{darkblue}{rgb}{0.0,0.0,0.3}
\hypersetup{colorlinks,breaklinks,
            linkcolor=darkblue,urlcolor=darkblue,
            anchorcolor=darkblue,citecolor=darkblue}

%%%%%%%%%%%%%%%%%%%%%%%% End Document Setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%% Helper Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%

% The title (name) with a horizontal rule under it
%
% Usage: \makeheading{name}
%
% Place at top of document. It should be the first thing.
\newcommand{\makeheading}[1]%
        {\hspace*{-\marginparsep minus \marginparwidth}%
         \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
                {\large \bfseries #1}\\[-0.15\baselineskip]%
                 \rule{\columnwidth}{1pt}%
         \end{minipage}}

% The section headings
%
% Usage: \section{section name}
%
% Follow this section IMMEDIATELY with the first line of the section
% text. Do not put whitespace in between. That is, do this:
%
%       \section{My Information}
%       Here is my information.
%
% and NOT this:
%
%       \section{My Information}
%
%       Here is my information.
%
% Otherwise the top of the section header will not line up with the top
% of the section. Of course, using a single comment character (%) on
% empty lines allows for the function of the first example with the
% readability of the second example.
\renewcommand{\section}[2]%
        {\pagebreak[2]\vspace{1.3\baselineskip}%
         \phantomsection\addcontentsline{toc}{section}{#1}%
         \hspace{0in}%
         \marginpar{
         \raggedright \scshape #1}#2}

% An itemize-style list with lots of space between items
\newenvironment{outerlist}[1][\enskip\textbullet]%
        {\begin{enumerate}[#1]}{\end{enumerate}%
         \vspace{-.6\baselineskip}}

%my own indented paragraph environment
\newcommand{\ind}{\hangindent=0.5cm \hangafter=0 \parskip=2pt}
\newcommand{\nos}{\parskip=0pt}

% An environment IDENTICAL to outerlist that has better pre-list spacing
% when used as the first thing in a \section
\newenvironment{lonelist}[1][\enskip\textbullet]%
        {\vspace{-\baselineskip}\begin{list}{#1}{%
        \setlength{\partopsep}{0pt}%
        \setlength{\topsep}{0pt}}}
        {\end{list}\vspace{-.6\baselineskip}}

% An itemize-style list with little space between items
\newenvironment{innerlist}[1][\enskip\textbullet]%
        {\begin{compactenum}[#1]}{\end{compactenum}}

% To add some paragraph space between lines.
% This also tells LaTeX to preferably break a page on one of these gaps
% if there is a needed pagebreak nearby.
\newcommand{\blankline}{\quad\pagebreak[2]}

\hyphenpenalty=5000
\tolerance=1000

%%%%%%%%%%%%%%%%%%%%%%%% End Helper Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%% Begin CV Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\makeheading{My Name}



\section{}
%
% NOTE: Mind where the & separators and \\ breaks are in the following
%       table.
%
% ALSO: \rcollength is the width of the right column of the table 
%       (adjust it to your liking; default is 1.85in).
%
\newlength{\rcollength}\setlength{\rcollength}{2.2in}%
%
\begin{tabular}[t]{@{}p{\textwidth-\rcollength}p{\rcollength}}
Street Street 15            & \textit{Tel:} 111-11 11 11 \\
654 60 Karlstad           & \textit{Cell:} 222-222 222\\
\textit{PN:} 123456-1111   & \textit{E-mail:}
\href{mailto:me@somewhere.net}{me@somewhere.net}\\
\end{tabular}

\section{Education}
%
\textbf{Some degree}, stuff, 2009\\
\href{http://www.blah.blah/}{\textit{Blah Blah University}}, 
Place, Place\\[10pt]
\textbf{Some degree}, stuff, 2000\\
\href{http://www.blah.blah/}{\textit{Blah Blah University}}, 
Place, Place\\[10pt]
\textbf{Some degree}, stuff, 1995\\
\href{http://www.blah.blah/}{\textit{Blah Blah University}}, 
Place, Place

\section{Work Experience}
\textbf{Some Job},
\textit{Some Place}, 
Place, Place%
         \hfill \textit{1999-2008}

\ind
Blah blah blah blah blah blah Blah blah blah blah blah blah Blah blah blah blah blah blah Blah blah blah blah blah blah.
\nos

\blankline

\textbf{Some Job},
\textit{Some Place}, 
Place, Place%
         \hfill \textit{1999-2008}

\ind
Blah blah blah blah blah blah Blah blah blah blah blah blah Blah blah blah blah blah blah Blah blah blah blah blah blah.
\nos


\section{Languages}
%
Blah (\textit{native}) och Blah (\textit{fluent})




\section{References}
%
Blah blah blah.
\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%% End CV Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Re: Adding a photo to a CV

Post by dmt »

I'm having a little bit of success using the \ThisURCornerWallPaper command in the wallpaper.sty package.

The problem now is that this command sticks the picture in the upper right corner, flush against the edges.

Does anyone know how to offset it from the right and top edges?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Adding a photo to a CV

Post by gmedina »

Hi,

I suggest you the textpos package. It allows you to easily place objects at absolute positions on the page. Refer to the package documentation for further information.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply