[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-08-22 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): 
Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-08-22 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): 
Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Better option for a macro with lots of arguments

2023-08-22 Thread Andres Conrado Montoya
I have been using the following macro to add a bunch of sections to the
start of chapters in a book, it works but I think is kind of weak:

%%%

\define[7]\metadatos{
  \startsection[title={Resumen}] #1 \stopsection
  \startsection[title={Palabras clave}] #2 \stopsection
  \start
  \language[en]
  \startsection[title={Abstract}] #3  \stopsection
  \startsection[title={Keywords}] #4 \stopsection
  \stop
  \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}]
\startsubsection[title={Apa}] #5 \stopsubsection
\startsubsection[title={Chicago}] #6 \stopsubsection
\startsubsection[title={MLA}] #7 \stopsubsection
   \stopsection
}

\starttext
% Then I call the macro like this:
\metadatos{spanish abstract \input knuth}{some, comma, separated, keywords,
in, spanish}{english abstract \input knuth}{same, comma, separated,
keywords, in, english}{Apa citation style for this article}{Chicago
citation style for this article}{MLA citation style for this article}
\stoptext
%%%

I've been exploring different ways to do it better, but with not much luck,
I was thinking something based in key=value assignments? setups? datasets?
Not really sure, but If you know a better solution or point me in the
direction of something I can use to replace that macro, it would be greatly
appreciated.

-- 
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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: MAPS nr 53

2023-08-22 Thread Henning Hraban Ramm

Am 22.08.23 um 21:16 schrieb Hans Hagen:

On 8/22/2023 8:24 PM, Keith McKay wrote:

Would it be possible to list the contents to whet our appetites?
the successive chapters are basically the long articles that taco wrote 
about mp fundamentals for ctx meetings / journal + one extra


See https://articles.contextgarden.net/

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Hans Hagen

On 8/22/2023 10:53 PM, Vincent Hennebert wrote:

On Tue, 2023-08-22 at 15:45 +, Hamid,Idris wrote:

On Aug 22, 2023, 2:06 AM -0600, Hans Hagen via ntg-context , wrote:

On 8/22/2023 6:31 AM, Hamid,Idris wrote:
I'm not going to look into this until there is a complete test case
for
this which means:

- free fonts (so that others can also test and use)
- design sizes
- fallback design sizes


The reason there are so few free optical-size typefaces is that they
take a lot of work to get right. Indeed, really high-quality, fine-
tuned free typefaces are hard to find even at single size.


I don’t know about its quality, but Adobe makes the Source Serif font
available under the SIL Open Font License, with 5 optical sizes and 6
weights. I’m working on a typescript file that allows to use all those
variants, would be happy to contribute it if that’s useful.


But aren't these basically some chosen values on variable axis? And i'm 
not sure if that works out well for all shapes is users choose their own 
values.



https://github.com/adobe-fonts/source-serif

I suppose that you can play with the variable font and

  axis={wght=300}

(ok, using precooked variants that have the creators blessing makes 
sense of course and but then one can also argue that a variable font 
makes no sense apart from maybe showing off some technology)


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Vincent Hennebert
On Tue, 2023-08-22 at 15:45 +, Hamid,Idris wrote:
> On Aug 22, 2023, 2:06 AM -0600, Hans Hagen via ntg-context  cont...@ntg.nl>, wrote:
> > On 8/22/2023 6:31 AM, Hamid,Idris wrote:
> > I'm not going to look into this until there is a complete test case
> > for
> > this which means:
> > 
> > - free fonts (so that others can also test and use)
> > - design sizes
> > - fallback design sizes
> 
> The reason there are so few free optical-size typefaces is that they
> take a lot of work to get right. Indeed, really high-quality, fine-
> tuned free typefaces are hard to find even at single size. 

I don’t know about its quality, but Adobe makes the Source Serif font
available under the SIL Open Font License, with 5 optical sizes and 6
weights. I’m working on a typescript file that allows to use all those
variants, would be happy to contribute it if that’s useful.

https://github.com/adobe-fonts/source-serif


Vincent
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Hamid,Idris
On Aug 22, 2023, 10:21 AM -0600, Hans Hagen , wrote:
Also, some of these
commercial licenses have become pretty restrictive. With respect to
spending time on something, the same is true for some tools: supporting
acrobat, fonts, specific file formats, features etc ... one way tickets
... if we need it in a project i can waste the time on it, otherwise i
rather spend the time on things we (and users) can actually use and have
fun with.

At some point in the future, will aim to put together some typescripts using 
Latin Modern as base, and probably New Computer Modern (Greek, Hebrew, Coptic, 
etc.) and/or MLModern (slightly heavier per design size) as fallbacks.

(Also MLModern in particular is designed to match Latin Modern's encoding files 
etc.)

Each has its advantages and application cases for fallbacks across optical 
sizes, and it doesn't get more TeXie than experimenting with CM derivatives -)

(Wolfgang mentioned Antykwa Poltawskiego, and there are other possibilities as 
well.)

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: MAPS nr 53

2023-08-22 Thread Hans Hagen

On 8/22/2023 8:24 PM, Keith McKay wrote:

Would it be possible to list the contents to whet our appetites?
the successive chapters are basically the long articles that taco wrote 
about mp fundamentals for ctx meetings / journal + one extra


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] ConTeXt meeting 2023 attendance (please read)

2023-08-22 Thread Taco Hoekwater
Hi all,

This is a reminder that the registration for the upcoming ConTeXt meeting in 
Sibrina, Czech Republic is still open. The meeting will take place from Sept 10 
to Sept 16. You can go to 

  https://meeting.contextgarden.net

for more information. You will also find the registration form there. You can 
(of course) attend in person, but registration for online only attendance is 
also possible!

We hope to see you next month!

NOTE: There have recently been problems with the delivery of the filled-in 
registration form to the organisers. If you have registered sometime *in the 
last month* but have not heard from Jano or me yet, please re-register (the 
form emailer is fixed) or at least drop us a message!

Best wishes,
Taco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: MAPS nr 53

2023-08-22 Thread Keith McKay
Would it be possible to list the contents to whet our appetites?
Best Wishes
Keith McKay

On Tue, 22 Aug 2023, 18:43 luigi scarso,  wrote:

>
> An unmissable issue of MAPS, totally dedicated to MetaPost by Taco.
> Once free I will put it in the mp repository.
>
> --
> luigi
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: An strange error with section and page

2023-08-22 Thread Wolfgang Schuster

Xavier B. schrieb am 22.08.2023 um 19:32:

Hi,

I have a long document 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-exercicis.conTeXt.pdf]
 which I migrated from MKIV to LMTX version of ConTeXt. As Wolfgang recommened. 
I migrated old syntax to new one and replace \page[yes] before each section to

\setupheads[section][style={\bf \ssc}, alternative=margin, page=yes]

but now after each section there is a new page.

Why? I don't know.
Can someone help me to see what happens?

The source code is here [https://repo.or.cz/apunts-espa-matematiques.git]


You're using the structure for section of the following example in your 
document. This is a problem
because subjects are the same level as section or to be precise, 
subjects are unnumbered versions

of sections and inherit all settings from them unless configured otherwise.

While the solution here is to convert all subject headings to subsubject 
(be sure to also take care
of even lower section) a quick way to fix the page break is to disable 
the page-value for subject,

look at the commented line in the example how this can be done.

 begin example
\setuphead[section][page=yes]
%\setuphead[subject][page=no]

\starttext

\startsection[title=Section]

\startsubject [title=Subject]

\stopsubject

\stopsection

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] MAPS nr 53

2023-08-22 Thread luigi scarso
An unmissable issue of MAPS, totally dedicated to MetaPost by Taco.
Once free I will put it in the mp repository.

--
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] An strange error with section and page

2023-08-22 Thread Xavier B.
Hi,

I have a long document 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-exercicis.conTeXt.pdf]
 which I migrated from MKIV to LMTX version of ConTeXt. As Wolfgang recommened. 
I migrated old syntax to new one and replace \page[yes] before each section to 

\setupheads[section][style={\bf \ssc}, alternative=margin, page=yes]

but now after each section there is a new page.

Why? I don't know.
Can someone help me to see what happens?

The source code is here [https://repo.or.cz/apunts-espa-matematiques.git]

Thanks in advance,
Xavier

PS: Please CCme
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Wolfgang Schuster

Hamid,Idris schrieb am 22.08.2023 um 17:45:
On Aug 22, 2023, 2:06 AM -0600, Hans Hagen via ntg-context 
, wrote:


On 8/22/2023 6:31 AM, Hamid,Idris wrote:


Design sizes for typefaces -- aka "optical sizes" -- are no
longer directly implemented in typescripts. From the manual
Fonts out of ConTeXt by Hans Hagen, p. 109:

You can still do it but for all these years only cm has design
sizes so
one can wonder.


Hm.. There are a few others, Minion perhaps being the most popular and 
extensive. More below:


We have with Antykwa Poltawskiego a second font which provides optical 
sizes and is shipped with our TeX collection.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Hans Hagen

On 8/22/2023 5:45 PM, Hamid,Idris wrote:


(OTOH, had previously seen yours and Mikael's sophisticated minion-math.lfg)


It's not that complete and we only tested an old evaluation copy. Our 
policy wrt commercial fonts is now that we only look into them when we 
get (some 5) copies for context dev without any restriction of usage 
because we might want to show them in manuals or articles or 
presentations and there is no reason to spend time on them unlees we're 
paid for it.



I think that my version is/will be more complete - except for mathematics. Once 
some fine-tuning and additional testing is done, will donate the results to 
ConTeXt.


Good.


As for free fonts. MinionPro Opticals should be considered an exception to the 
free-fonts rubric. After all,

i)  its multiple-master design base was inspired by MetaFont/Knuth, and hence
ii) it's very popular with TeXies.


I don't have that font set and am not willing to spend money in it either.


Put another way, Minion Pro should be considered an honorary TeX typeface -)


Hm, so we should honor a font vendor for that? Do font vendors expect 
texies to spend time on something they cannot use? Also, some of these 
commercial licenses have become pretty restrictive. With respect to 
spending time on something, the same is true for some tools: supporting 
acrobat, fonts, specific file formats, features etc ... one way tickets 
... if we need it in a project i can waste the time on it, otherwise i 
rather spend the time on things we (and users) can actually use and have 
fun with.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: your opinion about list structures

2023-08-22 Thread Henning Hraban Ramm

Am 22.08.23 um 17:12 schrieb denis.ma...@unibe.ch:

Hi Hraban,

a late reply concerning the ToCs in your book: maybe you could an 
two-toc-approach like in the Memoir manual? One could show only the chapters, 
another would contain everything.


Hi,
since Keith as the only other responder also preferred the chapter-ToC 
approach, I changed my setup accordingly. It was easy and looks good ;)


Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Hamid,Idris
On Aug 22, 2023, 2:06 AM -0600, Hans Hagen via ntg-context 
, wrote:
On 8/22/2023 6:31 AM, Hamid,Idris wrote:

Design sizes for typefaces -- aka "optical sizes" -- are no longer directly 
implemented in typescripts. From the manual Fonts out of ConTeXt by Hans Hagen, 
p. 109:

You can still do it but for all these years only cm has design sizes so
one can wonder.

Hm.. There are a few others, Minion perhaps being the most popular and 
extensive. More below:

"at some point the decision was made to kick out these definitions and move the 
burden of figuring out the right size to Lua."

They were moved to the goodie file (there are every few design size
setups in goodie files, minion has one, but i don't have these fonts nor
use them.

Have just completed a minion-pro-opticals typescript collection with a 
minion-opticalsizes.lfg.

Somehow I didn't even see yours and Mathias' minion.lfg (and associated 
type-imp-minion) until just now, had to figure it all out from scratch from 
demo.lfg and lm.lfg templates -)

(OTOH, had previously seen yours and Mikael's sophisticated minion-math.lfg)

I think that my version is/will be more complete - except for mathematics. Once 
some fine-tuning and additional testing is done, will donate the results to 
ConTeXt.

(Thus some large typescript collections painstakingly built over the years are 
now obsolete and have to be rewritten. Oh well..)

Well, i suppose one can still setup/use the typescripts but it's less
fun. The old definefont mechanism is still there.

Unfortunately it doesn't work anymore -  or at least not the way it used to. My 
mkiv minion typescript collection, for example, still compiles in lmtx, but the 
design sizes do not show up in the output anymore, only the default size.

As a side note: we have design sizes (very few fonts) and weights (more
and more fonts) .. weights are imo an even bigger mess, as it looks like
some designers can't make up their mind and come with plenty weights
independent of the fact that some look bad; variable fonts only add to
this: the easier to use the creater tools become the easier it becomes
to make ugly fonts (I tend to ignore fonts that show off too many
possible choices; not much different from excessive kerning, ligatures
and other incomplete features).

You make an important point, especially about the proliferation of bad fonts 
via more accessible tools. On a related front, there are more and more 
Arabic-script fonts, but hardly anything really good or useable, even from 
reputable foundries like Adobe. At some point, presumably, designers quit early 
(or the company does not care to invest the needed time and funds).

Presumably, designing good optical sizes requires more care and subtlety than 
designing weights.

OTOH the more professional/high-end foundries sometimes recommend certain 
weights for optical-sizes. For example, your neighbors at Enschede:

http://www.teff.nl/fonts/geronimo/

"While Geronimo was mainly conceived as a typeface for (small) text, it also 
performs well at bigger sizes most notably the lighter weights.”"

There are 12 weights total (six regular + six italic), but the lighter weights 
are designed to work well at larger sizes. So from 12 fonts one can create a 
reasonable, combined optical-size and weight space.

(Speaking of Enschede, their Lexicon typeface use an interesting/unique 
optical-size concept.)

One thing about the explosion of weights is that the distinction between \tf 
and \bf (or \it and \bi) vanishes and becomes a spectrum. In that case, 
presumably one would

i)  forget about \bf and \bi
ii) multiply bodyfont-typefaces and switch directly between them as needed.

Etc.

If this appearance of a loss reflects the reality of the situation, would like 
to kindly request that the original functionality be restored to the 
higher-level user interface, presumably within the lfg file. So perhaps 
something like a keyval

fallbacks = {
["MyRomanRegular"] = {
"file:MyFont-Small" = "fallbacks=",
"file:MyFont-Regular", = "fallbacks=",
"file:MyFont-Bigger", = "fallbacks=",
"file:MyFont-Biggest", = "fallbacks=",
},

On the other hand, if access to the former functionality is still there 
somewhere in the user interface, would like to humbly request that someone 
share where it is and how to use it!

Thank you kindly for consideration of this request.

I'm not going to look into this until there is a complete test case for
this which means:

- free fonts (so that others can also test and use)
- design sizes
- fallback design sizes

As for free fonts. MinionPro Opticals should be considered an exception to the 
free-fonts rubric. After all,

i)  its multiple-master design base was inspired by MetaFont/Knuth, and hence
ii) it's very popular with TeXies.

Put another way, Minion Pro should be considered an honorary TeX typeface -)

(There is also an update, Minion 3; could imagine a perfectionist user wanting 
to keep the option of falling back between the two for special cases.)


[NTG-context] Re: your opinion about list structures

2023-08-22 Thread denis.maier
Hi Hraban,

a late reply concerning the ToCs in your book: maybe you could an 
two-toc-approach like in the Memoir manual? One could show only the chapters, 
another would contain everything.

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Henning Hraban Ramm 
> Gesendet: Donnerstag, 10. August 2023 15:22
> An: mailing list for ConTeXt users 
> Betreff: [NTG-context] your opinion about list structures
> 
> Hi, this is about my ConTeXt book again.
> 
> [ToC]
> 
> At the moment, my table of contents has chapters and sections and is 8 pages
> long. I would probably hardly use it.
> 
> Maybe it would be better to show only chapters (29 content + 12 appendix = 2
> pages) and include a list of sections after the chapter title (or not at all).
> 
> [Registers]
> 
> I split between command and topic index (9 pages each), because I find it
> annoying to have the commands between the topics.
> I also include the topics that are mentioned in titles in the index, because 
> I hate
> it if I must look in two places.
> (Otherwise I wouldn't think about omitting the sections from the ToC.)
> 
> At the moment there's also an index of todo items, but that will disappear
> before print.
> 
> [Glossary]
> 
> There's a short dictionary of technical terms in the appendix (8.5 p.).
> Each lemma is also included in the index.
> 
> Should I add a list of abbreviations? (TDS, TEI, OCG, RAL, PDF, SVG.?) They're
> in the index and explained where they matter - I don't think the meaning of
> many abbreviations like file types is important.
> 
> [Other lists]
> 
> Should I include a list of colors, like the output of \showcolor[crayola]? (I 
> think
> it would only bloat the book, and everyone can create the list themselves.)
> 
> I have lists of supported languages (should get checked), fonts in the
> distribution and all math fonts, because these are not easily reproducible
> (AFAIK).
> 
> 
> So, what do you think, and how do you like to work with technical books?
> What kind of information (about ConTeXt or documents/printing in
> general) do you find hard to find?
> 
> Hraban
> ___
> 
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl /
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
> .ntg.nl%2Fmailman%2Flistinfo%2Fntg-
> context=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5f7a14d8
> 5386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7C1%7C0
> %7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4
> wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%
> 7C%7C%7C=wp5lFDSJq9915y4de%2BNuNiULb09yT%2FpDr%2FWXrq
> OcdVI%3D=0
> webpage  :
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
> .pragma-
> ade.nl%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5f7a14
> d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7C1%7
> C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000
> %7C%7C%7C=TLdBrqOp1GuhmQRLiaydxRox1aeaO%2BWASrA%2FBa
> OAs%2BI%3D=0 /
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontex
> t.aanhet.net%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b5
> f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%7
> C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJWI
> joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> 3000%7C%7C%7C=T%2FP42p3V5RzC%2B%2BwX5vByYtXy3LFOHce5
> Eues%2F8PPsug%3D=0
> archive  :
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbu
> cket.org%2Fphg%2Fcontext-
> mirror%2Fcommits%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6
> e26b5f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d79
> 77e%7C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d
> 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C3000%7C%7C%7C=MR51GITNqb9ludzBJMwmu4AqE%2BaWw
> 0%2BIPpPm76Nwv%2BE%3D=0
> wiki :
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fconte
> xtgarden.net%2F=05%7C01%7Cdenis.maier%40unibe.ch%7C8c6e26b
> 5f7a14d85386c08db99a4ef16%7Cd400387a212f43eaac7f77aa12d7977e%
> 7C1%7C0%7C638272705889584734%7CUnknown%7CTWFpbGZsb3d8eyJ
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
> %7C3000%7C%7C%7C=ubpCSLzX4vdgb7WNlaK7ASRwd94Ugv0TtuF8
> wzDnnts%3D=0
> ___
> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Fabrice Couvreur
Hi Mikael,
Thank you for this command ; there must be many others that I don't know
how they work.
Fabrice

Le mar. 22 août 2023 à 10:54, Mikael Sundqvist  a écrit :

> Hi,
>
> On Tue, Aug 22, 2023 at 12:25 PM Fabrice Couvreur
>  wrote:
> >
> > Hi,
> > In an algebraic expression, it is sometimes interesting to cross out
> terms. With LaTeX, there is the \cancel command from the package cancel. Is
> there an equivalent with conTeXt ?
> > Thanks
> > Fabrice
>
> I don't know what the cancel package gives, but since December 22 or
> so, one can do
>
> \starttext
>
> \setupframed
> [mathstrikeout]
> [color=darkgreen,
> backgroundcolor=darkred,
> frame=off]
>
> \startTEXpage[offset=4dk,align=flushleft]
> \dm{1+\mathstrikeout[strike:text={what is this?}]{(2x-x)}+2=3+x}
> \blank
> \dm{1+\mathstrikeout[strike:math={=x}]{(2x-x)}+2=3+x}
> \blank
> \dm{1+\mathstrikeout[strike:math=u,arrow=no]{(2x-x)}+2=3+x}
> \blank
> \dm{1+\mathcrossout[strike:math={=x}]{(2x-x)}+2=3+x}
> \stopTEXpage
>
> \stoptext
>
> /Mikael
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Nested itemize

2023-08-22 Thread fv leung
It seems that displaystyle fractions insert extra vertical space before the
main item.
With textstyle fractions, the code works fine.
\blank[back,overlay] can get rid of the gap above the first row, but not
the space inserted by \dfrac.


\defineitemgroup[alex]

\setupitemgroup
 [alex]
 [each]
 [a,two]
 [
 margin=2cm,
 before={\blank[overlay,-depth]},
 after={\blank[nowhite]},
 stopper=)
 ]

%\showboxes
\autofences

\starttext
\samplefile{ward}
\startitemize[n][style=\bf,before={\blank[back,overlay]},after={\blank[medium]}]
  \startitem
\startalextable
  \startitem
\m{6(x - \frac{5}{12})^2 - \frac{1}{24}}
  \stopitem
  \startitem
\m{-3(x - \frac{1}{3})^2 + \frac{1}{3}}
  \stopitem
  \startitem
\m{7(x + \frac{5}{14})^2 + \frac{199}{28}}
  \stopitem
  \startitem
\m{-\frac{1}{2}(x + 2)^2 + \frac{9}{2}}
  \stopitem
\stopalextable
  \stopitem
\stopitemize

\samplefile{ward}
\stoptext

Alexandre Christe  於 2023年8月22日 週二 下午5:48寫道:

> Hi Mikael,
>
> That looks very attractive. However, with the following code, I end up
> with a large gap above the first row.
>
> \defineitemgroup[alex]
>
> \setupitemgroup
>  [alex]
>  [each]
>  [a,two]
>  [
>  margin=2cm,
>  before=\blank[overlay,-depth],
>  stopper=)
>  ]
>
> \showboxes
> \autofences
>
> \starttext
> \samplefile{ward}
>
> \startitemize[n][style=\bf]
>  \startitem
>  \startalextable
>  \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem
>  \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem
>  \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem
>  \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem
>  \stopalextable
>  \stopitem
> \stopitemize
>
> \samplefile{ward}
> \stoptext
>
> A. Christe
> Le 22 août 2023 à 07:12 +0200, Alexandre Christe ,
> a écrit :
>
> It’s true that \vtop{…} does the job for a single line of items, but it
> doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom.
>
> Here’s a modified MWE
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize
> [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> A. Christe
> Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
>
> I'd do it this way:
>
> \starttext
> \startitemize[n][style=\bf]
> \item\vtop{%
>   \startitemize[a,horizontal,four][stopper=\)]
> \startitem
>   $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \stopitem
> \startitem
>   $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \stopitem
> \startitem
>   $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \stopitem
> \startitem
>   $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> \stopitem
>   \stopitemize
> }
> \stopitemize
>
> \stoptext
>
> Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
>
>> Dear ConTeXt users,
>>
>> Time goes by but I haven't yet found a nice solution to this issue. When
>> having mathematics, I'd not like to adjust by hand the factor of \linewidth
>> for the \godown command.
>>
>> Here's a MWE
>>
>> \starttext
>>
>> \startitemize[n][style=\bf]
>>   \item \godown[-\lineheight] \startitemize
>> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
>> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>>   \stopitemize
>> \stopitemize
>>
>> \stoptext
>>
>> Thanks in advance.
>>
>> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context <
>> ntg-context@ntg.nl> a écrit :
>>
>>>
>>> \starttext
>>>
>>> \startitemize[n]
>>> \item\godown[-\lineheight]
>>>
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \stopitemize
>>>
>>> \stoptext
>>>
>>> Alexandre Christe via ntg-context  於 2022年9月2日 週五
>>> 下午5:08寫道:
>>>
 Dear all,

 I'm struggling to setup a nested itemize with no blank line and several
 columns.

 What I mean is something like
 1. a) bla   c) bla
 b) bla   d) bla

 The following MWE is my starting point

 \starttext
 \startitemize[n]
 \item \blank[-line]
 

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Mikael Sundqvist
Hi,

On Tue, Aug 22, 2023 at 12:25 PM Fabrice Couvreur
 wrote:
>
> Hi,
> In an algebraic expression, it is sometimes interesting to cross out terms. 
> With LaTeX, there is the \cancel command from the package cancel. Is there an 
> equivalent with conTeXt ?
> Thanks
> Fabrice

I don't know what the cancel package gives, but since December 22 or
so, one can do

\starttext

\setupframed
[mathstrikeout]
[color=darkgreen,
backgroundcolor=darkred,
frame=off]

\startTEXpage[offset=4dk,align=flushleft]
\dm{1+\mathstrikeout[strike:text={what is this?}]{(2x-x)}+2=3+x}
\blank
\dm{1+\mathstrikeout[strike:math={=x}]{(2x-x)}+2=3+x}
\blank
\dm{1+\mathstrikeout[strike:math=u,arrow=no]{(2x-x)}+2=3+x}
\blank
\dm{1+\mathcrossout[strike:math={=x}]{(2x-x)}+2=3+x}
\stopTEXpage

\stoptext

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Fabrice Couvreur
Hi Alexander,
Thank you for this suggestion which will do the trick.
Fabrice

Le mar. 22 août 2023 à 10:26, Alexandre Christe  a
écrit :

> Hi Fabrice,
>
> I have this from former exchanges
>
> % Cancel command for use in equations.
> \startuniqueMPgraphic{cross out}
>  picture cross;
>  cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
>  draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
> scaled .8pt ;
> \stopuniqueMPgraphic
>
> \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
>
> \define[1]\cancel{%
>  \ifmmode
>  \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
>  \else%
>  \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
>  \fi%
> }
>
> Maybe something else is available nowadays.
>
> A. Christe
> Le 22 août 2023 à 12:22 +0200, Fabrice Couvreur <
> fabrice1.couvr...@gmail.com>, a écrit :
>
> Hi,
> In an algebraic expression, it is sometimes interesting to cross out
> terms. With LaTeX, there is the \cancel command from the package cancel. Is
> there an equivalent with conTeXt ?
> Thanks
> Fabrice
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Alexandre Christe
Hi Fabrice,

I have this from former exchanges

% Cancel command for use in equations.
\startuniqueMPgraphic{cross out}
 picture cross;
 cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
 draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
scaled .8pt ;
\stopuniqueMPgraphic

\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]

\define[1]\cancel{%
 \ifmmode
 \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
 \else%
 \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
 \fi%
}

Maybe something else is available nowadays.

A. Christe
Le 22 août 2023 à 12:22 +0200, Fabrice Couvreur , 
a écrit :
> Hi,
> In an algebraic expression, it is sometimes interesting to cross out terms. 
> With LaTeX, there is the \cancel command from the package cancel. Is there an 
> equivalent with conTeXt ?
> Thanks
> Fabrice
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Fabrice Couvreur
Hi,
In an algebraic expression, it is sometimes interesting to cross out terms.
With LaTeX, there is the \cancel command from the package cancel. Is there
an equivalent with conTeXt ?
Thanks
Fabrice
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Nested itemize

2023-08-22 Thread Alexandre Christe
Hi Mikael,

That looks very attractive. However, with the following code, I end up with a 
large gap above the first row.

\defineitemgroup[alex]

\setupitemgroup
 [alex]
 [each]
 [a,two]
 [
 margin=2cm,
 before=\blank[overlay,-depth],
 stopper=)
 ]

\showboxes
\autofences

\starttext
\samplefile{ward}

\startitemize[n][style=\bf]
 \startitem
 \startalextable
 \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem
 \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem
 \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem
 \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem
 \stopalextable
 \stopitem
\stopitemize

\samplefile{ward}
\stoptext

A. Christe
Le 22 août 2023 à 07:12 +0200, Alexandre Christe , a 
écrit :
> It’s true that \vtop{…} does the job for a single line of items, but it 
> doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom.
>
> Here’s a modified MWE
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize 
> [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
>     \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>     \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>     \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>     \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> A. Christe
> Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
> > I'd do it this way:
> >
> > \starttext
> > \startitemize[n][style=\bf]
> > \item\vtop{%
> >   \startitemize[a,horizontal,four][stopper=\)]
> >     \startitem
> >       $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> >     \stopitem
> >     \startitem
> >       $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> >     \stopitem
> >     \startitem
> >       $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> >     \stopitem
> >     \startitem
> >       $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> >     \stopitem
> >   \stopitemize
> > }
> > \stopitemize
> >
> > \stoptext
> >
> > > Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
> > > > Dear ConTeXt users,
> > > >
> > > > Time goes by but I haven't yet found a nice solution to this issue. 
> > > > When having mathematics, I'd not like to adjust by hand the factor of 
> > > > \linewidth for the \godown command.
> > > >
> > > > Here's a MWE
> > > >
> > > > \starttext
> > > >
> > > > \startitemize[n][style=\bf]
> > > >   \item \godown[-\lineheight] \startitemize 
> > > > [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
> > > >     \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> > > >     \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> > > >     \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> > > >     \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> > > >   \stopitemize
> > > > \stopitemize
> > > >
> > > > \stoptext
> > > >
> > > > Thanks in advance.
> > > >
> > > > > Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context 
> > > > >  a écrit :
> > > > > >
> > > > > > \starttext
> > > > > >
> > > > > > \startitemize[n]
> > > > > > \item\godown[-\lineheight]
> > > > > >   
> > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \stopitemize
> > > > > > \item\godown[-\lineheight]
> > > > > >   
> > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \stopitemize
> > > > > > \item\godown[-\lineheight]
> > > > > >   
> > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \item bla
> > > > > >   \stopitemize
> > > > > > \stopitemize
> > > > > >
> > > > > > \stoptext
> > > > > >
> > > > > > > Alexandre Christe via ntg-context  於 
> > > > > > > 2022年9月2日 週五 下午5:08寫道:
> > > > > > > > Dear all,
> > > > > > > >
> > > > > > > > I'm struggling to setup a nested itemize with no blank line and 
> > > > > > > > several columns.
> > > > > > > >
> > > > > > > > What I mean is something like
> > > > > > > > 1. a) bla   c) bla
> > > > > > > >     b) bla   d) bla
> > > > > > > >
> > > > > > > > The following MWE is my starting point
> > > > > > > >
> > > > > > > > \starttext
> > > > > > > > \startitemize[n]
> > > > > > > > \item \blank[-line]
> > > > > > > > \startitemize[a,horizontal,two] [margin=2cm]
> > > > > > > > \item First
> > > > > > > > \item Second
> > > > > > > > \item Third
> > > > > > > > \item Fourth
> > > > > > > > \stopitemize
> > > > > > > > \item \blank[-line]
> > > > > > > > \startitemize[a,horizontal,columns,two]
> > > > > > > > \item First
> > > > > > > > \item Second
> > > > > > > > \item Third
> > > > > > > > \item Fourth
> > > > > > > > \stopitemize
> > 

[NTG-context] Disable continued captions for table parts

2023-08-22 Thread Alexey Kryukov
Dear list,

probably a stupid question, but is it possible to have a table splitted
across pages without adding labels to all subsequent table parts except
the first one?

In my book I have captions above tables
(\setupcaption[table][location=top]), so they are expected to behave
like normal heading. With this type of formatting any "continued" marks
would look weird.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Nested itemize

2023-08-22 Thread Mikael Sundqvist
Hi,

On Tue, Aug 22, 2023 at 7:16 AM Alexandre Christe
 wrote:
>
> It’s true that \vtop{…} does the job for a single line of items, but it 
> doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom.
>
> Here’s a modified MWE
>
> \startitemize[n][style=\bf]
>   \item \godown[-\lineheight] \startitemize 
> [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}]
> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>   \stopitemize
> \stopitemize
>
> A. Christe
> Le 22 août 2023 à 04:08 +0200, fv leung , a écrit :
>
> I'd do it this way:
>
> \starttext
> \startitemize[n][style=\bf]
> \item\vtop{%
>   \startitemize[a,horizontal,four][stopper=\)]
> \startitem
>   $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
> \stopitem
> \startitem
>   $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
> \stopitem
> \startitem
>   $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
> \stopitem
> \startitem
>   $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
> \stopitem
>   \stopitemize
> }
> \stopitemize
>
> \stoptext
>
> Alexandre Christe  於 2023年8月22日 週二 上午2:58寫道:
>>
>> Dear ConTeXt users,
>>
>> Time goes by but I haven't yet found a nice solution to this issue. When 
>> having mathematics, I'd not like to adjust by hand the factor of \linewidth 
>> for the \godown command.
>>
>> Here's a MWE
>>
>> \starttext
>>
>> \startitemize[n][style=\bf]
>>   \item \godown[-\lineheight] \startitemize 
>> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}]
>> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$
>> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$
>> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$
>> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$
>>   \stopitemize
>> \stopitemize
>>
>> \stoptext
>>
>> Thanks in advance.
>>
>> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context  
>> a écrit :
>>>
>>>
>>> \starttext
>>>
>>> \startitemize[n]
>>> \item\godown[-\lineheight]
>>>   
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>   
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \item\godown[-\lineheight]
>>>   
>>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=]
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \item bla
>>>   \stopitemize
>>> \stopitemize
>>>
>>> \stoptext
>>>
>>> Alexandre Christe via ntg-context  於 2022年9月2日 週五 
>>> 下午5:08寫道:

 Dear all,

 I'm struggling to setup a nested itemize with no blank line and several 
 columns.

 What I mean is something like
 1. a) bla   c) bla
 b) bla   d) bla

 The following MWE is my starting point

 \starttext
 \startitemize[n]
 \item \blank[-line]
 \startitemize[a,horizontal,two] [margin=2cm]
 \item First
 \item Second
 \item Third
 \item Fourth
 \stopitemize
 \item \blank[-line]
 \startitemize[a,horizontal,columns,two]
 \item First
 \item Second
 \item Third
 \item Fourth
 \stopitemize
 \stopitemize
 \stoptext

 Thanks in advance

Not really tested, but \blank[overlay,-depth] seems to work OK (thanks Hans!).

I also take the opportunity to push a bit for the new itemtable mechanism:

\defineitemgroup[alex]

\setupitemgroup
[alex]
[each]
[a,two]
[margin=2cm,
before=\blank[overlay,-depth]]

\showboxes

\starttext
\startitemize[n]
\startitem
\startalextable
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\startitem Fourth \stopitem
\stopalextable
\stopitem
\stopitemize
\stoptext

Please test for a larger document to see if it works well.

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: hyphenation inside quotation

2023-08-22 Thread Hans Hagen

On 8/22/2023 9:59 AM, Henning Hraban Ramm wrote:

Am 20.08.23 um 08:32 schrieb Wolfgang Schuster:

In the next release you don't need the method=font anymore because the 
missing hyphenation
is the result of a old patch which was needed in 2013. Back than there 
was no problem
with hyphenation and the patch but since than Hans added a few new 
features to Luametatex
to improve the quotation mechanism and the patch results now in the 
unwanted side effect.


I always had \setupdelimitedtext[quotation][method=font] in my 
environments without really understanding it (remark: enables hanging 
quotation marks).


So both methods (font/text) are obsolete now / with an upcoming update?
no, we only remove a penalty preventing hyphensation .. there is no need 
to change this mechanism


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Fallbacks for design sizes in the current typescripts regime

2023-08-22 Thread Hans Hagen via ntg-context

On 8/22/2023 6:31 AM, Hamid,Idris wrote:

Dear gang,

Design sizes for typefaces -- aka "optical sizes" -- are no longer directly 
implemented in typescripts. From the manual Fonts out of ConTeXt by Hans Hagen, p. 109:


You can still do it but for all these years only cm has design sizes so 
one can wonder.



"at some point the decision was made to kick out these definitions and move the 
burden of figuring out the right size to Lua."


They were moved to the goodie file (there are every few design size 
setups in goodie files, minion has one, but i don't have these fonts nor 
use them.



(Thus some large typescript collections painstakingly built over the years are 
now obsolete and have to be rewritten. Oh well..)


Well, i suppose one can still setup/use the typescripts but it's less 
fun. The old definefont mechanism is still there.


As a side note: we have design sizes (very few fonts) and weights (more 
and more fonts) .. weights are imo an even bigger mess, as it looks like 
some designers can't make up their mind and come with plenty weights 
independent of the fact that some look bad; variable fonts only add to 
this: the easier to use the creater tools become the easier it becomes 
to make ugly fonts (I tend to ignore fonts that show off too many 
possible choices; not much different from excessive kerning, ligatures 
and other incomplete features).



But there is an issue in the new regime:

In the old system, every typescript mapping to a font within a design-size 
range could have its own fallback. For example:

% Small ="small point size"
% Regular = "regular point size"
% Bigger = "bigger point size"
% Biggest = "biggest point size"

\definefontsynonym [MyRomanRegular]
 [file:MyFont-Regular.ttf] [features=,fallbacks=]
\definefontsynonym [MyRomanSmall]
 [file:MyFont-Small.ttf] [features=,fallbacks=]
\definefontsynonym [MyRomanBigger]
 [file:MyFont-Bigger.ttf] [features=,fallbacks=]
\definefontsynonym [MyRomanBiggest]
 [file:MyFont-Biggest.ttf] [features=,fallbacks=]

In the new typescripts regime we keep one font from the design-size range in 
the typescript file; the rest of the optical sizes go into an lfg goodies file:

\definefontsynonym [MyRomanRegular]
   \loadfontgoodies[myfonts-opticalsizes] % other three fonts go into an lfg 
table
 [file:MyFont-Regular.ttf] [features=,fallbacks=]

designsizes = {
 ["MyRomanRegular"] = {
 ["7pt"]  = "file:MyFont-Small",
 ["8pt"]  = "file:MyFont-Small",
 ["9pt"]  = "file:MyFont-Regular",
 ["10pt"]= "file:MyFont-Regular",
 ["11pt"]= "file:MyFont-Regular",
 ["12pt"]= "file:MyFont-Bigger",
 ["14pt"]= "file:MyFont-Bigger",
 ["17pt"]= "file:MyFont-Biggest",
 ["21pt"]= "file:MyFont-Biggest",
 default  = "file:MyFont-Regular",
 },

But there is an apparent drawback to this new way of doing things: It appears 
that only the default font can have an explicit fallback, and there appears 
that there is no straightforward way to map each of the other design sizes to 
its own fallback.

If there is indeed no way to map each non-default design size to a fallback, 
then that constitutes a significant/unfortunate loss of functionality in the 
user interface.

If this appearance of a loss reflects the reality of the situation, would like 
to kindly request that the original functionality be restored to the 
higher-level user interface, presumably within the lfg file. So perhaps 
something like a keyval

 fallbacks = {
 ["MyRomanRegular"] = {
 "file:MyFont-Small"= "fallbacks=",
 "file:MyFont-Regular",   = "fallbacks=",
 "file:MyFont-Bigger", = "fallbacks=",
 "file:MyFont-Biggest",   = "fallbacks=",
 },

On the other hand, if access to the former functionality is still there 
somewhere in the user interface, would like to humbly request that someone 
share where it is and how to use it!

Thank you kindly for consideration of this request.
I'm not going to look into this until there is a complete test case for 
this which means:


- free fonts (so that others can also test and use)
- design sizes
- fallback design sizes

Of course one can have some abstract fallback defined using the 
"MyFont-Small" namespace where the files used get remapped too as one 
goes. A bit like we do with the gyre fonts where we share definitions.


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 

[NTG-context] Re: hyphenation inside quotation

2023-08-22 Thread Henning Hraban Ramm

Am 20.08.23 um 08:32 schrieb Wolfgang Schuster:

In the next release you don't need the method=font anymore because the 
missing hyphenation
is the result of a old patch which was needed in 2013. Back than there 
was no problem
with hyphenation and the patch but since than Hans added a few new 
features to Luametatex
to improve the quotation mechanism and the patch results now in the 
unwanted side effect.


I always had \setupdelimitedtext[quotation][method=font] in my 
environments without really understanding it (remark: enables hanging 
quotation marks).


So both methods (font/text) are obsolete now / with an upcoming update?

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: XML processing beginner's question

2023-08-22 Thread Hans Hagen via ntg-context

On 8/22/2023 9:06 AM, denis.ma...@unibe.ch wrote:


But, I think the way this is processed differs a bit from XSLT. In XSLT the 
most specific match will be applied, but ConTeXt seems to proceed from top to 
bottom until it finds a match. (Is that correct?)
it just associates the most recent match with a setup . if needed we 
could extend the mechanism with varianst but i have to admit that it has 
been stable (mostly untouched) for close to 15 years now so all has to 
be done very careful; it has also be tuned for performance and large 
scale throughput


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Low res output possible?

2023-08-22 Thread Henning Hraban Ramm

Am 22.08.23 um 04:19 schrieb Benjamin Buchmuller:

I had the same question a couple of days ago and I found a thread on the 
mailing list, which I'm reposting here. Although this worked for me, I found 
downsampling of the pdf with gs more convenient.


Here’s a shorter solution:

\startluacode
local function downsampler(oldname, newname, resolution)
if not resolution or resolution == "" then
resolution = 72
end
local cmd = string.format(
  [[gm convert -resample %ix%i %s %s]],
  resolution, resolution, oldname, newname)
-- print(cmd)
os.execute(cmd)
end

-- Set the PDF and default JPEG converters to the above function.
figures.converters.jpg.pdf = downsampler
figures.converters.jpg.default = downsampler
\stopluacode

You can set the resolution in \setupexternalfigure this way.
But the calculation doesn’t take scaling into account, I have this on my 
todo list for too long…

And it should be possible to hook this into "conversion"…

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: XML processing beginner's question

2023-08-22 Thread Hans Hagen via ntg-context

On 8/22/2023 8:53 AM, denis.ma...@unibe.ch wrote:

-Ursprüngliche Nachricht-
Von: Hans Hagen via ntg-context 
Gesendet: Montag, 21. August 2023 19:09

you need a bit of imagination because basically (depends a bit on what you
do) one big nested expansion is going on, as Thomas explained: using setups
which are basically macros. The #1 is the current node (but you can store it in 
a
macro and use it later if needed). So, only references are passed around.

for thomas: we now also have (in lmtx)

\ifxml {id}{pattern}  \else \fi
\ifxmltext {id}{pattern}  \else \fi
\ifxmlatt  {id}{name}{value}  \else \fi
\ifxmlattempty {id}{pattern}  \else \fi
\ifxmlempty{id}{pattern}  \else \fi
\ifxmlselfempty{id}   \else \fi


So, these new commands diverge from the older patterns:
\xmldoifelse{#1}{pattern}{TRUE}{FALSE} ?


they can do the same


Am I reading this correctly?
These are more 'texie' commands avoiding a middle layer. A main 
difference is that in the case of a \if construction one can have 
lookahead issues when a command in a branch has to look forward and pick 
up an argument but that happens seldom in xml (probably never).


\ifxml{#1}{/foo}
  a
\orelse\ifxml{#1}{/ofo}
  b
\orelse\ifxml{#1}{/oof}
  c
\orelse\ifempty{xmlatt{#1}{n}}
  d
% could also be a check for number first:
\orelse\ifnum\xmlattr{#1}{n}>10\relax % of \norelax
  e
\fi

etc (see lowlevel manual) can look a bit less messy that using 5 nested 
\doifelse's but one has to be aware of the number scanner looking ahead 
so ending up in the branch because setups have no spaces at the end of 
lines.


(kind of) think of it like this:

\protected\def\xmldoifelse#1#2%
  {\ifxml{#1}{pattern}%
 \expandafter\firstoftwoareguments
   \else
 \expandafter\secondoftwoareguments
   \fi}

performance wise there is a bit of a difference but i never hear 
complaints so i guess that matters less


so: just two ways of programming a solution

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Not getting a page break in the ToC

2023-08-22 Thread Hans Hagen via ntg-context

On 8/22/2023 8:51 AM, Andres Conrado Montoya wrote:

Apologies, I just found the solution:
https://wiki.contextgarden.net/Command/setinjector

El lun, 21 ago 2023 a las 23:43, Andres Conrado Montoya (<
andresconr...@gmail.com>) escribió:


I'm trying to force a page break in a table of contents, using what is
recommended at
https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break

However, it does not work. Here's a MWE:

\definelistextra[page][before=\page]
\starttext
\starttitle[title={Table of contents}]
\placecontent[extras={2=page}]
\stoptitle
\startchapter[title={First chapter}]
\input knuth
\stopchapter
\startchapter[title={Second chapter}]
\input knuth
\stopchapter
\startchapter[title={Third chapter}]
\input knuth
\stopchapter
\stoptext

Is there a new way of obtaining a page break before a given part, chapter
or section in the ToC?

Here is another method:

\showpageprogress % [all]
%resetforcedbreak

\starttext
\registerforcedbreak[8][before]
\dorecurse{10}{\samplefile{tufte}\par}
\page
\resetforcedbreak
\registerforcedbreak[12][after]
\dorecurse{10}{\samplefile{tufte}\par}
\stoptext

(by-product of some new mechanisms that we are exploring)

(not yet wikified)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: XML processing beginner's question

2023-08-22 Thread denis.maier
> -Ursprüngliche Nachricht-
> Von: Thomas A. Schmitz 
> Gesendet: Montag, 21. August 2023 18:20
> An: mailing list for ConTeXt users 
> Betreff: [NTG-context] Re: XML processing beginner's question
> 
> On 8/21/23 17:59, Michael Löscher wrote:
> > Yes, I have done that. But I don't seem to have the basic context of
> > how the processing works in order. All I have so far is this as a
> > starting
> > point:
> >
> Really? I told you about the various commands \xmldoif, but there's nothing in
> your starting point. I don't want to provide anybody homework solutions, so
> just to give you an idea to get you started:
> 
> \startxmlsetups xml:mysetup
> \xmlsetsetup{main}{document|element|mdata|tdata|name|date|num|con
> tent|shortdescription|p}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:mysetup}
> 
> \startxmlsetups xml:document
>   \xmlflush {#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:element
>   \xmlflush {#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:mdata
>   \xmldoifelsetext {#1} {/date}
>   {{\bf \xmltext {#1} {name}}\par
>   {\it \xmltext {#1} {date}}\par}
>   {\xmltext {#1} {content}\par}
> \stopxmlsetups
> 

Just to add to this: You can also apply a more XSLT-like approach, like test 
directly when matching:

\startxmlsetups xml:mysetup
\xmlsetsetup{main}{document}{xml:*}
\xmlsetsetup{main}{element[@class="myclass"]}{xml:element-with-attribute}
\xmlsetsetup{main}{element[./subelement-one]}{xml:element-with-subelement-one}
\xmlsetsetup{main}{element[./subelement-two]}{xml:element-with-subelement-two}
\stopxmlsetups

\xmlregistersetup{xml:mysetup}

\startxmlsetups xml:document
\xmlflush {#1}
\stopxmlsetups

\startxmlsetups xml:element-with-attribute
0
\stopxmlsetups

\startxmlsetups element-with-subelement-one
1
\stopxmlsetups

\startxmlsetups element-with-subelement-two
2
\stopxmlsetups


But, I think the way this is processed differs a bit from XSLT. In XSLT the 
most specific match will be applied, but ConTeXt seems to proceed from top to 
bottom until it finds a match. (Is that correct?)

Best,
Denis
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: XML processing beginner's question

2023-08-22 Thread denis.maier
> -Ursprüngliche Nachricht-
> Von: Hans Hagen via ntg-context 
> Gesendet: Montag, 21. August 2023 19:09
> 
> you need a bit of imagination because basically (depends a bit on what you
> do) one big nested expansion is going on, as Thomas explained: using setups
> which are basically macros. The #1 is the current node (but you can store it 
> in a
> macro and use it later if needed). So, only references are passed around.
> 
> for thomas: we now also have (in lmtx)
> 
> \ifxml {id}{pattern}  \else \fi
> \ifxmltext {id}{pattern}  \else \fi
> \ifxmlatt  {id}{name}{value}  \else \fi
> \ifxmlattempty {id}{pattern}  \else \fi
> \ifxmlempty{id}{pattern}  \else \fi
> \ifxmlselfempty{id}   \else \fi

So, these new commands diverge from the older patterns:
\xmldoifelse{#1}{pattern}{TRUE}{FALSE} ?

Am I reading this correctly?

Denis
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Not getting a page break in the ToC

2023-08-22 Thread Andres Conrado Montoya
Apologies, I just found the solution:
https://wiki.contextgarden.net/Command/setinjector

El lun, 21 ago 2023 a las 23:43, Andres Conrado Montoya (<
andresconr...@gmail.com>) escribió:

> I'm trying to force a page break in a table of contents, using what is
> recommended at
> https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break
>
> However, it does not work. Here's a MWE:
>
> \definelistextra[page][before=\page]
> \starttext
> \starttitle[title={Table of contents}]
> \placecontent[extras={2=page}]
> \stoptitle
> \startchapter[title={First chapter}]
> \input knuth
> \stopchapter
> \startchapter[title={Second chapter}]
> \input knuth
> \stopchapter
> \startchapter[title={Third chapter}]
> \input knuth
> \stopchapter
> \stoptext
>
> Is there a new way of obtaining a page break before a given part, chapter
> or section in the ToC?
>
> Thank you in advance.
>
> --
> 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
>


-- 
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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___