# Margin issues with text after quotation and in overall

I'm a newbie with LaTex and could find answers on my problems relatex to LaTex through this SE group. However, I currently have an issue with the margins. Maybe my questions were too specific to find the answer. Here below is an image which shows a part of the text.

I have two questions about the margins in the image.

QUESTION 1: In the image, there are two black lines showing the current margin. According to this LaTex answer, the margins is initially set for a book. My report will be printed on an A4 page. So I investigated it further, and there is a question about the margin, which uses the following documentclass and package:

\documentclass[12pt,a4paper,oneside]{article}
\usepackage[a4paper,left=3cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry}


However, i have chosen "report" as document class because it contains multiple chapters (as per this source ).

\documentclass[11pt,a4paper]{report}


I have tried adding the above package setting and the black margin didn't move to the preferred gray lined margin. Q1: Did I have missed something? How to resolve this?

Edit 1: Further in the text, I get this. Heh, that is fugly. That shows that each quotations increases the margin without resetting it at the end ...

QUESTION 2: Another question is the quote. I have used \quotation{} to add quotes in my text. It is surrounded by a red box. But the text after it (in orange box) is not part of the quote. But the margin doesn't get a reset. The sentence "The webpage ..." should start at the black line. There are similar issues with texts after other quotations further in the report... The margin however get reset if the text after the quotation is a section/subsection title...

Q2: How can I tackle down this issue? The LaTex snippet is here below

For the reader whom is not familiar with IoT, the following quote describes the concept of IoT:
\quotation{The Internet of Things (IoT) is the network of physical objects—devices, vehicles, buildings and other items—embedded with electronics, software, sensors, and network connectivity that enables these objects to collect and exchange data. The IoT allows objects to be sensed and controlled remotely across existing network infrastructure, creating opportunities for more direct integration of the physical world into computer-based systems, and resulting in improved efficiency, accuracy and economic benefit; when IoT is augmented with sensors and actuators, the technology becomes an instance of the more general class of cyber-physical systems, which also encompasses technologies such as smart grids, smart homes, intelligent transportation and smart cities.} \cite{Wikipedia_IoT}

The webpage shows the following four middleware platforms \cite{67_OpenSource_IoT}:
\begin{enumerate}
\item IoTSyS
\item OpenIoT
\item OpenRemote
\item Kaa
\end{enumerate}

Each middleware will be investigated in the following sections


I already have tried to add \\ or \\ \\ before the "The webpage ..." sentence to force a new line to fix the margins but no result ...

Edit 2: full compilable code:

\documentclass[11pt,a4paper]{report}

% ============================     PACKAGES     ============================

% for abbreviations - http://texblog.org/2014/01/15/glossary-and-list-of-acronyms-with-latex/
\usepackage[acronym,xindy,nomain]{glossaries}
\makeglossaries
\usepackage[xindy]{imakeidx}
\makeindex
% \newacronym{<label>}{<abbrv>}{<full>}
% \newcommand*{\nom}[2]{#1\nomenclature{#1}{#2}}

\usepackage{hyperref}
\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}

% 1.5 line spacing
\usepackage{setspace}
\onehalfspacing

% figures - https://tex.stackexchange.com/questions/16207/image-from-includegraphics-showing-up-in-wrong-location
\usepackage{graphicx}

% bibliography
\usepackage[backend=biber]{biblatex}

% ============================  BEGIN DOCUMENT  ============================
\begin{document}

% other chapters

% ========================
% === PART 07 : method ===
% ========================
\chapter{Methodology}

\section{Planning}
% other sections before the next section, that doesn't use \quotation{...}

\section{Server middleware}

This thesis is in collaboration with erased. One of their requirements is that they want to use much open-source software as possible in their production build. An employer of erased has shared a link which enlists 67 open source software or tools for \gls{IoT}. The title is "\emph{67 open source tools and resources for IoT}" \cite{67_OpenSource_IoT} where the author tries to inform the reader about the development, advancement and new open source software/tool to be deployed in an IoT environment.
\\ \\
For the reader whom is not familiar with IoT, the following quote describes the concept of IoT:
\quotation{The Internet of Things (IoT) is the network of physical objects—devices, vehicles, buildings and other items—embedded with electronics, software, sensors, and network connectivity that enables these objects to collect and exchange data. The IoT allows objects to be sensed and controlled remotely across existing network infrastructure, creating opportunities for more direct integration of the physical world into computer-based systems, and resulting in improved efficiency, accuracy and economic benefit; when IoT is augmented with sensors and actuators, the technology becomes an instance of the more general class of cyber-physical systems, which also encompasses technologies such as smart grids, smart homes, intelligent transportation and smart cities.} \cite{Wikipedia_IoT}

The webpage shows the following four middleware platforms \cite{67_OpenSource_IoT}:
\begin{enumerate}
\item IoTSyS
\item OpenIoT
\item OpenRemote
\item Kaa
\end{enumerate}

Each middleware will be investigated in the following sections. The investigation will be based on the requirements. The enlisted requirements here below is a result of the meetings with erased.

The middleware must be % TODO wording
\begin{enumerate}
\item Reliability on the logging infrastructure. Is there a way to double the server workers?
\item Reliability on the logger infrastructure. Is there an auto-connection management? How would a connection failure being resolved? Does the middleware provide a solution or do we have to develop it ourselves?
\item Persistence of messages. If there is a connection failure, how can we prevent loosing data? Does the middleware offer a solution itself or do we have to develop it ourselves?
\item Scalability. The servers must be scalable to resolve huge loads on a server.
\item Maintainability. Easy-to-use is the most important requirement in this part. The middleware should be easily maintainable. Having a good documentation makes the maintainability less difficult.
\end{enumerate}

These middleware will be tested against the last requirement. If the middleware meets the last requirement, then it can be used for further research to see if they meet the first three requirements. In addition to the maintainability, the state of the middleware is being checked too. Is it in a good state? Does it not contain lots of known issues? Is it a more recent project? Can the BBB device support it?

\subsection{IoTSyS}
The first middleware is IoTSys. The following quote is being shown on their website.
\quotation{IoTSyS is an integration middleware for the Internet of Things. It provides a communication stack for embedded devices based on IPv6, Web services and oBIX to provide interoperable interfaces for smart objects. … IoTSyS consists of multiple projects that are currently evolving and act as proof of concept prototypes within several research projects of the Automation Systems Group at the Vienna University of Technology.} \cite{IoTSyS_about}
\\ \\
According to the given site, IoTSyS consists of multiple research projects of Automation Systems Group at University of Vienna. This software runs on Java (version 1.7), uses Gradle and Mercurial \gls{SCM} Client \cite{IoTSyS_gettingStarted}.
Gradle is an open source build automation system, which allows users to create packages of projects or build projects from a package. Gradle offers some nice features:
\begin{enumerate}
\item an API. It allows an extensive customization of how the package should be build.
\item scalability. It offers a way to structure the project so that the user can wrap a small or a large multi-project build into one package.
\item dependency management. By this feature, a project dependency will be packed automatically when creating a package.
\item Other features like language dependencies, build integration tool, ... \cite{Gradle_features}
\end{enumerate}

Mercurial SCM is a tool which allows the user to provide source control management. The word "\emph{source control management}" has an identical definition as “version control”, “source control” or “revision control”. Revision control is any kind of practice that tracks and provides control over changes to source code. Software developers sometimes use revision control software to maintain documentation and configuration files as well as source code \cite{Wikipedia_versionControl}.
\\ \\
IoTSyS provides a series of wiki pages which allows the user to develop an application in a given circumstances. An example of it is a weather forecast connector. It is useful in a smart home system, where the residents would see directly what the weather forecast is. But there is no exact documentation of the platform functionalities. It is possible to generate the documentation since some % TODO

\end{document}

• A full compilable code would help us help you… – Bernard May 6 '16 at 13:41
• Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Holene May 6 '16 at 13:41
• Uh, the report is 30+ pages so far. I'm going to add the packages, documentclass and parts of begin/end – KarelG May 6 '16 at 14:55

The problem is in your usage of \quotation.

The macro \quotation exists, but it should never be used in the document body; it should only be used in definitions of new environments.

The right form is

\begin{quotation}
The Internet of Things (IoT) is the network
[...]
and smart cities.~\cite{Wikipedia_IoT}
\end{quotation}


Try it and your problems will disappear instantly.

Here's a simulation: left page with your wrong instances of \quotation, right page with the correct input.

\documentclass{article}

\usepackage[nopar]{lipsum} % just for the example

\begin{document}

\begingroup % to confine wrong usage

\lipsum[1]

\quotation{\lipsum[2]}

\lipsum[3]

\quotation{\lipsum[4]}

\endgroup

\newpage

\section{Correct usage}

\lipsum[1]
\begin{quotation}
\lipsum[2]
\end{quotation}
\lipsum[3]
\begin{quotation}
\lipsum[4]
\end{quotation}

\end{document}


• Ah, I was not aware about that. I found this wiki about quotation and used \quotation{. Since LaTex didn't throw an error, I thought that it was OK. It shows that I'm not so experienced with it. Thank you. PS: You forgot to answer on Q1, but I could solve it in the meanwhile. – KarelG May 8 '16 at 8:10
• @KarelG The page mentions the environment quotation (no backslash). – egreg May 8 '16 at 8:34