
Tengo que insertar una imagen grande en mi informe de tesis. Por alguna razón, la imagen se alinea correctamente en la página de forma predeterminada. Intenté centrar la imagen usando \hspace{-1.4cm}, pero no hubo mejora. Cualquier sugerencia sería útil.
%\documentclass[a4paper, 12pt, oneside, BCOR1cm]{scrbook}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
%function definition for starting intro from first section.
\def\frontmatter{%
%\pagenumbering{roman}
\setcounter{page}{1}
\renewcommand{\thesection}{\Roman{section}}
}%
\def\mainmatter{%
%\pagenumbering{arabic}
%\setcounter{page}{1}
\setcounter{section}{0}
\renewcommand{\thesection}{\arabic{section}}
}%
\def\backmatter{%
%\pagenumbering{arabic}
}%
\usepackage{fontspec}
%\setmainfont{Times New Roman}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{float}%%%
\usepackage{wrapfig}%%%
\usepackage{caption}
\usepackage{subfigure}
\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{textgreek}
\usepackage{gensymb}
\usepackage{svg}
\usepackage{commath}\usepackage{amsmath}
\linespread{1.32}
%\usepackage[top = 2.8cm, bottom = 3.5cm, inner = 3cm, outer = 3cm, headheight = 15pt]{geometry}
%\usepackage{geometry}
\usepackage[a4paper, total={5.7in, 8.72in}]{geometry}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amsthm}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{\leftmark}
\cfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\usepackage{chngcntr}
\usepackage{microtype}
\usepackage{titletoc}
%\usepackage{blindtext}
\usepackage{dirtytalk}
%\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\counterwithin{figure}{section}
\counterwithin{table}{section}
%\usepackage{picins}
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\floatstyle{plaintop}
\restylefloat{table}
\newenvironment{bottompar}{\par\vspace*{\fill}}{\clearpage}
\begin{document}
%%%%%%Lots of text
\begin{figure}[H]
\centering
\hspace{-1.4cm}
\includegraphics[height=5.4in,width=7.4in]{images/image1.png}
\caption[demo]{demo}
\vspace{0cm}
\label{fig:arc6}
\end{figure}
%%%%%%Text
\backmatter
\thispagestyle{plain}
\bibliographystyle{ieeetr}
\bibliography{References}
%\bibliographystyle{unsrt}
\end{document}
Respuesta1
Su imagen es más ancha que la textwidth
y no se puede centrar. Reduzca el ancho designado de su gráfico a no más de textwidth
.
% picprob.tex SE
\documentclass[a4paper,12pt,oneside,BCOR1cm]{scrbook}
\usepackage{float}
\usepackage{mwe} % provides example images
\usepackage{graphicx}
\usepackage{lipsum} % provides many lines of text
\begin{document}
\lipsum[1]
\begin{figure}[H] %% your code
\centering
\hspace{-1.4cm}
\includegraphics[height=5.4in,width=7.4in]{images/image1.png}
\caption[demo]{demo}
\vspace{0cm}
\label{fig:arc6}
\end{figure}
Text
%%% my code
\lipsum[2]
\begin{figure}%[H] %% my code
\centering
%\hspace{-1.4cm}
%\includegraphics[height=5.4in,width=7.4in]{example-image}
\includegraphics[height=5.4in,width=5.4in]{example-image}
\caption[demo]{demo}
\vspace{0cm}
\label{fig:arc6}
\end{figure}
\end{document}
No utilice la [H]
opción flotante ya que anula el flotador; Si insiste en no tener un flotador, no solicite uno; existen otras formas de agregar un título a un gráfico o tabla.