¿Cómo puedo mover una figura "en una sección"?

¿Cómo puedo mover una figura "en una sección"?

De hecho, hice un código y quiero hacer mis figuras en (a continuación) Introducción.

Pero los resultados son así: ingrese la descripción de la imagen aquí ¿Cómo puedo hacer la figura de Introducción? (Debajo de la 1.Introducción)

\documentclass[12pt]{article}
%\usepackage[left=40mm,right=40mm,top=40mm,bottom=40mm,a4paper]{geometry}

\usepackage{amsfonts,amsmath,amssymb,amsthm,kotex}

\usepackage{graphicx}
\usepackage{times}  
\usepackage{bm}
\usepackage{amsbsy} 
\usepackage{indentfirst}
\usepackage[all]{xy}
\usepackage{curve2e}
\usepackage[onehalfspacing]{setspace}
\usepackage{setspace}
\setstretch{1.6}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{multirow}

\counterwithin{equation}{section}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}







\renewcommand\refname{\centerline{References}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}}
\renewcommand\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}

\begin{document}



\newtheorem{thm}{Theorem}
\numberwithin{thm}{section}
\newtheorem{cor}{Corollary}
\numberwithin{cor}{section}
\newtheorem{lem}{Lemma}
\numberwithin{lem}{section}
\newtheorem{prop}{Proposition}
\numberwithin{prop}{section}

\theoremstyle{definition}
\newtheorem{de}{Definition}
\numberwithin{de}{section}

\newtheorem{ex}{Example}
\numberwithin{ex}{section}

\newtheorem*{rmk}{Remark}


\setlength{\paperwidth}{40mm}
\setlength{\paperheight}{40mm}

Why



\section{Introduction}

\begin{figure}
\centering
\begin{subfigure}{0.4\textwidth}
    \includegraphics[width=\textwidth]{4.jpg}
    \label{fig:first}
\end{subfigure}
\hfill
\begin{subfigure}{0.4\textwidth}
    \includegraphics[width=\textwidth]{5.jpg}
    
    \label{fig:second}
\end{subfigure}

\caption{Canonical forms are the same.}
\label{fig:figures}
\end{figure}



Come on

Respuesta1

Tu quieres esto:

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{float}

\begin{document}
    Why
    
    \section{Introduction}
    
    \begin{figure}[H]
        \centering
        \begin{subfigure}{0.4\textwidth}
            \includegraphics[width=\textwidth]{example-image-a}
            \label{fig:first}
        \end{subfigure}
        \hfill
        \begin{subfigure}{0.4\textwidth}
            \includegraphics[width=\textwidth]{example-image-b}
            \label{fig:second}
        \end{subfigure}
        
        \caption{Canonical forms are the same.}
        \label{fig:figures}
    \end{figure}
    
    Come on
\end{document}

Además, intente proporcionar un ejemplo de trabajo mínimo adecuado la próxima vez.

información relacionada