0

I'm trying to align the content of two miniboxes. The left one contains an image, the right one a heading, a sub heading, a note and some explanation to it.

I'd like the centre of the graphic to be at the same hight as a "virtual point" between the heading and the sub heading.

I've tried now nearly everything which I could think of but nothing really worked well. Either it's entirely centred vertically within the minibox, above the header or at the point it is now. I also tried to understand the way LaTeX aligns the stuff with the fboxes but that didn't helped me either.

If anyone could help he, I'd be really happy :)

Currently it looks like this:

Problem

And here's my MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{float}
\usepackage[usenames,dvipsnames,table]{xcolor}
\usepackage{blindtext}
\begin{document}

%\fbox{
\begin{minipage}[t][][b]{0.08\linewidth}
\includegraphics[width=1.2cm] {img/mail}
\end{minipage}%                    
%}
%\fbox{
\begin{minipage}[t]{0.84\linewidth}  
\noindent {\color{red}\bfseries\uppercase {Head}} 
\hfill {\color{red}\fontsize{10pt}{12pt}Note}
\par    
\noindent {\color{red}\textit{Subhead}} \par 
\noindent\hangindent=2em\hangafter=0 \small \blindtext % Description
\normalsize \par         
\end{minipage}   
%}
\end{document}

2 Answers 2

1

Is it something like this you want? I played with the parameters of \raisebox:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[showframe]{geometry}
\usepackage{float}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{blindtext}

\begin{document}

\noindent\parbox[t]{0.15\linewidth}
{\raisebox{-0.7\height}{\includegraphics[width=\linewidth] {pepe-le-pew2}}}
\begin{minipage}[t]{0.84\linewidth}
  \noindent {\color{red}\bfseries\uppercase {Head}}
  \hfill {\color{red}\fontsize{10pt}{12pt}Note}
  \par
  \noindent {\color{red}\textit{Subhead}} \par
  \noindent\hangindent=2em\hangafter=0 \small \blindtext % Description
  \normalsize \par
\end{minipage}

\end{document} 

B.t.w., the usenames option for xcolor is deprecated: it's the default now. enter image description here

0
0
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{float}
\usepackage[usenames,dvipsnames,table]{xcolor}
\usepackage{blindtext}
\setlength{\parindent}{0in}
\begin{document}

\parbox{1.2cm}{%
\includegraphics[width=1.2cm]{example-image}
}
%
\parbox{\dimexpr\textwidth-1.2cm}{\par% 
\noindent{\color{red}\textbf{\uppercase{Head}}}
\hfill {\fontsize{10pt}{12pt}\selectfont\color{red}Note} \par    
\noindent{\color{red}\textit{Subhead}} 
}

\addvspace{.7em}
\noindent\hangindent=\dimexpr2em+1.2cm\hangafter=0 \small \blindtext % Description
\normalsize \par          

\end{document}

enter image description here

4
  • Well somehow yes but I need to maintain the rest of the structure Nov 26, 2016 at 22:19
  • @FriendlyGuy - What is the structure you want to maintain?
    – AboAmmar
    Nov 26, 2016 at 22:22
  • The way the head, subhead, note and the text are indented Nov 26, 2016 at 22:27
  • You have to indent the paragraph text 1.2cm+2em. By the way, if you put the text in a minipage, it won't allow page breaks. Nov 26, 2016 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .