实际上我编写了一个代码,并且我想在(下面的)简介中制作我的图形。
但结果是这样的: 我怎样才能制作简介中的图表?(在 1.简介下方)
\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
答案1
你要这个:
\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}
另外,下次请尝试提供一个适当的最小工作示例