0

I'm trying to make a figure that essentially consists of multiple rows of linear combinations of images. In particular, I was hoping to create multiple rows of something that looks like

image_1 + image_2 = image_3 + image_4

and in other cases, multiple rows of something that looks like

2*image_1 = image_2 + image_3

I've been successful in using tikz to make these images, but it takes forever because the pictures are not all necessarily the same size and shape and I have to do a lot of adjusting to make everything is properly aligned and spaced. I was hoping to get some help with defining my own environment or creating some kind of setup I can use in general, as I'm hoping to make quite a few figures like this. I'm essentially hoping it will behave similar to the align* or gather* environments.

Some information about the setup of my document: The images I'm planning to use are tikz pictures and tableaux. Each image is in it's own file and I've been using the standalone package and \input to put them in my main document. I was hoping to use these within the figure environment so that they are consistent with the rest of my figures. Thanks for the help!

2
  • 4
    Welcome to TeX.SE. Could you include the code you use to make your images? That will go a long way toward helping us understand what you're wanting to do.
    – Teepeemm
    Mar 28, 2023 at 19:31
  • If you are using tikz to make the pictures, you can use [baseline=(name)] or [baseline={(x,y)}] to align specific locations in the images. Thr base anchor of a node containing text is probably what you want. Mar 29, 2023 at 2:30

1 Answer 1

3

Something like this?

\documentclass{article}
\usepackage{amsmath}
\usepackage[a4paper]{geometry}

\usepackage{graphicx}
\usepackage[export]{adjustbox}

\usepackage{duckuments}% for the images

\begin{document}

\begin{equation}
\includegraphics[height=1.5cm,valign=c]{example-image-duck}+
\includegraphics[height=1.5cm,valign=c]{example-image-duck}=
\includegraphics[height=1.5cm,valign=c]{example-image-duck}+\includegraphics[height=1.5cm,valign=c]{example-image-duck}
\end{equation}

\begin{equation}
2\times 
\includegraphics[height=1.5cm,valign=c]{example-image-duck}=\includegraphics[height=1.5cm,valign=c]{example-image-duck}+\includegraphics[height=1.5cm,valign=c]{example-image-duck}
\end{equation}

\end{document}

enter image description here

2
  • 1
    I suppose this would work, I was hoping it would be within the figure environment but there are ways around that I think. Thanks for the help!
    – EvieAyan
    Mar 29, 2023 at 19:26
  • @EvieAyan My code work perfectly. I not understood "I was hoping it would be within the figure environment". Please, can you give me an example? Do my code corresponds to your requests?
    – Sebastiano
    Mar 29, 2023 at 19:33

You must log in to answer this question.

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