[NTG-context] Re: How to disable hyphenation at the end of a line?

2024-05-19 Thread Mikael Sundqvist
Hi,

since it has to do with paragraph building and not with certain breaks
it is controlled by a demerits rather than a penalty, and there is, as
far as I know, no value that explicitly prohibits a hyphen at the last
line specifically (you can set the hyphenpenalty to 1 to avoid
hyphenations everywhere). In the total demerits calculation penalties
are more or less squared, so setting

\finalhyphendemerits

to a ridiculously high value might do, for most paragraphs.

/Mikael

On Mon, May 20, 2024 at 3:33 AM Joel via ntg-context  wrote:
>
> I'm using mostly default ConTeXt settings, but an editor has warned I should 
> avoid using hyphenation at the end of lines--at least for my particular 
> audience.
>
> I've found manual text that says how to disable specific words from being 
> hyphenated.
>
> Is there a whole-document switch to disable it?
>
> --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
> ___
___
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: Metapost limitation ?

2024-05-12 Thread Mikael Sundqvist
Hi,

On Sun, May 12, 2024 at 6:24 PM Fabrice Couvreur <
fabrice1.couvr...@gmail.com> wrote:
>
> With Okular, it works !

Very good. You can still try the thing below:

\startluacode
  local exp = math.exp
  local N   = 1000
  local xstep  = 1.6/N
  local ystep  = 1.8/N
  local xmin   = 0.3
  local ymin   = 0.4

  local function f(x,y)
local x = xstep*x - xmin
local y = ystep*y - ymin
local z = x + exp(-60*x) - y
if z > 0 then
  return '1'
else
  return '0'
end
  end

  potrace.setbitmap("mybitmap", potrace.contourplot(N,N,f))
\stopluacode

\startMPpage[offset=1dk]
  path p ; p := lmt_potraced [
stringname = "mybitmap",
value  = "1",
tolerance  = 0.1,
threshold  = 0.2,
optimize   = true,
  ] ;
  p := p xsized 10cm ;
  draw p withpen pencircle scaled 5 withcolor "darkblue" ;
  drawpoints p withcolor "orange" ;
  drawpointlabels p ;
  p := subpath(6,19) of p ;
  draw p withpen pencircle scaled 3 withcolor "yellow" ;
\stopMPpage

Another thing, Hans added nocycle, so you can write your loop if you want
to use it as something like

  def compute_curve(suffix f)(expr xmin, xmax, xinc) =
  for x=xmin step xinc until xmax:
   (x,f(x)) ..
  endfor nocycle ;
  enddef;

Then you do not need to think about the first and/or last point separately.
___
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: Why is this description environment not showing the correct title?

2024-05-05 Thread Mikael Sundqvist
Hi

On Sun, May 5, 2024 at 4:40 PM Joel via ntg-context  wrote:
>
>
> \definedescription[latexdesc][headstyle=bold, style=normal, align=flushleft, 
> alternative=hanging, width=broad, margin=1cm]
>
> \starttext
>
> \latexdesc{1540} some event happened
> \latexdesc{1541} some other event happened
> \latexdesc{1542} some event happened quite different
>
> \stoptext
>
>
> I found the above code (the first line) in the ConTeXt Wiki, as a way to 
> create the equivalent of a desc environment from LaTeX. The items inside {} 
> should be bold, then there is a gap before the next text.
>
> I am using this to display a simple timeline.
>
> Though the formatting looks perfect, very strangely when I compile it, it 
> changes all of the dates to say "1540" (or whatever date was used first).
>
> Why is it showing the wrong title on the desc environment?
>
> --Joel

I don't know how you want it to look, exactly, but ending the
paragraph helps with the numbering. There is also a start/stop version
that suggests a bit more structure.

\definedescription
  [latexdesc]
  [headstyle=bold,
   style=normal,
   align=flushleft,
   alternative=hanging,
   width=broad,
   margin=1cm]

\starttext

\latexdesc{1540} some event happened

\latexdesc{1541} some other event happened

\latexdesc{1542} some event happened quite different

\startlatexdesc
  [title={1540}]
  some event happened
\stoplatexdesc

\startlatexdesc
  [title={1541}]
  some other event happened
\stoplatexdesc

\startlatexdesc
  [title={1542}]
  some event happened quite different
\stoplatexdesc

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://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: kpfonts

2024-04-20 Thread Mikael Sundqvist
Hi,

On Sat, Apr 20, 2024 at 2:03 PM Xavier B.  wrote:
>
> Hi,
>
> Just a courious: is there kpfonts available for context?
> I love kpfonts.
>
> Thanks in advance,
> Xavier

Yes, just download the fonts and do

\setupbodyfont[kpfonts]

/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] Re: Most recent context doesn't like synctex?

2024-04-15 Thread Mikael Sundqvist
Hi,

On Sun, Apr 14, 2024 at 12:00 PM 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?

I think you shall test them according to what they specify, that should work.

I think at Hans' place sumatra worked already with state=start.

Here we tried zathura, okular, they work. I think evince did not
really work (maybe with some dbus thing, but we did not really try it
out). For qpdfview, mupdf, sioyek and maybe some more I do not
remember if it worked in the end. But also the viewers change, so at
your place they might have different versions of the libraries, and
... a bit messy.

I think one should try state=start, and if that is not working, try
state=repeat. If that is not working either, I don't know. It was not
so easy to understand the format and how it is supposed to work.

/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] Re: Most recent context doesn't like synctex?

2024-04-13 Thread Mikael Sundqvist
Hi,

On Sat, Apr 13, 2024 at 7:54 PM Jim  wrote:
>
> Thanks for the quick reply.
>
> On Sat, Apr 13, 2024 at 09:18 (+0200), Hans Hagen wrote:
>
> > On 4/13/2024 12:39 AM, Jim wrote:
> >> Hi,
>
> >> I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
> >> system.
>
> >> Recently, the stand-alone ConTeXt distribution seems to not create a
> >> synctex file any more.  Specifically,
>
> >>  /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
> >> --synctex=1 --nonstop file.tex
>
> >> does not create a .synctex file (and deletes it, if it is there), whereas
> >> the TeXlive version
>
> >>  /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
> >> --synctex=1 --nonstop nwg_newsletter_2024_04.tex
>
> >> does create the .synctex file.
>
>
> >> The ConTeXt distribution version *does* create the file if --nonstop is
> >> *not* used.  Knowing that, I can work around this for now, although
> >> emacs+auctex probably won't be happy without --nonstop.
>
> >> I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
> >> that.
>
> >> Is this a bug introduced by some recent change?
>
> > it's more a feature
>
> I guess one person's bug is another person's feature.  :-)
>
> > - Mikael S and i spend some time with editor/viewer combinations on linux in
> > order to find ways around the different synctex libs that they use
>
> > - as a result we could make most work ok
>
> Are these recent changes?  And should emacs+auctex+PDFview work now?

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. After some debugging, our conclusion
was that different versions of the library/application were used, or
different approaches. We found a way to generate the stuff in the pdf
to make it work for the failing viewers we had. Hans did then not
replace this with the old approach, since then the previously working
viewers might break. He therefore added repeat as a key, so
\setupsynctex[state=repeat] will use the new approach.

>
> > - we assume that synctex is set up in the document with
>
> > \setupsynctex[state=start]
> > \setupsynctex[state=repeat] % less efficient but gets around issue
>
> I haven't been using either of those, since auctex does The Right Thing for
> me.  Or, at least, it used to.
>
> > - when context is run 'headless' (on a server) it's often done in
> > batchmode because one knows that the style works and in that case synctex
> > makes no sense so we disable it; this avoids the need to patch the style
>
> I (think I) see what you are saying, but if one explicitly uses --synctex
> on the command line, should that not over-ride the over-ride?  Or, put
> another way, would the following not make sense:
> if --synctex is used on the command line
> create synctex file
> else if --nonstop is used on the command line
> do not create the synctex file
> else if \setupsynctex[...] is used in the source file
> create the synctex file
> else
> do not create the synctex file
>
> > - the manual has been updates

workflows-synctex.tex now suggests:

"When your viewer doesn't return to the editor, you can try

\starttyping
\setupsynctex[state=repeat]
\stoptyping

or

\starttyping
context --synctex=repeat somefile.tex
\stoptyping

This will give a bit larger file that tries to fool the areas resolver in the
library that the viewer uses."

/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] Re: error with \sc

2024-04-02 Thread Mikael Sundqvist
Hi,

On Tue, Apr 2, 2024 at 9:16 PM Peter Münster  wrote:
>
> Hi,
>
> With ConTeXt version 2024.04.01, the \sc command produces an error:
>
> fonts   > preloading latin modern fonts (second stage)
> fonts   > 'fallback modern rm 12pt' is loaded
> pages   > flushing realpage 1, userpage 1, subpage 1
> close source> level 1, order 3, name './test.tex'
> backend > xmp > using file 
> '/opt/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
> mtx-context | fatal error: return code: 1
>
> Test file:
>   \starttext
>   \sc test
>   \stoptext
>
> Is this a bug, or some misconfiguration of my installation?
>
> TIA for any hints,

Hans wrote in his email:
-- 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).

Did you do that? (One way is to remove tex/texmf-cache/*)

Your file works here.

/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] 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] Re: Mikael’s missing math manual

2024-03-18 Thread Mikael Sundqvist
Hi,

On Sun, Mar 17, 2024 at 10:57 PM Hraban Ramm  wrote:
>
> … and another thing that came up in my workshops and in discussions at
> our booth: the math manual is eagerly awaited! (My book too, but I can’t
> answer most questions about math.)

Oh, I see. So, I should really try to get something out. It is
difficult to find enough time working on it, in particular since Hans
is always adding new (not only math) stuff, but I will try. It is fun
to participate in the development, and I do not want to delay it
(somebody has to push him and test, and so on...)

But I should probably get something out, even if that is not really
finished/polished. All the basics are there. Then it can be a
work-in-progress document, adding/modifying new stuff.

>
> One participant tested some math alignment examples from an older paper
> by Aditya and found them working in her current LMTX installation but
> not in COW – I know it runs an older version, but Aditya’s article was
> even older…

There have been many changes along the way, and maybe at some time
some things were not really working, but later fixed.

/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] Re: \intertext and highlighting with \alignhere/\breakhere

2024-03-13 Thread Mikael Sundqvist
Hi,

On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff  wrote:
>
> Hi Hans,
>
> On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote:
> > the next upload will support the attached ... so no ugly hacky code needed
>
> "\texthere[inbetween]" looks perfect, thanks!
>
> The "\definebar[...][inlined]" doesn't look quite right though -- the
> issue that I'm having is that I can't figure out how to highlight across
> both sides of an \alignhere without any questionable hacks. Unless the
> new "inlined" does work across an \alignhere and I'm just not seeing it
> in the example.
>
> Thanks again,
> -- Max

I can confirm that it works over \alignhere. Hans is doing some black
magic, but I guess he did not want to show off by including the whole
line.

/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] 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] Re: \mfunction does not work with the latest upload

2024-02-27 Thread Mikael Sundqvist
Hi,

\definemathfunction [lcd]

You can also add
[mathlimits=yes]
[mathlimits=no]
[mathlimits=auto]

if you want the limits to go always below, never below or below in
display, respectively.

/Mikael

On Wed, Feb 28, 2024 at 1:26 AM fv leung  wrote:
>
>
> \starttext
> % copy from wiki
> \definemathcommand[lcd][nolop]{\mfunction{lcd}}
>
> With \contextversion, the math command \tex{lcd} gives \m{\lcd} (nothing)!
>
> \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
> ___
___
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: Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Mikael Sundqvist
Hi,

Try

\startTEXpage[pagestate=start]

/Mikael

On Mon, Feb 19, 2024 at 2:31 PM Emanuel Han via ntg-context
 wrote:
>
>  I just made a strange observation in the output pdf of the attached 
> layer_set.tex, which is that when opening it with a pdf viewer like skim or 
> macos preview and showing miniatures, all pages except the last one show page 
> number 1 (the last showing page number 2).
>
> Which was not the case with the output pdf of the attached 
> multipage_metapost_mwe-very_simple.tex.
>
> How can I change my code to have proper consecutive page numbering in a pdf 
> viewer?
>
> On Feb. 17 2024, at 11:03 am, Emanuel Han via ntg-context 
>  wrote:
>
> I think I could solve all the problems. Attached the finalized working 
> example. I created the 
> https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages entry 
> with it. Feel free to modify.
>
> Cheers
> Emanuel
>
> On Feb. 16 2024, at 7:56 am, Mikael Sundqvist  wrote:
>
> Hi,
>
> not sure I get what you are missing. But you can try
>
> setbounds currentpicture to (fullsquare scaled 200) ;
>
> in base. And then do
>
> \dorecurse{5}{
> \startTEXpage[offset=1DK]
> \useMPgraphic{layerset#1}
> \stopTEXpage
> }
>
> if that is the looping you are after.
>
> /Mikael
>
> On Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context
>  wrote:
> >
> > Resp. the solution should be such that each generated PDF page has the same 
> > dimension, the same background colour and a page number and the metapost 
> > content on each page has the same scaling factor.
> >
> > On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context 
> >  wrote:
> >
> > Dear Mikael,
> >
> > I actually need to keep the \dorecurse mechanism of the mwe (from line 44 
> > on), because I need the "setbounds currentpicture to TheFrame" and also 
> > because I need page numbering inside the MPpage, as done with draw 
> > textext(decimal(currentime)).
> >
> > So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, 
> > assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.?
> >
> > Emanuel
> >
> > On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context 
> >  wrote:
> >
> > Dear Mikael,
> > thanks a lot!
> > this seems to be the solution! And it looks beatiful enough to me 
> > I'll try to port all my layers to this new method and see if I run into new 
> > problems again 
> >
> > Emanuel
> >
> >
> > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist  wrote:
> >
> > Hi
> >
> > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context
> >  wrote:
> > >
> > > Dear list,
> > >
> > > the attached .tex file is the minimal working example we discussed today 
> > > in the online meeting.
> > >
> > > I realized that the approach of looping through k of p[k] is not fitting 
> > > my needs, because it's not flexible enough.
> > >
> > > I need another approach, one which works with layer sets.
> > >
> > > I would stop using p as an array, because with the layer sets approach we 
> > > don't have a fixed order of the layers.
> > >
> > > So the definition of the layers would be something like
> > >
> > > picture layerA;
> > > layerA:=image(
> > > label("Word 1", z1);
> > > );
> > >
> > > picture layerW;
> > > layerW:=image(
> > > label("Mot 2", z2);
> > > );
> > >
> > > picture layerM;
> > > layerM:=image(
> > > label("Parola 3", z3);
> > > );
> > >
> > > picture layerC;
> > > layerC:=image(
> > > label("Wort 4", z3+z1);
> > > );
> > >
> > > picture layerY;
> > > layerY:=image(
> > > label("Nummer 5", z2+z3);
> > > );
> > >
> > > picture layerU;
> > > layerU:=image(
> > > label("number 6", z2+z1);
> > > );
> > >
> > > After that, I would define layer sets and layer subsets. This will be 
> > > done manually for each layer set and each layer subset.
> > > I don't know the proper syntax to do that. Let's assume we could use a 
> > > variable type called "myset".
> > >
> > > myset layersubsetGamma;
> > > layersubsetGamma:={layerU,layerM};
> > >
> > > In my logic, the layers will be drawn i

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Mikael Sundqvist
Hi,

not sure I get what you are missing. But you can try

setbounds currentpicture to (fullsquare scaled 200) ;

in base. And then do

\dorecurse{5}{
\startTEXpage[offset=1DK]
\useMPgraphic{layerset#1}
\stopTEXpage
}

if that is the looping you are after.

/Mikael

On Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context
 wrote:
>
> Resp. the solution should be such that each generated PDF page has the same 
> dimension, the same background colour and a page number and the metapost 
> content on each page has the same scaling factor.
>
> On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context 
>  wrote:
>
> Dear Mikael,
>
> I actually need to keep the \dorecurse mechanism of the mwe (from line 44 
> on), because I need the "setbounds currentpicture to TheFrame" and also 
> because I need page numbering inside the MPpage, as done with draw 
> textext(decimal(currentime)).
>
> So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, 
> assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.?
>
> Emanuel
>
> On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context 
>  wrote:
>
> Dear Mikael,
> thanks a lot!
> this seems to be the solution! And it looks beatiful enough to me 
> I'll try to port all my layers to this new method and see if I run into new 
> problems again 
>
> Emanuel
>
>
> On Feb. 15 2024, at 8:19 am, Mikael Sundqvist  wrote:
>
> Hi
>
> On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context
>  wrote:
> >
> > Dear list,
> >
> > the attached .tex file is the minimal working example we discussed today in 
> > the online meeting.
> >
> > I realized that the approach of looping through k of p[k] is not fitting my 
> > needs, because it's not flexible enough.
> >
> > I need another approach, one which works with layer sets.
> >
> > I would stop using p as an array, because with the layer sets approach we 
> > don't have a fixed order of the layers.
> >
> > So the definition of the layers would be something like
> >
> > picture layerA;
> > layerA:=image(
> > label("Word 1", z1);
> > );
> >
> > picture layerW;
> > layerW:=image(
> > label("Mot 2", z2);
> > );
> >
> > picture layerM;
> > layerM:=image(
> > label("Parola 3", z3);
> > );
> >
> > picture layerC;
> > layerC:=image(
> > label("Wort 4", z3+z1);
> > );
> >
> > picture layerY;
> > layerY:=image(
> > label("Nummer 5", z2+z3);
> > );
> >
> > picture layerU;
> > layerU:=image(
> > label("number 6", z2+z1);
> > );
> >
> > After that, I would define layer sets and layer subsets. This will be done 
> > manually for each layer set and each layer subset.
> > I don't know the proper syntax to do that. Let's assume we could use a 
> > variable type called "myset".
> >
> > myset layersubsetGamma;
> > layersubsetGamma:={layerU,layerM};
> >
> > In my logic, the layers will be drawn in the order of their appearance 
> > within the {}. In the example, drawn content of layerM might cover drawn 
> > content of layerU.
> >
> > Contrary to a layer subset, each layer set will result in a PDF page, and 
> > thus the layer sets are related to each other by an inner order. That's why 
> > I would use an array variable here with [].
> >
> > I don't know how to append a set. In the following example, I assumed there 
> > would be a function myappend(,  > set should be appended with>)
> >
> > myset layerset[];
> > layerset1 := {layerW,layerA};
> > layerset2 := myappend{layerset1, layerY};
> > layerset3 := myappend{layerset2, layersubsetGamma};
> > layerset4 := myappend{layerset2, layerU};
> > layerset5 := myappend{layerset4, layersubsetGamma};
> >
> > Finally, I would need each layerset[k] typeset on its own pdf page. And of 
> > course on each page k, only the layers which appear in the definition of 
> > the layerset[k] should be drawn on top of each other in the order as they 
> > appear in that definition.
> >
> > I'm very curious to hear your suggestions.
> >
>
> Not beautiful, perhaps, but maybe something like this could work? I
> think there is no way out of doing some manual work to tell what you
> want included on each page.
>
> \startuseMPgraphic{base}
> z1 = origin ;
> z2 = (10,50) ;
> z3 = (40,30) ;
>
> picture layerA;
> layerA:=image(
> label("Word 1", z1);

[NTG-context] Re: upload

2024-02-15 Thread Mikael Sundqvist
Hi,

The 5.5 seems to come from https://github.com/lua/lua/blob/master/lua.h

/Mikael

On Thu, Feb 15, 2024 at 10:04 AM luigi scarso  wrote:
>
> On Wed, 14 Feb 2024 at 13:47, Hans Hagen  wrote:
> >
> > Hi,
> >
> > as we're around texlive code freeze time we're also in upload mode
> >
> > - i uploaded a new lmtx
> > - i also added linux and windows 32 bin (as it seems to have users)
> >
> > - we're now using lua 5.5 which has one restriction (was already
> > announced a while ago):
>
> hm, I don't see lua 5.5 around ... perhaps Lua 5.4.5 ?
>
> --
> luigi
> ___
> 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: An announcement of my new book.

2024-02-15 Thread Mikael Sundqvist
Hi,

This small example from BachoTeX 2023 could perhaps be useful for
someone: https://github.com/mpsmath/stepbystep

/Mikael

On Thu, Feb 15, 2024 at 8:31 AM Jan Ulrich Hasecke via ntg-context
 wrote:
>
> Hi,
>
> Am 14.02.24 um 19:45 schrieb Sir Coleman via ntg-context:
>
> I wanted to create more of a reference, a complete reference, and one that's 
> of course not meant to be read from cover to cover.
>
>
> I think that setup-en.pdf is a good starting point for a complete reference 
> as it contains the commands and their options. With added explanations and 
> examples it would be a great reference to beginners.
>
> juh
>
> ___
> 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: Working with layer sets with Metapost

2024-02-14 Thread Mikael Sundqvist
Hi

On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context
 wrote:
>
> Dear list,
>
> the attached .tex file is the minimal working example we discussed today in 
> the online meeting.
>
> I realized that the approach of looping through k of p[k] is not fitting my 
> needs, because it's not flexible enough.
>
> I need another approach, one which works with layer sets.
>
> I would stop using p as an array, because with the layer sets approach we 
> don't have a fixed order of the layers.
>
> So the definition of the layers would be something like
>
> picture layerA;
> layerA:=image(
> label("Word 1", z1);
> );
>
> picture layerW;
> layerW:=image(
> label("Mot 2", z2);
> );
>
> picture layerM;
> layerM:=image(
> label("Parola 3", z3);
> );
>
> picture layerC;
> layerC:=image(
> label("Wort 4", z3+z1);
> );
>
> picture layerY;
> layerY:=image(
> label("Nummer 5", z2+z3);
> );
>
> picture layerU;
> layerU:=image(
> label("number 6", z2+z1);
> );
>
> After that, I would define layer sets and layer subsets. This will be done 
> manually for each layer set and each layer subset.
> I don't know the proper syntax to do that. Let's assume we could use a 
> variable type called "myset".
>
> myset layersubsetGamma;
> layersubsetGamma:={layerU,layerM};
>
> In my logic, the layers will be drawn in the order of their appearance within 
> the {}. In the example, drawn content of layerM might cover drawn content of 
> layerU.
>
> Contrary to a layer subset, each layer set will result in a PDF page, and 
> thus the layer sets are related to each other by an inner order. That's why I 
> would use an array variable here with [].
>
> I don't know how to append a set. In the following example, I assumed there 
> would be a function myappend(,  should be appended with>)
>
> myset layerset[];
> layerset1 := {layerW,layerA};
> layerset2 := myappend{layerset1, layerY};
> layerset3 := myappend{layerset2, layersubsetGamma};
> layerset4 := myappend{layerset2, layerU};
> layerset5 := myappend{layerset4, layersubsetGamma};
>
> Finally, I would need each layerset[k] typeset on its own pdf page. And of 
> course on each page k, only the layers which appear in the definition of the 
> layerset[k] should be drawn on top of each other in the order as they appear 
> in that definition.
>
> I'm very curious to hear your suggestions.
>

Not beautiful, perhaps, but maybe something like this could work? I
think there is no way out of doing some manual work to tell what you
want included on each page.

\startuseMPgraphic{base}
z1 = origin ;
z2 = (10,50) ;
z3 = (40,30) ;

picture layerA;
layerA:=image(
label("Word 1", z1);
);

picture layerW;
layerW:=image(
label("Mot 2", z2);
);

picture layerM;
layerM:=image(
label("Parola 3", z3);
);

picture layerC;
layerC:=image(
label("Wort 4", z3+z1);
);

picture layerY;
layerY:=image(
label("Nummer 5", z2+z3);
);

picture layerU;
layerU:=image(
label("number 6", z2+z1);
);
\stopuseMPgraphic

\startuseMPgraphic{Gamma}
draw layerU ;
draw layerM ;
\stopuseMPgraphic

\startuseMPgraphic{layerset1}
\includeMPgraphic{base}
draw layerW ;
draw layerA ;
\stopuseMPgraphic

\startuseMPgraphic{layerset2}
\includeMPgraphic{layerset1} ;
draw layerY ;
\stopuseMPgraphic

\startuseMPgraphic{layerset3}
\includeMPgraphic{layerset2} ;
\includeMPgraphic{Gamma} ;
\stopuseMPgraphic


\startuseMPgraphic{layerset4}
\includeMPgraphic{layerset2} ;
draw layerU ;
\stopuseMPgraphic

\startuseMPgraphic{layerset5}
\includeMPgraphic{layerset4} ;
\includeMPgraphic{Gamma} ;
\stopuseMPgraphic

\starttext

\startTEXpage[offset=1DK]
\useMPgraphic{layerset1}
\stopTEXpage

\startTEXpage[offset=1DK]
\useMPgraphic{layerset2}
\stopTEXpage

\startTEXpage[offset=1DK]
\useMPgraphic{layerset3}
\stopTEXpage

\startTEXpage[offset=1DK]
\useMPgraphic{layerset4}
\stopTEXpage

\startTEXpage[offset=1DK]
\useMPgraphic{layerset5}
\stopTEXpage

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://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: mtxrun.lua:10080: bad argument #9 to 'format'

2024-02-14 Thread Mikael Sundqvist
Oh, that mail went wrong, sorry.

/MIkael

On Wed, Feb 14, 2024 at 11:27 PM Mikael Sundqvist  wrote:
>
> I don't wanna delay... :)
>
> On Wed, Feb 14, 2024 at 11:05 PM Hans Hagen  wrote:
> >
> > On 2/14/2024 10:05 PM, Garulfo wrote:
> > > Hi,
> > >
> > > it seems that line 10066 in mtxrun.lua (now 10070) has not been updated
> > > for today's update.
> > >
> > > What is the command line to rebuild mtxrun locally without downloading
> > > update from internet ?
> > > (I only know "sh install.sh"...)
> > can you copy the 'bad line' in the mail
> >
> > (there's also a mtxrun.lua in scripts/context/lua)
> >
> > 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
> > ___
___
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: mtxrun.lua:10080: bad argument #9 to 'format'

2024-02-14 Thread Mikael Sundqvist
I don't wanna delay... :)

On Wed, Feb 14, 2024 at 11:05 PM Hans Hagen  wrote:
>
> On 2/14/2024 10:05 PM, Garulfo wrote:
> > Hi,
> >
> > it seems that line 10066 in mtxrun.lua (now 10070) has not been updated
> > for today's update.
> >
> > What is the command line to rebuild mtxrun locally without downloading
> > update from internet ?
> > (I only know "sh install.sh"...)
> can you copy the 'bad line' in the mail
>
> (there's also a mtxrun.lua in scripts/context/lua)
>
> 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
> ___


examples-mathmeanings.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: Why LuaMetaTex is so slow?

2024-01-18 Thread Mikael Sundqvist
Hi,

On Thu, Jan 18, 2024 at 7:58 PM Shiv Shankar Dayal
 wrote:
>
>
>
>
>> In comparison to LaTeX with LuaHBTeX, ConTeXt with LuaMetaTeX is
>> lightning fast.
>>
>> pdfTeX is 8bit, and Knuth’s plain TeX is very low level – for a fairer
>> comparison, try the TeXbook on LuaMetaTeX (I don’t know if “plain” works
>> though).
>
>
> I understand that why it is slow, but the problem is that the difference is 
> too high.
> My book has lots of math, so perhaps that is the reason.
>

For what it is worth, I have a math book (lots of math and references
back and forth and some figures) and the 300 pages compiles in around
10s, so 30 pages/s. I don't have too much to compare with, and that is
a bit slower than your 40 pages/s (but 40*30 is 1200 and not 450), but
I consider that pretty fast.

One thing you can try is \enableexperiments[fonts.compact] (as it
sounds, it is still experimental).

Also, if you do not provide any example code, it will be difficult for
people to guess how _you_ can speed up your compilation (if at all).

/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] Re: upload

2024-01-17 Thread Mikael Sundqvist
Hi Otared,

On Thu, Jan 18, 2024 at 2:37 AM Otared Kavian  wrote:
>
> Hi Hans,
>
> Thanks for the new upload which solves the math alignment mechanism. However 
> I noticed that the classic notation $f’$ for the derivative does not work 
> anymore, while $f^\prime$ or $f^’$ does.
>
> \starttext
> The derivative of $f$ is denoted $f'$ or $f^\prime$ or is it $f^'$\dots
> \stoptext
>
> Best regards: Otared

There has been work in the last days on multiple sub/superscripts
and/or primes. But again your example works here. Just to be sure, did
you upgrade both the zip and the binary?

/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] Re: Math alignment issue

2024-01-17 Thread Mikael Sundqvist
On Wed, Jan 17, 2024 at 2:16 PM Otared Kavian  wrote:
>
> Dear Dalyoung,
>
> Thank you for testing, which shows that there is a bug somewhere.
> Mikael who follows the math stuff is aware of the problem, and I guess Hans 
> will be informed.
>

Since it is working locally here, It will likely be fixed
automatically with the next upload.

/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] Re: issue with fonts in current latest (2024.01.08 11:23)

2024-01-15 Thread Mikael Sundqvist
Hi,

Try this:

On Mon, Jan 15, 2024 at 6:17 PM Pablo Rodriguez via ntg-context
 wrote:
>
> Dear list,
>
> I have the following sample:
>
>   \definefontfamily[mainface][rm][TeX Gyre Pagella]
>   \definefontfamily[coverface][rm][TeX Gyre Termes]

\definebodyfontenvironment[16pt]

>   \setupbodyfont[mainface, 16pt]
>   \starttext
>   \startmakeup[standard][style=\bf]
>   \switchtobodyfont[coverface]
>   This is a cover.
>   \stopmakeup
>
>   This is text.
>   \stoptext
>
> Compiling the sample with current latest (2024.01.08 11:23), LMTX puts
> Latin Modern Roman (no bold) and MkIV puts Termes (no bold).
>
> The results with previous latest (2023.09.26 18:19), cover is in Termes
> bold with LMTX and in Termes regular with MkIV.
>
> I guess there might be an issue here. Could anyone confirm this?
>
> Many thanks for your help,
>
> Pablo

Maybe some check will be added. (On the chat with Hans...)

/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] Re: Linebreak in formual

2024-01-15 Thread Mikael Sundqvist
Hi,

you can try something like

\sum_{\mstack{k=0, k\equiv p + 1 (\mtext{mod }2)}}^{p -1}

but it will not be too pretty with such a large sub-index to the sum.

/Mikael

On Mon, Jan 15, 2024 at 2:41 PM Shiv Shankar Dayal
 wrote:
>
> I have following formula
> \sum_{k=0\\ k\equiv p + 1(\mathrm{mod}\;2)}^{p -1} but the \\ does not break 
> the line below Sigma. How can I achieve this because AFAIK it will work in 
> LaTeX?
>
> --
> Respect,
> Shiv Shankar Dayal
> ___
> 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: Spacing problem in formula

2024-01-14 Thread Mikael Sundqvist
Hi,

ConTeXt supports prescripts:

\startTEXpage[offset=1DK]

\m{1 - {}^nC_2\tan^2\theta + {}^nC_4 }

\m{1 - C_2^^n \tan^2\theta + C_4^^n }

\stopTEXpage

If you want them below, use double _.

/Mikael

On Mon, Jan 15, 2024 at 7:45 AM Shiv Shankar Dayal
 wrote:
>
> Suppose I want to typeset the formula: 1 - {}^nC_2\tan^2\theta + {}^nC_4 then 
> it appears as if n is power of - and +. The same formula in LaTeX comes out 
> nicely. Is there something I need to change?
>
> --
> Respect,
> Shiv Shankar Dayal
> ___
> 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: Setuphead issue!

2024-01-09 Thread Mikael Sundqvist
Hi,

On Tue, Jan 9, 2024 at 2:45 PM G.C.H.M. Verhaag via ntg-context
 wrote:
>
> Hi,
> The example below works as expected, but within my product it doesn't.
>
> % Subject example before and after!
>
> \setuphead[subject][color=limegreen,before={\blank[none]},after={\blank[none]},align={flushleft,nothyphenated,tolerant}]
>
> \starttext
> A paragraph before calling the subject.
>
> \subject{\sc The subject}
>
> A paragrapf after the subject was called.
> \stoptext
>
> I use the \subject command within a columnset, could that be the problem?

Take the file that is not working. Comment out as much as possible,
but so that you still have something that gives unexpected output. A
sample file that gives correct output is not so easy to help from.

/Mikael

PS The \sc could go into the style= in the setup.
___
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: Setuphead issue!

2024-01-09 Thread Mikael Sundqvist
Hi,

On Tue, Jan 9, 2024 at 11:30 AM G.C.H.M. Verhaag via ntg-context
 wrote:
>
> Hi,
>
> I'm a bit puzzled by the mkiv setuphead command of ConTeXt!
>
> The space before and after the subject command can usually be set by the 
> before and after arguments of the setuphead command.
>
> Now I'd like to have no vertical space before and after the header. I've 
> tried just that by setting either before= and after= and before=\blank[none] 
> and after=\blank[none].
>
> But none of these seem to work. Any idea?
>
> Gerard

Can you give a small but complete example where this happens?

/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] Re: MetaFun path joiners && and &&&& do not like single point paths

2023-12-30 Thread Mikael Sundqvist
Hi

On Sun, Dec 31, 2023 at 3:33 AM Gavin via ntg-context
 wrote:
>
> Hi MetaFun fans,
>
> Following a suggestion of Hans, I experimented with && and &&& and  for 
> joining paths in MetaFun. The joiner &&& produces one long path, but && and 
>  seem to produce a disconnected path which includes all the original 
> paths. However, if one of the paths is a single point, then it connects it. 
> MWE below.
>
> I spotted this on my globes module, where we saw an extra line appear for a 
> very specific orientation of the globe. I guessed that this orientation had 
> an island right on the horizon, so that only one boundary point was visible, 
> creating a singe point path for that island. I should probably fix my module 
> so it doesn’t do that. However, it might be nice to have && and  deal 
> with this situation gracefully.
>
> Gavin
>
>
> \startMPpage
>  path p[], q ;
>  p1 = fullcircle scaled 3cm ;
>  p2 = fullcircle scaled 2cm shifted (3cm,0) ;
>  p3 = (3cm,2cm) ;
>  q = for i = 1 upto 3 :
> p[i] &&
>  endfor
>  cycle ;
>  draw p1 withpen pencircle scaled 2pt withcolor .7 ;
>  draw p2 withpen pencircle scaled 2pt withcolor .7 ;
>  draw p3 withpen pencircle scaled 2pt withcolor .7 ;
>  draw q withcolor red ;
>  eofill q withcolor 0.9 ;
>  draw fullcircle scaled 6cm shifted (1.25cm,0) ;
> \stopMPpage

Not beautiful, but this seems to do what you want in this particular case:

\startMPpage
path p[], q ;
p1 = fullcircle scaled 3cm ;
p2 = fullcircle scaled 2cm shifted (3cm,0) ;
p3 = (3cm,2cm) ;
p4 = fullcircle ;
q = p[1] for i = 2 upto 3:
if (length(p[i]) == 0): &&& else: && fi p[i]
endfor
&& cycle ;
eofill q withcolor 0.9 ;
draw p1 withpen pencircle scaled 2pt withcolor .7 ;
draw p2 withpen pencircle scaled 2pt withcolor .7 ;
draw p3 withpen pencircle scaled 2pt withcolor .7 ;
draw q withcolor red ;
draw fullcircle scaled 6cm shifted (1.25cm,0) ;
\stopMPpage

This gives

q = p1 && p2 &&& p3 && cycle ;

/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] Re: Equivalent for hdots and hdotsfor

2023-12-30 Thread Mikael Sundqvist
Hi,

On Sat, Dec 30, 2023 at 9:45 AM Shiv Shankar Dayal
 wrote:
>
> In LaTeX, I can use \hdots for horizontal dots and \hdotsfor{n} to fill for 
> several columns in a determinant. But these do not work in ConTeXt. What is 
> the equivalent for these in ConTeXt?

You can try \HF or \HF[n].

\startTEXpage[offset=1DK]
\dm{
\startnamedmatrix[matrix:bars]
\NC 1 \NC x \NC x^2 \NC \ldots \NC x^{n-1} \NR
\NC 1 \NC y \NC y^2 \NC \ldots \NC y^{n-1} \NR
\HF[3] \NR
\NC 1 \NC z \NC z^2 \NC \ldots \NC z^{n-1} \NR
\stopnamedmatrix
}
\stopTEXpage

/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] Re: Size of subscript notations

2023-12-29 Thread Mikael Sundqvist
Hi,

On Fri, Dec 29, 2023 at 5:41 PM Fabrice Couvreur <
fabrice1.couvr...@gmail.com> wrote:

> Perhaps the size should be even smaller because I personally find it still
> a little large.
>

But that would imply different scaling for different content.


>
> PS : In a thread, I thought I read that you had written a document on the
> use of mathematics with ConTeXt, true or false?
>

It is in the writing, but it takes some time (working on it tonight). I
hope to have it out in some form in a not too distant future.

/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] Re: Size of subscript notations

2023-12-29 Thread Mikael Sundqvist
Great, all is good then. (Or?)

/Mikael

On Fri, Dec 29, 2023 at 5:07 PM Fabrice Couvreur <
fabrice1.couvr...@gmail.com> wrote:

> Well, actually I get the same thing .
> [image: test.png]
>
> Le ven. 29 déc. 2023 à 16:00, Mikael Sundqvist  a
> écrit :
>
>> Hi,
>>
>> On Fri, Dec 29, 2023 at 4:49 PM Fabrice Couvreur
>>  wrote:
>> >
>> > Thank you for your suggestion but in the following example the
>> operational symbol is too big as well as the number 1.
>> >
>> > \mapfontsize[modern][script] [.4]
>> > \mapfontsize[modern][scriptscript][.2]
>> >
>> > \setupbodyfont[modern,12pt]
>> >
>> > \startTEXpage[offset=1DK]
>> >   \m{z_{n+1}}
>> > \stopTEXpage
>>
>> Strange, here it looks OK. Maybe something that will be solved when
>> there is an update then.
>>
>> /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
>>
>> ___
>>
>
> ___
> 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: Size of subscript notations

2023-12-29 Thread Mikael Sundqvist
In fact, I get the same expected result with the context from TeXLive (2023).

/Mikael

On Fri, Dec 29, 2023 at 4:56 PM Mikael Sundqvist  wrote:
>
> Hi,
>
> On Fri, Dec 29, 2023 at 4:49 PM Fabrice Couvreur
>  wrote:
> >
> > Thank you for your suggestion but in the following example the operational 
> > symbol is too big as well as the number 1.
> >
> > \mapfontsize[modern][script] [.4]
> > \mapfontsize[modern][scriptscript][.2]
> >
> > \setupbodyfont[modern,12pt]
> >
> > \startTEXpage[offset=1DK]
> >   \m{z_{n+1}}
> > \stopTEXpage
>
> Strange, here it looks OK. Maybe something that will be solved when
> there is an update then.
>
> /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] Re: Size of subscript notations

2023-12-29 Thread Mikael Sundqvist
Hi,

On Fri, Dec 29, 2023 at 4:49 PM Fabrice Couvreur
 wrote:
>
> Thank you for your suggestion but in the following example the operational 
> symbol is too big as well as the number 1.
>
> \mapfontsize[modern][script] [.4]
> \mapfontsize[modern][scriptscript][.2]
>
> \setupbodyfont[modern,12pt]
>
> \startTEXpage[offset=1DK]
>   \m{z_{n+1}}
> \stopTEXpage

Strange, here it looks OK. Maybe something that will be solved when
there is an update then.

/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] Re: Size of subscript notations

2023-12-29 Thread Mikael Sundqvist
Hi,

On Fri, Dec 29, 2023 at 3:17 PM Fabrice Couvreur
 wrote:
>
> Hi,
> To type my lessons or other, I use the Modern font in 12 pt or 11 pt. I find 
> that the subscript notations are a little too big : how can I improve this ?
> Thanks
> Fabrice
>
> \m{ \forall n \in N, z_{n+1}=\frac{i}{3}z_n}

you could try something like (here with too small numbers only to show...)

\mapfontsize[modern][script] [.4]
\mapfontsize[modern][scriptscript][.2]

\setupbodyfont[modern,10pt]

\startTEXpage[offset=1DK]
\m{3^{2^3}}
\stopTEXpage

I hope it helps.

/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] Re: old style factorial symbol and theorems

2023-12-27 Thread Mikael Sundqvist
Hi!

Not by computer, and I'm sure Hans (or Wolfgang) has already shown a way to
do the old factorial with the actuarian mechanism when I'm back to the
computer...

/Mikael

Den ons 27 dec. 2023 13:49Shiv Shankar Dayal 
skrev:

>
>
> A simple alternative to tikz is the usage of \framed.
>>
>> \define[1]\oldfact
>>   {\inmframed[frame=off,strut=no,leftframe=on,bottomframe=on]{#1}}
>>
>> \starttext
>>
>> \m{\oldfact{n}}
>>
>> \stoptext
>>
>> Wolfgang
>>
>> Thanks a lot. It should work nicely.
>
> --
> Respect,
> Shiv Shankar Dayal
>
> ___
> 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: underbrace label across two lines

2023-12-20 Thread Mikael Sundqvist
Hi,

On Wed, Dec 20, 2023 at 8:01 AM Dean Hung  wrote:
>
> Hi list,
>
> Following on from Aditya's solution to my previous question, I have run into 
> a separate issue and would appreciate any assistance.
>
> Sometimes text under the underbrace can become quite long, and should be 
> split into two (or more) lines.  In the example below, "firstline" should be 
> the top line of the underbrace label, and "secondline" should be on the lower 
> line of the underbrace label, but as it stands, both are printed on the same 
> line.
>
> \underbrace[mindepth=0.5cm]{\tf x+y+z}_{\vrule width 0pt height 
> 0.5cm\relax\text{firstline secondline}}
>
> I have tried using \\ and \crlf, but to no avail.
>
> Any help would be greatly appreciated!
>
> Dean

Hi,

Hans will add some annotation mechanism (already on my computer to
test a bit). In your case you can use the first example here:

\startbuffer
\unframed
[align=middle,toffset=0.5cm]
{firstline\crlf secondline}
\stopbuffer

$
\underbrace
[mindepth=0.5cm]
{\tf x + y + z}
_
{\mtext{\getbuffer}}

\quad

\mathannotation
[bottom={\getbuffer}]
{\underbrace
[mindepth=0.5cm]
{\tf x + y + z}
}
$

Since I am the curious type, I wonder a bit what is the use case here?
Do you mind explaining and providing the complete example? (The reason
I ask is that there might be better ways to do what you are doing.)

/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] Re: increase vertical between underbrace and equation

2023-12-19 Thread Mikael Sundqvist
Hi,

On Mon, Dec 18, 2023 at 6:57 PM Dean Hung  wrote:
>
> Hi ConText friends,
>
> I am trying to increase the vertical distance between the underbrace and the 
> part of the equation above the underbrace.
>
> \startformula
> \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}}
> \stopformula
>
> I've tried using \blank and \vspace, but to no avail.  For example:
>
> \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}}
> ...does not work.
>
> The documentation on underbrace (and overbrace, underbracket, etc...) in the 
> ContextGarden wiki seems to be very limited, and I was not able to find any 
> user-supplied arguments for increasing this vertical distance.
>
> There are various solutions available for LaTex, and they require external 
> packages (e.g., BigStrut, vphantom) that redefine the strut height.
>
> I hope I'm missing something simple... Any help would be greatly appreciated!
>
> DY Hung

One could enforce consistent spacing by doing (add \showstruts)

\underbrace{x + y + z}_{\topstrut\mtext{my text here}}

but it would perhaps make more sense to be able to do

\underbrace[toptext=...,bottomtext=...]{x + y + z}

with some mechanism that do not abuse the limits mechanism, or even to
have some very general annotation mechanism,

\mathannotation[toptext=...,bottomtext=...]{\underbrace{x + y + z}}

So, can we please see some real examples of how this is supposed to be
used? Best with some explanations on how and why the text below should
be raised/lowered.

/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] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
Hi,

I don't know if \startMPinclusions \stopMPinclusions shall work with
\startMPpage and \stopMPpage. In this case, one can use a separate
graphics:

\startuseMPgraphic{base}

picture p[];
path TheFrame ;
TheFrame := fullsquare scaled 5in ;
z1 = (60,40);
z2 = (40,90);
z3 = (10,70);

p1:=image(
label("Word 1", z1);
);

p2:=image(
label("Mot 2", z2);
);

p3:=image(
label("Parola 3", z3);
);

\stopuseMPgraphic

\starttext

\dorecurse{3}{ % Frame

\startMPpage[pagestate=start]

\includeMPgraphic{base}

currentime := #1 ;
% Just for learning :
draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
draw textext("T="(currentime)) scaled 2 shifted(0,2in)
withcolor magenta ;
for k=1 upto currentime: addto currentpicture also p[k]; endfor
setbounds currentpicture to TheFrame ;

desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
currentpicture := currentpicture xysized (desiredformat ,desiredformat );
\stopMPpage
}

\stoptext

/Mikael

On Sat, Dec 2, 2023 at 6:14 PM Emanuel Han via ntg-context
 wrote:
>
> Hi Mikael,
>
> here's a very simple mwe for the label(textext()) issue. On page 1, the text 
> "Word 1" should be drawn in position z1. On page 2, the same text in the same 
> position should be visible, and the text "Mot 2" in position p2 should be 
> added. And so on.
>
> \startMPinclusions
>
> picture p[];
>  path TheFrame ;
>  TheFrame := fullsquare scaled 5in ;
>
>  z1 = (60,40);
>  z2 = (40,90);
>  z3 = (10,70);
>
> p1:=image(
> label(textext("Word 1"), z1);
> );
>
> p2:=image(
> label(textext("Mot 2"), z2);
> );
>
> p3:=image(
> label(textext("Parola 3"), z3);
> );
>
> \stopMPinclusions
>
> \starttext
>
> \dorecurse{3}{ % Frame
> \startMPpage[pagestate=start]
>  currentime := #1 ;
>  % Just for learning :
>  draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
>  draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor 
> magenta ;
>  for k=1 upto currentime: draw p[k]; endfor
>  setbounds currentpicture to TheFrame ;
>
>  desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
>  currentpicture := currentpicture xysized (desiredformat ,desiredformat );
>
> \stopMPpage
> }
>
> \stoptext
>
> On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist  wrote:
>
> Hi Emanuel,
>
> I am not sure I understand your question, and since you use fonts that
> i do not have, I cannot test your example as is. But, maybe, if you
> want to redraw a picture, you can do
>
> addto currentpicture also p1;
>
> where you want it.
>
> /Mikael
>
> PS For the text thing, I did not get it. Could one have a _very
> simple_ example showing only that problem and no other problem?
>
> On Sat, Dec 2, 2023 at 12:58 PM fv leung  wrote:
> >
> > You didn't specify the color of path A in p2 and p4. So it's drawn in black.
> > The other issue, I can't help.
> >
> > Emanuel Han via ntg-context  於 2023年12月2日 週六 下午7:23寫道:
> >>
> >> So is there a way to circumvent these issues? Or an explanation for this 
> >> behavior, so that I can try to find a solution by myself?
> >>
> >> Thanks
> >> Emanuel
> >>
> >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context 
> >>  wrote:
> >>
> >> Dear Aditya and Fabrice,
> >> thanks for your responses.
> >>
> >> I included some of Fabrice's code into mine for testing purpose, and 
> >> indeed the multipage works now.
> >> What is bizarre is that issues appear now that didn't appear before:
> >>
> >> Path A is drawn with color red on page 1, and in color black on all 
> >> following pages, while it should stay red.
> >> textext(, ) is overwriting  with 
> >> "T="(currentime) which has been used previously in textext() 
> >> before the for k=1 endfor loop. This overwriting happens only for the 
> >> first textext() which occurs inside the for k=1 endfor loop. All other 
> >> textext() inside the for k=1 endfor loop are not drawn at all. If the line 
> >> « draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor 
> >> magenta ; » is commented out, the first textext() inside the for k=1 
> >> endfor loop is not drawn neither. It must be an issue with textext(), 
> >> because when I replace textext() by lmt_outline[], the text is drawn.
> >>
> >> Adjusted mwe:
> >>
> >> \enableregime[utf] % enable unicoded input
> >>
> >> \definefontfamily [RomanFont] [rm] [calluna]
> >>
>

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
Hi Emanuel,

I am not sure I understand your question, and since you use fonts that
i do not have, I cannot test your example as is. But, maybe, if you
want to redraw a picture, you can do

addto currentpicture also p1;

where you want it.

/Mikael

PS For the text thing, I did not get it. Could one have a _very
simple_ example showing only that problem and no other problem?

On Sat, Dec 2, 2023 at 12:58 PM fv leung  wrote:
>
> You didn't specify the color of path A in p2 and p4. So it's drawn in black.
> The other issue, I can't help.
>
> Emanuel Han via ntg-context  於 2023年12月2日 週六 下午7:23寫道:
>>
>> So is there a way to circumvent these issues? Or an explanation for this 
>> behavior, so that I can try to find a solution by myself?
>>
>> Thanks
>> Emanuel
>>
>> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context 
>>  wrote:
>>
>> Dear Aditya and Fabrice,
>> thanks for your responses.
>>
>> I included some of Fabrice's code into mine for testing purpose, and indeed 
>> the multipage works now.
>> What is bizarre is that issues appear now that didn't appear before:
>>
>> Path A is drawn with color red on page 1, and in color black on all 
>> following pages, while it should stay red.
>> textext(, ) is overwriting  with "T="(currentime) 
>> which has been used previously  in textext() before the for k=1 endfor loop. 
>> This overwriting happens only for the first textext() which occurs inside 
>> the for k=1 endfor loop. All other textext() inside the for k=1 endfor loop 
>> are not drawn at all. If the line  « draw textext("T="(currentime)) 
>> scaled 2 shifted(0,2in) withcolor magenta ; » is commented out, the first 
>> textext() inside the for k=1 endfor loop is not drawn neither. It must be an 
>> issue with textext(), because when I replace textext() by lmt_outline[], the 
>> text is drawn.
>>
>> Adjusted mwe:
>>
>> \enableregime[utf] % enable unicoded input
>>
>> \definefontfamily [RomanFont] [rm] [calluna]
>>
>> \definefontfamily [KoreanFont] [rm] [applemyungjo]
>>
>> \definefontfamily [JapaneseFont] [rm] [hannotatesc]
>>
>> \definefontfeature
>>  [fea]
>>  [mode=node,language=dflt,script=arab,
>>   init=yes,
>>   medi=yes,
>>   fina=yes,
>>   isol=yes,
>>   calt=yes,
>>   rlig=yes,
>>   tlig=yes,
>>   trep=yes,
>>   curs=yes,
>>   kern=yes,
>>   mark=yes
>> ]
>>
>> \starttypescript [serif] [notonaskharabic]
>>  \definefontsynonym [notonaskharabic-Light]   [name:notonaskharabic] 
>>[features=fea]
>>  \definefontsynonym [notonaskharabic-Bold][name:notonaskharabic] 
>>[features=fea]
>>  \definefontsynonym [notonaskharabic-Italic]  [name:notonaskharabic] 
>>[features=fea]
>>  \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] 
>>[features=fea]
>> \stoptypescript
>>
>> \starttypescript [serif] [notonaskharabic]
>>  \usetypescript[serif][fallback]
>>  \definefontsynonym [Serif]   [notonaskharabic-Light]
>>[features=fea]
>>  \definefontsynonym [SerifItalic] [notonaskharabic-Italic]   
>>[features=fea]
>>  \definefontsynonym [SerifBold]   [notonaskharabic-Bold] 
>>[features=fea]
>>  \definefontsynonym [SerifBoldItalic] 
>> [notonaskharabic-Bold-Italic] [features=fea]
>> \stoptypescript
>>
>> \starttypescript [notonaskharabic]
>>   \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
>> \stoptypescript
>>
>> \usetypescript[notonaskharabic]
>>
>> \setupbodyfont [RomanFont]
>>
>> \usecolors[crayola]
>>
>> \startMPinclusions
>>
>> picture p[];
>>  path TheFrame ;
>>  TheFrame := fullsquare scaled 5in ;
>>
>>  z0 = (0,0);
>>  z1 = (60,40);
>>  z2 = (40,90);
>>  z3 = (10,70);
>>  z4 = (30,50);
>>  z5 = (90,70);
>>  z6 = (-10,70);
>>
>> path A; A = z0..z1..z2..z3..z4 ;
>> pair AStartPoint; AStartPoint = point 0 of A;
>> pair AEndPoint; AEndPoint = point 4 of A;
>> path B; B =  z5..z6;
>> pair BStartPoint; BStartPoint = point 0 of B;
>> pair BEndPoint; BEndPoint = point 1 of B;
>> path C; C = AStartPoint..AEndPoint;
>>
>> p1:=image(
>> draw A withcolor red;
>> );
>>
>> p2:=image(draw A; label(lmt_outline [
>> text = "\JapaneseFont 日本語"
>> ], AEndPoint););
>>
>> p3:=image(
>> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
>> BStartPoint);
>> );
>>
>> p4:=image(draw A; label(lmt_outline [
>> text = "\KoreanFont 한국어"
>> ], AStartPoint););
>>
>> p5:=image(
>> label(textext("bāng"), BEndPoint);
>> draw C withcolor green;
>> );
>>
>> p6:=image(
>> draw B withcolor blue;
>> );
>> \stopMPinclusions
>>
>> \starttext
>>
>> \dorecurse{6}{ % Frame
>>  \setupMPpage[background=color, backgroundcolor=SpringGreen]
>> \startMPpage[pagestate=start]
>>  currentime := #1 ;
>>  % Just for learning :
>>  draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
>>  draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor 
>> magenta ;
>>  for k=1 upto currentime: draw p[k]; endfor
>>  setbounds 

[NTG-context] Re: mathalignment; alignment of columns

2023-11-25 Thread Mikael Sundqvist
Hi,

indeed, one can be surprised. The good thing is that you will now
update the wiki, right? :)

/Mikael

PS I think the "official announcement" was made on the list, but I do
not remember the exact date.

On Sat, Nov 25, 2023 at 12:23 PM wolfgangbackes--- via ntg-context
 wrote:
>
> By the way, if it's been a few years since the changeover, isn't it 
> surprising that the examples on the contextgarden website still use the old 
> syntax?
> Are you aware of an official announcement of the new syntax? After all, this 
> seems to mean that old texts are no longer rendered correctly, at least not 
> after a new PDF generation. This is no small 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
> ___
___
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: mathalignment; alignment of columns

2023-11-24 Thread Mikael Sundqvist
I get the attached (with the standalone, as well as with the version
from texlive 2023). Maybe I misunderstood you.

/Mikael

On Fri, Nov 24, 2023 at 11:16 PM wolfgangbackes--- via ntg-context
 wrote:
>
> Thank you very much for the quick reply. But I had already tried this syntax 
> before, because I had found it somewhere by chance. But it didn't work 
> either, as you can also verify on the page https://context-on-web.eu/.
>
> Regards,
> 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
> ___
___
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: mathalignment; alignment of columns

2023-11-24 Thread Mikael Sundqvist
Hi,

try

\startmathalignment[n=2,align={1:left,2:right}]

I think this was changed two or three years ago.

/Mikael

On Fri, Nov 24, 2023 at 11:04 PM wolfgangbackes--- via ntg-context
 wrote:
>
> Something as elementary as "mathenvironment" can't really be faulty, can it? 
> According to my recent tests, a mathalignment environment does not seem to 
> react (any more) to the values of the "align" option.
> The source code hab been rendered correctly a few years ago,
>
> Minimal example 1:
>
> \starttext
> \startformula
> \startmathalignment[n=2,align={left, right}]
> \NC always aligned to the right \NC = u + at, \NR
> \NC d \NC = ut + \frac12 at^2. \NR
> \stopmathalignment
> \stopformula
> \stoptext
>
> Despite "align={left, right}", the first column is aligned to the right and 
> the second to the left. This does not change, no matter which values I assign 
> to "align", for example align={middle, middle}.
>
> The align option is also ignored in the case of other column numbers., for 
> example:
>
> \starttext
> \startformula
> \startmathalignment[n=1,align=left]
> \NC This single column should \NR
> \NC be left-aligned, \NR
> \NC but it is centered. \NR
> \stopmathalignment
> \stopformula
> \stoptext
>
>  What am I missing here? Where is my mistake?
>
> Regards
> 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
> ___
___
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: Double sided pages leave a thin white line on the right side

2023-10-28 Thread Mikael Sundqvist
Hi,

I cannot reproduce it, and I do not see a white line in your file.
Maybe I look at the wrong place.

/Mikael

On Sat, Oct 28, 2023 at 4:11 PM Mia Bikey  wrote:
>
> Hi,
> I was using \setuppagenumbering[alternative=doublesided] to get double sided 
> pages.
> After doing that I noticed a thin white line on the right side.
>
> Here is a Minimal Working Example:
>
> ConTeXt  ver: 2023.09.26 18:19 LMTX
>
> \setupbackgrounds[page][background=color,backgroundcolor=black]
> \setuppagenumbering[alternative=doublesided]
>
> \starttext
> a
> \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
> ___
___
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: Color option in \setupinteraction doesn't work sometimes

2023-10-28 Thread Mikael Sundqvist
Hi,

you can try contrastcolor:

\setupinteraction[state=start,color=,contrastcolor=]

/Mikael

On Sat, Oct 28, 2023 at 1:54 PM Mia Bikey  wrote:
>
> Ah, wrong attachment.
> Here is the correct one.
>
> On Sat, Oct 28, 2023 at 5:18 PM Mia Bikey  wrote:
>>
>> Hi,
>> I was trying to get all my references black as it goes well along with black 
>> text but they appear red in some pages.
>>
>> I have reinstalled context in case there was some software issue but it is 
>> still the same.
>>
>> Here is a minimal working example:
>>
>> ConTeXt  ver: 2023.09.26 18:19 LMTX
>>
>> \setupinteraction[state=start, color=black]
>>
>> \starttext
>>
>> \placeformula[eq:equation1]
>> \startformula
>> x
>> \stopformula
>>
>> References are red on the first page \in[eq:equation1] 
>> \at{page}[eq:equation1]
>>
>> \input tufte
>> \input tufte
>> \input tufte
>> \input tufte
>> \input tufte
>>
>> Now they become black \in[eq:equation1] \at{page}[eq:equation1]
>>
>> \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
> ___
___
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: formula alignment for mathalign

2023-09-28 Thread Mikael Sundqvist
Hi,

On Thu, Sep 28, 2023 at 6:39 PM Aditya Mahajan  wrote:
>
> Hi,
>
> The `align` parameter of `\setupformulas` is ignored in mathalign. Consider 
> the following MWE:
>
> \setupformulas[align=flushleft,leftmargin=2em]
>
> \starttext
> \startformula
>   A = B
> \stopformula
>
> vs
>
> \startformula \startalign
>   \NC A \NC B \NR
>   \NC A \NC B \NR
> \stopalign \stopformula
> \stoptext
>
> The first display formula is flush left, but the aligned formula is centered 
> on the page. This appears to be a regression compared to MkIV, where the 
> above example works correctly.

The whole alignment mechanism was redone, and a lot focus was put on
getting right placement for formula numbers and display alignment. We
did not yet look into this use case, but we will.

/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: Issue : compilation error when using mathcases with pagella fonts (and others)

2023-09-24 Thread Mikael Sundqvist
Hi,

Not that it helps you much, but your example works fine here, and it
gives the expected result.

/Mikael

On Sun, Sep 24, 2023 at 1:42 PM Vincent Picard  wrote:
>
> Hello,
>
> Since ConTexT last upgrade (ltmx 2023.09.18 21:13), I have a document that 
> won't compile with ConTexT. The problem seems to occur when using mathcases 
> with some ConTeXt provided fonts, including pagella. This is a minimal not 
> working example :
>
> \setupbodyfont[pagella]
>
> \starttext
> \startformula
> \delta_{ij} =
>  \startmathcases
>  \NC 1 \NC \text{if } i = j \NR
>  \NC 0 \NC \text{otherwise} \NR
>  \stopmathcases
> \stopformula
> \stoptext
>
> The error is :
> run callback [44]: 
> ...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: table index 
> is nil\nstack traceback:\n 
> ...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:56: in metamethod 
> 'index'\n ...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:104: in 
> function <...ext/tex/texmf-context/tex/context/base/mkxl/math-fnt.lmt:62>\n 
> [C]: in upvalue 'builders_kernel_mlisttohlist'\n [string \"local tonut  = 
> nodes.tonut...\"]:43: in function <[string \"local tonut  = 
> nodes.tonut...\"]:18>\n (...tail calls...)\n 
> ...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2986: in function 
> <...ext/tex/texmf-context/tex/context/base/mkxl/math-noa.lmt:2984>
>
> My system is : FreeBSD 64bits
>
> Thank you for any help.
> Sincerely,
> Vincent Picard
> ___
> 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: stackrel in context?

2023-09-21 Thread Mikael Sundqvist
Hi,

On Thu, Sep 21, 2023 at 4:34 PM Hans Hagen  wrote:
>
> On 9/21/2023 2:40 PM, Aditya Mahajan wrote:
> > On Thu, 21 Sep 2023, Hans Hagen wrote:
> >
> >> a teaser for Aditya:
> >>
> >> \definemathstackers[toprel][top][mathclass=\mathrelationcode]
> >> \definemathstackers[topbin][top][mathclass=\mathbinarycode]
> >>
> >> \definemathextensible[toprel][frownedupon]["2322]
> >> \definemathextensible[topbin][frowned]["2322]
> >>
> >> \starttext
> >>  $x \frownedupon{4} y + \frowned{!} z = 10$
> >> \stoptext
> >
> > Interesting, but I think that the OP wanted to use \frown as an accent,
> \definemathaccent[topfake][top][offset=auto]
>
> \definemathtopaccent[topfake][frowned]["2322]
>
> \starttext
>  $ x + \frowned{4} = 10$
> \stoptext
>
> when you add in math-acc the offset option after the alignsymbol option
>
> \ifcstok{\mathaccentparameter\c!alignsymbol}\v!yes
>   \s!nooverflow\space
> \fi
> \ifcstok{\mathaccentparameter\c!offset}\v!auto
>   \s!base\space
> \fi
>
> and someplace
>
> \definesystemconstant {base}
>
> (a patching exercise)
>
> Hans

Nice with offset=auto. It is not clear to me what the intent/meaning
is of the original example, but one can also try the 23DC (can extend
as \overparent):

\definemathtopaccent[topfake][frowned]["2322]
\definemathtopaccent[topfake][Frowned]["23DC]

\starttext
 $ x + \frowned{4} = 10$

 $ x + \Frowned{4} = 10$

 $ x + \Frowned{} = 10$

 $ x + \overparent{4} = 10$

 $ x + \overparent{} = 10$
\stoptext

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

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

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

2023-09-18 Thread Mikael Sundqvist
Hi,

On Mon, Sep 18, 2023 at 4:55 PM Pablo Rodriguez  wrote:
>
> On 9/18/23 16:20, Mikael Sundqvist wrote:
> > Hi,
> >
> > works as expected here, with the latest.
>
> Hi Mikael,
>
> I get the same error, so I guess you are on Windows.

No, I am on linux (64).

/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: Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-09-18 Thread Mikael Sundqvist
Hi,

works as expected here, with the latest.

/Mikael

On Mon, Sep 18, 2023 at 4:04 PM Michael Loescher  wrote:
>
> There seems to be something wrong with the \type command.
>
> MWE:
> \starttext
> \type{hello}
> \stoptext
>
> gives an error:
> tex error   > tex error on line 2 in file Z:/test.tex: Control sequence
> expected instead of undefined
>
>  \buff_verbatim_type_normal
>  #1->\buff_verbatim_initialize_type_two \dostarttaggedchained \t!verbatim
> \currenttype \??type \clf_type data{\protecteddetokenize
>  {#1}}tab{\typeparameter \c!tab }method{\p_buff_option
> }compact{\typeparameter \c!compact }escape{\typeparameter \c!escap
> 
>  \type{hello}
>
> 1 \starttext
> 2 >>  \type{hello}
> 3 \stoptext
> You injected something that confused the parser, maybe by using some Lua call.
> mtx-context | fatal error: return code: 1
>
> Michael
>
> Am 17.09.2023 um 10:01 schrieb Cron Daemon:
> > receiving incremental file list
> >   ./
> >   ctan.lsr
> >   document-2.htm
> >   download-1.htm
> >   download-2.htm
> >   logo-ade.png
> >   logo-cts.png
> >   logo-pod.png
> >   rss.xml
> >   show-fil.pdf
> >   context/latest/
> >   context/latest/cont-lmt.zip
> >   context/latest/cont-mpd.zip
> >   context/latest/cont-ppc.zip
> >   context/latest/cont-sci.zip
> >   context/latest/cont-tmf.zip
> >   context/latest/cont-tst.7z
> >   context/latest/cont-tst.tar.xz
> >   context/latest/cont-tst.zip
> >   general/manuals/
> >   general/manuals/luametatex.pdf
> >   general/manuals/primitives.pdf
> >
> >   sent 185,495 bytes  received 41,503,755 bytes  3,335,140.00 bytes/sec
> >   total size is 562,644,378  speedup is 13.50
> >
> >
> > Running archiver:
> >
> > New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-09-17.10
> > 232388526 
> > /var/www/aanhet.net/context//htdocs/archives/context-2023-09-17.10/latest
> > 126745317 
> > /var/www/aanhet.net/context//htdocs/archives/context-2023-09-17.10/current
> > 359137939 
> > /var/www/aanhet.net/context//htdocs/archives/context-2023-09-17.10
> > 359137939 total
> > ___
> > 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: 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] Re: Bug between \definealternativestyle and makeup?

2023-08-27 Thread Mikael Sundqvist
Remove the period:

\definecharacterkerning [mykerning] [factor=0.15]
\definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}]

\definemakeup [title] [doublesided=empty, pagestate=start]
\starttext
\starttitlemakeup
Title
\stoptitlemakeup
\stoptext

/Mikael

On Sun, Aug 27, 2023 at 9:32 PM Alex Leray  wrote:
>
> Hi,
>
> I found that using \definealternativestyle in conjunction with Makeup
> insert a page before my Makeup page.
>
> Any idea?
>
> Thanks
>
> * * *
>
> \definecharacterkerning [mykerning] [factor=0.15]
> \definealternativestyle[mystyle][{\setcharacterkerning[mykerning]}]. %%%
> BUG!!!
>
> \definemakeup [title] [doublesided=empty, pagestate=start]
> \starttext
> \starttitlemakeup
> Title
> \stoptitlemakeup
> \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] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Mikael Sundqvist
Hi,

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

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

\starttext

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

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

\stoptext

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

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

[NTG-context] Re: 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: redefine space to be the same as \␣ similar to knuthian approach

2023-08-19 Thread Mikael Sundqvist
Hi,

On Sat, Aug 19, 2023 at 3:36 PM Carlos  wrote:
>
> On Fri, Aug 18, 2023 at 08:58:58PM +0200, Wolfgang Schuster wrote:
> > Hi,
> >
> > 1. Learn to two provide a working minimal example which shows the problem.
> >
>
> Did the minimal example I provided earlier wasn't enough for you?
>
> Besides, You know perfectly well that \stoptext is not even necessary,
> superflous; it's not required to compile any context flavor file for
> ages now.
>
> So I suggest you to save those keystrokes for other tasks. Not those,
> petty petty betty. I know it's hard to teach an ol' dog new tricks,
> but… it's worth to try! right?
>
> Also, Did you see the attachment I sent prior to your message?

Maybe your system is broken?

>
> > 2. The example below results in a correct output for \TEX.
> >
>
> Not in my end with any font other than latin modern

Here

\setupbodyfont[stixtwo]


\setuplayout[width=16cm]
\showmakeup

\starttext

Thus, I came to the conclusion that the designer of a new
system must not only be the implementer and first
large||scale user; the designer should also write the first
user manual.
\setupbodyfont[12.895pt]

{\ss The separation of any of these four components would have
hurt \TeX\ significantly. If I had not participated fully in
all these activities, literally hundreds of improvements
would never have been made, because I would never have
thought of them or perceived why they were important.\par}

\stoptext

gives the attached. I also tried all other fonts I had, no problems.

/Mikael


230818-1.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://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: redefine space to be the same as \␣ similar to knuthian approach

2023-08-18 Thread Mikael Sundqvist
Hi,

It is extremely difficult to follow what you write.

On Fri, Aug 18, 2023 at 11:43 AM Carlos  wrote:
>
> If I have the following, with these linebreaks as in:
>
> {\par But a system cannot be successful if it is too strongly
> influenced by a single person. {\obeylines Once the initial design is
> complete and fairly robust, the real test begins as people
> with many different viewpoints undertake their own
> experiments.}}

Is that the complete document? What do you have in mind with obeying
lines in the middle of a paragraph?

>
> and opted to load another font, other than cmr that is, a \frenchspacing
> approach wouldn't be further required

cmr? Not used in ConTeXt for a long time. (And what does the changing
of font have to do with this?)

>
> Bear with me here, in the current state, for example, and as long as say
>
> «…person.␣{\obeylines Once the initial is
> complete…» though feasible enough, leaves any prior \␣ at the mercy of
> whatever fontsize and/or set width happens to be. And this is just plain
> wrong.

What?

>
> Likewise, if a word sequence such as \TeX\ occurs as in {\ss The separation
> of any of these four components would have hurt \TeX\ significantly. }

Likewise what?

>
> The next sentence: «If I had not participated…» does not get any
> \nofrenchspacing which is equally and doubly problematic. It shows lack of
> consistency. And this ought not to be an ‹either› ‹or› scenario. But
> rather, an and conjunctional construct. It fails both ways.

Consistency of what? Spacing? Where? Can you make a complete example?
(You can show space amount with \showmakup[space])

>
> Furthermore, with the same token, if width is specified with a
>
> \setuplayout[width=15cm]

OK, here the game changes...

>
> Anything less than 12.895pt, especifically for that use case, wwould
> throw anything, particularly control sequences such as \TeX\ out
> of whack, and conversely, once a value of that very pt or pica or
> whatever is lowered, it brings that nonfrenchspacing right back on.
> And if width increments occur, then it follows that any control sequence 
> kerning
> also gets thrown off as a result.

Of course the width influences the spacing. That is how the paragraph
builder works (and really, why it often looks good).

>
> It seems so far, that with lmtx, any standalone file, document, minimal
> working example that does not load cmr at the outset does not produce
> an acceptable outcome either. By saying acceptable I meant to say it
> namely from a typographical point of view. Nothing else.

I have no clue of what you talk about here.

>
> from the TeXbook 380-381
>
> «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired changes 
> to
> \par before invoking \obeylines. (2) The \uncatcodespecials operation changes 
> a
> space to category 12; but the \tt font has the character ‘␣’ in the ⟨space⟩ 
> position, so we
> don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely 
> changes the
> ⟨space⟩ character to category 13; active character ␣13 has been defined to be 
> the same
> as \space, a macro that expands to ␣10 . This is usually what is desired; for 
> example,
> it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t cause 
> any
> trouble. But in our application it has an undesirable effect, because it 
> produces spaces
> that are affected by the space factor. To defeat this feature, it’s necessary 
> either to
> say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter 
> alternative is
> better, because the former will discard spaces at the beginning of each
> line.»
>
> «In theory, this seems like it ought to work; but in practice, it fails in 
> two ways. One
> rather obvious failure—at least, it becomes obvious when the macro is 
> tested—is that
> all the empty lines of the file are omitted. The reason is that the \par 
> command at the
> end of an empty line doesn’t start up a new paragraph, because it occurs in 
> vertical
> mode. The other failure is not as obvious, because it occurs much less often: 
> The \tt
> fonts contain ligatures for Spanish punctuation, so the sequences ?‘ and !‘ 
> will be
> printed as ¿ and ¡ respectively. Both of these defects can be cured by 
> inserting
>
> and
>
>
> «When INITEX creates a brand new TEX, all characters have a space factor code
> of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. 
> (This
> slight difference is what makes punctuation act differently after an 
> uppercase letter; do
> you see why?) Plain TEX redefines a few of these codes using the \sfcode 
> primitive,
> which is similar to \catcode (see Appendix B); for example, the instructions
> \sfcode‘)=0
>  \sfcode‘.=3000
> make right parentheses “transparent” to the space factor, while tripling the 
> stretcha-
> bility after periods. The \frenchspacing operation resets \sfcode‘. to
> 1000.»

Everything you cite above is very likely true for plain TeX, but maybe
not for ConTeXt...

/Mikael

PS 

[NTG-context] Re: An error which is not in .log file

2023-08-15 Thread Mikael Sundqvist
Hi,

I suggest to comment out/add \stoptext until the error go,and that way
narrow it down. The usual way...

/Mikael

Den tis 15 aug. 2023 19:50Xavier B.  skrev:

> I don't have line 276. This is what I have (169 lines):
>
> % Fitxer ConTeXt MIV
>
> % carregam les opcions d'entorn
> \environment ng-entorn-minimal.conTeXt
> \environment ng-entorn-taules.conTeXt
> \environment ng-entorn-teoria.conTeXt
> \environment ng-entorn-colors.conTeXt
>
> % bibliografia
> \usebtxdataset[default][ng-bibliografia.bib]
> \setupbtx[dataset=default]
> \usebtxdefinitions[aps]
>
> % el text
>
> \starttext
>
> \startfrontmatter
> \input ng-pre-portada.conTeXt
> \input ng-pre-llicencia.conTeXt
> \input ng-pre-informacio-document.conTeXt
> \completecontent
> \stopfrontmatter
>
>
> \startbodymatter
>
> \startpart[title=Aritmètica]
>
> \input ng-aritmetica-nombres-naturals-operacions.conTeXt
> \page[yes]
> \input ng-aritmetica-divisibilitat.conTeXt
> \page[yes]
> \input ng-aritmetica-sencers-operacions.conTeXt
> \page[yes]
> \input ng-aritmetica-fraccions-operacions.conTeXt
> \page[yes]
> \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt
> \page[yes]
> \input ng-aritmetica-percentatges.conTeXt
> \page[yes]
> \input ng-aritmetica-problemes-nombres-sencers.conTeXt
> \page[yes]
> \input ng-aritmetica-problemes-nombres-fraccions.conTeXt
> \page[yes]
> \input ng-aritmetica-arrodoniment-i-truncament.conTeXt
> \page[yes]
> \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt
> \page[yes]
> \input ng-aritmetica-sequencies.conTeXt
> \page[yes]
> \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt
> \page[yes]
> \input ng-aritmetica-propietats-de-les-potencies.conTeXt
> \page[yes]
> \input ng-aritmetica-notacio-cientifica-calcul.conTeXt
> \page[yes]
> \input ng-aritmetica-notacio-cientifica-problemes.conTeXt
> \stoppart
>
> \startpart[title=Relacions entre variables]
>
> \input ng-relacions-variables-proporcionalitat-directa.conTeXt
> \page[yes]
> \input ng-relacions-variables-percentatges-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-repartiments-proporcionals.conTeXt
> \page[yes]
> \input ng-relacions-variables-proporcionalitat-inversa.conTeXt
> \page[yes]
> \input ng-relacions-variables-conversio-unitats.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-lineal-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-afi-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt
> \stoppart
>
> \startpart[title=Àlgebra]
> \input ng-algebra-equacions-primer-grau.conTeXt
> \page[yes]
> \input ng-algebra-equacions-segon-grau.conTeXt
> \page[yes]
> \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt
> \page[yes]
> \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt
> \page[yes]
> \input
> ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt
> \stoppart
>
> \startpart[title=Geometria]
>
> \input ng-geometria-teorema-de-Pitagores.conTeXt
> \page[yes]
> \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-homotecies.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt
> \stoppart
>
> \startpart[title=Estadística]
> \input ng-estadistica-tipus-de-variables.conTeXt
> \page[yes]
> \input ng-estadistica.conTeXt
> \page[yes]
> \input ng-estadistica-parametres-dispersio.conTeXt
> \page[yes]
> \input ng-estadistica-grafics-i-diagrames.conTeXt
> \stoppart
>
> \startpart[title=Probabilitat]
> \input ng-probabilitat-experiments-simples.conTeXt
> \page[yes]
> \input ng-probabilitat-experiments-compostos.conTeXt
> \page[yes]
> \input ng-probabilitat-probabilitat-condicionada.conTeXt
> \page[yes]
> \input ng-probabilitat-algebra-de-successos.conTeXt
> \stoppart
>
> \stopbodymatter
>
>
> \startappendices
>
> \startpart[title=Apunts teòrics]
> \input ng-teoria-proporcionalitat-numerica.conTeXt
> \page[yes]
> \input ng-teoria-equacions-de-segon-grau.conTeXt
> \page[yes]
> \input ng-teoria-funcio-quadratica.conTeXt
> \page[yes]
> \input ng-teoria-teorema-de-Pitagores.conTeXt
> \page[yes]
> \input ng-teoria-apendix-figures-usuals-arees-volums.conTeXt
> \page[yes]
> \input ng-teoria-proporcionalitat-geometrica.conTeXt
> \page[yes]
> \input ng-teoria-estadistica.conTeXt
> \page[yes]
> \input ng-teoria-probabilitat.conTeXt
> \stoppart
>
> \stopappendices
>
> \startbackmatter
> \input ng-pre-continguts-aliens.conTeXt
> \page[yes]
> % Bibliografia
> \startchapter[title=Referències]
> \placelistofpublications
> \stopchapter
> %% Índex alfabètic
> \completeindex
> \stopbackmatter
>
>
>
> \stoptext
>
> 

[NTG-context] Re: split align in formulas

2023-08-14 Thread Mikael Sundqvist
Hi,

On Mon, Aug 14, 2023 at 5:13 PM Xavier B.  wrote:
>
> I have this text and the end of the paragraph:
>
> Definitivament és el mètode més senzill. L'atribució més antiga que conec 
> d'aquest mètode és de James Tanton \cite{canvi-variable-equacio-segon-grau, 
> james-tanton-web}.
> \placeformula[eq:james-tanton-canvi-de-variables]
> \startformula
> \startalign
> \NC ax^2 + bx + c = 0 \NC \NR
> \NC ax^2 + bx = -c \NC \quad \text{transposem } c\NR
> \NC x^2 + \frac{b}{a} x = - \frac{c}{a} \NC \quad \text{dividim per }a\NR
> \NC x \left( x + \frac{b}{a} \right) = - \frac{c}{a} \NC \quad 
> \text{factoritzam} \NR
> \NC (k-D)(k+D) = - \frac{c}{a} \NC \quad \text{canvi de variable} \NR
> \NC k^2 - D^2 = - \frac{c}{a} \NC \quad \text{suma per diferència} \NR
> \NC k = \pm\sqrt{ D^2 - \frac{c}{a}} \NC \quad \text{resolem l'equació} \NR
> \NC x = k - D = \NC \pm \sqrt{ D^2 - \frac{c}{a}} - D\quad \text{desfeim el 
> canvi} \NR
> \stopalign
> \stopformula
> on $D = (\frac{b}{2a})$ i $x = k-D$.
>
>
> and then the formula goes to next page. Is there any way to split align 
> environment? In wiki I could not find nothing.

No, align does not split over pages. But ordinary formulas do. You can
play with \alignhere and \breakhere, and add text with
\texthere[right]{some text} or \texthere[left]{some other text}.

/Mikael

(I think I would write sentences and a few formulas instead of
stacking them all like this)
___
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 aligns in formulasjj

2023-08-14 Thread Mikael Sundqvist
Hi,

I do not understand what you want to have, so here is just something
weird, but probably you look for simplealign.

\definemathsimplealign
[whatever]

\starttext
\startformula
\startalign
\NC a = \NC (b, c) \quad \mtext{with}\NR
\NC \NC \startwhatever
\NC b \NC = something \NR
\NC c \NC = someother \NR
\stopwhatever \NR
\NC somelong = \NC bla \NR
\stopalign
\stopformula
\stoptext

/Mikael

On Mon, Aug 14, 2023 at 1:20 PM Gerion Entrup  wrote:
>
> Hi,
>
> I try to typeset a nested align in a formula. However, the results looks
> really wrong. Here is a MWE:
>
> ```
> \starttext
> \startformula
> \startalign
> \NC a = \NC (b, c) \quad \text{with}\NR
> \NC   \NC \startalign
> \NC b \NC = something \NR
> \NC c \NC = someother \NR
>   \stopalign \NR
> \NC somelong = \NC bla \NR
> \stopalign
> \stopformula
> \stoptext
> ```
> Am I doing something wrong or are nested aligns not possible?
>
>
> Best,
> Gerion
> ___
> 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: Why overbar is so big

2023-08-13 Thread Mikael Sundqvist
Hi,

On Sun, Aug 13, 2023 at 9:13 AM Xavier B.  wrote:
>
> So,
>
> Finally is it a bug in MKIV? It seems you fix some kind of bug in your 
> messages. Is it true?
>
> > The output with Luametatex is correct but Luatex creates a raised bar
> > (and different linebreaking).
> >
> > \showglyphs
> >
> > \startTEXpage[offset=1ex]
> >  \ruledhbox{$\overline{OA} = \overbar  {OA} = 4.2$}
> >  \par
> >  \ruledhbox{$\underline   {OA} = \underbar {OA} = 4.2$}
> >  \par
> >  \ruledhbox{$\widetilde   {OA} = \widebar  {OA} = 4.2$}
> >  \par
> >  \ruledhbox{$\overbracket {OA} = \underbracket {OA} = 4.2$}
> > \stopTEXpage
> >
> > I'll add a 'force fix in spite of extensible being present' in mkiv. In
> > lmtx we always fix also because we drop in nicer shapes (watch the round
> > tips in lm and fancy tips in antykwa) and concluded that fonts will
> > remain as they are.
> >
> > Hans
>
> As you suggested, I will give a try to LMTX but be aware most user still use 
> MKIV until most distros upgrade the texlive version of context to LMTX.
>
> Regards,
> Xavier

One can also try to instead use the accent mechanism instead of a stacker:

% engine=luatex

\definemathtopaccent[widebar] ["0305]

\startTEXpage[offset=3pt]
$\overbar{OA}$

$\widebar{OA}$
\stopTEXpage

The \widebar is defined (almost) like that in lmtx.

/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: Fira Math: goodies needed?

2023-07-22 Thread Mikael Sundqvist
Hi Leah,

On Sat, Jul 22, 2023 at 12:19 AM Leah Neukirchen  wrote:
>
> Hi,
>
> I'm trying to use Fira Math (https://github.com/firamath/firamath).
>
> But this small example yields both limits on the same horizontal axis,
> i.e. the 0 is far away from the integral sign:
>
>
> \definefontfamily [mainface] [mm] [Fira Math]
> \setupbodyfont[mainface]
>
> \starttext
> \startformula
>   \int_0^1 e^x
> \stopformula
> \stoptext
>
>
> Meanwhile, when I use LaTeX, the 0 is moved to the left and close to
> the integral sign:
>
>
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage[mathrm=sym]{unicode-math}
> \setmathfont{Fira Math}
>
> \begin{document}
> \[
>   \int_0^1 e^x
> \]
> \end{document}
>
>
> In both cases
> /opt/texlive/2023/texmf-dist/fonts/opentype/public/firamath/FiraMath-Regular.otf
> is used...
>

As far as I remember, we did not consider firamath usable last time we
tested. Is it OK?

Attached you find a very basic goodie file that 1) set the
primeshiftup parameter and 2) enables presets.moveintegrals. Also add

\definefontfeature[default][default][goodies=fira-math.lfg]

to use it.

/Mikael


fira-math.lfg
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://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: context-on-web broken

2023-07-08 Thread Mikael Sundqvist
On Fri, Jul 7, 2023 at 11:19 PM Aditya Mahajan  wrote:
>
> On Mon, 26 Jun 2023, Hans Hagen via ntg-context wrote:
>
> > On 6/26/2023 7:53 PM, Aditya Mahajan via ntg-context wrote:
> > > On Mon, 26 Jun 2023, Miguel Diaz via ntg-context wrote:
> > >
> > >> indeed it is a simple simulation of overleaf (for latex).
> > >
> > > FWIW, context works on overleaf as well!
> > >
> > > Simply create a `latexmkrc` file with the following content:
> > >
> > > ```
> > > $pdflatex="context --synctex=1 --result=output %S; cp output.log
> > > /compile/output.log;cp output.pdf /compile/output.pdf";
> > > $recorder=0;
> > > $pdf_mode=1;
> > I found back this link:
> >
> > https://davidcarlisle.github.io/latexcgi/testc
> >
> >
> > % !TEX mtxrun --script context
> >
> > \starttext
> >
> > \dorecurse{500}{\samplefile{tufte}\par}
> >
> > \stoptext
> >
> > Runs 113 pages in 1.13 sec so quite ok for a remote un I guess.
> >
> > I'm not sure how up to date it is.
>
> 2023.05.05 18:36, so very recent.
>
> https://texlive.net/run?%25!TEX%20mtxrun%20--script%20context%0A%0A%5Cstarttext%0A%5Ccontextversion%0A%5Cstoptext%0A
>
> Aditya

David kindly made available

https://texlive.net/run?context

to start with a minimal context file. This is very convenient for
small tests if one happens to be at a computer that does not have
context installed (why that would be).

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

Re: [NTG-context] Off topic: Does a 'free for commercial use' flared-sans font exist in the world?

2023-06-16 Thread Mikael Sundqvist via ntg-context
Hi,

On Fri, Jun 16, 2023 at 6:36 PM Gerben Wierda via ntg-context
 wrote:
>
> I know this is off topic, but I suspect this community is actually one of the 
> best places to find an answer.
>
> I really like Optima, and what I really like about it is the 'flared style'.
>
> But I would like to move to a flared-sans font that gives me more licensing 
> freedom. I haven't been able to find one after extensive searching. The only 
> one who were reasonably priced (not free) were the URW Classico ones in Adobe 
> Creative Cloud, but those can only be used in Adobe programs like InDesign 
> (and not TeX).
>
> I found some flared-sans fonts, but not one with at least regular, italic, 
> bold, and bold-italic.
>
> Is there really not a single flared-sans font that is really free (so also 
> for commercial use) to use out there?
>

Maybe you like libertinus sans (linux biolinum)?

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


Re: [NTG-context] Fallbacks in text font interfere with math accents

2023-06-10 Thread Mikael Sundqvist via ntg-context
Hi,

On Sat, Jun 10, 2023 at 10:06 AM Henning Hraban Ramm via ntg-context
 wrote:
>
> Hi, this is probably for Hans & Mikael, but maybe someone else has a hint:
>
> If I set a fallback for my body font to catch all missing characters,
> some math accents get replaced by small bold uppercase characters (I
> found hat by K and ring by T so far).
>
> I tried [fallbacks=] for math to no avail.
>
> My example uses Cambria, but it’s the same with other fonts.
>
> (BTW, in \bar{b} with Libertinus, the bar looks too high.)

I leave the font fallbacks to Hans or somebody else, but for the \bar
one can argue that the "305 glyph in Libertinus Math sits too high.
This is adjusted for in the goodie file in the next upload.

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


Re: [NTG-context] Moving up a Figure

2023-06-05 Thread Mikael Sundqvist via ntg-context
Hi,

On Mon, Jun 5, 2023 at 4:03 AM Jeroen via ntg-context
 wrote:
>
> Not fully, it indeed moves up the figure but a little too much. Is there a 
> more granular method?

Not that I know of, but maybe {right,halfline} will do?

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


Re: [NTG-context] TiKz with LMTX

2023-06-04 Thread Mikael Sundqvist via ntg-context
Hi Floris,

On Sun, Jun 4, 2023 at 11:59 PM Floris van Manen via ntg-context
 wrote:
>
>
>
> On 04/06/2023 18:18, Hans Hagen via ntg-context wrote:
> > can you try with
> >
> >   -- "source/generic/**",
> >
> > in
> >
> >mtx-install-imp-tikz.lua
> >
> > (comment line 25)
>
>
> does not make a difference here.

For whatever it is worth, I just tried to install tikz with

mtxrun --script install-modules --install tikz

and then your example in your first mail did compile here (and gave a
cross, and that looks right from the source).

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


Re: [NTG-context] Moving up a Figure

2023-06-03 Thread Mikael Sundqvist via ntg-context
Hi,

On Sat, Jun 3, 2023 at 6:36 PM Jeroen via ntg-context
 wrote:
>
> With the following example, the figure is placed a little lower than the 
> first text line. The top of the figure is at about the middle of the first 
> line. Is there a way to move-up the figure slightly to align it with the top 
> of the text line?
>
> \useMPlibrary[dum]
>
> \starttext
>
> \startplacefigure
>   [number=no,
>location=right]
>   \externalfigure[dummy]
> \stopplacefigure
>
> \samplefile{tufte}
>
> \stoptext

Maybe

location={right,high}

is what you look for?

/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] Mailing list problems

2023-05-28 Thread Mikael Sundqvist via ntg-context
Hi!

See https://tex.stackexchange.com/q/687020/52406. The OP there cannot subscribe.

Looking at the web archive, it indeed seems to be missing several
emails: https://www.mail-archive.com/ntg-context@ntg.nl/

I do not know who handles this, but... Ping!

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


Re: [NTG-context] How to really force figure to appear "here"?

2023-05-21 Thread Mikael Sundqvist via ntg-context
Hi,

On Sun, May 21, 2023 at 3:48 AM Joel via ntg-context  wrote:
>
> I have been using \placefigure[here, force] to place some graphics, but its 
> instead showing other text from the next section, then the picture. In 
> testing, this is causing readers to be confused, as they expect to see a 
> picture, but its somehow appearing two pages later. I don't care it it 
> requires a huge blank area on the page before it, how can I make it so any 
> text after \placefigure[here, force] doesn't appear before the figure?
>
> --Joel

You submit no example, but with the one I tried, \placefigure[force]
seems to place the figure at the place where it is called. Doesn't
that work for you?

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


Re: [NTG-context] This is rmally done by loading special math fonts into the math family slots.

2023-05-09 Thread Mikael Sundqvist via ntg-context
On Tue, May 9, 2023 at 4:20 PM Carlos via ntg-context
 wrote:
>
>
>
> Hello list
>
> the whole error message I get is
>
> tex error   > tex error on line 90 in file ./atestinminion-context.mkiv: 
> Math error: parameter 'operatorsize' with id 8 in style 0 is not set
>
>  \m_operator_text
> \endgroup \Ustopmathmode
>  \m_operator_text
> \stopforceddisplaymath
> \egroup \ifcase \c_strc_formulas_frame_mode \else 
> \strc_math_number_check_offsets \fi \ifcase \c_strc_formulas_frame_mode 
> \strc_math_number_check \or \strc_math_number_check_outside \else 
> \strc_math_number_check_inside \fi \str
>  \m_operator_text
> \endgroup \strc_formulas_endstrut \stopinnermath
> \afterdisplayspace \egroup
>  \m_operator_text
> \strc_formulas_place_number \strc_formulas_flush_number \dostarttagged 
> \t!formulacontent \empty \dotagregisterformula \c_strc_formulas_n \csname 
> \e!stop \formulaparameter \c!alternative \v!formula \endcsname
> \dostoptagged \dostoptagged \nonoindentati
> 
> \stopformula
>
> \startformula
> \int_{\infty}
> >>  \stopformula
>
> Sorry, but I can't typeset math unless various parameters have been set. This 
> is
> normally done by loading special math fonts into the math family slots. Your 
> font
> set is lacking at least the parameter mentioned earlier.
>
> What parameter is this referring to here?

Looks like you might not have the Minion math font. Did you buy it?

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


Re: [NTG-context] new units

2023-05-07 Thread Mikael Sundqvist via ntg-context
Hi Michael,

On Sun, May 7, 2023 at 4:43 AM Michael Urban via ntg-context
 wrote:
>
> If you are going to introduce new units, you should at least include the 
> Potrzebie, invented by teenager Donald Knuth and published in the humor 
> magazine Mad Magazine #33.  The system is based on the thickness of Mad 
> Magazine #26, equal to 2.2633484517438173216473 mm.
> See the Wikipedia entry for 'potrzebie' for more information, or search for 
> suitable images.
>
> Honestly, I don't know how Knuth resisted putting this in plain TeX.

It is already there for a while, as dk.

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


Re: [NTG-context] define math function with \, inside

2023-05-01 Thread Mikael Sundqvist via ntg-context
Hi,

On Mon, May 1, 2023 at 5:27 PM Stefan Haller via ntg-context
 wrote:
>
> Hi all,
>
> I wanted to define a custom math function (similar to log etc.) for
> argmax. However, I wanted to have a small space between "arg" and "max"
> and limits should work properly. I am using a up-to-date LMTX installation.
>
> Without the first constraint it's easy:
>
> > % old way:
> > \definemathcommand[argmax][limop]{\mfunction[argmax]}
> > % new way, discoverd by looking into math-def.mkxl
> > \definemathfunction[argmax]
>
> However, both methods do not work if I want to have "arg\,max" printed
> (error about \endcsname missing). With mkiv the first method works and
> can also be found in the wiki[1].
>
> What's the current way to define such a custom math function?
>
> Thanks!
> Stefan
>
> [1]: https://wiki.contextgarden.net/Math/functions

This works here (but maybe there should be a simpler way):

\definemathfunction
  [argmax]
  [mathlimits=auto]

\setupmathlabeltext
  [en]
  [argmax=arg\sixperemspace max]

\startTEXpage[offset=1ts]
\im{
  \argmax_{a\in A} f(a)
}
\blank[big]
\dm{
  \argmax_{a\in A} f(a)
}
\stopTEXpage

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


Re: [NTG-context] Reminder: regular online meet-up

2023-04-19 Thread Mikael Sundqvist via ntg-context
Hi all,

On Wed, Apr 12, 2023 at 1:40 PM Hans Hagen via ntg-context
 wrote:
>
> On 4/12/2023 1:35 PM, Henning Hraban Ramm via ntg-context wrote:
> > Reminder: This is in less than 2 hours.
> >
> > I’m sick and can’t participate this time.
> >
> > Hraban
> we can shift it one week as I have to go mid afternoon
>
> Hans

Does this mean that there is a meeting today? (In about 43 minutes from now.)

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


Re: [NTG-context] upload

2023-04-14 Thread Mikael Sundqvist via ntg-context
Hi,

On Fri, Apr 14, 2023 at 5:40 PM Alexandre Christe via ntg-context
 wrote:
>
> Sorry, \setupmathematics[ucgreek=normal] does the job. Nothing to do with the 
> last upload.

Yes, but I think the default has been normal (upright), and when I
test with a minimal document here, it is still upright.

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


Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Mikael Sundqvist via ntg-context
Hi,

On Wed, Apr 12, 2023 at 1:41 PM Hans Hagen via ntg-context
 wrote:
>
> On 4/12/2023 5:45 AM, Gavin via ntg-context wrote:
> > Hi List,
> >
> > I’m looking for a way to include Feynman diagrams in my ConTeXt documents. 
> > I’ve used feynMF/feynMP and TikZ-feynman with LaTeX in the past, but it 
> > doesn’t look like either works directly with ConTeXt. My diagrams are 
> > pretty basic (example below). Does anyone have a ConTeXt solution they 
> > like? If not, I’ll add it to my list of summer MetaPost projects.
> Maybe Alan's node module can do the work,
>
> Hans
>

We were looking a bit at other feynman packages. It would be nice to
have a not too complicated syntax, but maybe just have some of the
"shapes" of paths available. So, which ones are actually needed?

/Mikael (after discussing with Hans)
___
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] How to use noto sans math font?

2023-04-06 Thread Mikael Sundqvist via ntg-context
Hi all,

On Thu, Apr 6, 2023 at 9:44 AM Mikael Sundqvist  wrote:
>
> I will have to check, but a bit later. Meeting with my student soon.
>
> /Mikael (who did not run the output from ChatGPT. Looked to me as if it was 
> the wrong way to give flags to shutdown anyways...)

Sorry for that, I thought I was answering Hans, and tried to answer
two mails in one.

I don't know how the font is supposed to be used. I looked into it,
and found that these alphabets (I only give the first entry) are
indeed sans serif.

0041: an uppercase sans serif A
0061 a lowercase sans serif a
0391 an uppercase sans serif Alpha
03B1 a lowercase sans serif alpha

For the rest of the alphabets, it seems to me (but I might have missed
something) that the font follows the usual pattern, with for example
the lowercase italic alphabet (starting with 1D44E for lowercase
italic a), with serifs.

It has some arabic glyphs. I have not compared to see if they are the
same as the ones from Xits.

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


Re: [NTG-context] How to use noto sans math font?

2023-04-06 Thread Mikael Sundqvist via ntg-context
I will have to check, but a bit later. Meeting with my student soon.

/Mikael (who did not run the output from ChatGPT. Looked to me as if it was
the wrong way to give flags to shutdown anyways...)

Den tors 6 apr. 2023 09:07Hans Hagen via ntg-context 
skrev:

> On 4/6/2023 6:59 AM, Mikael Sundqvist via ntg-context wrote:
> > Hi,
> >
> > On Thu, Apr 6, 2023 at 2:56 AM Li Yanrui (李延瑞) via ntg-context
> >  wrote:
> >>
> >>
> >>
> >> Mikael Sundqvist via ntg-context  于2023年4月5日周三
> 18:26写道:
> >>>
> >>> Hi,
> >>>
> >>> No intend to be complete or so (not by computer either, so could not
> look into it), it was just for a test a while back. But it could serve as a
> start.
> >>>
> >>> /Mikael
> >>
> >>
> >> Hi Mikael,
> >>
> >> Thanks for your reply. I used the typescript you provided but still get
> the error as below
> >>
> >>Math error: parameter 'supshiftup' with id 51 in style 2 is not set
> >
> > OK. I see the link to google fonts above. I am not sure they have the
> > latest version. There were lots of fixes in this font recently (in
> > particular I think a math table was added, so that the font really is
> > identified as a math font, but I might be wrong about that). The one I
> > used was downloaded from
> >
> > https://github.com/notofonts/math/releases/tag/NotoSansMath-v2.539
> >
> > and that still seems to be the latest. I now compiled my file again,
> > and still no error here.
> Wondering. I didn't check but why start with a sans math and not a serif
> ... are the sans alphabets replaced by a serif?
>
> 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
>
> ___
>
___
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] How to use noto sans math font?

2023-04-05 Thread Mikael Sundqvist via ntg-context
Hi,

On Thu, Apr 6, 2023 at 2:56 AM Li Yanrui (李延瑞) via ntg-context
 wrote:
>
>
>
> Mikael Sundqvist via ntg-context  于2023年4月5日周三 18:26写道:
>>
>> Hi,
>>
>> No intend to be complete or so (not by computer either, so could not look 
>> into it), it was just for a test a while back. But it could serve as a start.
>>
>> /Mikael
>
>
> Hi Mikael,
>
> Thanks for your reply. I used the typescript you provided but still get the 
> error as below
>
>   Math error: parameter 'supshiftup' with id 51 in style 2 is not set

OK. I see the link to google fonts above. I am not sure they have the
latest version. There were lots of fixes in this font recently (in
particular I think a math table was added, so that the font really is
identified as a math font, but I might be wrong about that). The one I
used was downloaded from

https://github.com/notofonts/math/releases/tag/NotoSansMath-v2.539

and that still seems to be the latest. I now compiled my file again,
and still no error here.

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


Re: [NTG-context] How to use noto sans math font?

2023-04-05 Thread Mikael Sundqvist via ntg-context
Hi,

No intend to be complete or so (not by computer either, so could not look
into it), it was just for a test a while back. But it could serve as a
start.

/Mikael

Den ons 5 apr. 2023 12:07Li Yanrui (李延瑞) via ntg-context 
skrev:

> Hi,
>
> I try to use the Noto Sans Math fnt which can be downloaded from
> https://fonts.google.com/noto/specimen/Noto+Sans+Math
>
> But I use it like the following
>
> \definefontfamily[myfonts][rm][latin modern roman]
> \definefontfamily[myfonts][mm][noto sans math]
> \setupbodyfont[myfonts,rm,12pt]
> \starttext
> Test Noto Sasn Math Fonts
> \startformula
> a^2 \quad \sqrt{a}
> \stopformula
> \stoptext
>
> I get the errors `Math error: parameter 'supshiftup' with id 51 in style 0
> is not set'.
>
> Is there some method to solve it?
>
>
> --
> Best regards,
>
> Li Yanrui
>
> ___
> 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
>
> ___
>


type-imp-noto.mkiv
Description: Binary data


230320-2.mkxl
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://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] update / punctuation / math

2023-04-02 Thread Mikael Sundqvist via ntg-context
Hi,

On Sun, Apr 2, 2023 at 11:29 AM luigi scarso via ntg-context
 wrote:
>
>
>
> On Sun, 2 Apr 2023 at 10:35, luigi scarso  wrote:
>>
>>
>>
>> On Sat, 1 Apr 2023 at 10:28, Hans Hagen via ntg-context  
>> wrote:
>>>
>>> Hi,
>>>
>>
>> As a side note (it's 2 april now)
>> the concrete font of the pdf  is not rendered well both on web and t on 
>> win/linux desktop .
>> No surprise,  I did some experiments  with mflua years ago and  my results  
>> had the same problem.
>
>
> getting old... the pdf doesn't look so bad as I was used to remember
> https://meeting.contextgarden.net/2017/talks/2017-09-14-luigi-mflua/slides.pdf
>
> So yes , it's the instance of the variable font.

Oh, that looks like a very nice talk, I wish I had been there.

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


Re: [NTG-context] update / punctuation / math

2023-04-02 Thread Mikael Sundqvist via ntg-context
Hi,

On Sun, Apr 2, 2023 at 10:35 AM luigi scarso via ntg-context
 wrote:
>
>
>
> On Sat, 1 Apr 2023 at 10:28, Hans Hagen via ntg-context  
> wrote:
>>
>> Hi,
>>
>
> As a side note (it's 2 april now)
> the concrete font of the pdf  is not rendered well both on web and t on 
> win/linux desktop .
> No surprise,  I did some experiments  with mflua years ago and  my results  
> had the same problem.
> Is it a known issue?

If you talk about the math font, I do not see what you mean. Daniel
has worked a lot on his fonts, and they now work well.

If you talk about the text font, Hans changed the concrete typescript
so that it uses the variable "mono" Latin modern instead of the
concrete text font that comes from Computer modern unicode. But the
font is also boldened slightly, and perhaps that is what causes your
problem (It did look weird on my phone for half a second or so before
it "got normal"). In okular I see no problems.

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


Re: [NTG-context] \definemathfence broken in latest

2023-03-26 Thread Mikael Sundqvist via ntg-context
Hi,

I think command=yes was changed into define=yes.

/Mikael

Den sön 26 mars 2023 04:31Gavin via ntg-context  skrev:

> Hi List,
>
> The command \definemathfence seems to not be working as it did in other
> recent LMTX. MWE:
>
> \definemathfence[abs][bar][command=yes]
>
> \starttext
> \startformula
> \abs{v} = \frac{1.32}{1.41} = 0.935
> \stopformula
> \stoptext
>
> This causes an error, complaining that \abs is undefined. However, workes
> fine with
>
> ConTeXt  ver: 2023.02.07 19:06 LMTX  fmt: 2023.3.14  int: english/english
>
> Should I be doing this differently?
>
> Gavin
>
> ___
> 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] Printing problem

2023-03-20 Thread Mikael Sundqvist via ntg-context
Hi!

On Fri, Mar 17, 2023 at 7:15 PM Pablo Rodriguez via ntg-context
 wrote:
>
> On 3/16/23 12:49, Mikael Sundqvist via ntg-context wrote:
> > [...]
> > So, a request: If you have an easy access to a printer, can you print
> > this page and report back if all of it comes out, or what is
> > happening?
>
> Hi Mikael,
>
> a friend printed the file on a Canon 4235i (from Windows 10 with Acrobat
> Reader DC), there were no printing problems and the result is
> high-quality output (as I would expect from many ConTeXt-generated
> documents).
>
> Just in case it might help,
>
> Pablo

Thanks to all who tested. In the end I was not able to reproduce the
problem when printing from another computer that runs linux. I can
only reproduce when printing from the built-in pdf viewer in Chrome
OS. It only seems to happen when extensibles are "converted" into
type3 snippets (so that one can copy a big parentheses that has pieces
and get the correct unicode character, for example). This can be
disabled with

\disabledirectives[math.extensibles]

and I can use that when printing from this computer. I should probably
report somehow to Google, but that seems less clear how to do, if
possible.

Thanks again!

/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] Printing problem

2023-03-16 Thread Mikael Sundqvist via ntg-context
Hi all,

I have had some printing problems lately, and it is not perfectly
clear to me (or to Hans, we have discussed this a bit) whether it is
the printer that has a lack of memory or if the pdf files are somehow
corrupted. It might have to do with type3 fonts.

I attach a pdf file that does not print on our printer at work. Or
well, it prints almost all of the page, but stops at the word
"negativa" (or was it "egenvärden", I do not have the printout here
right now). Then the printer also prints an error report about some
"offending command".

So, a request: If you have an easy access to a printer, can you print
this page and report back if all of it comes out, or what is
happening?

Thanks

/Mikael


dugga.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://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] Table

2023-03-13 Thread Mikael Sundqvist via ntg-context
Hi Uschi,

On Mon, Mar 13, 2023 at 1:03 PM Ursula Hermann via ntg-context <
ntg-context@ntg.nl> wrote:

> I’d like to do a Table lik this one
>
> [image: enter image description here]
>
> I have no example. How can I do that?
>
>
>
> Many thanks
>
> Uschi
>

There are probably better ways, but this seems to give something like what
you look for:

\starttext

\setupTABLE[c][align=middle]
\setupTABLE[c][odd][width=2em]
\setupTABLE[c][even][width=1mm]
\setupTABLE[r][2][height=1mm]
\setupTABLE[c][1][leftframe=off]
\setupTABLE[c][5][rightframe=off]

\bTABLE
\bTR
\bTD 1 \eTD \bTD \eTD \bTD 2 \eTD \bTD \eTD \bTD 3 \eTD
\eTR
\bTR
\bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD
\eTR
\bTR
\bTD 4 \eTD \bTD \eTD \bTD 5 \eTD \bTD \eTD \bTD 6 \eTD
\eTR
\bTR
\bTD 7 \eTD \bTD \eTD \bTD 8 \eTD \bTD \eTD \bTD 9 \eTD
\eTR
\eTABLE

\stoptext

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

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


Re: [NTG-context] Math Formula Alignment

2023-02-18 Thread Mikael Sundqvist via ntg-context
Hi,

On Sat, Feb 18, 2023 at 3:01 PM Lutz Haseloff via ntg-context
 wrote:
>
> Hi Hans, hi all,
>
> the alignment of formulas seems broken:
>
> \setuppapersize[A5]
> \starttext
> \setuplayout[textwidth=8cm]
> \setupformulas[align=left]
> \startformula c^2 = a^2 + b^2 \stopformula
> \setupformulas[align=middle]
> \startformula c^2 = a^2 + b^2 \stopformula
> \setupformulas[align=right]
> \startformula c^2 = a^2 + b^2 \stopformula
> \setupformulas[align=left]
> \placeformula \startformula c^2 = a^2 + b^2 \stopformula
> \setupformulas[align=middle]
> \placeformula \startformula c^2 = a^2 + b^2 \stopformula
> \setupformulas[align=right]
> \placeformula \startformula c^2 = a^2 + b^2 \stopformula
> \stoptext
>
> All formulas are centered with ConTeXt ver: 2023.02.14 17:44 LMTX
>
> Greetings Lutz

Indeed, but align=flushleft and align=flushright seems to work.

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


Re: [NTG-context] Makeup and page numbering increment

2023-02-15 Thread Mikael Sundqvist via ntg-context
Hi, and welcome back!

On Wed, Feb 15, 2023 at 11:42 AM Alex Leray via ntg-context
 wrote:
>
> Dear Context users,
>
> I'm new to this mailing-list. I've decided to use Context for two
> separate publications. My previous experience with Context was almost 10
> years ago and it seems like the resources on Context have greatly
> expanded. So thank you all!
>
> There is a little thing that I can't figure out though... In one of my
> document I have makeup pages. But inserting them result in wrong page
> numbering of subsequent pages. It appears that makeups do not increment
> page numbers.
>
> Is this a feature? How could re-establish the right page number for the
> rest of the document?
>
> Thank you in advance,
>
> Alex

Can you show a small example of this behavior?

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


Re: [NTG-context] Lucida-1.901 (2023-01-21) available

2023-01-25 Thread Mikael Sundqvist via ntg-context
On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
 wrote:
>
> Hi,
>
> Thanks Hraban for the information and the link to the article by Hans and 
> Mikael about the math fonts in Lucida.
>
> I very much appreciated that article: one sees how the handling of almost 
> impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So 
> a great thank you to Hans and Mikael for all this work!
>
> Regarding the details of vertical alignment in math, I wonder whether the 
> column « : » in front of the equal sign « = », in the combination « := » 
> (used to define for instance a new variable) should be alos centered around 
> the math axis, as explained in the article. For instance in the following 
> example
>
> \setupbodyfont[lucidaot,12pt]
> \starttext
> \startformula
> f(x) := -(u|x) := - \langle u, x \rangle
> \stopformula
> \stopformula
> \startformula
> f : A \longrightarrow B
> \stopformula
> \stoptext
>
> it seems to me that the lower dot (or square…) in the semicolumn of the first 
> formula (in front of the equal sign) is lower than in the second formula.
>
> Best regards: Otared

Thank you for the kind words, Otared,

Regarding the colons (and other symbols with "dots"), I would say it
is still not optimal in Lucida (and difficult to make it "consistent",
there are too many symbols that are at the moment different). But in
your example you can use \colonequals and \colon if you prefer. They
are centered around the math axis.

Best, Mikael

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) \colonequals - \langle u, x \rangle
\stopformula
\startformula
f : A \longrightarrow B \breakhere
f \colon A \longrightarrow B
\stopformula
\startformula
\mathaxisbelow := \colonequals : \colon
\stopformula
\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] Change in \vec behavior

2023-01-22 Thread Mikael Sundqvist via ntg-context
On Sun, Jan 22, 2023 at 9:21 AM Jean-Philippe Rey via ntg-context
 wrote:
>
> Hello,
>
> Does anyone have some insight on this issue?
>
> Thanks,
>
>
> Le 18 déc. 2022 à 19:37, Jean-Philippe Rey via ntg-context 
>  a écrit :
>
> Hello,
>
> As I usually do at the end of each year, I upgraded my ConTeXt installation. 
> I noticed a change in \vec behavior which doesn't extend the arrow anymore. 
> Here is my example:
>
> \starttext
> Engine: \texenginename\ \texengineversion
>
> \ConTeXt: \contextversionnumber
>
> \type{$\vec{AB}$} : $\vec{AB}$
> \stoptext
>
> The result with the latest ConTeXt version:
>
>
>
> and with the version from a year ago:
>
>
>
> I am aware that I could use \overrightarrow, but I prefer the shape and 
> position of the \vec arrow, especially with single letters.
>
>
> What is the rationale for the change in \vec? Is there a way to get the 
> previous behavior back?
>
> Thanks,

There was a similar thread the other day.

\definemathtopaccent[top:stretch][vec]["20D7]

seems to work as a temporary solution. Does it give what you expect?

I think there will be an update in the next few days.

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


Re: [NTG-context] bug $\vec{}$

2023-01-20 Thread Mikael Sundqvist via ntg-context
I think there is a change going on, try with

\definemathtopaccent[top:stretch][vec]["20D7]

for the moment. Does it look OK?

/Mikael

On Fri, Jan 20, 2023 at 2:45 PM Alexandre Christe via ntg-context
 wrote:
>
> I confirm the behavior.
>
> Also possibly linked is that the spacing around $\overrightarrow{k}$ seems 
> pretty weird, so atm there is no fallback solution.
>
>
>
> Le ven. 20 janv. 2023 à 14:37, Alan Braslau via ntg-context 
>  a écrit :
>>
>> MWE:
>>
>> \starttext
>>
>> $\vec{k}$
>>
>> \stoptext
>>
>> places the arrow *before* the symbol "k", latest download.
>>
>> Alan
>> ___
>> 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
___


Re: [NTG-context] MP figure continuation

2023-01-06 Thread Mikael Sundqvist via ntg-context
On Fri, Jan 6, 2023 at 3:43 PM Alexandre Christe via ntg-context
 wrote:
>
> Dear list,
>
> Is there a way to "continue" an MP figure? Like keeping the axes, etc. and 
> just adding code to the figure?
>
> Maybe I missed something, otherwise I'd find it super useful.
>
> Thanks in advance and happy new year,
> Alex

Hi Alex,

Maybe there are other ways, but one can use \includeMPgraphic. One
simple example given below.

/Mikael

\starttext
\startuseMPgraphic{vanderwaerdenbas}
u:=3cm ;

def vdwbas(expr x) = abs(x-round x) enddef ;

def vdw(expr n,x) =
  if n = 0:
vdwbas(x)
  else:
vdwbas(x*pow(4,n))/pow(4,n)
  fi
enddef ;

path xaxis, yaxis ;
xaxis = ((-1.1,0)--(1.1,0)) scaled u ;
yaxis = ((0,-0.1)--(0,0.6)) scaled u ;

drawarrow xaxis withpen pencircle scaled 0.25 ;
drawarrow yaxis withpen pencircle scaled 0.25 ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden0}
\includeMPgraphic{vanderwaerdenbas}
draw function(1,"x","vdw(0,x)",epsed(-1),epsed(1),1/1000) scaled u ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden1}
\includeMPgraphic{vanderwaerdenbas}
draw function(1,"x","vdw(1,x)",epsed(-1),epsed(1),1/1000) scaled u ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden2}
\includeMPgraphic{vanderwaerdenbas}
draw function(1,"x","vdw(2,x)",epsed(-1),epsed(1),1/1000) scaled u ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden3}
\includeMPgraphic{vanderwaerdenbas}
draw function(1,"x","vdw(3,x)",epsed(-1),epsed(1),1/1000) scaled u ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden01}
\includeMPgraphic{vanderwaerdenbas}
draw function(1,"x","vdw(1,x)+vdw(0,x)",epsed(-1),epsed(1),1/1000) scaled u ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden012}
\includeMPgraphic{vanderwaerdenbas}
draw function(1,"x","vdw(2,x)+vdw(1,x)+vdw(0,x)",epsed(-1),epsed(1),1/1000)
scaled u ;
\stopuseMPgraphic

\startuseMPgraphic{vanderwaerden0123}
\includeMPgraphic{vanderwaerdenbas}
draw 
function(1,"x","vdw(3,x)+vdw(2,x)+vdw(1,x)+vdw(0,x)",epsed(-1),epsed(1),1/1000)
scaled u ;
\stopuseMPgraphic

\startplacefigure[reference=fig:vdw]
\startcombination[nx=2,ny=4]
{\useMPgraphic{vanderwaerden0}}   {(a)}
{\useMPgraphic{vanderwaerden0}}   {(b)}
{\useMPgraphic{vanderwaerden1}}   {(c)}
{\useMPgraphic{vanderwaerden01}}  {(d)}
{\useMPgraphic{vanderwaerden2}}   {(e)}
{\useMPgraphic{vanderwaerden012}} {(f)}
{\useMPgraphic{vanderwaerden3}}   {(g)}
{\useMPgraphic{vanderwaerden0123}}{(h)}
\stopcombination
\stopplacefigure

\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] Math bug (maybe) - prime

2022-12-27 Thread Mikael Sundqvist via ntg-context
On Wed, Dec 28, 2022 at 5:58 AM Alan Braslau via ntg-context
 wrote:
>
> On Wed, 28 Dec 2022 00:27:39 +0100
> Hans Hagen via ntg-context  wrote:
>
> > What you can do is:
> >
> > $\primed{a}^2$
> >
> > which basically makes the prime an operation .. a small price to pay
> > for more robust handling of primes (also across fonts)
>
> I anticipated that (unicode) prime is a pain to handle, given that
> different fonts present it differently.
>
> $\primed{a}...$ is a very readable and reasonable solution (unlike
> \mathord{}, which seems to be a messy fix). I will learn and use that.
>
> Thank you!
>
> Alan
>
> P.S. inverting the order of the "exponents", if prime is some sort of
> exponent, was a surprising result.

Alan,

Note that the 2 sits higher in

\primed{a}^2

than it does in

(a')^2.

For readability, I really prefer the version with parentheses.

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


Re: [NTG-context] Sans Math fonts, for example Computer Modern Bright

2022-12-21 Thread Mikael Sundqvist via ntg-context
Hi,

Not by the computer, but you can try

\setupbodyfont[kpfonts-sans,ss]

I do not think we have tested it so much, so don't hesitate to come with
suggestions on how to improve.

Best, Mikael



Den ons 21 dec. 2022 15:38Oliver Sieber via ntg-context 
skrev:

> Hi there
>
> I am particularly looking for a sans serif font for math and text. I am
> asking, since I spent a lot of time on this subject. I used Fira Math, but
> it is extremely buggy and in my opinion to bold and the different font
> weights are definitely in beta status.
>
> Is it possible to use the Computer Modern Bright font from LaTex?
>
> Best regards
>
> Oli
>
> ___
> 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] Seems to be a bug with \definelayout

2022-12-10 Thread Mikael Sundqvist via ntg-context
On Sat, Dec 10, 2022 at 9:17 PM peter.hopcroft--- via ntg-context
 wrote:
>
> Yes Pablo, that does  fix it. I'm sorry, I misunderstood your first reply. 
> Peter

There was a request (by you?) some days ago on stackexchange about
altering layout on say "six pages from here" (One can now do
\definelayout[+6][height=16cm]). Maybe something got changed regarding
the reset when one does \definelayout[n] to alter the nth page? I will
double check with Hans.

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


Re: [NTG-context] \hpos in math - Half solved

2022-12-07 Thread Mikael Sundqvist via ntg-context
Hi,

On Thu, Dec 8, 2022 at 1:07 AM Gavin via ntg-context  wrote:
>
> Hi Hans and Mikael,
>
> This is amazing! Mikael's example works for me. I will start using these 
> tools in my project, and I’ll tell you how it goes.

Very good that it works and that it gets tested!

> It might be a couple weeks, because the physics is also quite challenging.

Haha, I can imagine that the spinors are even more challenging. Good luck!

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


Re: [NTG-context] TEXpage cropping math

2022-12-05 Thread Mikael Sundqvist via ntg-context
Hi,

One usually need an offset. Try

try \startTEXpage[offset=1sp]

/Mikael

On Mon, Dec 5, 2022 at 1:39 PM Gavin via ntg-context  wrote:
>
> Hi List
>
> I’m having trouble with \startTEXpage cropping off tops and bottoms of 
> equations. For example.
>
> \startTEXpage
>   $E_1$
> \stopTEXpage
>
> Produces:
>
> Any suggestions?
>
> Gavin___
> 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] Bug in math alignment

2022-11-02 Thread Mikael Sundqvist via ntg-context
Hi,

On Wed, Nov 2, 2022 at 9:19 PM Otared Kavian via ntg-context
 wrote:
>
> Dear Jeong,
>
> Thanks for testing my example, and pointing to the solution using \dm (which 
> I didn’t know…).
> I think the correct behaviour of math alignments should avoid using 
> additional commands such as \dm.
>
> We’ll see what Hans and Mikael say.
>
> Best regards: OK
>
> On 2 Nov 2022, at 12:53, Jeong Dal via ntg-context  wrote:
>
> Dear Otared,
>
>
> I think there is an issue with the size of math fonts in \frac when used in 
> math alignments, as it is is shown in the following example.
>
>
> I confirm what you said.
>
> However, if I use \dm{} instead of \displaystyle as following, then the 
> output is correct.
>
> \placeformula
> \startformula
> \startalignedcases
> \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR
> \NC \dm{\frac{\partial u}{\partial {\bi n}}}
> \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR
> \stopalignedcases
> \stopformula
> or this (with\type{\displaystyle} added)
> \placeformula
> \startformula
> \startalignedcases
> \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR
> \NC \dm{\frac{\partial u}{\partial {\bi n}}}
> \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR
> \stopalignedcases
> \stopformula
>
> In this example, it is OK to use \dm inside of \startformula … \stopformula.
> I am not sure that it is what Hans and Mikael want.
>
> Thanks,
>
> Best regards,
>
> Dalyoung
>
>

I think in this case it is better to use a mathsimplealign instead of a matrix.

\definemathsimplealign[pdeproblem][
left={\startmathfenced[cases]},
right=\stopmathfenced,
align={1:right,2:left,3:left},
strut=yes,
]

\definemathsimplealign[collected][
left={\startmathfenced[sesac]},
right=\stopmathfenced,
align={1:right,2:left,3:left},
strut=yes,
]

\starttext

\placeformula
\startformula
\startpdeproblem
\NC - \Delta u \NC = 0 \NC \qquad\text{in } \Omega \NR
\NC \frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC
\qquad\text{on } \partial\Omega \NR
\stoppdeproblem
\stopformula

\placeformula
\startformula
\startcollected
\NC - \Delta u \NC = 0 \NC \qquad\text{in } \Omega \NR
\NC \frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC
\qquad\text{on } \partial\Omega \NR
\stopcollected
\stopformula

\stoptext

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


Re: [NTG-context] Backgrounds has changed in latest lmtx

2022-10-23 Thread Mikael Sundqvist via ntg-context
On Sun, Oct 23, 2022 at 4:00 PM Thomas A. Schmitz via ntg-context
 wrote:
>
> On 10/23/22 15:51, Hans Hagen wrote:
> > there was another fix yesterday (already uploaded)
> >
> > Hans
>
> Ah sorry, I missed that! It runs with my test file now, thanks! But my
> real file dies with this error:
>
> fatal lua error:
>
>  registered function call [1141]:
> ...x/tex/texmf-context/tex/context/fonts/mkiv/xits-math.lfg:61: attempt
> to index a nil value (global 'presets')
> stack traceback:
>  ...x/tex/texmf-context/tex/context/fonts/mkiv/xits-math.lfg:61:
> in main chunk
>  [C]: in function 'dofile'
>  ...mtx/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:78:
> in function <...mtx/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:68>
>  (...tail calls...)
>
> mtx-context | fatal error: return code: 1
>
> which appears to be related to the new math code?
>
> All best
>
> Thomas

It works here. Are you sure that you updated to the latest? (There was
a few updates lately)

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


Re: [NTG-context] new upload

2022-10-17 Thread Mikael Sundqvist via ntg-context
On Mon, Oct 17, 2022 at 8:43 AM Otared Kavian via ntg-context
 wrote:
>
> Hi Mikael,

Hi Otared,

>
> I use Lucida in my documents and did not notice any problem with the 
> integrals and other large operators.
> Do you mean in the future I have to update to a new version of Lucida (and 
> pay again…) or will future versions of LuaMetaTeX handle correctly large 
> operators typeset in Lucida ?

In Lucida the integrals have almost been at the right place. See the
attached screenshot. To the left, the unfixed Lucida (first aligned at
the base line, and then centered around the math axis). To the right,
the same with fixed Lucida.

In the eulernova example that Aditya shows, the difference is much
bigger. The fixoldschool tweak fixes it, but it is of course better if
it gets fixed in the font.

Regarding the Lucida fonts: When you bought them you should have got
some login information. That should still work, and you should be able
to upgrade your fonts when released. I don't know how they (TUG) do
releases, though, if they send out information to all people who
bought the font. Hans and I are only involved in the fixing.

/Mikael

PS There are some other glyphs in Lucida that will be fixed. The <, >,
\oiint and \oiiint (displayed versions of the integrals). If you add
them (and, say also a = close to the < and >) to a document, and use
\showglyphs you will see why.
___
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] new upload

2022-10-16 Thread Mikael Sundqvist via ntg-context
Hi,

On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
 wrote:
>
> On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:
>
> > Hi,
> >
> > I uploaded a new version. Apart from a few fixes / extensions already
> > mentioned here (or known to those who wanted it) the main changes are in
> > the math goodie files (work in progress, we will clean them up later) as
> > part of improving the rendering of math.
>
> Something is wrong with the placement of limits around an integral with 
> NeoEuler:
>
> \usetypescriptfile[euler]
>
> \definetypeface[mainfont][rm][specserif][CharisSil][default]
> \definetypeface[mainfont][mm][math] [eulernova][default]
> \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
> features=none]
> \setupbodyfont[mainfont,10pt]
>
> \starttext
> \startTEXpage[offset=1mm]
>   $\displaystyle \int_{0}^{1} f(x) dx$
> \stopTEXpage
> \stoptext
>
> gives the attached result.

This is because the integral "sits wrong" in its boundingbox. Almost
all fonts have the glyph centered around the math axis, but there are
a few that doesn't. In euler-math.lfg, add the tweak

{
tweak = "fixoldschool",
},

In fact, we have not updated the euler goodie file for a while it
seems. I think there are more things that can be improved. Hopefully
before next release.

It can also be mentioned that some fonts (Daniel Flipo was quick to
fix concrete, erewhon and kpfonts) was fixed recently regarding this,
and it is reported on and fixed in development of Lucida.

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


Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Mikael Sundqvist via ntg-context
Hi,

On Sun, Oct 2, 2022 at 3:26 PM Hans Hagen via ntg-context
 wrote:
>
> On 10/2/2022 3:13 PM, Fabrice Couvreur via ntg-context wrote:
> > Ok, it works very well. Without wanting to insist, how to have the same
> > hatching with two different figures ?
> see upcoming mail from Mikael

Oh, OK, here it goes. Hans will probably rename things if he adds this.

\startMPpage[offset=1dk]

vardef Stripe(expr p, a, d) =
save thestripe ; picture thestripe ; thestripe := nullpicture ;
save diag ; numeric diag ; diag := 0.55*( abs((urcorner boundingbox p)
- (llcorner boundingbox p)) ) ;
thestripe := image (
draw (-diag,0) -- (diag, 0) &&
for i = d step d until diag:
(-diag, i) -- (diag, i) &&
(-diag,-i) -- (diag,-i) &&
endfor nocycle
withpen currentpen ;
) ;
thestripe := thestripe shifted center boundingbox p ;
thestripe := thestripe rotatedaround(center boundingbox p, a) ;
clip thestripe to p ;
thestripe
enddef ;


path p ; p := fullcircle scaled 3cm && (unitsquare scaled 2cm shifted
(4cm,4cm)) && cycle ;
fill p withcolor darkred ;
draw Stripe(p,30,.2cm) withcolor darkgreen ;

path q ; q := fullsquare randomized 0.3 scaled 3cm yshifted 5cm ;
fill q withcolor yellow ;
draw Stripe(q,70,.3cm) withcolor red ;

draw Stripe(p && q && cycle, -20, .5cm) withcolor "orange" ;

draw p ;
draw q ;

\stopMPpage

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


  1   2   >