Re: [NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Andres Conrado Montoya
By the way, I already tried with \framed, but I can't get it to take the
current float width.

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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
___


Re: [NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Andres Conrado Montoya
> Hi Andrés,
>
> You could probably put the notes inside a \start...\stopxtablefoot
>
> Sylvain

Thanks Sylvain, but I have a lot of tables to edit...This may work, but I
would prefer to explore programmatic solutions involving the two defined
macros(\fuentent & \fuente in my example), because I really don't want to
go back and edit a hundred or so tables.

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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
___


Re: [NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Sylvain Hubert
Hi Andrés,

You could probably put the notes inside a \start...\stopxtablefoot

Sylvain

On Tue, 10 Nov 2020 at 21:49, Andres Conrado Montoya <
andresconr...@gmail.com> wrote:

> MWE (sorry for the long table, I hadn't anything else at hand):
>
> 
> \definehighlight[emph][style={\em}]
> \definehighlight[strong][style={\bf}]
>
> \setupfloat[table][default={here}]
>
> \definereferenceformat[figura][text={Figura~}]
> \definereferenceformat[tabla][text={Tabla~}]
>
> \setupcaptions[style={\sans\small},
>   width=max,
>   prefix=no,
>   align={flushleft,nothyphenated},
>   way=bytext]
> \setupcaption[table][location=top]
>
> \setupthinrules[width=15em] % width of horizontal rules
>
> \setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans]
> \setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold]
> \setupxtable[body][bottomframe=on]
> \setupxtable[foot][bottomframe=on]
>
> \define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop}
>
> \define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop}
>
> \starttext
> \reference[tbl:t03]{}%
> \startplacetable[title={Composición química y valor energético de recursos
> forrajeros de corte en el área de influencia del Subproyecto Carne Bovina
> (trópico de altura).}]
> \startxtable[option=tight,bodyfont=7pt]
> \startxtablehead[head]
> \startxrow
> \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)}
> \stopxcell
> \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras
> de corte} \stopxcell
> \startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)}
> \stopxcell
> \startxcell[align=middle,width=.05\textwidth] \strong{MS
> (\letterpercent{})} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf
>  (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf
> (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf
> (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \stopxrow
> \stopxtablehead
> \startxtablebody[body]
> \startxrow
> \startxcell[align=right,ny=2] 1800-1860 \stopxcell
> \startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x
> \emph{P. thyphoides}) \stopxcell
> \startxcell[align=middle] 90 \stopxcell
> \startxcell[align=middle] 29,0 \stopxcell
> \startxcell[align=middle] 10,6 \stopxcell
> \startxcell[align=middle] 64,1 \stopxcell
> \startxcell[align=middle] 30,8 \stopxcell
> \startxcell[align=middle] 1,92 \stopxcell
> \startxcell[align=middle] 1,08 \stopxcell
> \startxcell[align=middle] 0,52 \stopxcell
> \startxcell[align=middle] 1,19 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 210 \stopxcell
> \startxcell[align=middle] 27,8 \stopxcell
> \startxcell[align=middle] 6,2 \stopxcell
> \startxcell[align=middle] 69,1 \stopxcell
> \startxcell[align=middle] 33,6 \stopxcell
> \startxcell[align=middle] 1,78 \stopxcell
> \startxcell[align=middle] 0,94 \stopxcell
> \startxcell[align=middle] 0,40 \stopxcell
> \startxcell[align=middle] 1,09 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=right,ny=3] 1800-2186 \stopxcell
> \startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P.
> purpureum} x \emph{P. typhoides}) \stopxcell
> \startxcell[align=middle] 91 \stopxcell
> \startxcell[align=middle] 22,3 \stopxcell
> \startxcell[align=middle] 8,7 \stopxcell
> \startxcell[align=middle] 65,4 \stopxcell
> \startxcell[align=middle] 32,1 \stopxcell
> \startxcell[align=middle] 1,86 \stopxcell
> \startxcell[align=middle] 1,02 \stopxcell
> \startxcell[align=middle] 0,46 \stopxcell
> \startxcell[align=middle] 1,14 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 150 \stopxcell
> \startxcell[align=middle] 23,6 \stopxcell
> \startxcell[align=middle] 7,2 \stopxcell
> \startxcell[align=middle] 66,9 \stopxcell
> \startxcell[align=middle] 32,8 \stopxcell
> \startxcell[align=middle] 1,81 \stopxcell
> \startxcell[align=middle] 0,98 \stopxcell
> \startxcell[align=middle] 0,42 \stopxcell
> \startxcell[align=middle] 1,11 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 182 \stopxcell
> \startxcell[align=middle] 27,0 \stopxcell
> \startxcell[align=middle] 6,7 \stopxcell
> \startxcell[align=middle] 68,8 \stopxcell
> \startxcell[align=middle] 35,6 \stopxcell
> \startxcell[align=middle] 1,77 \stopxcell
> \startxcell[align=middle] 0,93 \stopxcell
> \startxcell[align=middle] 0,38 \stopxcell
> \startxcell[align=middle] 1,08 \stopxcell
> \stopxrow
> \startxrow
> 

[NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Andres Conrado Montoya
MWE (sorry for the long table, I hadn't anything else at hand):


\definehighlight[emph][style={\em}]
\definehighlight[strong][style={\bf}]

\setupfloat[table][default={here}]

\definereferenceformat[figura][text={Figura~}]
\definereferenceformat[tabla][text={Tabla~}]

\setupcaptions[style={\sans\small},
  width=max,
  prefix=no,
  align={flushleft,nothyphenated},
  way=bytext]
\setupcaption[table][location=top]

\setupthinrules[width=15em] % width of horizontal rules

\setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans]
\setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold]
\setupxtable[body][bottomframe=on]
\setupxtable[foot][bottomframe=on]

\define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop}
\define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop}

\starttext
\reference[tbl:t03]{}%
\startplacetable[title={Composición química y valor energético de recursos
forrajeros de corte en el área de influencia del Subproyecto Carne Bovina
(trópico de altura).}]
\startxtable[option=tight,bodyfont=7pt]
\startxtablehead[head]
\startxrow
\startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)}
\stopxcell
\startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras
de corte} \stopxcell
\startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)}
\stopxcell
\startxcell[align=middle,width=.05\textwidth] \strong{MS
(\letterpercent{})} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf
 (\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf
(\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf
(\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[align=right,ny=2] 1800-1860 \stopxcell
\startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x
\emph{P. thyphoides}) \stopxcell
\startxcell[align=middle] 90 \stopxcell
\startxcell[align=middle] 29,0 \stopxcell
\startxcell[align=middle] 10,6 \stopxcell
\startxcell[align=middle] 64,1 \stopxcell
\startxcell[align=middle] 30,8 \stopxcell
\startxcell[align=middle] 1,92 \stopxcell
\startxcell[align=middle] 1,08 \stopxcell
\startxcell[align=middle] 0,52 \stopxcell
\startxcell[align=middle] 1,19 \stopxcell
\stopxrow
\startxrow
\startxcell[align=middle] 210 \stopxcell
\startxcell[align=middle] 27,8 \stopxcell
\startxcell[align=middle] 6,2 \stopxcell
\startxcell[align=middle] 69,1 \stopxcell
\startxcell[align=middle] 33,6 \stopxcell
\startxcell[align=middle] 1,78 \stopxcell
\startxcell[align=middle] 0,94 \stopxcell
\startxcell[align=middle] 0,40 \stopxcell
\startxcell[align=middle] 1,09 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right,ny=3] 1800-2186 \stopxcell
\startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P.
purpureum} x \emph{P. typhoides}) \stopxcell
\startxcell[align=middle] 91 \stopxcell
\startxcell[align=middle] 22,3 \stopxcell
\startxcell[align=middle] 8,7 \stopxcell
\startxcell[align=middle] 65,4 \stopxcell
\startxcell[align=middle] 32,1 \stopxcell
\startxcell[align=middle] 1,86 \stopxcell
\startxcell[align=middle] 1,02 \stopxcell
\startxcell[align=middle] 0,46 \stopxcell
\startxcell[align=middle] 1,14 \stopxcell
\stopxrow
\startxrow
\startxcell[align=middle] 150 \stopxcell
\startxcell[align=middle] 23,6 \stopxcell
\startxcell[align=middle] 7,2 \stopxcell
\startxcell[align=middle] 66,9 \stopxcell
\startxcell[align=middle] 32,8 \stopxcell
\startxcell[align=middle] 1,81 \stopxcell
\startxcell[align=middle] 0,98 \stopxcell
\startxcell[align=middle] 0,42 \stopxcell
\startxcell[align=middle] 1,11 \stopxcell
\stopxrow
\startxrow
\startxcell[align=middle] 182 \stopxcell
\startxcell[align=middle] 27,0 \stopxcell
\startxcell[align=middle] 6,7 \stopxcell
\startxcell[align=middle] 68,8 \stopxcell
\startxcell[align=middle] 35,6 \stopxcell
\startxcell[align=middle] 1,77 \stopxcell
\startxcell[align=middle] 0,93 \stopxcell
\startxcell[align=middle] 0,38 \stopxcell
\startxcell[align=middle] 1,08 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right,ny=3] 1800-1850 \stopxcell
\startxcell[align=right,ny=3] \strong{King Grass morado} \crlf
(\emph{Pennisetum purpureum}) \stopxcell
\startxcell[align=middle] 98 \stopxcell
\startxcell[align=middle] 20,8 \stopxcell
\startxcell[align=middle] 13,1 \stopxcell
\startxcell[align=middle] 62,3 \stopxcell
\startxcell[align=middle] 30,8 \stopxcell
\startxcell[align=middle] 1,99 \stopxcell
\startxcell[align=middle]