How to put "+" symbol and "=" inbetween the images in latex - latex

I have three images, I want to put plus symbol between two images, and then equals to. Just like below
Image A + Image B = Image C
I am not able to produce this view in latex.
The reference code is
\begin{document}
\begin{figure}[h!]
\centering
%\captionsetup[subfigure]{labelformat=empty}
\subfigure[Image A]{\includegraphics[width=30mm, height=30mm {templates/image_A.png}}
\quad
%\hspace{5mm}
\subfigure[Image B]{\includegraphics[width=30mm, height=30mm]{templates/image_B.png}}
\hspace{2mm}
\newsubfloat{$=$}
\subfigure[Image C]{\includegraphics[width=30mm, height=30mm]{templates/Image_C.png}}
\caption{Exampleigures}
\end{figure}
\end{document}
And please also tell how to remove (a),(b),(c) from the subfigures. I have seen related examples but not able to produce this.
Any help will be appreciated. Thank you.

The easiest way to remove the subcaption letters is to not use subfigures, they are not necessary for your case.
\documentclass{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{tabular}{ccccc}
\includegraphics[width=30mm,valign=c]{example-image-duck}&
+&
\includegraphics[width=30mm,valign=c]{example-image-duck}&
=&
\includegraphics[width=30mm,valign=c]{example-image-duck}\\[6ex]
Image A && Image B && Image C\\
\end{tabular}
\caption{Multi-focus image fusion}
\end{figure}
\end{document}

Related

How to define the actual column width in two-column Latex document (excluding the space between the columns)?

I would like to redefine \columnwidth and set it to the value corresponding to (\textwidth-\columnsep)/2.
This is because I would like to use this redefined command inside tabular environment for controlling column width.
The problem with \columnwidth is that it disregards the space between columns, therefore it doesn't do the job.
Here's what I'm talking about. The following code compiles but gives an undesirable output.
\documentclass[twocolumn]{article}
\usepackage{lipsum}
\setlength{\columnsep}{2cm}
\newcommand\testcolwidth{(\textwidth-\columnsep)/2}
\begin{document}
\lipsum
\begin{table}[!h]
\begin{tabular}{p{.25\columnwidth}|p{.75\columnwidth}}
\hline
col 1 & col 2
\end{tabular}
\end{table}
\lipsum
\end{document}
This is what the output look like. It's undesirable because I don't want this line (and the table) to stretch into the space between the columns.
I have tried to define column width with the following line:
\newcommand\testcolwidth{(\textwidth-\columnsep)/2}
It results in an error when using \testcolwidth in place of \columnwidth. The error reads: Illegal unit of measure (pt inserted)
Any help? Thanks a lot.
The columnwidth already takes into account the space between the columns of the article, what is missing in your code is the tabcolsep which defines the space between the table columns. In your example, this space gets added four times, once at the front, once at the end and once on each site of the |. If you want to manually define your table like this, you need to know in advance how many columns it will have:
\documentclass[twocolumn]{article}
\usepackage{lipsum}
\setlength{\columnsep}{2cm}
\newcommand\testcolwidth{\dimexpr\columnwidth-4\tabcolsep}
\begin{document}
\lipsum
\begin{table}[!h]
\begin{tabular}{p{.25\testcolwidth}|p{.75\testcolwidth}}
\hline
col 1 & col 2
\end{tabular}
\end{table}
\lipsum
\end{document}
Much easier to let a package like tabularray do the job for you:
\documentclass[twocolumn]{article}
\usepackage{tabularray}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\begin{table}[!h]
\begin{tblr}{
colspec={X[1]|X[3]}
}
\hline
col 1 & col 2
\end{tblr}
\end{table}
\lipsum[2]
\end{document}

Using itemize inside of equations

I want to use an item list inside of an equation, so the whole list only gets referenced as a whole equation.
If I just use itemize and put my equations in each of the items I will get a reference for each of the equations instead of all of them. Think of it as you wanted to write down some properties of some function and want to reference the properties in general.
The following examples are not working like they should:
\begin{document}
\begin{itemize}
\item[(i)] $Bla$
\item[(ii)] $Bla bla$
\item[(iii)] $Bla bla bla$
\end{itemize}
\end{document}
Theres just no reference at all.
\begin{document}
\begin{equation}
\begin{itemize}
\item equation1
\item euqation2
\end{itemize}
\end{equation}
\end{document}
This just gives an error, because itemize is used inside an equation.
Hope someone can help with that.
Based on https://tex.stackexchange.com/a/225100 you could something like this:
\documentclass{article}
\usepackage{mathtools}
\newcounter{mysubequations}
\renewcommand{\themysubequations}{(\roman{mysubequations})}
\newcommand{\mysubnumber}{\refstepcounter{mysubequations}\themysubequations}
\begin{document}
\begin{equation}
\begin{aligned}\setcounter{mysubequations}{0}
\mysubnumber\quad &equation1\\
\mysubnumber\quad &equation2\\
\mysubnumber\quad &equation3\\
\end{aligned}
\label{key}
\end{equation}
\ref{key}
\end{document}

Refering with type and not only number

when I want to refer to for example an equation, I do the following:
\begin{align}
R= \frac{c * \Delta T}{2}
\label{eqn:Range}
\end{align}
Now I want to refer to \ref{eqn:Range}.
Then the output is the following:
Now I want to refer to 3.4.
I would like that the output is already:
Now I want to refer to equation 3.4.
Without me having to write equation manually.
The same goes also for tables and figures.
Especially for figures, I would like to know if there are more possibilities to display the reference.
For example with the following:
\begin{figure}[t]
\centering
\includegraphics[width=0.7\textwidth]{Example}
\caption{Example caption}
\label{fig:ExampleRef}
\end{figure}{}
I would like to be able to get also the caption displayed: Figure 1.1: Example caption.
Thank you for your help.
This sounds like a job for the cleveref package:
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[noabbrev]{cleveref}
\begin{document}
\begin{align}
R= \frac{c * \Delta T}{2}
\label{eqn:Range}
\end{align}
Now I want to refer to \cref{eqn:Range}.
\begin{figure}[t]
\centering
\includegraphics[width=0.7\textwidth]{example-image-duck}
\caption{Example caption}
\label{fig:ExampleRef}
\end{figure}
\cref{fig:ExampleRef}
\end{document}

LATEX skips numbers in numbering when putting several figures in the same figure environment

Here are the package I am using:
\documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb,superscriptaddress]{revtex4}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{subcaption}
\usepackage{SIunits}
\captionsetup{justification=raggedright, singlelinecheck=false}
\bibliographystyle{approve}
In order to put two figures next to each other, using the full width of the page even with the twocolumn option, I use this syntax:
\begin{figure*}
\centering
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[width=\textwidth]{mfploglog_A.eps}
\end{subfigure}%
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[width=\textwidth]{mfploglog.eps}
\end{subfigure}
\caption{XXX}\protect\label{Eloglog}
\end{figure*}
The probleme is that using this the numbering is incorrect. For each figure, a number is skipped as if the subfigure environment was counting as one figure. For example if I put just this figure in my code, it is going to be labeled as figure number 2.
Does someone already encountered this kind of problem ?
Don't use the caption package (or subcaption) with revtex4-1. You'll note in the .log that there are compatibility issues between the package and the class. Instead, place the two images side-by-side in the same figure* without using a subfigure environment:
\documentclass[twocolumn,showpacs,preprintnumbers]{revtex4-1}
\usepackage{graphicx}
\begin{document}
\begin{figure*}
\centering
\includegraphics[width=.3333\linewidth]{example-image-a} \qquad
\includegraphics[width=.3333\linewidth]{example-image-b}
\caption{XXX}
\end{figure*}
\end{document}
If you wish to add captions to the sub-figures, set the construction inside a tabular and enumerate them manually:
\documentclass[twocolumn,showpacs,preprintnumbers]{revtex4-1}
\usepackage{graphicx}
\begin{document}
\begin{figure*}
\centering
\begin{tabular}{c #{\qquad} c }
\includegraphics[width=.3333\linewidth]{example-image-a} &
\includegraphics[width=.3333\linewidth]{example-image-b} \\
\small (a) Left & \small (b) Right
\end{tabular}
\caption{XXX}
\end{figure*}
\end{document}

Rotate a page 180 degrees in LaTeX

How can I rotate a page 180 degrees in LaTeX?
\usepackage{lscape}
\begin{landscape}
Some text
\end{landscape}
Or for the whole document:
\documentclass[landscape]{article}
Edit: This would of course only rotate the page by 90°... Sorry. ;)
Have you tried the rotating package?
See http://en.wikibooks.org/wiki/LaTeX/Packages/Rotating
This would rotate the content you put between begin and end. Do you need a designated page to be rotated you can achieve it using \newpage and \clearpage.:
To answer your question in the comments, I don't know how to achieve this within one single environment if you are going to use different types of content (text, images...) within the turn environment. That depends a lot on what you exactly want to achieve.
\documentclass{article}
\usepackage{rotating}
\title{Test document}
\author{Wesho}
\date{18/06/2009}
\begin{document}
\maketitle
\newpage
\begin{rotate}{180}
\includegraphics{graphic.pdf}
\end{rotate}
\clearpage
\end{document}
It depends on the task, but \rotatebox{180} together with \minipage can do the job:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{rotating}
\usepackage{lipsum}
\begin{document}
\lipsum[1-3]
\newpage
\noindent\rotatebox{180}{\noindent\begin{minipage}{\textwidth}
\lipsum[1]
\begin{center}\includegraphics{image01.jpg}\end{center}
\lipsum[2]
\begin{center}
\begin{tabular}{cc}
\hline
1 & 2 \\
3 & 4 \\
\hline
\end{tabular}
\end{center}
\lipsum[3]
\end{minipage}}
\clearpage
\lipsum[1-3]
\end{document}

Resources