I've tried googling this for ages, but I can't find anyone else with this problem. As you can see in the included image, the text wrapping around the image gets a weird spacing, much wider than the normal text further down. Whats wrong and how do I fix it? I've included the code, a very standard wrapfigure, showing no compiling errors in Sharelatex.
Thanks in advance!
EDIT: I've updated it with my very messy uspackage list (I have no idea what I'm doing)
EDIT 2: I've updated with a text that gives me the same error, HOWEVER, I only get the error if in image is large enough so that the image text extends into the second block of text.
EDIT 3: SOLVED! -Don't use \newline after a paragraph, kids. Not even once.
\documentclass[english,11pt]{article}
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{fancybox}
\usepackage{calc}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{romannum}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{url}
\setlength{\parindent}{0cm}
\usepackage{graphicx,wrapfig,lipsum}
\usepackage{siunitx}
\DeclareSIUnit{\sqrtm}{\ensuremath{\sqrt{\text{\meter}}}}
\DeclareSIUnit{\sqrtmm}{\ensuremath{\sqrt{\text{\milli\meter}}}}
\sisetup{group-separator = {\,}}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\DeclareRobustCommand{\greektext}{%
\fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}
\DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}
\DeclareFontEncoding{LGR}{}{}
\DeclareTextSymbol{\~}{LGR}{126}
%% A simple dot to overcome graphicx limitations
\newcommand{\lyxdot}{.}
\makeatother
\usepackage{babel}
\begin{document}
\subsection{Bonding mechanism}
\begin{wrapfigure}{r}{6cm}
\begin{center}
\includegraphics[width=6cm]{b150.jpg}
\caption{EDS maps of the BSA, SBA, and SAB -200 samples, in descending order. Images are taken of the steel fracture surface at 1000X, with residual aluminum indicated by the red color. }
\label{fig:tripple}
\end{center}
\end{wrapfigure}
The fracture surfaces seen in Figure \ref{fig:tripple} shows two different surface structures. While the fracture surfaces of the BSA samples have been largely governed by the formation of intermetallic phases, the SBA and SAB samples both show a different mechanism of bonding. Large amounts of aluminum are left on the steel substrates, mainly located in bands stretching in a transverse direction acrossrved in these images, suggests that they were bonded to the steel surface with a bond exceeding the tensile strength of the aluminum. The fact that more aluminum is found on the SAB fracture surface than on the SBA fracture surface also fits well with the improvements in bond strength that were observed for the SAB sample.
\newline
During the CRB process, the work hardened surface and oxide layers of the metals are expected to have fractured, and virgin material extruded through the crac However, due to the large difference in hardness between the two metals, it is likely that the steel surface merely cracked, and virgin aluminum was extruded into the fractured steel surface s is especially true for the SBA samples, which w pieces of the fractured work hardened steel surface layer. As aluminum is extruded into the cracks between these fragments, localized bonding occurs, as described by the film theorce opposing virgin metal surfaces come into contact, additional pressure cases the actual metallic bond to f Areas of mechanical interlocking were also found to be present at the bonded regions of all samples, and this may be an additional strengthening mechanism of the bond.
\newline
\end{document}
ragged2e
and add the directive\RaggedRight
?\small
at the end of the paragraph.\newline
to end a paragraph!!