[XeTeX] XeTeX Digest, Vol 75, Issue 34
Ross Moore
ross.moore at mq.edu.au
Mon Jun 14 08:08:07 CEST 2010
Hi Alan, and Ashok,
On 14/06/2010, at 2:23 PM, Alan Munn wrote:
> This isn't really a XeLaTeX question, but a very elementary latex question. There are so many things wrong with the table you posted it's hard to know where to start.
I think you may be being a bit harsh here.
It looks to me like every \ has been stripped out,
except for \\ being reduced to a single backslash.
This could have been the result of some badly written filter
having been applied to the email message as a whole, rather
than it having started with very poorly-written LaTeX coding.
When the missing \ characters are inserted --- hopefully
finding them all --- then the resulting table isn't too
bad. The main problems are:
1. '-' signs should be in math, not text;
simpleset way to fix this is:
\usepackage{amsmath,array}% in the preamble
setup the columns this way:
\begin{tabular}{|c|c|>{$}c<{$}|>{$}r<{$}|>{$}c<{$}|>{$}r<{$}|>{$}r<{$}|c|c|}
and remove unnecessary $s from some of the header cells.
2. the whole thing is a bit too wide
use \addtolength{\tabcolsep}{-2.5pt} % adjust the length to suit
as a way to reduce the space between cells;
3. some of the header cells can be improved,
concerning the alignment and vertical lines.
4. the horizontal lines are not really needed,
but it isn't wrong to be using them.
Hope this helps,
Ross
Oh; and fix that backslash filtering before posting
source code again.
> First, you should find some good introductory material on latex generally, since the code below shows that you haven't really got the faintest idea about basic issues.
>
> Some comments:
>
> multicolumn -> \multicolumn
>
> you can't have spaces/tabs between a \ and the rest of the command (e.g. most of your \hlines)
>
> table rows must end with \\
>
> (tables with lines are generally considered bad formatting. Try using the booktabs package.)
>
> When you've fixed these issues (and read some basic things about latex) your question will probably be answered by itself.
>
> Make a small table and see how the different commands work, for practice.
>
> Alan
>
> On Jun 13, 2010, at 10:04 PM, ashok kumar khanda wrote:
>
>> begin{tabular}{|c|c|c|c|c|c|c|c|c|}hline
>> % after \: hline or cline{col1-col2} cline{col3-col4} ...
>> {} &{} & {} & multicolumn{2}{c}{$(triangle E_B)_g$} & {} &{}& multicolumn{1}{c}{$M_B$} \
>> cline{4-6} cline{8-9}
>> Baryon & $E_B$ & $(triangle E_B)_{cm}$ & $(triangle E_B)^m_g$ & $(triangle E_B)^e_g$ & Total & $(delta M_B)_chi$ & Calculation & Expt.
>> \hline
>> N & 1507.335& -191.467 & -99.851 & 0 & -99.851 & -276.017 & 940 & 940 \
>> hline
>> $triangle$ & 1507.335 & -191.467 & 99.851 & 0 & 99.851 &-183.719 & 1232 & 1232
>> \ hline
>> $Lambda$ & 1622.074 & -192.833 & -99.851 & -46.769 &-146.62& -166.621 & 1116 & 1116
>> \ hline
>> $sum$ & 1622.074 & -192.833 & -91.938 & -46.769 & -138.707 &-97.718 & 1192.816 & 1193
>> \ hline
>> $sum^*$ & 1622.074 & -192.833 & 95.893 & -46.769 &49.124& -97.718 & 1380.647 & 1385
>> \ hline
>> $Xi$ & 1736.812 & -193.996 & -90.312 & -46.769 & -137.081& -82.537 & 1323.198 & 1321
>> \ hline
>> $Xi^*$ & 1736.812 & -193.996 & 97.516 & -46.769 & 50.747 & -82.537 & 1517.026 & 1533
>> \ hline
>> $Omega^-$ & 1851.551 & -194.999 & 104.719 & 0 & 104.719& -79.139 & 1682.132 & 1672
>> \ hline
>>
>> end{tabular}
>
> --
> Alan Munn
> amunn at gmx.com
>
>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
------------------------------------------------------------------------
Ross Moore ross.moore at mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
More information about the XeTeX
mailing list