General ⇒ right-justify in table
right-justify in table
In the attached invoice latex file. I want to right-justify the four "1,000". It that possible with supertabular?
thanks in advance.
thanks in advance.
- Attachments
-
- sam.tex
- (3.96 KiB) Downloaded 321 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
right-justify in table
Hi Bill,
you could insert \raggedleft, for example:
Stefan
you could insert \raggedleft, for example:
Code: Select all
\begin{supertabular}{|m{0.8587598in}|m{4.35876in}|>{\raggedleft}
m{0.8587598in}|>{\raggedleft\arraybackslash}m{0.9316599in}|}
LaTeX.org admin
Re: right-justify in table
Thank you. The invoice looks OK now.
Another question. what is the meaning of the ">" in front of the {ragedgleft group?
regards,
Another question. what is the meaning of the ">" in front of the {ragedgleft group?
regards,
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
right-justify in table
Hi Bill,
Stefan
It inserts the command inside the following braces directly before the entry of the column. You can use it for formatting the entries. For instance if you write >{$}c<{$} instead of c for a tabular environment you will get a column in math mode. It is described by the array package documentation if you want to read further.bill wrote:what is the meaning of the ">" in front of the {ragedgleft group?
Stefan
LaTeX.org admin
Re: right-justify in table
Thank you for pointer. However, for the same invoice, how to make the caption cells (quantity/description/price/amount) to have 10% gray background?
regards,
regards,
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
right-justify in table
Hi Bill,
have a look at the colortbl package, by using that package you can color cells or rows/ columns. I am not sure if its working together with supertabular, but you could try it.
Stefan
have a look at the colortbl package, by using that package you can color cells or rows/ columns. I am not sure if its working together with supertabular, but you could try it.
Stefan
LaTeX.org admin
Re: right-justify in table
It seems to study a new package. Need more time to learn.
Tank you.
Tank you.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: right-justify in table
It's easier to read a package documentation and use the provided features instead of programming it yourself.
There's a lot of packages for many purposes, using them as ready-made solutions usually saves time and gives good results.
Stefan

There's a lot of packages for many purposes, using them as ready-made solutions usually saves time and gives good results.
Stefan
LaTeX.org admin