ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: \startbackground with footnote
@ 2014-05-23  7:54 Xan
  2014-05-23  7:54 ` Xan
  2014-05-23  7:57 ` Xan
  0 siblings, 2 replies; 5+ messages in thread
From: Xan @ 2014-05-23  7:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

It has some bug against footnotes. I attach an example. Sorry, it's not a minimal example, but I can't reproduce it with minimal. I think the important think is the page break because the table two does not fit in the page.

I get one empty page here.

I attach the .tex and the pdf.

Thanks in advance,
Xan.


[-- Attachment #2: 99-seleccio.conTeXt --]
[-- Type: application/octet-stream, Size: 7329 bytes --]

%% ConTeXt MIV
%% carregam les opcions d'entorn

   \setupcolors[state=start]
\definecolor[headingcolor][c=1,m=0.5431,y=0,k=0.5451]
\definecolor[mteoria][h=faf9dc]

\definecolor[steelblue][h=4682B4]
\define[2]\href{%
  \begingroup
    \setupinteraction[
      style=normal
      %color=steelblue,
    ]%
    \goto{#1}[url(#2)]%
  \endgroup%
}

\setupurl[style=\tf] %color=blue?
\setupinteraction[state=start,style=\tf]

\definehead [Fitxa] [subsubject]
\setuphead [Fitxa][textstyle=scb,align=middle,color=headingcolor]
\setuplabeltext [Fitxa=Fitxa]
\setuphead [Fitxa] [ownnumber=yes,incrementnumber=yes,number=no]
\setuplist[Fitxa] [margin=4em]
%\setuplist [Fitxa] [width=2em,criterium=all,interaction=all]

\newcounter\FitxaNumber

\def\fitxa#1%
{\doglobal\increment\FitxaNumber
\Fitxa{\FitxaNumber}{#1}}


\definestartstop
  [teoria]
  [  before={\startbackground[background=color, backgroundcolor=lightgray, frame=off, width=broad, after={\bigskip}, before={\blank[big]}, backgroundcorner=round, backgroundradius=5ex, framecorner=round, radius=10ex, backgroundoffset=5pt]},
      after=\stopbackground,
  %commands={\setupalign[flushleft,broad]}
   ]


\defineenumeration
  [exemple]
  [alternative=serried,text={\startcolor[darkblue]Exemple\stopcolor},stopper={\startcolor[darkblue].\space\stopcolor},left={\bgroup},right={\egroup},width=fit,headstyle=\ss,distance=0.25em,width=fit]

\defineenumeration
  [exercici]
  [alternative=serried,before={\testpage[1]},text={Exercici},stopper={.\space},width=fit,headstyle=\ss,distance=0.25em,width=fit,headcolor=darkblue]

\automigrateinserts % Per a què se mostrin els peus de pàgina a la teoria http://www.ntg.nl/pipermail/ntg-context/2014/078198.html

\starttext

\startteoria

La {\em grandària de la mostra}, que es simbolitza amb una $N$, és de 25. Coincideix amb la suma del recompte de les dades.

El recompte dels valors es diu {\em freqüència absoluta} de la variable i es simbolitza amb $f_A$, o simplement $f$.

\bigskip
Podem ampliar aquesta taula, trobant altres columnes:
\startitemize
\item Freqüències relatives: és igual a la freqüència absoluta dividit pel total d'objectes. Es simbolitza amb $f_R$.
\startformula
f_R = f_A/N
\stopformula
\item Percentatge d'aparició: és igual a la freqüencia relativa entre el total de dades per 100.
\startformula
\% = f_R \cdot 100
\stopformula
\item Freqüències absolutes acumulades, $F_A$, igual a la suma de les freqüències absolutes fins a un valor donat.
\stopitemize

Si aplicam això a les nostres dades de llibres, obtenim:
\placetable[here][taula-freq-2]{Taula de freqüències {\em expandida}}
\starttable[|cp(3cm)|cp(1cm)|rp(3cm)|cp(1.5cm)|lp(3.8cm)|]
\NC Nombre de llibres \VL $f_A$ \VL $f_R$ \VL \% \VL $F_A$ \NC \SR
\HL
\NC 1 \VL 4 \VL 4/25 = 0,16\VL 16\% \VL 4 \NC \FR
\HL
\NC 2 \VL 7 \VL 7/25 = 0,28 \VL 28\% \VL 4+ 7 = 11\NC \MR
\HL
\NC 3 \VL 9 \VL 9/25 = 0,36 \VL 36\% \VL 4 + 7 + 9 = 20 \NC \MR
\HL
\NC 4 \VL 5 \VL 5/25= 0,20 \VL 20\% \VL 4 + 7 + 9 + 5 = 24\NC \MR
\HL[3]
\NC \VL 24 \VL 1,00 \VL 100 \% \VL \NC \LR
\stoptable
\stopexemple

\fitxa{Cas discret amb {\em moltes} dades}

Suposem ara que tenim una variable estadística discreta però amb una gamma de valors molt gran, és a dir, en principi amb un elevat nombre de valors diferents. Per exemple, si feim una enquesta on es demana l'edat, aleshores podem tractar aquesta variable estadística com a discreta (els enquestats repondran que tenen, per exemple, 39 anys, però no 39,5). El nombre de valors possibles de l'edat és molt gran: va de 0 (recent nats) fins a una fita superior hipotètica de 130 anys\footnote{La persona més vella del món és Jeanne Calment amb 122 anys, encara que aquest record no està verificat. El rècord d'edat verificat és de Misao Okawa, de 116 anys.}. Per tant, si féssim una taula de freqüències, podríem tenir fins a 130 valors diferents. Això fa les dades immanejables. Per aquest motiu s'agrupen les dades en intervals.

En aquest exemple, podríem agrupar les dades en intervals d'amplitud 10, representant les dècades.\footnote{El nombre d'intervals a collir... TODO.}. D'aquesta manera, obtenim 13 intervals: $[0, 10)$, $[10, 20)$, $[20, 30)$, $[30, 40)$, $[40, 50)$, $[50, 60)$, $[60, 70)$, $[70, 80)$, $[80, 90)$, $[90, 100)$, $[100, 110)$, $[110, 120)$, $[120, 130)$. En cada interval, el parèntesi significa que no prenem l'extrem i el claudàtor significa que l'extrem està inclòs. Així l'interval $[40, 50)$ representa a totes les persones de 40 anys fins a 50, incloses les de 40 anys però excloses les de 50.

D'aquesta manera, tendrem una taula de freqüències, com la següent, que en comptes de valors tendrà intervals:

\placetable[here][taula:teoria:taula-freq-2]{Taula de freqüències\footnote{Les dades són una extrapolació a partir de les dades de l'\href{INE}{http://www.ine.es/prensa/np813.pdf} de l'any 2013.}}
\starttable[|cp(3cm)|cp(3cm)|]
\NC Edat \VL Recompte \NC \SR
\HL
\NC $[0,10)$ \VL 4.859 \NC \FR
\NC $[10,20)$ \VL 4.391 \NC \MR
\NC $[20,30)$ \VL 5.337 \NC \MR
\NC $[30,40)$ \VL 7.750 \NC \MR
\NC $[40,50)$ \VL 7.517 \NC \MR
\NC $[50,60)$ \VL 6.079 \NC \MR
\NC $[60,70)$ \VL 4.771 \NC \MR
\NC $[70,80)$ \VL 3.440 \NC \MR
\NC $[80,90)$ \VL 2.160 \NC \MR
\NC $[90,100)$ \VL 379 \NC \MR
\NC $[100,110)$ \VL 12 \NC \MR
\NC $[110,120)$ \VL 0 \NC \MR
\NC $[120,130]$ \VL 0 \NC \MR
\HL[3]
\NC \VL 46.695 \NC \LR
\stoptable

Noteu que el darrer interval inclou 130 perquè hem de poder prendre el màxim teòric a qualque interval.

A partir d'aquí, el càlcul de la freqüència absoluta acumulada i la freqüència relativa es realitza de la mateixa manera que en el cas anterior de la variable discreta (amb poques dades).

\placetable[here][taula:teoria:taula-freq-3]{Taula de freqüències ampliada}
\starttable[|cp(3cm)|cp(3cm)||cp(3cm)||cp(3cm)|]
\NC Edat \VL $f$ \VL $f_r$ \VL $F_A$ \NC \SR
\HL
\NC $[0,10)$ \VL 4.859 \VL 0,10 \VL b \NC \FR
\NC $[10,20)$ \VL 4.391  \VL 0,09 \VL b \NC \MR
\NC $[20,30)$ \VL 5.337  \VL 0,11 \VL b \NC \MR
\NC $[30,40)$ \VL 7.750  \VL 0,17 \VL b \NC \MR
\NC $[40,50)$ \VL 7.517  \VL 0,16 \VL b \NC \MR
\NC $[50,60)$ \VL 6.079  \VL 0,13 \VL b \NC \MR
\NC $[60,70)$ \VL 4.771  \VL 0,10 \VL b \NC \MR
\NC $[70,80)$ \VL 3.440  \VL 0,07 \VL b \NC \MR
\NC $[80,90)$ \VL 2.160  \VL 0,05 \VL b \NC \MR
\NC $[90,100)$ \VL 379  \VL 0,01 \VL b \NC \MR
\NC $[100,110)$ \VL 12  \VL 0,00 \VL b \NC \MR
\NC $[110,120)$ \VL 0  \VL 0,00 \VL b \NC \MR
\NC $[120,130]$ \VL 0  \VL 0,00 \VL b \NC \MR
\HL[3]
\NC \VL 46.695 \VL 0,99 \VL   \LR
\stoptable




\fitxa{Cas continu}

TODO

\startexemple
S'agrupen les dades per intervals iguals. Almenys hem de tenir 6 intervals. Tot l'altre és igual
\stopexemple

\stopteoria

\startexercici Demanem a 20 persones sobre el nombre de vegades que havien viatjat a l'estranger i el resultat ha estat aquest (figura~\in[fig:1]):

\placetable[force][fig:1]{Viatges a l'estranger}{
\starttable[|l|l|l|l|l|c|l|l|l|l|l|]
\NC 3 \NC 5 \NC 4 \NC 4 \NC 2 \NC \NC 3 \NC 3 \NC 3 \NC 5 \NC 2 \NC \FR
\NC 6 \NC 1 \NC 2 \NC 3 \NC 3 \NC \NC 6 \NC 5 \NC 4 \NC 4 \NC 3 \NC \LR
\stoptable}

\startitemize[a,packed]
\item De quin tipus de variable es tracte?
\item Quin és el tamany de la població? I de la mostra?
\item Organitza les dades. Fes-ne un recompte
\stopitemize
\stopexercici


\stoptext

[-- Attachment #3: 99-seleccio.pdf --]
[-- Type: application/pdf, Size: 45449 bytes --]

[-- Attachment #4: 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] 5+ messages in thread

* Re: \startbackground with footnote
  2014-05-23  7:54 \startbackground with footnote Xan
@ 2014-05-23  7:54 ` Xan
  2014-05-23  7:57 ` Xan
  1 sibling, 0 replies; 5+ messages in thread
From: Xan @ 2014-05-23  7:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks Aditya.

What's the difference between startbackground and starttextbackground? I can't see the options of textbackground.

Thanks,
___________________________________________________________________________________
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] 5+ messages in thread

* Re: \startbackground with footnote
  2014-05-23  7:54 \startbackground with footnote Xan
  2014-05-23  7:54 ` Xan
@ 2014-05-23  7:57 ` Xan
  1 sibling, 0 replies; 5+ messages in thread
From: Xan @ 2014-05-23  7:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Sorry, I mean Wolfgang not Aditya ;-)
___________________________________________________________________________________
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] 5+ messages in thread

* Re: \startbackground with footnote
  2014-05-22 12:25 Xan
@ 2014-05-22 12:52 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2014-05-22 12:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 22.05.2014 um 14:25 schrieb Xan <dxpublica@telefonica.net>:

> Hi,
> 
> I have a footnote in \startbackground \stopbackground environment and the footnote is not displayed. Can anyone give me any hint?

Add the command \automigrateinserts before \starttext.

Wolfgang
___________________________________________________________________________________
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] 5+ messages in thread

* \startbackground with footnote
@ 2014-05-22 12:25 Xan
  2014-05-22 12:52 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Xan @ 2014-05-22 12:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I have a footnote in \startbackground \stopbackground environment and the footnote is not displayed. Can anyone give me any hint?

thanks in advance,
Xan
___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2014-05-23  7:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-23  7:54 \startbackground with footnote Xan
2014-05-23  7:54 ` Xan
2014-05-23  7:57 ` Xan
  -- strict thread matches above, loose matches on Subject: below --
2014-05-22 12:25 Xan
2014-05-22 12:52 ` Wolfgang Schuster

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