# New Command for placing 2 figures next to each other

Is it possible to code a new command, which use the path of 2 figures with \includegraphics, and positions them next to each other and generates a box around them? One figure should be titled as "False" and the other one as "Correct". I'm using these to improve my script at university and would like to automate this procedure.

There are many ways of doing it, and many ways to interpret your specification. The following solution should at least help to say more precisely what you want to have differently.

\documentclass{article}
\usepackage{graphicx}
\newcommand\twofigures[2]{%
\fbox{%
\begin{tabular}{@{}cc@{}}
\includegraphics[width=0.45\textwidth]{#1}
& \includegraphics[width=0.45\textwidth]{#2}\\
False & Correct
\end{tabular}%
}%
}
\begin{document}
\twofigures{example-image-a}{example-image-b}
\end{document}


I'd like to use minipage environment to handle this.

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\newcommand{\TFfigures}[2]{
\fbox{
\begin{minipage}{.45\textwidth}
\includegraphics[width=\textwidth]{#1}
\captionof{figure}{False}
\end{minipage}
\begin{minipage}{.45\textwidth}
\includegraphics[width=\textwidth]{#2}
\captionof{figure}{Correct}
\end{minipage}
}
}
\begin{document}
\TFfigures{example-image-a}{example-image-b}
\end{document}


which will give

If you don't want the "Figure 1", we can have a small change: use \captionof* instead of \captionof:

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\newcommand{\TFfigures}[2]{
\fbox{
\begin{minipage}{.45\textwidth}
\includegraphics[width=\textwidth]{#1}
\captionof*{figure}{False}
\end{minipage}
\begin{minipage}{.45\textwidth}
\includegraphics[width=\textwidth]{#2}
\captionof*{figure}{Correct}
\end{minipage}
}
}
\begin{document}
\TFfigures{example-image-a}{example-image-b}
\end{document}