I am using wrapfigure
to position a figure on the right side of my document. However when I do it the text to the left increases in both vertical and horizontal spacing. It is not a huge amount but it is bugging me. I have tried using the package setspace
to remedy the situation but it doesn't seem to be working. Can anyone help? See code below:
EDIT: The problem with spacing to left of figure has now resolved itself (thankyou!) after removing the \\ used. However the spacing above has now gone funny, any help would be greatly appreciated! (I have edited code accordingly)
\documentclass{article}
\DeclareUnicodeCharacter{2212}{-}
\usepackage[a4paper]{geometry}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{hyperref}
\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{subfig}
\usepackage{wrapfig}
\usepackage{minted}
\usepackage{setspace}
\renewcommand{\MintedPygmentize}{/Library/Frameworks/Python.framework/Versions/Current/bin/pygmentize}
\DeclareMathOperator{\Tr}{Tr}
\begin{document}
A natural progression now would be to ask how fast these waves travel. This is because all waves will travel the same speed, $c$, in the system, so once we create spirals later we can determine the wavelength using $\lambda=Pc$. Then we can investigate if the period changes under different $\epsilon$ and $\beta$ values. To do this we will continue looking at the waves generated with parameters as before, namely $\epsilon = 0.3$ and $\beta = 0.7$.
\begin{wrapfigure}[17]{r}{0.5\textwidth}
\captionsetup{justification=centering}
\centering
\includegraphics[width=0.48\textwidth]{example-image}
\caption[caption for ToF]{An example of how we can produce an individual travelling wave.}
\end{wrapfigure}
\vspace{-5mm} \paragraph{} \hspace{-5mm} When calculating speed, we must first set a base point to follow on the wave as it progresses. If the model is set up in such a way that the waves are created from the left side of the excitable area, then after a small number of iterations one of them will fall outside of the boundary whilst the other remains inside travelling right. An example of this can be seen on the right. This means that there will be only one maximum value (the peak $\hat{x}_{max}$) and so we choose this as our initial base point.
\paragraph{} \hspace{-5mm} We are now presented with the problem that the true maximum value of the wave, denoted as $x_{max}$, may lie between two grid points. Therefore, we seek a technique to approximate $x_{max}$ to set as our new base point to improve the accuracy of our wave speed calculation. To do this we construct the following algorithm;
\end{document}
As you can see the spacing has increased to the left of the figure.
\\
which should almost never be used in text and certainly not after a figure.example-image
as the image which is available for this kind of test.)\documentclass
, all the\usepackages
(and libraries if you usetikz
or something like that), as well as the\begin{document}
and\end{document}
. Please refer to this and to this\\
.