0

I'd like to mimic the following style: having an image of an author next to a textbox of the same height.

tex-example

However, my attempt is humorously unsettling:

enter image description here

It appears that the aspect-ratio of my face has changed, and it is one-line offset from the textbox, dipping down into the abstract line. Here, I'm attempting to scale the image to the height of the textbox, but I'd actually like to scale the textbox to have the height of the image (without changing the aspect ratio):

\noindent\fbox{%
    \parbox{\textwidth}{%
        \begin{wrapfigure}{r}{0.2\textwidth}
            \begin{center}
                \includegraphics[width=0.18\textwidth]{boylan.jpg}
            \end{center}
        \end{wrapfigure}
        \textbf{Lyam K. Boylan} is an undergraduate student studying physics and pure mathematics at the 
University of Victoria with primary interests in the set theoretic foundations of the universe. 
    }%
}

2 Answers 2

3

With use of valign instruction defined in the adjustbox package, and text and image inserted in tabularx:

enter image description here

\documentclass{article}
\usepackage[export]{adjustbox}  % it load  graphicx too
\usepackage{tabularx}


\begin{document}
\noindent\begin{tabularx}{\linewidth}{ |X|c @{} }
    \cline{1-1}
\textbf{Lyam K. Boylan} is an undergraduate student studying physics and pure mathematics at the \emph{}University of Victoria with primary interests in the set theoretic foundations of the universe.
    &   \includegraphics[width=0.2\linewidth,valign=t]{example-image-a}  \\
    \cline{1-1}
\end{tabularx}  \\
\begin{tabularx}{\linewidth}{@{} c|X| }
    \cline{2-2}
\includegraphics[width=0.2\linewidth,valign=t]{example-image-b}  
    &   \textbf{Lyam K. Boylan} is an undergraduate student studying physics and pure mathematics at the \emph{}University of Victoria with primary interests in the set theoretic foundations of the universe.\\   
    \cline{2-2}
\end{tabularx}
\end{document}
1
  • This method ended up working out the best for me. Thank you!
    – Graviton
    Mar 29, 2021 at 23:12
1

One posibility: \raisebox

\documentclass{article}
\usepackage{graphicx}
\usepackage{wrapfig}


\begin{document}
    
    \noindent\fbox{%
        \parbox{\textwidth}{%
            \begin{wrapfigure}[4]{r}{0.3\textwidth}
                
                    \raisebox{-11mm}[0pt][0pt]{ \includegraphics[width=0.18\textwidth]{example-image}}
            
            \end{wrapfigure}
            \textbf{Lyam K. Boylan} is an undergraduate student studying physics and pure mathematics at the 
            University of Victoria with primary interests in the set theoretic foundations of the universe. 
        }%
    }

    
\end{document}

enter image description here

You must log in to answer this question.

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