Math & Sciencevertical spacing gather

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: vertical spacing gather

Post by Johannes_B »

To be completely honest, i would like to help you and provide a solution, I just don't see the problem.
Your MWE seems to be perfectly fine. Maybe state, what you want to achieve in more detail.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Michael7496
Posts: 14
Joined: Thu Aug 15, 2013 9:42 am

vertical spacing gather

Post by Michael7496 »

@cgnieder
What do you mean by not being precise enough? I was very precise enough. Maybe my English is not good. You have to read my first question and then you can see that I want to change the minimum vertical distance between two lines globally. I gave a minimum example and I gave a "maximum" example. Here again is the "maximum" example:

Code: Select all

\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}

\begin{document}
	\begin{gather*}
		\begin{array}{rl}
			\begin{array}{c}
				\dfrac{a}{b \cdot \dfrac{a}{b \cdot \dfrac{a}{b \cdot \dfrac{a}{b}}}}\\
				\dfrac{a \cdot \dfrac{a \cdot \dfrac{a \cdot \dfrac{a}{b}}{b}}{b}}{b}\\
				\dfrac{c}{d}\\
				a = b
			\end{array}
			&
			\begin{array}{rl}
				a & $this is an a$\\
				b & $this in a b$\\
				c & $this is a c$\\
				d & $this is a d$
			\end{array}
		\end{array}
	\end{gather*}
\end{document}
And don't forget the key words: minimum vertical distance global.
Michael7496
Posts: 14
Joined: Thu Aug 15, 2013 9:42 am

vertical spacing gather

Post by Michael7496 »

@Johannes_B
My problem is:
There should be a variable/constant like \minimumVerticalDistanceBetweenTwoCharacters used by gather to set the minimum vertical distance between two characters. And I want to change that variable/constant. That variable/constant could exist just like \arraystretch is existing.
Maybe a variable/constant like that is existing or there is an other way to achieve a result like setting a variable/constant. I don't know. That's why I'm here.
But what I do know is that the proposals until now were not solutions.
Last edited by cgnieder on Tue Aug 20, 2013 12:25 am, edited 1 time in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

vertical spacing gather

Post by cgnieder »

The example is part of the question and as such part of what we interpret. They are mixing two different ways of alignment: 1) multiline displayed formulas ({gather}) and {array} which is the math equivalent of a {tabular}. Both are adjusted differently. The vertical spacing between lines of multiline displayed equations is controlled by the length \jot (default 3pt) which doesn't affect {array}, though:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{gather}
  a = b \\
  a = b
\end{gather}

\[
\begin{array}{c}
  a =b \\
  a =b
\end{array}
\]

\setlength\jot{1cm}
\begin{gather}
  a = b \\
  a = b
\end{gather}

\[
\begin{array}{c}
  a =b \\
  a =b
\end{array}
\]

\end{document}
This length influences all multiline formulas, though, such as {align} for example. {array} is influenced by \arraystretch (default 1) which does not affect the multiline environments:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{gather}
  a = b \\
  a = b
\end{gather}

\[
\begin{array}{c}
  a =b \\
  a =b
\end{array}
\]

\renewcommand\arraystretch{2}
\begin{gather}
  a = b \\
  a = b
\end{gather}

\[
\begin{array}{c}
  a =b \\
  a =b
\end{array}
\]

\end{document}
It does, however, influence {tabular} and other table environments:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{tabular}{c}
  a b \\
  a b
\end{tabular}

\[
\begin{array}{c}
  a =b \\
  a =b
\end{array}
\]

\renewcommand\arraystretch{2}

\[
\begin{array}{c}
  a =b \\
  a =b
\end{array}
\]

\begin{tabular}{c}
  a b \\
  a b
\end{tabular}

\end{document}
Hope this helps a bit.

Regards
site moderator & package author
Michael7496
Posts: 14
Joined: Thu Aug 15, 2013 9:42 am

Re: vertical spacing gather

Post by Michael7496 »

ok. Now I see my problem. The problem is that I confused gather with array. I will open a new thread with the real topic "vertical spacing array".
How can I delete this thread?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: vertical spacing gather

Post by Stefan Kottwitz »

No need to delete. It's marked as solved, and perhaps some code or explanation helps somebody who comes here via google.

That's why it's a public forum, to collect information and solutions, besides the personal support. Similar in German at http://texwelt.de/ , as I noticed you posted in German. You are welcome there too. Well, I would post a suggestion for the touching fractions problem there. ;-)

Stefan
LaTeX.org admin
Post Reply