The text on the left of Figure 4.15 is full justified even though I didn't specify that. I want the layout of this page to stay the same with all the text being justified. Instead the paragraph beginning "The vehicle configuration data..." is full justified, i.e. the last line is stretched to end on the right margin.

I tried putting braces around the wrapfigure as suggested here: Text alignment after wrapped figure, but it didn't work. Neither did, just putting that block of text inside a \begin{flushleft} environment. Both end up putting text over the wrapped figures.

How do I fix this?

\usepackage{amsmath,amsfonts,amssymb,amsthm, bm} %changed



% my packages

the de Havilland beaver fixed wing aircraft, in order to obtain the state space models required to derive the LQR gains. 

    \caption{\label{fig:6DOF}`sixDOF\_simulation' SIMULINK model}

A pre-existing SIMULIINK model template from the Aerospace Blockset, shown in Figure \ref{fig:6DOF}, was used to linearise the state space model around the operating point. In order to do so, the operating point initial flight conditions were specified in the script shown below in Figure \ref{fig:code1}.

        \caption{\label{fig:code1}Initializing Flight Conditions}
The vehicle configuration data used here is from the original design of the UAV [??]. Once the initial conditions had been configured, the desired trim condition had to be specified for the linearisation. As mentioned previously, the operating point was chosen to be steady flight at a constant altitude. This means when defining the trim condition for the operating point, the altitude and yaw has to be specified as known quantities. 
        \caption{\label{fig:code2}Linearising the airframe around a trimmed operating point}

The Matlab script in Figure \ref{fig:code2} is responsible for linearising the airframe. It does so by first defining a trim condition for the operating point of the airframe in lines 8-36.

In these lines, all the states are initialized to be the same as in Figure \ref{fig:code1}. This portion of the code also declares the yaw and height to be known quantities, therefore eliminating them as possible states in the state space model. Once the trim condition has been specified, an operating point satisfying it is found in line 39. The airframe is then linearised about this operating point in lines 42-50. The state space model found is only valid for small deviations of the airframe about this operating point.   

The results of this Matlab script are shown in Figure \ref{fig:code_results}. The LQR controller being designed will control deviations of the states about this operating

enter image description here

  • 1
    justified tex is the default in tex, and you have not specified \raggedright anywhere Commented Apr 17, 2020 at 18:18
  • @DavidCarlisle But all the paragraphs on this page except for the one beginning with "The vehicle configuration ...." are aligned the way I want it to be, i.e. justified. I want it to be justified just not fully justified, such that the lines are stretched out so that the last line ends on the right margin
    – Chryron
    Commented Apr 17, 2020 at 18:34

1 Answer 1


If the word "quantities" is supposed to be the end of a paragraph, leave a blank line after it. You (accidentally) have one more line in the paragraph, with no text. I guess that's why you inserted \vspace{-20pt}, to hide the blank line, as well as the parskip.

The wrapfigure was specified to be non-floating (little l) but had to float anyway because the paragraph was already wrapping around a previous figure, and there should be a warning about that on your console and in the log file.

You seem to have a lot of explicit commands for vertical spacing (\vspace, \setlength) that fight against packages (setspace, parskip). Your document writing would probably be smoother without some of these.

  • 1
    That fixed it! Thanks!
    – Chryron
    Commented Apr 17, 2020 at 19:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .