2

I want to make a figure that contains 2 images and text as presented in the following figure with two images A and B :

enter image description here

I work with Overleaf so the two images are in pdf format.

This is where I am (the result is far from what I expect), and I don't understand why the two images are framed with this code:

\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage[utf8] {inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{geometry,afterpage}
\geometry{height=9.8in,width=6.9in}
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{graphics/}}
\usepackage{float}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}

\begin{document}
\begin{figure*}[h]
\fbox{\includegraphics[width=\linewidth]{Prelude_1-5_sys1.pdf}}\\
\hfill
\fbox{\includegraphics[width=0.75\linewidth]{Prelude_1-5_sys2.pdf}
\noindent
\textbf{$\xrightarrow{\makebox[0.5cm]{}}$Conséquent sur Pédale de dominante en \textit{la} majeur}
}
\end{document}

Who can help me to do this figure ? Thank you !

2

2 Answers 2

1

I'd suggest the following approach using tabularx to place image, arrow and text side by side and vertically centered:

enter image description here

\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage[utf8] {inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{geometry,afterpage}
\geometry{height=9.8in,width=6.9in}
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{graphics/}}
\usepackage{float}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}
\usepackage{tabularx}
\usepackage[export]{adjustbox}

\begin{document}
\begin{figure*}[h]
\renewcommand\tabularxcolumn[1]{m{#1}}
\includegraphics[width=\linewidth]{Prelude_1-5_sys1.pdf}\\
\begin{tabularx}{\textwidth}{@{}llX@{}}
\includegraphics[width=0.75\linewidth,valign=c]{Prelude_1-5_sys2.pdf}
&
$\xrightarrow{\makebox[0.5cm]{}}$
&\textbf{Conséquent sur Pédale de dominante en \textit{la} majeur}\\
\end{tabularx}
\end{figure*}
\end{document}
1

I copied the pictures from your questions, so the alignment is not perfect, but the code gives you the idea.

\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage[utf8] {inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{amsmath}

\geometry{height=9.8in,width=6.9in}

\begin{document}

\begin{figure*}[htp]

\includegraphics[width=\textwidth]{sys1}\\[1ex]
\includegraphics[width=0.75\textwidth]{sys2}\hfill
\raisebox{18ex}{$\xrightarrow{\hspace{0.5cm}}$}\hfill
\raisebox{18ex}{%
  \small\bfseries
  \begin{tabular}{@{}l@{}}
  Conséquent sur \\ Pédale de dominante \\ en \textit{la} majeur
  \end{tabular}%
}

\end{figure*}

\end{document}

Adjust the amount of raising until it satisfies you.

enter image description here

You must log in to answer this question.

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