[NTG-context] Re: which parameter is for adjust the distance between items in a list?

2024-04-25 Thread hf
You are right. I shall change the parameter `inbetween` in `\setupitemize`.

Regards,
Hong


April 25, 2024 at 4:54 PM, "Henning Hraban Ramm"  wrote:

> Am 25.04.24 um 10:46 schrieb h...@hongfeng.ch:
> 
>> thank you.
>> 
>> just tried, not worked out yet.
>> 
>> Here it is my text:
>> 
>> ```
>> 
>> setuplist[height=0]
>> 
>> \startitemize[n]
>> 
>> \item It's impossible --- don't waste my time.
>> 
>> \item It's possible, but not worth doing.
>> 
>> \item I said it was a good ideal all along.
>> 
>> \stopitemize
>> 
>> ```
>> 
>> Now the distance between the items is equal to the blank space between 
>> paragraphs.
>> 
>> I want to reduce it equal to the distance between the lines of a paragraph.
> 
> You asked for a list, that is e.g. a table of contents (list of numbered 
> items like sections or 
> floats).
> 
> If you want to affect itemizations, use \setupitemize (same as 
> \setupitemgroup[itemize]).
> 
> https://wiki.contextgarden.net/Command/_setupitemgroup
> 
> Besides, height is a different parameter.
> 
> Hraban
> 
> ___
> 
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> 
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> 
> archive : https://github.com/contextgarden/context
> 
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: which parameter is for adjust the distance between items in a list?

2024-04-25 Thread Henning Hraban Ramm

Am 25.04.24 um 10:46 schrieb h...@hongfeng.ch:

thank you.

just tried, not worked out yet.

Here it is my text:

```
setuplist[height=0]
\startitemize[n]
\item It's impossible --- don't waste my time.
\item It's possible, but not worth doing.
\item I said it was a good ideal all along.
\stopitemize
```

Now the distance between the items is equal to the blank space between 
paragraphs.
I want to reduce it equal to the distance between the lines of a paragraph.


You asked for a list, that is e.g. a table of contents (list of numbered 
items like sections or floats).


If you want to affect itemizations, use \setupitemize (same as 
\setupitemgroup[itemize]).

https://wiki.contextgarden.net/Command/_setupitemgroup

Besides, height is a different parameter.

Hraban

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: which parameter is for adjust the distance between items in a list?

2024-04-25 Thread hf
thank you.

just tried, not worked out yet.

Here it is my text:

```
setuplist[height=0]
\startitemize[n]
\item It's impossible --- don't waste my time.
\item It's possible, but not worth doing.
\item I said it was a good ideal all along.
\stopitemize
```

Now the distance between the items is equal to the blank space between 
paragraphs.
I want to reduce it equal to the distance between the lines of a paragraph.

Best,
Hong



April 25, 2024 at 4:22 PM, "Henning Hraban Ramm"  wrote:

> Am 25.04.24 um 10:20 schrieb h...@hongfeng.ch:
> 
>> which parameter in `\setuplist` is used for adjusting the distance 
>> 
>> between the items of a list?
> 
> Usually it’s the general line height.
> 
> You can use "inbetween=\blank[3pt]" to insert extra space.
> 
> (Untested)
> 
> Hraban
> 
> ___
> 
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> 
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> 
> archive : https://github.com/contextgarden/context
> 
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] preventing column break after section title

2024-04-18 Thread Peter Münster
Hi,

How could I prevent a column break after the second section title please?

Minimal example:

\starttext
\startcolumns[n=2]
  \section{title 1}
  \dorecurse{22}{bla\par}
  \section{title 2} % Here starts a new column.
  \startitemize
\dorecurse{15}{\item bla}
  \stopitemize
\stopcolumns
\stoptext

I’ve tried "\setuphead[section][after={\columnbreak[no]}]", but it does
not help.

TIA for any hints,
-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Most recent context doesn't like synctex?

2024-04-15 Thread Jim
Hraban and any emacs users:

On Sun, Apr 14, 2024 at 11:56 (+0200), Henning Hraban Ramm wrote:

> Am 13.04.24 um 22:28 schrieb Mikael Sundqvist:
>> What will work will depend on the viewers. We noticed a few weeks ago
>> that synctex (pdf -> editor) was not working in a few viewers (okular)
>> while it was working in others.

> Could you please tell us which combinations of viewers and editors you
> checked and how to configure them to make it work?

The --synctex=repeat option outputs a synctex file that works with auctex'
epdfinfo program, so (at least when using PDFview) forward and backward
search now work with emacs+auctex, at least when you
(a) put
(setq ConTeXt-texexec-option-nonstop "")
in your ConTeXt mode hook (or some other sensible place), and
(b) edit the ConTeXt-expand-options defun in auctex' context.el
(or redefine the function in some hook) to replace
--synctex=1
with
--synctex=repeat

I have submitted a bug report to auctex about (b) and another item, but I
have no idea if/when the fixes will make it into a new release of auctex.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: last page number for a list

2024-04-03 Thread Alan Bowen
Hi, Bruce—
This does not quite work—the page numbers are those of the first page of
the chapter, not the last. But thanks for the tip about \writetolist.
Perhaps I can get that to work.

What I need are ToC entries like
AuthorName
ShortTitle   1–6

I need this pagination because one of the requirements of continuous
publication on the OJS is that once an item is published changes are not
permitted. So I cannot go with normal continuous publication since, for us
anyway, items are not processed in strict sequential order (e,g., we may
have, paper+paper+ review+paper...)

If it helps: I currently have

\startFMTitle[reference=\Reference, title={}][itemAuthor=AuthorName,
itemTitle=ShortTitle,...]
\setuplist[FMTitle][state=start, alternative=startendfmpages,
criterium=all,]
(\Reference is defined at the in the preamble to input of the
file/component.)

\definelistalternative[startendfmpages][renderingsetup=list:startendfmpages]

\startsetups[list:startendfmpages]
  \structurelistuservariable{itemAuthor}\crlf
  \structurelistuservariable{itemTitle}\hfill%
   \at[\currentlistentrypagenumber]–\at[\lastpagenumber]
\vglue1pc
\stopsetups
where I have \reference[\lastpagenumber]{} at the end of the file. But this
gives me ??–viii (the viii is correct and interactive) for the FMTitle.
Sadly the entries for all my other Titles (SourceTitle, StudyTitle...) is
??–viii.
(Each title is a modified chapter.)

Curiously, \at[\Reference]–\convertnumber{r}{\lastpagenumber}  and
\at[\Reference]–\at[\lastpagenumber] work properly in the body text.
The overall structure is project-product sort with many components in the
product.

This is probably TMI. The bottom line is that I am truly stumped.

All best,
Alan

On Wed, Apr 3, 2024 at 6:56 AM Bruce Horrocks  wrote:

>
>
> > On 30 Mar 2024, at 19:59, Alan Bowen  wrote:
> >
> > How can I get the last page number of a chapter for a list (ToC)?
> >
> > Outside of a list, I use \lastpagenumber.
> > But that does not work in a list such as the ToC.
> >
> > Any tips or pointers will be gladly received.
>
>
> I'm not quite sure what you want to do with these numbers: something like
> printing out a contents page but instead of the start page of a chapter it
> shows the last page of the chapter?
>
> If so then try creating a custom list and use \writetolist immediately
> before each \stopchapter command?
>
> \definelist[LastPages][criterium=all]
> \starttext
> \completecontent
> \page
> \completelist[LastPages]
> \page
> \dorecurse{10}{
>   \startchapter[title={This is my chapter}]
>   This is a chapter\par \dorecurse{6}{\input knuth } \input
> math-kontinuitet-sv
>
>   \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}
>   \stopchapter
> }
> \stoptext
>
> But I can't get the number option of \writetolist to work - the "3." above
> is ignored. :-(
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-04-01 Thread Otared Kavian
Hi Hans and Mikael,Thanks for the new module math-goodriddance ! Indeed there are many mathematicians who are going to use the \goodriddancemath command, and no doubt they are going to thank you, even if they are very shy to come out.Moreover this command can be used by people who want to transform the output PDF into an audio file, because for instance the following \usemodule[math-goodriddance]\goodriddancemath\starttext\startformula\int_{0}^{\pi} \sin(x)\dd x = 2.\stopformula\stoptextgives 
		
	
	
		
			
integral from 0 to 휋 , of sin of 푥 d 푥 equals 2 

			
		as one can see in the attached output which is very useful for the blind using an audio software.Best regards: OK

no-math.pdf
Description: Adobe PDF document
On 1 Apr 2024, at 16:31, Hans Hagen <j.ha...@xs4all.nl> wrote:Hi,There is a new lmtx upload.-- The svg inclusion via metapost has been upgraded and cleanup a bit, using some more recent metapost features. There are some new (not yet all documented metapost) features.-- In the process, support for LCH colors has been added, which is documented in the (eg luametafun manual).-- The math manual is not yet there because we were distracted by improving support for envelopes (penbased outlines) in metafun. This is still work in progress, some is present and discussed in the manual, and we'll come back to that sometime next month. Given the next item, we also might need to change some in the manual (different focus).-- Because we have users who have to conform to the European Accessibility Act we have been wondering how to deal with that and at Mikaels place there are two demands: distinctive colors and tagging and especially math (somehow validators love to check that). Colors never were an issue as they can be controlled, and tagging math neither, especially because nothing was/is done with it anyway, but ... we are happy that we found a reasonable (more modern and future proof) way out.As explained / shown in the attached document we're basically forced to choose a different approach with math (a pity as we worked hard to get the rendering right but the attached file works fine in the viewers that we tested).-- We like to hear from users what other demands wrt accessibility there are. We're not interested in the (commercial) big money aspects (of pdf and tagging) nor in the politics behind it (changes over time). What are the demands, so that we can see how to make it work or just work around it (as it's kind of boring to cook uyp complex features	, esp compared to playing with metapost).-- Furthermore .. the usual bits and pieces as discussed on the list and otherwise.-- If you have troubles (crash) you need to wipe the cache due to a change in lua bytecode storage (no easy way to catch it).Hans & Mikael-  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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nlwebpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive  : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___
Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-04-01 Thread Mikael Sundqvist
Hi,

On Mon, Apr 1, 2024 at 9:36 AM Hans Hagen  wrote:
>
> Hi,
>
> There is a new lmtx upload.
>
> -- The svg inclusion via metapost has been upgraded and cleanup a bit,
> using some more recent metapost features. There are some new (not yet
> all documented metapost) features.
>
> -- In the process, support for LCH colors has been added, which is
> documented in the (eg luametafun manual).
>
> -- The math manual is not yet there because we were distracted by
> improving support for envelopes (penbased outlines) in metafun. This is
> still work in progress, some is present and discussed in the manual, and
> we'll come back to that sometime next month. Given the next item, we
> also might need to change some in the manual (different focus).
>
> -- Because we have users who have to conform to the European
> Accessibility Act we have been wondering how to deal with that and at
> Mikaels place there are two demands: distinctive colors and tagging and
> especially math (somehow validators love to check that). Colors never
> were an issue as they can be controlled, and tagging math neither,
> especially because nothing was/is done with it anyway, but ... we are
> happy that we found a reasonable (more modern and future proof) way out.
>
> As explained / shown in the attached document we're basically forced to
> choose a different approach with math (a pity as we worked hard to get
> the rendering right but the attached file works fine in the viewers that
> we tested).
>
> -- We like to hear from users what other demands wrt accessibility there
> are. We're not interested in the (commercial) big money aspects (of pdf
> and tagging) nor in the politics behind it (changes over time). What are
> the demands, so that we can see how to make it work or just work around
> it (as it's kind of boring to cook uyp complex features , esp compared
> to playing with metapost).
>
> -- Furthermore .. the usual bits and pieces as discussed on the list and
> otherwise.
>
> -- If you have troubles (crash) you need to wipe the cache due to a
> change in lua bytecode storage (no easy way to catch it).
>
> Hans & Mikael

In addition to what Hans wrote, I need to write and apologize. About
two years ago I was working on a big math project and needed SyncTeX
(code <-> okular) to work with it to get a smooth workflow. After
fighting it for several weeks, mailing Hans back and forth, without
any real support from Hans since "he was not using SyncTeX", I sent a
false patch to him that I claimed worked. It must have gotten in
without even being tested(!). Since then SyncTeX support for ConTeXt
has been broken.

Strengthened about how easy it was to add code to this project, and
still frustrated about the project (that is still not finished), I
started "collaborating" with Hans, mainly on math. During these years,
I have been baffled about how easy it has been to add malicious code,
he just swallows everything. I only needed to find out what Hans
really uses himself (a few tables, he likes colors, and he has a weak
point when it comes to "nice" metapost images), and then to add
patches for other stuff. For math, in particular, he seems to have no
understanding (sorry Hans). I am worried about the Dutch school
system.

Nevertheless, I have, during this time, more and more enjoyed our
discussions, and so I started to feel bad about my "patches", and
sorry for Hans. Thus, I have lately reverted, part by part, the bad
code. Only a few of them are left (but don't tell Hans!). I also got a
feeling that Wolfgang, checking all the code, since long did see this
through.

Thus, in the latest upload, for example, you might get SyncTeX working
again, but you might need to add \setupsynctex[state=repeat]. No
guarantees.

Again, my sincere apologies to all ConTeXters out there who have not
gotten the result they expect and deserve. I assume that Hans will
kick me out when the last patch is sent, so I will delay it as much as
possible...

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upload

2024-04-01 Thread Hans Hagen

Hi,

There is a new lmtx upload.

-- The svg inclusion via metapost has been upgraded and cleanup a bit, 
using some more recent metapost features. There are some new (not yet 
all documented metapost) features.


-- In the process, support for LCH colors has been added, which is 
documented in the (eg luametafun manual).


-- The math manual is not yet there because we were distracted by 
improving support for envelopes (penbased outlines) in metafun. This is 
still work in progress, some is present and discussed in the manual, and 
we'll come back to that sometime next month. Given the next item, we 
also might need to change some in the manual (different focus).


-- Because we have users who have to conform to the European 
Accessibility Act we have been wondering how to deal with that and at 
Mikaels place there are two demands: distinctive colors and tagging and 
especially math (somehow validators love to check that). Colors never 
were an issue as they can be controlled, and tagging math neither, 
especially because nothing was/is done with it anyway, but ... we are 
happy that we found a reasonable (more modern and future proof) way out.


As explained / shown in the attached document we're basically forced to 
choose a different approach with math (a pity as we worked hard to get 
the rendering right but the attached file works fine in the viewers that 
we tested).


-- We like to hear from users what other demands wrt accessibility there 
are. We're not interested in the (commercial) big money aspects (of pdf 
and tagging) nor in the politics behind it (changes over time). What are 
the demands, so that we can see how to make it work or just work around 
it (as it's kind of boring to cook uyp complex features	, esp compared 
to playing with metapost).


-- Furthermore .. the usual bits and pieces as discussed on the list and 
otherwise.


-- If you have troubles (crash) you need to wipe the cache due to a 
change in lua bytecode storage (no easy way to catch it).


Hans & Mikael

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

math-riddance.pdf
Description: Adobe PDF document
% language=us

% todo: no comma

\usemodule[scite]
\usemodule[article-basic]
\usemodule[abbreviations-logos]
\usemodule[math-goodriddance]

\setuplayout[tight]

\starttext

\subject{Good riddance}

We're done with math. After years of active development, Mikael and Hans have
decided to quit working on math, and concentrate on \METAPOST\ and handing over
to the next generation instead. We lost our user to the way more popular
alternative (frozen in stone standards). Also, we had it with suboptimal math
fonts, Unicode math not getting improved, MathML constantly being changed,
browsers dealing with math differently every few years, math archives getting
polluted with tons of useless tagged math.

There are other motivations, like the European union imposing strict rules with
respect to accessibility in educational content management systems, and Dutch
schools trying to get rid of math in favor of simple calculus, if at all. This 
is
why the next iteration of the engine will no longer have a math engine:
MathLessTeX. Of course, in the beginning \MLTX\ will be compatible with \LMTX,
because we owe that to the users and we need to prototype the new engine anyway.

In order to get an idea of how we will get rid of the disturbing formulas, you
can load the module:

\starttyping
\usemodule[math-goodriddance]
\stoptyping

Until becoming the default setting, the command \typ {\goodriddancemath} will
bring you into \MLTX\ mode while \typ {\badriddancemath} will bring you back to
the obsolete \LMTX\ mode. Like:

\startbuffer
\usemodule[math-goodriddance] \goodriddancemath

Who wants to solve the equation \m {x + 1 = 4} or deal with the function \m {x 
\mapsto
\root [3] {x}}, when we have AI around the corner to help us out with simple 
and silly
things like the Pythagorean theorem: \m {a^2 + b^2 = c^2}, or even with more 
advanced
math like geometric series: \m {\sum_{k = 0}^{+\infty} x^k = 1/(1 - x)}?

We will not support complicated nonsense stuff like:

\startplaceformula
\startformula
F__{1}{2}(a,b;b;z) = (1 - z)^{-a}
\stopformula
\stopplaceformula

When developing this Hans' Swedish improved a lot. {\language[sv] Den lilla del 
av
befolkningen som handlar på IKEA och tittar på fåniga krimserier förstår kanske 
detta:
\im {\sqrt {x + 1} = \sin(4 + y)}!}
\stopbuffer

\typebuffer[option=TEX]

Which gives us the beautifully typeset:

\startcolor[darkblue] \getbuffer \stopcolor

We hope that the highly respected Swedish Academy will consider our prose in
their upcoming evaluations. Our first submission to the leading \TEX\ journal 
was
how

[NTG-context] start/end pages in ToC

2024-03-26 Thread Alan Bowen
Our journal is currently in the process of moving to continuous publication
of items in a given volume as they are ready. This entails re-jigging the
ToC so that it now includes the start and end page numbers of each item. So
far, I have everything pretty much in the right place, but for the page
numbers I am getting only “??”. I am not sure why this is happening and
would be grateful if someone could tell me why or point me to
documentation that explains the problem and how to solve it.

Many thanks in advance.

My minimalish working example:

\definehead[SourceTitle][chapter]
\setuphead[SourceTitle][page=yes,
footer={ItemData}]

\definehead[StudyTitle][chapter]
\setuphead[StudyTitle][page=yes,
footer={ItemData}]

\definetext[ItemData][footer][
{\at[\Reference]–
\at[\namedstructureuservariable{}{authorInitials}endPage]}
]
\setuplist[SourceTitle][
state=start,
textcolor=black,
alternative=startendpages,
criterium=all,
headnumber=no,
interaction=page,
numberalign=flushright,
before={\blank[2.2ex, fixed]},
inbetween=\endgraf,
]

\setuplist[StudyTitle][
state=start,
textcolor=black,
alternative=startendpages,
criterium=all,
headnumber=no,
interaction=all,
numberalign=flushright,
before={\blank[2.2ex, fixed]},
inbetween=\endgraf,
]

\define\ToCEntry{%
\structurelistuservariable{author}\crlf
\structurelistuservariable{title}\hfill%
\at[\structurelistuservariable{reference}]–%
\at[\structurelistuservariable{authorInitials}endPage]
}

\definelistalternative[startendpages]
[renderingsetup=list:startendpages]

\startsetups[list:startendpages]
{\ToCEntry}
\vglue1pc
\stopsetups

\starttext

{\tfa\bf Contents}

\blank[line, fixed]
\WORD{Sources}
\blank[halfline, fixed]
\placelist[SourceTitle][criterium=all]

\blank[line, fixed]
\WORD{Studies}
\blank[halfline, fixed]
\placelist[StudyTitle][criterium=all]

\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSo01}
\startSourceTitle[reference={\Reference},
bookmark=Source01,
title={}][
title=Source01,
author=Author01,
authorInitials=ABC,
reference={\Reference},
]
\input knuth
\page
\dorecurse{25}{\input ward\par}
\reference[ABCendPage]{}
\stopSourceTitle
\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSo02}
\startSourceTitle[reference={\Reference},
bookmark=Source02,
title={}][
author=Author02,
title=Source02,
authorInitials=PQR,
reference={\Reference},
]

\input knuth
\page
\dorecurse{10}{\input ward\par}
\reference[PQRendPage]{}
\stopSourceTitle
\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSt01}
\startStudyTitle[reference={\Reference},
bookmark=Study01,
title={}][
author=Author03,
title=Study01,
authorInitials=XYZ,
reference={\Reference},
]
\input knuth
\blank[big]
\page
\dorecurse{15}{\input ward\par}
\reference[XYZendPage]{}
\stopStudyTitle
\page[makeup]
\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How can I do this?

2024-03-08 Thread Otared Kavian
Hi Ursula,

The reason for which you did not get the expected result is that you have « } » 
missing in your file, that is the closing brace after your italic command
« {\it » at the end of your document. 
Moreover you did not have a \stoptext in your file, and a math command « \m » 
was not written correctly. Talking of math, I personnaly prefer to enclose 
in-line math between dollar signs $, that is writing « $\exists x \in H$ » 
instead of  « \m{\exists x \in H} ».

Also the way you write your text is somewhat « incorrect » (or as Mikael 
Sundqvist would put it, « interesting »…), since in principle all the setups 
and definitions must be before the body of your document which begns with 
\starttext. Another point i sthat instead of using \par you can leave a blank 
line, which makes the document more readable. And you don’t need to break the 
lines by « hand », since ConTeXt does it in a better way.
Finally instead of 
\blackrule[color=black, height=0.10ex, width=13.50cm]
you can use just \hairline, and the thickness and color of such a \hairline can 
be adjusted by 
\setupthinrules[rulethickness=4pt,color=darkgreen]
(for instance), which should be put before \starttext.

Best regards: Otared

% begin textbackground-Ursula.tex
\definetextbackground[myBG][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.8\bodyfontsize,
  rightoffset=.8\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off]

\setupnarrower[left=0.80cm, right=0.80cm]
\definehspace[oneem][0.5em]
\setupinteraction
   [state=start,
color=blue]

\usecolors[svg]
\setupinteraction
  [state=start,
   contrastcolor=cornflowerblue]
   
   
\starttext
\margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und 
Existenzquantor).}

{\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aussage 
h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich 
die Bedeutung der beiden Aussagen klar.}

\startitemize[n,packed,broad]
\item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  

\item $∃f ∈ F : ∀m ∈ M : h(m, f)$.

\stopitemize


\startmyBG
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein $∃\forall∀ $ oder ein $\forall∀\m∃$ versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank

\startnarrower[left, right]

Der\hspace[oneem] Wert \hspace[oneem] von \hspace[oneem] 
\m{y = f(x)} ist unabhängig von der Wahl

von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} 

(Beutelspacher [10, S.54])

\blank
\stopnarrower
\stopmyBG


\blank

\blackrule[color=black, height=0.10ex, width=13.50cm]

\reference[Regel:1]{3.1}

{\bf Aufgabe 3.2.18} Formulieren Sie gemäß der Regel (\goto{3.1}[Regel:1]) 
äquivalent

\startitemize[n,packed,broad]

\item \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},

\item \m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides 
n},

\item \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }\nospace
\implies n \mtext{ ungerade}}.

\stopitemize

\blackrule[color=black, height=0.10ex, width=13.50cm]

{\bf Aufgabe 3.2.19} Bilden Sie die Verneinung der folgenden Aussagen:

\startitemize[n,packed,broad]
\item Alle Rosen sind verwelkt oder teuer.

\item Alle rosen sind entweder verwelkt oder teuer.

\stopitemize


\reference[Abschnitt:1]{3.2.1.1}

{\it Hinweis: Beachten Sie die Konvention aus Abschnitt 
\goto{3.2.1.1}[Abschnitt:1] die Formulierung \quotation {entweder ... oder} 
entspricht dem ausschließenden Oder
und die Formulierung \quotation{oder} dem (mathematischen) einschließenden
Oder.}

\blackrule[color=black, height=0.10ex, width=13.50cm]

\stoptext
% end textbackground-Ursula.tex


> On 6 Mar 2024, at 13:52, Ursula Hermann  wrote:
> 
> Dear List,
> I need a tip how to do this:
> In the command \definepapersize[Mybook] the height should be not 24 cm, but a 
> little bit longer. My Problem is, as you can see on the PDF, that there are 
> troubles with the Gray Background. The Gray Background should begin with : 
> Mitunter. . I think it should be the topoffset, and the bottomoffset, but how 
> many .\bodyfontsize should I try?
> Many thanks 
> Uschi 
> \mainlanguage[de]
> \definepapersize[MyBook][width=19cm,height=24cm]
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
> \setupbodyfont[Times New Roman,12.55pt]
> \definemargindata  [MyInMargin][inright]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
> \defineenumeration
>   [theorem]
>   [
> text=Theorem,
> title=yes,
> width=fit,
> distance=0.2em,
> alternative=serried,
>   ]
> \definetextbackground[GrayBackground][
>   location=p

[NTG-context] How can I do this?

2024-03-06 Thread Ursula Hermann
Dear List,
I need a tip how to do this:
In the command \definepapersize[Mybook] the height should be not 24 cm, but a 
little bit longer. My Problem is, as you can see on the PDF, that there are 
troubles with the Gray Background. The Gray Background should begin with : 
Mitunter. . I think it should be the topoffset, and the bottomoffset, but how 
many .\bodyfontsize should I try?
Many thanks
Uschi
\mainlanguage[de]
\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman,12.55pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.8\bodyfontsize,
  rightoffset=.8\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und 
Existenzquantor).}
\par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die 
Aus-\par
sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie 
sich die Bedeutung der beiden Aussagen klar.}
\par
\startitemize[n,packed,broad]
\item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
\startGrayBackground
\tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m ∃\forall∀ oder ein \m \forall∀\m∃ versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank
\setupnarrower [left=0.80cm, right=0.80cm]
\startnarrower[left, right]
\definehspace[oneem][0.5em]
Der\hspace[oneem] Wert\hspace[oneem] von\hspace[oneem] \m{y = f(x)} ist 
unabhängig von der Wahl\\
von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \\ 
(Beutelspacher [10, S.54])\par
\blank
\stopnarrower
\stopGrayBackground
\blank
\blackrule[color=black, height=0.10ex, width=13.50cm]
\setupinteraction
   [state=start,
color=blue]
\reference[Regel:1]{3.1}\par
{\bf Aufgabe 3.2.18} Formulieren Sie gemäß der Regel (\goto{3.1}[Regel:1]) 
äquivalent
\startitemize[n,packed,broad]
\item \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},\item 
\m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides 
n},\item \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }\nospace
\implies n \mtext{ ungerade}}.
\stopitemize
\blackrule[color=black, height=0.10ex, width=13.50cm]\par
{\bf Aufgabe 3.2.19} Bilden Sie die Verneinung der folgenden Aussagen:
\startitemize[n,packed,broad]
\item Alle Rosen sind verwelkt oder teuer.
\item Alle rosen sind entweder verwelkt oder teuer.
\stopitemize
\par
\usecolors[svg]
\setupinteraction
  [state=start,
   contrastcolor=cornflowerblue]
\reference[Abschnitt:1]{3.2.1.1}
{\it Hinweis: Beachten Sie die Konvention aus Abschnitt \goto 
{3.2.1.1}[Abschnitt:1]die For-\par
mulierung \quotation {entweder ... oder} entspricht dem ausschließenden Oder\par
und die Formulierung \quotation{oder} dem (mathematischen) einschließenden\par
Oder.\par
\blackrule[color=black, height=0.10ex, width=13.50cm]



Bruce.pdf
Description: Bruce.pdf
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: A new problem with space in third itemize

2024-02-29 Thread Ursula Hermann
Dear Mikael,


Many Thanks, works perfect.


Many Regards

Uschi


Von: Mikael Sundqvist 
Gesendet: Donnerstag, 29. Februar 2024 16:45:03
An: mailing list for ConTeXt users
Betreff: [NTG-context] Re: A new problem with space in third itemize

Hi Uschi,

Your coding style is interesting. I do not understand the purpose of
the \it for example. I did put something together that you can try,
but I don't know if this is what you are looking for.

\starttext
\startitemize[n]
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }
\implies n \mtext{ ungerade}}.
\stopitem
\stopitemize
\stoptext

To quote Pablo, I hope it helps.

/Mikael

On Thu, Feb 29, 2024 at 4:10 PM Ursula Hermann
 wrote:
>
> Dear List,
>
>
> This is my little example: the problem is, that everything was fine, in 
> itemize 1 and  2. In the third itemize  i have a problem, because after n^3 
> and after \Rightarrow  there should be a spaace , if I want to write : 
> \Rightarrow n ungerade, but it says nungerade, what I dont want,.
>
>
> \startitemize[n]
> {\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace
> \par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} 
> \nospace
> \par \item \m{\forall n ∈ \naturalnumbers:n^3  ungerade \Rightarrow n  
> ungerade \par}
>
> Uschi
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: A new problem with space in third itemize

2024-02-29 Thread Mikael Sundqvist
Hi Uschi,

Your coding style is interesting. I do not understand the purpose of
the \it for example. I did put something together that you can try,
but I don't know if this is what you are looking for.

\starttext
\startitemize[n]
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }
\implies n \mtext{ ungerade}}.
\stopitem
\stopitemize
\stoptext

To quote Pablo, I hope it helps.

/Mikael

On Thu, Feb 29, 2024 at 4:10 PM Ursula Hermann
 wrote:
>
> Dear List,
>
>
> This is my little example: the problem is, that everything was fine, in 
> itemize 1 and  2. In the third itemize  i have a problem, because after n^3 
> and after \Rightarrow  there should be a spaace , if I want to write : 
> \Rightarrow n ungerade, but it says nungerade, what I dont want,.
>
>
> \startitemize[n]
> {\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace
> \par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} 
> \nospace
> \par \item \m{\forall n ∈ \naturalnumbers:n^3  ungerade \Rightarrow n  
> ungerade \par}
>
> Uschi
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] A new problem with space in third itemize

2024-02-29 Thread Ursula Hermann
Dear List,


This is my little example: the problem is, that everything was fine, in itemize 
1 and  2. In the third itemize  i have a problem, because after n^3 and after 
\Rightarrow  there should be a spaace , if I want to write : \Rightarrow n 
ungerade, but it says nungerade, what I dont want,.


\startitemize[n]
{\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace
\par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} 
\nospace
\par \item \m{\forall n ∈ \naturalnumbers:n^3  ungerade \Rightarrow n  ungerade 
\par}


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: using an end of line as parameter

2024-02-21 Thread Bruce Horrocks


> On 21 Feb 2024, at 08:17, madiazm.eo...@gmail.com wrote:
> 
> Thanks a lot Bruce, that did the trick! definitely I will have to learn a bit 
> lua in summer.
> I just got an error on \qquad and found searching in internet that it was 
> because escape character conflicts between tex and lua. For the time i 
> removed it and since I will create itemizes I hope I dont get that error if I 
> use \item instead of \qquad.
> Thanks again, I spent hours of trial and error, error, error... on this 
> matter.

Yes, the \'s need to be escaped in Lua. And it's made me realise that the 
process of identifying the four lines of the question is separate from the 
typesetting of the question later. The amended version below uses your 
\tareaABC macro to format the question so you can more easily change the layout 
without having to understand ConTeXT Lua Documents in detail.

\startluacode
  userdata = userdata or {}
  
  function userdata.formatTestQuestions()
local the_buffer = buffers.getlines("TestQuestions")
local tracker = 0
local the_question = {}

-- Go through the buffer of questions one line at a time
for i = 1,#the_buffer do

  -- Skip blank lines but 'collect' non-blank lines until we have four
  -- (which is assumed to be a whole question)
  if  string.strip(the_buffer[i]) == "" then
tracker = 0
the_question = {}
  else
tracker = tracker + 1
the_question[tracker] = the_buffer[i]
  end
  
  -- If tracker has got to 4 then we've read four lines
  if tracker == 4 then
context.tareaAbc(
  the_question[1],
  the_question[2], 
  the_question[3],
  the_question[4])
  
-- Reset for the next question (in case no blank line)
tracker = 0
the_question = {}
  end
  
end
  end
\stopluacode

\def\startTestQuestions
  {\dostartbuffer[TestQuestions][startTestQuestions][stopTestQuestions]}
\def\stopTestQuestions
  {\ctxlua{userdata.formatTestQuestions()}}

\define[4]\tareaAbc{\item #1
   \startitemgroup[itemize][a]
   \item #2
   \item #3
   \item #4
   \stopitemgroup}
   
\starttext
Here are some questions:

\startTestQuestions
In den Büchereien gibt es auch … 
… Kuchen.
… Theater.
… Workshops.

In den Büchereien gibt es auch … 
… Kuchen.
… Theater.
… Workshops.
In den Büchereien gibt es auch … 
… Kuchen.
… Theater.
… Workshops.
\stopTestQuestions

\stoptext

—
Bruce Horrocks
Hampshire, UK


tt2.tex
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: using an end of line as parameter

2024-02-21 Thread madiazm . eoicc
Thanks a lot Bruce, that did the trick! definitely I will have to learn a bit 
lua in summer.
I just got an error on \qquad and found searching in internet that it was 
because escape character conflicts between tex and lua. For the time i removed 
it and since I will create itemizes I hope I dont get that error if I use \item 
instead of \qquad.
Thanks again, I spent hours of trial and error, error, error... on this matter.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: using an end of line as parameter

2024-02-20 Thread Hans Hagen

On 2/20/2024 12:26 PM, madiazm.eo...@gmail.com wrote:

Thanks Hans,
I supposed that lua would be more suitable, but unfortunately I still did not 
learn it (I hope in summer I have time to read the manual)

The problem arises from the fact that for each line i will perform a different 
action and for \def\foo I need four arguments so that I can correctly format 
the lines. How can i get the result of string.splitlines (s) separated into 
four arguments to pass to the macro? then \foo would be 
\def\foo#1SEPARATOR#2SEPARATOR#3SEPARATOR#4

I now use:


\starttext
%now I use the dirty trick of writing an ñ at the end of line so that the macro 
detects each argument; but for each question I have to manually add it, which 
is tedious; therefore I look for a solution to detect lines automatically

%the definition
\def\tareaAbc #1ñ#2ñ#3ñ#4ñ{\item #1
 \startitemgroup[lista1a]
 \item #2
 \item #3
 \item #4
 \stopitemgroup}

%in the document
/startitemgropu[lista1a]   %I manually open the first level of the list 
so the first argument -the question- gets numbered

\tareaAbc In den Büchereien gibt es auch …ñ   %the question; an item of 
first level
… Kuchen.ñ   %option a gets a new list of second level opened and argument 
2 is the first item
… Theater.ñ   %option b another item
… Workshops.ñ  %option c last item and closes the second level list

%some more macros with more questions and options

/stopitemgroup %I manually close the first level list
You have to provide more details about these lines. For instance, do you 
want to split on spaces?


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: using an end of line as parameter

2024-02-20 Thread madiazm . eoicc
Thanks Hans,
I supposed that lua would be more suitable, but unfortunately I still did not 
learn it (I hope in summer I have time to read the manual)

The problem arises from the fact that for each line i will perform a different 
action and for \def\foo I need four arguments so that I can correctly format 
the lines. How can i get the result of string.splitlines (s) separated into 
four arguments to pass to the macro? then \foo would be 
\def\foo#1SEPARATOR#2SEPARATOR#3SEPARATOR#4

I now use:


\starttext
%now I use the dirty trick of writing an ñ at the end of line so that the macro 
detects each argument; but for each question I have to manually add it, which 
is tedious; therefore I look for a solution to detect lines automatically

%the definition
\def\tareaAbc #1ñ#2ñ#3ñ#4ñ{\item #1
\startitemgroup[lista1a]
\item #2
\item #3
\item #4
\stopitemgroup}

%in the document
/startitemgropu[lista1a]   %I manually open the first level of the list 
so the first argument -the question- gets numbered

\tareaAbc In den Büchereien gibt es auch …ñ   %the question; an item of 
first level
… Kuchen.ñ   %option a gets a new list of second level opened and argument 
2 is the first item
… Theater.ñ   %option b another item
… Workshops.ñ  %option c last item and closes the second level list

%some more macros with more questions and options

/stopitemgroup %I manually close the first level list

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Two bugs with descriptions in ConTeXt.

2024-02-13 Thread Wolfgang Schuster

SirColeman via ntg-context schrieb am 13.02.2024 um 22:04:
The first bug is that descriptions interfere with the counters, 
resulting in the peculiar behavior demonstrated in the resulting PDF.


Still no bug and there is no need to create your own counter because 
enumerations exist which are descriptions with a counter.


Unless I'm mistaken, I think it happens because the head of the 
description is evaluated twice, thus incrementing the counter 
twice---at least, that's the only explanation for how the number is 
incremented by 2 each time. Further, this issue seems to persist 
whether we're using macros or writing \incrementcounter directly.


The solution is to either make sure that the head of descriptions is 
evaluated only once, or document that text placed as the head of 
descriptions is meant to be evaluated twice, if there's a good reason 
for doing so. Of course, this silly example of incrementing counters 
can be subdued by placing the \incrementcounter directly in the after 
option when customizing descriptions. But it demonstrates the issue.


What you're supposed to do here is to increment the counter *before* you 
use the counter value.


As you guessed the content of the title is evaluated multiple times to 
get the width of the description title, in cases where a counter is 
incremented in such a case (very common when you have counters in a 
table cell) you use the trialtypesetting mode to increment only once.


I've tried to make the examples given be as varied as possible, 
demonstrating the different ways in which descriptions interact with 
the counter.


The second bug is that descriptions, or at least that's my intuitive 
expectation, shouldn't interfere with the bullets of items. I expect 
that the bullet stays where it is, and the description is placed next 
to it. But what happens is that the bullet is shifted to the right, 
making it overlap with the description's head, which isn't pretty.


Is this even a real world example?

The reason why the bullet points are at the wrong position is that 
descriptions and items use the same mechanism to set the text offset on 
the left and right sides and when you combine both mechanism the values 
are added. In case you you have a document where a descriptions appear 
as part of an item I suggest to use a different alternative (e.g. 
serried) for the description layout.


Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \startcolumns and \startcolumnset

2024-02-08 Thread Otared Kavian
Dear Dalyoung,Have you tried \startsimplecolumns\stopsimplecolumns instead of the columnset mechanism?In your example I put the above commands and I got the attached PDF: is this what you want to obtain?Best regards: Otared

columns-figures.pdf
Description: Adobe PDF document
On 9 Feb 2024, at 02:22, Jeong Dal via ntg-context <ntg-context@ntg.nl> wrote:Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems:	1. The figures is aligned left even though I use \startplacefigure[].	2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems:	1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic{verticalrule3}   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ;   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay  [verticalrule]  [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset  [quiz]  [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n]  \item Solve the following linear equations.  \startitemize[r]\item equation%\blank[3.5cm]\vfill\item equation%\blank[3.5cm]\vfill\item equation    \blank[3.5cm]\item equation    \blank[3.5cm]\item equation\blank[3.5cm]  \stopitemize  \hrule\column  \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure  \item $y = 2x - 1$  \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize  \item Find the formula of the line 1:  \vfill  \item Find the formula of the line 2:  \vfill\stopitemize\stopcolumnset\stoptext%%___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nlwebpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive  : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___
Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \startcolumns and \startcolumnset

2024-02-08 Thread Jeong Dal via ntg-context
Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems:	1. The figures is aligned left even though I use \startplacefigure[].	2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems:	1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic{verticalrule3}   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ;   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay  [verticalrule]  [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset  [quiz]  [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n]  \item Solve the following linear equations.  \startitemize[r]\item equation%\blank[3.5cm]    \vfill\item equation%\blank[3.5cm]    \vfill\item equation\blank[3.5cm]\item equation\blank[3.5cm]\item equation\blank[3.5cm]  \stopitemize  \hrule\column  \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure  \item $y = 2x - 1$  \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize  \item Find the formula of the line 1:  \vfill  \item Find the formula of the line 2:  \vfill\stopitemize\stopcolumnset\stoptext%%

testColumns.pdf
Description: Adobe PDF document


testColumnset.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] How to print the book title and section title where \reference is located?

2024-02-06 Thread Joel via ntg-context
I have an extensive multi-book project. Each book has a nickname, like TB for 
"Textbook", "WB 1" for the "Workbook, Vol. 1":

TB -- 01_textbook.texWB 1 -- 03_workbook.texWB 2 -- 04_workbook.texWB 3 -- 
05_workbook.tex
WB 4 -- 06_workbook.tex
TG -- 08_teachersguide.tex
I have to prove to a government agency that the content meets several 
requirements, so I'm giving them a simple file that says something like 
"Requirement A is met in TB, "Cats", p. 11" basically letting the reader know 
its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm 
simply dropping in macros called "\requirementA" "\requirementB" on whichever 
page of whichever book demonstrates it meets the requirement, then the file 
will aquatically list the book, section, and page number by searching for that 
macro.

\define\requirementA{
    \reference[markerA]{This is a comment.}
}

\define\requirementB{
    \reference[markerB]{This is a comment.}
}

\define\requirementC{
    \reference[markerC]{This is a comment.}
}

\starttext

    \section{Cats}
        \requirementA
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Fish}
        \input knuth
        \input knuth
        \input knuth
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Frogs}
        \input knuth
        \requirementB
    
    \pagebreak
    
    \section{Markers}
    
        \startitemize
            \item Requirement A is met \at{page}[markerA].
            \item Requirement B is met \at{page}[markerB].
            \item Requirement C is met \at{page}[markerC].
        \stopitemize    
    
\stoptext



I have this sample code, but it only works for a single document, and only 
displays page number. I tried looking at the \about and other related command, 
but that requires giving a reference name and referring to the titles, not my 
dropped macro. How can I modify this to display a message like below, plus also 
scans the other files. *It only needs to reference the first found occurrence.*
Here is a sample message what the output should give:
"Requirement A is met in WB 3, "Bears", p. 33."
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Nested itemize lists: unexpected spacing

2024-02-01 Thread Jim
Consider the following:

\starttext

Text before.
\startitemize[1,nowhite]
\item item 1
\item item 2
\startitemize[5,nowhite]
\item sub-item 1
\item sub-item 2
\stopitemize
\item item 3
\stopitemize
Text after.

\stoptext

Notwithstanding the "nowhite" options, there is a blank line before
sub-item 1, which I do not want.

Oddly (to me), if I change the first "nowhite" to "packed", the space
before sub-item 1 goes away, but then I get undesired space before and
after the out itemization.

Q1: Can someone explain the Zen of this?  That is, why does the blank
line before sub-item 1 go away with "packed", but not "nowhite"?



Poking around on the internet, I find that if I leave the "nowhite"s, but
precede "Text before." with
\unprotect
\c_strc_itemgroups_spacing_mode=1  % 0 works too, but 2 doesn't
\protect
then I get the spacing I want.

Q2: \c_strc_itemgroups_spacing_mode seems to be an undocumented "feature".
Is there a "documented" way of making the unwanted blank line
go away, without introducing unwanted blank lines before and
after the outer itemize list?


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-16 Thread Jim
On Tue, Jan 16, 2024 at 01:15 (+), Bruce Horrocks wrote:

> On 15 Jan 2024, at 16:15, Jim  wrote:

>> I would like
>> something which automagically "does the right thing".

> Not pretty, but... :-)

> \setupwhitespace [big]
> \setuppapersize [letter]

> \define[1]\mystopitemize{\stopitemize\doifsamestringelse{#1}{\par}{\blank}{#1}}

> \starttext
> This is a short paragraph.

> This is a line before an itemization.
> \startitemize[nowhite]
> \item First item.
> \item Second item.
> \mystopitemize
> This is a short paragraph immediately following.

> This is a line before a {\bf nowhite, after} itemization.
> \startitemize[nowhite]
> \item First item.
> \item Second item.
> \mystopitemize

> This is the next short paragraph, not part of the above.

> \stoptext

Bruce,

thanks very much for that code.  Given that (apparently?) there is no
option to itemize to do what I want, what you have is a good choice.

I just tried this:


\let\originalstopitemize=\stopitemize
\define[1]\stopitemize{\originalstopitemize\doifsamestringelse{#1}{\par}{\blank}{#1}}

and it works with the above test, after replacing \mystopitemize with the
usual \stopitemize.

I'm not sure what this might break going forward, but I guess time will tell.
(Or perhaps someone with more ConTeXt knowledge than me will tell me first.)

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Bruce Horrocks
On 15 Jan 2024, at 16:15, Jim  wrote:
> 
> I would like
> something which automagically "does the right thing".

Not pretty, but... :-)

\setupwhitespace [big]
\setuppapersize [letter]

\define[1]\mystopitemize{\stopitemize\doifsamestringelse{#1}{\par}{\blank}{#1}}

\starttext
This is a short paragraph.

This is a line before an itemization.
\startitemize[nowhite]
\item First item.
\item Second item.
\mystopitemize
This is a short paragraph immediately following.

This is a line before a {\bf nowhite, after} itemization.
\startitemize[nowhite]
\item First item.
\item Second item.
\mystopitemize

This is the next short paragraph, not part of the above.

\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Jim
On Mon, Jan 15, 2024 at 20:33 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 17:15 schrieb Jim:
>> "after" does the trick, but not in an automatic way.  I would like
>> something which automagically "does the right thing".

> With “automagically”, do you mean for all instances?

I hate to go out on a limb and say "all", but I mean that if there is text
"immediately" following the \stopitemize (i.e., no \par token or vertical
mode material before more text), then there is no white space following the
last \item.  But if there is a blank line following the last \item, there
will be vertical white space corresponding to the current \setupwhitespace
setting following the last item.

> \setupitemgroup[itemize][nowhite,after]

>>> Sorry, then you need "nowhite". Usually that’s synonymous to
>>> "packed,joineup", but apparently not if whitespace is active.

>> "Usually" is in the eye of the beholder.  ;-)

>> I would have thought that having non-zero whitespace between paragraphs is
>> common.  For example, Aditya's blog linked to above has whitespace between
>> paragraphs.  Are you suggesting that is uncommon, or (showing my
>> Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

> Yes, it’s common, and \setupwhitespace is right.

OK, thanks for the confirmation.

> I just don’t remember all the setups in my many environments all the time.

>>> I added a few comments to
>>> https://wiki.contextgarden.net/Command/setupitemgroup
>>> Unfortunately, this is one of the areas where we have a plethora of options
>>> and no documentation about them.

>> Thanks for adding them.  I see you did not document the all-important (to
>> me) "after" (or "before") in the wiki.  Would you like to add that?  If
>> you don't have time right now, I'd be happy to do so.

> It’s there now.

Thanks, I have already seen them!

> I’m not sure about the options regarding width

I've done some more exploration about items in the last hour or so.  I'm
not sure I am yet ready to update the wiki (I am concerned that incomplete
information may be worse than no information), but if/when I feel
confident, I will add some information about some options.  (I guess the
implementation code is the current definitive documentation!)

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Jim
On Mon, Jan 15, 2024 at 17:39 (+0100), Wolfgang Schuster wrote:

> Jim schrieb am 15.01.2024 um 01:42:
>> I have

>> \setupwhitespace [big]

>> so that I get "a blank line" between paragraphs.

>> I would like to *not* have "blank lines" before and after my items.  For
>> example, if there is more "paragraph text" after the last item I would like
>> to see this structure:

>> ------

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

>> ------

>> and if there is no "paragraph text" after the last item, I'd like to see
>> this structure:

>> --

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.

>> The next paragraph starts here...

>> --

>> Try as I might, I can't find the right options to give to \startitemize.

>> The closest I have found is to start with
>> \startitemize[a,nowhite]
>> but that prevents the "blank line" even in the second case above, which is
>> not what I want.  Further, 'packed' and 'joinedup' seem to behave
>> identically here, both leaving "a blank line" before the first item and
>> after the last item.

>> Clearly, I can force a blank line before the following paragraph with a
>> \vskip, but that seems like a crude way to do it.

>> Can someone either enlighten me on either
>> (a) the Right ConTeXt Way to do this, or
>> (b) a document that would tell me this, if I knew to read it?

>> I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
>> an excursion" with no luck.

> Hi Jim,

> such a feature exists only to suppress paragraph indentation but not to
> ignore whitespace
> between paragraphs.

> \setupitemize[indentnext=auto]

> \setupindenting[yes,medium]

> \starttext

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \startitemize
> \startitem Lorem ipsum \unknown \stopitem
> \stopitemize

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \startitemize
> \startitem Lorem ipsum \unknown \stopitem
> \stopitemize
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \stoptext

Hi Wolfgang,

thanks for that information.

I would have thought that what I want to do is not so unusual that ConTeXt
does not have the ability to handle it, especially in light of the
indentnext=auto feature which shows that (presumably) some people want to
handle the text following \stopitemize differently, depending on whether or
not the following text is part of the same paragraph.

Perhaps I need to go and contemplate the sins of my formatting
choices... :-)

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Wolfgang Schuster

Jim schrieb am 15.01.2024 um 01:42:

I have

\setupwhitespace [big]

so that I get "a blank line" between paragraphs.

I would like to *not* have "blank lines" before and after my items.  For
example, if there is more "paragraph text" after the last item I would like
to see this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...

--

and if there is no "paragraph text" after the last item, I'd like to see
this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.

The next paragraph starts here...

--

Try as I might, I can't find the right options to give to \startitemize.

The closest I have found is to start with
\startitemize[a,nowhite]
but that prevents the "blank line" even in the second case above, which is
not what I want.  Further, 'packed' and 'joinedup' seem to behave
identically here, both leaving "a blank line" before the first item and
after the last item.

Clearly, I can force a blank line before the following paragraph with a
\vskip, but that seems like a crude way to do it.

Can someone either enlighten me on either
(a) the Right ConTeXt Way to do this, or
(b) a document that would tell me this, if I knew to read it?

I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
an excursion" with no luck.


Hi Jim,

such a feature exists only to suppress paragraph indentation but not to 
ignore whitespace

between paragraphs.

\setupitemize[indentnext=auto]

\setupindenting[yes,medium]

\starttext

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown


\startitemize
\startitem Lorem ipsum \unknown \stopitem
\stopitemize

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown


\startitemize
\startitem Lorem ipsum \unknown \stopitem
\stopitemize
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown


\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: [External] Re: Looking for itemize help

2024-01-15 Thread Jim
Hi Michael,

thanks for getting back.  But the problem is not the text in front of the
items, but rather vertical whitespace that I don't want.  (Or, with
'nowhite', vertical space that I might want not being there.)

Cheers.
Jim

On Mon, Jan 15, 2024 at 15:51 (+), Rogers, Michael K wrote:

> Hi Jim,

> I think you want alternative “a”, if the dot instead of a letter is the 
> problem and not the whitespace:

> %%

> \starttext

> This is a short paragraph.

> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[a,packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.

> This is a short paragraph.

> \stoptext

> %%

> Cheers,

> Michael

>> On Jan 15, 2024, at 6:36 AM, Jim  wrote:

>> Hi Hraban,

>> thanks for your response.  But...

>> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

>>> Am 15.01.24 um 01:42 schrieb Jim:

>>>> Some text preceding the list of items:
>>>> a. Item one.
>>>> b. Second item.
>>>> This sentence is part of the same paragraph.

>>>> The next paragraph starts here...

>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

>> %%%

>> \setupwhitespace [big]

>> \setuppapersize [letter]

>> \starttext
>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize
>> This is a line immediately following the above itemization.

>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize

>> This is another short paragraph.

>> \stoptext

>> %%%

>> Thoughts?

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

>> maillist : ntg-context@ntg.nl / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl/ / https://context.aanhet.net/ (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: [External] Re: Looking for itemize help

2024-01-15 Thread Rogers, Michael K
Hi Jim,

I think you want alternative “a”, if the dot instead of a letter is the problem 
and not the whitespace:

%%

\starttext

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[a,packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

\stoptext

%%

Cheers,

Michael

> On Jan 15, 2024, at 6:36 AM, Jim  wrote:
>
> Hi Hraban,
>
> thanks for your response.  But...
>
> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:
>
>> Am 15.01.24 um 01:42 schrieb Jim:
>
>>> Some text preceding the list of items:
>>> a. Item one.
>>> b. Second item.
>>> This sentence is part of the same paragraph.
>
>>> The next paragraph starts here...
>
>> \startitemize[packed,joinedup] should be the right combination.
>
> I won't argue about "should", but I will point out it isn't, at least on my
> computer with a recently updated context.
>
> Here is a non-minimal but short non-working example.
>
> %%%
>
> \setupwhitespace [big]
>
> \setuppapersize [letter]
>
> \starttext
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.
>
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
>
> This is another short paragraph.
>
> \stoptext
>
> %%%
>
> Thoughts?
>
>Jim
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl/ / https://context.aanhet.net/ (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Jim
Hi Hraban,

thanks for your response.  But...

On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 01:42 schrieb Jim:

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

> \startitemize[packed,joinedup] should be the right combination.

I won't argue about "should", but I will point out it isn't, at least on my
computer with a recently updated context.

Here is a non-minimal but short non-working example.

%%%

\setupwhitespace [big]

\setuppapersize [letter]

\starttext
This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
 
This is another short paragraph.

\stoptext

%%%

Thoughts?

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-14 Thread Henning Hraban Ramm

Am 15.01.24 um 01:42 schrieb Jim:


Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...


\startitemize[packed,joinedup] should be the right combination.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Looking for itemize help

2024-01-14 Thread Jim
I have

\setupwhitespace [big]

so that I get "a blank line" between paragraphs.

I would like to *not* have "blank lines" before and after my items.  For
example, if there is more "paragraph text" after the last item I would like
to see this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...

--

and if there is no "paragraph text" after the last item, I'd like to see
this structure:

--

Some text preceding the list of items:
a. Item one.
b. Second item.

The next paragraph starts here...

--

Try as I might, I can't find the right options to give to \startitemize.

The closest I have found is to start with
\startitemize[a,nowhite]
but that prevents the "blank line" even in the second case above, which is
not what I want.  Further, 'packed' and 'joinedup' seem to behave
identically here, both leaving "a blank line" before the first item and
after the last item.  

Clearly, I can force a blank line before the following paragraph with a
\vskip, but that seems like a crude way to do it.

Can someone either enlighten me on either
(a) the Right ConTeXt Way to do this, or
(b) a document that would tell me this, if I knew to read it?

I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
an excursion" with no luck.

Thanks.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: QR Code

2023-12-21 Thread Ursula Hermann
Dear LIst,


I used today the help of WinEdt , because of the PATH for the QR Code i wanted 
to try, and i found this one, sorry, a little bit long:

PATH

The PATH environment variable contains a list of directories where Windows 
should search for executable files when the path specification is not present 
in the command line. It is important that you understand that WinEdt launches 
external applications (such as TeX or LaTeX) through the associated command 
line (with additional parameters), which is passed to the appropriate Windows 
API function. WinEdt merely makes the process transparent by providing a 
customizable user-defined GUI (Graphical User Interface) in the form of a 
toolbar button (or a menu item) named LaTeX. WinEdt does not know in advance if 
and where you have installed your TeX and thus avoids calling the executables 
with a full path specification. However, it is strongly recommended that your 
PATH contains the TeX bin directory. In the Diagnosis page of this dialog, 
WinEdt will display the PATH variable particular to your system.

Recent versions of TeX put their bin folder to the Windows PATH variable during 
installation. It is by this means that WinEdt can detect them automatically. If 
your PATH variable (as displayed in Diagnosis page) does not contain this 
folder (e.g. the folder where latex.exe is to be found), you probably don't 
have a properly installed TeX System! It is strongly recommended that you 
install TeX and Ghostscript as administrator or power user and thus allow the 
installations to initialize the required registry keys and environment 
variables.

If you have any doubts about the PATH settings, start the Command Prompt from 
the Windows Start menu or WinEdt's Accessories menu (or WinEdt's toolbar 
button) and type the command:

  echo %PATH%


This displays the value of your current PATH environment variable.

If you have a good reason to put any folder on your Windows PATH, you can do so 
by changing the Windows environment variable PATH. This is done through the 
Windows Control Panel (System -> Advanced -> Environment Variables). Details 
depend on your version of Windows and are explained in Windows help. You should 
not expect extensive support from the WinEdt Team when it comes to configuring 
your Windows.

Changes to the PATH variable made through WinEdt's PATH page in the Execution 
Modes interface affect only WinEdt and applications launched from it. In most 
cases, this is exactly what one wants. By default, you'll find something like 
this:

[X][X][X][X]

WinEdt inserts its own root folder %B to the PATH; this makes it possible to 
launch WinEdt from other applications (launched from it) without specifying the 
location of WinEdt.exe. For example, YAP's inverse search command can be 
manually defined in its Options dialog as:

  WinEdt.exe "[Open(|%f|);SelPar(%l,8);]"


If necessary, you can add additional folders that will be inserted to the PATH 
variable. For example:

  %B;C:\My TeX\Win32\Bin;C:\My Accessories\Bin


By default, WinEdt also detects the TeX and Ghostscript bin folders (or you can 
specify them manually in the Execution Modes interface). Unless these folders 
are already included in the PATH variable, WinEdt will insert them, thus making 
it easy to launch TeX executables (such as latex.exe) and GS's 
gswin64c.exe/gswin32c.exe, which is used for ps -> pdf conversion...

In the above example, MiKTeX's bin folder got included to the PATH during 
MiKTeX's installation, while the GS folder had to be added by WinEdt...

Note: Many users believe that putting some folder on their PATH will allow 
LaTeX to find ".sty" or ".cls" files in that folder. Wrong! TeX does not search 
the Windows PATH for any of its input files. TeX uses its own FNDB (for good 
reason) and you should consult your TeX manual to learn about where to place 
such files and how to properly install them! Windows PATH only allows WinEdt 
(or other programs, including the Command Prompt) to launch an executable with 
its name rather than full specification, which isn't known in advance, and 
which depends on where you have installed your accessories. If, after the 
executable is launched, it fails to perform the task, the PATH (or WinEdt) 
usually has nothing to do with the problem and you should focus on other 
reasons (including possible errors in your document – read the error message or 
log file produced by the accessory in question)...


Variables

WinEdt itself does not use any environment variables. However, applications 
that are launched from WinEdt may depend on them. In particular, TeX 
accessories can use such variables to obtain a list of additional directories 
where they search for input files, bibliography databases, etc... The 
documentation that comes with your TeX System or any other accessory describes 
the rules. You should consult this documentation in order to de

[NTG-context] Re: Problem with the paragraph

2023-12-18 Thread Ursula Hermann
Dear Bruce, 

Thank you for your Mail 
It works  perfect. Thank you .
Uschi Hermann 

-Ursprüngliche Nachricht-
Von: Bruce Horrocks  
Gesendet: Freitag, 15. Dezember 2023 14:00
An: ntg-context mailing list 
Betreff: [NTG-context] Re: Problem with the paragraph



> On 14 Dec 2023, at 09:44, Ursula Hermann  wrote:
> 
> If I change the name of the textbackground with my example, I sent yesterday, 
> there is no color in the paragraph. 
> 

Try the following version of your example which incoporates Hraban's and 
Wolfgang's suggestions.
Also take care over changing style so use \bold{this is bold} or {\bf this is 
bold} but not \bf{this is bold}.

\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper 
\setupbodyfont[Times New Roman, 12.2pt] \definemargindata  
[MyInMargin][inright] 
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm] \starttext \margintext 
{1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par 
Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aussage h(m, f) 
sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die 
Bedeutung der beiden Aussagen klar.
\par
\startitemize[n]
 \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
% I changed the above to use \startitemize but have a look at \placeformula as 
well

\startGrayBackground
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass ein 
\m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders 
wichtig, die Formulierung sehr lange zu prüfen und eventuell auch formalisiert 
noch einmal aufzuschreiben.”
\blank
Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par von \m{x\doubleprime} 
ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par (Beutelspacher [10, S.54]).
\stopGrayBackground
\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) 
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Problem with the paragraph

2023-12-15 Thread Bruce Horrocks


> On 14 Dec 2023, at 09:44, Ursula Hermann  wrote:
> 
> If I change the name of the textbackground with my example, I sent yesterday, 
> there is no color in the paragraph. 
> 

Try the following version of your example which incoporates Hraban's and 
Wolfgang's suggestions.
Also take care over changing style so use \bold{this is bold} or {\bf this is 
bold} but not \bf{this is bold}.

\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman, 12.2pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
{\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).}
\par Sei M die Menge aller Männer und F die Menge aller Frauen. Die
Aussage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen
machen Sie sich die Bedeutung der beiden Aussagen klar.
\par
\startitemize[n]
 \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}
 \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
% I changed the above to use \startitemize but have a look at \placeformula as 
well

\startGrayBackground
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank
Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par
von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par
(Beutelspacher [10, S.54]).
\stopGrayBackground
\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: xmlpos values doubled

2023-11-22 Thread Hans Hagen

On 11/22/2023 2:30 AM, Benjamin Buchmuller wrote:

Hi list,

I came across this old thread as I was trying to use \xmlpos{#1} to 
"dynamically" create references such as \item[mystep:\xmlpos{#1}] to be 
referenced when other elements of this node are parsed at a later point.

In fact, it seems that \xmlpos{#1} returns duplicate values. This might indeed 
be the intended meaning of \xmlpos{#1} as it seems related to the XML query 
foo/bar/index() which only looks up the position in the parent node. (I noticed 
that if I run this repeatedly, I get somehow different values from times to 
times. I can't say why.)

Anyways, I was wondering if there is a TeX command to access the absolute 
position of an element in the tree? Similar to foo/bar[rootposition()] (or 
foo/bar[order()]? – Can't make sense of the entry in the XML manual.)
normally elements are unique, and within n xml instance #1 itself is 
rather unique (but the same even over runs i.e. when it goes via the tuc 
file)


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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Markdown to HTML cross-references

2023-11-21 Thread Thangalin
Hi list,

I'm looking to implement a consistent syntax for cross-references in
KeenWrite <https://keenwrite.com/> and am wondering what you think would
make the most sense for translating into ConTeXt commands.

First, some background (the first two give an overview, the others are
cross-reference references for various syntaxes):

   - https://talk.commonmark.org/t/cross-references-and-citations/4013/7
   - https://thesynack.com/posts/markdown-captions
   - https://quarto.org/docs/authoring/cross-references.html
   - https://mystmd.org/guide/cross-references
   - https://lierdakil.github.io/pandoc-crossref
   - https://github.com/tomduck/pandoc-eqnos

I'm leaning towards the following syntax:

Markdown Item (table, blockquote, TeX block, figure, code, R chunk, etc.)

: caption text {#type:label}

See [@type:label] for details.

There's a unit test that shows what's currently being generated with a
number of examples for images, tables, blockquotes, internationalization,
and so on:

https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/src/test/java/com/keenwrite/processors/markdown/extensions/references/CrossReferencesExtensionTest.java#L51

The code is a work-in-progress; so the tests may have changed depending on
if/when you view the Java source code. Presently, the captions produce
anchor references, mostly. The following seems easier to typeset using
ConTeXt:

Meschiya Lake - Lucky Devil 

This diverges from the HTML specification for tables (table/caption) and
figures (figure/figcaption). It would also mean having to write ConTeXt
macros that flip the spans and anchors to produce a caption such as:

*Lyrics 1.1.* Meschiya Lake - Lucky Devil

While there are plenty of ways of presenting captions (e.g., multi-column
images with sub-figure numbers) the majority of cross-references are to a
single "thing" with a single "caption".

What are your thoughts on this proposal? (Keeping in mind I'm the only
person working on KeenWrite and while I'm trying to keep the syntax
compatible with pandoc, implementing the full pandoc-crossref syntax is out
of scope for me.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: xmlpos values doubled

2023-11-21 Thread Benjamin Buchmuller
Hi list,

I came across this old thread as I was trying to use \xmlpos{#1} to 
"dynamically" create references such as \item[mystep:\xmlpos{#1}] to be 
referenced when other elements of this node are parsed at a later point. 

In fact, it seems that \xmlpos{#1} returns duplicate values. This might indeed 
be the intended meaning of \xmlpos{#1} as it seems related to the XML query 
foo/bar/index() which only looks up the position in the parent node. (I noticed 
that if I run this repeatedly, I get somehow different values from times to 
times. I can't say why.)

Anyways, I was wondering if there is a TeX command to access the absolute 
position of an element in the tree? Similar to foo/bar[rootposition()] (or 
foo/bar[order()]? – Can't make sense of the entry in the XML manual.)

Thank you for your help!


Benjamin


> Hi Ben,
> 
> I think that both \xmlpos and \xmldepth give weird results.
> 
> With this minimal sample:
> 
> \startbuffer[text]
> first level
> second level
> third level
> third level
> 
> second level
> third level
> third level
> 
> second level
> third level
> third level
> 
> 
> \stopbuffer
> 
> \startxmlsetups xml:text
> \xmlsetsetup{#1}{doc|s|ss}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:text}
> 
> \startxmlsetups xml:doc
> \chapter{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> \stopxmlsetups
> 
> \startxmlsetups xml:s
> \section{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> \stopxmlsetups
> 
> \startxmlsetups xml:ss
> \subsection{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> \stopxmlsetups
> 
> \setuphead[chapter,section,subsection][before=,after=,]
> \starttext
> \xmlprocessbuffer{main}{text}{}
> \stoptext
> 
> \xmldepth shows values that I think are +1 than they should be.
> 
> \xmlpos counts in pairs and not in units (as you wrote, 2, 4, 6...).
> 
> Hans, could you check whether this is working as expected?
> 
> Sorry, but if this isn’t a bug, I have no idea of what I may be missing.
> 
> Pablo
> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: command to process CSV file (database module)

2023-11-05 Thread Pablo Rodriguez via ntg-context
On 11/5/23 13:56, Pablo Rodriguez via ntg-context wrote:
> [...]
> I get an error about an unexpected symbol near "\" in the line of
> "\processdatabasefile".
>
> Could anyone enlighten me about what I am missing here?

Replying to myself, thanks to the wiki
(https://wiki.contextgarden.net/Commands_with_optional_arguments).

It seems that the command has to be defined as unexpanded, such as in:

  \setupinteraction[state=start]
  \setupattachments[method=hidden]
  \usemodule[database]

  \starttext

  \unexpanded\def\ItemContents#1#2#3{\doiftext{#2}
{\item {\em #1}\attachment[file=#2, name=\currentitemnumber-#2]%
  \doiftext{#3}{ (also available at #3)}}}

  \defineseparatedlist
 [test]
 [separator={,},
  quotechar={"},
  before={\startitemize[n]},after={\stopitemize},
  first={\ItemContents},last={.},
  left={\{},right={\}}]

  \processdatabasefile[test][context-documents.csv]

  \stoptext

It is not clear for me why is this needed, but it might be one of the
many aspects of expansion that average users cannot understand from TeX.

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] command to process CSV file (database module)

2023-11-05 Thread Pablo Rodriguez via ntg-context
Dear list,

These are the following first four lines of a CSV file:

,,
"About \LuaTeX\ and
\ConTeXt","about.pdf","https://www.pragma-ade.com/general/manuals/about.pdf;
"l2r, r2l: A Few
Tips","bidi.pdf","https://www.pragma-ade.com/general/manuals/bidi.pdf;
"Flowcharts","charts-mkiv.pdf",

Faking a command such as \cA, \cB and \cC (for contents of columns A, B
or C) I would like to create a source document with an enumeration that
contains:

  \doiftext{\cB}
{\item {\em\cA}\attachment[file=\cB]%
  \doiftext{\cC}{ (also available at \cC)}.}

I would like to do that with the "database" module.

So far I have adapted the itemize environment, but I don't get the
contents for items right:

  \usemodule[database]

  \starttext

  \def\ItemContents#1#2#3{\doiftext{#2}
{\item {\em #1}\attachment[file=#2]%
  \doiftext{#3}{ (also available at #3)}.}}

  \defineseparatedlist
 [test]
 [separator={,}, % tab
  quotechar={"}, % tab
  before={\startitemize[n]},after={\stopitemize},
  first={\ItemContents},last={.},
  left={\{},right={\}}]

  \processdatabasefile[test][context-documents.csv]

  \stoptext

I get an error about an unexpected symbol near "\" in the line of
"\processdatabasefile".

Could anyone enlighten me about what I am missing here?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: numbered itemize list item label alignment

2023-10-19 Thread Csikos Bela
 Eredeti levél Feladó: Aditya Mahajan Dátum: 
2023 október 15 22:32:37Tárgy: Re: [NTG-context] Re: numbered itemize list item 
label alignmentCímzett: mailing list for ConTeXt users On 
Sun, 15 Oct 2023, Wolfgang Schuster wrote:  > Csikos Bela schrieb am 15.10.2023 
um 15:51: > > Hello: > > > > I would like to make a long numbered itemize list, 
where the numbers > > increase up to three digits. > > I would like the 
numbered labels aligned to the right and the widest > > label's left side 
located at the left margin. > > I tried the below code but the 3 digit labels' 
left sides go into the left > > margin. How can I fix it? > > > > Code: > > > > 
\showframe > > \starttext > > \startitemize[n,broad][itemalign=flushright] > > 
\dorecurse{250}{\item } > > \stopitemize > > \stoptext > > You can use the 
width-key to set a value for the number, below is a example > for method > to 
calculate the width based on the number of items but I would use fixed > value 
> (e.g. width=2em) to let all items (independent of the entries) start on the > 
same position.  I normally use the `fit` key with an appropriate value of 
`distance`. For example:  \showframe[text][text]  \starttext  
\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright] 
\dorecurse{1}{\startitem xxx\stopitem} \stopitemize  \page  
\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright] 
\dorecurse{11}{\startitem xxx\stopitem} \stopitemize  \page  
\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright] 
\dorecurse{111}{\startitem xxx\stopitem} \stopitemize  \stoptext  Thank you, 
the fit option worked well.bcsikos___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: numbered itemize list item label alignment

2023-10-15 Thread Aditya Mahajan
On Sun, 15 Oct 2023, Wolfgang Schuster wrote:

> Csikos Bela schrieb am 15.10.2023 um 15:51:
> > Hello:
> >
> > I would like to make a long numbered itemize list, where the numbers
> > increase up to three digits.
> > I would like the numbered labels aligned to the right and the widest
> > label's left side located at the left margin.
> > I tried the below code but the 3 digit labels' left sides go into the left
> > margin. How can I fix it?
> >
> > Code:
> >
> > \showframe
> > \starttext
> > \startitemize[n,broad][itemalign=flushright]
> > \dorecurse{250}{\item }
> > \stopitemize
> > \stoptext
> 
> You can use the width-key to set a value for the number, below is a example
> for method
> to calculate the width based on the number of items but I would use fixed
> value
> (e.g. width=2em) to let all items (independent of the entries) start on the
> same position.

I normally use the `fit` key with an appropriate value of `distance`. For 
example:

\showframe[text][text]

\starttext

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{1}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{11}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{111}{\startitem xxx\stopitem}
\stopitemize

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: numbered itemize list item label alignment

2023-10-15 Thread Wolfgang Schuster

Csikos Bela schrieb am 15.10.2023 um 15:51:

Hello:

I would like to make a long numbered itemize list, where the numbers 
increase up to three digits.
I would like the numbered labels aligned to the right and the widest 
label's left side located at the left margin.
I tried the below code but the 3 digit labels' left sides go into the 
left margin. How can I fix it?


Code:

\showframe
\starttext
\startitemize[n,broad][itemalign=flushright]
\dorecurse{250}{\item }
\stopitemize
\stoptext


You can use the width-key to set a value for the number, below is a 
example for method
to calculate the width based on the number of items but I would use 
fixed value
(e.g. width=2em) to let all items (independent of the entries) start on 
the same position.


\defineexpandable\ItemWidth
  {\ifnum\lastcountervalue[itemgroup:itemize]>99
 \widthofstring{000.}%
   \orelse\ifnum\lastcountervalue[itemgroup:itemize]>9
 \widthofstring{00.}%
   \else
 \widthofstring{0.}%
   \fi}

\showframe[text][text]

\starttext

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{1}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{11}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{111}{\startitem xxx\stopitem}
\stopitemize

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: numbered itemize list item label alignment

2023-10-15 Thread Pablo Rodriguez
On 10/15/23 15:51, Csikos Bela wrote:
> Hello:
>
> I would like to make a long numbered itemize list, where the numbers
> increase up to three digits.
> I would like the numbered labels aligned to the right and the widest
> label's left side located at the left margin.
> I tried the below code but the 3 digit labels' left sides go into the
> left margin. How can I fix it?

Hi Csikos,

width is the key, such as in:

  \showframe\showgrid\showstruts
  \starttext
  \startitemize[n,broad][width=.125tw, itemalign=flushright]
  \dorecurse{250}{\item }
  \stopitemize
  \stoptext

I assigned ⅛ text width to the number width to clearly display it.

Just in case it helps,

Pablo

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] numbered itemize list item label alignment

2023-10-15 Thread Csikos Bela
Hello:I would like to make a long numbered itemize list, where the numbers 
increase up to three digits.I would like the numbered labels aligned to the 
right and the widest label's left side located at the left margin.I tried the 
below code but the 3 digit labels' left sides go into the left margin. How can 
I fix 
it?Code:\showframe\starttext\startitemize[n,broad][itemalign=flushright]\dorecurse{250}{\item
 }\stopitemize\stoptextThe resulted pdf is attached as 
context-itemize-label-alignment.pdf.Thank you in advance,bcsikos

context-itemize-label-alignment.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: item list inside a blockquote

2023-09-26 Thread Pablo Rodriguez
On 9/26/23 20:46, Wolfgang Schuster wrote:
> [...]
> The \startblockquote command removes the last skip to ensure only the
> space which is set by the environment appears in the output.

Many thanks for your explanation, Wolfgang.

> The default method to put some space before and after the environment is
> to use the spacebefore and spaceafter keys.

Now it is clear to me how the after and spaceafter differ in delimited
texts.

> It would interesting to know what you're trying to achieve with your
> combination of itemize and blockquote.

I’m quoting laws in footnotes, such as in:

   Relevant to the discusssion, see »Grundgesetz«, §73: :

 Der Bund hat die ausschließliche Gesetzgebung über:

   1. die auswärtigen Angelegenheiten;
   2. die Staatsangehörigkeit im Bunde;
   3. [...]

I need to quote the legal text and the list inside the legal text.

BTW, German legislation is only a sample.

I hope it is clear now,

Pablo
___
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: item list inside a blockquote

2023-09-26 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 26.09.2023 um 20:32:

On 9/26/23 12:52, gerard.degreve wrote:

Hello Pablo,

Just try to do this :

\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}\strut]

Hi Gerard,

this also works with \null, but not well with small dimensions:

 \showframe\showgrid\showstruts
 \setuppapersize[A6]
 \setupitemgroup
[itemize][1]
[   before={\blank[quarterline]},
 after={\blank[quarterline]\null}]
 \starttext
 one
 \startblockquote
 \startitemize
  \item a.
 \stopitemize
 \stopblockquote
 two
 \stoptext

I tend to think this might be a bug.


The \startblockquote command removes the last skip to ensure only the 
space which is set by the environment appears in the output.


The default method to put some space before and after the environment is 
to use the spacebefore and spaceafter keys.


 begin example
\setupquotation
  [spacebefore=line,
    spaceafter=line]

\starttext

\samplefile{knuth}

\startblockquote
\samplefile{knuth-gpt}
\stopblockquote

\samplefile{knuthmath}

\stoptext
 end example

It would interesting to know what you're trying to achieve with your 
combination of itemize and blockquote.


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: item list inside a blockquote

2023-09-26 Thread Pablo Rodriguez
On 9/26/23 12:52, gerard.degreve wrote:
> Hello Pablo,
>
> Just try to do this :
>> \setupitemgroup
>> [itemize][1]
>> [ before={\blank[.125th]},
>> after={\blank[.125th]}\strut]

Hi Gerard,

this also works with \null, but not well with small dimensions:

\showframe\showgrid\showstruts
\setuppapersize[A6]
\setupitemgroup
   [itemize][1]
   [   before={\blank[quarterline]},
after={\blank[quarterline]\null}]
\starttext
one
\startblockquote
\startitemize
 \item a.
\stopitemize
\stopblockquote
two
\stoptext

I tend to think this might be a bug.

Many thanks for your help again,

Pablo
___
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: item list inside a blockquote

2023-09-26 Thread gerard.degreve
gerard.degreve: 

Hello Pablo,

Just try to do this :
\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}\strut]

Regards,

Gerard


Le 25-09-23 19:26:08, Pablo Rodriguez  a écrit :
Dear list,

I have the following sample:

\setuppapersize[A6]
\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}]
\starttext
one
\startblockquote
\startitemize
\item a
\stopitemize
\stopblockquote
two
\stoptext

The blockquote disables the space after the list, but not before.

Have I hit a bug or am I missing something?

Many thanks for your help,

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


--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com___
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] item list inside a blockquote

2023-09-25 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuppapersize[A6]
\setupitemgroup
   [itemize][1]
   [   before={\blank[.125th]},
after={\blank[.125th]}]
\starttext
one
\startblockquote
\startitemize
 \item a
\stopitemize
\stopblockquote
two
\stoptext

The blockquote disables the space after the list, but not before.

Have I hit a bug or am I missing something?

Many thanks for your help,

Pablo
___
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: \setupitemgroup for footnotes

2023-09-25 Thread Henning Hraban Ramm

Am 25.09.23 um 17:52 schrieb Pablo Rodriguez:

Dear list,

I have the following sample (with current latest from 2023.09.18 21:13):

 \setuppapersize[A6]
 \starttext
 \startsetups[forfootnote]
 \setupitemgroup
[itemize][1]
[   before={\endgraf{\ttbf[before]}\endgraf},
 after={\endgraf{\ttbf [after]}\endgraf}]
 \stopsetups

 \setupnote[footnote][setups=forfootnote]

 \footnote{\startitemize
  \startitem Choose the correct answer.
  \startitemize
  \item This one
  \stopitemize
  \stopitem
 \stopitemize}
 \stoptext

Excuse my ignorance, but which is the right way to get the itemize setup
only for footnotes?


I would use \defineitemgroup to define your own, like "footnoteitemize".

https://wiki.contextgarden.net/Command/defineitemgroup

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] \setupitemgroup for footnotes

2023-09-25 Thread Pablo Rodriguez
Dear list,

I have the following sample (with current latest from 2023.09.18 21:13):

\setuppapersize[A6]
\starttext
\startsetups[forfootnote]
\setupitemgroup
   [itemize][1]
   [   before={\endgraf{\ttbf[before]}\endgraf},
after={\endgraf{\ttbf [after]}\endgraf}]
\stopsetups

\setupnote[footnote][setups=forfootnote]

\footnote{\startitemize
 \startitem Choose the correct answer.
 \startitemize
 \item This one
 \stopitemize
 \stopitem
\stopitemize}
\stoptext

Excuse my ignorance, but which is the right way to get the itemize setup
only for footnotes?

Many thanks for your help,

Pablo
___
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: Vertical Space between Text and Itemize List

2023-09-06 Thread Mikael Sundqvist
Hi,

You can use before, inbetween and after.

\setupitemgroup
[itemize]
[inbetween={\blank[1cm]},
before={\blank[2cm]},
after={\blank[3cm]}]

\starttext

\samplefile{ward}

\startitemize
\dorecurse{4}{
\startitem
\samplefile{knuthmath}
\stopitem
}
\stopitemize

\samplefile{ward}

\stoptext

/Mikael

On Thu, Sep 7, 2023 at 12:57 AM Jeroen  wrote:
>
> To get a packed itemize list I use this in the preamble
>
> \setupitemgroup
>   [itemize]
>   [packed]
>
> To get less vspace between the text and the first item, i changed it to this
>
> \setupitemgroup
>   [itemize]
>   [packed,
>nowhite]
>
> now there is indeed no whitespace. Is there a more granular way to place just 
> a little vertical whitespace between the text and the first item?
> ___
> 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] Vertical Space between Text and Itemize List

2023-09-06 Thread Jeroen
To get a packed itemize list I use this in the preamble

\setupitemgroup
  [itemize]
  [packed]

To get less vspace between the text and the first item, i changed it to this

\setupitemgroup
  [itemize]
  [packed,
   nowhite]

now there is indeed no whitespace. Is there a more granular way to place
just a little vertical whitespace between the text and the first item?
___
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: ifxmlselfempty

2023-09-04 Thread Hans Hagen

On 9/4/2023 8:20 PM, Hans van der Meer wrote:

I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has 
been accidentally crept in (from  copying that line in ifxmlempty, the item 
above?)
Anyway, remade the format and now the result is as I expected it to be. See 
below in the output of the MWE from my first post on this subject. I added the 
relevant portion of the code for clarity.

I am sure the next update will reflect it in the source ;-)


only if you also test ifxmlempty as it has similar code

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: ifxmlselfempty

2023-09-04 Thread Hans van der Meer via ntg-context
I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has been accidentally crept in (from  copying that line in ifxmlempty, the item above?)Anyway, remade the format and now the result is as I expected it to be. See below in the output of the MWE from my first post on this subject. I added the relevant portion of the code for clarity.I am sure the next update will reflect it in the source ;-)dr. Hans van der Meer   implement {        name      = "ifxmlselfempty",        public    = true,        usage     = "condition",        arguments = "argument",        actions   = function(id)--            return boolean_code, not checkedempty(getid(id)) and true            return boolean_code, checkedempty(getid(id)) and true        end    }

xmlsetup-template.pdf
Description: Adobe PDF document
On 4 Sep 2023, at 10:05, denis.ma...@unibe.ch wrote:IDK. But why do have a setup for , which does not appear in your xml source (shouldn’t it be ?)?  Von: Hans van der Meer via ntg-context <ntg-context@ntg.nl> Gesendet: Sonntag, 3. September 2023 14:11An: NTG ConTeXt <ntg-context@ntg.nl>Cc: Hans van der Meer <havdm...@ziggo.nl>Betreff: [NTG-context] ifxmlselfempty Is it possible that  the new \ifxmlselfempty has reversed its outcome? Or did I something wrong in this MWE?Here an MWE. yours sincerelydr. Hans van der Meer   \startbuffer[test]!not empty node!\stopbuffer \startxmlsetups xml:mysetups   \xmlsetsetup{\xmldocument}{something|emptynode|notemptynode}{xml:*}\stopxmlsetups \xmlregistersetup{xml:mysetups} \startxmlsetups xml:emptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}attribute = \xmlatt{#1}{value}\elsecontent = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}content = \xmlflush{#1}\elseattribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups \startxmlsetups xml:notemptynodenode=\xmltag{#1}:\crlfifxmlselfempty-else-fi:\space\ifxmlselfempty{#1}attribute = \xmlatt{#1}{value}\elsecontent = \xmlflush{#1}\fi\crlfifxmlselfempty-else-fi reversed:\space\ifxmlselfempty{#1}content = \xmlflush{#1}\elseattribute = \xmlatt{#1}{value}\fi\blank\stopxmlsetups \startxmlsetups xml:something\xmlall{#1}{./emptynode}\blank\xmlall{#1}{./notemptynode}\blank\stopxmlsetups \starttext\ConTeXt\ \contextversion\blank   \xmlprocessbuffer{main}{test}{}\stoptext___
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: no packed in current latest (LMTX only)

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 6:12 PM, Pablo Rodriguez wrote:

Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

   \starttext
   \startTEXpage[offset=1em]
   \startitemize[packed]
   \item item
   \item item
   \stopitemize
   \stopTEXpage
   \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,
hm, accidently removed line ... (there have been some 'additions' to 
itemize wrt tabulated items which makes things even more complex)


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: no packed in current latest (LMTX only)

2023-09-04 Thread Rik Kabel


On 9/4/2023 12:12 PM, Pablo Rodriguez wrote:

Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

   \starttext
   \startTEXpage[offset=1em]
   \startitemize[packed]
   \item item
   \item item
   \stopitemize
   \stopTEXpage
   \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,

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



I can confirm the problem.

--
Rik
___
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] no packed in current latest (LMTX only)

2023-09-04 Thread Pablo Rodriguez
Dear list,

after updating to current latest (from 2023.09.03 19:03), packed list
doesn’t seem to work in LMTX:

  \starttext
  \startTEXpage[offset=1em]
  \startitemize[packed]
  \item item
  \item item
  \stopitemize
  \stopTEXpage
  \stoptext

MkIV gets packed lists just right.

Could anyone confirm this?

Many thanks for your help,

Pablo
___
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]
>>>
>>> \star

[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
> > > > >

[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: Nested itemize

2023-08-21 Thread Alexandre Christe
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 T

[NTG-context] Re: Nested itemize

2023-08-21 Thread fv leung
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
>>>
>>> ___
>>> 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
>
> ___
___
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-21 Thread Alexandre Christe
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
>>
>> ___
>> 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: startitemize[a, text] space in LMTX

2023-08-16 Thread Xavier B.
Thanks.
Anyway do ypu have public triaging bugs system for LMTX and ConTeXt?

On Wed, 16 Aug 2023 19:58:28 +0200
Wolfgang Schuster  ha escrit:

> Xavier B. schrieb am 16.08.2023 um 15:20:
> > Hi,
> >
> > Is it possible that in LMTX there is almost no space between "(a)" and item?
> >
> > \startitemize[a, text] \item This is an item \stopitemize
> 
> Fixed in today's context update.
> 
> 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: startitemize[a, text] space in LMTX

2023-08-16 Thread Wolfgang Schuster

Xavier B. schrieb am 16.08.2023 um 15:20:

Hi,

Is it possible that in LMTX there is almost no space between "(a)" and item?

\startitemize[a, text] \item This is an item \stopitemize


Fixed in today's context update.

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] startitemize[a, text] space in LMTX

2023-08-16 Thread Xavier B.
Hi,

Is it possible that in LMTX there is almost no space between "(a)" and item?

\startitemize[a, text] \item This is an item \stopitemize

Thanks in advance,
Xavier
___
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 error which is not in .log file

2023-08-15 Thread Pablo Rodriguez
On 8/15/23 17:35, Xavier B. wrote:
> I have the document split in several files.

Hi Xavier,

as someone already mentioned it, the way to check would be:

  mtxrun --scripts check your-document.tex

But this doesn‘t parse \input, so you need to create a loop.

In Unix, it would read something like:

  for i in *.conTeXt; do mtxrun --scripts check $i; done

Windows might require something similar to (inspired by
https://ss64.com/nt/for.html):

  for %%I (*.context) do mtxrun --scripts check %%I

It might report the cause this way.

When ConTeXt quits unexpectedly ("mtx-context | fatal error: return
code: 1" is a error message from the console), it might be a started
command not closed, such as in:

  \starttext
\startitemize
  \item a
  \stoptext

Just in case it might help,

Pablo
___
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: Very strange error:

2023-08-14 Thread Xavier B.
 3, order 59, name 'pgfmoduledecorations.code.tex'
close source> level 2, order 59, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl'
open source > level 2, order 60, name 
'tikzlibrarydecorations.markings.code.tex'
open source > level 3, order 61, name 'tikzlibrarydecorations.code.tex'
close source> level 3, order 61, name 'tikzlibrarydecorations.code.tex'
open source > level 3, order 62, name 
'pgflibrarydecorations.markings.code.tex'
close source> level 3, order 62, name 
'pgflibrarydecorations.markings.code.tex'
close source> level 2, order 62, name 
'tikzlibrarydecorations.markings.code.tex'
open source > level 2, order 63, name 'tikzlibrarytrees.code.tex'
close source> level 2, order 63, name 'tikzlibrarytrees.code.tex'
open source > level 2, order 64, name 'tikzlibrarycalc.code.tex'
close source> level 2, order 64, name 'tikzlibrarycalc.code.tex'
open source > level 2, order 65, name 'tikzlibraryintersections.code.tex'
open source > level 3, order 66, name 'pgflibraryintersections.code.tex'
open source > level 4, order 67, name 'pgflibraryfpu.code.tex'
close source> level 4, order 67, name 'pgflibraryfpu.code.tex'
close source> level 3, order 67, name 'pgflibraryintersections.code.tex'
close source> level 2, order 67, name 'tikzlibraryintersections.code.tex'
open source > level 2, order 68, name 'tikzlibrarythrough.code.tex'
close source> level 2, order 68, name 'tikzlibrarythrough.code.tex'
open source > level 2, order 69, name 'tikzlibrarybackgrounds.code.tex'
close source> level 2, order 69, name 'tikzlibrarybackgrounds.code.tex'
open source > level 2, order 70, name 'tikzlibraryarrows.code.tex'
open source > level 3, order 71, name 'pgflibraryarrows.code.tex'
close source> level 3, order 71, name 'pgflibraryarrows.code.tex'
close source> level 2, order 71, name 'tikzlibraryarrows.code.tex'
open source > level 2, order 72, name 'tikzlibraryshapes.geometric.code.tex'
open source > level 3, order 73, name 'pgflibraryshapes.geometric.code.tex'
close source> level 3, order 73, name 'pgflibraryshapes.geometric.code.tex'
close source> level 2, order 73, name 'tikzlibraryshapes.geometric.code.tex'
open source > level 2, order 74, name 'tikzlibraryfadings.code.tex'
open source > level 3, order 75, name 'pgflibraryfadings.code.tex'
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
close source> level 3, order 75, name 'pgflibraryfadings.code.tex'
close source> level 2, order 75, name 'tikzlibraryfadings.code.tex'
open source > level 2, order 76, name 
'tikzlibrarydecorations.pathreplacing.code.tex'
open source > level 3, order 77, name 
'pgflibrarydecorations.pathreplacing.code.tex'
close source> level 3, order 77, name 
'pgflibrarydecorations.pathreplacing.code.tex'
close source> level 2, order 77, name 
'tikzlibrarydecorations.pathreplacing.code.tex'
open source > level 2, order 78, name 'tikzlibraryshadings.code.tex'
open source > level 3, order 79, name 'pgflibraryshadings.code.tex'
close source> level 3, order 79, name 'pgflibraryshadings.code.tex'
close source> level 2, order 79, name 'tikzlibraryshadings.code.tex'
open source > level 2, order 80, name 'tikzlibrarypatterns.code.tex'
open source > level 3, order 81, name 'pgflibrarypatterns.code.tex'
close source> level 3, order 81, name 'pgflibrarypatterns.code.tex'
close source> level 2, order 81, name 'tikzlibrarypatterns.code.tex'
open source > level 2, order 82, name 'tikzlibraryfit.code.tex'
close source> level 2, order 82, name 'tikzlibraryfit.code.tex'
open source > level 2, order 83, name 'tikzlibrarypositioning.code.tex'
close source> level 2, order 83, name 'tikzlibrarypositioning.code.tex'
open source > level 2, order 84, name 'tikzlibraryshapes.symbols.code.tex'
open source > level 3, order 85, name 'pgflibraryshapes.symbols.code.tex'
close source> level 3, order 85, name 'pgflibraryshapes.symbols.code.tex'
close source> level 2, order 85, name 'tikzlibraryshapes.symbols.code.tex'
open source > level 2, order 86, name 'tikzlibrarychains.code.tex'
close source> level 2, order 86, name 'tikzlibrarychains.code.tex'
modules > 'pgfmath' is not found
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern rm 12pt' is loaded
structure   > sectioning > section @ level 3 : 0.0.1 -> Proporcionalitat 
directa
structure   > sectioning > subject @ level 3 : 0.0.1 -> Preguntes
floatblocks     > '1' placed (here)
floatblocks > order disturbed
floatblocks > '2' placed (force)
floatblocks > order disturbe

[NTG-context] Very strange error:

2023-08-14 Thread Xavier B.
After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.


dev.tex
Description: TeX document
return {
 ["errortype"]=6,
 ["filename"]="./dev.tex",
 ["lastcontext"]="\n200 persones en total \\par \\startitemize [a, packed] 
\\item 2 de 5 persones estan a $A$ \\item a cada 4 persones de $A$ li 
corresponen 3 persones de $B$ \\item 20\\% són de $C$ \\item 2/8 són de $D$ 
\\stopitemize \\par \\head 420 persones en total \\par \\startitemize [a, 
packed] \\item $3/4$ de persones estan a $A$ \\item hi ha una correspondència: 
3 de $A$ $\\leftrightarrow $ 2 de $B$ \\item 40\\% és de $C$ \\item de 5 
persones, 4 són de $D$ \\stopitemize \\par \\head 245 persones \\par 
\\startitemize [a, packed] \\item $1/5$ de persones són de $A$ \\item $20\\%$ 
de persones són de $B$ \\item per cada 7 persones de $A$, n'hi ha 4 de $C$ 
\\item per cada 49 persones, n'hi ha 1 de $D$ \\stopitemize \\par \\head 1800 
persones \\par \\startitemize [a, packed] \\item Un $30\\%$ és de $A$ \\item 
30 de cada 50 són de $B$ \\item cada 5 persones de $B$ li corresponen 2 
persones de $C$ \\item $D$ té un 150\\% que les persones de $C$ \\stopitemize 
\\par \\stopitemize \\par En tots els casos, digueu quantes persones hi hauria 
en el subgrup més nombrós si en total hi hagués 1000 persones. 
\\stopexercici \\par \\startexercici 
[exercici:proporcionalitat-directa-8]{relacionar diagrames} Relacioneu en cada 
cas els diagrames amb la proporció indicada \\par \\startitemize [A] \\par 
\\head Proporcions \\par \\startitemize [a, packed, columns] \\item 2 de 5 
\\item 20\\% \\item $3/5$ \\item 5 a 10 \\stopitemize \\par \\head Diagrames 
\\par \\startitemize [a, packed, columns] \\item \\starttikzpicture \\draw 
(0,0) -- (5,0); \\foreach \\x in {0, 1, 2,..., 5} { \\draw (\\x , -0.2) -- (\\x 
, 0.2); \\draw (\\x ,-0.2) node[anchor=north] {\\x }; } \\draw [color=blue!50, 
line width=2pt] (0,0) -- (1,0); \\stoptikzpicture \\par \\item 
\\starttikzpicture \\draw (0,0) -- (5,0); \\foreach \\x in {0, 1, 2,..., 5} { 
\\draw (\\x , -0.2) -- (\\x , 0.2); \\draw (\\x ,-0.2) node[anchor=north] {\\x 
}; } \\draw [color=red!50, line width=2pt] (0,0) -- (2,0); \\stoptikzpicture 
\\par \\item \\starttikzpicture \\draw (0,0) -- (5,0); \\foreach \\x in {0, 1, 
2,..., 5} { \\draw (\\x , -0.2) -- (\\x , 0.2); \\draw (\\x ,-0.2) 
node[anchor=north] {\\x }; } \\draw [color=green!50, line width=2pt] (0,0) -- 
(3,0); \\stoptikzpicture \\par \\item \\starttikzpicture \\draw (0,0) -- (5,0); 
\\foreach \\x in {0, 1, 2,..., 5} { \\draw (\\x , -0.2) -- (\\x , 0.2); \\draw 
(\\x ,-0.2) node[anchor=north] {\\x }; } \\draw [color=orange!50, line 
width=2pt] (0,0) -- (1.6,0); \\stoptikzpicture \\par \\stopitemize \\par 
\\stopitemize \\par Per a cada proporció, dibuixeu nous diagrames que tengui 
longitud 100. \\stopexercici \\par \\par \\startexercici 
[exercici:proporcionalitat-directa-9]{representar a diagrames}Usant el diagrama 
$5 \\times 10$ següent (vegeu la figura~\\in [figura:diagrama-punts-5x10]) 
representeu la informació donada en cada cas. \\par \\placefigure [force] 
[figura:diagrama-punts-5x10] {Diagrama de punts $5 \\times 10$} { \\bTABLE 
[frame=off,align={middle,lohi},width=fit, offset=2mm] \\bTR \\bTD 
\\starttikzpicture \\foreach \\x in {0,...,9} \\foreach \\y in {0,...,4} { 
\\draw [fill=gray!50] (\\x ,\\y ) circle (0.25); } \\par \\stoptikzpicture 
\\eTD \\eTR \\eTABLE } \\par \\startitemize [a, columns, packed, four] \\item 
40\\% \\item 4 de 5 \\item $3/4$ \\item 4 a 1 \\item 22\\% \\item $1/8$ \\item 
5 a 3 \\item 3 de 8 \\stopitemize \\par Si aquestes informacions 
corresponguessin a mostres de peixos ferits a la mar, calculeu quants peixos 
malalts hi hauria en una mostra de 3000 peixos en total. \\stopexercici \\par 
\\startexercici [exercici:proporcionalitat-directa-antic-1]{sou} Na Marta fa 
feina per hores. Si fent 25 hores de feina, na Marta cobra 625 euros, quant 
cobrarà fent 40 hores? Quantes hores hauria de fer na Marta per cobrar 
exactament 2300 euros? \\stopexercici \\par \\par \\startexercici 
[exercici:proporcionalitat-directa-antic-2]{astronautes} Aquest és la bità
cola d'un projecte espacial: \\startitemize [4] \\item S'enlairen 5 
astronautes, amb 200 kg de menjar a una estació espacial \\item Al cap de 3 
dies, hi ha un relleu: se'n van 2 i en vénen 3 \\item La tripulació resultant 
es queda durant 5 dies més \\item Tots els astronautes tornen. L'estació 
espacial queda buida \\stopitemize \\par Els bastarà el menjar que s'enduen al 
principi si sabem que quatre astronautes mengen en promig 20 kg per dia? 
\\stopexercici \\par \\startexercici 
[exercici:proporcionalitat-

[NTG-context] Re: Link from a PDF to a reference of an embedded PDF

2023-07-26 Thread Pablo Rodriguez
On 7/25/23 17:38, Pablo Rodriguez wrote:
> On 7/24/23 18:04, Gerion Entrup wrote:
>> […]
>
> I’m in a hurry, excuse my rash reply.

Sorry, Gerion, my reply yesterday was rushed (no skin condition).

The solution is already there (in the test files).

You have the file with the reference (save it as main.tex):

  \starttext
  \dorecurse{15}
{\chapter[chap\recurselevel]{Chapter}}
  \stoptext

You have the file that reads the references from main.tuc and generates
the inter-document links:

  \setupinteraction[state=start]
  \starttext
  Links to each chapter using \type{main.tuc}:

  \startitemize[n, packed]
  \dorecurse{15}
{\item Reference to \in[main::chap\recurselevel].}
  \stopitemize
  \stoptext

The real issue is that I couldn’t make it work with any PDF viewer I
have on Linux.

Either the viewer doesn’t detect the link (such as PDF.js), or it cannot
solve the target file (such as MuPDF and MuPDF-GL), or it cannot reach
destinations (such as Xpdf, Evince/Okular or SumatraPDF).

I take for granted that Acrobat will deal fine with this, since
destinations in links (GoToR) seem to be fine.

Of course, to confirm this, it should be tested with Acrobat.

Just in case it helps,

Pablo
___
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] Link from a PDF to a reference of an embedded PDF

2023-07-20 Thread Gerion Entrup
Hi,

I found the "interaction" parameter in the documentation for
setupexternalfigure/externalfigure [1]. I, however do not quite
understand it. When embedding another PDF with this command, it seems to
be possible to include the references of the underlying PDF. It is
possible to link to them within the main context document? In [2], I
found something maybe related but it requires a tuc file.

Example:

inner.tex:
```
\starttext
\startsection[title=References, reference=sec:ref]
Some text
\placeformula[eq:foo]
\startformula
1 + 2 = 3
\stopformula
or:
\startitemize[n]
    \item[item:bla] bla
    \item[item:blub] blub
\stopitemize

Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub].
\stoptext
```

outer.tex:
```
\starttext
\externalfigure[inner.pdf][width=10cm, interactive=reference]

Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub].
\stoptext
```

Can I somehow access the references of inner.tex from outer.tex?
For me, it is not that relevant, that the correct number is set, but the
interaction within the outer PDF should work, so clicking on the
reference should scroll to the correct content.

Background of my question: I normally do graphics in a separate PDFs.
Some graphics consists of source code together with a graphical
representation and I want to be able to link to single source code lines.


Gerion


[1] https://wiki.contextgarden.net/Command/setupexternalfigure
[2] https://wiki.contextgarden.net/References#References_to_an_external_file


signature.asc
Description: This is a digitally signed message part.
___
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: Text item groups

2023-07-16 Thread Pablo Rodriguez
On 7/15/23 21:46, Jairo A. del Rio wrote:
> Hi, list! I want to know how to make numbers in text item groups run
> along with text (for instance, wrt indentation) regardless of their
> position in text. In the following example:

Hi Jairo,

alignsymbol=yes might be what you need (if I’m getting your point right).

Complete sample that worked for me:

  \setupindenting[yes,medium]
  \starttext
  \startitemize[a,intext]
[left=(, right=), stopper=, alignsymbol=yes, indenting={yes,medium}]
  \startitem \input{jojomayer}\stopitem
  \startitem \input{jojomayer}\stopitem
  \startitem \input{jojomayer}\stopitem
  \stopitemize
  \stoptext

Just in case it might help,

Pablo
___
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: Text item groups

2023-07-16 Thread Wolfgang Schuster

Jairo A. del Rio schrieb am 15.07.2023 um 21:46:
Hi, list! I want to know how to make numbers in text item groups run 
along with text (for instance, wrt indentation) regardless of their 
position in text. In the following example:


\setupindenting[yes,medium]

\starttext

\startitemize[a,text][textdistance=none]

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\stopitemize

\stoptext

Indentation is ignored altogether. Thank you in advance


\setupindenting[yes,medium]

\starttext

\samplefile{jojomayer}

\startitemize[a,intext][alignsymbol=yes,indenting=yes,width=\widthofstring{a.},distance=\spaceamount]
\startitem \samplefile{jojomayer}\stopitem
\startitem \samplefile{jojomayer}\stopitem
\startitem \samplefile{jojomayer}\stopitem
\stopitemize

\stoptext

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: Text item groups

2023-07-16 Thread Bruce Horrocks
I'm not quite sure what you mean by "run along with text". If you mean "keep in 
the same paragraph" then just remove the blank lines from your example, e.g.
\setupindenting[yes,medium]

\starttext

\startitemize[a,text][textdistance=none]

\startitem \input{jojomayer}\stopitem
\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\stopitemize

\stoptext

> On 15 Jul 2023, at 20:46, Jairo A. del Rio  wrote:
> 
> Hi, list! I want to know how to make numbers in text item groups run along 
> with text (for instance, wrt indentation) regardless of their position in 
> text. In the following example:
> 
> \setupindenting[yes,medium]
> 
> \starttext
> 
> \startitemize[a,text][textdistance=none]
> 
> \startitem \input{jojomayer}\stopitem
> 
> \startitem \input{jojomayer}\stopitem
> 
> \startitem \input{jojomayer}\stopitem
> 
> \stopitemize
> 
> \stoptext
> 
> Indentation is ignored altogether. Thank you in advance
> 
> Regards,
> 
> Jairo
> ___
> 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
> ___


—
Bruce Horrocks
Hampshire, UK

___
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] Text item groups

2023-07-15 Thread Jairo A. del Rio
Hi, list! I want to know how to make numbers in text item groups run along
with text (for instance, wrt indentation) regardless of their position in
text. In the following example:

\setupindenting[yes,medium]

\starttext

\startitemize[a,text][textdistance=none]

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\startitem \input{jojomayer}\stopitem

\stopitemize

\stoptext

Indentation is ignored altogether. Thank you in advance

Regards,

Jairo
___
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] Custom TOC with makeup and setups

2023-05-10 Thread Jethro Djan via ntg-context
Hello,

I am trying to create a presentation where at the start of each section in
my presentation, a custom TOC page is shown. When I am at a particular
section, the TOC will grey out all other sections (not implemented in my
MWE). I have tried different ways but I find using makeups for the TOC page
works ok (following
https://wiki.contextgarden.net/Command/setuplistalternative and Aditya's
presentation slides on their blog). My challenge is that when a makeup page
is inserted, it leaves a page with the section name blank before it. How do
I fix it? Any other way to achieve this is also welcome. My MWE:

\setuppapersize[S6]
\startuseMPgraphic{itemize:toc}
  save p; path p;
  p := ( (0,-0.5)--(0,0.5)--(0.866,0)--cycle ) scaled 1.5ExHeight;
  fill p withcolor \MPcolor{Black};
\stopuseMPgraphic

\definesymbol[itemize:toc][\useMPgraphic{itemize:toc}]

\definelistalternative
  [toclist]
  [renderingsetup=list:toclist]

\setupheadtext[section=Table of Contents]

\startsetups toclist
  \framed[align=normal, frame=off]{\placelist [section] [criterium=all,
alternative=toclist]}
\stopsetups

\definehspace[tspace][4cm]
\setupframed[
  height=fit,
  width=fit,
  location=middle,
  frame=off,
  align=normal,
  offset=none,
]
\startsetups list:toclist
  {\hbox to \hsize \bgroup
  \hspace[tspace]
  \framed[width=10mm,align=flushleft]{\symbol[itemize:toc]}%
  \framed[empty=yes]{\currentlistentrynumber\currentlistentrypagenumber}%
  \doifelse\currentlistentrylocation{\namedstructureheadlocation{section}}{%
\framed[align=flushright,]{{\bfb\currentlistentrytitle}}%
  }{\framed[align=flushright,]{\currentlistentrytitle}}
  \egroup}
\stopsetups



 \definemakeup
  [toc]
  [
doublesided=no,
page=yes,
bottom=,
top=,
pagestate=start,
headerstate=empty,
footerstate=empty,
setups={toclist},
before=\setups{toc:setups},
  ]
\startsetups toc:setups
  \setupbackgrounds[page][background=color, backgroundcolor=blue]
\stopsetups

 \definemakeup
  [standard]
  [
doublesided=no,
page=right,
pagestate=start,
headerstate=empty,
footerstate=empty,
before=\setups{standard:setups},
  ]

 \startsetups standard:setups
\setupbackgrounds[page][background=color, backgroundcolor=lightgray]
 \stopsetups

 \define\TOC{
  \starttocmakeup
  \stoptocmakeup
 }

\starttext

\startstandardmakeup
  \title{Your Title Here}
\stopstandardmakeup

\startsection[title={Motivation}]
\TOC
\startitemize

\item something cool
\item something else cool

\stopitemize
\stopsection

\startsection[title={Main strands of theory}]
\TOC
\startitemize

\item another cool thing
\item cool too

\stopitemize
\stopsection


\stoptext

Thanks in advance.

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


Re: [NTG-context] Numbered Itemlist With Interruption

2023-04-25 Thread jbf via ntg-context

\startitemize[continue]% THIS SHOULD DO WHAT YOU WANT

\item Picking up where we left off.

\item And all is well.

\stopitemize

Julian

On 26/4/23 13:21, Michael Urban via ntg-context wrote:

I am trying to have two numbered itemizations, with a paragraph in between, 
such that the second list starts where the first left off, without having to 
manually calculate the new start point.  The following does not work, and I do 
not understand why.

Mike


\starttext
\definecounter[mynumber][]
\startitemize[n]
\item The first item.
\item The second item
\item Item number \currentitemnumber{}, the last one.
\setcounter[mynumber][\currentitemnumber]
\stopitemize

The \type{\getnumber[mynumber]} value is \getnumber[mynumber].
\incrementcounter[mynumber]

And now the big finish, start at \getnumber[mynumber]:
\startitemize[n][start=\getnumber[mynumber]] % WHY DOES THIS FAIL?
\item Picking up where we left off.

\item And all is well.
\stopitemize
Done!
\stoptext
___
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] Numbered Itemlist With Interruption

2023-04-25 Thread Michael Urban via ntg-context
I am trying to have two numbered itemizations, with a paragraph in between, 
such that the second list starts where the first left off, without having to 
manually calculate the new start point.  The following does not work, and I do 
not understand why.

Mike


\starttext
\definecounter[mynumber][]
\startitemize[n]
\item The first item.
\item The second item
\item Item number \currentitemnumber{}, the last one.
\setcounter[mynumber][\currentitemnumber]
\stopitemize

The \type{\getnumber[mynumber]} value is \getnumber[mynumber].
\incrementcounter[mynumber]

And now the big finish, start at \getnumber[mynumber]:
\startitemize[n][start=\getnumber[mynumber]] % WHY DOES THIS FAIL? 
\item Picking up where we left off.

\item And all is well.
\stopitemize
Done!
\stoptext
___
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
___


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-19 Thread Carlos via ntg-context
On Sun, Apr 16, 2023 at 01:24:08PM -0300, Jim via ntg-context wrote:
> On Sun, Apr 16, 2023 at 08:28 (-0400), Carlos via ntg-context wrote:
> 
> > On Sat, Apr 15, 2023 at 02:27:56PM -0300, Jim via ntg-context wrote:
> >> In the wiki page https://wiki.contextgarden.net/Indentation there is the
> >> following example:
> 
> >> %
> 
> >> \setupindenting[medium,yes]
> >> \setupitemize[indentnext=auto]
> 
> >>   \startitemize
> >> \item One
> >>   \stopitemize
> 
> >> This paragraph should be indented - due to the blank line after 
> >> \type{\stopitemize}.
> 
> >>   \startitemize
> >> \item Two
> >>   \stopitemize
> >> This paragraph should not be indented.
> 
> >> %
> 
> >> Tragically, the paragraph which claims it should be indented is not, in
> >> both my test and the wiki page itself.
> 
> >> Is this a documentation bug, a ConTeXt bug, or something else yet?
> 
> > I don't know.
> 
> OK, but I wasn't asking you specifically.

Thnt's more than obvious, asshole. Or passive-aggressive asshole.

You're posting it on the mailing list for the users, devs, and
end-users alike to test it out as required and comment or say whatever
they want.

> 
> > Why would it be a documentation bug if it clearly says it should be
> > indented only after the blank line, unless \indent was omitted on purpose
> > while trying to make it look as if the blank line would have any effect
> > after all.  Makes no sense.
> 
> Have you never run into a documentation bug before?  Happy you!
> 
> I see two possibly reasons for a documentation bug here (there might be more):
> (1) The documentation was incorrect at time of writing.  Humans have been
> known to make mistakes.
> (2) The semantics of \setupitemize might have changed since the documentation
> was written, and the change has not yet been reflected in this
> particular piece of documentation.
> This would not be the first time that documentation changes lagged
> behind code changes.
> 

Neither one. 

> The point is, there is a disconnect between the documentation says will
> happen and what actually happens.  I don't know which is wrong, and thus my
> question.  I hope that sooner or later someone who can definitively comment
> on the disconnect will speak up.

I agree. :) 

> 
> > \setupindenting[medium,yes]
> > \setupitemize[indentnext=auto]
> 
> > \starttext
> >   \startitemize
> > \item One
> >   \stopitemize\indent%blank line
> 
> > This paragraph should be indented - due to the blank line after 
> > \type{\stopitemize}.
> 
> >   \startitemize
> > \item Two
> >   \stopitemize
> 
> > \noindent{\dorecurse{10}{\indent This paragraph should not be indented.}}
> > \stoptext
> ___
> 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
> ___
> 

-- 
To err is human -- to blame it on a computer is even more so.

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


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-18 Thread Hans Hagen via ntg-context

On 4/18/2023 3:48 PM, Aditya Mahajan via ntg-context wrote:

On Mon, 17 Apr 2023, Hans Hagen via ntg-context wrote:


On 4/17/2023 7:06 AM, Aditya Mahajan via ntg-context wrote:

On Sun, 16 Apr 2023, Aditya Mahajan via ntg-context wrote:


On Sat, 15 Apr 2023, Jim via ntg-context wrote:


%

\setupindenting[medium,yes]
\setupitemize[indentnext=auto]

\startitemize
  \item One
\stopitemize

This paragraph should be indented - due to the blank line after
\type{\stopitemize}.

\startitemize
  \item Two
\stopitemize
This paragraph should not be indented.

%

Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is
going wrong.


`indentnext=auto` doesn't appear to work for any environment.

can you test with this patch


This works on with the 3-4 test examples that I had but ...


\permanent\protected\protected\def\spac_indentation_check_next_indentation

^

Is that a typo (double \protected)? I tested with a single \protected and that 
also works.

it's a typo .. maybe i should add (for completeness)

\protected\unprotected\protected

(\permanent only kicks in when you are on overload protection mode, 
which I'm always in here)


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
___


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-18 Thread Aditya Mahajan via ntg-context
On Mon, 17 Apr 2023, Hans Hagen via ntg-context wrote:

> On 4/17/2023 7:06 AM, Aditya Mahajan via ntg-context wrote:
> > On Sun, 16 Apr 2023, Aditya Mahajan via ntg-context wrote:
> > 
> >> On Sat, 15 Apr 2023, Jim via ntg-context wrote:
> >>
> >>> %
> >>>
> >>> \setupindenting[medium,yes]
> >>> \setupitemize[indentnext=auto]
> >>>
> >>>\startitemize
> >>>  \item One
> >>>\stopitemize
> >>>
> >>>This paragraph should be indented - due to the blank line after
> >>>\type{\stopitemize}.
> >>>
> >>>\startitemize
> >>>  \item Two
> >>>\stopitemize
> >>>This paragraph should not be indented.
> >>>
> >>> %
> >> Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is
> >> going wrong.
> > 
> > `indentnext=auto` doesn't appear to work for any environment.
> can you test with this patch

This works on with the 3-4 test examples that I had but ...

> \permanent\protected\protected\def\spac_indentation_check_next_indentation
^

Is that a typo (double \protected)? I tested with a single \protected and that 
also works.

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


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-17 Thread Hans Hagen via ntg-context

On 4/17/2023 7:06 AM, Aditya Mahajan via ntg-context wrote:

On Sun, 16 Apr 2023, Aditya Mahajan via ntg-context wrote:


On Sat, 15 Apr 2023, Jim via ntg-context wrote:


%

\setupindenting[medium,yes]
\setupitemize[indentnext=auto]

   \startitemize
 \item One
   \stopitemize

   This paragraph should be indented - due to the blank line after 
\type{\stopitemize}.

   \startitemize
 \item Two
   \stopitemize
   This paragraph should not be indented.

%

Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is going 
wrong.


`indentnext=auto` doesn't appear to work for any environment.

can you test with this patch

\permanent\protected\protected\def\spac_indentation_check_next_indentation
  {\global\enforced\let\dorechecknextindentation\relax
   \begingroup
   \autoparagraphmode\zerocount

\doifelsenextchar\par\endgroup{\endgroup\spac_indentation_variant_no}} % 
messy check as next is seldom \par





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


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-16 Thread Aditya Mahajan via ntg-context
On Sun, 16 Apr 2023, Aditya Mahajan via ntg-context wrote:

> On Sat, 15 Apr 2023, Jim via ntg-context wrote:
> 
> > %
> > 
> > \setupindenting[medium,yes]
> > \setupitemize[indentnext=auto]
> > 
> >   \startitemize
> > \item One
> >   \stopitemize
> > 
> >   This paragraph should be indented - due to the blank line after 
> > \type{\stopitemize}.
> > 
> >   \startitemize
> > \item Two
> >   \stopitemize
> >   This paragraph should not be indented.
> > 
> > %
> Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is 
> going wrong. 

`indentnext=auto` doesn't appear to work for any environment. 

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


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-16 Thread Jim via ntg-context
On Sun, Apr 16, 2023 at 12:35 (-0400), Aditya Mahajan via ntg-context wrote:

> On Sat, 15 Apr 2023, Jim via ntg-context wrote:

>> In the wiki page https://wiki.contextgarden.net/Indentation there is the
>> following example:

>> %

>> \setupindenting[medium,yes]
>> \setupitemize[indentnext=auto]

>>   \startitemize
>> \item One
>>   \stopitemize

>> This paragraph should be indented - due to the blank line after 
>> \type{\stopitemize}.

>>   \startitemize
>> \item Two
>>   \stopitemize
>> This paragraph should not be indented.

>> %

>> Tragically, the paragraph which claims it should be indented is not, in
>> both my test and the wiki page itself.

>> Is this a documentation bug, a ConTeXt bug, or something else yet?

> Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is
> going wrong.

> Aditya (who wrote bulk of that wiki page)

Thanks very much for getting back.  And for your wiki contributions.

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


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-16 Thread Aditya Mahajan via ntg-context
On Sat, 15 Apr 2023, Jim via ntg-context wrote:

> In the wiki page https://wiki.contextgarden.net/Indentation there is the
> following example:
> 
> %
> 
> \setupindenting[medium,yes]
> \setupitemize[indentnext=auto]
> 
>   \startitemize
> \item One
>   \stopitemize
> 
>   This paragraph should be indented - due to the blank line after 
> \type{\stopitemize}.
> 
>   \startitemize
> \item Two
>   \stopitemize
>   This paragraph should not be indented.
> 
> %
> 
> Tragically, the paragraph which claims it should be indented is not, in
> both my test and the wiki page itself.
> 
> Is this a documentation bug, a ConTeXt bug, or something else yet?

Works in mkiv but appears to be a bug in lmtx. I haven't debugged what is going 
wrong. 

Aditya (who wrote bulk of that wiki page)

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


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-16 Thread Jim via ntg-context
On Sun, Apr 16, 2023 at 08:28 (-0400), Carlos via ntg-context wrote:

> On Sat, Apr 15, 2023 at 02:27:56PM -0300, Jim via ntg-context wrote:
>> In the wiki page https://wiki.contextgarden.net/Indentation there is the
>> following example:

>> %

>> \setupindenting[medium,yes]
>> \setupitemize[indentnext=auto]

>>   \startitemize
>> \item One
>>   \stopitemize

>> This paragraph should be indented - due to the blank line after 
>> \type{\stopitemize}.

>>   \startitemize
>> \item Two
>>   \stopitemize
>> This paragraph should not be indented.

>> %

>> Tragically, the paragraph which claims it should be indented is not, in
>> both my test and the wiki page itself.

>> Is this a documentation bug, a ConTeXt bug, or something else yet?

> I don't know.

OK, but I wasn't asking you specifically.

> Why would it be a documentation bug if it clearly says it should be
> indented only after the blank line, unless \indent was omitted on purpose
> while trying to make it look as if the blank line would have any effect
> after all.  Makes no sense.

Have you never run into a documentation bug before?  Happy you!

I see two possibly reasons for a documentation bug here (there might be more):
(1) The documentation was incorrect at time of writing.  Humans have been
known to make mistakes.
(2) The semantics of \setupitemize might have changed since the documentation
was written, and the change has not yet been reflected in this
particular piece of documentation.
This would not be the first time that documentation changes lagged
behind code changes.

The point is, there is a disconnect between the documentation says will
happen and what actually happens.  I don't know which is wrong, and thus my
question.  I hope that sooner or later someone who can definitively comment
on the disconnect will speak up.

> \setupindenting[medium,yes]
> \setupitemize[indentnext=auto]

> \starttext
>   \startitemize
> \item One
>   \stopitemize\indent%blank line

> This paragraph should be indented - due to the blank line after 
> \type{\stopitemize}.

>   \startitemize
> \item Two
>   \stopitemize

> \noindent{\dorecurse{10}{\indent This paragraph should not be indented.}}
> \stoptext
___
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
___


Re: [NTG-context] \setupitemize[indentnext=auto] broken?

2023-04-16 Thread Carlos via ntg-context
On Sat, Apr 15, 2023 at 02:27:56PM -0300, Jim via ntg-context wrote:
> In the wiki page https://wiki.contextgarden.net/Indentation there is the
> following example:
> 
> %
> 
> \setupindenting[medium,yes]
> \setupitemize[indentnext=auto]
> 
>   \startitemize
> \item One
>   \stopitemize
> 
>   This paragraph should be indented - due to the blank line after 
> \type{\stopitemize}.
> 
>   \startitemize
> \item Two
>   \stopitemize
>   This paragraph should not be indented.
> 
> %
> 
> Tragically, the paragraph which claims it should be indented is not, in
> both my test and the wiki page itself.
> 
> Is this a documentation bug, a ConTeXt bug, or something else yet?

I don't know. Why would it be a documentation bug if it clearly says it
should be indented only after the blank line,  unless \indent was omitted on
purpose while trying to make it look as if the blank line would  have
any effect after all. Makes no sense. 

\setupindenting[medium,yes]
\setupitemize[indentnext=auto]

\starttext
  \startitemize
\item One
  \stopitemize\indent%blank line

This paragraph should be indented - due to the blank line after 
\type{\stopitemize}.

  \startitemize
\item Two
  \stopitemize
  
\noindent{\dorecurse{10}{\indent This paragraph should not be indented.}}
\stoptext


> 
> Cheers.
> 
> Jim
> ___
> 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
> ___
> 

-- 
101 USES FOR A DEAD MICROPROCESSOR
(1)  Scarecrow for centipedes
(2)  Dead cat brush
(3)  Hair barrettes
(4)  Cleats
(5)  Self-piercing earrings
(6)  Fungus trellis
(7)  False eyelashes
(8)  Prosthetic dog claws
.
.
.
(99)  Window garden harrow (pulled behind Tonka tractors)
(100) Killer velcro
(101) Currency

___
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] https://wiki.contextgarden.net/Enumerations problem

2023-04-15 Thread Jim via ntg-context
In https://wiki.contextgarden.net/Enumerations there is this example:

%

\setupwhitespace[big]
\definesymbol[1][$\triangleright$]
\startcolumns
{\bf joinedup:}\par before \startitemize[joinedup]  
  \item test \item test \stopitemize after \par
{\bf nowhite:} \par before \startitemize[nowhite]   
  \item test \item test \stopitemize after \par
{\bf joinedup,nowhite:}\par before \startitemize[joinedup,nowhite]  
  \item test \item test \stopitemize after \column
{\bf joinedup,nowhite,before:} \par before 
\startitemize[joinedup,nowhite,before] \item test \item test \stopitemize after 
\par
{\bf joinedup,nowhite,after:}  \par before 
\startitemize[joinedup,nowhite,after]  \item test \item test \stopitemize after
\stopcolumns

%

In my test "joinedup" leaves whitespace before the first list item and
after the last, but in the sample output there is no space.


While someone (?) is thinking about that, my (extremely rudimentary!) tests
also indicate that there is no need to use "joinedup" when you use "nowhite".
Is this indeed the case (in which case the wiki page could use an edit) or
are there case where both "joinedup" and "nowhite" are needed together (in
which case the wiki page could stand a little more information).

Thanks.

Jim
___
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] \setupitemize[indentnext=auto] broken?

2023-04-15 Thread Jim via ntg-context
In the wiki page https://wiki.contextgarden.net/Indentation there is the
following example:

%

\setupindenting[medium,yes]
\setupitemize[indentnext=auto]

  \startitemize
\item One
  \stopitemize

  This paragraph should be indented - due to the blank line after 
\type{\stopitemize}.

  \startitemize
\item Two
  \stopitemize
  This paragraph should not be indented.

%

Tragically, the paragraph which claims it should be indented is not, in
both my test and the wiki page itself.

Is this a documentation bug, a ConTeXt bug, or something else yet?

Cheers.

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


Re: [NTG-context] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Am Montag, 6. März 2023, 14:34:28 CET schrieb Aditya Mahajan via ntg-context:
> On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote:
> 
> > Hi,
> > 
> > I'm trying to use a description environment in conjunction with an
> > itemize with the latest luametatex. Is this supposed to work?
> > 
> > Here is an MWE:
> > ```
> > \definedescription[desc][headstyle=bold]
> > 
> > \starttext
> > Foo
> > 
> > \desc{Some title} Some text
> > \startitemize
> > \item Some item
> > \stopitemize
> > 
> > \stoptext
> 
> Use \startdesc ... \stopdesc
> 
> \definedescription[desc][headstyle=bold]
> 
> \starttext
> Foo
> 
> \startdesc[title={Some title}]
>   Some text
> \startitemize
> \item Some item
> \stopitemize
> \stopdesc
> 
> \stoptext

That worked. Thank you!


signature.asc
Description: This is a digitally signed message part.
___
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
___


Re: [NTG-context] Description together with itemize, luametatex

2023-03-06 Thread Aditya Mahajan via ntg-context
On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote:

> Hi,
> 
> I'm trying to use a description environment in conjunction with an
> itemize with the latest luametatex. Is this supposed to work?
> 
> Here is an MWE:
> ```
> \definedescription[desc][headstyle=bold]
> 
> \starttext
> Foo
> 
> \desc{Some title} Some text
>   \startitemize
>   \item Some item
>   \stopitemize
> 
> \stoptext

Use \startdesc ... \stopdesc

\definedescription[desc][headstyle=bold]

\starttext
Foo

\startdesc[title={Some title}]
  Some text
\startitemize
\item Some item
\stopitemize
\stopdesc

\stoptext

___
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] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Hi,

I'm trying to use a description environment in conjunction with an
itemize with the latest luametatex. Is this supposed to work?

Here is an MWE:
```
\definedescription[desc][headstyle=bold]

\starttext
Foo

\desc{Some title} Some text
\startitemize
\item Some item
\stopitemize

\stoptext
```

This currently fails with:
```
resolvers   | formats | executing runner 'run luametatex format': 
/home/gerion/context/tex/texmf-linux-64/bin/luametatex --jobname="./test.tex" 
--fmt=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/gerion/context/tex/texmf-linux-64/bin"
system  >
system  > ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.3.4  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './test', input './test.tex', result './test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern rm 12pt' is loaded
lua error   > lua error on line 8 in file ./test.tex:

registered function call [809]: 
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: attempt to 
index a nil value (local 'd')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:442>
(...tail calls...)
 1 \definedescription[desc][headstyle=bold]
 2
 3 \starttext
 4 Foo
 5
 6 \desc{Some title} Some text
 7  \startitemize
 8 >>   \item Some item
 9  \stopitemize
10
11 \stoptext
12
mtx-context | fatal error: return code: 1
```

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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
___


Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread Otared Kavian via ntg-context
Hi,

Indeed you are right. However, Hans said the feature would be added in the next 
update: so you have to wait a little bit :-)

Best regards: Otared


> On 27 Feb 2023, at 12:33, Jan-Erik Hägglöf via ntg-context 
>  wrote:
> 
> I tested the code and the separator didn’t show up
> 
> \mainlanguage[sv]
> 
> \setupbodyfont[12pt]
> 
> \defineitemgroup
>   [fooditems]
> 
> \setupitemgroup
>   [fooditems]
>   [each]
>   [none,text]
>   [textseparator=,]
> 
> \starttext
> 
> \startfooditems
> \item fish
> \item eggs
> \item milk
> \stopfooditems
> 
> \stoptext
> 
> 
> 
> 
>> 26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context > <mailto:ntg-context@ntg.nl>>:
>> 
>> On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
>>> I have a list like this:
>>> \startitemize[1]
>>> \item fish
>>> \item eggs
>>> \item milk
>>> \stopitemize
>>> Is there any command in ConTeXt to make this display the items as a 
>>> comma-separated list, like this:
>>> fish, eggs, milk
>>> Or a semi-colon-separated list?
>>> fish; eggs; milk
>> In the next update you can set a textseparator.
>> 
>> \starttext
>> 
>> \startitemize[none,text][textseparator=;]
>>\item fish
>>    \item eggs
>>\item milk
>> \stopitemize
>> 
>> \defineitemgroup
>>  [fooditems]
>> 
>> \setupitemgroup
>>  [fooditems]
>>  [each]
>>  [none,text]
>>  [textseparator=;]
>> 
>> \blank[2*line]
>> 
>> \startfooditems
>>\item fish
>>\item eggs
>>\item milk
>> \stopfooditems
>> 
>> \stoptext
>> 
>> -
>>  Hans Hagen | PRAGMA ADE
>>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
>> www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / 
>> https://www.ntg.nl/mailman/listinfo/ntg-context 
>> <https://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : https://contextgarden.net <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
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




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


Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread Jan-Erik Hägglöf via ntg-context
I added the braces but still no difference, still empty between items


Jan-Erik Hägglöf
skrantajanne...@gmail.com

ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.2.27  int: english/english

> 27 feb. 2023 kl. 12:53 skrev mf via ntg-context :
> 
> \setupitemgroup
>[fooditems]
>[each]
>[none,text]
>[textseparator={,}]
> 
> Comma is used to separate options; if you don't use braces, it means that the 
> textseparator is set to the empty string.
> 
> Massi
> 
> Il 27/02/23 12:33, Jan-Erik Hägglöf via ntg-context ha scritto:
>> I tested the code and the separator didn’t show up
>> \mainlanguage[sv]
>> \setupbodyfont[12pt]
>> \defineitemgroup
>>   [fooditems]
>> \setupitemgroup
>>   [fooditems]
>>   [each]
>>   [none,text]
>>   [textseparator=,]
>> \starttext
>> \startfooditems
>> \item fish
>> \item eggs
>> \item milk
>> \stopfooditems
>> \stoptext
>>> 26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context >> <mailto:ntg-context@ntg.nl> <mailto:ntg-context@ntg.nl 
>>> <mailto:ntg-context@ntg.nl>>>:
>>> 
>>> On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
>>>> I have a list like this:
>>>> \startitemize[1]
>>>> \item fish
>>>> \item eggs
>>>> \item milk
>>>> \stopitemize
>>>> Is there any command in ConTeXt to make this display the items as a 
>>>> comma-separated list, like this:
>>>> fish, eggs, milk
>>>> Or a semi-colon-separated list?
>>>> fish; eggs; milk
>>> In the next update you can set a textseparator.
>>> 
>>> \starttext
>>> 
>>> \startitemize[none,text][textseparator=;]
>>>\item fish
>>>\item eggs
>>>\item milk
>>> \stopitemize
>>> 
>>> \defineitemgroup
>>>  [fooditems]
>>> 
>>> \setupitemgroup
>>>  [fooditems]
>>>  [each]
>>>  [none,text]
>>>  [textseparator=;]
>>> 
>>> \blank[2*line]
>>> 
>>> \startfooditems
>>>\item fish
>>>\item eggs
>>>\item milk
>>> \stopfooditems
>>> 
>>> \stoptext
>>> 
>>> -
>>>  Hans Hagen | PRAGMA ADE
>>>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> 
>>> <http://www.pragma-ade.nl <http://www.pragma-ade.nl/>> | www.pragma-pod.nl 
>>> <http://www.pragma-pod.nl/><http://www.pragma-pod.nl 
>>> <http://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 <mailto:ntg-context@ntg.nl> 
>>> <mailto:ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> / 
>>> https://www.ntg.nl/mailman/listinfo/ntg-context 
>>> <https://www.ntg.nl/mailman/listinfo/ntg-context><https://www.ntg.nl/mailman/listinfo/ntg-context
>>>  <https://www.ntg.nl/mailman/listinfo/ntg-context>>
>>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> 
>>> <https://www.pragma-ade.nl <https://www.pragma-ade.nl/>> / 
>>> http://context.aanhet.net 
>>> <http://context.aanhet.net/><http://context.aanhet.net 
>>> <http://context.aanhet.net/>>
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>> <https://bitbucket.org/phg/context-mirror/commits/> 
>>> <https://bitbucket.org/phg/context-mirror/commits/ 
>>> <https://bitbucket.org/phg/context-mirror/commits/>>
>>> wiki : https://contextgarden.net <https://contextgarden.net/> 
>>> <https://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
>> https://www.ntg.nl/mailman/listinfo/ntg-conte

Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread mf via ntg-context

\setupitemgroup
[fooditems]
[each]
[none,text]
[textseparator={,}]

Comma is used to separate options; if you don't use braces, it means 
that the textseparator is set to the empty string.


Massi

Il 27/02/23 12:33, Jan-Erik Hägglöf via ntg-context ha scritto:

I tested the code and the separator didn’t show up

\mainlanguage[sv]

\setupbodyfont[12pt]

\defineitemgroup
   [fooditems]

\setupitemgroup
   [fooditems]
   [each]
   [none,text]
   [textseparator=,]

\starttext

\startfooditems
     \item fish
     \item eggs
     \item milk
\stopfooditems

\stoptext




26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context 
mailto:ntg-context@ntg.nl>>:


On 2/25/2023 5:01 PM, Joel via ntg-context wrote:

I have a list like this:
\startitemize[1]
\item fish
\item eggs
\item milk
\stopitemize
Is there any command in ConTeXt to make this display the items as a 
comma-separated list, like this:

fish, eggs, milk
Or a semi-colon-separated list?
fish; eggs; milk

In the next update you can set a textseparator.

\starttext

\startitemize[none,text][textseparator=;]
   \item fish
   \item eggs
   \item milk
\stopitemize

\defineitemgroup
 [fooditems]

\setupitemgroup
 [fooditems]
 [each]
 [none,text]
 [textseparator=;]

\blank[2*line]

\startfooditems
   \item fish
   \item eggs
   \item milk
\stopfooditems

\stoptext

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

wiki : https://contextgarden.net <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
___


Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread Jan-Erik Hägglöf via ntg-context
I tested the code and the separator didn’t show up\mainlanguage[sv]\setupbodyfont[12pt]\defineitemgroup  [fooditems]\setupitemgroup  [fooditems]  [each]  [none,text]  [textseparator=,]\starttext\startfooditems    \item fish    \item eggs    \item milk\stopfooditems\stoptext

test.log
Description: Binary data


test.pdf
Description: Adobe PDF document


test.tex
Description: Binary data
26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context <ntg-context@ntg.nl>:On 2/25/2023 5:01 PM, Joel via ntg-context wrote:I have a list like this:\startitemize[1]\item fish\item eggs\item milk\stopitemizeIs there any command in ConTeXt to make this display the items as a comma-separated list, like this:fish, eggs, milkOr a semi-colon-separated list?fish; eggs; milkIn the next update you can set a textseparator.\starttext\startitemize[none,text][textseparator=;]    \item fish    \item eggs    \item milk\stopitemize\defineitemgroup  [fooditems]\setupitemgroup  [fooditems]  [each]  [none,text]  [textseparator=;]\blank[2*line]\startfooditems    \item fish    \item eggs    \item milk\stopfooditems\stoptext-  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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : 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
___


  1   2   3   4   5   6   7   8   9   10   >