Text FormattingSeemingly random blank lines between paragraphs

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
pkladisios
Posts: 7
Joined: Sat Dec 26, 2015 8:49 pm

Seemingly random blank lines between paragraphs

Post by pkladisios »

Greetings!

Being a first time user of Latex (Texmaker 3.3.4), i've encountered a peculiar problem. Blank lines appear before and after a specific paragraph of my text (other paragraphs are unaffected), thusly:

Image

Packages in use:

Code: Select all

\usepackage{graphicx} 
\usepackage{multicol}
\usepackage{blindtext}
\usepackage{indentfirst}
\usepackage[hyphens]{url} 
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}
Part of my text

Code: Select all

The last figure at each period (figures ...) gives the cell temperature over time. At a first look different materials are more efficient at different periods. A PCM's efficiency at reducing cell temperature is also reflected at the internal PCM temperature.\par
During the first three periods RT20 produces lower cell temperatures. During the periods in April and May the PV-RT20 system starts with lower temperatures but overall RT27 provides a better thermal control. It should be noted that despite that fact that RT27 and SP25A8 display similar thermo-physical properties, SP25A8 consistently under-performs in comparison with RT27. This is attributed to the SP25A8's higher density. During the summer periods a gradual increase in the cell temperature levels is noticed. In some cases cell temperature ends up higher than those of a PV panel without the use of PCM. This is reflected by the fact that PCMs enter into the liquid phase during the day, sometimes even fully, without being able to release the absorbed heat during the night. This is attributed to the very low heat conductivity (RT20 and RT27: $0.2 W/mK$, SP25A8: $0.6 W/mK$) that makes them function as heat insulators above a certain temperature level. This can be mitigated with forced convection (i.d. fans) or the insertion of a metal mesh inside the phase change materials, effectively increasing the rate with which the materials expel stored heat [3].\par
Overall, with the exclusion of the summer periods where all materials end up performing poorly, RT27 achieves better results. Even in the winter periods where it under-performs in comparison to RT20 it still yields a considerable temperature reduction.
Thank you in advance!

edit: I toyed with this some more and found out that these "vertical gaps" are of variable height depending on the page. I also found this very old thread:
http://latex-community.org/forum/viewto ... 10877&f=47

Inserting

Code: Select all

\setlength{\parskip}{0pt}
right after

Code: Select all

\documentclass{article}
solved my issue. I was wondering what exactly does it do?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Seemingly random blank lines between paragraphs

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

A paragraph can consist of several lines. There are two common methods of visually separating paragraphs: an indentation at the beginning of a paragraph, or a space between paragraphs (half a line, or a line). Usually only one of the two methods is used. A line break is not enough, since a line break at the end of the line is hard to see as such.

Your document uses indentation and spacing between paragraphs. That's uncommon and must be the result of some package or setting. By \setlength{\parskip}{0pt} you disabled the inter paragraph spacing by setting it to zero, as a fix.

I could tell you more about the cause if I would see a complete compilable small document with that behavior, in the meaning of a Infominimal working example. But I guess the fix you made is sufficient. By the way, spacing between paragraphs and around headings can be stretchable, to fill pages equally. Also this can produce a variable spacing.

Stefan
LaTeX.org admin
pkladisios
Posts: 7
Joined: Sat Dec 26, 2015 8:49 pm

Re: Seemingly random blank lines between paragraphs

Post by pkladisios »

Thank you for you answer. You mention that my document uses both indentation and spacing between paragraphs. I don't explicitly Is it because i use \par or because i enforce first paragraph identation? Why isn't it evident among the rest paragraphs? The reason i'm asking is because i want to understand the mechanics behind latex..
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Seemingly random blank lines between paragraphs

Post by Stefan Kottwitz »

It is not because of using \par. It's a setting which you did not mention here. You selected some code lines and posted the snippets here. You can get the "why" with complete information. Compilable code.

Even if I take the code cutouts and build a new document so simulate your case, it doesn't show the problem. It is not here. A Infominimal working example (click that link) would guarantee an explanation and usually a fix or solution.

See, I built your code (every reader would need to do that - it would be better to post compilable code!) - a simple click to "Open in writeLaTeX" shows you that there's not that space.

Code: Select all

\documentclass{article}
\usepackage{graphicx} 
\usepackage{multicol}
\usepackage{blindtext}
\usepackage{indentfirst}
\usepackage[hyphens]{url} 
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}
\begin{document}
The last figure at each period (figures ...) gives the cell temperature over time. At a first look different materials are more efficient at different periods. A PCM's efficiency at reducing cell temperature is also reflected at the internal PCM temperature.\par
During the first three periods RT20 produces lower cell temperatures. During the periods in April and May the PV-RT20 system starts with lower temperatures but overall RT27 provides a better thermal control. It should be noted that despite that fact that RT27 and SP25A8 display similar thermo-physical properties, SP25A8 consistently under-performs in comparison with RT27. This is attributed to the SP25A8's higher density. During the summer periods a gradual increase in the cell temperature levels is noticed. In some cases cell temperature ends up higher than those of a PV panel without the use of PCM. This is reflected by the fact that PCMs enter into the liquid phase during the day, sometimes even fully, without being able to release the absorbed heat during the night. This is attributed to the very low heat conductivity (RT20 and RT27: $0.2 W/mK$, SP25A8: $0.6 W/mK$) that makes them function as heat insulators above a certain temperature level. This can be mitigated with forced convection (i.d. fans) or the insertion of a metal mesh inside the phase change materials, effectively increasing the rate with which the materials expel stored heat [3].\par
Overall, with the exclusion of the summer periods where all materials end up performing poorly, RT27 achieves better results. Even in the winter periods where it under-performs in comparison to RT20 it still yields a considerable temperature reduction.
\end{document}
Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Seemingly random blank lines between paragraphs

Post by Johannes_B »

This looks like the normal justification LaTeX does to ensure all columns end at the bottom of the page. Try \raggedbottom in your preamble.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
pkladisios
Posts: 7
Joined: Sat Dec 26, 2015 8:49 pm

Seemingly random blank lines between paragraphs

Post by pkladisios »

According to the thread i previously mentioned, i already tried using \raggedbottom to no avail. After many tries i may have found the root of the problem. I used bold letters for my title (\title{\textbf{...}}). Removing \textbf{} seems to resolve it. Here's a minimal piece of the code:

Code: Select all

\documentclass{article}

\usepackage{multicol}

\begin{document}

%TITLE
\title{\textbf{USING PHASE CHANGE MATERIALS IN PHOTOVOLTAIC SYSTEMS FOR CELL TEMPERATURE REDUCTION: A FINITE DIFFERENCE SIMULATION METHOD.}}
\date{}
\author{}
\maketitle

\begin{multicols}{2}

\section{CONCLUSIONS}
The purpose of this paper was to develop a simplified algorithm that calculates a photovoltaic module's cell temperature both as a unit and as a system in direct contact with a phase change material. That way the possibility of using phase change materials as a mean of thermal control can be assessed. PCM's were modeled based on the effective heat capacity method and a relative published research on specific materials [7].\par
So far, a series of assumptions have been made:\\
-Simplified PV panel geometry.\\
-Perfect contact between PV-PCM.\\
-One-dimensional heat transfer.\\
-Constant heat conductivity for every material.\\
-A combined heat transfer coefficient that takes free convection and radiation into account.\\
-Insolation was calculated based on empirical equations and a surface angle that corresponds to maximum annual energy [14].\\
-Air temperature was based on real historical data from National Technical University of Athens' meteorological station [13].\\
Apparently, a better approximation of the above would provide an increased precision of the results.\par
The three first days of each month between each month from January till August were considered as periods of interest. After the summer, both air temperature and solar radiation begin to drop so it was deemed fit to study only ''half'' of the year.\par
The first three figures at each period (figures ...) give a general depiction of the temperature levels inside each PCM. They also give a measure of the efficiency of each material. In an ideal scenario a PCM would fully enter and exit the two-phase region (between the dashed lines) during the course of each day. Unfortunately, under real conditions that rarely happens since most PCMs are effective in a very small temperature region.\par
The last figure at each period (figures ...) gives the cell temperature over time. At a first look different materials are more efficient at different periods. A PCM's efficiency at reducing cell temperature is also reflected at the internal PCM temperature.\par
During the first three periods RT20 produces lower cell temperatures. During the periods in April and May the PV-RT20 system starts with lower temperatures but overall RT27 provides a better thermal control. It should be noted that despite that fact that RT27 and SP25A8 display similar thermo-physical properties, SP25A8 consistently under-performs in comparison with RT27. This is attributed to the SP25A8's higher density. During the summer periods a gradual increase in the cell temperature levels is noticed. In some cases cell temperature ends up higher than those of a PV panel without the use of PCM. This is reflected by the fact that PCMs enter into the liquid phase during the day, sometimes even fully, without being able to release the absorbed heat during the night. This is attributed to the very low heat conductivity (RT20 and RT27: $0.2 W/mK$, SP25A8: $0.6 W/mK$) that makes them function as heat insulators above a certain temperature level. This can be mitigated with forced convection (i.d. fans) or the insertion of a metal mesh inside the phase change materials, effectively increasing the rate with which the materials expel stored heat [3].\par
Overall, with the exclusion of the summer periods where all materials end up performing poorly, RT27 achieves better results. Even in the winter periods where it under-performs in comparison to RT20 it still yields a considerable temperature reduction.

\end{multicols}

\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Seemingly random blank lines between paragraphs

Post by Stefan Kottwitz »

multicol is balancing the columns by default. You can switch it off by

Code: Select all

\raggedcolumns
in your preamble, after loading multicol.

\textbf is just a coincidence, not the cause. The \parskip is a stretchable space for balancing, which you changed to fixed 0, so that worked too.

The spacing was not visible in the first code you posted, because there were no columns in the code. That's why a compilable example showing the issue would have been the best, as always. ;-)

So, while you could fix the parskip to 0, balancing may be used stretching space around headings, but \raggedcolumns would switch balancing off, totally.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Seemingly random blank lines between paragraphs

Post by Johannes_B »

Better use the twocolumn option of article to get a two column document. As soon as you want to insert floats, you will notice: you can't.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
pkladisios
Posts: 7
Joined: Sat Dec 26, 2015 8:49 pm

Re: Seemingly random blank lines between paragraphs

Post by pkladisios »

I thank both of you. Nice "heads up" Johannes. Inserting figures (floats) was one of my next moves.
Post Reply