### LaTeX Books

Limited discount 50%
coupon code tDRet6Y

### LaTeX users online

In total there are 8 users online :: 0 registered, 0 hidden and 8 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 8 guests

### LaTeX Friends

Sponsored by DANTE e.V.: The German speaking TeX Users Group

## increase space between lines in tabbing

### LaTeX Forum: Text Formatting

tabbingvertical-spacingAdd tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
I have a long equation inside a tabbing environment like this:
Code: Select all  •  Open in writeLaTeX
\begin{tabbing}$f(x)$ \= $= \left( \dfrac{a}{b} \right)$ \\\> $= \left( \dfrac{c}{d} \right)$ \\\end{tabbing}

This works nice, but parenthesis from these two lines touch each other (as well as b and c).
How to separate them?
Attachments
badimage.gif (1.92 KiB) Viewed 3207 times
Last edited by Stefan_K on Sat Jan 26th, 2013, edited 1 time in total.
Reason: inline code changed to code block
white_owl

Posts: 12
Joined: Wed Apr 21st, 2010

The quickest way is using the optional argument to \\ for adding vertical space:
Code: Select all  •  Open in writeLaTeX
\begin{tabbing}$f(x)$ \= $= \left( \dfrac{a}{b} \right)$ \\[1ex]\> $= \left( \dfrac{c}{d} \right)$ \\\end{tabbing}

Stefan

Stefan_K

Posts: 7358
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

white_owl wrote:I have a long equation inside a {tabbing} environment […]

Is there a special reason why don't use the align* environment from amsmath?
Code: Select all  •  Open in writeLaTeX
\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage{mathtools}  % loads »amsmath«\begin{document}  \begin{align*}    f(x) &= \left(\frac{a}{b}\right) \\         &= \left(\frac{c}{d}\right)  \end{align*}\end{document}

Thorsten
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Thank you, Stefan_K. Your solution works wonderfully.

localghost, The reason why I do not use align* is because I did not know about it. Looks promising, probably I will use in the future. The main problem of TeX - too many packages and not enough documentation for them.
But what I see from your example - the align* also centers the equations. What if I do not want that? How to move the equations to the left side of the page?
white_owl

Posts: 12
Joined: Wed Apr 21st, 2010

white_owl wrote:too many packages and not enough documentation for them.

Most packages are well documented. Do you read documentation? In this case, besides the excellent mathmode document, the amsmath manual is relevant. Every good introduction, tutorial and book should mention amsmath. Perhaps you did not read one. No problem, but in this case better not judge on TeX.

white_owl wrote:How to move the equations to the left side of the page?

Both linked documentation would tell you that: you could simply use the class option fleqn (flush left equations), such as

Code: Select all  •  Open in writeLaTeX
\documentclass[fleqn]{article}

Stefan

Stefan_K

Posts: 7358
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

white_owl wrote:too many packages and not enough documentation for them.

Most packages are well documented. Do you read documentation? In this case, besides the excellent mathmode document, the amsmath manual is relevant. Every good introduction, tutorial and book should mention amsmath. Perhaps you did not read one. No problem, but in this case better not judge on TeX.
Ok, can I judge texdoc in this case?
I learned about amsmath package from looking at some examples. It was mentioned as a good source for math symbols so I use it... Then I tried to read documentation for that package I typed texdoc amsmath and got the PDF with "The amsmath package, Version 2.13, 2000/07/18" on the first page. It is a very technical text which can be useful if you would like to reverse engineer the package but it is definitely not a user-friendly documentation.
The documentation you are referring to is called "amsldoc" and sure, if I run texdoc amsldoc I am finally able to read documentation for amsmath. But how am I supposed to know that user guide for amsmath package is called amsldoc and not amsmath - is beyond me. How did you learned that?
white_owl

Posts: 12
Joined: Wed Apr 21st, 2010

white_owl wrote:Ok, can I judge texdoc in this case?

If you don't use an outdated version, but a new one. Wich version of TeX do you have installed?

In current versions texdoc amsmath works fine and opens amsldoc. I tested with TeX Live 2012 and 2011, possibly it worked also earlier. You can test it online on texdoc.net. My link above is based on it. There's a quick search feature for the browser if you don't want to update your local TeX.

texdoc is a great tool for working with the documentation. It's based on filenames, but sometimes developers choose difficult names, as it's the case with amsmath. So somebody added an exception for amsmath, and there were also synonyms introduced.

Stefan

Stefan_K

Posts: 7358
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

white_owl wrote:[…] The main problem of TeX - too many packages and not enough documentation for them. […]

Here I have to disagree vigorously. The vast majority of the packages (>90%) are documented very good. So I can't comprehend these concerns.
white_owl wrote:[…] But what I see from your example - the align* also centers the equations. What if I do not want that? How to move the equations to the left side of the page?

The amsmath package also provides the flalign* environment which allows to align equations individually to the left margin.
Code: Select all  •  Open in writeLaTeX
\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage{mathtools}  % loads »amsmath«\begin{document}  Preceding Text  \begin{flalign*}    f(x) &= \left(\frac{a}{b}\right) &\\         &= \left(\frac{c}{d}\right) &  \end{flalign*}  Following Text\end{document}

The environment is also described in the document I mentioned earlier.
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Stefan_K wrote:
white_owl wrote:Ok, can I judge texdoc in this case?

If you don't use an outdated version, but a new one. Wich version of TeX do you have installed?

In current versions texdoc amsmath works fine and opens amsldoc. I tested with TeX Live 2012 and 2011, possibly it worked also earlier.
I have texlive "2009-11 squeeze1". The one which is distributed by Debian's repository.

Stefan_K wrote:You can test it online on texdoc.net.
Thank you very much. It looks like it would be my primary search engine from now on.
white_owl

Posts: 12
Joined: Wed Apr 21st, 2010

### Topic Tags

tabbingvertical-spacing