我正在使用 Overleaf 的一个模板,该模板旨在将图片放在最后一页,并在文本中提供描述。我删除了浮动包以便在文本中显示图片,但之后图片不再显示。这是我的代码
\documentclass[12pt,a4paper,twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}
\graphicspath{ {./images/} }
\makeatletter\if@twocolumn\PassOptionsToPackage{switch}{lineno}\else\fi\makeatother
\usepackage{wrapfig}
\usepackage{hyperref}
\usepackage{amsfonts,amssymb,amsbsy,latexsym,tabulary,times,xcolor}
\usepackage[T1]{fontenc}
\usepackage{url,multirow,cancel,tfrupee,multicol}
\makeatletter
\usepackage{float}
\AtBeginDocument{\@ifpackageloaded{textcomp}{}{\usepackage{textcomp}}}
\makeatother
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{pifont}
\usepackage[nointegrals]{wasysym}
\usepackage[superscript,biblabel]{cite}
\urlstyle{rm}
\makeatletter
%Etal definition in references
\@ifundefined{etal}{\def\etal{\textit{et~al}}}{}
\AtBeginDocument{
\expandafter\ifx\csname eqalign\endcsname\relax
\def\eqalign#1{\null\vcenter{\def\\{\cr}\openup\jot\m@th
\ialign{\strut$\displaystyle{##}$\hfil&$\displaystyle{{}##}$\hfil
\crcr#1\crcr}}\,}
\fi
}
\@ifundefined{tsGraphicsScaleX}{\gdef\tsGraphicsScaleX{1}}{}
\@ifundefined{tsGraphicsScaleY}{\gdef\tsGraphicsScaleY{.9}}{}
% To automatically resize figures to fit inside the text area
\def\checkGraphicsWidth{\ifdim\Gin@nat@width>\linewidth
\tsGraphicsScaleX\linewidth\else\Gin@nat@width\fi}
\def\checkGraphicsHeight{\ifdim\Gin@nat@height>.9\textheight
\tsGraphicsScaleY\textheight\else\Gin@nat@height\fi}
\def\fixFloatSize#1{}%\@ifundefined{processdelayedfloats}{\setbox0=\hbox{\includegraphics{#1}}\ifnum\wd0<\columnwidth\relax\renewenvironment{figure*}{\begin{figure}}{\end{figure}}\fi}{}}
\let\ts@includegraphics\includegraphics
\def\inlinegraphic[#1]#2{{\edef\@tempa{#1}\edef\baseline@shift{\ifx\@tempa\@empty0\else#1\fi}\edef\tempZ{\the\numexpr(\numexpr(\baseline@shift*\f@size/100))}\protect\raisebox{\tempZ pt}{\ts@includegraphics{#2}}}}
%\renewcommand{\includegraphics}[1]{\ts@includegraphics[width=\checkGraphicsWidth]{#1}}
\AtBeginDocument{\def\includegraphics{\@ifnextchar[{\ts@includegraphics}{\ts@includegraphics[width=\checkGraphicsWidth,height=\checkGraphicsHeight,keepaspectratio]}}}
\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
\def\URL#1#2{\@ifundefined{href}{#2}{\href{#1}{#2}}}
\edef\fntEncoding{\f@encoding}
\def\EUoneEnc{EU1}
\makeatother
\def\floatpagefraction{0.8}
\def\dblfloatpagefraction{0.8}
\def\style#1#2{#2}
\def\xxxguillemotleft{\fontencoding{T1}\selectfont\guillemotleft}
\def\xxxguillemotright{\fontencoding{T1}\selectfont\guillemotright}
\newif\ifmultipleabstract\multipleabstractfalse%
\newenvironment{typesetAbstractGroup}{}{}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[hmargin=1.8cm,vmargin=2.2cm]{geometry}%,headsep=0.3in,footskip=0.49in
\setlength{\columnsep}{0.25in}
\setlength\headheight{19.5pt}
\makeatletter
\def\author#1{\gdef\@author{\hskip-\dimexpr(\tabcolsep)\hskip1pt\parbox{\dimexpr\textwidth-1pt}{\centering #1}}}
\let\@articletype\@empty \def\articletype#1{\gdef\@articletype{{\fontsize{14}{16}\selectfont #1}}}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{headings}{\fancyhf{}\fancyhead[RE]{\MakeTextUppercase{\textbf{\RunningAuthor}}}\fancyhead[LE]{\textbf{\thepage}}\fancyhead[LO]{\MakeTextUppercase{\textbf{\RunningHead}}}\fancyhead[RO]{\textbf{\thepage}}}\pagestyle{headings}
\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\textbf{\thepage}}}
\AtBeginDocument{\usepackage{lastpage}}
\def\title#1{%
\gdef\@title{%
% {\vspace*{-42pt}\raggedright\fontsize{10}{12}\selectfont\textbf{\MakeTextUppercase{\journalTitle}}\\%
% \textbf{Volume xx, Number x, \the\year}\\%
% \textbf{Mary Ann Liebert, Inc.}\\%
% \textbf{Pp. 1--\pageref{LastPage}}\\%
% \textbf{DOI: 10.1089/xxx.xxxx.xxxx}\\}%
\ifx\@articletype\@empty\else\@articletype~\\\fi%
#1}%
}
\usepackage{abstract}
\def\abstractname{\textbf{Abstract}}
\renewenvironment{onecolabstract}
{\vspace*{-.4pc}\trivlist\item[]\leftskip1pt\noindent\selectfont\hfill\abstractname\hfill\mbox{\null}\par\ignorespaces}{\endtrivlist}
\def\NormalBaseline{\def\baselinestretch{1.1}}
\usepackage{textcase}
\usepackage[explicit]{titlesec}
\setcounter{secnumdepth}{5}
\titleformat{\section}[block]{\NormalBaseline\boldmath\bfseries}
{\thesection.}
{6pt}
{#1}
[]
\titleformat{\subsection}[hang]{\NormalBaseline\filright\itshape}
{\thesubsection.}
{6pt}
{#1}
[]
\titleformat{\subsubsection}[runin]{\NormalBaseline\filright\itshape}
{\hspace{16pt}\thesubsubsection}
{6pt}
{#1}
[]
\titleformat{\paragraph}[runin]{\NormalBaseline}
{\theparagraph}
{6pt}
{#1}
[]
\titleformat{\subparagraph}[runin]{\NormalBaseline}
{\thesubparagraph}
{6pt}
{#1}
[]
\titlespacing{\section}{0pt}{1.5\baselineskip}{.2\baselineskip}
\titlespacing{\subsection}{0pt}{1.5\baselineskip}{.2\baselineskip}
\titlespacing{\subsubsection}{0pt}{1.5\baselineskip}{.2\baselineskip}
\titlespacing{\paragraph}{0pt}{.5\baselineskip}{10pt}
\titlespacing{\subparagraph}{0pt}{.5\baselineskip}{10pt}
\usepackage{caption}
\DeclareCaptionLabelFormat{figlabel}{Figure #2}
\captionsetup[figure]{font={footnotesize},labelfont={bf},labelformat=figlabel,skip=1.4pt,aboveskip=1pc,labelsep=period,justification=centering}
\captionsetup[table]{font={footnotesize},skip=1.4pt,labelsep=period,justification=centering}
\date{}
\makeatother
% \usepackage[authoryear]{natbib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Document content starts below
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\title{Causality Principle and the Road Toward Universal Theory}
\def\RunningHead{
Preparation of papers short title
}
\def\RunningAuthor{Albustanji}
\author{Abd Almonaem Albustanji}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\begin{onecolabstract}
Here the abstract
%%\def\keywordstitle{Keywords}
%%\smallskip\noindent\textbf{Keywords: }{\normalfont
%%Keyword1, Keyword2, Keyword3}
\end{onecolabstract}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{multicols}{2}
\section{Introduction}
The geometrical structure of the special theory of relativity was formulated by Minkowski after the Einsteinian physical interpretation of Lorentz transformations rather than the Lorentzian interpretation, which is an abstract mathematical necessity, and it is actually a necessity to guarantee the invariance or at least the covariance of the laws of physics in Newtonian frames of reference, this principle is usually called \textit{the Galilean invariance\;/\; covariance principle}. Einstein's idea was centered on considering parameters $(t,t')$ in Lorentz transformations as a time parameter each for two different inertial observers, which was done by embracing the idea of relative time. He supported his assumptions using Maxwellian theory in electromagnetism, and by considering his claim, he destroyed one of the basic principles in classical mechanics, which is \textit{the absoluteness of time}. Einstein by his assumptions redefined the classical picture of space and time, which can be seen by considering the following gedankenexperiment.
\begin{figure}
\centering
\includegraphics[width=.5\textwidth]{1.png}
\label{Einstein's gedankenexperiment.}
\end{figure}
\end{document}
有什么帮助吗?