TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Friends, I'm using the songs package to write a songbook. Besides the lyrics part, there's also a command to create guitar tablature diagrams:


which will produce this diagram:

C Major

Now, I have the following code:









I'd like to put these diagrams side by side, like in a 2x2 tabular. Unfortunately, I couldn't manage to do it.

I suspect that the \gtab command forces a new line or something and breaks the tabular environment.

There are other packages on guitar tablatures, like songbook or gchords. But since I'm already using a package which has this feature, I'd like to stick with it.

Any ideas on how I could fix this?

share|improve this question
Have you tried with the gtab command inside a minipage? – YuppieNetworking Jul 4 '11 at 16:30
@YuppieNetworking: I tried, but I had no luck on using it. TBH, I was relying on minipage to save my code. =) – Paulo Cereda Jul 4 '11 at 16:38
up vote 4 down vote accepted

Just enclose them in braces:

{\gtab{C}{X32010}} &
{\gtab{E}{022100}} &

output of code

share|improve this answer
Thanks Alan! I had no idea of that. Cheers! =) – Paulo Cereda Jul 4 '11 at 17:56
@Paulo Braces are often a way out of these kinds of things, since they effectively limit whatever changes a macro is doing to within the braces. – Alan Munn Jul 4 '11 at 18:11
I was really unaware of, I always thought the "additional braces" wouldn't make a difference. Thanks for the great explanation! =) – Paulo Cereda Jul 4 '11 at 18:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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