%导言区插入下面三行
\usepackage{graphicx}
\usepackage{float}
\usepackage{subfigure}
\begin{document}
Figure \ref{Fig.main} has two sub figures, fig. \ref{Fig.sub.1} is the travel demand of driving auto, and fig. \ref{Fig.sub.2} is the travel demand of park-and-ride.
\begin{figure}[H]
\centering %图片全局居中
\subfigure[name1]{
\label{Fig.sub.1}
\includegraphics[width=0.45\textwidth]{DV_demand}}
\subfigure[name2]{
\label{Fig.sub.2}
\includegraphics[width=0.45\textwidth]{P+R_demand}}
\caption{Main name}
\label{Fig.main}
\end{figure}
\end{document}
编译完成后的效果:
3.多图横排+自定义编号
%导言区的此三行无变化
\usepackage{graphicx}
\usepackage{float}
\usepackage{subfigure}
%以下是新增的自定义格式更改
\usepackage[]{caption2} %新增调用的宏包
\renewcommand{\figurename}{Fig.} %重定义编号前缀词
\renewcommand{\captionlabeldelim}{.~} %重定义分隔符
%\roman是罗马数字编号,\alph是默认的字母编号,\arabic是阿拉伯数字编号,可按需替换下一行的相应位置
\renewcommand{\thesubfigure}{(\roman{subfigure})}%此外,还可设置图编号显示格式,加括号或者不加括号
\makeatletter \renewcommand{\@thesubfigure}{\thesubfigure \space}%子图编号与名称的间隔设置
\renewcommand{\p@subfigure}{} \makeatother
\begin{document}
%注意:此段中在引用中增加了主图编号的引用
Figure \ref{Fig.main} has two sub-figures, fig. \ref{Fig.main}\ref{Fig.sub.1} is the travel demand of driving auto, and fig. \ref{Fig.main}\ref{Fig.sub.2} is the travel demand of park-and-ride.
%以下code与上一小结的无变化
\begin{figure}[H]
\centering %图片全局居中
\subfigure[name1]{
\label{Fig.sub.1}
\includegraphics[width=0.45\textwidth]{DV_demand}}
\subfigure[name2]{
\label{Fig.sub.2}
\includegraphics[width=0.45\textwidth]{P+R_demand}}
\caption{Main name}
\label{Fig.main}
\end{figure}
\end{document}
%导言区需要新增的宏包
\usepackage{enumerate} %列举宏包
%正文部分的代码
% 无编号,但公式符号可以对齐的做法,example1
\begin{enumerate}[align=right]
\setlength{\leftmargin}{2em} %左边界
\setlength{\parsep}{0ex} %段落间距
\setlength{\topsep}{0ex} %列表到上下文的垂直距离
\setlength{\itemsep}{0ex} %条目间距
\setlength{\labelsep}{1em} %标号和列表项之间的距离,默认0.5em
\setlength{\itemindent}{0em} %标签缩进量
\setlength{\listparindent}{0em} %段落缩进量
\item [ $c_1$] the constant travel time of driving (auto), unit: minutes per time;
\item [$c_2$] the constant travel time of taking MRT, unit: minutes per time;
\item [$\tau_1$] the unit fixed cost of driving for a traveler, unit: yuan per person per time;
\item [$\tau_2$] one-way fare of MRT for a traveler, unit: yuan per person per time;
\item [$\varsigma_1$] the unit operation cost of highway for the traffic manager, unit: yuan per person per time;
\end{enumerate}
%有编号的一般做法, example2
With numbers as below in example1:
\begin{itemize}
\item document style
\item baselineskip
\item front matter
\item keywords and MSC codes
\item theorems, definitions and proofs
\item lables of enumerations
\item citation style and labeling.
\end{itemize}
%有编号的一般做法,example 3
With numbers as below in example2:
\begin{enumerate}[(1)]
\item Group the authors per affiliation.
\item Use footnotes to indicate the affiliations.
\end{enumerate}