Re: [NTG-context] Bug in overprint? (was: how to set overprint)

2020-11-10 Thread Andres Conrado Montoya Acosta
>
> may I ask someone, who understands knockout and overprint in the printing
> press, to check test cases in the attached file from the test suite, if
> overprint is working or not in Mark IV, please?
>
> Regards,
> Jano
>
>
Hi Jano, as far as I can check with my pdf editors, it seems overprinting
is working. The black ink is printed above the blue, with no white reserve
below it.

-- 
Andrés Conrado Montoya
http://chiquitico.org
___
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
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
> \startxcell[alig

Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Aditya Mahajan
On Tue, 10 Nov 2020, Sylvain Hubert wrote:
> Indeed. Thanks for the information!
> 
> For the record, this is how the problem is finally solved:
> 
> \setuphead[section][after={\blank[sampage]}]
> \begingroup\setupindenting[no]\dontleavehmode\startxtable …
> \stopxtable\endgroup

Unless you have other reasons to create a group, you can just use:

\noindentation\dontleavehmode
\startxtable
...
\stopxtable

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


[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] 1,14

Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 19:23, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 10.11.2020 um 19:11:
>
> > Weirdly enough, "\hskip 0pt" solves the problem.
> >
> >  \setuphead[section][after={\blank[samepage]\hskip 0pt}]
> >  \starttext
> >  \showframe
> >  \dorecurse{50}{a }
> >  \startsection[title=spec]
> >  \startxtable
>
>
> What happens when you \hskip is that you switch to horizontal
> mode and the preferred to do this is to use \dontleavehmode.
>
> \dontleavehmode
> \startxtable
>
> Wolfgang
>

Indeed. Thanks for the information!

For the record, this is how the problem is finally solved:

\setuphead[section][after={\blank[sampage]}]
\begingroup\setupindenting[no]\dontleavehmode\startxtable …
\stopxtable\endgroup

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 10.11.2020 um 19:11:


Weirdly enough, "\hskip 0pt" solves the problem.

     \setuphead[section][after={\blank[samepage]\hskip 0pt}]
     \starttext
     \showframe
     \dorecurse{50}{a }
     \startsection[title=spec]
     \startxtable



What happens when you \hskip is that you switch to horizontal
mode and the preferred to do this is to use \dontleavehmode.

\dontleavehmode
\startxtable

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


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 18:25, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 10.11.2020 um 18:06:
>
> > Thanks for the suggestion, but as illustrated by the second example,
> > copied here, where the section title is at the top of the page:
> >
> >  \starttext
> >  \showframe
> >  \dorecurse{50}{a }
> >  \startsection[title=spec][before={\blank[preference,big]},
> > after={\blank[samepage,big]}]
>
> Your settings in the second argument of \startsection make no sense
> because the optional argument is for userdata (values like author etc.)
>
> >  \startxtable
> >  \startxrow
> >  \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
> >  \stopxrow
> >  \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
> >  \stopxtable
> >  \stoptext
> >
> > it is sometimes difficult to predict how much remaining space should
> > trigger a line break.
>
> You can either reformat your table or put the table in a float
> environment to move it to a place where it fits.
>
> Wolfgang
>

Weirdly enough, "\hskip 0pt" solves the problem.

\setuphead[section][after={\blank[samepage]\hskip 0pt}]
\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Sylvain
___
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] removing many lines about font in log.

2020-11-10 Thread Jeong Dal
Dear Hans,

Thank you for the explanation.
Since those messages takes too many lines in the log file, I ask about it.
I prefer to suppress them. But, someone want to see them.

Since there is no problem to compile, it is OK to let them shown for some one 
want to know what happened.
 
Best regards,

Dalyoung




> 2020. 11. 10. 오전 1:12, Hans Hagen  작성:
> 
> On 11/8/2020 8:05 PM, Jeong Dal wrote:
>> Hi,
>> The following example creates so many lines of messages about fonts in the 
>> log.
>> \definefontfeature [default] [default] [script=hang,language=kor]
>> \starttext
>> \definedfont[file:notoserifcjkkrregular*default]
>> Korean sentences.
>> 한글이 아름답습니다.
>> \stoptext
>> fonts   > 'fallback modern-designsize rm 12pt' is loaded
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'grek', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'latn', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'kana', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'cyrl', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'dflt', no language 'kor'
>> fonts   > defining > f
>> ...
>> Is there a way to suppress messages?
>> Of course, there is no problem to get the output.
> it depends if you're interested in it ... i kept it for cases where users 
> expect some feature to work while the font doesn't have it but I have no 
> problem making it optional
> 
> Hans
> 
> 
> -
>  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
___


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 10.11.2020 um 18:06:

Thanks for the suggestion, but as illustrated by the second example, 
copied here, where the section title is at the top of the page:


     \starttext
     \showframe
     \dorecurse{50}{a }
     \startsection[title=spec][before={\blank[preference,big]}, 
after={\blank[samepage,big]}]


Your settings in the second argument of \startsection make no sense
because the optional argument is for userdata (values like author etc.)


     \startxtable
     \startxrow
     \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
     \stopxrow
     \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
     \stopxtable
     \stoptext

it is sometimes difficult to predict how much remaining space should 
trigger a line break.


You can either reformat your table or put the table in a float
environment to move it to a place where it fits.

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


Re: [NTG-context] Indentation after \placefigure

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 18:05, Aditya Mahajan  wrote:

> On Tue, 10 Nov 2020, mf wrote:
>
> > Il 10/11/20 09:42, Sylvain Hubert ha scritto:
> > > Dear List,
> > >
> > > Does anyone know how to indent the paragraph beneath \placefigure in
> the
> > > following example?
> > >
> > >  \indenting[2em]
> > >  \setupindenting[yes]
> > >
> > >  \starttext
> > >
> > >  \dorecurse{50}{a b c }
> > >
> > >  \placefigure[here,none][indentnext=yes]{}{
> > >  \startMPcode
> > >  draw fullcircle scaled 1cm;
> > >  \stopMPcode
> > >  }
> > >
> > >  \dorecurse{50}{d e f } % not indented
> > >
> > >  \dorecurse{50}{g h i }
> > >  \stoptext
> > >
> >
> > The second bracket group of \placefigure is for references.
> > Instead of
> >
> > \placefigure[here,none][indentnext=yes]{}{...
> >
> > write
> >
> > \setupfloat[figure][indentnext=yes]
> > \placefigure[here,none]{}{...
> >
> > That way you enable indentation after every figure.
>
> If you want to change the behavior for a particular figure, you can also
> use the \start...stop variant:
>
> \startplacefigure[location={here,none}, indentnext=yes]
>
> \stopplacefigure
>

Thanks for the information, Aditya!

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 17:54, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Pablo Rodriguez schrieb am 10.11.2020 um 15:59:
> > On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> >> Dear List,
> >>
> >> In the following example, the section title appears at the very end of
> >> the first page.
> >> [...]
> >> Does anyone know where to adjust the penalty in this case, so that the
> >> section title can be repositioned to the next page?
> > Hi Sylvain,
> >
> >\setuphead[title]
> >  [before={\blank[preference, big],
> >   after={\blank[samepage, big]]
> >
> > In this case, the blank space before sets a preference for inserting a
> > page break. The blank space after requires to be in the same page with
> > next paragraph.
>
> Another method is to move the section title to the next page when the
> remaining spaces
> is below a specified number of lines. The following setup forces a page
> break when
> less than 4 lines remain on the current page.
>
> \setuphead
>[section]
>[before={\testpage[4]\blank[2*big]}]
>
> Wolfgang
>

Hi Wolfgang,

Thanks for the suggestion, but as illustrated by the second example, copied
here, where the section title is at the top of the page:

\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec][before={\blank[preference,big]},
after={\blank[samepage,big]}]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

it is sometimes difficult to predict how much remaining space should
trigger a line break.

Sylvain
___
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] removing many lines about font in log.

2020-11-10 Thread Aditya Mahajan
On Tue, 10 Nov 2020, Jeong Dal wrote:

> Dear Hans,
> 
> Thank you for the explanation.
> Since those messages takes too many lines in the log file, I ask about it.
> I prefer to suppress them. But, someone want to see them.
> 
> Since there is no problem to compile, it is OK to let them shown for some one 
> want to know what happened.
>  

You can also use

  \ctxlua{logs.disable("fonts")}

to get rid of all the messages.

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


Re: [NTG-context] Indentation after \placefigure

2020-11-10 Thread Aditya Mahajan
On Tue, 10 Nov 2020, mf wrote:

> Il 10/11/20 09:42, Sylvain Hubert ha scritto:
> > Dear List,
> > 
> > Does anyone know how to indent the paragraph beneath \placefigure in the 
> > following example?
> > 
> >      \indenting[2em]
> >      \setupindenting[yes]
> > 
> >      \starttext
> > 
> >      \dorecurse{50}{a b c }
> > 
> >      \placefigure[here,none][indentnext=yes]{}{
> >      \startMPcode
> >      draw fullcircle scaled 1cm;
> >      \stopMPcode
> >      }
> > 
> >      \dorecurse{50}{d e f } % not indented
> > 
> >      \dorecurse{50}{g h i }
> >      \stoptext
> > 
> 
> The second bracket group of \placefigure is for references.
> Instead of
> 
> \placefigure[here,none][indentnext=yes]{}{...
> 
> write
> 
> \setupfloat[figure][indentnext=yes]
> \placefigure[here,none]{}{...
> 
> That way you enable indentation after every figure.

If you want to change the behavior for a particular figure, you can also use 
the \start...stop variant:

\startplacefigure[location={here,none}, indentnext=yes]
   
\stopplacefigure

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


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 17:37, Pablo Rodriguez  wrote:

> On 11/10/20 5:23 PM, Sylvain Hubert wrote:
> > My mistake, but the problem survives the fix:
> >
> > \setuphead[section][after={\blank[samepage,big]}]
> > \starttext
> > \showframe
> > \dorecurse{50}{a }
> > \startsection[title=spec]
> > \startxtable
> Hi Sylvain,
>
> no fix is required when you allow the table to be split:
>
> \startxtable[split=yes]
>
> Pablo
>

Hi Pablo,

Thanks for the suggestion, but unlike the MWE, in the original document,
the table has ten rows and is visually not suitable for a split. The large
row span is meant to represent this restriction.

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 10.11.2020 um 15:59:

On 11/10/20 9:55 AM, Sylvain Hubert wrote:

Dear List,

In the following example, the section title appears at the very end of
the first page.
[...]
Does anyone know where to adjust the penalty in this case, so that the
section title can be repositioned to the next page?

Hi Sylvain,

   \setuphead[title]
 [before={\blank[preference, big],
  after={\blank[samepage, big]]

In this case, the blank space before sets a preference for inserting a
page break. The blank space after requires to be in the same page with
next paragraph.


Another method is to move the section title to the next page when the 
remaining spaces
is below a specified number of lines. The following setup forces a page 
break when

less than 4 lines remain on the current page.

\setuphead
  [section]
  [before={\testpage[4]\blank[2*big]}]

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


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Pablo Rodriguez
On 11/10/20 5:23 PM, Sylvain Hubert wrote:
> My mistake, but the problem survives the fix:
>
>     \setuphead[section][after={\blank[samepage,big]}]
>     \starttext
>     \showframe
>     \dorecurse{50}{a }
>     \startsection[title=spec]
>     \startxtable
Hi Sylvain,

no fix is required when you allow the table to be split:

\startxtable[split=yes]

Pablo
--
http://www.ousia.tk
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
My mistake, but the problem survives the fix:

\setuphead[section][after={\blank[samepage,big]}]
\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Sylvain

On Tue, 10 Nov 2020 at 17:11, Sylvain Hubert  wrote:

>
> On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez  wrote:
>
>> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
>> > Dear List,
>> >
>> > In the following example, the section title appears at the very end of
>> > the first page.
>> > [...]
>> > Does anyone know where to adjust the penalty in this case, so that the
>> > section title can be repositioned to the next page?
>>
>> Hi Sylvain,
>>
>>   \setuphead[title]
>> [before={\blank[preference, big],
>>  after={\blank[samepage, big]]
>>
>> In this case, the blank space before sets a preference for inserting a
>> page break. The blank space after requires to be in the same page with
>> next paragraph.
>>
>> Of course, you don’t need both simultaneously.
>>
>> Just in case it helps,
>>
>> Pablo
>>
>
> Hello Pablo,
>
> Thank you very much for the help. The penalty of \blank indeed brings the
> solution closer and it does format the previous example correctly.
>
> However, when I went back to the original document, neither
> [before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
> both worked. I trimmed it into the following example which behaves the same:
>
> \starttext
> \showframe
> \dorecurse{50}{a }
> \startsection[title=spec][before={\blank[preference,big]},
> after={\blank[samepage,big]}]
> \startxtable
> \startxrow
> \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
> \stopxrow
> \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
> \stopxtable
> \stoptext
>
> Do you have an idea on how this could also be formatted correctly or how
> one could inspect and debug the penalty?
>
> Thanks again!
>
> Sylvain
>
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez  wrote:

> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> > Dear List,
> >
> > In the following example, the section title appears at the very end of
> > the first page.
> > [...]
> > Does anyone know where to adjust the penalty in this case, so that the
> > section title can be repositioned to the next page?
>
> Hi Sylvain,
>
>   \setuphead[title]
> [before={\blank[preference, big],
>  after={\blank[samepage, big]]
>
> In this case, the blank space before sets a preference for inserting a
> page break. The blank space after requires to be in the same page with
> next paragraph.
>
> Of course, you don’t need both simultaneously.
>
> Just in case it helps,
>
> Pablo
>

Hello Pablo,

Thank you very much for the help. The penalty of \blank indeed brings the
solution closer and it does format the previous example correctly.

However, when I went back to the original document, neither
[before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
both worked. I trimmed it into the following example which behaves the same:

\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec][before={\blank[preference,big]},
after={\blank[samepage,big]}]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Do you have an idea on how this could also be formatted correctly or how
one could inspect and debug the penalty?

Thanks again!

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Pablo Rodriguez
On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> Dear List,
>
> In the following example, the section title appears at the very end of
> the first page.
> [...]
> Does anyone know where to adjust the penalty in this case, so that the
> section title can be repositioned to the next page?

Hi Sylvain,

  \setuphead[title]
[before={\blank[preference, big],
 after={\blank[samepage, big]]

In this case, the blank space before sets a preference for inserting a
page break. The blank space after requires to be in the same page with
next paragraph.

Of course, you don’t need both simultaneously.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
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] Reverse traversing of xml.collected()?

2020-11-10 Thread Jano Kula
Hello!

On Fri, 1 May 2020 at 14:06, Gerben Wierda  wrote:

>
>
> On 1 May 2020, at 13:30, Hans Hagen  wrote:
>
> On 5/1/2020 11:31 AM, Gerben Wierda wrote:
>
> I’d like to travese the contents of an xml.collected() in a reverse order.
>
> it's an iterator
>
> What is the correct way to do it?
>
> xml.all
>
>
It had been awhile, so for the record.

I was looking for something similar and found out that adding a third
argument to the xml.collected reverses the iterations. Looks like the
argument has to be true in a boolean sense, so puting any "string" there
will do the trick.

for v in xml.collected(doc, "/chapter/section", "string") do
...
end

Jano
___
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] Indentation after \placefigure

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 10:05, mf  wrote:

> Il 10/11/20 09:42, Sylvain Hubert ha scritto:
> > Dear List,
> >
> > Does anyone know how to indent the paragraph beneath \placefigure in the
> > following example?
> >
> >  \indenting[2em]
> >  \setupindenting[yes]
> >
> >  \starttext
> >
> >  \dorecurse{50}{a b c }
> >
> >  \placefigure[here,none][indentnext=yes]{}{
> >  \startMPcode
> >  draw fullcircle scaled 1cm;
> >  \stopMPcode
> >  }
> >
> >  \dorecurse{50}{d e f } % not indented
> >
> >  \dorecurse{50}{g h i }
> >  \stoptext
> >
>
> The second bracket group of \placefigure is for references.
> Instead of
>
> \placefigure[here,none][indentnext=yes]{}{...
>
> write
>
> \setupfloat[figure][indentnext=yes]
> \placefigure[here,none]{}{...
>
> That way you enable indentation after every figure.
>
> Massi
>

Hi Massi,

It works! Thanks for the help!

Sylvain
___
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] Indentation after \placefigure

2020-11-10 Thread mf

Il 10/11/20 09:42, Sylvain Hubert ha scritto:

Dear List,

Does anyone know how to indent the paragraph beneath \placefigure in the 
following example?


     \indenting[2em]
     \setupindenting[yes]

     \starttext

     \dorecurse{50}{a b c }

     \placefigure[here,none][indentnext=yes]{}{
     \startMPcode
     draw fullcircle scaled 1cm;
     \stopMPcode
     }

     \dorecurse{50}{d e f } % not indented

     \dorecurse{50}{g h i }
     \stoptext



The second bracket group of \placefigure is for references.
Instead of

\placefigure[here,none][indentnext=yes]{}{...

write

\setupfloat[figure][indentnext=yes]
\placefigure[here,none]{}{...

That way you enable indentation after every figure.

Massi
___
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
___


[NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
Dear List,

In the following example, the section title appears at the very end of the
first page.

\showframe

\starttext
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{30}{a b c }

\section{title}
\startxtable
\startxrow
\startxcell[ny=10]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{9}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Does anyone know where to adjust the penalty in this case, so that the
section title can be repositioned to the next page?

Thanks!

Best,
Sylvain
___
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
___


[NTG-context] Indentation after \placefigure

2020-11-10 Thread Sylvain Hubert
Dear List,

Does anyone know how to indent the paragraph beneath \placefigure in the
following example?

\indenting[2em]
\setupindenting[yes]

\starttext

\dorecurse{50}{a b c }

\placefigure[here,none][indentnext=yes]{}{
\startMPcode
draw fullcircle scaled 1cm;
\stopMPcode
}

\dorecurse{50}{d e f } % not indented

\dorecurse{50}{g h i }
\stoptext

Thanks!

Best,
Sylvain
___
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
___