ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Table setups interfering with another table?
@ 2015-09-01 10:25 Mari Voipio
  2015-09-01 11:43 ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 3+ messages in thread
From: Mari Voipio @ 2015-09-01 10:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

Hello!

I have a bit of a table mystery. It seems that the setups of an
earlier table interfere with the table coming after it (in the real
thing there's text between the tables, but the behaviour is the same).
Each table looks fine by itself, but if I compile a file with both,
the second one looks weird. What is it that I don't see or understand?

And yes, the tables really need to look like that. I'm recreating from
a pdf a document that is probably made with Word and this is how
they've done their tables in the original.

I admit that my ConTeXt version isn't exactly the newest available, it
is dated 2015.02.03. If the combination of tables works in newer
versions, I'll update, otherwise I'm not keen to fiddle with a working
combo.


As always, I'll be grateful for any help I can get,


Mari

[-- Attachment #2: table_test_both.pdf --]
[-- Type: application/pdf, Size: 10197 bytes --]

[-- Attachment #3: table_test_first.pdf --]
[-- Type: application/pdf, Size: 8938 bytes --]

[-- Attachment #4: table_test_second.pdf --]
[-- Type: application/pdf, Size: 8418 bytes --]

[-- Attachment #5: table_test.tex --]
[-- Type: application/x-tex, Size: 1575 bytes --]

[-- Attachment #6: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Table setups interfering with another table?
  2015-09-01 10:25 Table setups interfering with another table? Mari Voipio
@ 2015-09-01 11:43 ` Procházka Lukáš Ing. - Pontex s. r. o.
  2015-09-03  7:36   ` Mari Voipio
  0 siblings, 1 reply; 3+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-09-01 11:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]

Hello Mari,

I can see two ways:

1. Enclose each table into \bgroup ... \egroup scope, so all \setupTABLE will be treated local (table_test.mkiv).

2. Perform all setups right after \bTABLE (table_test2.mkiv). This is not applicable in all cases (e.g. \bTABLE[width=\textwidth] must be done here, not later) but in you case - you just setup specific columns and row, which can be done after \bTABLE safely. I deduce that each \bTABLE .... \eTABLE creates a group, so all initializations done within remain local.

See my attempts.

Best regards,

Lukas



On Tue, 01 Sep 2015 12:25:03 +0200, Mari Voipio <mari.voipio@iki.fi> wrote:

> Hello!
>
> I have a bit of a table mystery. It seems that the setups of an
> earlier table interfere with the table coming after it (in the real
> thing there's text between the tables, but the behaviour is the same).
> Each table looks fine by itself, but if I compile a file with both,
> the second one looks weird. What is it that I don't see or understand?
>
> And yes, the tables really need to look like that. I'm recreating from
> a pdf a document that is probably made with Word and this is how
> they've done their tables in the original.
>
> I admit that my ConTeXt version isn't exactly the newest available, it
> is dated 2015.02.03. If the combination of tables works in newer
> versions, I'll update, otherwise I'm not keen to fiddle with a working
> combo.
>
>
> As always, I'll be grateful for any help I can get,
>
>
> Mari
>


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

[-- Attachment #2: table_test.mkiv --]
[-- Type: application/octet-stream, Size: 1675 bytes --]

\starttext

\bgroup
  \setupTABLE[c][each][frame=off,align=low]
  \setupTABLE[r][1,3][topframe=on]
  \setupTABLE[r][10][bottomframe=on]
  \setupTABLE[c][2][leftframe=on]
  \setupTABLE[c][4][rightframe=on]
  \setupTABLE[c][2,3,4][width=3cm]
  \setupTABLE[c][1][topframe=off,bottomframe=off]
  \bTABLE
  \bTR \bTD \eTD \bTD Selected range:\crlf (NS/W)* \eTD \bTD Calculated water: W* (g) \eTD \bTD Wadd (g) \eTD \eTR
  \bTR \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \eTR
  \bTR \bTD 1 \eTD \bTD 1,90 \eTD \bTD 16,78 \eTD \bTD 0,00 \eTD \eTR
  \bTR \bTD 2 \eTD \bTD 1,6 \eTD \bTD 19,91 \eTD \bTD 3,13 \eTD \eTR
  \bTR \bTD 3 \eTD \bTD 1,2 \eTD \bTD 26,54 \eTD \bTD 9,76 \eTD \eTR
  \bTR \bTD 4 \eTD \bTD 1 \eTD \bTD 31,85 \eTD \bTD 15,07 \eTD \eTR
  \bTR \bTD 5 \eTD \bTD 0,7 \eTD \bTD 45,50 \eTD \bTD 28,72 \eTD \eTR
  \bTR \bTD 6 \eTD \bTD 0,4 \eTD \bTD 19,63 \eTD \bTD 62,85 \eTD \eTR
  \bTR \bTD 7 \eTD \bTD 0,2 \eTD \bTD 159,25 \eTD \bTD 142,47 \eTD \eTR
  \bTR \bTD 8 \eTD \bTD 0 \eTD \bTD \eTD \bTD \eTD \eTR
  \eTABLE
\egroup

\blank

\bgroup
  \setupTABLE[c][each][frame=off]
  \setupTABLE[c][1][leftframe=on]
  \setupTABLE[c][3][rightframe=on]
  \setupTABLE[r][1][topframe=on]
  \setupTABLE[r][6][bottomframe=on]
  \bTABLE
  \bTR \bTD Temperature (C) \eTD \bTD Grut (SG) \eTD \bTD Wavrinecz (SV) \eTD \eTR
  \bTR \bTD 50 \eTD \bTD 262.0 \eTD \bTD 258.63 \eTD \eTR
  \bTR \bTD 55 \eTD \bTD 277.0 \eTD \bTD 272.81 \eTD \eTR
  \bTR \bTD 60 \eTD \bTD 293.0 \eTD \bTD 288.56 \eTD \eTR
  \bTR \bTD 65 \eTD \bTD 311.0 \eTD \bTD 305.96 \eTD \eTR
  \bTR \bTD 70 \eTD \bTD 331.0 \eTD \bTD 325.15 \eTD \eTR
  \eTABLE
\egroup


\stoptext

[-- Attachment #3: table_test.pdf --]
[-- Type: application/pdf, Size: 9963 bytes --]

[-- Attachment #4: table_test2.mkiv --]
[-- Type: application/octet-stream, Size: 1695 bytes --]

\starttext

  \bTABLE
    \setupTABLE[c][each][frame=off,align=low]
    \setupTABLE[r][1,3][topframe=on]
    \setupTABLE[r][10][bottomframe=on]
    \setupTABLE[c][2][leftframe=on]
    \setupTABLE[c][4][rightframe=on]
    \setupTABLE[c][2,3,4][width=3cm]
    \setupTABLE[c][1][topframe=off,bottomframe=off]
    \bTR \bTD \eTD \bTD Selected range:\crlf (NS/W)* \eTD \bTD Calculated water: W* (g) \eTD \bTD Wadd (g) \eTD \eTR
    \bTR \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \eTR
    \bTR \bTD 1 \eTD \bTD 1,90 \eTD \bTD 16,78 \eTD \bTD 0,00 \eTD \eTR
    \bTR \bTD 2 \eTD \bTD 1,6 \eTD \bTD 19,91 \eTD \bTD 3,13 \eTD \eTR
    \bTR \bTD 3 \eTD \bTD 1,2 \eTD \bTD 26,54 \eTD \bTD 9,76 \eTD \eTR
    \bTR \bTD 4 \eTD \bTD 1 \eTD \bTD 31,85 \eTD \bTD 15,07 \eTD \eTR
    \bTR \bTD 5 \eTD \bTD 0,7 \eTD \bTD 45,50 \eTD \bTD 28,72 \eTD \eTR
    \bTR \bTD 6 \eTD \bTD 0,4 \eTD \bTD 19,63 \eTD \bTD 62,85 \eTD \eTR
    \bTR \bTD 7 \eTD \bTD 0,2 \eTD \bTD 159,25 \eTD \bTD 142,47 \eTD \eTR
    \bTR \bTD 8 \eTD \bTD 0 \eTD \bTD \eTD \bTD \eTD \eTR
  \eTABLE

\blank

  \bTABLE
    \setupTABLE[c][each][frame=off]
    \setupTABLE[c][1][leftframe=on]
    \setupTABLE[c][3][rightframe=on]
    \setupTABLE[r][1][topframe=on]
    \setupTABLE[r][6][bottomframe=on]
    \bTR \bTD Temperature (C) \eTD \bTD Grut (SG) \eTD \bTD Wavrinecz (SV) \eTD \eTR
    \bTR \bTD 50 \eTD \bTD 262.0 \eTD \bTD 258.63 \eTD \eTR
    \bTR \bTD 55 \eTD \bTD 277.0 \eTD \bTD 272.81 \eTD \eTR
    \bTR \bTD 60 \eTD \bTD 293.0 \eTD \bTD 288.56 \eTD \eTR
    \bTR \bTD 65 \eTD \bTD 311.0 \eTD \bTD 305.96 \eTD \eTR
    \bTR \bTD 70 \eTD \bTD 331.0 \eTD \bTD 325.15 \eTD \eTR
  \eTABLE


\stoptext

[-- Attachment #5: table_test2.pdf --]
[-- Type: application/pdf, Size: 9971 bytes --]

[-- Attachment #6: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Table setups interfering with another table?
  2015-09-01 11:43 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-09-03  7:36   ` Mari Voipio
  0 siblings, 0 replies; 3+ messages in thread
From: Mari Voipio @ 2015-09-03  7:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Sep 1, 2015 at 2:43 PM, Procházka Lukáš Ing. - Pontex s. r. o.
<LPr@pontex.cz> wrote:
>
> 2. Perform all setups right after \bTABLE (table_test2.mkiv). This is not
> applicable in all cases (e.g. \bTABLE[width=\textwidth] must be done here,
> not later) but in you case - you just setup specific columns and row, which
> can be done after \bTABLE safely. I deduce that each \bTABLE .... \eTABLE
> creates a group, so all initializations done within remain local.

This solved the problem. Once I'd moved all \bTABLE commands up above
the setups, all tables behaved as intended.

Thank you very much!

Mari
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-03  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 10:25 Table setups interfering with another table? Mari Voipio
2015-09-01 11:43 ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-09-03  7:36   ` Mari Voipio

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).