我的图形被强制放到文本末尾,我该怎么办?

我的图形被强制放到文本末尾,我该怎么办?

我愿意把我的大身影放在文字的最前面。

但是当我运行代码时,图形被强制放到后面。

如下图所示:

在此处输入图片描述

以下是代码:

    \documentclass{report}
    \usepackage[utf8]{inputenc}
    \usepackage{graphicx} % Required for inserting images
    \usepackage{setspace}% for\doublespacing
    \usepackage{indentfirst}% for indent the first line
    \usepackage{longtable}
    \usepackage{textalpha} 
    \usepackage{ragged2e}
     \usepackage[T1]{fontenc} % <-- new
    \usepackage{xltabular} 
    \usepackage{amsmath}
    \begin{document}  
    \begin{figure}[ht]
   \centering
   \includegraphics{BehaviorOutcome.jpg}
   
  \caption{ Overview of behavioral and corticosterone results at short-term and long-term follow-up.A-E. Behavior tests after stress paradigm. A. The Sociability Interaction ratio (SIR) in Social interaction test for LT and ST cohorts. B. The sociability ratio (Soc score) in Sociability test for both LT and ST cohorts. In the ST cohort, the Social Defeat (SD) group spent significantly more time with a social target than the control. C. The proportion of sucrose intake in the sucrose preference test (SuP) for LT and ST cohorts. In the LT cohort, the SD group had a significantly increased sucrose preference compared to their controls. D. Immobility time of the Forced Swim Test (FST) for LT and ST cohorts. In the LT cohort, the SD group spent less time immobile than control animals. Physical activity (PhA) increased immobility time in FST. In the ST cohort, the SD group spent more time immobile than their control. E. Elevated Zero Maze (EZM) test for LT and ST. F. Baseline, stress-induced, and recovery corticosterone (CORT) levels for LT and ST cohorts. baseline, stress-induced, and recovery CORT are different along with time. Red-colored bars represent data from the SD groups, and black bars represent data from non-SD groups. Full bars represent data from the PhA+ groups, and the dashed bars represent data from PhA- groups. Data presented as mean\textpm SEM. The asterisk indicates statistical significance, \textit{p} < .05 = *, \textit{p} < .01 = **. }
    \label{Chapter/Figure/BehaviorOutcome.jpg}

    \end{figure}

The present study aimed to i) investigate the short-term and long-term effects of SD on behavior, body weight, blood corticosterone levels and ii) test the hypothesis that enhancing physical activity (PhA+) before SD exposure would attenuate or prevent the effects of SD. Concerning the second aim, the overall results of this large, experimental study on male C57BL/6J mice do not support a robust protective effect of pre-exposure PhA on SD-induced behavioral and physiological changes. A direct comparison between short-term and long-term effects of SD (according to our first aim) was not possible due to differences in body weight as well as in body weight change over time, thus suggesting that the baseline characteristics of the mice belonging to the LT cohort were not directly comparable to those of the ST cohort. Besides, one should note that the adapted SD protocol used (with a reduced time of physical contact between the resident and the experimental in the social defeat protocol to prevent death by physical injury) may have impacted the robustness of the impact of the exposure on behavioral and corticosterone levels of the study. 

\end{document}

答案1

placeins软件包提供了一个\FloatBarrier命令,您可以使用该命令强制打印所有剩余的浮动元素,例如图形和表格。通常,您应该只将此命令作为最后的手段,因为 LaTeX 通常可以很好地解决排版问题。

相关内容