4

I wish to know how to set the following:

  • height of a text line in paragraph (is it fontsize?)
  • height of space between text lines in paragraph (\baselineskip - fontsize?)
  • height of space before and after a paragraph
  • height of a text line in section/chapter/part name
  • height of space between text lines in section/chapter/part name
  • height of space before and after a section/chapter/part name
  • height of space before and after an environment (equation, figure, itemize)

I know how to add \vspace{<value>}, but I don't know where, I don't know how to overwrite defaults. I prefer to define all those values in one place (at the beginning of the document) and use them by own environments/commands (\mysection{}) or even better by standard environments/commands (\section{}). Can someone show me how to do it?

Post Scriptum: It is easy to close question and say: it is duplicate. In a previous question How to align lines on facing pages? I asked about putting text lines on grid, it was closed, although there is no good answer on this forum. Grid System in LaTeX - is useless, because grid package doesn't work well. I badly need to align text on grid. If there is no good automatic solution I want to do it manually by setting heights and all spaces (after and before) between elements of documents. Please answer, don't close!

  • 3
    Welcome (again) to TeX.SE! The values of virtually all parameters you mention in your posting depend on (i) the document class you use and (ii) the default font size that's in effect. There are three possible default font sizes -- 10pt, 11pt, and 12 pt -- in the basic LaTeX document classes article, report, and book, but many more sizes in classes such as memoir. Please advise on your setup. – Mico Oct 10 '13 at 9:19
  • 3
    @novice Many TeX users admire Knuth's work, but those of us who have worked with TeX a lot certainly know he's fallable. There are lots of things that one might do differently with hindsight. – Joseph Wright Oct 10 '13 at 10:19
  • 2
    To quote the author of the memoir manual (p. 431): "TeX is designed to handle arbitrary sized inserts, like those for maths, tables, sectional divisions and so forth, in an elegant manner. It does this by allowing vertical spaces on a page to stretch and shrink a little so that the actual height of the type block is constant. ... Generally speaking, TeX is not designed to typeset on a fixed grid ... Attempts have been made to tweak LaTeX to typeset on a fixed grid but as far as I know nobody has been completely successful." That said, there are reportedly some ConTeXt-based grid solutions. – Mico Oct 10 '13 at 11:53
  • 1
    @novice You are very stupid if you think that stretching glue is a very stupid idea. This is a solution that does not fit your requirements but this does not make it stupid. – Paul Gaborit Oct 10 '13 at 12:05
  • 1
    Hi @novice, and Welcome again to TeX.SX! We really pride ourselves of our friendliness here and I'm sure I speak for all of us, we're very sorry if you felt unwelcomed. (BTW, I'm the one who flagged your first post, for the reason pointed out by Tobjørn T. in a comment to your post on Grid System in LaTeX). I'd suggest you to follow jon's advice in your closed question and to give ConTeXt a try (take a look at some of the highest voted questions with the {context} flag). – henrique Oct 10 '13 at 14:14
15

height of a text line in paragraph (is it fontsize?)

You don't set it, it depends on what's in the line. In general it's not the font size.

height of space between text lines in paragraph (\baselineskip - fontsize?)

The distance between baselines is fixed according to the value of the parameter \baselineskip, but it may be increased if the lines are too close to each other. This means that \baselineskip - dp - ht < \lineskiplimit, where dp is the depth of the line above and ht is the height of the line below. When this happens, the distance between the baselines will be dp + ht + \lineskip.

height of space before and after a paragraph

Before a paragraph, TeX inserts glue in the amount of \parskip. No vertical space is added at the end, in addition to the interline glue determined as above.

height of a text line in section/chapter/part name

This depends on the font size of the title.

height of space between text lines in section/chapter/part name

This depends on the settings established by the document class.

height of space before and after a section/chapter/part name

This depends on the settings established by the document class.

height of space before and after an environment (equation, figure, itemize)

Before a one line equation TeX may insert \abovedisplayskip or \abovedisplayshortskip; after it it will insert \belowdisplayskip or \belowdisplayshortskip. It will choose the “short” parameters if the length of the line preceding the display is short, according to rather complex rules you find in the TeXbook. For multiline displays, always the non “short” parameters will be used.

LaTeX defines various parameters for float placement, in particular \intextsep above or below the float (only one place if it's a top or bottom float).

For lists such as itemize, the parameters to look at are \topsep and \partopsep.

This said, I'd not be surprised if this question will be closed as “Too broad”.

  • 3
    @novice Please, have a look at the LaTeX companion, the LaTeX manual and the commented source of LaTeX. You'll find plenty of material about your problems. Your statement that “complicated things are easy in LaTeX” is, unfortunately, too bold. – egreg Oct 10 '13 at 13:30
  • 4
    @novice Grid typesetting is not simple, that's the reason. – egreg Oct 10 '13 at 13:51
  • 3
    @novice The point with those lengths, etc., is that they are defined by a document class, equivalent to say a tempalte in Word. Thus there is no 'general' answer: you have to check what that particular class uses. LaTeX2e (current LaTeX) doesn't make this as simple as having a file with a big list of lengths, so you do need to look at the class you use. – Joseph Wright Oct 10 '13 at 14:13
  • 4
    @novice No, it's not as you think. TeX has been designed for typesetting mathematics and grid typesetting with mathematics is really hard. The model is completely different than the one of Scribus or the most common word processors. Why can't you trust my 25 year experience with TeX? – egreg Oct 10 '13 at 14:14
  • 3
    @novice It has been already discussed here many times about the ease of use. What you call easy and beautiful are terrible standards introduced by MS Word, Scribus etc. as if they were right. But they are not. Same holds for book desing by InDesign etc. typograhy is extremely difficult and if you check the font prices you will see why it is so. There are so many things you need to consider and TeX provides ways to most! of them. Grid typesetting involves many moving parts and those suites discard most of them as fixed quantities. Hence the mismatch in perception. – percusse Oct 10 '13 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.