我尝试将其放在特定位置
\begin{multicols}{7}
\begin{figure*}[ht!]
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{1_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{2_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{3_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{4_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{5_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{6_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.3\textwidth]{7_signal_lunka0.png}\hfill
\includegraphics[trim={0 0 0 22}, clip, width=0.31\textwidth]{all_signals_lunka0.png}\hfill
\caption{lalala}
\end{figure*}
\end{multicols}
但我做不到,它总是出现在最后。
我曾用过这个序言:
\documentclass[a4paper,12pt]{article}
\usepackage{hyperref}
\usepackage[warn]{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
%%%%%%%%%%%%
% Packages %
%%%%%%%%%%%%
\usepackage{cmap} % поиск в PDF
\usepackage{mathtext} % русские буквы в фомулах
\usepackage[english,russian]{babel} % локализация и переносы
\usepackage[noheader]{packages/sleek}
\usepackage{packages/sleek-title}
\usepackage{packages/sleek-theorems}
\usepackage{packages/sleek-listings}
\usepackage{pdfpages}
\usepackage{setspace}
\usepackage{alltt}
\usepackage{comment}
\usepackage{color} %
\hypersetup{colorlinks = true,
linkcolor = black,
urlcolor = black,
citecolor = black,
filecolor=black,
pagecolor=black,
anchorcolor = black
pdftitle={Overleaf Example},
pdfpagemode=FullScreen}
\usepackage{geometry}
\geometry{a4paper,top=2 cm,bottom=2 cm,left=3 cm,right=1.2 cm}
%\usepackage[left=30mm, top=15mm, right=10mm, bottom=20mm, nohead, nofoot]{geometry}
%\usepackage[left=2.5cm, right=1.5cm, vmargin=2.5cm]{geometry}
\usepackage{indentfirst}
\setlength{\parindent}{5ex}
\usepackage{hyphenat}
\renewcommand{\baselinestretch}{1.5} %междустрочный интерввл
\pagenumbering{roman}
\frenchspacing
\makeatletter
\renewcommand{\@dotsep}{2}
\newcommand{\l@likechapter}[2]{{\bfseries\@dottedtocline{0}{0pt}{0pt}{#1}{#2}}}
\makeatother
\newcommand{\likechapter}[1]{
\likechapterheading{#1}
\addcontentsline{toc}{likechapter}{\MakeUppercase{#1}}}
% Зачем: Настраивает отступ между таблицей с содержанимем и словом СОДЕРЖАНИЕ
% Почему: Пункт 2.2.7 Требований по оформлению пояснительной записки.
\usepackage{tocloft}
\setlength{\cftbeforetoctitleskip}{-1em}
\setlength{\cftaftertoctitleskip}{1em}
% Зачем: Определяет отступы слева для записей в таблице содержания.
% Почему: Пункт 2.2.7 Требований по оформлению пояснительной записки.
\makeatletter
\renewcommand{\l@section}{\@dottedtocline{1}{0.5em}{1.2em}}
\renewcommand{\l@subsection}{\@dottedtocline{2}{1.7em}{2.0em}}
\makeatother
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
%%%%%%%%%%%%%%%%
% Bibliography %
%%%%%%%%%%%%%%%%
%\usepackage{biblatex}
\usepackage[parentracker=true,
backend=biber,
hyperref=auto,
language=russian,
autolang=other,
citestyle=gost-numeric,
defernumbers=true,
bibstyle=gost-footnote,
]{biblatex}
\addbibresource{./resources/bib/references.bib}
\setlength\bibindent{-1.0900cm}
%\input{biblio/bibliopreamble}
%\FrameTBStyle{latex}
\def\tbs{\textbackslash}
用户包 float 和 parskip 也包括在内,但没有帮助。你能帮助我吗?
答案1
- 欢迎来到 TeX.SE
- 请始终提供一个最小工作示例(MWE),一个小但完整的文档,以重现您的问题。
- 从代码片段中制作 MWE 并不好玩,特别是如果文档前言片段包含与您的问题不相关的包和定义。
- 帮助我们帮助您!
抱歉,不清楚:
- 您的文档有多少列?
- 定义的 7 列是否仅用于图形或整个文档?
- 您的图形应该是什么样子。从图形的大小可以得出结论,i,ages 应该分为三行:2 x 三幅图像,1 x 两幅图像。这是正确的吗?
\documentclass[draft,
a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{geometry}
\geometry{a4paper,top=2 cm,bottom=2 cm,left=3 cm,right=1.2 cm}
\begin{document}
\begin{figure}[ht!]
\setkeys{Gin}{trim={0 0 0 22}, clip, width=0.3\textwidth}
\includegraphics{1_signal_lunka0.png}\hfill
\includegraphics{2_signal_lunka0.png}\hfill
\includegraphics{3_signal_lunka0.png}
\medskip
\includegraphics{4_signal_lunka0.png}\hfill
\includegraphics{5_signal_lunka0.png}\hfill
\includegraphics{6_signal_lunka0.png}
\medskip
\includegraphics{7_signal_lunka0.png}\hfill
\includegraphics{all_signals_lunka0.png}
\caption{lalala}
\end{figure}
\end{document}
题外话:hyperref 包应该在序言中最后加载(极少数例外)。
附录:
如果您希望每个子图像都有标题,则需要将它们插入subfigure
环境中:
\documentclass[draft,
12pt]{article}
\usepackage[a4paper,
hmargin={3 cm,1.2 cm},
vmargin={2 cm,2 cm}
]{geometry}
%\usepackage{graphicx}
\usepackage[export]{adjustbox} % it load graphicx too
\usepackage[skip=0.5ex,belowskip=1ex]{subcaption}
\begin{document}
\begin{figure}[ht!]
\centering
\setkeys{Gin}{width=\linewidth} % because all images have zthe same dimension
\begin{subfigure}{0.3\textwidth}
\includegraphics{1_signal_lunka0.png}
\caption{some text, if needed}
\end{subfigure}
\hfil
\begin{subfigure}{0.3\textwidth}
\includegraphics{2_signal_lunka0.png}\hfill
\caption{some text, if needed}
\end{subfigure}
\hfil
\begin{subfigure}{0.3\textwidth}
\includegraphics{3_signal_lunka0.png}
\caption{some text, if needed}
\end{subfigure}
\medskip
\begin{subfigure}{0.3\textwidth}
\includegraphics{4_signal_lunka0.png}\hfill
\caption{some text, if needed}
\end{subfigure}
\hfil
\begin{subfigure}{0.3\textwidth}
\includegraphics{5_signal_lunka0.png}\hfill
\caption{some text, if needed}
\end{subfigure}
\hfil
\begin{subfigure}{0.3\textwidth}
\includegraphics{6_signal_lunka0.png}
\caption{some text, if needed}
\end{subfigure}
\hfil
\medskip
\begin{subfigure}{0.3\textwidth}
\includegraphics{7_signal_lunka0.png}\hfill
\caption{some text, if needed}
\end{subfigure}
\hfil
\begin{subfigure}{0.3\textwidth}
\includegraphics{all_signals_lunka0.png}
\caption{some text, if needed}
\end{subfigure}
\caption{lalala}
\label{fig:lala?}
\end{figure}
\end{document}
笔记:
- 在此 MWE 中,图像的排列略有改变。它们现在位于浮动的中心,并且它们之间的距离由 设定
\hfil
。 - 当双列文档需要跨越两列时,使用浮动 ˙figure*`。在这种情况下,它会自动定位在下一页的顶部。
- 在这两个文档示例中,预计您尝试使用它
multicol
来组织图中的图像,并且您的文档只有一列。