0

I wish that all my paragraphs will start in the same place, but when I add figures, the seem to shift them. enter image description here

Here is the MWE:

\documentclass[12pt,a4paper]{revtex4-1}
\usepackage{graphicx}% Include figure files
\usepackage{bm}% bold math
\usepackage[usenames]{color}
\usepackage[all]{xy}
\usepackage{amsmath}
\usepackage{fixmath}
\usepackage{natbib}
\usepackage{placeins}
\usepackage{verbatim}
\usepackage[top=0.59in,bottom=0.59in,left=0.59in,right=0.59in]{geometry}
%% packges not from aps
\usepackage{amssymb}
\usepackage{float}
\usepackage[nice]{nicefrac}
\usepackage{chemmacros}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{multirow}
\usepackage{lipsum}
\hypersetup{
  colorlinks   = true,
  urlcolor     = red, 
  linkcolor    = black, 
  citecolor   = black 
}
\setlength{\parindent}{0pt}
\setlength{\abovecaptionskip}{0pt plus 0pt minus 0pt}

   \renewcommand\thesection{\arabic{section}}
    \renewcommand\thesubsection{\alph{subsection}}

\begin{document}
\newpage
\section{My section}

Exploring the sand with big tools.\\
\begin{figure}[htbp!] 
\centerline{
\includegraphics[scale=0.5]{sand.jpg}}
\caption{\footnotesize{picture of sand.}}
\label{fig:dis_3}
\end{figure} 
Testing our tools shows success.\\

\end{document}
  • 1
    Paragraphes in TeX are done by a blank line or by the command \par. On the other site you don't need a floating environment. You are loading the package float which provides the placement specifier H. – Marco Daniel Mar 20 '17 at 9:42
  • 2
    never end a paragraph with \\ tex will warn you about underfull hbox with badness 10000 which is maximum badness, also do not use \centerline in latex, and size commands such as \footnotesize do not take an argument and should not be used in \caption (for example it will mess up the list of figures). – David Carlisle Mar 20 '17 at 9:45
1

enter image description here

\documentclass[12pt,a4paper]{revtex4-1}
\usepackage{graphicx}% Include figure files
\usepackage{bm}% bold math
\usepackage[usenames]{color}
\usepackage[all]{xy}
\usepackage{amsmath}
\usepackage{fixmath}
\usepackage{natbib}
\usepackage{placeins}
\usepackage{verbatim}
\usepackage[top=0.59in,bottom=0.59in,left=0.59in,right=0.59in]{geometry}
%% packges not from aps
\usepackage{amssymb}
\usepackage{float}
\usepackage[nice]{nicefrac}
\usepackage{chemmacros}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{multirow}
\usepackage{lipsum}
\hypersetup{
  colorlinks   = true,
  urlcolor     = red, 
  linkcolor    = black, 
  citecolor   = black 
}
\setlength{\parindent}{0cm}
\setlength{\abovecaptionskip}{0pt plus 0pt minus 0pt}

\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\alph{subsection}}

\begin{document}
\newpage
\section{My section}

Exploring the sand with big tools. \\ Testing our tools shows success.
\begin{figure}[htbp!] 
\centerline{
\noindent\includegraphics[height=5cm]{example-image-b}}
\caption{\footnotesize{picture of sand.}}
\label{fig:dis_3}
\end{figure} 

\end{document}
  • cheers, did not notice it – jarhead Mar 20 '17 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.