引文后文本和整体文本的边距问题

引文后文本和整体文本的边距问题

我是 LaTex 新手,可以通过这个 SE 小组找到与 LaTex 相关的问题的答案。但是,我目前遇到了边距问题。也许我的问题太具体了,无法找到答案。下面是一张显示部分文本的图片。

保证金问题

我对图像中的边缘有两个疑问。

问题 1: 图中两条黑线表示当前边距。根据此LaTex 答案,页边距最初是为书籍设置的。我的报告将打印在 A4 页面上。因此,我进一步调查了这个问题,发现有一个问题关于边距,它使用以下文档类和包:

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

但是,我选择“报告”作为文档类别,因为它包含多个章节(根据此来源)。

\documentclass[11pt,a4paper]{report}

我尝试添加上述包设置,但黑色边距并没有移动到首选的灰色边距。问题 1:我是不是遗漏了什么?如何解决?

编辑 1:在文中进一步,我得到。呵呵,这太丑了。这表明每次引用都会增加边距,而不会在最后重置它……

问题2: 另一个问题是引文。我曾经\quotation{}在文本中添加引文。它被一个红色框包围。但它后面的文本(在橙色框中)是不是引用的一部分。但边距不会重置。句子“该网页......“应该从黑线开始。报告中其他引文后的文本也存在类似问题……但是,如果引文后的文本是章节/小节标题,则边距会被重置……

问题2:我该如何解决这个问题?LaTex 代码片段如下

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

我已经尝试在“之前添加\\\\ \\该网页......“句子强制换行修复边距但没有结果……

编辑2:完整可编译代码:

\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}}

% make the table of contents clickable
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=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}
\addbibresource{thesis.bib}



% ============================  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}

答案1

问题在于您对 的使用\quotation

该宏\quotation存在,但它不应该在文档主体中使用;它应该仅有的用于新环境的定义。

正确的形式是

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

尝试一下,你的问题将立即消失。

这是一个模拟:左页是您错误的实例\quotation,右页是您正确的输入。

\documentclass{article}

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

\begin{document}

\begingroup % to confine wrong usage
\section{Your 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}

在此处输入图片描述

相关内容