[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-10-06 Thread Alan Braslau via ntg-context
Old mailing list post ...

I do not see any issues whatsoever with any viewer under FreeBSD, btw.

Alan



On Fri, 14 Jun 2024 11:44:34 +0200
Hans Hagen via ntg-context  wrote:

> > So it’s dependend on the screen rendering, anti aliasing settings
> > (that you usually can’t influence).
> 
> hm, so i have to stick to windows for viewing (and an ancient
> hardware laptop in order to avoid copilot and recall) but i'll check
> ubuntu anyway



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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] Faulty PDF output files after updating to version 2024.06.14

2024-06-16 Thread Ralph

Hi,


while trying out the new version of ConTeXt LMTX (2024.06.14 09:18) I 
encountered some problems related to the PDF output files.


First, I tried to print a single page of the excellent new math manual 
(many thanks to everyone involved in creating it, it’s great for 
beginners like me and surely for experienced users too), but I noticed 
that all of the extensibles in the formulas (like the bar in \frac, 
\sqrt, long integral signs, and probably more) have disappeared. 
Everything else was printed correctly.


After investigating, I found out that Okular on Linux converts the PDF 
file to PostScript before printing (at least on my system), and I was 
able to replicate this behavior by converting it manually to PostScript 
with Poppler (pdftops in.pdf out.ps) or Ghostscript (pdf2ps in.pdf out.ps).


Printing from Firefox was not affected for me as it did not convert to 
PostScript.


I was unable to reproduce this with my own documents (created with 
ConTeXt LMTX 2024.05.31 18:50), so I decided to try this with the new 
version. And with it, that was indeed reproducible.


To ensure that this is the PDF’s fault, I decided to try this on Windows 
with Adobe Acrobat Reader on a different Computer with another fresh 
installation of ConTeXt. But it wasn’t any better:


Adobe Acrobat Reader displayed two different error messages when trying 
to scroll through or zoom in on the math manual:
1. “An error exists on this page. Acrobat may not display the page 
correctly. Please contact the person who created the PDF document to 
correct the problem.”

2. “There was an error processing a page. A number is out of range.”
Sometimes the first one is shown, sometimes the second one.

Additionally, some parts of the manual were blank (they were displayed 
correctly in Okular, Firefox, and many more viewers), I suspect those 
who contain extensibles in formulas. Following example leads to the same 
behaviour:


\setuppapersize[S33]    % Just to make page smaller
\setupbodyfont[modern, 11pt]
\starttext
Hello.
\startformula
\frac{a^2 + b^2}{1} = c^2
\stopformula
\page
Hello.
\startformula
a^2 + b^2 = c^2
\stopformula
\stoptext

The first page is empty in Acrobat Reader, whereas it’s displayed 
correctly in all other PDF viewers I tried. But again, when converting 
to PostScript, the fraction bar vanishes. The second page is fine.


I attached the faulty example.pdf file and some screenshots of it opened 
in different PDF viewers, and of the math manual. The screenshot of the 
math manual opened in Acrobat Reader shows that the second half of the 
page is completely gone. example_pdftops-ps2pdf.pdf is example.pdf 
converted to PostScript with Poppler and then converted to PDF again 
with Ghostscript (attaching the PostScript file isn’t possible because 
of file size). Opened in Okular or other Poppler based viewers you’ll 
see a dot instead of the fraction bar (which gets infinitely smaller 
while zooming-in), and openend in Firefox, MuPDF or Acrobat Reader 
you’ll see a cut off bar.


One last thing, for some reason “\italiansqrt” on page 52 of the math 
manual is converted perfectly fine to PostScript (at least it looks right).


Please let me know if you would like me to provide more information.


Best,
Ralph


example.pdf
Description: Adobe PDF document


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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-15 Thread Hans Hagen via ntg-context

On 6/15/2024 10:59 AM, ralph.2...@email-postfach.info wrote:

Hi,

thank you all for your replies so far. I guess I’ll have to live with that for 
now (of course this isn’t really a problem, but a bit unpleasant to look at 
when you’re used to the straight lines in LaTeX). Just wanted to add that I can 
see this artifacts quite clearly on a 13 inch 1080p screen in the PDF viewer 
(depends on zoom level, on some zoom levels I see nothing) and not only when 
enlarging a screenshot. After all, it’s visible in my attached screenshots even 
if displayed in their original resolution. (Naming of my screenshots wasn’t 
very clear, zoomed.png is zoomed-in in the pdf viewer, not a zoomed-in 
screenshot.)
The "left radical + rule" isn't perfect either, because it depends on 
overlap. Depending on the font you can see issues at the connection 
(actually these might be obscured by aliasing at low res). You can try 
that outside lmtx with different fonts.


Also, because rules are often rendered differently from glyphs (and 
rules can use either a line or rectangle fill) it's always been an issue 
(which is also why engines have some heuristics for choosing one or the 
other method).


And, as mentioned, vertical extenders also use the same etechnology as 
we now use for radicals, it's just that there was never a concept like 
that in engines for radicals. Arrows sit in the same category and also 
use the same glyphs so there one can observe the same. Actually, even in 
traditional tex arrows are made from minusus and an arrowhead 
overlapping piecewise.


Maybe viewers will catch up.

Hans

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

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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-15 Thread ralph . 2718
Hi,

thank you all for your replies so far. I guess I’ll have to live with that for 
now (of course this isn’t really a problem, but a bit unpleasant to look at 
when you’re used to the straight lines in LaTeX). Just wanted to add that I can 
see this artifacts quite clearly on a 13 inch 1080p screen in the PDF viewer 
(depends on zoom level, on some zoom levels I see nothing) and not only when 
enlarging a screenshot. After all, it’s visible in my attached screenshots even 
if displayed in their original resolution. (Naming of my screenshots wasn’t 
very clear, zoomed.png is zoomed-in in the pdf viewer, not a zoomed-in 
screenshot.)

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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-14 Thread Taco Hoekwater


> On 14 Jun 2024, at 11:44, Hans Hagen via ntg-context  
> wrote:
> 
> On 6/14/2024 9:35 AM, Henning Hraban Ramm wrote:
>> Am 13.06.24 um 23:13 schrieb Hans Hagen via ntg-context:
>>> On 6/13/2024 10:04 PM, Otared Kavian wrote:
 Hi Ralph,
 
 I don’t see any pixels in the PDF file when I typeset your code snipet (on 
 MacOS 11.7.10). Here is what I get.
>>> No problems on windows on chrome-os either. Mikael S and I checked it on 
>>> his linux box and one can indeed see anti aliasing when taking a screen 
>>> dump (depends on resolution).
>>> 
>>> So it's a linux rendering issue when taking dumps.
>> Not only. It also happens with all(?) PDF viewers on MacOS – at least 10.14 
>> and 10.15, can anyone confirm with current versions?

Artifacts like mentioned were visible in Preview on my Mac (14.5) as well.

The PDF view in chrome on this Mac shows a slightly different artifact effect, 
see image below.

Neither bothers me, though. 

Best wishes,
Taco



— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)


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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-14 Thread Hans Hagen via ntg-context

On 6/14/2024 9:35 AM, Henning Hraban Ramm wrote:

Am 13.06.24 um 23:13 schrieb Hans Hagen via ntg-context:

On 6/13/2024 10:04 PM, Otared Kavian wrote:

Hi Ralph,

I don’t see any pixels in the PDF file when I typeset your code 
snipet (on MacOS 11.7.10). Here is what I get.
No problems on windows on chrome-os either. Mikael S and I checked it 
on his linux box and one can indeed see anti aliasing when taking a 
screen dump (depends on resolution).


So it's a linux rendering issue when taking dumps. 


Not only. It also happens with all(?) PDF viewers on MacOS – at least 
10.14 and 10.15, can anyone confirm with current versions?


So it’s dependend on the screen rendering, anti aliasing settings (that 
you usually can’t influence).


hm, so i have to stick to windows for viewing (and an ancient hardware 
laptop in order to avoid copilot and recall) but i'll check ubuntu anyway


It doesn’t affect printing – or does it for anyone? I can imagine 
printing from Firefox, i.e. pdf.js, is affected, since it prints only in 
screen resolution.
it's not related to math then, as there are also ligatures built this 
way, although often they often are less sensitive to thsi due to 
generous overlaps (unless they use a sequence of connecting strokes in 
the same direction)


also keep in mind that looking at a blown up character is not that 
realistic (for instance a traditional bitmap font might look great at 
600 or 1200 dpi at intended size so zooming in showing raggedness is not 
the normal way to see it)


btw, if one wants to observe inaccuracy, just zoom in in graphics made 
by drawing programs (even of famous companies)


Hans


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

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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-14 Thread Henning Hraban Ramm

Am 13.06.24 um 23:13 schrieb Hans Hagen via ntg-context:

On 6/13/2024 10:04 PM, Otared Kavian wrote:

Hi Ralph,

I don’t see any pixels in the PDF file when I typeset your code snipet 
(on MacOS 11.7.10). Here is what I get.
No problems on windows on chrome-os either. Mikael S and I checked it on 
his linux box and one can indeed see anti aliasing when taking a screen 
dump (depends on resolution).


So it's a linux rendering issue when taking dumps. 


Not only. It also happens with all(?) PDF viewers on MacOS – at least 
10.14 and 10.15, can anyone confirm with current versions?


So it’s dependend on the screen rendering, anti aliasing settings (that 
you usually can’t influence).


It doesn’t affect printing – or does it for anyone? I can imagine 
printing from Firefox, i.e. pdf.js, is affected, since it prints only in 
screen resolution.


Hraban

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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-13 Thread Hans Hagen via ntg-context

On 6/13/2024 10:04 PM, Otared Kavian wrote:

Hi Ralph,

I don’t see any pixels in the PDF file when I typeset your code snipet 
(on MacOS 11.7.10). Here is what I get.
No problems on windows on chrome-os either. Mikael S and I checked it on 
his linux box and one can indeed see anti aliasing when taking a screen 
dump (depends on resolution).


So it's a linux rendering issue when taking dumps. That said: we can't 
do anything about it. Using rules (traditional approach) is pretty bad 
in screen dumps and even regular rendering, depending on zoom; there one 
has interaction between the font rendering and other graphic elements 
(rules).


Btw, vertical extensibles are not different (take the bracket which has 
similar constructs). Interesting is that it is straight blob connections 
that can show these occasional gray pixels and it only seems to happen 
with a little overlap. Kind of a bug we think.


Hans

ps. One reason when I always use (x)ubuntu when i have to use a linux 
desktop is that it always was set up right wrt rendering fonts and anti 
aliasing. I might need to check that.


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

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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-13 Thread Bruce Horrocks


> On 13 Jun 2024, at 21:04, Otared Kavian  wrote:
> 
> Hi Ralph,
> 
> I don’t see any pixels in the PDF file when I typeset your code snipet (on 
> MacOS 11.7.10). Here is what I get.
> 
> Best regards: Otared
> 
> 

I see it on both - the original and Otared's.

Otared: If open yours (on MacOS 14.5) by double-clicking the image in the email 
and clicking zoom+ twice then the 'wobble' in the line is visible if you 
squint. 

Bound to be monitor and resolution dependent as well though - not sure how to 
provide settings that would be repeatable by others. Just go up and down zoom 
sizes looking carefully.

—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-13 Thread Otared Kavian
Hi Ralph,I don’t see any pixels in the PDF file when I typeset your code snipet (on MacOS 11.7.10). Here is what I get.Best regards: Otared

fraction-bar-pixels.pdf
Description: Adobe PDF document
On 13 Jun 2024, at 13:10, Ralph <ralph.2...@email-postfach.info> wrote:

  


  
  Hello,


I’m relatively new to ConTeXt (version 2024.05.31, LMTX,
standalone) and really enjoy learning it so far, but I have one
little problem with the appearance of horizontal bars in math
mode.

It seems the way ConTeXt displayed horizontal extensible bars in
math mode some time ago (as used in \frac, \sqrt, \overbar, ...)
was similar to the way LaTeX (PDFLaTeX and LuaLaTeX) and Plain
TeX handled this, but it has changed since then. Instead of one
bar there are now multiple characters attached to each other.

This makes it look more consistent with the font, but
unfortunately it doesn’t display well in any PDF viewer I’ve
tried (on Linux, so I’ve not tried Adobe Acrobat Reader). The
bars look dotted, I guess it’s due to anti-aliasing (the dots
disappear when anti-aliasing is disabled, but then of course
everything looks pixelated). Two screenshots are attached
(different zoom levels in PDF viewer) so that you know what I’m
talking about.

Source:
\setuppapersize[S3]
\starttext
\startformula \sqrt{a^2 + b^2} = \frac{1000 \cdot c}{1000}
\stopformula
\stoptext

Is there a way to switch to the old bars for documents viewed
mainly on screens, or is there any other way to improve their
appearance? I couldn’t find any documentation on this, so I
would be very thankful if somebody here could help out.


Best,
Ralph

  

___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nlwebpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive  : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___
Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95

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

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


[NTG-context] How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-13 Thread Ralph

Hello,


I’m relatively new to ConTeXt (version 2024.05.31, LMTX, standalone) and 
really enjoy learning it so far, but I have one little problem with the 
appearance of horizontal bars in math mode.


It seems the way ConTeXt displayed horizontal extensible bars in math 
mode some time ago (as used in \frac, \sqrt, \overbar, ...) was similar 
to the way LaTeX (PDFLaTeX and LuaLaTeX) and Plain TeX handled this, but 
it has changed since then. Instead of one bar there are now multiple 
characters attached to each other.


This makes it look more consistent with the font, but unfortunately it 
doesn’t display well in any PDF viewer I’ve tried (on Linux, so I’ve not 
tried Adobe Acrobat Reader). The bars look dotted, I guess it’s due to 
anti-aliasing (the dots disappear when anti-aliasing is disabled, but 
then of course everything looks pixelated). Two screenshots are attached 
(different zoom levels in PDF viewer) so that you know what I’m talking 
about.


Source:
\setuppapersize[S3]
\starttext
\startformula \sqrt{a^2 + b^2} = \frac{1000 \cdot c}{1000} \stopformula
\stoptext

Is there a way to switch to the old bars for documents viewed mainly on 
screens, or is there any other way to improve their appearance? I 
couldn’t find any documentation on this, so I would be very thankful if 
somebody here could help out.



Best,
Ralph
___
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] [ using horizontal table lines ]

2024-04-15 Thread vm via ntg-context

I'm probably using the \starttable incorrectly:

with this code I only get only *one* horizontal line in the header

\starttable[|r|r|r|r|r|r|r|l|r|r|r|r|][bodyfont=9pt]
\NC step\NC frac\NC ival\NC  \NC\Use{4}[cI]{freq 
(Hz)}\NC~\NC\Use{4}[cI]{wavelength (m)}\AR

\NC\DC\DC\DC\DL[4]\DL[4]\AR
\NC 0 \NC 0.00 \NC 0.000 \NC 12.50\NC 13.75\NC 15.00\NC 12.25\NC A\ \NC 
27.20\NC 24.73\NC 22.67\NC 27.76\AR
\NC 1 \NC 0.08 \NC 0.115 \NC 13.94\NC 15.34\NC 16.73\NC 13.66\NC A\#\NC 
24.38\NC 22.17\NC 20.32\NC 24.88\AR
\NC 2 \NC 0.17 \NC 0.222 \NC 15.28\NC 16.81\NC18.34\NC14.97\NC 
B\ \NC 22.25\NC 20.23\NC 18.54\NC 22.71\AR

\stoptable




with this code I get two horizontal lines, but the second is too short.

\starttable[|r|r|r|r|r|r|r|l|r|r|r|r|][bodyfont=9pt]
\NC step\NC frac\NC ival\NC  \NC\Use{4}[cI]{freq 
(Hz)}\NC~\NC\Use{4}[cI]{wavelength (m)}\AR

\NC\DC\DC\DC\DL[4]\DL[3]\AR
\NC 0 \NC 0.00 \NC 0.000 \NC 12.50\NC 13.75\NC 15.00\NC 12.25\NC A\ \NC 
27.20\NC 24.73\NC 22.67\NC 27.76\AR
\NC 1 \NC 0.08 \NC 0.115 \NC 13.94\NC 15.34\NC 16.73\NC 13.66\NC A\#\NC 
24.38\NC 22.17\NC 20.32\NC 24.88\AR
\NC 2 \NC 0.17 \NC 0.222 \NC 15.28\NC 16.81\NC18.34\NC14.97\NC 
B\ \NC 22.25\NC 20.23\NC 18.54\NC 22.71\AR

\stoptable


with this code I get two horizontal lines, with correct length, but 
above the wrong columns


\starttable[|r|r|r|r|r|r|r|l|r|r|r|r|][bodyfont=9pt]
\NC step\NC frac\NC ival\NC  \NC\Use{4}[cI]{freq 
(Hz)}\NC~\NC\Use{4}[cI]{wavelength (m)}\AR

\NC\DC\DC\DL[4]\DL[4]\AR
\NC 0 \NC 0.00 \NC 0.000 \NC 12.50\NC 13.75\NC 15.00\NC 12.25\NC A\ \NC 
27.20\NC 24.73\NC 22.67\NC 27.76\AR
\NC 1 \NC 0.08 \NC 0.115 \NC 13.94\NC 15.34\NC 16.73\NC 13.66\NC A\#\NC 
24.38\NC 22.17\NC 20.32\NC 24.88\AR
\NC 2 \NC 0.17 \NC 0.222 \NC 15.28\NC 16.81\NC18.34\NC14.97\NC 
B\ \NC 22.25\NC 20.23\NC 18.54\NC 22.71\AR

\stoptable


diff:
\NC\DC\DC\DC\DL[4]\DL[4]\AR
\NC\DC\DC\DC\DL[4]\DL[3]\AR
\NC\DC\DC\DL[4]\DL[4]\AR


There is (probably) a correct way to solve this.

.Floris___
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: can we do binding correction?

2024-03-20 Thread Hraban Ramm

Hi Andrés, thank you!

Am 20.03.24 um 06:07 schrieb Andres Conrado Montoya:
I have found with experience that a formula to calculate the binding 
correction for a saddle stitch binding, not more than 4 pages in a 
signature (only one fold in the middle) usually is 1/2 the 
circumference of a circle with radius /r/, being /r/ the thickness of 
the paper times the amount of physical signatures. Something like: 
\frac{π \times t \times s}{2}. I have not tried a formula for more 
folds in a signature.


The thing is, you have to recalculate for each signature fold. The 
innermost will have displacement zero, the second one a little bit 
more, the third a little bit more, and on and on until we reach the 
outermost signature.


However, it is necessary to say that unless you are using a 
particularly thick paper, or you are using too many pages for a saddle 
stitch bind (my personal and professional opinion would be no more 
than 80, but better 60), the displacement is usually negligible.


For example, let's say the paper thickness is 0.1 mm (which is 0.0001 
meters) and there are 40 pages in 10 signatures. The radius would be 
0.0001 meters per signature * 10 signatures = 0.001 meters. Then, half 
the circumference would be 1/2 * 3.14159 * 0.001 meters ≈  0.0016 
meters or 1.6mm at the last signature. Unless there was a displacement 
of more than, say, 4 mm, I wouldn't worry too much about it.


E.g. our Bonn architectural guides 
(https://www.dreiviertelhaus.de/reihen/afb/) are saddle-stitched 
booklets, usually have 60 pages and are printed on 115g coated paper. 
With coated paper you can’t really derivate the thickness from grammage. 
The horizontal page shift is visible if you look carefully. But since 
the paper is not very transparent, you only see the problem if you look 
for it. I don’t arrange the pages myself, don’t know the signature size, 
and I can’t request specials, since we must print cheaply to keep the 
low price (had to raise it from 5 to 8 € anyway, half of it goes to the 
wholesaler).


Hraban

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

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


[NTG-context] Re: can we do binding correction?

2024-03-19 Thread Andres Conrado Montoya
There is some mention of a mechanism to get binding correction from an old
article in the wiki about emulating the Koma TypeArea from LaTeX, you can
see it in https://wiki.contextgarden.net/KOMA-scrartcl_Type_Area

There is also some discussion about the subject in SE:
https://tex.stackexchange.com/questions/38682/rules-of-thumb-for-size-of-binding-correction-bcor
However, that discussion is 12 years old and the links referenced as
sources are dead now.

I have found with experience that a formula to calculate the binding
correction for a saddle stitch binding, not more than 4 pages in a
signature (only one fold in the middle) usually is 1/2 the circumference of
a circle with radius *r*, being *r* the thickness of the paper times the
amount of physical signatures. Something like: \frac{π \times t \times
s}{2}. I have not tried a formula for more folds in a signature.

The thing is, you have to recalculate for each signature fold. The
innermost will have displacement zero, the second one a little bit more,
the third a little bit more, and on and on until we reach the outermost
signature.

However, it is necessary to say that unless you are using a
particularly thick paper, or you are using too many pages for a saddle
stitch bind (my personal and professional opinion would be no more than 80,
but better 60), the displacement is usually negligible.

For example, let's say the paper thickness is 0.1 mm (which is 0.0001
meters) and there are 40 pages in 10 signatures. The radius would be 0.0001
meters per signature * 10 signatures = 0.001 meters. Then, half the
circumference would be 1/2 * 3.14159 * 0.001 meters ≈  0.0016 meters or
1.6mm at the last signature. Unless there was a displacement of more than,
say, 4 mm, I wouldn't worry too much about it.

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

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


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Le ven. 29 déc. 2023 à 14:47, Mikael Sundqvist  a écrit :

> 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
>
> ___
>
___
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] Size of subscript notations

2023-12-29 Thread Fabrice Couvreur
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}
___
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: Fractions

2023-12-10 Thread Gavin via ntg-context
Hello fraction fascinated friends,

> On Dec 10, 2023, at 5:24 AM, Henning Hraban Ramm  wrote:
> 
> Am 09.12.23 um 23:30 schrieb Mikael Sundqvist:
>> Hi,
>> On Sat, Dec 9, 2023 at 4:39 PM Wolfgang Schuster
>>  wrote:
>>> 
>>> Fabrice Couvreur schrieb am 09.12.2023 um 17:19:
>>> 
>>> Very clear !
>>> In typography for Mathematics books, what choice should we make for the 
>>> best possible result ?
>>> 
>>> A question better answered by Mikael or Aditya!
>> Thank you for your trust, Wolfgang. I am not sure I have something
>> valuable to say in addition to Adityas suggestion \frac{1/3} in inline
>> math. In any case, I attach a passage, with suggestions inspired by
>> Lansburgh's book (iin Swedish). Not sure the file size makes it
>> through to the list, though.
> 
> Thank you!
> 
> I usually only need simple inline fractions like 1/n, 1/2 or 3/8 in text.
> With these and \frac, the spacing below the numerator (depth) is too big, 
> while the denominator sticks too tightly to the fraction bar.
> (Of course I use regular numbers for fractions, not mediaeval.)
> 
> Usually I’d prefer “vulgar fractions”, but \vulgarfraction looks “horrible” 
> in comparison to the few usual fractions contained in fonts (like ½ & ¾).
> 
> I tried to use the OpenType fraction features to no avail.
> 
> So I’m still looking for “the best” solution for simple fractions inline.
> 
> Hraban

I also use fractions frequently, so I’ve tried a few things.

Some fonts have superior and inferior numbers that can be used to make small 
slash fractions. I’ve done this, but my method is not pretty. Hraban suggested 
using font features for this, but I haven’t learned how to do that. Any advice 
is welcome.

Example code below uses the Libertinus font, which has these superior and 
inferior numbers, to produce sample paragraph demonstrating a few options for 
fractions in text.

Gavin


\usetypescriptfile[libertinus]
\setupbodyfont [libertinus,11pt]%
\setupinterlinespace[line=3.1ex]

\define\fracone{\getnamedglyphdirect{libertinus}{onesuperior}} % 1
\define\fracthree{\getnamedglyphdirect{libertinus}{threesuperior}} % 3
\define\fracnine{\getnamedglyphdirect{libertinus}{ninesuperior}} % 9

\define\thirteenths{\textfraction\getnamedglyphdirect{libertinus}{oneinferior}\getnamedglyphdirect{libertinus}{threeinferior}}
 % /13

\define\onethirteenth{\text{\fracone\thirteenths}} % 1/13
\define\threethirteenths{\text{\fracthree\thirteenths}} % 3/13
\define\ninethirteenths{\text{\fracnine\thirteenths}} % 9/13

\starttext
Some small fractions are already available in many fonts, like \onehalf\ and 
\onethird. Others can be built using superior and inferior numbers in some 
fonts. This includes the fractions required to
find the normal and shearing stresses on an oblique plane defined by 
$l=\sqrt{\threethirteenths}$, $m=\sqrt{\onethirteenth}$, and 
$n=\sqrt{\ninethirteenths}$.
Of course, you could just find the normal and shearing stresses on an oblique 
plane defined by $l=\sqrt{3/13}$, $m=\sqrt{1/13}$, and $n=\sqrt{9/13}$.
Vulgar fractions are between these extremes.
Find the normal and shearing stresses on an oblique plane defined by 
$l=\sqrt{\vfrac{3}{13}}$, $m=\sqrt{\vfrac{1}{13}}$, and 
$n=\sqrt{\vfrac{9}{13}}$.
I included more text than strictly necessary in this example to demonstrate the 
effect on line spacing.
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Fractions

2023-12-10 Thread Henning Hraban Ramm

Am 09.12.23 um 23:30 schrieb Mikael Sundqvist:

Hi,

On Sat, Dec 9, 2023 at 4:39 PM Wolfgang Schuster
 wrote:


Fabrice Couvreur schrieb am 09.12.2023 um 17:19:

Very clear !
In typography for Mathematics books, what choice should we make for the best 
possible result ?

A question better answered by Mikael or Aditya!


Thank you for your trust, Wolfgang. I am not sure I have something
valuable to say in addition to Adityas suggestion \frac{1/3} in inline
math. In any case, I attach a passage, with suggestions inspired by
Lansburgh's book (iin Swedish). Not sure the file size makes it
through to the list, though.


Thank you!

I usually only need simple inline fractions like 1/n, 1/2 or 3/8 in text.
With these and \frac, the spacing below the numerator (depth) is too 
big, while the denominator sticks too tightly to the fraction bar.

(Of course I use regular numbers for fractions, not mediaeval.)

Usually I’d prefer “vulgar fractions”, but \vulgarfraction looks 
“horrible” in comparison to the few usual fractions contained in fonts 
(like ½ & ¾).


I tried to use the OpenType fraction features to no avail.

So I’m still looking for “the best” solution for simple fractions inline.

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

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


[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)

2023-12-10 Thread Hans Hagen via ntg-context

On 12/9/2023 4:33 PM, Aditya Mahajan wrote:

On Sat, 9 Dec 2023, Wolfgang Schuster wrote:


\starttext

\startlines
\type{\frac{1}{3}}: \m{\frac{1}{3}}
\type{\xfrac{1}{3}}: \m{\xfrac{1}{3}}
\type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}}
\type{\tfrac{1}{3}}: \m{\tfrac{1}{3}}
\type{\sfrac{1}{3}}: \m{\sfrac{1}{3}}
\type{\frac{1}{3}}: \m{\frac{1}{3}}
\type{\dfrac{1}{3}}: \m{\dfrac{1}{3}}
\type{\cfrac{1}{3}}: \m{\cfrac{1}{3}}
\type{\vfrac{1}{3}}: \m{\vfrac{1}{3}}
\type{\hfrac{1}{3}}: \m{\hfrac{1}{3}}
\stoplines

\stoptext


Or, for inline math, $\sqrt{1/3}$.

radicals are somewhat special to deal with:

- multidimensional delimiter
- vertical spacing inside
- horizontal spacing oustside
- anchoring degrees
- left and right radicals
- more consistent rules (char based)
- size dependent additional spacing (avoid clash)
- normalize size across formula
- lack of granularity in variants sizes

by now we have dealt with all of that (some not in the current release), 
think of additional control in the engine, compensation for insufficient 
opentype math features, companion fonts with more sizes


there will always be suboptimal cases but the average is ok (we put 
radical - character kerning on hold because it is a lot of definitions) 
and we don't want to add hard to fight heuristics


so to inline: in most cases the solution that Adirya suggests will work 
out okay with respect toline spacing


Hans


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

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

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


[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)

2023-12-09 Thread Aditya Mahajan
On Sat, 9 Dec 2023, Wolfgang Schuster wrote:

> \starttext
> 
> \startlines
> \type{\frac{1}{3}}: \m{\frac{1}{3}}
> \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}}
> \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}}
> \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}}
> \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}}
> \type{\frac{1}{3}}: \m{\frac{1}{3}}
> \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}}
> \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}}
> \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}}
> \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}}
> \stoplines
> 
> \stoptext

Or, for inline math, $\sqrt{1/3}$. 

Aditya
___
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: Fractions (was \placefigure[location=here...] problem)

2023-12-09 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 09.12.2023 um 16:13:

Hi Wolfgang,
I'm reading this thread and I'm interested because I type a lot of 
text with mathematical formulas.
In fact, I find that \dfrac{} creates unsightly leading space and that 
\frac{} is too small. What is the difference between \frac{} and 
\tfrac{} ?


\frac switches the math style while \tfrac (textstyle), \dfrac 
(displaystyle) and \sfrac (scriptstyle) enforce a certain style.


 begin example
\startbuffer[frac]
\frac{1}{2} + \dfrac{1}{2} - \tfrac{1}{2} + \sfrac{1}{2}
\stopbuffer

\starttext

\startformula
\getbuffer[frac]
\stopformula

\m{\getbuffer[frac]}

\startformula
  \frac
    {\getbuffer[frac]}
    {\getbuffer[frac]}
\stopformula

\m{\frac
  {\getbuffer[frac]}
  {\getbuffer[frac]}}

\stoptext
 end example

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://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: Fractions (was \placefigure[location=here...] problem)

2023-12-09 Thread Fabrice Couvreur
Hi Wolfgang,
I'm reading this thread and I'm interested because I type a lot of text
with mathematical formulas.
In fact, I find that \dfrac{} creates unsightly leading space and that
\frac{} is too small. What is the difference between \frac{} and \tfrac{} ?
Fabrice

Le sam. 9 déc. 2023 à 14:00, Henning Hraban Ramm  a écrit :

> Am 09.12.23 um 14:43 schrieb Wolfgang Schuster:
> > anton.chig...@mail.com schrieb am 09.12.2023 um 14:15:
> > \startlines
> > \type{\frac{1}{3}}: \m{\frac{1}{3}}
> > \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}}
> > \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}}
> > \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}}
> > \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}}
> > \type{\frac{1}{3}}: \m{\frac{1}{3}}
> > \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}}
> > \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}}
> > \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}}
> > \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}}
> > \stoplines
>
> There’s also \vulgarfraction{1}{3} (but probably not suitable for your
> application).
>
> Hraban
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)

2023-12-09 Thread Henning Hraban Ramm

Am 09.12.23 um 14:43 schrieb Wolfgang Schuster:

anton.chig...@mail.com schrieb am 09.12.2023 um 14:15:
\startlines
\type{\frac{1}{3}}: \m{\frac{1}{3}}
\type{\xfrac{1}{3}}: \m{\xfrac{1}{3}}
\type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}}
\type{\tfrac{1}{3}}: \m{\tfrac{1}{3}}
\type{\sfrac{1}{3}}: \m{\sfrac{1}{3}}
\type{\frac{1}{3}}: \m{\frac{1}{3}}
\type{\dfrac{1}{3}}: \m{\dfrac{1}{3}}
\type{\cfrac{1}{3}}: \m{\cfrac{1}{3}}
\type{\vfrac{1}{3}}: \m{\vfrac{1}{3}}
\type{\hfrac{1}{3}}: \m{\hfrac{1}{3}}
\stoplines


There’s also \vulgarfraction{1}{3} (but probably not suitable for your 
application).


Hraban

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

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


[NTG-context] Fractions (was \placefigure[location=here...] problem)

2023-12-09 Thread Wolfgang Schuster

anton.chig...@mail.com schrieb am 09.12.2023 um 14:15:

I worked, ;-), thanks.
Let me ask you another thing, how can I avoid messing up the
line spacing by using \sqrt and \frac, the line that follows these has increased
line spacing in the pdf output

code:
Find the normal and shearing stresses on an oblique plane defined by
$l=\sqrt{\frac{3}{13}}$, $m=\sqrt{\frac{1}{13}}$, and $n=\sqrt{\frac{9}{13}}$.


Complete working minimal examples are preferred over code snippets.

To avoid single lines with different spacing you can either increase the 
line spacing for all
lines with \setupinterlinespace or you use a different fraction command 
which uses

smaller numbers or creates inline fractions.

\starttext

\startlines
\type{\frac{1}{3}}: \m{\frac{1}{3}}
\type{\xfrac{1}{3}}: \m{\xfrac{1}{3}}
\type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}}
\type{\tfrac{1}{3}}: \m{\tfrac{1}{3}}
\type{\sfrac{1}{3}}: \m{\sfrac{1}{3}}
\type{\frac{1}{3}}: \m{\frac{1}{3}}
\type{\dfrac{1}{3}}: \m{\dfrac{1}{3}}
\type{\cfrac{1}{3}}: \m{\cfrac{1}{3}}
\type{\vfrac{1}{3}}: \m{\vfrac{1}{3}}
\type{\hfrac{1}{3}}: \m{\hfrac{1}{3}}
\stoplines

\stoptext

Wolfgang

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

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


[NTG-context] Re: \placefigure[location=here...] problem

2023-12-09 Thread anton . chigurh
I worked, ;-), thanks.
Let me ask you another thing, how can I avoid messing up the
line spacing by using \sqrt and \frac, the line that follows these has increased
line spacing in the pdf output

code:
Find the normal and shearing stresses on an oblique plane defined by
$l=\sqrt{\frac{3}{13}}$, $m=\sqrt{\frac{1}{13}}$, and $n=\sqrt{\frac{9}{13}}$.
___
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: Inline math spacing

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

On 12/4/2023 6:43 AM, Alexandre Christe wrote:

Hi,

Here’s a MWE:

\setupinterlinespace[line=3ex]

\definefontfeature[default][default][lnum=yes,tnum=yes]
\usetypescriptfile[alegreya_libertinus]
\setupbodyfont[alegreya-light,ss,10pt]
\setupmathematics[autopunctuation={all}]

% math definitions
\enablemathautospacing % more global
% \enablemathautofencing % more global
\enablemathautonumbers % more global
% \autofences % more local

\usemodule[ipsum]

\starttext

\ipsum

\stoptext

And I attach the two files to setup the font.

no math ... anyway

\showglyphs

\dorecurse{100}{test \im{\frac{#1}{3}} test }

\setupmathematics[textdistance=.25em plus .1em minus .1em]

\dorecurse{100}{test \im{\frac{#1}{3}} test }

will give more space but it's mostly optical that the math related 
spacing looks doferent from regular spaces.


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

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

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


[NTG-context] Re: Several math features broke for me in new Debian version

2023-11-03 Thread Kumar Appaiah
On Fri, Nov 03, 2023 at 01:16:15PM +0100, Wolfgang Schuster wrote:
> > \starttext
> > Hello world!
> > \startformula
> >   X(f) = \startcases[align={right,left},distance=3pt]
> > \NC T, \NC{} $|f| < \frac{1}{2T}$ \NR
> > \NC 0, \NC{} $|f| \geq \frac{1}{2T}$ \NR
> >   \stopcases
> > \stopformula
> > \stoptext
> 
> There has been changes in the math alignment mechanism a while ago and the
> cases
> environment use math mode for a column entry when you use the \NC tag at the
> begin
> of a cell, to make your example working again remove the $ in the column.
> 
> \starttext
> 
> \startformula
>   X(f) =
>     \startcases
>     \NC T, \NC |f| < \frac{1}{2T} \NR
>     \NC 0, \NC |f| \geq \frac{1}{2T} \NR
>     \stopcases
> \stopformula
> 
> \stoptext
> 
> To typeset the content of a column as text replace \NC with \TC at the begin
> of the cell.
> 

Thank you for pointing this out. For now, I shall refrain from
upgrading, since this is a backwards incompatible change that affects
many files. Eventually, I'll make the required changes.

Kumar
-- 
Kumar Appaiah
___
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: Several math features broke for me in new Debian version

2023-11-03 Thread Wolfgang Schuster

Kumar Appaiah schrieb am 03.11.2023 um 11:44:

Dear Friends,

I am a regular user of ConTeXt. A recent upgrade of ConTeXt in Debian
broke things for me. The bug report is here:

https://bugs.debian.org/1055233

but I have reproduced the gist here:

Upon upgrading to ConTeXt 2023.05.05.20230730+dfsg-2, several math
features seem to break for me. Here is an example:

\starttext
Hello world!
\startformula
  X(f) = \startcases[align={right,left},distance=3pt]
\NC T, \NC{} $|f| < \frac{1}{2T}$ \NR
\NC 0, \NC{} $|f| \geq \frac{1}{2T}$ \NR
  \stopcases
\stopformula
\stoptext


There has been changes in the math alignment mechanism a while ago and 
the cases
environment use math mode for a column entry when you use the \NC tag at 
the begin

of a cell, to make your example working again remove the $ in the column.

\starttext

\startformula
  X(f) =
    \startcases
    \NC T, \NC |f| < \frac{1}{2T} \NR
    \NC 0, \NC |f| \geq \frac{1}{2T} \NR
    \stopcases
\stopformula

\stoptext

To typeset the content of a column as text replace \NC with \TC at the 
begin of the cell.


Wolfgang

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

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


[NTG-context] Several math features broke for me in new Debian version

2023-11-03 Thread Kumar Appaiah
Dear Friends,

I am a regular user of ConTeXt. A recent upgrade of ConTeXt in Debian
broke things for me. The bug report is here:

https://bugs.debian.org/1055233

but I have reproduced the gist here:

Upon upgrading to ConTeXt 2023.05.05.20230730+dfsg-2, several math
features seem to break for me. Here is an example:

\starttext
Hello world!
\startformula
 X(f) = \startcases[align={right,left},distance=3pt]
   \NC T, \NC{} $|f| < \frac{1}{2T}$ \NR
   \NC 0, \NC{} $|f| \geq \frac{1}{2T}$ \NR
 \stopcases
\stopformula
\stoptext

The above works very well in 2021.03.05.20230120+dfsg-1+deb12u1 but
gives me this error in 2023.05.05.20230730+dfsg-2:


resolvers   | formats | executing runner 'run luametatex format': 
/usr/bin/luametatex --jobname="./test.tex" --socket --shell-escape 
--fmt=/home/kumar/.texlive2023/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/formats/luametatex/cont-en.fmt
 
--lua=/home/kumar/.texlive2023/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" 
--c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/usr/bin"
job > passes > version mismatch: 1.32 <> 1.33
system  > 
system  > ConTeXt  ver: 2023.05.05 18:36 LMTX  fmt: 2023.11.2  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/usr/share/texmf/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/usr/share/texmf/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './test', input './test.tex', result './test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.tex'
fonts   > preloading latin modern fonts (second stage)
mathematics > tweak > 'LatinModernMath-Regular', size 6, math size 3, 
version 'Version 1.959' found, version 'Version 1.958' expected
fonts   > 'fallback modern rm 12pt' is loaded
tex error   > tex error on line 5 in file ./test.tex: Missing $ inserted

 

$
 

\mathatom 
 \math_atom_by_parameter_indeed 
#1->\mathatom 
\s!class \mathcodechecked {#1}
 \math_frac 
#1#*[#2]->\beginmathgroup \setlocalmathfractioncurrent {#1}\ifparameter 
#2\or \setupcurrentmathfraction [#2]\fi \edef \p_math_fraction_fences 
{\mathfractionparameter \c!fences }\math_atom_by_parameter 
\mathfractionparameter 
\bgroup \ifempty \p_math_f
 

{
 
   \NC T, \NC{} $|f| < \frac{
1}{2T}$ \NR

 1 \starttext
 2 Hello world!
 3 \startformula
 4  X(f) = \startcases[align={right,left},distance=3pt]
 5 >> \NC T, \NC{} $|f| < \frac{1}{2T}$ \NR
 6\NC 0, \NC{} $|f| \geq \frac{1}{2T}$ \NR
 7  \stopcases
 8 \stopformula
 9 \stoptext
10 
I've inserted a begin-math/end-math symbol since I think you left one out.
Proceed, with fingers crossed.
mtx-context | fatal error: return code: 1

Just another note: some examples seem broken here as well:

https://wiki.contextgarden.net/Multiline_equations

Please let me know how I can help debug this.

Thanks.

Kumar
-- 
Kumar Appaiah
___
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: Combining python and lua

2023-10-25 Thread Bruce Horrocks
On 25 Oct 2023, at 16:45, Alexandre Christe  wrote:
> 
> Dear list,
> 
> I’d like to know the best approach to make this a bit more usable. I’m trying 
> to typeset a table with sin/cos/tan values. I’d like to be able to convert 
> the angles in degrees into radians (with math notation) and to compute the 
> trigonometric function leading to sin(pi/4) = 1/2, or cos(pi/6) = sqrt(3)/2 
> and display it in math mode.

You can use templates to subtitute values into a string and then send that out 
to be typeset.
For example: if you want to turn "sin(pi/4) = 1/2" to 

  \startformula
  \sin{\frac{\pi}{4}} = \frac{1}{2}
  \stopformula

Then use this Lua code:

  local myTrigTemplate = [[
    \startformula
\%fname%{\frac{\pi}{%divisor%}} = \frac{%numerator%}{%denominator%}
\stopformula
  ]]

  context.templates[myTrigTemplate] {
fname = "sin",
divisor = 4,
numerator = 1,
denominator = 2
  }

By combining them (using the result of a simple template as the parameter value 
into a larger template) you can create a function similar to Python's latex() 
that handles the trig functions you are using. That is the easy bit.

Converting the angle into radians and then getting the result as a fraction of 
pi requires you to implement a continued fraction algorithm to determine 
numerator and denominator.

Extending that to determine whether to use sqrt(3)/2 instead of some other 
fractional approximation is another significant step up in complexity.

I can send you some code that does that - but it's written in HP-71 BASIC so 
you'll have to adapt it. :-)

The real question is: do you really want to be able to generate an expression 
from *any* initial angle value or just those in your table? If it's just those 
in your table then I think it would be much, much less effort to extend 
'angleList' with accompanying lists holding the values to substitute into the 
template. Or even just typeset the whole table by hand (prepare a list of the 
expressions and use editor macros to ConTeXtify them).

Regards,
—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Re: Nested itemize

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


\defineitemgroup[alex]

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

%\showboxes
\autofences

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

\samplefile{ward}
\stoptext

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

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

[NTG-context] itemize

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

Hi,

There has been some additions to itemize wrt columns. One problem with 
columns is that we have a 'cross page' and 'balancing' situation. The 
existing columns features has been improved a bit.


That leaves the problem that mixing single and multi columns is not 
really tex's strong point. So, when Mikael and I were looking at one of 
his documents that mixes a lot of math into itemized situations, a 
different variant was made (ok, there was another reason but that's a 
bit technical).


At that time, I had already adapted itemize to work a bit better with 
bTABLE and starttabulate (nesting, trial mode etc), think of


\bTABLE \bTR \bTD
\startitemize[a]
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\startitemize[n]
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\stopitemize
\stopitem
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\stopitemize
\eTD \eTR \eTABLE

or with tabulate

\startitemize[n]
\starttabulate[||k2|]
\NC \startitem test \stopitem
\NC \startitem test \stopitem \NC \NR
\NC \startitem test \stopitem
\NC \startitem test \stopitem \NC \NR
\stoptabulate
\stopitemize

so basically inside these tables items can be dealt with. Don't wonder 
too much how this translates into structure.


So, back the columns, a logical next step was to add tabulated columns 
to itemize:


\startitemizetable[n,four]
\dorecurse{10}{
    \startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\im{\sqrt{x^5}}
\stopitem
    \startitem
\im{\frac{x^5}{x^5}}
\stopitem
}
\stopitemizetable

or with

\defineitemgroup[]

because every itemgroup also gets an additional pair of commands defined.

\starttable[n,four][inbetween={\blank[big]}]
\dorecurse{10}{
\startitem
\im{\sqrt{1/x}}
\stopitem
    \startitem
\im{\sqrt{\frac{2}{x}}}
\stopitem
    \startitem
\im{\frac{3}{x}}
\stopitem
}
    \startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\im{\sqrt{x^5}}
\stopitem
\stoptable

etc etc. The distance can be set with columndistance and vertical 
spacing with inbetween.


This kind of columnizing has the advantage that esp with math that has 
different heights all aligns rather well. A limitation is that we number 
horizontally but that actually makes sense when we cross pages (I might 
cook up a transposed numbering but it's not entirely trivial).


The first one who uses this other than Mikael is invited to wikify it.

Hans

ps. The page columns also have some improvements but that's for next month.

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] itemize

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

Hi,

There has been some additions to itemize wrt columns. One problem with 
columns is that we have a 'cross page' and 'balancing' situation. The 
existing columns features has been improved a bit.


That leaves the problem that mixing single and multi columns is not 
really tex's strong point. So, when Mikael and I were looking at one of 
his documents that mixes a lot of math into itemized situations, a 
different variant was made (ok, there was another reason but that's a 
bit technical).


At that time, I had already adapted itemize to work a bit better with 
bTABLE and starttabulate (nesting, trial mode etc), think of


\bTABLE \bTR \bTD
\startitemize[a]
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\startitemize[n]
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\stopitemize
\stopitem
\startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\stopitemize
\eTD \eTR \eTABLE

or with tabulate

\startitemize[n]
\starttabulate[||k2|]
\NC \startitem test \stopitem
\NC \startitem test \stopitem \NC \NR
\NC \startitem test \stopitem
\NC \startitem test \stopitem \NC \NR
\stoptabulate
\stopitemize

so basically inside these tables items can be dealt with. Don't wonder 
too much how this translates into structure.


So, back the columns, a logical next step was to add tabulated columns 
to itemize:


\startitemizetable[n,four]
\dorecurse{10}{
    \startitem
\im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
\im{\sqrt{x^5}}
\stopitem
    \startitem
\im{\frac{x^5}{x^5}}
\stopitem
}
\stopitemizetable

or with


Hans

ps. The page columns also have some improvements but that's for next month.

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: 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] split align in formulas

2023-08-14 Thread Xavier B.
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.

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

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


Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Aditya Mahajan via ntg-context
dx := max (floor wd, 1);
  tlist.t.dy := max (floor ht, 1);
enddef;
vardef use_tile (suffix t) (expr x, y, wd, ht) =
  fill unitsquare xscaled wd yscaled ht shifted (x,y)
withcolor background;
  if str t = "shaded":
shade_rectangle (4thin, x, y, wd, ht);
  elseif str t = "hatched":
shade_rectangle (5thin, x, y, wd, ht);
shade_rectangle (-5thin, x, y, wd, ht);
  else:
if (picture tlist.t):
  for nx = 0 upto wd/tlist.t.dx:
for ny = 0 upto ht/tlist.t.dy:
  addto currentpicture
also (tlist.t shifted
  ((x,y) + (nx*tlist.t.dx, ny*tlist.t.dy)) t_);
endfor
  endfor
else:
  errhelp "feynmf: your tiling has not been defined, "
& "check spelling and reprocess!";
  errmessage "feynmf: tiling `" & str t & "' not known, "
   & "replaced by `shaded'";
  use_tile (shaded, x, y, wd, ht);
fi
  fi
enddef;
vardef shade_rectangle (expr dd, x, y, wd, ht) =
  save d, u, dx, dy, currentpen;
  pen currentpen;
  pickup pencircle scaled thin;
  d := max (floor (abs dd), 1);
  dx := max (wd, ht);
  dy := max (wd, ht);
  for u = 0 step d/dx until 1:
if dd > 0:
  cdraw (x-d,y+u*dy-d)--(x+(1-u)*dx+d,y+dy+d);
  cdraw (x+u*dx-d,y-d)--(x+dx+d,y+(1-u)*dy+d);
else:
  cdraw (x-d,y+u*dy+d)--(x+u*dx+d,y-d);
  cdraw (x+(1-u)*dx-d,y+dy+d)--(x+dx+d,y+(1-u)*dy-d);
fi
  endfor
enddef;
def addto_tile (suffix t) =
  addto tlist.t
enddef;
vardef tile_from_string (suffix t) (expr str) =
  tile_grain := max (floor tile_grain, 1);
  save grain, mx, x, y, n, c, pic;
  string c;
  picture pic;
  pic := nullpicture;
  grain := tile_grain;
  mx := 0;
  x := 0;
  y := 0;
  for n := 1 upto length str:
c := substring (n-1,n) of str;
if c = "/":
  mx := max (mx, x);
  y := y+1;
  x := 0;
elseif c = "*":
  addto pic also (unitpixel shifted (x,-y) t_);
  x := x+1;
elseif c = ".":
  x := x+1;
fi
  endfor
  def_tile (t, grain*mx, grain*(y+1));
  addto_tile (t) also (pic shifted (0,y) scaled grain t_);
  pic := nullpicture;
enddef;
tile_from_string (gray10,
  "  ...  /"&
  "  .*.  /"&
  "  ...  ");
tile_from_string (gray25,
  "  ..  /"&
  "  *.  ");
tile_from_string (gray50,
  "  .*  /"&
  "  *.  ");
tile_from_string (gray75,
  "  **  /"&
  "  .*  ");
tile_from_string (gray90,
  "  ***  /"&
  "  *.*  /"&
  "  ***  ");
vardef make_halftone (suffix t) (expr g, wd, ht) =
  def_tile (t, wd, ht);
  addto tlist.t contour unitsquare
xscaled wd yscaled ht withcolor ((1-g)*foreground + g*background)
enddef;
vardef tile (suffix t) (expr p) =
  save u, x, y, max_x, min_x, max_y, min_y, xx, yy;
  -max_x = -max_y = min_x = min_y = infinity;
  for u = 0 step 0.1 until length p:
x := xpart (point u of p);
y := ypart (point u of p);
max_x := max(max_x, x);
max_y := max(max_y, y);
min_x := min(min_x, x);
    min_y := min(min_y, y);
  endfor
  begin_sketch
use_tile (t, min_x, min_y, max_x-min_x, max_y-min_y);
clip currentpicture to p;
  end_sketch;
  use_sketch;
enddef;
vardef drawtile (suffix t) (expr p) =
  tile (t, p);
  cdraw p
enddef;
vardef use_halftone (expr g, x, y, wd, ht) =
  fill unitsquare xscaled wd yscaled ht
shifted (x,y) withcolor ((1-g)*foreground + g*background)
enddef;
vardef halftone (expr g, p) =
  fill p withcolor ((1-g)*foreground + g*background)
enddef;
vardef drawhalftone (expr g, p) =
  fill p withcolor ((1-g)*foreground + g*background);
  cdraw p
enddef;
vardef shade expr p =
  tile (shaded, p)
enddef;
vardef hatch expr p =
  tile (hatched, p)
enddef;
vardef emptydraw expr p =
  cullit;
  unfill p;
  cullit;
  cdraw p;
enddef;
vardef shadedraw expr p =
  cullit;
  unfill p;
  cullit;
  shade p;
  cdraw p;
enddef;
vardef hatchdraw expr p =
  cullit;
  unfill p;
  cullit;
  hatch p;
  cdraw p;
enddef;
vardef marrow (expr p, frac) =
  save a, t, z;
  pair z;
  a = angle direction frac*length(p) of p;
  z = point frac*length(p) of p;
  (t1,whatever) = p intersectiontimes
(halfcircle scaled 2/3arrow_len rotated (a+90) shifted z);
  (t2,whatever) = p intersectiontimes
(halfcircle scaled 4/3arrow_len rotated (a-90) shifted z);
  arrow_head (p, t1, t2, arrow_ang)
enddef;
vardef tarrow (expr p, frac) =
  save a, t, z;
  pair z;
  t1 = frac*length p;
  a = angle direction t1 of p;
  z = point t1 of p;
  (t2,whatever) = p intersectiontimes
(halfcircle scaled 2arrow_len rotated (a-90) shifted z);
  arrow_head (p, t1, t2, arrow_ang)
enddef;
vardef harrow (expr p, frac) =
  save a, t, z;
  pair z;
  t2 = frac*length p;
  a = angle direction t2 of p;
  z = point t2 of p;
  (t1,whatever) = p intersectiontimes
 (halfcircle scaled 2arrow_len rotated (

Re: [NTG-context] tikz error upgrading to texlive version (artix)

2023-03-31 Thread Xavier B. via ntg-context

> > I reported that tikz is not working a few months ago, but after a few back 
> > and forth with Hans, could not get it to work. At that time, it appeared 
> > that I was the only have having issues, so I thought that I was making a 
> > mistake in how I was installing the package.
> > 
> > I have reverted to using mkiv for my course notes, because I heavily use 
> > pgfplots and that is not working in LMTX. (I was also using some nice new 
> > features of metafun, and have had to resort to compiling them externally 
> > using LMTX via the filter module and compiling the main doc with MkIV).
> afaik tikz should work ok, so can you make a test file?
> 
> Hans


Perhaps this is a good test. It's a complete example:

\setupcolors[state=start]
\definecolor[darkgreen][g=.5]
\usemodule[tikz] 

\starttext

\starttikzpicture[  scale=3,line cap=round
axes/.style=, 
important line/.style={very thick},
information text/.style={rounded 
corners,fill=red!10,inner sep=1ex} ]

\draw[help lines,step=0.5cm] (-1.4,-1.4) grid (1.4,1.4);
\draw (0,0) circle (1cm);   
\draw[->] (-1.5,0) -- (1.5,0) node[right] {$x$} coordinate(x 
axis);
\draw[->] (0,-1.5) -- (0,1.5) node[above] {$y$} coordinate(y 
axis);
\foreach \x/\xtext in {-1, -.5/-\frac{1}{2}, 1} 
   
\draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt) 
   
node[below,fill=white] {$\xtext$};
\foreach \y/\ytext in {-1, -.5/-\frac{1}{2}, .5/\frac{1}{2}, 1}
\draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt)
node[left,fill=white] {$\ytext$};
\filldraw[fill=green!20,draw=green!50!black] (0,0) -- (3mm,0pt) 
arc(0:30:3mm);
\draw (15:2mm) node[green!50!black] {$\alpha$};
\draw[important line,red]
(30:1cm) -- node[left=1pt,fill=white] {$\sin \alpha$} (30:1cm 
|- x axis);
\draw[important line,blue]
(30:1cm |- x axis) -- node[below=2pt,fill=white] {$\cos 
\alpha$} (0,0);
\draw[important line,orange!80!black] (1,0) -- 
node[right=1pt,fill=white] {
$\displaystyle \tan \alpha \black =
\frac{{\red \sin \alpha}}{\blue \cos \alpha}$}
(intersection of 0,0--30:1cm and 1,0--1,1) coordinate (t);
\draw (0,0) -- (t);
\draw[xshift=1.85cm]
node[right,text width=6cm,information text]
{
The {\darkgreen angle $\alpha$} is $30^\circ$ in the
example ($\pi/6$ in radians). The {\red sine of
$\alpha$}, which is the height of the red line, is
\startformula
{\red \sin \alpha} = 1/2.
\stopformula
By the Theorem of Pythagoras ...
};
\stoptikzpicture

\stoptext


Taking from tikz manual [https://wiki.contextgarden.net/TikZ]

Xavier

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

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


Re: [NTG-context] Spacing problem around decimal point

2023-03-28 Thread Bruce Horrocks via ntg-context


> On 28 Mar 2023, at 21:56, Gavin via ntg-context  wrote:
> 
> Hi Hans, Jim, Bruce, et.al.
> 
> Han’s asked me
> 
>> can you pick up a binary from:
>> 
>> https://dl.contextgarden.net/build/luametatex/work/
>> 
>> and test it?
> 
> Maybe. I picked up the binary, but testing it is not quite as easy as it 
> might be due to the MacOS security settings. I’ll see what I can do, but I 
> know very little about Unix/Darwin.
> 
> Since this appears to be an issue across multiple platforms, I’d welcome 
> anyone else checking the new binary. (Thanks, Günter!)

The x86_64-darwinlegacy from that download link version has fixed the problem 
on the Mac. Thank-you all involved.

\starttext
\startformula
v = \frac{1.32}{1.41} = 0.935
\stopformula
\stoptext

gives the attached.
—
Bruce Horrocks
Hampshire, UK


tt.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] Spacing problem around decimal point

2023-03-26 Thread Bruce Horrocks via ntg-context
I also get the incorrect spacing on a Mac.

system  > ConTeXt  ver: 2023.03.20 17:07 LMTX  fmt: 2023.3.22  int: 
english/english


> On 26 Mar 2023, at 22:16, Jim via ntg-context  wrote:
> 
> Hi all,
> 
> Regrettably, I see the same problem and Gavin.
> 
> I am using TeXlive 2023 on Slackware64 15.0, for what that is worth.
> 
> 
>Jim
> 
> On Sun, Mar 26, 2023 at 17:36 (+0200), Günter Kolousek via ntg-context wrote:
> 
> 
>> Hi,
> 
>> I can confirm that the x64_64-linux from
> 
>> https://dl.contextgarden.net/build/luametatex/work/
> 
>> version works correctly. So, no excess spaces around the
>> decimal points at all.
> 
>> HTH
>> Günter
> 
>> Hans Hagen via ntg-context @ 2023-03-26 13:22 +02:
> 
>>> On 3/26/2023 4:20 AM, Gavin via ntg-context wrote:
>>>> Hi List,
>>>> I’m getting strange spaces around some decimal points after a clean
>>>> LMTX
>>>> install. MWE:
>>>> \starttext
>>>> \startformula
>>>> v = \frac{1.32}{1.41} = 0.935
>>>> \stopformula
>>>> \stoptext
>>>> This produces the result attached below. The 1.32 looks fine, but
>>>> the next two
>>>> numbers have excess space around the decimal point. Adding the line
>>>>   \showmakeup[mathglue] %\mathspacingmode=1
>>>> to the preamble reveals that the second and third decimal points are
>>>> being
>>>> treated as binary operators. It’s very strang. Are others getting
>>>> this?
>>> can you pick up a binary from:
> 
>>> https://dl.contextgarden.net/build/luametatex/work/
> 
>>> and test it?
> 
>>> 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
> ___

—
Bruce Horrocks
Hampshire, UK

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

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


Re: [NTG-context] Spacing problem around decimal point

2023-03-26 Thread Jim via ntg-context
Hi all,

Regrettably, I see the same problem and Gavin.

I am using TeXlive 2023 on Slackware64 15.0, for what that is worth.


Jim

On Sun, Mar 26, 2023 at 17:36 (+0200), Günter Kolousek via ntg-context wrote:


> Hi,

> I can confirm that the x64_64-linux from

> https://dl.contextgarden.net/build/luametatex/work/

> version works correctly. So, no excess spaces around the
> decimal points at all.

> HTH
> Günter

> Hans Hagen via ntg-context @ 2023-03-26 13:22 +02:

>> On 3/26/2023 4:20 AM, Gavin via ntg-context wrote:
>>> Hi List,
>>> I’m getting strange spaces around some decimal points after a clean
>>> LMTX
>>> install. MWE:
>>> \starttext
>>> \startformula
>>> v = \frac{1.32}{1.41} = 0.935
>>> \stopformula
>>> \stoptext
>>> This produces the result attached below. The 1.32 looks fine, but
>>> the next two
>>> numbers have excess space around the decimal point. Adding the line
>>>\showmakeup[mathglue] %\mathspacingmode=1
>>> to the preamble reveals that the second and third decimal points are
>>> being
>>> treated as binary operators. It’s very strang. Are others getting
>>> this?
>> can you pick up a binary from:

>> https://dl.contextgarden.net/build/luametatex/work/

>> and test it?

>> 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] Spacing problem around decimal point

2023-03-26 Thread Günter Kolousek via ntg-context


Hi,

I can confirm that the x64_64-linux from

 https://dl.contextgarden.net/build/luametatex/work/

version works correctly. So, no excess spaces around the
decimal points at all.

HTH
Günter

Hans Hagen via ntg-context @ 2023-03-26 13:22 +02:


On 3/26/2023 4:20 AM, Gavin via ntg-context wrote:

Hi List,
I’m getting strange spaces around some decimal points after a 
clean LMTX

install. MWE:
\starttext
\startformula
v = \frac{1.32}{1.41} = 0.935
\stopformula
\stoptext
This produces the result attached below. The 1.32 looks fine, 
but the next two
numbers have excess space around the decimal point. Adding the 
line

   \showmakeup[mathglue] %\mathspacingmode=1
to the preamble reveals that the second and third decimal 
points are being
treated as binary operators. It’s very strang. Are others 
getting this?

can you pick up a binary from:

https://dl.contextgarden.net/build/luametatex/work/

and test it?

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] Spacing problem around decimal point

2023-03-26 Thread Hans Hagen via ntg-context

On 3/26/2023 4:20 AM, Gavin via ntg-context wrote:

Hi List,

I’m getting strange spaces around some decimal points after a clean LMTX 
install. MWE:

\starttext
\startformula
v = \frac{1.32}{1.41} = 0.935
\stopformula
\stoptext

This produces the result attached below. The 1.32 looks fine, but the next two 
numbers have excess space around the decimal point. Adding the line

   \showmakeup[mathglue] %\mathspacingmode=1

to the preamble reveals that the second and third decimal points are being 
treated as binary operators. It’s very strang. Are others getting this?

can you pick up a binary from:

https://dl.contextgarden.net/build/luametatex/work/

and test it?

Hans

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

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

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


Re: [NTG-context] Spacing problem around decimal point

2023-03-26 Thread Hans Hagen via ntg-context

On 3/26/2023 4:20 AM, Gavin via ntg-context wrote:

Hi List,

I’m getting strange spaces around some decimal points after a clean LMTX 
install. MWE:

\starttext
\startformula
v = \frac{1.32}{1.41} = 0.935
\stopformula
\stoptext

This produces the result attached below. The 1.32 looks fine, but the next two 
numbers have excess space around the decimal point. Adding the line

   \showmakeup[mathglue] %\mathspacingmode=1

to the preamble reveals that the second and third decimal points are being 
treated as binary operators. It’s very strang. Are others getting this?

weird indeed

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

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

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


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

2023-03-25 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
___


[NTG-context] \definemathfence broken in latest

2023-03-25 Thread Gavin via ntg-context
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
___


[NTG-context] Spacing problem around decimal point

2023-03-25 Thread Gavin via ntg-context
Hi List,

I’m getting strange spaces around some decimal points after a clean LMTX 
install. MWE:

\starttext
\startformula
v = \frac{1.32}{1.41} = 0.935
\stopformula
\stoptext

This produces the result attached below. The 1.32 looks fine, but the next two 
numbers have excess space around the decimal point. Adding the line

  \showmakeup[mathglue] %\mathspacingmode=1

to the preamble reveals that the second and third decimal points are being 
treated as binary operators. It’s very strang. Are others getting this?

Gavin




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


Re: [NTG-context] Building fomula

2023-03-25 Thread Willi Egger via ntg-context
Hello Alexandre, thank you so much, this is precisely what I was looking for!


Cheers
 
Willi
> On 25 Mar 2023, at 18:28, Alexandre Christe via ntg-context 
>  wrote:
> 
> Hi Willi,
> 
> A dead simple solution would be
> 
> \starttext
> \startformula
> {\frac{47 \times 62}{44 \times 56}} \times {12} \qquad \rm{or} \qquad 
> {{\frac{47 \times 62 \times 12}{44 \timess 56}}=14.2 \rm kilo}
> \stopformula
> 
> \stoptext
> 
> 
> Le sam. 25 mars 2023 à 18:09, Willi Egger via ntg-context 
>  a écrit :
> Good afternoon everybody,
> 
> I should place two faily simple formulae next to each other, they should be 
> coupled by ‘or’. What I have now is, that the formulae indeed are next to 
> each other and separated by ‘or’, but the result of the second formula is 
> moved und this formula to the next line.
> In the setup of  book there would be enough place, if I coud decrease the 
> space left and right of the ‘or’.
> 
> How can I achieve this?
> 
> Cheers 
> 
> Willi
> 
> \starttext
>   \startformulas
> \startformula[align=right]
>   {\frac{47 \times 62}{44 \times 56}} \times {12}
> \stopformula
> \startformula[align=right,width=0.2\textwidth]
>   or
> \stopformula
> \startformula[align=right]
>   {{\frac{47 \times 62 \times 12}{44 \times 56}}=14.2 \rm kilo}
> \stopformula
> 
>   \stopformulas
>   \blank[small]
>   rounded 14 kilo.
> \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
> ___

___
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] Building fomula

2023-03-25 Thread Alexandre Christe via ntg-context
Hi Willi,

A dead simple solution would be

\starttext
\startformula
{\frac{47 \times 62}{44 \times 56}} \times {12} \qquad \rm{or} \qquad
{{\frac{47 \times 62 \times 12}{44 \timess 56}}=14.2 \rm kilo}
\stopformula

\stoptext


Le sam. 25 mars 2023 à 18:09, Willi Egger via ntg-context <
ntg-context@ntg.nl> a écrit :

> Good afternoon everybody,
>
> I should place two faily simple formulae next to each other, they should
> be coupled by ‘or’. What I have now is, that the formulae indeed are next
> to each other and separated by ‘or’, but the result of the second formula
> is moved und this formula to the next line.
> In the setup of  book there would be enough place, if I coud decrease the
> space left and right of the ‘or’.
>
> How can I achieve this?
>
> Cheers
>
> Willi
>
> \starttext
>   \startformulas
> \startformula[align=right]
>   {\frac{47 \times 62}{44 \times 56}} \times {12}
> \stopformula
> \startformula[align=right,width=0.2\textwidth]
>   or
> \stopformula
> \startformula[align=right]
>   {{\frac{47 \times 62 \times 12}{44 \times 56}}=14.2 \rm kilo}
> \stopformula
>
>   \stopformulas
>   \blank[small]
>   rounded 14 kilo.
> \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] Building fomula

2023-03-25 Thread Willi Egger via ntg-context
Good afternoon everybody,

I should place two faily simple formulae next to each other, they should be 
coupled by ‘or’. What I have now is, that the formulae indeed are next to each 
other and separated by ‘or’, but the result of the second formula is moved und 
this formula to the next line.
In the setup of  book there would be enough place, if I coud decrease the space 
left and right of the ‘or’.

How can I achieve this?

Cheers 

Willi

\starttext
  \startformulas
\startformula[align=right]
  {\frac{47 \times 62}{44 \times 56}} \times {12}
\stopformula
\startformula[align=right,width=0.2\textwidth]
  or
\stopformula
\startformula[align=right]
  {{\frac{47 \times 62 \times 12}{44 \times 56}}=14.2 \rm kilo}
\stopformula
  
  \stopformulas
  \blank[small]
  rounded 14 kilo.
\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] update

2023-02-24 Thread Otared Kavian via ntg-context
Hi Hans,

Thank you very much for the new update.

Everything seem to work like a charm. In particular I played with the 
\underbrace and \overbrace when adding something under the \underbrace, or 
above the \overbrace, like in 

\startformula
\overbrace{1+x^2+a}^{= -1} +
\underbrace{ax^2 + bx + c}_{=2} = 1
\stopformula

and it works great !

Best regards : Otared

> On 23 Feb 2023, at 22:07, Hans Hagen via ntg-context  
> wrote:
> 
> Hi,
> 
> I uploaded a new version. We further improved Antykwa support,
> 
> \switchtobodyfont[antykwa]
> 
> \startTEXpage[offset=1dk]
>\im{
>f' = f'' = f''' = f'''' =
>a + b + \ldots + c +
>\overbar{x} + \overbar{S} + \bar{x} + \widebar{x}
>}
> 
>\im{
>\fenced[doublebar]{x} =
>\fenced[doublebar][size=1]{x_1} =
>\fenced[doublebar][size=2]{x_2} =
>\fenced[doublebar][size=3]{x_3} =
>\fenced[doublebar][size=4]{x_4} =
>\fenced[doublebar]{\blackrule[width=1cm,height=1cm]}
>}
> 
>\im{
>\fenced[bar]{x} =
>\fenced[bar][size=1]{x_1} =
>\fenced[bar][size=2]{x_2} =
>\fenced[bar][size=3]{x_3} =
>\fenced[bar][size=4]{x_4} =
>\fenced[bar]{\blackrule[width=1cm,height=1cm]}
>}
> 
>\im{
>\fenced[brace]{x} =
>\fenced[brace][size=1]{x_1} =
>\fenced[brace][size=2]{x_2} =
>\fenced[brace][size=3]{x_3} =
>\fenced[brace][size=4]{x_4} =
>\fenced[brace]{\blackrule[width=1cm,height=1cm]}
>}
> 
>\im{
>\root[4]{1+x^2+a} +
>\frac{1}{1+x^2+a} +
>\overparent{1+x^2+a} +
>\overbrace{1+x^2+a} +
>\overparent{x} +
>\overbrace{x} +
>\overbrace{i}
>}
> 
> \stopTEXpage
> 
> 
> This time with fancy radical bars, fraction bars, vertical bars, over and 
> underbars etc.
> 
> 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
> ___

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




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

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


[NTG-context] update

2023-02-23 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version. We further improved Antykwa support,

\switchtobodyfont[antykwa]

\startTEXpage[offset=1dk]
\im{
f' = f'' = f''' = f'''' =
a + b + \ldots + c +
\overbar{x} + \overbar{S} + \bar{x} + \widebar{x}
}

\im{
\fenced[doublebar]{x} =
\fenced[doublebar][size=1]{x_1} =
\fenced[doublebar][size=2]{x_2} =
\fenced[doublebar][size=3]{x_3} =
\fenced[doublebar][size=4]{x_4} =
\fenced[doublebar]{\blackrule[width=1cm,height=1cm]}
}

\im{
\fenced[bar]{x} =
\fenced[bar][size=1]{x_1} =
\fenced[bar][size=2]{x_2} =
\fenced[bar][size=3]{x_3} =
\fenced[bar][size=4]{x_4} =
\fenced[bar]{\blackrule[width=1cm,height=1cm]}
}

\im{
\fenced[brace]{x} =
\fenced[brace][size=1]{x_1} =
\fenced[brace][size=2]{x_2} =
\fenced[brace][size=3]{x_3} =
\fenced[brace][size=4]{x_4} =
\fenced[brace]{\blackrule[width=1cm,height=1cm]}
    }

\im{
\root[4]{1+x^2+a} +
\frac{1}{1+x^2+a} +
\overparent{1+x^2+a} +
\overbrace{1+x^2+a} +
\overparent{x} +
\overbrace{x} +
\overbrace{i}
}

\stopTEXpage


This time with fancy radical bars, fraction bars, vertical bars, over 
and underbars etc.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Math issue

2023-02-18 Thread Willi Egger via ntg-context
Hello Hans and Anditya,

thank you both for your answers. — Reconstructing now the math…

Kind regards

Willi

> On 16 Feb 2023, at 18:12, Aditya Mahajan via ntg-context  
> wrote:
> 
> On 2/16/2023 6:05 PM, Willi Egger via ntg-context wrote:
>> Hi math gurus,
>> I should typeset a couple of simple math formulae. However I do not get the 
>> desired result. I attach my output as pdf.
>> 1. Why is the \times 12 in the denominator although the fraction is grouped? 
>> — I tried also the grouping with bracis, which gives the same result.
>> 2. Why is the result after the equalsign in the denominator?
>> \starttext
>> \startformulas
>>  \startformula
>>\bgroup{47 \times 62}\over {44 \times 56}\egroup \times {12}
>>  \stopformula
>>  \startformula
>>{{47 \times 62 \times 12} \over {44 \times 56}}=14.2\ \rm kilo
>>  \stopformula
>> \stopformulas
>> \stoptext
>> Thank you for hinting me how to this correctly.
> 
> \frac{...}{...} .. forget about \over
> 
> -
>  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] Math issue

2023-02-16 Thread Aditya Mahajan via ntg-context
On Thu, 16 Feb 2023, Willi Egger via ntg-context wrote:

> Hi math gurus,
> 
> I should typeset a couple of simple math formulae. However I do not get the 
> desired result. I attach my output as pdf.
> 
> 1. Why is the \times 12 in the denominator although the fraction is grouped? 
> — I tried also the grouping with bracis, which gives the same result.
> 2. Why is the result after the equalsign in the denominator?
> 
> [...]

> Thank you for hinting me how to this correctly.

Have you tried using \frac{...}{...} instead of {... \over ...}

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

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


Re: [NTG-context] Math issue

2023-02-16 Thread Hans Hagen via ntg-context

On 2/16/2023 6:05 PM, Willi Egger via ntg-context wrote:

Hi math gurus,

I should typeset a couple of simple math formulae. However I do not get the 
desired result. I attach my output as pdf.

1. Why is the \times 12 in the denominator although the fraction is grouped? — 
I tried also the grouping with bracis, which gives the same result.
2. Why is the result after the equalsign in the denominator?


\starttext
\startformulas
\startformula
  \bgroup{47 \times 62}\over {44 \times 56}\egroup \times {12}
\stopformula
\startformula
  {{47 \times 62 \times 12} \over {44 \times 56}}=14.2\ \rm kilo
\stopformula

\stopformulas
\stoptext

Thank you for hinting me how to this correctly.


\frac{...}{...} .. forget about \over

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

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

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


[NTG-context] Font substitution for extensible symbols

2023-02-01 Thread Yaroslav Beltukov via ntg-context
Good day everyone,

I'm trying to replace the math radical symbol (with all its variants) in
one font with another one. Some fonts have too few radical symbols of
different sizes, which results in enormous spacing in radicals.

However, there is a bug in the new font replacement mechanism. Here is MWE:

% 0x221A is the radical symbol
\definefallbackfamily [MainFace] [mm] [TeX Gyre Pagella Math] [force=yes,
range=0x221A]
\definefontfamily [MainFace] [tf] [Cambria] % or [XITS]
\definefontfamily [MainFace] [mm] [Cambria Math] % or [XITS Math]
\setupbodyfont [MainFace]
\starttext
\startformula

\sqrt{\frac{1}{2}}\dorecurse{15}{+\sqrt{\blackrule[width=10pt,height=#1pt,depth=#1pt,color=gray]}}
\stopformula
\startformula
  \sqrt{\blackrule[width=10pt,height=100pt,depth=100pt,color=gray]}
\stopformula
\stoptext

It works in MKIV but it gives the following error in the latest LMTX:

...mkxl/math-vfu.lmt:675: attempt to get length of a nil value (global 'hp')

It is caused by the following loop in math-vfu.lmt:

local pv = olddata.parts
if pv then
pv = fastcopy(pv)
newdata.parts = pv
for i=1,#hp do
local pvi = pv[i]
...

One can see that #hp should be #pv. After this correction, the error
disappears and we get different sizes of radicals from the new font.
However, now the extended version of the radical does not work. Actually,
this loop is devoted to copying the parts of the extended symbol, and it
does not work as expected. Obviously, there is something deeper than the
correction of the typo. The same behaviour is for other extensible symbols
(e.g. parentheses).

I hope this issue can be resolved. A more deeper understanding is required
here.

Best regards,
Yaroslav

P.S. sometimes I get the following output. Maybe it is related:
otf reader  > cff > unknown local call ?, case 1 : [] n=0
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Unconnected \mathboxanchored produces unexpected results

2022-12-22 Thread Hans Hagen via ntg-context

On 12/22/2022 3:53 PM, Gavin via ntg-context wrote:

Hi Hans, MIkael and list,

I got an unexpected result when I asked for a \mathboxanchored, but then did 
not use it with a connector. I expected the \mathboxanchored contents to be 
typeset as usual, without a connector. Instead I got “ ::: c3” added into the 
formula (“c3” was the anchor’s tag).

MWE and unexpected output below.

Thanks,
Gavin


\starttext

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex,arrow=no] {c1}{c2}
%\connectboxanchors[bottom] [bottom] [distance=1ex,arrow=no] {c2}{c3} % <-- I 
decided not to use this connector, producing unexpected results.
\startformula
 \mathboxanchored[nucleus]{c1}{e}^{\dot\alpha}
 \mathboxanchored[nucleus]{c2}{e}_{\mu}
 \mathboxanchored[nucleus]{c3}{e}^{\beta} = \frac{1}{\sqrt{2}}
 \bar\sigma^{\dot\alpha\beta}_{\mu}
\stopformula
\stopboxanchoring

\stoptext

can you try the latest binary fron the farm (remake th eformat)


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

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

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


[NTG-context] Unconnected \mathboxanchored produces unexpected results

2022-12-22 Thread Gavin via ntg-context
Hi Hans, MIkael and list,

I got an unexpected result when I asked for a \mathboxanchored, but then did 
not use it with a connector. I expected the \mathboxanchored contents to be 
typeset as usual, without a connector. Instead I got “ ::: c3” added into the 
formula (“c3” was the anchor’s tag).

MWE and unexpected output below.

Thanks,
Gavin


\starttext

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex,arrow=no] {c1}{c2}
%\connectboxanchors[bottom] [bottom] [distance=1ex,arrow=no] {c2}{c3} % <-- I 
decided not to use this connector, producing unexpected results.
\startformula
\mathboxanchored[nucleus]{c1}{e}^{\dot\alpha}
\mathboxanchored[nucleus]{c2}{e}_{\mu}
\mathboxanchored[nucleus]{c3}{e}^{\beta} = \frac{1}{\sqrt{2}}
\bar\sigma^{\dot\alpha\beta}_{\mu}
\stopformula
\stopboxanchoring

\stoptext



anchors-002-copy.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] Accent wrecking \mathboxanchored

2022-12-22 Thread Gavin via ntg-context
Hi Hans, Mikael and list,

I’ve been testing the connectors, which work great with the latest upload. One 
problem I found: an accent in the \mathboxanchored causes a "Missing number, 
treated as zero” error and no output. MWE below.

Thanks for all of the improvements. I’m making all kinds of connections!
Gavin


\starttext

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex,arrow=no] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=1ex,arrow=no] {c2}{c3}
\startformula
\mathboxanchored[nucleus]{c1}{e}^{\dot\alpha}
%\mathboxanchored[nucleus]{c2}{e}_{\mu}% <-- This works, without 
accent
%\mathboxanchored[nucleus]{c2}{\bar{e}}_{\mu} % <-- This does not work, 
with accent
\bar{\mathboxanchored[nucleus]{c2}{e}}_{\mu} % <-- This works, but 
connector punches through accent
\mathboxanchored[nucleus]{c3}{e}^{\beta} = \frac{1}{\sqrt{2}}
\bar\sigma^{\dot\alpha\beta}_{\mu}
\stopformula
\stopboxanchoring

\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] Mathematical MetaFun Mania

2022-12-15 Thread Otared Kavian via ntg-context
Hi Hans,

Thanks for the new release and the nice anchoring features.

I played a little bit with these, and noticed some issues: in the following 
example, linking the bottom bounds of the integral signs is fine (as long as 
numbers are put there), but for the upper bounds, the \infty and \pi/2 are not 
accepted (nor is any letter or greek symbol), but if one replaces \infty and 
\pi/2 with numbers, then the link between the upper bounds is shown. (In this 
example the links are invading the text, but probably this is due to the fact 
that I just copied the Metapost snippet you sent to Gavin).

Best regards: Otared

% begin anchoring-integrals.tex
\starttext

\startMPpositiongraphic{mypos:boxanchor:top}
begingroup ;
save f, t, p ; 
pair f, t ; 
path p ;
f := positionxy(mpvars("from")) ;
t := positionxy(mpvars("to")) ;
p := f { up } .. t ;
drawarrow p
withpen pencircle scaled mpvard "rulethickness"
withcolor mpvars "linecolor" ; % historically different 
names
positioninregion ;
endgroup ;
\stopMPpositiongraphic

\startMPpositiongraphic{mypos:boxanchor:bottom}
begingroup ;
save f, t, p ; 
pair f, t ; 
path p ;
f := positionxy(mpvars("from")) ;
t := positionxy(mpvars("to")) ;
p := f { down } .. t ;
drawarrow p
withpen pencircle scaled mpvard "myrulethickness"
withcolor mpvars "linecolor" ; % historically different 
names
positioninregion ;
endgroup ;
\stopMPpositiongraphic

\input thuan.tex

\startboxanchoring[+]
\connectboxanchors[top][top]
[distance=1ex,
rulethickness=1pt,
rulecolor=darkgreen,
mp=mypos:boxanchor:top]{b1}{b3}

\connectboxanchors[bottom][bottom]
[distance=1ex,
myrulethickness=1pt,
rulecolor=darkred,
mp=mypos:boxanchor:bottom]{b2}{b4}

\startformula
\int_{\mathboxanchored[nucleus]{b2}0}^{\mathboxanchored[nucleus]{b1}\infty} 
\frac{\dd x}{1 + x^2} = 
\int_{\mathboxanchored[nucleus]{b4}0}^{\mathboxanchored[nucleus]{b3}\pi/2}(1 + 
\tan(\theta)^2)\frac{\dd \theta}{1 + \tan(\theta)^2} = \frac{\pi}{2}
\stopformula
\input thuan.tex
\stopboxanchoring

\stoptext
% end anchoring-integrals

> On 15 Dec 2022, at 18:21, Hans Hagen via ntg-context  
> wrote:
> 
> On 12/15/2022 5:15 PM, Gavin wrote:
>> Hi Hans and List,
>>>> 2) Can I tell \connectboxanchors to use my MetaPost code and pass 
>>>> key=value pairs like I do with \setMPpositiongraphic?
>>> see attached ... the 'cross pages' feature is in the upcoming
>> This indeed passes key=value pairs, but I cannot get it to pass mine. Is 
>> there some intermediate step? Your example has a key=value pair in 
>> \connectboxanchors and which is accessed in the MetaPost code. The pair, and 
>> MetaPost code are:
>>   rulethickness=1pt
>>   mpvard “rulethickness"
>> However, if I change the pair and MPcode to (see attached example for full 
>> code)
>>   myrulethickness=1pt
>>   mpvard “myrulethickness"
>> it doesn’t work. Similarly, you have a pair and MPcode that don’t match.
>>   rulecolor=darkgreen
>>   mpvars "linecolor"
>> This may be a historical fluke, but it suggests that there is some 
>> intermediate translation that I am missing. Any way I can name and pass by 
>> own key=value pairs?
> I updated lmtx so you can test it again.
> 
> Hans
> 
> ps. For the adventurous some bonus experiment in the engine:
> 
> \def\ccc#1#2#3#4#5#6#7#8#9#A#B#C#D#E#F%
>  {\def\ddd{#A-#D-#E/#F-#4-#1}%
>   #A-#D-#E/#F-#4-#1+\ddd}
> 
> so, upto 15 arguments:
> 
> [[\ccc123456789abcdef]]
> 
> (not that we need it in the context core, so more a gimmick for users and it 
> fits the much is already hex approach)
> 
> 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
> arch

Re: [NTG-context] Mathematical MetaFun Mania

2022-12-15 Thread Hans Hagen via ntg-context

On 12/15/2022 4:20 AM, Gavin via ntg-context wrote:

Hello MetaFun Math Lovers,

I am using MetaFun to attach diagrams to formulas. Both the physics and the 
typesetting are going great! I attached a sample below, to give a taste of what 
I am trying to do. This page of actual calculations has examples of almost 
everything I need. It’s a lot, but it is all working. Right now the interface 
is terrible, but effective. Thanks to Hans and Mikael for many helpful hints!

I am still using \hpos and \setMPpositiongraphic, because I haven't figured out 
how to pass information from \mathboxanchored and \connectboxanchors to my 
MetaPost code. Here is the code for the connectors:

\startMPpositiongraphic{mypos:contract}
   path pa, pb, pab ; numeric na, nb ; string ta, tb, hand, product ;
   ta := mpvars("from") ;
   tb := mpvars("to") ;
   stemshiftfrom := (EmWidth/8)*mpvarn("startstem") ;
   stemshiftto   := (EmWidth/8)*mpvarn("stopstem") ;
   hand := mpvars("hand") ;
   product := mpvars("product") ;
   delta := mpvard("distance") ;
   na := positionpage(ta) ; % page number of a
   nb := positionpage(tb) ; % page number of b
   pa := positionbox(ta) ;  % box of a
   pb := positionbox(tb) ;  % box of b
   if hand = "right" :
  z1 = 0.5[llcorner pa,lrcorner pa] shifted (stemshiftfrom, -ExHeight/4) ;
  z2 = 0.5[llcorner pb,lrcorner pb] shifted (stemshiftto,   -ExHeight/4) ;
  y3 = min(y1,y2) - ExHeight/2 -delta;
   else :
 z1 = 0.5[ulcorner pa,urcorner pa] shifted (stemshiftfrom,  ExHeight/4) ;
 z2 = 0.5[ulcorner pb,urcorner pb] shifted (stemshiftto,ExHeight/4) ;
 y3 = max(y1,y2) + ExHeight/2 +delta;
   fi ;
   if na = nb : % Check that positions are on the same page
 pickup pencircle scaled 0.6pt ;
 if product = "sym" :
   draw z1 -- (x1,y3+ExHeight/2) ;
   draw z2 -- (x2,y3+ExHeight/2) ;
   pickup pencircle scaled 1.2pt ;
   draw (x1-EmWidth/8,y3) -- (x2+EmWidth/8,y3) ;
 else :
   pab := z1 -- (x1,y3) -- (x2,y3) -- z2{down} ;
   draw pab ;
 fi ;
 positioninregion ;
   fi ;
\stopMPpositiongraphic

A connector command might look something like this:

\setMPpositiongraphic{X-1}{mypos:contract}{to=X-2,product=sym,startstem=-2,stopstem=2,distance=0.5ex}

All of the key=value pairs in the last argument of \setMPpositiongraphic pop 
right up in my MetaPost code with mpvar(“key”). I haven’t been able to follow 
this with \mathboxanchored and \connectboxanchors. My two questions are:

1) Can I use \setMPpositiongraphic with \mathboxanchored? That would allow me 
to go straight to my MetaPost code without the \connectboxanchors interface

2) Can I tell \connectboxanchors to use my MetaPost code and pass key=value 
pairs like I do with \setMPpositiongraphic?

see attached ... the 'cross pages' feature is in the upcoming

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

\usemodule[article-basic]

\starttext

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex,arrow=no] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=1ex,arrow=no] {c2}{c3}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
\mathboxanchored[nucleus]{c3}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex,arrow=no] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=1ex,arrow=no] {c2}{c3}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
\mathboxanchored[nucleus]{c3}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex,arrow=yes,page=yes] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=1ex,arrow=yes,page=yes] {c2}{c3}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
  e _{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\page
\startformula
  e _{\alpha}
  e ^{\mu}
\mathboxanchored[nucleus]{c3}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startMPpositiongraphic{mypos:boxanchor:top}
begingroup ;
save f, t, p ; pair f, t ; path p ;
f := positionxy(mpvars("from")) ;
t := positionxy(mpvars(&

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

2022-12-07 Thread Hans Hagen via ntg-context

On 12/7/2022 1:42 PM, Gavin via ntg-context wrote:

Hi List,

I solved my original problem 2, allowing me to reuse the same \hpos labels in 
different equations without interference. I added an equation counter and set 
up my custom math version of \hpos to use the count as part of the label 
internally. I tried to do this with a regular ConTeXt counter, but had all 
sorts of mysterious, wrong behavior. When I switched to using a Lua counter, 
everything worked immediately. So, while there is nothing brilliant about this 
solution, I’ll share it for anyone who might want to do something similar in 
the future.

attached an example by Mikael ... it should work with tonights update

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
-
 \usemodule[article-basic]

\starttext

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=1ex] {d1}{d2}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
\mathboxanchored[nucleus]{d1}{todo}
\mathboxanchored[nucleus]{d2}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startboxanchoring[+]
\connectboxanchors[top][top][distance=0.5ex,arrow=no] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=0.5ex,arrow=no] {c2}{c3}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
\mathboxanchored[nucleus]{c3}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startboxanchoring[+]
\connectboxanchors[top][top][text={\smallinfofont upper limits}]{b1}{b2}
\connectboxanchors[bottom] [bottom] [text={\smallinfofont lower limits}]{a1}{a2}
\startformula
\int_{\mathboxanchored{a1}{0}}^{\mathboxanchored{b1}{1}} \frac{1}{1+x^2} \dd x
=
\int_{\mathboxanchored{a2}{0}}^{\pi\mathboxanchored{b2}{/}4} \frac{1}{1+\tan^2 
t}(1+\tan^2 t)\dd t
\stopformula
\stopboxanchoring

\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] \hpos in math

2022-12-06 Thread Hans Hagen via ntg-context

On 12/6/2022 12:39 AM, Gavin via ntg-context wrote:

Hello List,

I am working on a project which combines graphics with formulas, like this:

My code for creating this formula is attached. It works well, but I have a 
couple of questions that could make it work better.

1) Is there a mathematics version of \hpos? The contents of \hpos are set as 
text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses 
\hpos but sets the contents as display-style math. This isn’t great for 
spacing, and it does't adapt to different math styles. \framed has a math 
version, \mframed, that sets the contents in the appropriate math style. If 
anyone know a way to accomplish that with \hpos, I’d love to know.


there actually is a subsystem that keeps math as-is-it (styles and 
spacing and such), see attached



2) Is there a way to limit the scope of the \hpos labels to a single formula. 
This could turn into a book length project, with several formulas per page and 
several connections per formula. If every \hpos in the entire book needs a 
unique identifier, I could go mad. Under no circumstances will I connect one 
formula to another, so I’d like to be able to use something like 
\hpos{A}{…}…\hpos{B}{…} in each formula. Any suggestions?


one problem is (and i'm working on that) that one could want multiple 
anchors on a math atom as well as pu tit on the nuclues only



I’ve got to say, LMTX is an absolutely amazing tool for this project, which 
includes complicated networks of connections above and below many formulas. The 
integration of TeX, MetaPost, and Lua makes this project tremendous fun.


that's the idea


P.S. For the curious, I’m using a method for doing General Relativity based on 
spinors rather than tensors, following the methods of Penrose and Rindler in 
their 1985 books “Spinors and Space-time.” In the typesetting example above, 
the e_\alpha and e_{\dot\beta} are basis spinors (one left-handed, one 
right-handed). The e^\mu is the Infeld-van der Waerden symbol relating the spin 
basis to the coordinate basis. The connections are spinor index contractions. 
The formula above relates the components of the Infeld-van der Waerden symbol 
to the Pauli sigma matrices. This relationship only works in flat space, so 
this is an easy example! [Penrose and Rindler, vol 1 p. 125]


in your example we need a way to anchor on just the 'e' right? or do you 
want it on the e + super/subscript?


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
-
\usemodule[article-basic]

\setupbodyfont[dejavu]

\starttext

\setupboxanchorcontent
  [top,left]
  [rulecolor=darkyellow]

\setupboxanchorcontent
  [bottom,right]
  [rulecolor=darkblue]

\input tufte

$
\connectboxanchors[top][top]{one}{two}
x + \frac[source=\namedboxanchor{one}]{1+x}{2-x} =
z + \frac[source=\namedboxanchor{two}]{1+x^2}{2-x^3}
$

\input ward


\connectboxanchors[top][top]{one}{two}

So how about
$
x + \frac[source=\namedboxanchor{one}]{1+x}{2-x}
$
and
$
z + \frac[source=\namedboxanchor{two}]{1+x^2}{2-x^3}
$
then. Of course we need to handle page crossing then.

\connectboxanchors[top][top]{one}{two}
\connectboxanchors[top][top][dash=1]{three}{four}

And can we do
$
% \showboxes
x + \frac{1 \mathboxanchored{one}{+} x \mathboxanchored{three}{-} z}{2-x}
$
and
$
% \showboxes
z + \frac{1 \mathboxanchored{two}{+} x^2 \mathboxanchored{four}{-} z}{2-x^3}
$
to be more granular?

\blank[2*big]

\connectboxanchors[top]   [top]   [text={\small\small\strut\bf watch}]{one}  
{two}
\connectboxanchors[bottom][bottom][text={\small\small\strut\bf out}]  
{three}{four}

And can we do
$
% \showboxes
x + \frac{1 \mathboxanchored{one}{+} x - z}{2 \mathboxanchored{three}{-} x}
$
and
$
% \showboxes
z + \frac{1 \mathboxanchored{two}{+} x^2 - z}{2 \mathboxanchored{four}{-} 
x^3}
$
to be more granular?

\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] font features

2022-11-03 Thread Hans Hagen via ntg-context

On 11/3/2022 12:52 PM, Herbert Voss via ntg-context wrote:



Am 03.11.22 um 12:37 schrieb Thomas A. Schmitz via ntg-context:

Hi,

is there an easy way to get a list of all features that a font has and 
typeset a sample text to see the result of every single feature? There 
probably is, but I couldn't find anything...


You'll get only the features with otfinfo in the terminal. For example:

iMac:~ voss$ otfinfo -f `kpsewhich LibertinusSerif-Regular.otf`
c2sc    Small Capitals From Capitals
calt    Contextual Alternates
case    Case-Sensitive Forms
ccmp    Glyph Composition/Decomposition
cpsp    Capital Spacing
dlig    Discretionary Ligatures
frac    Fractions
hlig    Historical Ligatures
kern    Kerning
liga    Standard Ligatures
lnum    Lining Figures
mark    Mark Positioning
mkmk    Mark to Mark Positioning
onum    Oldstyle Figures
pnum    Proportional Figures
salt    Stylistic Alternates
smcp    Small Capitals
ss01    Stylistic Set 1
ss02    Stylistic Set 2
ss03    Stylistic Set 3
ss04    Stylistic Set 4
ss05    Stylistic Set 5
ss06    Stylistic Set 6
ss07    Stylistic Set 7
subs    Subscript
sups    Superscript
tnum    Tabular Figures
zero    Slashed Zero


mtxrun --script fonts --list --info --file LibertinusSerif-Regular.otf

mtx-fonts   |
mtx-fonts   | mapping   : 1
mtx-fonts   | fontname  : libertinusserifregular
mtx-fonts   | fullname  : libertinusserifregular
mtx-fonts   | filename  : LibertinusSerif-Regular.otf
mtx-fonts   | family: libertinusserif
mtx-fonts   | weight: normal
mtx-fonts   | style : normal
mtx-fonts   | width : normal
mtx-fonts   | variant   : normal
mtx-fonts   | fweight   : conflict: regular
mtx-fonts   |
mtx-fonts   | gpos features:
mtx-fonts   |
mtx-fonts   |   feature  script   languages
mtx-fonts   |
mtx-fonts   |   cpsp cyrl dflt
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |   kern cyrl dflt
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |   mark cyrl dflt
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn dflt
mtx-fonts   |   mkmk cyrl dflt
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn dflt
mtx-fonts   |
mtx-fonts   | gsub features:
mtx-fonts   |
mtx-fonts   |   feature  script   languages
mtx-fonts   |
mtx-fonts   |   c2sc cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   calt cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   case cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   ccmp cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   dlig cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   frac cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   hlig cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts   |   liga cyrl dflt mkd srb
mtx-fonts   |dflt dflt
mtx-fonts   |grek dflt
mtx-fonts   |hebr dflt
mtx-fonts   |latn aze crt dflt fin ism kaz lsm nor 
nsm sks ssm sve tat trk

mtx-fonts 

Re: [NTG-context] font features

2022-11-03 Thread Herbert Voss via ntg-context



Am 03.11.22 um 12:37 schrieb Thomas A. Schmitz via ntg-context:

Hi,

is there an easy way to get a list of all features that a font has and 
typeset a sample text to see the result of every single feature? There 
probably is, but I couldn't find anything...


You'll get only the features with otfinfo in the terminal. For example:

iMac:~ voss$ otfinfo -f `kpsewhich LibertinusSerif-Regular.otf`
c2sc    Small Capitals From Capitals
calt    Contextual Alternates
case    Case-Sensitive Forms
ccmp    Glyph Composition/Decomposition
cpsp    Capital Spacing
dlig    Discretionary Ligatures
frac    Fractions
hlig    Historical Ligatures
kern    Kerning
liga    Standard Ligatures
lnum    Lining Figures
mark    Mark Positioning
mkmk    Mark to Mark Positioning
onum    Oldstyle Figures
pnum    Proportional Figures
salt    Stylistic Alternates
smcp    Small Capitals
ss01    Stylistic Set 1
ss02    Stylistic Set 2
ss03    Stylistic Set 3
ss04    Stylistic Set 4
ss05    Stylistic Set 5
ss06    Stylistic Set 6
ss07    Stylistic Set 7
subs    Subscript
sups    Superscript
tnum    Tabular Figures
zero    Slashed Zero


Herbert
___
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-03 Thread Otared Kavian via ntg-context
Hi Mikael,

Thanks for your reply.
Indeed with your hint the issue disappears. 
I’ll change my definition…

Best regards: Otared

> On 2 Nov 2022, at 21:44, Mikael Sundqvist via ntg-context 
>  wrote:
> […]
> 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
> ___

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



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

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


Re: [NTG-context] 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] Bug in math alignment

2022-11-02 Thread Otared Kavian via ntg-context
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
> 
> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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



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

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


Re: [NTG-context] Bug in math alignment

2022-11-02 Thread Jeong Dal via ntg-context
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




___
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] Bug in math alignment

2022-11-02 Thread Otared Kavian via ntg-context
Hi Hans and Mikael,

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.


%% begin bug-mathalignment.tex
\definemathmatrix[alignedcases]
[align={1:right,2:left,3:left},
distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]

\starttext
Consider this
\placeformula
\startformula
\startalignedcases
\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
\stopalignedcases
\stopformula
or this (with\type{\displaystyle} added)
\placeformula 
\startformula
\startalignedcases
\NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR
\NC  \displaystyle\frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC 
\qquad\text{on }\, \partial\Omega. \NR
\stopalignedcases
\stopformula
Actually, one should have this
\startformula
\frac{\partial u}{\partial {\bi n}}  = V u + \phi  \qquad\text{on }\, 
\partial\Omega.
\stopformula
If one adds \type{\displaystyle} both to the numerator and denominator of 
\type{\frac}, the result is correct:
\placeformula 
\startformula
\startalignedcases
\NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR
\NC  \frac{\displaystyle\partial u}{\displaystyle\partial {\bi n}} \NC = V u + 
\phi \NC \qquad\text{on }\, \partial\Omega. \NR
\stopalignedcases
\stopformula

\stoptext
%% end bug-mathalignment.tex

___
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] Formula has excess vertical spacing when in two column itemize

2022-10-21 Thread Gavin via ntg-context
Hi List,

I am getting better at adjusting the space in enumerations, but I just put a 
formula inside an enumeration, and the formula’s vertical spacing became 
excessive. I’m not sure how the enumeration caused this problem.


\starttext

Evaluate the following derivatives.

\startitemize[n, columns, two, nowhite, after]

\item\hspace[big] $\frac{d}{dx} x^2$

This is where the solution should be. Text answers look fine, but formulas have 
too much space above, below and between lines\dots.

\item\hspace[big] $\frac{d}{dx}\left( x^3 + 2x \right)$

\item\hspace[big] $\frac{d}{dx}\left( x^{-2} \right)$

\item\hspace[big] $\frac{d}{dt}\left( 4t^4 - 3t^{\onehalf} \right) $

\item\hspace[big] $\frac{d}{dt}( 9 - 3t )$

\startformula\startmathalignment
\NC \frac{d}{dt}( 9 - 3t ) \NC= \frac{d}{dt} 9 - \frac{d}{dt} 3t \NR
\NC  \NC= 0 - 3\frac{d}{dt} t \NR
\NC  \NC= -3\cdot 1t^0 \NR
\NC  \NC= -3 \NR
\stopmathalignment\stopformula

\item\hspace[big] $\frac{d}{dp}\left( p^3 - 2p \right)$

\stopitemize

\stoptext


I’m also attaching a file with the above issue followed by the correct spacing 
in one-column for comparison.

I’m using LMTX (today’s upload, ver: 2022.10.21 21:13 LMTX  fmt: 2022.10.21) on 
an M1 Mac.

Any ideas?
Gavin



TwoColumnProblems.pdf
Description: Adobe PDF document


TwoColumnProblems.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://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 alignment problem

2022-09-22 Thread Jan-Erik Hägglöf via ntg-context
That was the solution, it worked!

Thank you so much!

/Jan-Erik

> 22 sep. 2022 kl. 14:54 skrev Alexandre Christe via ntg-context 
> :
> 
> Hi Jan-Erik,
> 
> One way I came across searching the mailing list is the following:
> 
> \starttext
> 
> \startitemize [a,columns,joinedup] [n=3,grid=line]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
> 
> \stoptext
> 
> Could be that there is a better way.
> 
> Le jeu. 22 sept. 2022 à 12:57, Jan-Erik Hägglöf via ntg-context 
> mailto:ntg-context@ntg.nl>> a écrit :
> Dear List!
> 
> I do not know how to solve this issue.
> 
> I want the formulas appear on same height, as you can se on the attachment 
> the formula containing a fraction displaces on another vertical position 
> compared to the other equations.
> 
> How do I correct this?
> 
> Code snippet pasted from garden
> 
> \starttext
> 
> \startitemize[a,columns,three]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
> 
> \stoptext
> 
> 
> Thanks in advance
> 
> Jan-Erik
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> <https://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : https://contextgarden.net <https://contextgarden.net/>
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> <https://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : https://contextgarden.net <https://contextgarden.net/>
> ___

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

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


Re: [NTG-context] Math alignment problem

2022-09-22 Thread Alexandre Christe via ntg-context
Hi Jan-Erik,

One way I came across searching the mailing list is the following:

\starttext

\startitemize [a,columns,joinedup] [n=3,grid=line]
\item $ 56 + 2 \cdot 3 $
\item $ 5-(7) $
\item $ \frac{21}{7} $
\stopitemize

\stoptext

Could be that there is a *better* way.

Le jeu. 22 sept. 2022 à 12:57, Jan-Erik Hägglöf via ntg-context <
ntg-context@ntg.nl> a écrit :

> Dear List!
>
> I do not know how to solve this issue.
>
> I want the formulas appear on same height, as you can se on the attachment
> the formula containing a fraction displaces on another vertical position
> compared to the other equations.
>
> How do I correct this?
>
> Code snippet pasted from garden
>
> \starttext
>
> \startitemize[a,columns,three]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
>
> \stoptext
>
>
> Thanks in advance
>
> Jan-Erik
>
> ___
> 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] Math alignment problem

2022-09-22 Thread Jan-Erik Hägglöf via ntg-context
Dear List!I do not know how to solve this issue.I want the formulas appear on same height, as you can se on the attachment the formula containing a fraction displaces on another vertical position compared to the other equations.How do I correct this?Code snippet pasted from garden\starttext\startitemize[a,columns,three]\item $ 56 + 2 \cdot 3 $\item $ 5-(7) $\item $ \frac{21}{7} $\stopitemize\stoptextThanks in advanceJan-Erik

result.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] new uplaod

2022-09-11 Thread Hans Hagen via ntg-context

On 9/10/2022 9:45 AM, Alexandre Christe via ntg-context wrote:

Hi Hans,

Will |\mvert|and|\midalso be included in the \autofencelogic? It would 
be quite useful.|
we don't have \mvert so i'll add that ... in a next upload you can do 
the attached (kind of experimental as Mikael and I need to review this 
which we will do next week)


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
-
% \setupbodyfont[cambria]
\setupbodyfont[pagella]
% \setupbodyfont[bonum]

\starttext

% \showmakeup[mathglue] \mathspacingmode1 \showglyphs

\enablemathautospacing % more global
\enablemathautofencing % more global
\enablemathautonumbers % more global
\autofences% more local

\startTEXpage [offset=1dk]

% $|x| + |3|$

% $ x \middle | \frac{a}{x}$

% $ x | \frac{a}{x}$

% $ ( \frac{a}{x} + b | x )$

$ ( \frac{a}{x} + b | x )$

$ ( \frac{a}{x} + b || x )$

$ ( \frac{a}{x} + b ||| x )$


$ ( \frac{a}{x} + b + |x| )$

$ ( \frac{a}{x} + b + ||x|| )$

$ ( \frac{a}{x} + b + |||x||| )$

% $ ( \frac{a}{x} + b + |x| + 2)$

% $ ( \frac{a}{x} + b \lvert x )$

% $ ( \frac{a}{x} + b \mvert x )$

% $ ( \frac{a}{x} + b \mVert x )$

% $ ( \frac{a}{x} + b \vert x )$

% $ ( \frac{a}{x} + b \Vert x )$

\stopTEXpage

\stoptext


fences-002.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] new uplaod

2022-09-10 Thread Hans Hagen via ntg-context

On 9/10/2022 9:45 AM, Alexandre Christe via ntg-context wrote:

Hi Hans,

Will |\mvert|and|\midalso be included in the \autofencelogic? It would 
be quite useful.|


i prototyped it but the chairman of the CMS has to check it before we 
decide to enable it


one complication is that

$ \autofences x | \frac{a}{x}$

$ \autofences ( \frac{a}{x} + b | x )$

should also work (lone middles)

Le jeu. 25 août 2022 à 18:18, Hans Hagen via ntg-context 
mailto:ntg-context@ntg.nl>> a écrit :


Hi,

I uploaded a new lmtx. Again some updated math of which details will be
revealed later. Apart from some details we added suport for fourier
notations. There are no high level definitions yet as we have to invent
names but this is how it works (private unicode slots might change):

\setupbodyfont[pagella]

\starttext

\setupmathdelimited
    [topoffset=.2\exheight]

\definemathdelimited
    [fourier]
    [rule=no,
     left=\zerocount,
     right="FE944]

\definemathdelimited
    [courier]
    [rule=no,
     left=\zerocount,
     right="FE946]

\definemathdelimited
    [xourier]
    [rule=no,
     left=\zerocount,
     right="FE948]

$ \fourier{(z+1)} $

$ \fourier{(z+1)} + \sqrt[2]{1}$

$ \fourier{(z+1)} + \courier{(z+1)} + \xourier{(z+1)} $

$ \fourier{\left(z+\frac12\right)} + \courier{\left(z+\frac12\right)} +
\xourier{\left(z+\frac12\right)} $

$ \autofences \fourier{(z+\frac12)} + \courier{(z+\frac12)} +
\xourier{(z+\frac12)} $

$ \widehat{x^2 + 2x + 2} $

\stoptext

This example also shows a new \autofences feature and widehats
(widetilde and widecheck also work that way) that overcome limitations
in fonts, so

\def\CrappyHack#1{\im{#1{a} + #1{a+b} + #1{a+b+c} + #1{a+b+c+d} +
#1{a+b+c+d+e} + #1{a+b+c+d+e+f}}\par}
\CrappyHack\widehat
\CrappyHack\widetilde
\CrappyHack\wideacute
\CrappyHack\widecheck

will work. For thise in finance we now have

$ \annuity{x + 1} + \lannuity{x + 1} + \rannuity{x + 1} +
\lrannuity{x +
1} $

these are basically radicals (like sqrt) with two sided symbols.

Hans


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

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

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

___


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

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



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2022-07-27 Thread Hans Hagen via ntg-context

On 7/27/2022 7:03 AM, Aditya Mahajan via ntg-context wrote:


Very nice presentation! Lots of new features to play with.
latest upload has eperimental x scaling (as we have with text \tx \txx 
whuch can come in handy when one needs to squeeze some math into some place


\usemodule[article-basic]
\setupbodyfont[11pt]
\setuplayout[tight]

\starttext

\startbuffer

\protected\def\TinyMath{\setmscale {800}}  % {\setmscale{0.8}}
\protected\def\PettyMath   {\setmscale {700}}  % {\setmscale{0,7}}
\protected\def\PatheticMath{\setmscale {400}}  % {\setmscale{0,4}}
\protected\def\ExtremeMath {\setmscale{1500}}  % {\setmscale{1.5}}

\startformula   a=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula \mx   a=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula \mxx  a=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula \TinyMath a=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula \PettyMatha=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula \PatheticMath a=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula \ExtremeMath  a=b^2 + \sqrt[3]{\frac{1}{x}} \stopformula
\startformula
{\TinyMath a=b^2 + \sqrt[3]{\frac{1}{x}}} \quad + \quad
{\PettyMatha=b^2 + \sqrt[3]{\frac{1}{x}}} \quad + \quad
{\PatheticMath a=b^2 + \sqrt[3]{\frac{1}{x}}}
\stopformula
\stopbuffer

\input tufte

\getbuffer

\input tufte

\typebuffer

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

2022-07-08 Thread Hans Hagen via ntg-context

On 7/9/2022 12:34 AM, Otared Kavian via ntg-context wrote:




On 6 Jul 2022, at 22:10, Hans Hagen via ntg-context  wrote:

Hi,

We're pleased to announce the first official release of the new math code. 
We're talking of:

[…]


Dear Hans and Mikael،

Thank you very much for the new upload and the new stuff for tyepsetting maths. 
I have been playing around with the features presented in the example file sent 
by Mikael, and I must say, among other things you have implemented, the 
constructs \bearkhere and \skiphere, and friends, are absolutely great, 
brilliant and so simple! I wonder why such a simple and elegant solution was 
not around before…


they were to some extend (in split=text mode) but never advocated but we 
added some to it as well as made it work with diferent alignments (most 
noticeably slanted) and number placement (overflow)



As a plain TeX traditionalist I am a little bit sad to let the \over construct 
be ditched, but my sadness did not last too long.


just think of the side effects:

   {a}\over{y} + z

y and z are combined so one need to add { }

  {{a}\over{y}}

thenm infleuncing styles becomes trickier too; the lot becomes an ord 
(ok, not in lmtx, where it becomes a fraction atom) and when you compare


  {{a}\over{y}}
  \frac{a}{b}

you even save two keystrokes -)

it's also not easy to control spacing etc because one cannot redefine 
over; actually fractions uses \U[..over|above|..] which takes two 
arguments (forward scanning)



It seems that the \choose construct has been ditched but I did not guess what 
has replaced it (I guess the reason is the same for ditching \over, since the 
construct used to be ${n \choose k}$ and this is not what one wants to have in 
a macro).


some of these were just old school simple things but we have better 
alternatives; and if not: just specify what you need and we will come up 
with something (configurable)


(of course one can just define the old schoose)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Font too small with a macro

2022-04-23 Thread Günter Kolousek via ntg-context


Hi,

I see... Thanx, also for the reference to \definemathcommand!

Best,
Günter

Mikael Sundqvist via ntg-context @ 2022-04-23 17:12 +02:


Hi,

be careful with spacing. Try

\protected\def\Exp{\normal exp}
\startformula
\exp x = \Exp x.
\stopformula

If you need more math functions, you can try (here for arsinh):

\definemathcommand[arsinh][nolop]{\mfunction{arsinh}}

Best, Mikael

On Sat, Apr 23, 2022 at 5:03 PM Günter Kolousek via ntg-context
 wrote:



Hi,

if I replace your definition of exp by

  \protected\def\exp{\normal exp}

it works well (at least on my installation of lmtx), but
I'm just a beginner in using context...

Best,
Günter


Mikael Sundqvist via ntg-context @ 2022-04-23 15:27 +02:

> On Sat, Apr 23, 2022 at 12:11 PM Fabrice Couvreur via
> ntg-context
>  wrote:
>>
>> Hello,
>> If I compile with context the expected result is correct but
>> with lmtx the font under the square root is smaller.
>> Thank you
>> Fabrice
>>
>> \protected\def\exp{\text{\normal exp}}
>>
>> \starttext
>> \startformula
>>\sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right).
>> \stopformula
>> \stoptext
>
> Hi,
>
> without your redefinition of \exp it looks fine (exp is 
> already

> defined). Does that solve your problem, or are you doing
> something
> else, and this exp was just an example?
>
> Best, Mikael
> 
___
> If your question is of interest to others as well, please add 
> an

> entry to the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / 
> http://context.aanhet.net

> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
___
___
If your question is of interest to others as well, please add 
an entry to the Wiki!


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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

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

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


Re: [NTG-context] Font too small with a macro

2022-04-23 Thread Mikael Sundqvist via ntg-context
Hi,

be careful with spacing. Try

\protected\def\Exp{\normal exp}
\startformula
\exp x = \Exp x.
\stopformula

If you need more math functions, you can try (here for arsinh):

\definemathcommand[arsinh][nolop]{\mfunction{arsinh}}

Best, Mikael

On Sat, Apr 23, 2022 at 5:03 PM Günter Kolousek via ntg-context
 wrote:
>
>
> Hi,
>
> if I replace your definition of exp by
>
>   \protected\def\exp{\normal exp}
>
> it works well (at least on my installation of lmtx), but
> I'm just a beginner in using context...
>
> Best,
> Günter
>
>
> Mikael Sundqvist via ntg-context @ 2022-04-23 15:27 +02:
>
> > On Sat, Apr 23, 2022 at 12:11 PM Fabrice Couvreur via
> > ntg-context
> >  wrote:
> >>
> >> Hello,
> >> If I compile with context the expected result is correct but
> >> with lmtx the font under the square root is smaller.
> >> Thank you
> >> Fabrice
> >>
> >> \protected\def\exp{\text{\normal exp}}
> >>
> >> \starttext
> >> \startformula
> >>\sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right).
> >> \stopformula
> >> \stoptext
> >
> > Hi,
> >
> > without your redefinition of \exp it looks fine (exp is already
> > defined). Does that solve your problem, or are you doing
> > something
> > else, and this exp was just an example?
> >
> > Best, Mikael
> > ___
> > If your question is of interest to others as well, please add an
> > entry to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Font too small with a macro

2022-04-23 Thread Günter Kolousek via ntg-context


Hi,

if I replace your definition of exp by

 \protected\def\exp{\normal exp}

it works well (at least on my installation of lmtx), but
I'm just a beginner in using context...

Best,
Günter


Mikael Sundqvist via ntg-context @ 2022-04-23 15:27 +02:

On Sat, Apr 23, 2022 at 12:11 PM Fabrice Couvreur via 
ntg-context

 wrote:


Hello,
If I compile with context the expected result is correct but 
with lmtx the font under the square root is smaller.

Thank you
Fabrice

\protected\def\exp{\text{\normal exp}}

\starttext
\startformula
   \sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right).
\stopformula
\stoptext


Hi,

without your redefinition of \exp it looks fine (exp is already
defined). Does that solve your problem, or are you doing 
something

else, and this exp was just an example?

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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

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

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


Re: [NTG-context] Font too small with a macro

2022-04-23 Thread Fabrice Couvreur via ntg-context
Hi,
I didn't know that \exp was already defined.
Thanks
Fabrice

Le sam. 23 avr. 2022 à 15:28, Mikael Sundqvist via ntg-context <
ntg-context@ntg.nl> a écrit :

> On Sat, Apr 23, 2022 at 12:11 PM Fabrice Couvreur via ntg-context
>  wrote:
> >
> > Hello,
> > If I compile with context the expected result is correct but with lmtx
> the font under the square root is smaller.
> > Thank you
> > Fabrice
> >
> > \protected\def\exp{\text{\normal exp}}
> >
> > \starttext
> > \startformula
> >\sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right).
> > \stopformula
> > \stoptext
>
> Hi,
>
> without your redefinition of \exp it looks fine (exp is already
> defined). Does that solve your problem, or are you doing something
> else, and this exp was just an example?
>
> Best, Mikael
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Font too small with a macro

2022-04-23 Thread Mikael Sundqvist via ntg-context
On Sat, Apr 23, 2022 at 12:11 PM Fabrice Couvreur via ntg-context
 wrote:
>
> Hello,
> If I compile with context the expected result is correct but with lmtx the 
> font under the square root is smaller.
> Thank you
> Fabrice
>
> \protected\def\exp{\text{\normal exp}}
>
> \starttext
> \startformula
>\sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right).
> \stopformula
> \stoptext

Hi,

without your redefinition of \exp it looks fine (exp is already
defined). Does that solve your problem, or are you doing something
else, and this exp was just an example?

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

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


[NTG-context] Font too small with a macro

2022-04-23 Thread Fabrice Couvreur via ntg-context
Hello,
If I compile with context the expected result is correct but with lmtx the
font under the square root is smaller.
Thank you
Fabrice

\protected\def\exp{\text{\normal exp}}

\starttext
\startformula
   \sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right).
\stopformula
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Need some hints to fix my standalon installation

2022-04-20 Thread Hans Hagen via ntg-context

On 4/20/2022 7:07 PM, Christoph Hintermüller via ntg-context wrote:

Hi Michael

[Inline Response to message by Mikael Sundqvist via ntg-context, Mi,
2022-04-20 17:12 +0200: Answers and comments below corresponding cited
paragraphs.]


The strange thing with fractions seems to be due to the parameter
FractionNumeratorDisplayStyleShiftUp in lm.lfg. If you always set it
to 600, it seems to work also for luatex. (This will be fixed.)

Another thing: Instead of using \over, I suggest that you use \frac
(less surprises). Something like:

\starttext
\startformula
 a=b + 1
\stopformula

\startformula
 a = \frac{ b + \mu }{ c }
\stopformula

\startformula
 a = \frac{\frac{ b + \mu }{ c } + e}{ d + i }
\stopformula
\stoptext


Thank you very much for the hints. \frac didn't help either even after
moving broken installation aside and doing a fresh install with
  
sh ./first-setup.sh --modules=all --context=latest



Results still similar see attached.
We had to adapt the lfg file for lm (other fonts are ok) so i'll make an 
update.


If you're in a hurry, in lm.lfg:

parameters = {
FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a 
function

NoLimitSupFactor =   0,
NoLimitSubFactor = 900,
 -- AccentBaseHeight =   0,
AccentBaseDepth  =  50,
},

can be adapted.

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Need some hints to fix my standalon installation

2022-04-20 Thread Christoph Hintermüller via ntg-context
Hi Michael


[Inline Response to message by Mikael Sundqvist via ntg-context, Mi,
2022-04-20 17:12 +0200: Answers and comments below corresponding cited
paragraphs.]

> 
> The strange thing with fractions seems to be due to the parameter
> FractionNumeratorDisplayStyleShiftUp in lm.lfg. If you always set it
> to 600, it seems to work also for luatex. (This will be fixed.)
> 
> Another thing: Instead of using \over, I suggest that you use \frac
> (less surprises). Something like:
> 
> \starttext
> \startformula
> a=b + 1
> \stopformula
> 
> \startformula
> a = \frac{ b + \mu }{ c }
> \stopformula
> 
> \startformula
> a = \frac{\frac{ b + \mu }{ c } + e}{ d + i }
> \stopformula
> \stoptext
> 



Thank you very much for the hints. \frac didn't help either even after
moving broken installation aside and doing a fresh install with
 
sh ./first-setup.sh --modules=all --context=latest


Results still similar see attached.



> /Mikael
> _
> __
> If your question is of interest to others as well, please add an
> entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> _
> __


test_strange.tar.bz
Description: application/bzip-compressed-tar
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Need some hints to fix my standalon installation

2022-04-20 Thread Mikael Sundqvist via ntg-context
On Wed, Apr 20, 2022 at 5:03 PM Pablo Rodriguez via ntg-context
 wrote:
>
> On 4/20/22 12:34, Christoph Hintermüller via ntg-context wrote:
> > Hi
> > Have updated my standalone installation from one of the 2020 releases
> > to the latest one running
> >
> > ./first-setup.sh --context=latest --modules=all
>
> Hi Christoph,
>
> sorry for the obvious suggestion «post facto»: never update ConTeXt
> without a backup first.
>
> > [...]
> > Therefore i have the following questions
> >  - would it help to sacrifice the updated standalone installation and
> >do a fresh install
>
> I don’t think it would work, since it only works with LuaMetaTeX.
>
> I got the same results (in Windows [because I cannot make it work in
> Linux]) with LuaTeX 1.15 (the one that comes with ConTeXt LMTX).
>
> My suggestion would be a fresh install (in a different directory, no
> need to remove anything) of ConTeXt LMTX.
>
> >  - What else i would have to check and probably fix to make the math
> >working as expected
>
> Math is being improved in ConTeXt these days. It might be a bug.
>
> I wonder whether Mikael or Hans could review your issue.
>
> Just in case it might help,
>
> Pablo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

The strange thing with fractions seems to be due to the parameter
FractionNumeratorDisplayStyleShiftUp in lm.lfg. If you always set it
to 600, it seems to work also for luatex. (This will be fixed.)

Another thing: Instead of using \over, I suggest that you use \frac
(less surprises). Something like:

\starttext
\startformula
a=b + 1
\stopformula

\startformula
a = \frac{ b + \mu }{ c }
\stopformula

\startformula
a = \frac{\frac{ b + \mu }{ c } + e}{ d + i }
\stopformula
\stoptext

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

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


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05:

Hoi Wolfgang,

I tested both variants (bodymatter and bodypart. The compilation runs through, 
however without the thumb-picture in the margin and the metafun error is in the 
log.


1. Do you use \startfrontmatter and \startbodymatter in your document to 
create blocks?


2. Is you installation up-to-date?

Attached is a slightly modified version of your example, the only thing 
which has to be local to the bodypart is the background setting to 
enable the thumb pictures.


Wolfgang

\definecolor [chap_frame] [black]
\definecolor [textcolor]  [white]

\startuseMPgraphic{chapter-thumb}
path chap_frame ;
pair pos,a,b ;
picture Chap ;

if \somenamedheadnumber{chapter}{current} > 0 :
curr_chap := \somenamedheadnumber{chapter}{current} ;
else :
curr_chap := 1 ;
fi;
if \somenamedheadnumber{chapter}{last} > 0 :
last_chap := \somenamedheadnumber{chapter}{last} ;
else :
last_chap := 1 ;
fi;
if \somenamedheadnumber{section}{current} > 0 :
curr_sect := \somenamedheadnumber{section}{current} ;
else:
curr_sect := 1 ;
fi;
if \somenamedheadnumber{section}{last} > 0 :
last_sect := \somenamedheadnumber{section}{last} ;
else:
last_sect := 1;
fi;
if curr_chap < 11 :
skip := TextHeight * (curr_chap-1)/11 ;
elseif curr_chap < 21 :
skip := TextHeight * (curr_chap-11)/11 ;
else:
skip := TextHeight * (curr_chap-21)/11 ;
fi;

Chap := textext("\bfa\textcolor\getmarking[chapter]") ;

StartPage ;
chap_frame := lcircle xscaled (2*RightMarginWidth) yscaled 
(1.5*RightMarginWidth) ;

a := ulcorner chap_frame ;
b := urcorner chap_frame ;

pos := urcorner Field[Text][RightMarginSeparator] - ulcorner chap_frame 
- (-1mm,skip) ;

fill chap_frame shifted pos withcolor "chap_frame" ;
draw Chap rotated 90 shifted (xpart pos-4mm,ypart pos) ;
StopPage ;
\stopuseMPgraphic

\defineoverlay[chapter-thumb][\useMPgraphic{chapter-thumb}]

\startsectionblockenvironment[bodypart]
\setupbackgrounds[rightpage][background=chapter-thumb]
\stopsectionblockenvironment

\showframe

\starttext

\startfrontmatter

\startchapter[title=Test A]
\samplefile{ward}
\stopchapter

\stopfrontmatter

\startbodymatter

\startchapter[title=Test C]
\samplefile{ward}
\stopchapter

\stopbodymatter

\stoptext























% Global settings for all chapters
\setuphead[chapter][style=\ssc]

% Local settings for chapter in the bodymatter block
\startsectionblockenvironment[bodypart]
\setuphead[chapter][color=blue]
\stopsectionblockenvironment

\starttext

\startfrontmatter

\title{Table of content}

\placecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\input knuth

\chapter{Zapf}

\input zapf

\stopbodymatter

\stoptext





\starttext

a\texttilde b\lettertilde c\textasciitilde d

\stoptext




\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow][orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext




\setupbodyfont[termes]

\starttext

plays \m{\frac{2}{3} A}, \m{\frac{1}{3} D}.

\stoptext






\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]

\definefontfamily [story] [sans] [Latin Modern Sans]
\definefontfamily [story] [mono] [Latin Modern Mono] [features=none]

\definetypeface [story] [ss] [sans] [modern] [default]
\definetypeface [story] [ss] [mono] [modern] [default]

\definetypeface [story] [ss] [sans] [modern-designsize] [default]
\definetypeface [story] [ss] [mono] [modern-designsize] [default]

\definefontfamily[story][mm][TeX Gyre Pagella Math]

\definetypeface [story] [mm] [math] [pagella] [default]

\setupbodyfont[story,11pt]

\usebodyfont[termes]

\showframe

\startsetups [blockquote:style]
\switchtobodyfont[termes]

Re: [NTG-context] Problems with itemize with several columns

2022-02-25 Thread Xavier B. via ntg-context
It seems that putting \column before itemize of 'c', forces 'c' together with 
this content. Repeating this step produces what I want:

\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} 
Opereu:
\startitemize[a, columns, three]
\item \startformula 3 \cdot \frac{5}{3} \stopformula
\item \startformula \frac{3}{4} \cdot \frac{2}{5} \stopformula
\column
\item \startformula \frac{1}{3} \cdot \frac{3}{4} \div \frac{1}{5} \stopformula
\item \startformula 5 \div \frac{7}{10} \cdot 7 \div \frac{2}{5} \stopformula
\column
\item \startformula \frac{1}{2} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{3}{2} \div \frac{2}{3} \div \frac{5}{4} \stopformula
\column
\item \startformula \frac{2}{3} \colon \frac{2}{5} \stopformula
\item \startformula \frac{3}{4} \colon \frac{1}{2} \cdot 6 \stopformula
\item \startformula \frac{2}{3} \colon \frac{3}{4} \cdot \frac{1}{2} 
\stopformula
\stopitemize
\stopexercici

@fv leung said I have to replace frac for dfrac, but it mess up the following 
content in my book.

Thanks all,


On Thu, 24 Feb 2022 23:04:43 +
Bruce Horrocks  ha escrit:

> 
> 
> > On 24 Feb 2022, at 22:10, Xavier B. via ntg-context  
> > wrote:
> > 
> > Even if I change 
> > \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i 
> > divisió} Opereu:
> > \startitemize[a, columns, three]
> > 
> > 
> > for
> > 
> > \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i 
> > divisió} Opereu:
> > \startitemize[a, columns]
> > 
> > 
> > the 'c' jumps.
> > 
> > Isn't ConTeXt capable of handle that?
> 
> Please see the attached PDF.
> 
> The green line shows how much space is needed to fully print item (b).  Item 
> (c) will need the same amount of space, shown by the red line. However, this 
> would take you into the footer area (shown by the blue arrows), so item (c) 
> is split: the item label fits into the space at the bottom of the column and 
> so is printed there; the fraction doesn't fit and so is moved to the next 
> column.
> 
> The solution to your problem would be some way of forcing the item body to 
> stay with the label. I don't know what that command is - hopefully someone 
> here does know.
> 
> —
> Bruce Horrocks
> Hampshire, UK
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Problems with itemize with several columns

2022-02-23 Thread Xavier B. via ntg-context
In my previous post 
[https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know 
the reason, but the attached code des not display very well in mailing list. I 
put it here:

\defineenumeration
  [exercici]
  [alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, 
stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, 
headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, 
left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, 
prefixsegments=section, way=section]

\starttext

\section{Operacions amb fraccions}

\subject{Preguntes}

\startexercici[exercici:operacions-amb-fraccions-1]{suma i resta} Opereu:
\startitemize[a, columns, three]
\item \startformula \frac{2}{7} + \frac{6}{7} - \frac{1}{7} \stopformula
\item \startformula \frac{5}{8} + \frac{9}{8} \stopformula
\item \startformula \frac{1}{4} + 5 - \frac{1}{4} \stopformula
\item \startformula \frac{3}{5} - \frac{2}{5} + \frac{11}{5} \stopformula
\item \startformula \frac{2}{3} + \frac{1}{4} \stopformula
\item \startformula 5 + \frac{4}{5} \stopformula
\item \startformula \frac{2}{3} + \frac{5}{8} - \frac{1}{9} \stopformula
\item \startformula 10 - \frac{1}{6} + \frac{6}{8} \stopformula
\item \startformula \frac{3}{10} + \frac{7}{12} \stopformula
\stopitemize
\stopexercici

\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} 
Opereu:
\startitemize[a, columns, three]
\item \startformula 3 \cdot \frac{5}{3} \stopformula
\item \startformula \frac{3}{4} \cdot \frac{2}{5} \stopformula
\item \startformula \frac{1}{3} \cdot \frac{3}{4} \div \frac{1}{5} \stopformula
%\column
\item \startformula 5 \div \frac{7}{10} \cdot 7 \div \frac{2}{5} \stopformula
\item \startformula \frac{1}{2} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{3}{2} \div \frac{2}{3} \div \frac{5}{4} \stopformula
%\column
\item \startformula \frac{2}{3} \colon \frac{2}{5} \stopformula
\item \startformula \frac{3}{4} \colon \frac{1}{2} \cdot 6 \stopformula
\item \startformula \frac{2}{3} \colon \frac{3}{4} \cdot \frac{1}{2} 
\stopformula
\stopitemize
\stopexercici

\startexercici[exercici:operacions-amb-fraccions-3]{operacions combinades}
\startitemize[a, columns, three]
\item \startformula \frac{3}{4} + \frac{2}{5} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{2}{5} \div \frac{3}{5} - \frac{1}{4} \stopformula
\item \startformula \left( 2 + \frac{3}{5} \right) \div \frac{4}{3} \stopformula
\item \startformula \frac{2}{3} - \frac{5}{6}\cdot 8 \stopformula
\item \startformula 4 + \frac{3}{5} - \left(2 - \frac{1}{2}\right) \stopformula
\item \startformula 4 \cdot \left(\frac{5}{6} - \frac{1}{4} + 
\frac{4}{9}\right) \stopformula
\item \startformula \frac{5}{6} - \left(\frac{1}{5} + \frac{1}{3}\right) 
\stopformula
\item \startformula \frac{5}{6} \div \left( \frac{2}{5} - \frac{1}{10}\right) 
\stopformula
\item \startformula 4 \cdot \frac{2}{3} \cdot \left(\frac{2}{4} \div 
\frac{8}{10}\right) \stopformula
\item \startformula \frac{3}{4} + \frac{1}{2} \cdot \frac{4}{10} \stopformula
\item \startformula \frac{10}{12} - \left(\frac{1}{10} + \frac{3}{8}\right) 
\stopformula
\item \startformula \left(\frac{1}{2} + 2\right) \cdot \left(2 - 
\frac{1}{4}\right) \stopformula
\item \startformula \left(\frac{3}{4} + \frac{1}{4}\right) \div 
\left(\frac{5}{6} - \frac{1}{3}\right) \stopformula
\item \startformula 5 + 10 - \frac{1}{10} + 25 \stopformula
\item \startformula \frac{1}{3} + \frac{1}{2} - \frac{2}{5} \stopformula
\item \startformula \left(\frac{1}{2} + \frac{2}{10}\right) \cdot \frac{2}{6} 
\stopformula
\item \startformula 5 + \frac{1}{3} \cdot \frac{5}{3} \stopformula
\item \startformula \left( 5 + \frac{1}{3} \right) \cdot \frac{5}{3} 
\stopformula
\stopitemize
\stopexercici

\stoptext


I re-attach the resulting pdf

Thanks,



On Wed, 23 Feb 2022 09:59:58 +0100
"Xavier B."  ha escrit:

> Hi,
> 
> I try to solve this, but I could not. Can you please help me.
> I make a math problem sheet. In "Exercici 1.2", I put a itemize with three 
> columns, but the 'c' exercise jumps to second column. I want that a, b, c 
> remains in the first column, d, e, f in the second and g, h, i in the third.
> 
> I tried \column command but it's worse.
> 
> I attached the source and generated pdf.
> 
> My version of context is:
>  context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.03.05 19:11
> mtx-context | main context file: 
> /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.03.05 19:11
> 
> 
> Thanks in advance,
> 
> Xavier
> 
> PS: Please CCme
> 


a.pdf
Description: Adobe PDF document
__

Re: [NTG-context] Suggestions for more math classes?

2022-01-27 Thread Hans Hagen via ntg-context

On 1/27/2022 9:36 AM, Mikael Sundqvist via ntg-context wrote:

Dear all,

While discussing spacing in math with Hans, we have come to the
conclusion that to have better control and cleaner code there might be
a good idea to have more math classes than the usual ones in TeX (ord,
op, bin, rel, open, close, punct, inner (and some that we need not to
think about)).

So far, Hans has implemented frac and rad for fractions and radicals.
The fractions has been a funny construction, being put inside empty
delimiters, and so surrounded by the \nulldelimiterspace (which has
been set to 1.2pt, independent of font size). Now we have better
control of the spacing around fractions.

Hans has opened up (even in the code) for the addition of more
classes. The overall aim is to have a more coherent and logical way of
typing math, without manual adding of (arbitrary) spaces every now and
then. For example, we have always written \int f(x)\, dx to have a
thin space between the closing parenthesis and the d in integrals.
There will (most likely) be a differential class. Since the d might
occur in other places in a formula with integrals, one cannot just
simply give the letter d the differential class, and we are currently
discussing the correct way for the user to type it. If you have
suggestions, please let us hear!

Some further suggestions by Hans are (see below for two more)

13 imaginary
14 differential
15 exponential
16 function

Q1: Do you have any further suggestions on new classes (or comments on
these)? It might be good to think about situations where you have felt
that you need to insert manual spaces such as \, or \! to obtain a
better result.

I give one contribution: I asked a colleague to look in his TeX files
for manual spaces, and he came up with several \, (usually before the
d in integrals) but also with \!. This \! occurred mostly in fencing
situations to have the exponent come a bit closer to the closing
parenthesis.

\left( \frac{x}{2} \right)^{\! k+2n}

I have seen this in many places before, so no originality is claimed.

Two more classes that we thought of are under and over. Say that we
have a\overbar{bc}d. Should the spacing between a and the \overbar{bc}
and the spacing between \overbar{bc} and d always be tight? If so,
these might just be ord, and no new class needed (although one could
argue for adding the classes now, set them up as ord, and thus being
able to configure them according to taste/need).

Q2: Do you have any real examples of constructions with \overbar,
\underbar, \overbrace, ... or if you have any strong opinion, please
raise your voice!

Here is a teaser:

\starttext

% in context we put digits in their own class, the next is the default:

\letmathspacing \mathdigitcode \mathordinarycode \mathordinarycode 
\mathordinarycode \mathordinarycode


% but we can adapt the inter digit spacing (\mathdigitcode == 20 in 
context, \mathordinarycode is one fo the traditional class codes):


\setmathspacing \mathdigitcode \mathdigitcode \allmathstyles = 2mu

% and also change it when needed

\startTEXpage[offset=10pt]
$ x = 1234 = z $\par
\begingroup
\setmathspacing \mathdigitcode \mathdigitcode \allmathstyles = 4mu
$ x = 1234 = z $\par
\endgroup
$ x = 1234 = z $\par
\stopTEXpage

\stoptext

The result is attached. So maybe Mikaels explanation above and this 
example will trigger demand.


One of the possibilities is that users define their own classes and put 
characters in it. (this can be domain specific and domains is something 
that has been on the todo for quite a while.)


For that reason we might bump the current number of classes (we have 32 
classes compared to the 8 that regular tex has) to 64 (which is possible 
when we bring down the number of families to 64 (currently 128 compared 
to 256 in luatex and 16 in regular tex) which is still plenty and way 
more than we ever need (so if needed we can borrow bits for the math 
unicode range which is now limited to 0xF; it was already limited 
anyway).


This move also makes it possible to remove some other hacks (with the 
usual 'a pity to throw nice code away syndrome' side effect) and can 
have some 'initialization of old school ascii' side effects (neglectable 
because we can set it up via the emacro package).


For the record: the \Umathspacing primitives have been 
dropped but can be emulated easily (in the end it saves hundreds of 
primitives).


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
-

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

[NTG-context] Suggestions for more math classes?

2022-01-27 Thread Mikael Sundqvist via ntg-context
Dear all,

While discussing spacing in math with Hans, we have come to the
conclusion that to have better control and cleaner code there might be
a good idea to have more math classes than the usual ones in TeX (ord,
op, bin, rel, open, close, punct, inner (and some that we need not to
think about)).

So far, Hans has implemented frac and rad for fractions and radicals.
The fractions has been a funny construction, being put inside empty
delimiters, and so surrounded by the \nulldelimiterspace (which has
been set to 1.2pt, independent of font size). Now we have better
control of the spacing around fractions.

Hans has opened up (even in the code) for the addition of more
classes. The overall aim is to have a more coherent and logical way of
typing math, without manual adding of (arbitrary) spaces every now and
then. For example, we have always written \int f(x)\, dx to have a
thin space between the closing parenthesis and the d in integrals.
There will (most likely) be a differential class. Since the d might
occur in other places in a formula with integrals, one cannot just
simply give the letter d the differential class, and we are currently
discussing the correct way for the user to type it. If you have
suggestions, please let us hear!

Some further suggestions by Hans are (see below for two more)

13 imaginary
14 differential
15 exponential
16 function

Q1: Do you have any further suggestions on new classes (or comments on
these)? It might be good to think about situations where you have felt
that you need to insert manual spaces such as \, or \! to obtain a
better result.

I give one contribution: I asked a colleague to look in his TeX files
for manual spaces, and he came up with several \, (usually before the
d in integrals) but also with \!. This \! occurred mostly in fencing
situations to have the exponent come a bit closer to the closing
parenthesis.

\left( \frac{x}{2} \right)^{\! k+2n}

I have seen this in many places before, so no originality is claimed.

Two more classes that we thought of are under and over. Say that we
have a\overbar{bc}d. Should the spacing between a and the \overbar{bc}
and the spacing between \overbar{bc} and d always be tight? If so,
these might just be ord, and no new class needed (although one could
argue for adding the classes now, set them up as ord, and thus being
able to configure them according to taste/need).

Q2: Do you have any real examples of constructions with \overbar,
\underbar, \overbrace, ... or if you have any strong opinion, please
raise your voice!

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

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


Re: [NTG-context] new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 4:16 PM, Fabrice Couvreur via ntg-context wrote:

Hi Hans
I just updated lmtx and this macro does not work although it did before. 
On the other hand, no problem with context.

Thanks.
Fabrice

  \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace}

\starttext
\startformula
\e{a+b}
\stopformula
\stoptext
if the test suite doesn't crash (i only test that) i'll upload ... it 
has to do with decoupling some in the engine: tex uses lots of shifting, 
cheating on dimensions and displacements that relate to (older) fonts 
and for the purpose of tracing i changed some ... so we're seeing a side 
effect of that


for a while we already have this:

\tracingmath2\tracingonline2

just to give an idea what enters tex's math machinery

5:7: > \inlinemath=
5:7: \displaystyle
5:7: \mathord
5:7: .\nucleus
5:7: ..\mathchar (fam="0,char="65)
5:7: .\superscript
5:7: ..\mathlist
5:7: ...\mathord
5:7: \nucleus
5:7: .\mathchar (fam="0,char="61)
5:7: ...\mathbin
5:7: \nucleus
5:7: .\mathchar (fam="0,char="2B)
5:7: ...\mathord
5:7: \nucleus
5:7: .\mathchar (fam="0,char="62)

i'll upload a fixed version

fwiw: \frac and friends are currently being redone; for that we now have 
a frac class (as well as rad), so


  \mathfrac{...}
  \mathrad{...}

in addition to \mathord etc other new things are

  \beginmathgroup ... \endmathgroup

that permits better local settings without messing up the spacing due to 
classes and we have dozens more spacing class variables ... all waiting 
to be used (some features are already there for more than a year but now 
get used in low level code, which is why we can expect some instabilities)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] STIX2 font issues with freshly installed LMTX

2022-01-05 Thread Heinrich Paeßens via ntg-context
Hi there

Issue solved by deleting the context-internal fonts and recurring on the 
system-wide installed fonts … never mind ;-)

 
<https://www.dropbox.com/s/g31kwg14tcs5621/Untitled_Test%20-compressed.pdf?dl=0>

Happy New Year
Heinrich

> 
>> On 3 Jan 2022, at 21:46, Heinrich Paeßens > <mailto:paess...@me.com>> wrote:
>>> 
>>> Hi there
>>> 
>>> as a newcomer in ConTeXt I installed according to 
>>> 
>>> https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/ 
>>> <https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/>
>>> 
>>> and using TeXShop on macos as advised.
>>> 
>>> However, I like to use STIX2-Fonts for Text and Math and hence my MWE to 
>>> test which fonts are going to be embedded (CLI pdffonts):
>>> 
>>> -
>>> \setupbodyfont[stixtwo]
>>> \starttext
>>> 
>>> Test ß 1lIjJuQ \% § \& ?! VERSAL-ẞ- \|> --- 1234567890 --- //
>>> 
>>> \placeformula[eqn:def-m]
>>> \startformula
>>> m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
>>> \stopformula
>>> \stoptext
>>> -
>>> 
>>> Unfortunately the compiler throws an error — why is there a check of 
>>> STIX2-fonts versions, why is that important?
>>> 
>>> I checked and found 
>>> 
>>> /Users/hp/Library/Fonts/STIXTwoText-Regular.otf Version 2.12 b168
>>> /Users/hp/Library/context-osx-64/tex/texmf/fonts/opentype/public/stix2-otf/STIXTwoText-Regular.otf
>>>  Version 2.11 b159
>>> 
>>> Could you please advise for a work around?
>>> 
>>> from the log:
>>> 
>>> -
>>> fonts   > otf loading > loading 'stixtwotext-regular.otf', hash 
>>> 'stixtwotext-regular'
>>> otf reader  > unknown version '
>>> 
>>> 
>>> 
>>> ' in file 'stixtwotext-regular.otf'
>>> fonts   > otf loading > loading done
>>> fonts   > otf loading > saving 'stixtwotext-regular.otf' in cache
>>> system  > lua > compiling 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
>>>  into 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
>>> system  > lua > dumping 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
>>>  into 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
>>>  stripped
>>> fonts   > otf loading > loading, optimizing, packing and caching 
>>> time 0.002
>>> lua error   > lua error on line 1 in file ./Untitled.tex:
>>> 
>>> registered function call [1129]: 
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: attempt to 
>>> index a nil value (upvalue 'descriptions')
>>> stack traceback:
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: in 
>>> local 'prepare_ligature'
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:770: in 
>>> upvalue 'addfeature'
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:899: in 
>>> local 'enhancer'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1269: in 
>>> upvalue 'enhance'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1291: in 
>>> field 'apply'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:263: in 
>>> field 'load'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:602: in 
>>> upvalue 'otftotfm'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:630: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:629>
>>> (...tail calls...)
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:378: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:366>
>>> (...tail calls...)
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:484: in 
>>> field 'read'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193>
>>> (...tail calls...)
>>>  1 >>  \setupbodyfont[stixtwo]
>>> -
>>> 
>>> Many thanks for your support.
>>> Kind regards
>>> 
>>> Heinrich Paeßens 
>>> Mobile +49 1512 123 9876 
>>> Business Card 
>>> <https://www.paessens.tel/img/heinrich-paessens_bc-2021-03-11_signed.pdf>
>>> 
>> 
> 

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

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


[NTG-context] STIX2 font issues with freshly installed FMTX

2022-01-03 Thread Heinrich Paeßens via ntg-context
Hi there

as a newcomer in ConTeXt I installed according to 

https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/

and using TeXShop on macos as advised.

However, I like to use STIX2-Fonts for Text and Math and hence my MWE to test 
which fonts are going to be embedded (CLI pdffonts):

-
\setupbodyfont[stixtwo]
\starttext

Test ß 1lIjJuQ \% § \& ?! VERSAL-ẞ- \|> --- 1234567890 --- //

\placeformula[eqn:def-m]
\startformula
    m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
\stopformula
\stoptext
-

Unfortunately the compiler throws an error — why is there a check of 
STIX2-fonts versions, why is that important?

I checked and found 

/Users/hp/Library/Fonts/STIXTwoText-Regular.otf Version 2.12 b168
/Users/hp/Library/context-osx-64/tex/texmf/fonts/opentype/public/stix2-otf/STIXTwoText-Regular.otf
 Version 2.11 b159

Could you please advise for a work around?

from the log:

-
fonts   > otf loading > loading 'stixtwotext-regular.otf', hash 
'stixtwotext-regular'
otf reader  > unknown version '



' in file 'stixtwotext-regular.otf'
fonts   > otf loading > loading done
fonts   > otf loading > saving 'stixtwotext-regular.otf' in cache
system  > lua > compiling 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
 into 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
system  > lua > dumping 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
 into 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
 stripped
fonts   > otf loading > loading, optimizing, packing and caching time 
0.002
lua error   > lua error on line 1 in file ./Untitled.tex:

registered function call [1129]: 
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: attempt to 
index a nil value (upvalue 'descriptions')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: in 
local 'prepare_ligature'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:770: in 
upvalue 'addfeature'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:899: in 
local 'enhancer'
...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1269: in 
upvalue 'enhance'
...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1291: in 
field 'apply'
...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:263: in 
field 'load'
...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:602: in 
upvalue 'otftotfm'
...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:630: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:629>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:378: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:366>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:484: in 
field 'read'
...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193>
(...tail calls...)
 1 >>  \setupbodyfont[stixtwo]
-

Many thanks for your support.
Kind regards

Heinrich Paeßens 
Mobile +49 1512 123 9876 
Business Card 
<https://www.paessens.tel/img/heinrich-paessens_bc-2021-03-11_signed.pdf>

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

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


[NTG-context] All Equations

2021-12-10 Thread Henning Hraban Ramm via ntg-context
Since I never used math with ConTeXt, I tried to replicate XKCD 2034 as 
an exercise (see below and attached). I’d like to put it on the wiki and 
in my book.


I know this is nonsense, but I’d like to do it right.

In some cases I’m unsure which symbol the author meant, e.g. p or \rho, 
0 or O, 1 or I or | ...

Yes, I could have used proper Unicode characters (ρ, π etc.).

Can you answer my questions (%? in the source)? (Partly TeX related, 
partly math/physics related.)



"""
\setupinteraction[state=start]

\starttext
\subject{All equations\footnote{according to 
\goto{XKCD}[url(https://xkcd.com/2034/)]}...}


... of Kinematics:
\startformula E = K_0t + \frac{1}{2}\rho vt^2 \stopformula
% ? Should it be v or \nu?

... of Number Theory:
\startformula K_\Lambda = 
\sum^\infty_{i=0}\sum^\infty_{\pi=0}(n-\pi)(i+e^{\pi-\infty})\stopformula


... of Fluid Dynamics:
\startformula \frac{\delta}{\delta_t}\nabla\cdot\rho = 
\frac{8}{23}\oiint\rho d_s 
d_t\cdot\rho\frac{\delta}{\delta_\nabla}\stopformula

% ? Would ds dt be better than d_s d_t?

... of Quantum Mechanics:
\startformula I\Psi_{x,y}>=A(\Psi)A(I\times>\oplus Iy>)\stopformula
% ? Should those be I, 1 or |, > or some angle bracket?

... of Chemistry:
\startformula CH_4 + OH + HEAT \rightarrow H_2O + CH_2 + H_2EAT\stopformula
% ? Should we something different for chem. formulae?

... of Quantum Gravity:
\startformula SU(2)U(I) \times SU(U(2))\stopformula
% It’s not even an equation...

... of Gauge Theory:
\startformula
S_g =
\frac{-I}{2\bar{\epsilon}} i \delta
\left(
\xi_{\delta_0} \mathring{+} \rho_\epsilon \rho_v^{abc}\cdot\eta_0
\right)
f_a^0 a\lambda(\rotate[rotation=180,location=high]{\xi})\Psi(O_a)
\stopformula
% ? I guess the first \delta should be crossed somehow?
% ? Is it possible to get \hat accents over the brackets? \hat{\left(} 
doesn’t work.
% ? What’s that symbol after \right) ? (f with two bars, maybe kind of 
integral?)


... of Cosmology:
\startformula h(t) + \Omega + G \cdot \Lambda ...
\startmathcases
\NC ... > 0 \TC (Hubble Model) \NR
\NC ... = 0 \TC (Flat Squere Model) \NR
\NC ... < 0 \TC (Bright Dark Matter Model) \NR
\stopmathcases
\stopformula

... of Truly Deep Physics: \startformula \hat{H} - \c{u}_0 = O\stopformula
% ? How can I get a cedilla under the u? \c{u} is wrong.

\page
\subject{Original}
\externalfigure[https://imgs.xkcd.com/comics/equations.png][width=\textwidth]
\stoptext
"""

Hraban

allformula.tex
Description: TeX document


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


Re: [NTG-context] Using old fonts

2021-11-18 Thread Hans Hagen via ntg-context

On 11/18/2021 5:36 PM, Gérard Milmeister via ntg-context wrote:

Using old fonts

Around 2000 I acquired a collection of fonts, mostly Type 1
and some TrueType. As it appears they are not fully usable
in ConTeXt. The two main issues are:

1. Kerning and ligatures

These features can be only be used, if the GPOS and GSUB
tables are present and adequately filled. Now, the old font
files do not have these tables, but instead use some
obsolete (?) form of kerning table, and ligatures are not
qualified as such, but only trough their Unicode point and
name (most commonly fi and fl). I used fontforge, which
creates the GPOS table automatically, added the liga table
manually, and generated an OTF font file.

Is there a way to automate this (possibly a fontforge
script)? The script should also find the ligatures (there
may also be frac substitutions). Or is there another way
which leaves the files unchanged?


Are you talking type 1 fonts? These should just work, assuming that you 
have the afm files installed. You need to define them with the right 
features enabled (just like opentype fonts).



2. Selecting glyphs from multiple font files

Often there are additional font files which contain small
caps (in place of lowercase characters) and old style
figures (in place of digits), and other variant glyphs and
additional ligatures (usually the font name contains OsF,
SC, Alt, or Exp). Sometimes these are not allocated to a
Unicode point, but only identified by name (e.g.
"threeoldstyle" or "Esmall"). Is it possible to create some
sort of virtual feature (such as onum), that will cause
ConTeXt to take glyphs from another file (but only for
specified Unicode ranges)? I suppose this can be done with a
Lua goody.
The fallback mechanism does that (you can define a collection that way). 
One can also try to make features (there are examples in the te st suite).


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Using old fonts

2021-11-18 Thread Gérard Milmeister via ntg-context
Using old fonts

Around 2000 I acquired a collection of fonts, mostly Type 1
and some TrueType. As it appears they are not fully usable
in ConTeXt. The two main issues are:

1. Kerning and ligatures

These features can be only be used, if the GPOS and GSUB
tables are present and adequately filled. Now, the old font
files do not have these tables, but instead use some
obsolete (?) form of kerning table, and ligatures are not
qualified as such, but only trough their Unicode point and
name (most commonly fi and fl). I used fontforge, which
creates the GPOS table automatically, added the liga table
manually, and generated an OTF font file.

Is there a way to automate this (possibly a fontforge
script)? The script should also find the ligatures (there
may also be frac substitutions). Or is there another way
which leaves the files unchanged?

2. Selecting glyphs from multiple font files

Often there are additional font files which contain small
caps (in place of lowercase characters) and old style
figures (in place of digits), and other variant glyphs and
additional ligatures (usually the font name contains OsF,
SC, Alt, or Exp). Sometimes these are not allocated to a
Unicode point, but only identified by name (e.g.
"threeoldstyle" or "Esmall"). Is it possible to create some
sort of virtual feature (such as onum), that will cause
ConTeXt to take glyphs from another file (but only for
specified Unicode ranges)? I suppose this can be done with a
Lua goody.


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

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


Re: [NTG-context] Math font tips and tricks

2021-11-11 Thread Marcus Vinicius Mesquita via ntg-context
Sometime ago I needed some basic math in Minion and I concocted something
like follows below:

% latin
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:mathematicalalphanumericsymbols,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:mathematicalalphanumericsymbols,range={1D50D,1D514},force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:miscellaneousmathematicalsymbolsa,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:miscellaneousmathematicalsymbolsb,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasenormal,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasenormal,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercaseitalic,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercaseitalic,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasebold,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasebold,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasebolditalic,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasebolditalic,force=yes]

% greek
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasegreeknormal,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasegreeknormal,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasegreekitalic,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasegreekitalic,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasegreekbold,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasegreekbold,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:lowercasegreekbolditalic,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:uppercasegreekbolditalic,force=yes]

% digits - need to be defined without node mode, which means no default set
\definefontfeature[inlinemath][lnum=yes,pnum=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:digitsnormal,features=inlinemath,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[preset=math:digitsbold,features=inlinemath,force=yes]
\definefallbackfamily [mainface] [math] [Minion Pro]
[superscriptsandsubscripts] [force=yes]
\setupmathematics[autopunctuation={all},ucgreek=italic,lcgreek=italic]

\definefallbackfamily [mainface] [math] [Minion Pro]
[tf=style:normal,range={0x27-0x2F,0x3C-0x3E,0xB1,0xD7,0xF7,0x3E,0x5B-0x5D,0x7B-0x7E,0x2111,0x1D50D,0x2128,0x2190,0x2192,0x210C-0x211C,0x212D,0x2202,0x2206,0x220F,0x2211,0x2212,0x2215,0x2219,0x221E,0x2248,0x2260,0x2264,0x2265,0x27E6-0x27E9,0x1D504-0x1D52F,0x2980}]%

\definefallbackfamily [mainface] [math] [Minion Pro]
[bf=style:bold,range={0x27-0x2F,0xD7,0xF7,0x3A-0x3C,0x3E,0x5B-0x5D,0x7B-0x7E,0x2111,0x1D50D,0x2128,0x210C-0x211C,0x212D,0x2212,0x27E6-0x27E9,0x1D504-0x1D52F,0x2980}]

\definefontfamily [mainface] [math] [Cambria Math]

\setupbodyfont[mainface,12pt]

\starttext

\startformula
c^2 = a^2 + b^2
\stopformula

\bgroup\bf
\startformula
c^2 = a^2 + b^2
\stopformula
\egroup

\startformula
\cos (\gamma) = \Alpha \Gamma \Pi\sin (\alpha)
\stopformula

\bgroup\bf
\startformula
\cos (\gamma) = \Alpha \Gamma \Pi\sin (\alpha)
\stopformula
\egroup

\startformula
\[x\] - |y| + x^2 + y^2 -k² ≤ z^2; \quad \sin(\alpha)^2 + \cos(\beta)^2 = 1.
\stopformula

\bgroup\bf
\startformula
\[x\] - |y| + x^2 + y^2 -k² ≤ z^2; \quad \sin(\alpha)^2 + \cos(\beta)^2 = 1.
\stopformula
\egroup

\startformula
C^2 ≈ A^2 ∫ (B^2 ± \Theta \sin \gamma x) dx = \lim Z → ∞
\stopformula

\bgroup\bf
\startformula
C^2 ≈ A^2 ∫ (B^2 ± \Theta \sin \gamma x) dx = \lim Z → ∞
\stopformula
\egroup

\startformula
\sqrt{34×y\frac{21\alpha^2}{98.0 x_2}}Δθ = \sin(a)^2 + \cos(b)^2
\stopformula

\bgroup\bf
\startformula
\sqrt{34×y\frac{21\alpha^2}{98.0 x_2}}Δθ = \sin(a)^2 + \cos(b)^2
\stopformula
\egroup

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

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


Re: [NTG-context] Converting LaTeX math to ConTeXt

2021-10-13 Thread Jason Ross via ntg-context
 3
  
  
E
3
  


  5
  
L
3
  

  


  0


  0


  −
  

  2
  
A
3
  
  
E
3
  


  5
  
L
3
  

  


  

  4
  
A
3
  
  
E
3
  


  5
  
L
3
  

  

  

]
  
  
[

  

  0

  
  

  0

  
  

  
u

  2
  x

  

  
  

  
u

  2
  y

  

  
  

  0

  
  

  0

  
  

  0

  
  

  0

  

]
  

  
}{}
  \stopformula
\stopplaceformula

\stoptext
\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation}
  \left[
\begin{matrix}
  R_{1 x}\\
  R_{1 y}\\
  F_{2 x}\\
  F_{2 y}\\
  R_{3 x}\\
  R_{3 y}\\
  R_{4 x}\\
  R_{4 y}
\end{matrix}
  \right]
  =
  \left[
\begin{matrix}
  \frac{A_{1} E_{1}}{L_{1}} & 0 & - \frac{A_{1} E_{1}}{L_{1}} & 0 & 0 & 0 & 0 & 0\\
      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
  - \frac{A_{1} E_{1}}{L_{1}} & 0 & \frac{A_{1} E_{1}}{L_{1}} + \frac{A_{3} E_{3}}{5 L_{3}} & - \frac{2 A_{3} E_{3}}{5 L_{3}} & 0 & 0 & - \frac{A_{3} E_{3}}{5 L_{3}} & \frac{2 A_{3} E_{3}}{5 L_{3}}\\
  0 & 0 & - \frac{2 A_{3} E_{3}}{5 L_{3}} & \frac{A_{2} E_{2}}{L_{2}} + \frac{4 A_{3} E_{3}}{5 L_{3}} & 0 & - \frac{A_{2} E_{2}}{L_{2}} & \frac{2 A_{3} E_{3}}{5 L_{3}} & - \frac{4 A_{3} E_{3}}{5 L_{3}}\\
  0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
  0 & 0 & 0 & - \frac{A_{2} E_{2}}{L_{2}} & 0 & \frac{A_{2} E_{2}}{L_{2}} & 0 & 0\\
  0 & 0 & - \frac{A_{3} E_{3}}{5 L_{3}} & \frac{2 A_{3} E_{3}}{5 L_{3}} & 0 & 0 & \frac{A_{3} E_{3}}{5 L_{3}} & - \frac{2 A_{3} E_{3}}{5 L_{3}}\\
  0 & 0 & \frac{2 A_{3} E_{3}}{5 L_{3}} & - \frac{4 A_{3} E_{3}}{5 L_{3}} & 0 & 0 & - \frac{2 A_{3} E_{3}}{5 L_{3}} & \frac{4 A_{3} E_{3}}{5 L_{3}}
\end{matrix}
  \right]
  \left[
\begin{matrix}
  0\\
  0\\
  u_{2 x}\\
  u_{2 y}\\
  0\\
  0\\
  0\\
  0
\end{matrix}
  \right]
\end{equation}
\end{document}


sample-math.pdf
Description: Adobe PDF document


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


  1   2   3   4   5   6   7   8   >