Here is a minimal working example
%!TEX TS-program = xelatex
\documentclass{article}
%%%%%%%%%%
% Colors %
%%%%%%%%%%
\usepackage{xcolor}
\definecolor{green}{HTML}{C2E15F}
\definecolor{gray}{HTML}{4D4D4D}
%%%%%%%%%
% Fonts %
%%%%%%%%%
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=gray]{Helvetica Neue Light}
%%%%%%%%%%%%%%%%%
% Graphic tools %
%%%%%%%%%%%%%%%%%
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
%%%%%%%%%%
% Header %
%%%%%%%%%%
\begin{tikzpicture} [remember picture,overlay]
\node[](name)[align = left, inner sep = 0] {\fontsize{42pt}{0pt}\selectfont{My Name} \\
\fontsize{20}{5pt}\selectfont{My function}};
\draw (name.north west) -- +(20cm, 0);
\draw (name.south west) -- +(20cm, 0);
\node[](about)[align=left,inner sep=0, right=5.0cm of name.north east, anchor=north west]{%
\fontsize{12pt}{12pt}\selectfont{[email protected]} \\
\fontsize{12pt}{12pt}\selectfont{+45 555 555} \\%
\fontsize{12pt}{12pt}\selectfont{my adress} \\
\fontsize{12pt}{12pt}\selectfont{zipcode City} \\
};
\end{tikzpicture}
\end{document}
gives the following result
I would like the text in the rightmost node to "fill" the node i.e. to be perfectly aligned on the two lines I draw on the picture. Is it possible? Maybe using a minipage? In the same idea, is it possible to force the text to fill the node horizontally so that the text is justified both right and left ?
EDIT: it seems the justified text can be obtained playing with the node options text width, minimum width and justified text. However, those options do not seem to work as soon as a "." characted is entered in the character screen as illustrated by the two following pictures.
The related codes adaptations are the following ones.
\begin{tikzpicture} [remember picture,overlay]
\node[](name)[align = left, inner sep = 0] {\fontsize{42pt}{0pt}\selectfont{My Name} \\
\fontsize{20}{5pt}\selectfont{My function}};
\draw (name.north west) -- +(20cm, 0);
\draw (name.south west) -- +(20cm, 0);
\node[](about)[draw=black, thin, align=left,inner sep=0, right=5.0cm of name.north east, anchor=north west, text width=4cm, minimum width=4cm, text justified]{%
\fontsize{12pt}{12pt}\selectfont{mymail@mailcom}
\fontsize{12pt}{12pt}\selectfont{+45 555 555}
\fontsize{12pt}{12pt}\selectfont{my adress}
\fontsize{12pt}{12pt}\selectfont{zipcode City}
};
\end{tikzpicture}
\begin{tikzpicture} [remember picture,overlay]
\node[](name)[align = left, inner sep = 0] {\fontsize{42pt}{0pt}\selectfont{My Name} \\
\fontsize{20}{5pt}\selectfont{My function}};
\draw (name.north west) -- +(20cm, 0);
\draw (name.south west) -- +(20cm, 0);
\node[](about)[draw=black, thin, align=left,inner sep=0, right=5.0cm of name.north east, anchor=north west, text width=4cm, minimum width=4cm, text justified]{%
\fontsize{12pt}{12pt}\selectfont{[email protected]}
\fontsize{12pt}{12pt}\selectfont{+45 555 555}
\fontsize{12pt}{12pt}\selectfont{my adress}
\fontsize{12pt}{12pt}\selectfont{zipcode City}
};
\end{tikzpicture}
\documentclass
and end width\end{document}
.