Featured Book

LaTeX Beginners Guide

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 4 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Adjust vertical spaces with \lineskip instead of \parskip

Add tags Information and discussion about specific document classes and how to create your own document classes.

Adjust vertical spaces with \lineskip instead of \parskip

Postby itsmenow on Tue May 27th, 2008

Hello everyone and sorry for the complicated title, didn't know how to say it better.

My problem:
I wrote a class file for a scientific journal using a two-column layout. But testing showed that there is a problem with the adjustment of vertical space as the spaces between paragraphs sometimes simply get too large. Different settings for \parskip (e.g. \setlength{\parskip}{0.1ex \@plus.01ex \@minus.005ex}) didn't help. If I insert
Code: Select all  •  Open in writeLaTeX
\setlength{\parskip}{0.1ex}
the space between the paragraphs is always the same (as it should be) but I get different positions for the bottom of the page which doesn't look nice with two columns. Is there a possibility to adjust the vertical spaces with the lineskip instead of the parskip?

I hope someone has a solution.

Thanks in advance,
Jan
itsmenow
 
Posts: 3
Joined: Tue May 27th, 2008

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby Stefan_K on Tue May 27th, 2008

Hi Jan,

you could set \beselineskip with glue, for example:
Code: Select all  •  Open in writeLaTeX
\setlength{\baselineskip}{12pt plus 2pt minus 1pt}

Perhaps try to vary \lineskiplimit (dimen) and \lineskip (glue) too.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6336
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby itsmenow on Wed May 28th, 2008

I have already tested \baslineskip and tried the other two but there was no effect in the document.

I had some success using for example
Code: Select all  •  Open in writeLaTeX
\setlength{\parskip}{1pt plus 1pt minus 1pt}

but I appreciate to use something like
Code: Select all  •  Open in writeLaTeX
\setlength{\parskip}{1pt plus 1pt minus 0.5pt}

but the use of decimal numbers or 0s leads to bad results (large paragraph skips, uneven bottomline of text).

Anybody has an idea why?

Regards,
Jan
itsmenow
 
Posts: 3
Joined: Tue May 27th, 2008

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby Stefan_K on Wed May 28th, 2008

Hi Jan,

Code: Select all  •  Open in writeLaTeX
\setlength{\parskip}{1pt plus 1pt minus 0.5pt}
does not show that strange behaviour in my code. You could try .5pt instead of 0.5pt but probably it will be the same result.
Perhaps you could show a minimal working example for the board reader to reproduce/test it.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6336
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby itsmenow on Wed May 28th, 2008

Already tested that.

Hmm, seems to work when simply using it in a document but not in the class file.

I have another question regarding a problem with different references of figure and figure* environments. Should I post it in another thread?

Regards,
Jan
itsmenow
 
Posts: 3
Joined: Tue May 27th, 2008

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby Stefan_K on Wed May 28th, 2008

itsmenow wrote:I have another question regarding a problem with different references of figure and figure* environments. Should I post it in another thread?

Yes, feel free to open a new thread with an appropriate title, that makes it easier to find the topic later, especially by other people looking for information concerning similar problems.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6336
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby noematic.logos on Thu Jun 12th, 2008

Quick follow-up:

Stefan suggested the following code:
Code: Select all  •  Open in writeLaTeX
\setlength{\parskip}{1pt plus 1pt minus 0.5pt}


Where is there an explanation of this syntax?
Code: Select all  •  Open in writeLaTeX
1pt plus 1pt minus 0.5pt


I have the latex companion and have found the setlength reference (p.855), but this is not explained as far as I could tell.

cheers,
noematic.logos
 
Posts: 19
Joined: Thu May 15th, 2008

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby Stefan_K on Thu Jun 12th, 2008

Hi,

you will find explanation for instance in "TeX by Topic", the systematic tex reference manual by Victor Eijkhout, freely available online in pdf format. See chapter 8, Dimension and Glue, especially 8.3 More about glue. Or take the TeXbook by Donald Knuth of course.
You may find shorter explanations by using a search engine for tex and glue.

Above ist just a length of 1pt that may be stretched to 2pt or shrinked to 0.5pt.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6336
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Adjust vertical spaces with \lineskip instead of \parskip

Postby noematic.logos on Thu Jun 12th, 2008

Perfect, I'll grab these ebooks and get to reading!

cheers,
noematic.logos
 
Posts: 19
Joined: Thu May 15th, 2008

Re: Adjust vertical spaces with \lineskip instead of \parski

Postby zvonsully on Sun Jan 9th, 2011

Because "you can say \lineskiplimit=1.5in, after that TeX computes the vertical skip between two lines of text as follows: the baselines of the boxes are separated by \baselineskip, but is this would make the distance between the bottom of one box and the top of the other less than \lineskiplimit, then \lineskip is used as interline glue", setting \lineskiplimit to \baselineskip forces tex to use \lineskip (rubber length) instead of \baselineskip:
Code: Select all  •  Open in writeLaTeX

\setlength{\lineskip}{3pt plus 6pt minus 0pt}
\lineskiplimit=\baselineskip

begin{document
}...
zvonsully
 
Posts: 3
Joined: Sun Jan 9th, 2011


Return to Document Classes

Who is online

Users browsing this forum: No registered users and 4 guests