How do I put a text inside a figure without pushing the figure away? For example, this is what I get. I tried searching for a parameter for it but could not find any. For example \node[label,do_not_push_figure=True] at (0,0) {\footnotsize{some text}};
\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{float}
\usepackage{subfig}
\usepackage{tikz}% loads graphicx
\begin{document}
\makeatletter
\newcommand{\definetrim}[2]{%
\define@key{Gin}{#1}[]{\setkeys{Gin}{trim=#2,clip}}%
}
\makeatother
\definetrim{kit_mocap}{0 0 0 0} % {left bottom right top}
\def\barheight{0.015}
\def\imagewidth{0.12\textwidth}
\def\imagehspace{\hspace{-0.2em}}
\def\imagevspace{\vspace{-0.3cm}}
\setlength{\fboxrule}{1pt}
\setlength{\fboxsep}{0pt}
\def\vsep{3.0} % vertical distance between figures
\def\lsep{0.1} % label distance (you can define different x and y distance)
\begin{figure*}[ht]
\centering
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]
{example-image-a}};
\node[draw] at (0,0) {\footnotsize{some text}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagehspace
\subfloat{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=\imagewidth,kit_mocap,clip]{example-image-a}};
\end{tikzpicture}}\imagevspace
\end{figure*}
\end{document}
But I would like it to be like below.


\tikzset{every picture/.append style={baseline=(image.base)}}at the start of yourfigureenvironment. This will “push” the second line lower. Addoverlayto the node withsome textso that it will be ignored when PGF/TikZ determines the size of the diagram, though this might lead to unwanted side effects. – Qrrbrbirlbel Apr 27 '23 at 00:00