# Text at the right of icon

I want make a CV and I want a list of icon with text at the right. Now I have this:

But I want something like this:

This is my "code":

\begin{document}
\header{name}{name} %starts a new page and puts text at the top of the
new page and any subsequent pages, until the next \header command
{Computer Science Engineer}

% fcolorbox = Color background for text. parbox = box in paragraph mode.
dimexpr for evaluate number operation
\fcolorbox{white}{gray}{\parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{
.....   % fake text
}}

% In the aside, each new line forces a line break
\begin{aside}
\includegraphics[scale=0.32]{img/MyPhoto.png}
~
~
line
\section{Tel \& Skype}
+39 329 7216527
neoben86
~
\section{Mail}
\href{mailto:carmine.benedetto@gmail.com}
{\textbf{carmine.benedetto@}\\gmail.com}
\href{mailto:carmine@carminebenedetto.net}
{\textbf{carmine@}\\carminebenedetto.net}
~
\section{Web \& Git}
\href{http://www.carminebenedetto.net}{carminebenedetto.net}
\href{https://bitbucket.org/neoben}{bitbucket.org/neoben}
\href{https://github.com/neoben}{github.com/neoben}
...

~
\section{Personal Skills}
\includegraphics[scale=0.62]{img/personal.png}
~
\end{aside}
...

\end{document}


More precisely I use frigeri-cv but I made some small changes:

I prefer change friggeri's side block. I want have icon for email, phone etc.. like this:

but on one line the information of email, address, etc. does not fit. It would be nice to have a list of icons as shown in the second image of the post, with some text aligned to the right of the icon.

This is the .cls file (only side block section):

%%%%%%%%%%%%%%
% Side block %
%%%%%%%%%%%%%%

\RequirePackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}
\newenvironment{aside}{%
\let\oldsection\section
\renewcommand{\section}[1]{
}
% color side
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, fill=sidecolor, anchor=north, minimum width=9cm,
minimum height=\paperheight+1cm] (box) at (-4.7cm,4cm){};
\end{tikzpicture}

\begin{textblock}{4.5}(1.5, 0.55) % width left block. in the parentes,
move right - move down the first side block
\begin{flushleft} % justified
\obeycr
}{%
\restorecr
\end{flushleft}
\end{textblock}
\let\section\oldsection
}


P.S. When I add command \begin inside the aside enviroment I have

There's no line here to end error.

• Let me guess -- you are using class friggeri-cv or cv-style? Will get problematic because the environment aside is a simple textblock ... Please explain your exact problem better! Why the newline? What should that image contain? Symbol for adress? Please show a short complete tex code which is (with error) compilable, then we have not to guess what you are doing ... – Mensch May 25 at 18:25
• Yes, I use friggeri-cv. Wait a moment and I edit my post – Simone May 25 at 18:30

The main issue here is the very poor code of class friggeri-cv. The environment aside is build with package textpos and the environment textblock, which does not allow to nest other environments inside it ...

So if you insist in using this class you have to work around this culprit.

To get the several symbols in front of the data you can use package fontawesome. Then -- for example -- can you use \faEnvelopeO for a symbol for the email address. Because the place is very small for symbol and address it could be you have manually to add an blank to allow LaTeX a line breaking where the blank is:

\faEnvelopeO ~myemail@gmail. com
%                          ^^^


Otherwise you can use that symbols in command \section{\faInbox} too.

So ou can try the following code for your personal data:

\begin{aside}
%
\section{contact}
City, State 050022
Country
~
\faPhone~+0 (000) 111 1111
{\small\faFax}~+0 (000) 111 1112
~
myemail@gmail.com
myweb.wordpress.com
~
\faEnvelopeO ~myemail@gmail. com
\faInbox ~myweb.wordpress.com
\faGithub ~\href{https://github.com/neoben}{github.com/neoben}
\end{aside}


With the following complete code (I used class cv-style which uses other fonts installed on my system, please copy my code to mwe.tex and change then class to friggeri-cv and test the code)

\documentclass{cv-style} % friggeri-cv

\usepackage{fontawesome} % <============================================
\geometry{%
showframe, % <================ only to visualize typing area & margins
}

\begin{document}

\begin{aside}
%
\section{contact}
City, State 050022
Country
~
\faPhone~+0 (000) 111 1111 % <==========================================
{\small\faFax}~+0 (000) 111 1112
~
myemail@gmail.com
myweb.wordpress.com
~
\faEnvelopeO ~myemail@gmail. com % <====================================

\faInbox ~myweb.wordpress.com
\faGithub ~\href{https://github.com/neoben}{github.com/neoben}
\end{aside}
%
\section{skills}
\vspace{-0.2cm}

Skill 1, skill 2, skill 3, skill 4, skill 5.

\section{education}
\begin{entrylist}
%------------------------------------------------
\entry
{2010--2011}
{University}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2004--2009}
{B.Eng. {\normalfont in Engineering Management [Grade]}}
{University}
{(Emphasis in ...)}
%------------------------------------------------
\end{entrylist}

\end{document}


results in the following pdf:

The line breaks do not look very good and I would use a longer first column to get the email address fitting in one line. You can use the code I already showed in my answer (please see the added redefinition of commands in preamble and the added option left=7cm for package geometry, see also deleted blank in email address):

\documentclass{cv-style} % friggeri-cv

\usepackage{fontawesome} % <============================================
\geometry{%
showframe, % <================ only to visualize typing area & margins
left=7cm   % <============================= bigger space on right side 5.6cm --> 7cm
}

\renewenvironment{aside}{% <============================================
\let\oldsection\section
\renewcommand{\section}[1]{
}
\begin{textblock}{5}(1, 1.87) % <=================================== 3.6 -> 5
\begin{flushright}
\obeycr
}{%
\restorecr
\end{flushright}
\end{textblock}
\let\section\oldsection
}

\renewcommand{\entry}[4]{% <============================================
#1&\parbox[t]{10.8cm}{% <============================================= 12.8cm --> 10.8cm
\textbf{#2}%
\hfill%
#4\vspace{\parsep}%
}\\}

\begin{document}

\begin{aside}
%
\section{contact}
City, State 050022
Country
~
\faPhone~+0 (000) 111 1111 % <==========================================
{\small\faFax}~+0 (000) 111 1112
~
myemail@gmail.com
myweb.wordpress.com
~
\faEnvelopeO ~myemail@gmail.com % <====================================!

\faInbox ~myweb.wordpress.com
\faGithub ~\href{https://github.com/neoben}{github.com/neoben}
\end{aside}
%
\section{skills}
\vspace{-0.2cm}

Skill 1, skill 2, skill 3, skill 4, skill 5.

\section{education}
\begin{entrylist}
%------------------------------------------------
\entry
{2010--2011}
{University}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2004--2009}
{B.Eng. {\normalfont in Engineering Management [Grade]}}
{University}
{(Emphasis in ...)}
%------------------------------------------------
\end{entrylist}

\end{document}


with the new resulting pdf:

Please see that you need to add a blank line between telephone number and fax to get them on separate lines (red arrow marked 1) and see that I deleted the blank in the email address (red arrow marked 2).

At last you will have to play with the values in the redefined commands to get a good layout depending on your personally informations.

A last remark: have you considered to use another template? You have a big blank space on the left. There are IMHO better layouts for cvs available ...

# Update:

I added the code used by @sebastiano in his answer to my mwe to proof if the code is working with friggeri-cv/cv-style. With a little change (see added \hfill to get the text right justified):

\documentclass{cv-style} % friggeri-cv

\usepackage{fontawesome}
\usepackage{mathtools} % <==============================================
\geometry{%
showframe, % <================ only to visualize typing area & margins
left=7cm
}

\renewenvironment{aside}{%
\let\oldsection\section
\renewcommand{\section}[1]{
}
\begin{textblock}{5}(1, 1.87) %
\begin{flushright}
\obeycr
}{%
\restorecr
\end{flushright}
\end{textblock}
\let\section\oldsection
}

\renewcommand{\entry}[4]{%
#1&\parbox[t]{10.8cm}{%
\textbf{#2}%
\hfill%
#4\vspace{\parsep}%
}\\}

% code of @Sebastiano
%%%%%%%%%%%%%%%%%%%%%%%% @egreg macro %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\newenvironment{tsubarray}[1]{%
\vcenter\bgroup
\Let@ \restore@math@cr \default@tag
\baselineskip\fontdimen10 \scriptfont\tw@
\lineskip\thr@@\fontdimen8 \scriptfont\thr@@
\lineskiplimit\lineskip
\check@mathfonts
\ialign\bgroup\ifx c#1\hfil\fi
\normalfont\fontsize\sf@size\z@\selectfont\ignorespaces##\unskip\hfil\crcr
}{%
\crcr\egroup\egroup
}
\makeatother
\newcommand{\tsub}[1]{\begin{tsubarray}{l}#1\end{tsubarray}}

\begin{document}

\begin{aside}
%
\section{contact}
City, State 050022
Country
~
\faPhone~+0 (000) 111 1111

{\small\faFax}~+0 (000) 111 1112
~
myemail@gmail.com
myweb.wordpress.com
~
\faEnvelopeO ~myemail@gmail.com

\faInbox ~myweb.wordpress.com
\faGithub ~\href{https://github.com/neoben}{github.com/neoben}
~
\textcolor{red}{\Large\faEnvelopeO}~$\tsub{\hfill first row \\ second row}$ % <=======================
~
\textcolor{red}{\LARGE\faMapMarker}~$\tsub{\hfill first row \\ second row}$
~
\textcolor{red}{\LARGE\faMapMarker}~$\tsub{Long first row \\\hfill second row}$
\end{aside}
%
\section{skills}
\vspace{-0.2cm}

Skill 1, skill 2, skill 3, skill 4, skill 5.

\section{education}
\begin{entrylist}
%------------------------------------------------
\entry
{2010--2011}
{University}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2004--2009}
{B.Eng. {\normalfont in Engineering Management [Grade]}}
{University}
{(Emphasis in ...)}
%------------------------------------------------
\end{entrylist}

\end{document}


you can compile without error message to this result:

My kind welcome to TeX.SE. A starting point could be to use fontawesome package without images.

EDIT: The best answer is that the very good user @Mensch. I don't know how long the modified code will last but I hope I've responded to some parts of your comment. The code to me compiles correctly without errors. Here I have used a best answer of @egreg at this link: Justification inside Substack

\documentclass[a4paper,12pt]{article}
\usepackage{fontawesome,mathtools}
\usepackage{xcolor}

%%%%%%%%%%%%%%%%%%%%%%%% @egreg macro %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\newenvironment{tsubarray}[1]{%
\vcenter\bgroup
\Let@ \restore@math@cr \default@tag
\baselineskip\fontdimen10 \scriptfont\tw@
\lineskip\thr@@\fontdimen8 \scriptfont\thr@@
\lineskiplimit\lineskip
\check@mathfonts
\ialign\bgroup\ifx c#1\hfil\fi
\normalfont\fontsize\sf@size\z@\selectfont\ignorespaces##\unskip\hfil\crcr
}{%
\crcr\egroup\egroup
}
\makeatother
\newcommand{\tsub}[1]{\begin{tsubarray}{l}#1\end{tsubarray}}

\begin{document}
\textcolor{red}{\Large\faMapMarker}$\tsub{first row \\ second row}$
\vskip .5cm
\textcolor{red}{\LARGE\faMapMarker}$\tsub{first row \\ second row}$
\vskip .5cm
\textcolor{red}{\Huge\faMapMarker}$\tsub{first row \\ second row}$
\vskip .5cm
\textcolor{red}{\Large\faMapMarker}$\tsub{\Large first row \\ \Large second row}$
\vskip .5cm
\textcolor{red}{\LARGE\faMapMarker}$\tsub{\Large first row \\ \LARGE second row}$
\vskip .5cm
\textcolor{red}{\Huge\faMapMarker}$\tsub{\Huge first row \\ \Huge second row}$

\end{document}

• Thank you Sebastiano. mmh... Really I prefer with image, so I can have more choice. But if this can work ok. However I have two problem: first how I could change size of icon and text? I used your line but the text and icon is very small, moreover the rows aren't left align. Second I have a bit of errors with asmath.sty. – Simone May 25 at 17:34
• @Simone Don't worry :-) Before, there wasn't a complete code but an image and I didn't think it was needed for a CV. I'll see if I can make any changes to you now. Then for amsmath I think you either have an outdated version or use mathtools. – Sebastiano May 25 at 20:41

You could use enumitem package to realize lists. The following approach could be of some interest to you.

\documentclass{article}

\usepackage{graphbox}
\usepackage{enumitem}

\begin{document}

\begin{minipage}{.3\textwidth}
\begin{enumerate}[labelsep=5mm]
\item[{\includegraphics[align=c,height=1.5em]{example-image-A}}] some text
\item[{\includegraphics[align=c,height=1.5em]{example-image-B}}] further interesting text
\item[{\includegraphics[align=c,height=1.5em]{example-image-C}}] another description etc. etc.
\end{enumerate}
\end{minipage}

\end{document}

• Sorry but I have a problem when I add the command begin inside aside environment. I have There's no line here to end error. if I can remove this error I can try. – Simone May 25 at 19:22

Thank you for all but your solutions didn't convince me or didn't work. So I have change template with cv-chandan. Then I made some changes for my purpose. This is my (temporaly) result:

I use tabular environment how you can see:

\begin{tabular}{C{0.5cm}  L{5.2cm}}

\newline
other text \\
\\
\vspace{0.05cm}
\includegraphics[scale=0.05]{img/phone.png}\vspace{0.15cm} & +39 000 000
0000
\\
\includegraphics[scale=0.04]{img/calendar.png}\vspace{0.15cm} & Date of
birth: 00/00/0000
\\
\includegraphics[scale=0.04]{img/mail.png}\vspace{0.15cm} &
email@gmail.com
\\
\includegraphics[scale=0.037]{img/location.png}\vspace{0.15cm} &
Nationality: Italian
\end{tabular}


Maybe this isn't clean code but work for me. Thanks again for your time. I will certainly still need help.

• It would have been a good idea to tell us what was not working (including used code and resulting complete error message). Without knowing that we can not help you :-( Where does your new usedclass cv-chandan comes from? What did not convince you? Can you explain in comments for the relevant answers? – Mensch May 27 at 16:34
• I listened to your suggestion. aside is a simple textblock. I see v-chandan on overleaf and its template attracted me. Your solution could be a good solution but with a new template I can use less and more simple code. Yes, my solution isn't a nice solution but work. With my solution also I can use image without problem. When I say your solutions I don't say Kurt's solutions but the all user's solutions. I get error not with your solution but with sebastiano's solution for example. – Simone May 27 at 18:25
• Well, your question was about (you did not tell it but I recognized aside) friggeri-cv. So I answered for that class. Now you added an answer with an class never mentioned in your question, that is not easy to be followed by readers. If you change the class it is better here to ask a new question, explaining the new situation.Then readers can follow given solutions. That other people are able to find answers to their questions, given answers should answer the given question. Your answer to your new used class can not be found by searching for friggeri :-( Please see this is no forum! – Mensch May 27 at 18:39