* A few natural table issues
@ 2007-07-21 23:47 Brian R. Landy
0 siblings, 0 replies; only message in thread
From: Brian R. Landy @ 2007-07-21 23:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1969 bytes --]
Hi, I've noticed a few issues with natural tables.
1. Embedding images into tables do not scale correctly using recent
ConTeXt releases. They do using the TeXLive 2007 version
(2007.01.12). It does not matter whether I use factor=max or fit. I
find I need to use the \vbox{\noindent{...}} structure to make the
picture obey table's align= setups. test1.tex and weight.eps/pdf
demonstrate this behavior. I attached pdf's to show the "good"
behavior.

2. Background colors & frames -- bottomframe on a cell is obscured by
a background color on the cell below. Similarly, a rightframe is
obscured by a backgroundcolor to the cell to the right. test2.tex
demonstrates this behavior.

3. Using \chardef\characteralignmentmode=2 widens columns and doesn't
quite center the data. It appears as if the decimal is centered, but
this does not necessarily center the text. The top row shows tables
without setting the alignment mode, the second row of tables show
what happens when it is set equal to 2. It would be nice if the left-
hand tables looked the same, and the bottom right were centered
better. test3.tex demonstrates this.

4. I was wondering if anyone had any pointers on improving
performance and reducing memory usage with natural tables. Are there
particular options or settings to avoid, and so on? I'm using Perl
scripts to generate the ConTeXt code, so tend to output many
setupTABLE commands. I have some tables which can take a minute or
two to render for one page, and might have a document with 15 pages,
so it takes some time. I saw some recent postings regarding
linetables; I did not use them initially given they did not seem
actively used and natural tables provide all the features I need; but
I would be willing to give them a try if I understood what
limitations they might have relative to natural tables.
Many thanks!
Brian
[-- Attachment #1.2.1: Type: text/html, Size: 1238 bytes --]
[-- Attachment #1.2.2: test1.tex --]
[-- Type: application/octet-stream, Size: 526 bytes --]
\newdimen\pageleft%
\starttext%
\start%
\bTABLE[align={middle,lohi},frame=on,width=3.0in,height=1.0in]%
\bTR%
\bTD{1-1}\eTD%
\bTD{2-1}\eTD%
\eTR%
\bTR%
\bTD{1-2}\eTD%
\bTD{\vbox{\noindent\externalfigure[./weight][factor=max,,location=middle]}}\eTD%
\eTR%
\eTABLE%
\stop%
\par
\start%
\bTABLE[align={middle,lohi},frame=on,width=1.0in,height=2.0in]%
\bTR%
\bTD{1-1}\eTD%
\bTD{2-1}\eTD%
\eTR%
\bTR%
\bTD{1-2}\eTD%
\bTD{\vbox{\noindent\externalfigure[./weight][factor=max,,location=middle]}}\eTD%
\eTR%
\eTABLE%
\stop%
\stoptext%
[-- Attachment #1.2.3: weight.pdf --]
[-- Type: application/pdf, Size: 8347 bytes --]
[-- Attachment #1.2.4: test1-good.pdf --]
[-- Type: application/octet-stream, Size: 26875 bytes --]
[-- Attachment #1.2.5: Type: text/html, Size: 841 bytes --]
[-- Attachment #1.2.6: test2.tex --]
[-- Type: application/octet-stream, Size: 713 bytes --]
\setupcolors[state=start]%
\definecolor[ice][r=0.867, g=0.945, b=0.973, s=0.9]%
\starttext
\bTABLE[align=middle,background=color,frame=off]%
\bTR[bottomframe=on]%
\bTH{test1}\eTH%
\bTH{test2}\eTH%
\eTR%
\bTR%
\bTH[rightframe=on]{test1}\eTH%
\bTH{test2}\eTH%
\eTR%
\eTABLE%
\crlf%
\crlf%
\bTABLE[align=middle,background=color,frame=off]%
\bTR[bottomframe=on]%
\bTH{test1}\eTH%
\bTH{test2}\eTH%
\eTR%
\bTR%
\bTH[rightframe=on]{test1}\eTH%
\bTH[backgroundcolor=ice]{test2}\eTH%
\eTR%
\eTABLE%
\crlf%
\crlf%
\bTABLE[align=middle,background=color,frame=off]%
\bTR%
\bTH{test1}\eTH%
\bTH{test2}\eTH%
\eTR%
\bTR[topframe=on]%
\bTH{test1}\eTH%
\bTH[backgroundcolor=ice,leftframe=on]{test2}\eTH%
\eTR%
\eTABLE%
\stoptext%
[-- Attachment #1.2.7: Type: text/html, Size: 1053 bytes --]
[-- Attachment #1.2.8: test3.tex --]
[-- Type: application/octet-stream, Size: 1454 bytes --]
\starttext
\hbox{
\framed[width=1.5in,frame=off,align=flushleft]{
\bTABLE
\setupTABLE[column][1][align=right]
\setupTABLE[column][2][alignmentcharacter={.},aligncharacter=yes,align=middle]
\bTR \bTH A \eTH \bTH B \eTH \eTR
\bTR \bTD First \eTD \bTD 71 \eTD \eTR
\bTR \bTD Second \eTD \bTD 43 \eTD \eTR
\bTR \bTD Total \eTD \bTD 115 \eTD \eTR
\eTABLE
}
\framed[width=1.5in,frame=off,align=flushleft]{
\bTABLE
\setupTABLE[column][1][align=right]
\setupTABLE[column][2][alignmentcharacter={.},aligncharacter=yes,align=middle]
\bTR \bTH A \eTH \bTH B \eTH \eTR
\bTR \bTD First \eTD \bTD 71.0 \eTD \eTR
\bTR \bTD Second \eTD \bTD 43 \eTD \eTR
\bTR \bTD Total \eTD \bTD 115 \eTD \eTR
\eTABLE
}
}
\crlf
\hbox{
\framed[width=1.5in,frame=off,align=flushleft]{
\bTABLE
\setupTABLE[column][1][align=right]
\setupTABLE[column][2][alignmentcharacter={.},aligncharacter=yes,align=middle]
\chardef\characteralignmentmode=2
\bTR \bTH A \eTH \bTH B \eTH \eTR
\bTR \bTD First \eTD \bTD 71 \eTD \eTR
\bTR \bTD Second \eTD \bTD 43 \eTD \eTR
\bTR \bTD Total \eTD \bTD 115 \eTD \eTR
\eTABLE
}
\framed[width=1.5in,frame=off,align=flushleft]{
\bTABLE
\setupTABLE[column][1][align=right]
\setupTABLE[column][2][alignmentcharacter={.},aligncharacter=yes,align=middle]
\chardef\characteralignmentmode=2
\bTR \bTH A \eTH \bTH B \eTH \eTR
\bTR \bTD First \eTD \bTD 71.0 \eTD \eTR
\bTR \bTD Second \eTD \bTD 43 \eTD \eTR
\bTR \bTD Total \eTD \bTD 115 \eTD \eTR
\eTABLE
}
}
\stoptext
[-- Attachment #1.2.9: Type: text/html, Size: 1681 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-21 23:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-21 23:47 A few natural table issues Brian R. Landy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).