ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \definetextbackground does not fill tables within
@ 2018-08-13 21:37 dxpublica
  2018-08-13 22:14 ` Alan Braslau
  2018-08-14  7:49 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: dxpublica @ 2018-08-13 21:37 UTC (permalink / raw)
  To: ntg-context

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

Hi,

I have simple document which I define my \definetextbackground: 
\startteoria and \stopteoria (see below). When I use it and put table 
within, the table does not get filled with color. Any solution?

Thanks in advance,
Xavier

\definecolor[teoriacolor][lightgray]

\definetextbackground[bteoria][
     frame=off,
     location=paragraph,
     background=color,
     backgroundcolor=teoriacolor, % fins aquí provat: 
http://www.mail-archive.com/ntg-context%40ntg.nl/msg78014.html
     %width=broad,
     %corner=round,
     %radius=5ex,
     leftoffset=10pt,rightoffset=10pt,
     topoffset=10pt,bottomoffset=10pt
     %offset=-5pt
     ]

\definestartstop[teoria][before={\begingroup\blank[big]\testpage[2]\starttextbackground[bteoria]},after={\stoptextbackground\blank[big]\endgroup}]


\starttext

\startteoria
\input tufte

\placetable[force,none][taula:teoria:1]{Recopilació de dades. Conceptes 
fonamentals}{
\starttable[|l|p(.6\textwidth)|]
\NC Població: \NC Són {\em tots} els elements que són objecte d'estudi 
\NC \FR
\HL
\NC Mostra: \NC La {\em part} de la població de la qual recopilem les 
dades i estudiam.

Poques vegades coincideix amb la població. Una bona mostra necessita ser 
suficientment heterogènia per a poder representar la població.

Es pot determinar el tamany mínim necessari per a què una mostra tengui 
la representativitat necessària amb un marge d'error. \NC \MR
\HL
\NC Grandària: \NC {\em Nombre} d'elements de la població o de la 
mostra. \NC \MR
\HL
\NC Variable estadística: \NC Cadascuna de les {\em propietats} o 
característiques que volem estudiar d'un conjunt de dades. \NC \LR
\stoptable}

Existeixen dues branques de l'estadística:

\startitemize
\item L'{\em estadística descriptiva}, que simplement descriu i 
interpreta les característiques del grup d'estudi, tal com és. Fa un 
{\em retrat} de la població.
\item L'{\em estadística inferencial} que intenta fer prediccions i 
justificar que la mostra s'adeqüa a la població, de manera que les 
característiques de la mostra siguin les mateixes que les 
característiques de la població.
\stopitemize


\stopteoria

\stoptext




Result (see pdf file)

[-- Attachment #2: prova.pdf --]
[-- Type: application/pdf, Size: 16984 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \definetextbackground does not fill tables within
  2018-08-13 21:37 \definetextbackground does not fill tables within dxpublica
@ 2018-08-13 22:14 ` Alan Braslau
  2018-08-14  7:49 ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Braslau @ 2018-08-13 22:14 UTC (permalink / raw)
  To: dxpublica; +Cc: mailing list for ConTeXt users

Floating objects (\placetable, \placefigure, ... and footnotes, etc.) do not inherit the text background, for indeed, imagine that it floats to another location.

Here, you use location=force, so one might expect it to use the text background... In fact, side floats, location=left and location=right, do get the text background color, so there is a *kludge* possible there:

\startplacetable [location=right]
  ...
\stopplacetable

\flushsidefloats

...

(incomplete example)

Alan

P.S. Hans: maybe location=force ought to work similarly with respect to text backgrounds as location=left or location=right.


On Mon, 13 Aug 2018 21:37:45 +0000
dxpublica@posteo.net wrote:

> Hi,
> 
> I have simple document which I define my \definetextbackground: 
> \startteoria and \stopteoria (see below). When I use it and put table 
> within, the table does not get filled with color. Any solution?
> 
> Thanks in advance,
> Xavier
> 
> \definecolor[teoriacolor][lightgray]
> 
> \definetextbackground[bteoria][
>      frame=off,
>      location=paragraph,
>      background=color,
>      backgroundcolor=teoriacolor, % fins aquí provat: 
> http://www.mail-archive.com/ntg-context%40ntg.nl/msg78014.html
>      %width=broad,
>      %corner=round,
>      %radius=5ex,
>      leftoffset=10pt,rightoffset=10pt,
>      topoffset=10pt,bottomoffset=10pt
>      %offset=-5pt
>      ]
> 
> \definestartstop[teoria][before={\begingroup\blank[big]\testpage[2]\starttextbackground[bteoria]},after={\stoptextbackground\blank[big]\endgroup}]
> 
> 
> \starttext
> 
> \startteoria
> \input tufte
> 
> \placetable[force,none][taula:teoria:1]{Recopilació de dades. Conceptes 
> fonamentals}{
> \starttable[|l|p(.6\textwidth)|]
> \NC Població: \NC Són {\em tots} els elements que són objecte d'estudi 
> \NC \FR
> \HL
> \NC Mostra: \NC La {\em part} de la població de la qual recopilem les 
> dades i estudiam.
> 
> Poques vegades coincideix amb la població. Una bona mostra necessita ser 
> suficientment heterogènia per a poder representar la població.
> 
> Es pot determinar el tamany mínim necessari per a què una mostra tengui 
> la representativitat necessària amb un marge d'error. \NC \MR
> \HL
> \NC Grandària: \NC {\em Nombre} d'elements de la població o de la 
> mostra. \NC \MR
> \HL
> \NC Variable estadística: \NC Cadascuna de les {\em propietats} o 
> característiques que volem estudiar d'un conjunt de dades. \NC \LR
> \stoptable}
> 
> Existeixen dues branques de l'estadística:
> 
> \startitemize
> \item L'{\em estadística descriptiva}, que simplement descriu i 
> interpreta les característiques del grup d'estudi, tal com és. Fa un 
> {\em retrat} de la població.
> \item L'{\em estadística inferencial} que intenta fer prediccions i 
> justificar que la mostra s'adeqüa a la població, de manera que les 
> característiques de la mostra siguin les mateixes que les 
> característiques de la població.
> \stopitemize
> 
> 
> \stopteoria
> 
> \stoptext
> 
> 
> 
> 
> Result (see pdf file)

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \definetextbackground does not fill tables within
  2018-08-13 21:37 \definetextbackground does not fill tables within dxpublica
  2018-08-13 22:14 ` Alan Braslau
@ 2018-08-14  7:49 ` Hans Hagen
  2018-08-14 13:24   ` Xavier B.
  2018-08-14 16:00   ` Alan Braslau
  1 sibling, 2 replies; 5+ messages in thread
From: Hans Hagen @ 2018-08-14  7:49 UTC (permalink / raw)
  To: ntg-context@ntg.nl >> mailing list for ConTeXt users

On 8/13/2018 11:37 PM, dxpublica@posteo.net wrote:
> Hi,
> 
> I have simple document which I define my \definetextbackground: 
> \startteoria and \stopteoria (see below). When I use it and put table 
> within, the table does not get filled with color. Any solution?
\setupfloats[table][freeregion=no]


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \definetextbackground does not fill tables within
  2018-08-14  7:49 ` Hans Hagen
@ 2018-08-14 13:24   ` Xavier B.
  2018-08-14 16:00   ` Alan Braslau
  1 sibling, 0 replies; 5+ messages in thread
From: Xavier B. @ 2018-08-14 13:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 14 Aug 2018 09:49:05 +0200
Hans Hagen <j.hagen@xs4all.nl> ha escrit:

> On 8/13/2018 11:37 PM, dxpublica@posteo.net wrote:
> > Hi,
> > 
> > I have simple document which I define my \definetextbackground: 
> > \startteoria and \stopteoria (see below). When I use it and put table 
> > within, the table does not get filled with color. Any solution?
> \setupfloats[table][freeregion=no]
> 


Thanks a lot, Hans. It works.

Does it have any collateral effects?

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \definetextbackground does not fill tables within
  2018-08-14  7:49 ` Hans Hagen
  2018-08-14 13:24   ` Xavier B.
@ 2018-08-14 16:00   ` Alan Braslau
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Braslau @ 2018-08-14 16:00 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Tue, 14 Aug 2018 09:49:05 +0200
Hans Hagen <j.hagen@xs4all.nl> wrote:

> > I have simple document which I define my \definetextbackground: 
> > \startteoria and \stopteoria (see below). When I use it and put table 
> > within, the table does not get filled with color. Any solution?  
> \setupfloats[table][freeregion=no]

I see that this is even referenced in i-context.pdf
(We should recognize that great job made by Wolfgang in assembling the interface xml files.)

Alan
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-08-14 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 21:37 \definetextbackground does not fill tables within dxpublica
2018-08-13 22:14 ` Alan Braslau
2018-08-14  7:49 ` Hans Hagen
2018-08-14 13:24   ` Xavier B.
2018-08-14 16:00   ` Alan Braslau

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