![图片没有放在页面顶部](https://linux22.com/image/446301/%E5%9B%BE%E7%89%87%E6%B2%A1%E6%9C%89%E6%94%BE%E5%9C%A8%E9%A1%B5%E9%9D%A2%E9%A1%B6%E9%83%A8.png)
我希望图形环境放在此页面的顶部,但无论我做什么,它仍然位于页面的中间......
以下是序言:
\documentclass[a4paper,12pt,two side]{book}
\usepackage[a4paper,width=160mm,top=5mm,bottom=50mm,bindingoffset=6mm]{geometry}
\usepackage{url}
\usepackage[utf8]{inputenc}
\usepackage[greek]{babel}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{thmtools, thm-restate}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[LGR, T1]{fontenc}
\usepackage{alphabeta}
\usepackage{enumitem}
\usepackage{csquotes}
\usepackage{tipa}
\usepackage{biblatex}
\usepackage{float}
\usepackage{authblk}
\usepackage{dirtytalk}
\usepackage{epigraph}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{fourier-orns}
\addbibresource{reffence.bib}
\renewcommand\headrule{%
\vspace{-6pt}
\hrulefill
\raisebox{-2.1pt}
{\quad\decofourleft\decotwo\decofourright\quad}%
\hrulefill}
\usepackage{graphicx,tipa}% http://ctan.org/pkg/{graphicx,tipa}
\newcommand{\arc}[1]{{%
\setbox9=\hbox{#1}%
\ooalign{\resizebox{\wd9}{\height}{\texttoptiebar{\phantom{A}}}\cr#1}}}
\newtheorem{remark}{Παρατήρηση}[section]
\newtheorem{theorem}{Θεώρημα}[section]
\newtheorem{lemma}{Λήμμα}[section]
\newtheorem{corollary}{Πόρισμα}[section]
\newcounter{example}[section]
\newenvironment{example}[1][]{\refstepcounter{example}\par\medskip
\noindent \textbf{Παράδειγμα~\theexample. #1} \rmfamily}{\medskip}
\fancyhf{}
\setlength{\headheight}{95pt}
\fancyfoot[CE, CO]{\textbf{\thepage}}
\pagestyle{fancy}
\lhead{\includegraphics[width=0.9\textwidth]{logometitlo2.png}}
\graphicspath{{images/}}
这里的数字我无法修复......
\begin{figure}[pt]
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{notglobalrigidspiti.png}
\caption{}
\label{notglobalrigidspiti}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[width=0.7\textwidth]{alexandrovrigidity.png}
\caption{}
\label{alexandrovrigiditysxima}
\end{subfigure}
\caption{}
\end{figure}
我怎样才能将图形放在页面顶部?
答案1
尝试\begin{figure}[ht!]
这是一个简化的代码。
% !TeX TS-program = pdflatex
\documentclass[a4paper,12pt,twoside]{book}
\usepackage[a4paper,width=160mm,top=5mm,bottom=50mm,bindingoffset=6mm]{geometry}
\usepackage[greek]{babel}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[LGR, T1]{fontenc}
\usepackage{float}
\usepackage{authblk}
\usepackage{subcaption}
\usepackage{fourier-orns}
\renewcommand\headrule{%
\vspace{-6pt}
\hrulefill
\raisebox{-2.1pt}
{\quad\decofourleft\decotwo\decofourright\quad}%
\hrulefill}
\newcommand{\arc}[1]{{%
\setbox9=\hbox{#1}%
\ooalign{\resizebox{\wd9}{\height}{\texttoptiebar{\phantom{A}}}\cr#1}}}
\newtheorem{remark}{Παρατήρηση}[section]
\newtheorem{theorem}{Θεώρημα}[section]
\newtheorem{lemma}{Λήμμα}[section]
\newtheorem{corollary}{Πόρισμα}[section]
\newcounter{example}[section]
\newenvironment{example}[1][]{\refstepcounter{example}\par\medskip
\noindent \textbf{Παράδειγμα~\theexample. #1} \rmfamily}{\medskip}
\fancyhf{}
\setlength{\headheight}{95pt}
\fancyfoot[CE, CO]{\textbf{\thepage}}
\pagestyle{fancy}
\lhead{\includegraphics[width=0.15\textwidth]{example-image}}
\graphicspath{{images/}}
\begin{document}
\begin{figure}[ht!]% changed <<<<<<<<<<<<<
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-a}
\caption{}
\label{notglobalrigidspiti}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[width=0.7\textwidth]{example-image-b}
\caption{}
\label{alexandrovrigiditysxima}
\end{subfigure}
\caption{}
\end{figure}
\lipsum[1]
\end{document}