[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: Back in the 90s

2024-04-13 Thread Hans Hagen

On 4/13/2024 2:12 PM, Riviera Taylor wrote:

Hello,

I was reading about the history of ConTeXt in the Not So Short 
Introduction To ConTeXt and I have a historical question. I noticed that 
the PDF specification was published in 1993 yet ConTeXt was invented in 
1991. The book suggests that PDF output was handled by the PdfTeX engine 
in MKII in 2005. What sort of output did the software produce before 
PdfTeX was introduced? Was this the same as the output produced by the 
software before the publication of the PDF specification?
2005 is when we started with luatex which is a follow up on pdftex, and 
pdftex is more a mid 90's thing; we immediately adopted pdftex (which 
made some believe that context depended on pdftex which is not true)


anyway, we started with dvi which needs a postprocessor to go to some 
printer format like specific hp or more general postscript but also can 
drive viewers


we went from epson dot matrix printer -> early 300 dpi laser -> 600 dpi 
laser printer -> high speed oce 512 dpi printer (metric) -> high speed 
oce 600 dpi printer (+ crappy canon color laser printer) -> fast 
page-wide hp color inkjet office printer


in mkii all is controlled by backend drivers, that use so called 
specials to support color, hyperlinks, images so a workflow can have


- dvipsone : high quality postscript
- dviwindo : viewer with typeone support and hyperlinks
- acrobat  : postscript to pdf

and as all these external backends have their demands we could handle 
all these things in an abstract way (that way one could also drive 
printer properties like duplex or paper bins etc from a tex job)


that meant that when pdf came around we could almost immediately support 
most of the interactive features in a dvi -> ps -> acrobat workflow


when pdftex came around the intermediate step of postscript could be 
avoided which btw was also possible with dvipdfm(x) so we also supported 
that


so to summarize, it went from

tex -> dvi -> printer format
tex -> dvi -> postscript -> more generic printer format
tex -> dvi -> pdf -> print from acrobat
tex -> pdf -> print from pdf viewer

in the meantime we are pdf (as from that one can produce other formats)

Hans

(btw, the fact that we could easily support pdf was also a reason why at 
that time some adobe folk in nl used documents produced by context to 
show somewhat extrems usage of interactive features, thanks to the fact 
that tex can adapt to such new situations, also via the dvi route in 
this case with pdfmarks; at that time pdf usage - and features - was a 
bit more dualistic: ps replacement format versus storage and preview 
format, but that's a different story; but it still shows in how the 
standard evolved)


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

2024-03-14 Thread Otared Kavian
Dear Emmanuel,

Thank you for your reply: indeed I understand your approach, which is quite 
efficient. I am not at all good in coding, so I naively thought there would be 
a way for your setup to retrieve the information it needs from what the user is 
doing. Maybe once things are settled, Hans and Wolfgang will have a look in the 
Japanese part of ConTeXt so that the user can avoid to enter the setup included 
in the \directlua part.

Again thank you for what you are sharing.

Best regards: Otared

> On 14 Mar 2024, at 08:12, Emanuel Han via ntg-context  
> wrote:
> 
> Dear Otared,
> 
> when you read the lua code in the first \directlua{}, you should realize that 
> the dimensions of almost all layout elements are depending on the value of my 
> lua variable "paperSize".
> Thanks to defining the paper size first in lua, I can apply calculations of 
> numeric values.
> 
> The value of paperSize is later passed on to \setuppapersize via 
> \setuppapersize[\directlua{tex.print(paperSize)}]
> 
> Emanuel
> On März 13 2024, at 3:55 pm, Otared Kavian  wrote:
> Hi Emmanuel,
> 
> Thank you so much for the new setup for writing Japanese: I tested with both 
> files, and noticed that with the new version the output looks great.
> 
> I have a question about the code in the \directlua{} part of your setup: why, 
> for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
> 
> Actually I am using your setup for learning Japanese, and at my beginner’s 
> level I do separate words I am learning with spaces. While with the previous 
> version of your setup the lines were breaking womewhat strangely, but now the 
> spaces between words in the output are as I intended them to be (I should 
> also Thank Wolfgang Schuster for his insight with the \script[nihongo], and 
> indeed Hans for fixing so quickly the slightest bug).
> 
> It is really a great pleasure to be in this community where help comes from 
> everyone and features are given on demand !
> 
> Best regards: Otared
> 
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context  
> > wrote:
> >
> > Hi all,
> >
> > I added 
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout 
> > output meets already some of the requirements (see comments in the code). 
> > Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) 
> > https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
> > https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in 
> > this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
> > https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
> > https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
> > https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster 
> >  wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very 
> > narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the 
> > necessary value for the 

[NTG-context] Re: Japanese

2024-03-14 Thread Emanuel Han via ntg-context
Dear Otared,

when you read the lua code in the first \directlua{}, you should realize that 
the dimensions of almost all layout elements are depending on the value of my 
lua variable "paperSize".
Thanks to defining the paper size first in lua, I can apply calculations of 
numeric values.

The value of paperSize is later passed on to \setuppapersize via 
\setuppapersize[\directlua{tex.print(paperSize)}]
Emanuel
On März 13 2024, at 3:55 pm, Otared Kavian  wrote:
> Hi Emmanuel,
>
> Thank you so much for the new setup for writing Japanese: I tested with both 
> files, and noticed that with the new version the output looks great.
> I have a question about the code in the \directlua{} part of your setup: why, 
> for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
>
> Actually I am using your setup for learning Japanese, and at my beginner’s 
> level I do separate words I am learning with spaces. While with the previous 
> version of your setup the lines were breaking womewhat strangely, but now the 
> spaces between words in the output are as I intended them to be (I should 
> also Thank Wolfgang Schuster for his insight with the \script[nihongo], and 
> indeed Hans for fixing so quickly the slightest bug).
> It is really a great pleasure to be in this community where help comes from 
> everyone and features are given on demand !
> Best regards: Otared
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context  
> > wrote:
> >
> > Hi all,
> >
> > I added 
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout 
> > output meets already some of the requirements (see comments in the code). 
> > Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) 
> > https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
> > https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in 
> > this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
> > https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
> > https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
> > https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster 
> >  wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very 
> > narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the 
> > necessary value for the text height.
> >
> > • protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> >
> > You're getting this for free because ruby text doesn't take up vertical 
> > space, in case vertical text is working it would now stick into the margins 
> > as expected.
> >
> > \starttext
> > \ruledhbox{a \ruby{x}{y} b}
> > \stoptext
> >
> >
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 
> > lines on one page, while the actual example doesn't show the 46th line.
> >
> > It would be important to identify the reason why only 24 characte

[NTG-context] Re: Japanese

2024-03-13 Thread Otared Kavian
Hi Emmanuel,

Thank you so much for the new setup for writing Japanese: I tested with both 
files, and noticed that with the new version the output looks great. 

I have a question about the code in the \directlua{} part of your setup: why, 
for instance, the 
paperSize = « B5"
is defined « by hand » there, instead of being retrieved from the command
 \setuppapersize[B5]
issued by the user? 

Actually I am using your setup for learning Japanese, and at my beginner’s 
level I do separate words I am learning with spaces. While with the previous 
version of your setup the lines were breaking womewhat strangely, but now the 
spaces between words in the output are as I intended them to be (I should also 
Thank Wolfgang Schuster for his insight with the \script[nihongo], and indeed 
Hans for fixing so quickly the slightest bug).

It is really a great pleasure to be in this community where help comes from 
everyone and features are given on demand !

Best regards: Otared

> On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context  
> wrote:
> 
> Hi all,
> 
> I added 
> https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> with attached working example code and to-do list.
> 
> Thanks for any contributions!
> 
> The working example code is still a work in progress. Its text layout output 
> meets already some of the requirements (see comments in the code). Among the 
> ones to still be implemented are:
> 
>   • solid setting (no extra spacing between characters) 
> https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
> https://www.w3.org/TR/jlreq/#term.line-adjustment
>   • aligning of the lines to the Kihon-hanmen (optimizing the code below 
> in this regard)
>   • positioning and realm of headings 
> https://www.w3.org/TR/jlreq/#fig3_1_9 https://www.w3.org/TR/jlreq/#fig3_1_15 
> et al, and https://www.w3.org/TR/jlreq/#fig3_1_4
>   • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
>   • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
>   • emphasis with sesame dot or bullet
>   • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
>   • indenting of quotation paragraphs 
> https://www.w3.org/TR/jlreq/#fig2_5_7
>   • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
>   • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
>   • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
>   • math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
> https://www.w3.org/TR/jlreq/#fig2_7_62
>   • tategaki (writing vertically)
> Best regards
> 
> Emanuel
> On März 2 2024, at 7:00 pm, Wolfgang Schuster 
>  wrote:
> Emanuel Han schrieb am 01.03.2024 um 16:23:
> 
> Dear Wolfgang,
> 
> thank you for your valuable remarks. I integrated them, see corrected 
> attached example.
> 
> Yes, correct layout examples exist. They're all showing vertical writing, but 
> the rules and principles are exactly the same for horizontal writing.
> 
>   • position of the headers and footers: 
> https://www.w3.org/TR/jlreq/#fig1_30
> 
> See my attached gongitsune.tex example how you can squeeze text in a very 
> narrow header/footer.
> 
>   • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> 
> You can use the lines key for \setuplayout to let ConTeXt calculate the 
> necessary value for the text height.
> 
>   • protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> 
> You're getting this for free because ruby text doesn't take up vertical 
> space, in case vertical text is working it would now stick into the margins 
> as expected.
> 
> \starttext
> \ruledhbox{a \ruby{x}{y} b}
> \stoptext
> 
> 
> 
> In my previous mail, I wrote wrong amounts of lines. They should be 46 lines 
> on one page, while the actual example doesn't show the 46th line.
> 
> It would be important to identify the reason why only 24 characters are used 
> to create a line when 25 could be used. Then we can develop a method to turn 
> that mechanism off or circumvent it.
> Quotation from https://www.w3.org/TR/jlreq:
> In principle, when composing a line with ideographic (cl-19), hiragana 
> (cl-15) and katakana (cl-16) characters, no extra spacing appears between 
> their character frame. This is called solid setting (see Figure 5).
> 
> 1. ConTeXt has a mechanism to typeset Japanese texts.
> 
> 2. There are flaws in the output it produces but this nothing which can't be 
> fixed.
> 
> 3. To fix the problems someone has to be passionate to fix them and we're 
> willing to help here.
> 
> As you can see in my second example file japanese.tex there is a font feature 
> to create half

[NTG-context] Re: Japanese

2024-03-11 Thread Wolfgang Schuster

Emanuel Han via ntg-context schrieb am 10.03.2024 um 17:43:

Hi all,

I added 
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout

with attached working example code and to-do list.

Thanks for any contributions!

The working example code is still a work in progress. Its text layout 
output meets already some of the requirements (see comments in the 
code). Among the ones to still be implemented are:


 *
solid setting (no extra spacing between characters)
https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for
line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
 *
aligning of the lines to the Kihon-hanmen (optimizing the code
below in this regard)

Can you make text files out of the images [1] with the spacing 
before/after punctuation to have short examples for testing.


[1] https://www.w3.org/TR/jlreq/#positioning_of_punctuation_marks


 *
positioning and realm of headings
https://www.w3.org/TR/jlreq/#fig3_1_9
https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and
https://www.w3.org/TR/jlreq/#fig3_1_4
 *
positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
 *
inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
 *
emphasis with sesame dot or bullet
 *
itemization https://www.w3.org/TR/jlreq/#fig2_5_6

Circled numbered are easy and achieved by adding additional number 
conversions.


 *
indenting of quotation paragraphs
https://www.w3.org/TR/jlreq/#fig2_5_7


Use the narrower or blockquote environment for this.


 *
tab setting https://www.w3.org/TR/jlreq/#fig2_6_1


Just use a table.


 *
furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
 *
jidori https://www.w3.org/TR/jlreq/#fig2_7_4
 *
math https://www.w3.org/TR/jlreq/#fig2_7_6 and
https://www.w3.org/TR/jlreq/#fig2_7_62
 *
tategaki (writing vertically)


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

2024-03-10 Thread Jean-Pierre Delange

Emanuel,

Your sample seems to work fine on CTX MKIV 2024.01.24 version , as far 
as I see the final PDF output. And ConTeXt doesn't complain, even in the 
log !


Best//JP

Le 10/03/2024 à 17:43, Emanuel Han via ntg-context a écrit :

Hi all,

I added 
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout

with attached working example code and to-do list.

Thanks for any contributions!

The working example code is still a work in progress. Its text layout 
output meets already some of the requirements (see comments in the 
code). Among the ones to still be implemented are:


 *
solid setting (no extra spacing between characters)
https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for
line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
 *
aligning of the lines to the Kihon-hanmen (optimizing the code
below in this regard)
 *
positioning and realm of headings
https://www.w3.org/TR/jlreq/#fig3_1_9
https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and
https://www.w3.org/TR/jlreq/#fig3_1_4
 *
positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
 *
inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
 *
emphasis with sesame dot or bullet
 *
itemization https://www.w3.org/TR/jlreq/#fig2_5_6
 *
indenting of quotation paragraphs
https://www.w3.org/TR/jlreq/#fig2_5_7
 *
tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
 *
furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
 *
jidori https://www.w3.org/TR/jlreq/#fig2_7_4
 *
math https://www.w3.org/TR/jlreq/#fig2_7_6 and
https://www.w3.org/TR/jlreq/#fig2_7_62
 *
tategaki (writing vertically)

Best regards

Emanuel
On März 2 2024, at 7:00 pm, Wolfgang Schuster 
 wrote:


Emanuel Han schrieb am 01.03.2024 um 16:23:


Dear Wolfgang,

thank you for your valuable remarks. I integrated them, see
corrected attached example.

Yes, correct layout examples exist. They're all showing
vertical writing, but the rules and principles are exactly the
same for horizontal writing.

 *
position of the headers and footers:
https://www.w3.org/TR/jlreq/#fig1_30


See my attached gongitsune.tex example how you can squeeze text in
a very narrow header/footer.

 *
aligning lines to the text box:
https://www.w3.org/TR/jlreq/#fig1_3


You can use the lines key for \setuplayout to let ConTeXt
calculate the necessary value for the text height.

 *
protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6


You're getting this for free because ruby text doesn't take up
vertical space, in case vertical text is working it would now
stick into the margins as expected.

\starttext
\ruledhbox{a \ruby{x}{y} b}
\stoptext


 *



In my previous mail, I wrote wrong amounts of lines. They
should be 46 lines on one page, while the actual example
doesn't show the 46th line.

It would be important to identify the reason why only 24
characters are used to create a line when 25 could be used.
Then we can develop a method to turn that mechanism off or
circumvent it.
Quotation from https://www.w3.org/TR/jlreq:
/In principle, when composing a line with //ideographic
(cl-19) <https://www.w3.org/TR/jlreq/#cl-19>//, //hiragana
(cl-15) <https://www.w3.org/TR/jlreq/#cl-15>// and //katakana
(cl-16) <https://www.w3.org/TR/jlreq/#cl-16>// characters, no
extra spacing appears between their //character frame
<https://www.w3.org/TR/jlreq/#term.character-frame>//. This is
called solid setting (see //Figure 5
<https://www.w3.org/TR/jlreq/#fig1_8>//)./


1. ConTeXt has a mechanism to typeset Japanese texts.

2. There are flaws in the output it produces but this nothing
which can't be fixed.

3. To fix the problems someone has to be passionate to fix them
and we're willing to help here.

As you can see in my second example file japanese.tex there is a
font feature to create half sized parentheses etc. which isn't
supported yet by ConTeXt's mechanism for japanese and in case your
willing to improve it this should be taken care of as well.

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 :

[NTG-context] Re: Japanese

2024-03-10 Thread Emanuel Han via ntg-context
Hi all,

I added 
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
with attached working example code and to-do list.
Thanks for any contributions!
The working example code is still a work in progress. Its text layout output 
meets already some of the requirements (see comments in the code). Among the 
ones to still be implemented are:
solid setting (no extra spacing between characters) 
https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
https://www.w3.org/TR/jlreq/#term.line-adjustment
aligning of the lines to the Kihon-hanmen (optimizing the code below in this 
regard)

positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
https://www.w3.org/TR/jlreq/#fig3_1_4

positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24

inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1

emphasis with sesame dot or bullet

itemization https://www.w3.org/TR/jlreq/#fig2_5_6

indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7

tab setting https://www.w3.org/TR/jlreq/#fig2_6_1

furiwake https://www.w3.org/TR/jlreq/#fig2_7_2

jidori https://www.w3.org/TR/jlreq/#fig2_7_4

math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
https://www.w3.org/TR/jlreq/#fig2_7_62

tategaki (writing vertically)

Best regards

Emanuel
On März 2 2024, at 7:00 pm, Wolfgang Schuster 
 wrote:
> Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> > position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> See my attached gongitsune.tex example how you can squeeze text in a very 
> narrow header/footer.
> > aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> You can use the lines key for \setuplayout to let ConTeXt calculate the 
> necessary value for the text height.
> > protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> You're getting this for free because ruby text doesn't take up vertical 
> space, in case vertical text is working it would now stick into the margins 
> as expected.
> \starttext
> \ruledhbox{a \ruby{x}{y} b}
> \stoptext
>
>
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 
> > lines on one page, while the actual example doesn't show the 46th line.
> > It would be important to identify the reason why only 24 characters are 
> > used to create a line when 25 could be used. Then we can develop a method 
> > to turn that mechanism off or circumvent it.
> > Quotation from https://www.w3.org/TR/jlreq:
> > In principle, when composing a line with ideographic (cl-19) 
> > (https://www.w3.org/TR/jlreq/#cl-19), hiragana (cl-15) 
> > (https://www.w3.org/TR/jlreq/#cl-15) and katakana (cl-16) 
> > (https://www.w3.org/TR/jlreq/#cl-16) characters, no extra spacing appears 
> > between their character frame 
> > (https://www.w3.org/TR/jlreq/#term.character-frame). This is called solid 
> > setting (see Figure 5 (https://www.w3.org/TR/jlreq/#fig1_8)).
>
>
> 1. ConTeXt has a mechanism to typeset Japanese texts.
> 2. There are flaws in the output it produces but this nothing which can't be 
> fixed.
> 3. To fix the problems someone has to be passionate to fix them and we're 
> willing to help here.
> As you can see in my second example file japanese.tex there is a font feature 
> to create half sized parentheses etc. which isn't supported yet by ConTeXt's 
> mechanism for japanese and in case your willing to improve it this should be 
> taken care of as well.
> Wolfgang

japanese_mwe.tex
Description: TeX 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: [External] Re: Looking for itemize help

2024-01-15 Thread Jim
Hi Michael,

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

Cheers.
Jim

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

> Hi Jim,

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

> %%

> \starttext

> This is a short paragraph.

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

> This is a short paragraph.

> \stoptext

> %%

> Cheers,

> Michael

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

>> Hi Hraban,

>> thanks for your response.  But...

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

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

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

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

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

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

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

>> %%%

>> \setupwhitespace [big]

>> \setuppapersize [letter]

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

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

>> This is a short paragraph.

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

>> This is another short paragraph.

>> \stoptext

>> %%%

>> Thoughts?

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

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

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

> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

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

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

%%

\starttext

This is a short paragraph.

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

This is a short paragraph.

\stoptext

%%

Cheers,

Michael

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

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

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


[NTG-context] Re: QR Code

2023-12-21 Thread Ursula Hermann
termine if using 
environment variables is the best solution, or whether there are faster 
alternatives available.

Environment variables can be set and inspected through the Windows Control 
Panel (System -> Advanced -> Environment Variables). Details depend on your 
version of Windows.

For an application launched from WinEdt it is also possible to set such values 
locally inside WinEdt because WinEdt's environmental block is inherited by them 
(when they are launched from WinEdt). This can be done by adding such 
definitions in the Variables page in the Execution Modes interface. Up to six 
such variables can be maintained through this page; a variable is enabled when 
the corresponding checkbox Var is checked.

[X]

For example, suppose that you want MiKTeX to search for input files in some 
non-standard fixed locations, e.g. C:\MyCurrentTeXProject and C:\MyTeXFiles and 
all subfolders inside this one, while your bibliography (.bib) files are stored 
in C:\MyTeXFiles\Bib directory. After consulting MiKTeX's help, you decide that 
you want to accomplish this by defining the appropriate environment variables 
TEXINPUTS and BIBINPUTS (even though this is not a recommended method as it can 
slow down the compilation). In this page define and enable the variables:

  BIBINPUTS
.;C:/MyTeXFiles/Bib;

  TEXINPUTS
.;C:/MyCurrentTeXProject;C:/MyTeXFiles//;


The list of folders is separated by a semicolon, and "//" at the end indicates 
that all subfolders should be searched as well. Even though latest MiKTeX and 
TeX Live allow Windows-style specification of folders in environment variables, 
it is best to use UNIX-style (TeX usually expects and prefers directories to be 
separated by "/" rather "\" because the backslash is its control character). 
Furthermore, "//" at the end cannot be substituted with "\\".

The initial dot "." is an instruction to search first in the current folder. 
The trailing semicolon ";" means a search in the TeX root if nothing is found 
in the specified folders. While not necessary when using MiKTeX, these are 
absolutely required when using TeX Live (otherwise, the current folder isn't 
searched and files in root folder won't be found)!

Recursing through directories with many files can be pretty slow: you should 
consider faster alternatives (e.g. registering your own root directory) as 
described and recommended in MiKTeX's manual. But this is certainly not a 
WinEdt issue...

Alternative method

WinEdt's Macro Manual (among other things) explains how to use the SetEnvVar 
and GetEnvVar macro functions, should you require more information. And instead 
of using the Variables interface of the Execution Modes dialog, it is possible 
to add code directly to WinEdt's Local Startup macro (accessible through the 
Advanced -> Event Handlers section of the Options Interface):

  SetEnvVar("BIBINPUTS",".;C:/MyTeXFiles/Bib;");
  SetEnvVar("TEXINPUTS",".;C:/MyCurrentTeXProject;C:/MyTeXFiles/"+"/;");


After adding the above lines to WinEdt's Local Startup macro, execute the 
command Run Startup Macro from the Macros menu. That's all. If you now launch a 
compilation from WinEdt, the accessories will use the modified variables.

When in doubt about the value of any environment variable, you can use the 
command Define and Run Macro found in the Macros menu and execute the macro:

  Prompt("%@('Environment Variable');");


Note: This is where WinEdt's involvement with environment variables ends (you 
can set and inspect them through WinEdt's macros or through this interface). 
The meaning of such variables is described in the documentation that comes with 
your accessories or TeX System (e.g. MiKTeX's manual). Whether or not they work 
as you expect depends on your TeX System (but not on WinEdt!). Contrary to what 
many users believe, neither WinEdt's nor the Windows PATH variable have 
anything to do with where TeX is searching for its input files!


Diagnosis

WinEdt displays crucial information about your TeX System and accessories in 
this page. If you encounter problems with launching a certain accessory, this 
report can be used to see if the application is installed and if it can be 
found. If the problem is only with detecting the executable, then the 
information in the Troubleshooting section should guide you in manually fixing 
the problem. If, on the other hand, the executable can be located but it does 
not run properly, it means that there are some problems with it (or your 
document source) outside WinEdt. WinEdt cannot detect and fix this kind of 
problem and you'll have to consult the documentation pertaining to that 
accessory or TeX System.

If WinEdt cannot find any trace of your TeX System or other accessories, it is 
likely that they are not properly installed. Reinstalling the problematic 
software and

[NTG-context] Re: Key distance with enumeration

2023-07-27 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 27.07.2023 um 20:56:


Hi,
I don't understand why the distance between the dot and the first 
letter of the text is not always the same (see with theorem).


Add

        stretch=0,
        shrink=0,

to your enumeration setup.

Wolfgang

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

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

[NTG-context] Key distance with enumeration

2023-07-27 Thread Fabrice Couvreur
Hi,
I don't understand why the distance between the dot and the first letter of
the text is not always the same (see with theorem).
Thanks
Fabrice

\setupenumerations
  [before={\blank},
   after={\blank},
   alternative=serried,
   distance=1cm,
   title=yes,
   titleleft=,
   titleright=,
   titlestyle=normal,
   prefix=no,
   prefixsegments=chapter,
   way=bychapter,
   prefixconversionset=digit,
   counter=,
   headcommand=\groupedcommand{}{.},
   numbercommand=\groupedcommand{}{},
   titlecommand=\groupedcommand{(}{)},
   width=broad]

\defineenumeration
   [definition]
   [text=Définition,
number=yes,
style=italic]

\defineenumeration
   [theorem]
   [text=Théorème,
number=yes,
style=italic]


\starttext
 \startdefinition
 Un polynôme est une application de R dans R somme d'un nombre fini de
monômes.
\stopdefinition
\starttheorem
  La forme réduite d'un polynôme est unique à l'ordre près des monômes
qui le constituent.
\stoptheorem
\startdefinition
  Le degré d'un polynôme {\bi non nul} est le degré du monôme de plus
haut degré figurant dans son écriture réduite.
\stopdefinition
\startdefinition
  Le terme constant d'un polynôme est le coefficient (éventuellement
nul) de son monôme de degré 0.
\stopdefinition

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

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

[NTG-context] Re: \showmakeup adds unwanted space despite accurate readings; \qquad mandatory before \TeX\

2023-07-05 Thread Carlos
On Wed, Jul 05, 2023 at 06:15:41PM +0200, Alan Braslau via ntg-context wrote:
> On 05/07/23 05/07/23, 17:53, Carlos wrote:
> > (sorry for duplicate messages. sending out to mailing list works
> > sporadically Sometimes works, other times doesn't).
> 
> As reported, the contextgarden server was down following a disk controller
> failure and had taken some time to be reconfigured with new hardware and
> brought back online.
> 
> However, the request that I read was not about duplicate messages but rather
> to avoid superfluous signature additions when posting to a mailing list.
> 
> Alan

I have no clue what the heck you're talking about about the superflous
or whatever signature. Much less about you read or did not read.  

Not related to my question.

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

-- 
[From the operation manual for the CI-300 Dot Matrix Line Printer, made
in Japan]:

The excellent output machine of MODEL CI-300 as extraordinary DOT MATRIX
LINE PRINTER, built in two MICRO-PROCESSORs as well as EAROM, is featured by
permitting wonderful co-existence such as; "high quality against low cost,"
"diversified functions with compact design," "flexibility in accessibleness
and durability of approx. 2000,000,00 Dot/Head," "being sophisticated in
mechanism but possibly agile operating under noises being extremely
suppressed" etc.

And as a matter of course, the final goal is just simply to help achieve
"super shuttle diplomacy" between cool data, perhaps earned by HOST
COMPUTER, and warm heart of human being.

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

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


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

2023-06-10 Thread Henning Hraban Ramm via ntg-context

Am 10.06.23 um 19:46 schrieb Mikael Sundqvist via ntg-context:

Hi,

On Sat, Jun 10, 2023 at 10:06 AM Henning Hraban Ramm via ntg-context
 wrote:


Hi, this is probably for Hans & Mikael, but maybe someone else has a hint:

If I set a fallback for my body font to catch all missing characters,
some math accents get replaced by small bold uppercase characters (I
found hat by K and ring by T so far).

I tried [fallbacks=] for math to no avail.

My example uses Cambria, but it’s the same with other fonts.

(BTW, in \bar{b} with Libertinus, the bar looks too high.)


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


I could fix a few math accents (e.g. widebar) by limiting my 
replacements to necessary glyphs, but many other problems remain (e.g. 
breve, check, dot, widehat). It also affects the sizing of limiters and 
e.g. underbraces.


Why do font fallbacks for non-math fonts affect math at all?

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

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


Re: [NTG-context] \writetolist not writing the number to the TOC

2023-03-27 Thread Willi Egger via ntg-context
Thank you Hans,

that is, what I need. It was even easy to implement in the layout-file only :-) 
because these sections where already under a “mysection” head.

Kind regards

Willi

> On 27 Mar 2023, at 15:52, Hans Hagen via ntg-context  
> wrote:
> 
> On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:
>> Hello Hraban,
>> thank you. I missed this point. However, adding a dot behind the number does 
>> not appear to solve the problem. The title’s text still starts at the left 
>> margin which looks very odd.
>> Kind regards
>> Willi
>>> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
>>>  wrote:
>>> 
>>> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>>>> Good evening!
>>>> I have a setup in which I need to send info to the TOC:
>>>> Consider the following example:
>>>> \starttext
>>>> \starttitle[title=Contents]
>>>>   \placelist[chapter][criterium=all]
>>>> \stoptitle
>>>> \startchapter[title=Mychapter]
>>>>   \input knuth
>>>>   \startsubject[title=Subject will be in TOC]
>>>> \writetolist[chapter]{1}{I am in TOC!}
>>>> \input ward
>>>>   \stopsubject
>>>> \stopchapter
>>>> \stoptext
>>>> According to the Wiki I should get te number (1) in the TOC. Instead the 
>>>> text starts at the height of the chapter-numbering and is not carrying the 
>>>> given number.
>>>> Am I doing something wrong?
>>> 
>>> The wiki says:
>>> 
>>> “The default table of contents is combined list. To write to it one has to 
>>> choose the level to which it should be inserted: 
>>> \writetolist[chapter]{1.}{Chapter list entry A},
>>> \writetolist[section]{1.1}{Section list entry A}, etc.”
>>> 
>>> https://wiki.contextgarden.net/Command/writetolist
>>> 
>>> So maybe you need a dot?
>>> 
>>> Otherwise I don’t know.
> \definehead[xsubject][section][number=no]
> 
> \setuplist[xsubject][margin=2em]
> 
> \starttext
>\starttitle[title=Contents]
>  \placelist[chapter,xsubject][criterium=all]
>\stoptitle
>\startchapter[title=Mychapter]
>  \input knuth
>  \startxsubject[title=Subject will be in TOC1] \input ward \stopxsubject
>  \startxsubject[title=Subject will be in TOC2] \input ward \stopxsubject
>\stopchapter
> \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
> ___

___
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] \writetolist not writing the number to the TOC

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

On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:

Hello Hraban,

thank you. I missed this point. However, adding a dot behind the number does 
not appear to solve the problem. The title’s text still starts at the left 
margin which looks very odd.

Kind regards
Willi


On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
 wrote:

Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:

Good evening!
I have a setup in which I need to send info to the TOC:
Consider the following example:
\starttext
\starttitle[title=Contents]
   \placelist[chapter][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
   \input knuth
   \startsubject[title=Subject will be in TOC]
 \writetolist[chapter]{1}{I am in TOC!}
 \input ward
   \stopsubject
\stopchapter
\stoptext
According to the Wiki I should get te number (1) in the TOC. Instead the text 
starts at the height of the chapter-numbering and is not carrying the given 
number.
Am I doing something wrong?


The wiki says:

“The default table of contents is combined list. To write to it one has to 
choose the level to which it should be inserted: 
\writetolist[chapter]{1.}{Chapter list entry A},
\writetolist[section]{1.1}{Section list entry A}, etc.”

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

So maybe you need a dot?

Otherwise I don’t know.

\definehead[xsubject][section][number=no]

\setuplist[xsubject][margin=2em]

\starttext
\starttitle[title=Contents]
  \placelist[chapter,xsubject][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
  \input knuth
  \startxsubject[title=Subject will be in TOC1] \input ward 
\stopxsubject
  \startxsubject[title=Subject will be in TOC2] \input ward 
\stopxsubject

\stopchapter
\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] \writetolist not writing the number to the TOC

2023-03-26 Thread Willi Egger via ntg-context
Hello Hraban,

thank you. I missed this point. However, adding a dot behind the number does 
not appear to solve the problem. The title’s text still starts at the left 
margin which looks very odd.

Kind regards
Willi

> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>> Good evening!
>> I have a setup in which I need to send info to the TOC:
>> Consider the following example:
>> \starttext
>> \starttitle[title=Contents]
>>   \placelist[chapter][criterium=all]
>> \stoptitle
>> \startchapter[title=Mychapter]
>>   \input knuth
>>   \startsubject[title=Subject will be in TOC]
>> \writetolist[chapter]{1}{I am in TOC!}
>> \input ward
>>   \stopsubject
>> \stopchapter
>> \stoptext
>> According to the Wiki I should get te number (1) in the TOC. Instead the 
>> text starts at the height of the chapter-numbering and is not carrying the 
>> given number.
>> Am I doing something wrong?
> 
> The wiki says:
> 
> “The default table of contents is combined list. To write to it one has to 
> choose the level to which it should be inserted: 
> \writetolist[chapter]{1.}{Chapter list entry A},
> \writetolist[section]{1.1}{Section list entry A}, etc.”
> 
> https://wiki.contextgarden.net/Command/writetolist
> 
> So maybe you need a dot?
> 
> Otherwise I don’t know.
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

___
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] \writetolist not writing the number to the TOC

2023-03-26 Thread Henning Hraban Ramm via ntg-context

Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:

Good evening!

I have a setup in which I need to send info to the TOC:

Consider the following example:

\starttext

\starttitle[title=Contents]
   \placelist[chapter][criterium=all]
\stoptitle

\startchapter[title=Mychapter]
   \input knuth
   \startsubject[title=Subject will be in TOC]
 \writetolist[chapter]{1}{I am in TOC!}
 \input ward
   \stopsubject
\stopchapter

\stoptext

According to the Wiki I should get te number (1) in the TOC. Instead the text 
starts at the height of the chapter-numbering and is not carrying the given 
number.

Am I doing something wrong?


The wiki says:

“The default table of contents is combined list. To write to it one has 
to choose the level to which it should be inserted: 
\writetolist[chapter]{1.}{Chapter list entry A},

\writetolist[section]{1.1}{Section list entry A}, etc.”

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

So maybe you need a dot?

Otherwise I don’t know.

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

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


[NTG-context] Fwd: BachoTeX 2023: invitation and call for papers

2023-02-05 Thread Henning Hraban Ramm via ntg-context

 Weitergeleitete Nachricht 
Betreff: BachoTeX 2023: invitation and call for papers
Datum: Wed, 1 Feb 2023 20:33:11 +0100
Von: Jerzy.Ludwichowski 

Dear Friends,

please pass on the BachoTeX 2023 announcement to your members.

With best wishes,
-- Jerzy Ludwichowski

===
Dear TeX users and friends,

good news - come what may, there will be BachoTeX 2023 as indeed I 
promised when

announcing BachoTeX 2022 cancellation.

The SARS-CoV-2 virus did not disappear but seems to have become less of 
a danger
as far as one can tell. The war in Ukraine is raging still, but none the 
less we

decided to organize BachoTeX 2023 at the usual dates and venue.

We hope that for the fall and to make up for the lost time by keeping the
same theme as the cancelled 2020 conference.

Please find below the call for papers for BachoTeX 2023, with the same 
theme as

planned for BachoTeX 2020 and 2022.

The dates are from 29th of April until 3rd of May, 2023.

Registrations will be announced separately as soon as possible.

-- Jerzy Ludwichowski
(for the Organizing Committee)


The 28th GUST TeX conference

A model kit.
Modeling and implementing text typesetting in TeX and other systems.

TeX as a program created by a scientist - Professor of The Art of Computer
Programming, D. E. Knuth - stands out among other typesetting programs.
Here we have not only an implementation but also a theoretical model to
explain its behavior. For example the line breaking algorithm is based on
the "algebra of glue and boxes". Algorithms designed for TeX became the
basis for several scientific publications. TeX became a suitable
environment for research in typography.

We ask participants to reflect on the dependencies between theoretical
models and implementation. Do they help or are they an obstacle?

* Papers/presentations

Of course we also look forward to the normal mix of TeX, Metafont/Metapost
(please, do not forget the fonts!), ConTeXt, LaTeX, and friends related
presentations. We also do upkeep the BachoTeX trend in which we try to bring
together programmers and designers of typographic systems, typographers and
other users of such systems. The normal channel of offering papers is the
emailing of proposals to the Program Committee, but before rushing off 
to the

mailer, please consult the info for authors.
* Workshops and tutorials

We look forward to proposals for TeX-related tutorials or introductions.
If you have suggestions for tutorials or workshops by others than
yourself or about specific topics, please let us know.

* Poster sessions

As always at BachoTeX participants will be given the opportunity to
present their TeX and typographic results in the form of posters for
which we provide exhibition space.

* Deadlines and addresses

The deadline for "regular" abstracts and other proposals is March 26th,
2023. The deadline for final papers to appear in the conference materials
is April 16th. Contributions should be sent by email to the Program
Committee:

     prog-2023 at gust.org.pl.

The Program Committee is chaired by Bogusław Jackowski
(b_jackowski at gust dot org dot pl).

For other conference details see http://gust.org.pl/bachotex/2023-en.

___
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] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)

2023-01-26 Thread Otared Kavian via ntg-context
Hi Hans and Mikael,

Thank you both for your attention to my reply and the clarification and hints 
regarding the comman \colonequals and 
\setupmathematics[autospacing=yes]

Indeed the command \colonequals give the precise expected alignment for the 
combination glyph « := ». Befors changing the combination « := » to 
\columnequals in my documents, I am wondering whether one could add a small lua 
code in order to make an automatic replacement at run time. Actually, since I 
don’t know of any other instance in which the combination « := » is used to 
mean something else, would it not be reasonnable to make « := » synonym to 
\colonequals?

I played a little bit with 
\setupmathematics[autospacing=yes]
and it seems to me that without this command one gets automatic spacing in math 
mode, while with the above command the spacing obeys what has been inserted in 
the source. Is this behaviour intended, or is there a mismatch between 
\setupmathematics[autospacing=yes]
and
\setupmathematics[autospacing=no]

Best regards: Otared


> On 26 Jan 2023, at 10:33, Hans Hagen via ntg-context  <mailto:ntg-context@ntg.nl>> wrote:
> 
> On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:
>> On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
>> mailto:ntg-context@ntg.nl>> wrote:
>>> 
>>> Hi,
>>> 
>>> Thanks Hraban for the information and the link to the article by Hans and 
>>> Mikael about the math fonts in Lucida.
>>> 
>>> I very much appreciated that article: one sees how the handling of almost 
>>> impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… 
>>> So a great thank you to Hans and Mikael for all this work!
>>> 
>>> Regarding the details of vertical alignment in math, I wonder whether the 
>>> column « : » in front of the equal sign « = », in the combination « := » 
>>> (used to define for instance a new variable) should be alos centered around 
>>> the math axis, as explained in the article. For instance in the following 
>>> example
>>> 
>>> \setupbodyfont[lucidaot,12pt]
>>> \starttext
>>> \startformula
>>> f(x) := -(u|x) := - \langle u, x \rangle
>>> \stopformula
>>> \stopformula
>>> \startformula
>>> f : A \longrightarrow B
>>> \stopformula
>>> \stoptext
>>> 
>>> it seems to me that the lower dot (or square…) in the semicolumn of the 
>>> first formula (in front of the equal sign) is lower than in the second 
>>> formula.
>>> 
>>> Best regards: Otared
>> Thank you for the kind words, Otared,
>> Regarding the colons (and other symbols with "dots"), I would say it
>> is still not optimal in Lucida (and difficult to make it "consistent",
>> there are too many symbols that are at the moment different). But in
>> your example you can use \colonequals and \colon if you prefer. They
>> are centered around the math axis.
>> Best, Mikael
>> \setupbodyfont[lucidaot,12pt]
>> \starttext
>> \startformula
>> f(x) := -(u|x) \colonequals - \langle u, x \rangle
>> \stopformula
>> \startformula
>> f : A \longrightarrow B \breakhere
>> f \colon A \longrightarrow B
>> \stopformula
>> \startformula
>> \mathaxisbelow := \colonequals : \colon
>> \stopformula
>> \stoptext
> There is a (experimental as we played with it and then got distracted) 
> feature that makes some symbols adapt to spacing in the input.
> 
> \starttext
> 
>\setupmathematics[autospacing=yes]
> 
>\setupmathematics[collapsing=2]
> 
>\im{A:B} and \im{A : B}\par
>\im{A:=B} and \im{A := B}\par
>\im{A\colonequals B} and \im{A {\colonequals} B}\par
> 
> \stoptext
> 
> the second line is not yet ok as collapsing the := (old feature) comes at the 
> wrong time when we do autospacing (something Mikasl and I now need to discuss 
> and test)
> 
> This autospacing is part of some larger effort, for instance we can also auto 
> handle fences and so. All this relates to minimizing the input and make it a 
> bit more natural. Think (1,2) vb (1, 2) where we - due to the many more 
> classes that we have - want spacing to be right.
> 
> All will be revealed in the upcoming releases and the upcoming 3145 page math 
> manual.
> 
> 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/> |

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

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

On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:

On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
 wrote:


Hi,

Thanks Hraban for the information and the link to the article by Hans and 
Mikael about the math fonts in Lucida.

I very much appreciated that article: one sees how the handling of almost 
impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a 
great thank you to Hans and Mikael for all this work!

Regarding the details of vertical alignment in math, I wonder whether the 
column « : » in front of the equal sign « = », in the combination « := » (used 
to define for instance a new variable) should be alos centered around the math 
axis, as explained in the article. For instance in the following example

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) := - \langle u, x \rangle
\stopformula
\stopformula
\startformula
f : A \longrightarrow B
\stopformula
\stoptext

it seems to me that the lower dot (or square…) in the semicolumn of the first 
formula (in front of the equal sign) is lower than in the second formula.

Best regards: Otared


Thank you for the kind words, Otared,

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

Best, Mikael

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) \colonequals - \langle u, x \rangle
\stopformula
\startformula
f : A \longrightarrow B \breakhere
f \colon A \longrightarrow B
\stopformula
\startformula
\mathaxisbelow := \colonequals : \colon
\stopformula
\stoptext
There is a (experimental as we played with it and then got distracted) 
feature that makes some symbols adapt to spacing in the input.


\starttext

\setupmathematics[autospacing=yes]

\setupmathematics[collapsing=2]

\im{A:B} and \im{A : B}\par
\im{A:=B} and \im{A := B}\par
\im{A\colonequals B} and \im{A {\colonequals} B}\par

\stoptext

the second line is not yet ok as collapsing the := (old feature) comes 
at the wrong time when we do autospacing (something Mikasl and I now 
need to discuss and test)


This autospacing is part of some larger effort, for instance we can also 
auto handle fences and so. All this relates to minimizing the input and 
make it a bit more natural. Think (1,2) vb (1, 2) where we - due to the 
many more classes that we have - want spacing to be right.


All will be revealed in the upcoming releases and the upcoming 3145 page 
math manual.


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] Lucida-1.901 (2023-01-21) available

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

Thank you for the kind words, Otared,

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

Best, Mikael

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) \colonequals - \langle u, x \rangle
\stopformula
\startformula
f : A \longrightarrow B \breakhere
f \colon A \longrightarrow B
\stopformula
\startformula
\mathaxisbelow := \colonequals : \colon
\stopformula
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2023-01-25 Thread Otared Kavian via ntg-context
Hi,

Thanks Hraban for the information and the link to the article by Hans and 
Mikael about the math fonts in Lucida.

I very much appreciated that article: one sees how the handling of almost 
impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a 
great thank you to Hans and Mikael for all this work!

Regarding the details of vertical alignment in math, I wonder whether the 
column « : » in front of the equal sign « = », in the combination « := » (used 
to define for instance a new variable) should be alos centered around the math 
axis, as explained in the article. For instance in the following example

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) := - \langle u, x \rangle
\stopformula
\stopformula
\startformula
f : A \longrightarrow B
\stopformula
\stoptext

it seems to me that the lower dot (or square…) in the semicolumn of the first 
formula (in front of the equal sign) is lower than in the second formula.

Best regards: Otared

> On 23 Jan 2023, at 09:39, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> https://tug.org/pipermail/lucida/2023-January/000921.html
> 
> A new version (1.901) of the Lucida OpenType fonts from TUG is
> available.  As with previous updates, there's no additional charge if
> you've already purchased licenses; you can use the same download
> information sent to you at the time of purchase to get the new fonts.
> (If you've lost the download info, you can email us at
> lucida-admin at tug.org.)
> 
> I will append the changes for this release. The same information is also
> online at https://tug.org/store/lucida/NEWS.txt.
> 
> To summarize, the most significant changes have been to the math fonts,
> especially the regular-weight LucidaBrightMathOT. Many of these changes
> were discussed in greater detail in the recent article about Lucida math
> by Hans Hagen and Mikael Sundqvist:
>  https://tug.org/TUGboat/tb43-3/tb135hagen-lucida.pdf
> 
> The four Lucida Sans fonts and the three specialized fonts (Blackletter,
> Calligraphy, Handwriting) are not changed at all from the last release
> (not even version numbers or dates). All other fonts were changed.
> 
> On behalf of TUG, I thank Hans, Mikael, and Michael Sharpe, who among
> them did essentially all of the technical font editing for this
> release. And we must thank Chuck Bigelow and Kris Holmes (they approved
> this release, as always), without whom nothing could be done.
> 
> Bug reports and character/feature requests are welcome (email to this
> list is best), though, as usual, we cannot promise any particular
> timeline for the next release.
> 
> Happy typesetting,
> Karl [Berry]
> ___
> 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] 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
___


[NTG-context] issues with variable fonts in latest

2022-12-15 Thread Pablo Rodriguez via ntg-context
Dear Hans,

since you mentioned current latest (2022.12.09 16:34) regarding to
variable fonts today, I have found the following issues with Recursive
(comparing it with https://www.recursive.design/#toolbar):

  \definefontfeature[serifa]
[axis={wght=500}]
  \definefontfeature[monor]
[axis={wght=500,mono=1}]
  \definefontfeature[handy]
[axis={wght=500,mono=1,casl=0.75}]
  \definefontfeature[cali]
[axis={wght=500,crsv=1}]
  \definefontfamily[mainface][rm][Recursive]
[features={default, serifa}]
  \definefontfamily[mainface][tt][Recursive]
[features={default, monor}]
  \definefontfamily[mainface][hw][Recursive]
[features={default, handy}]
  \definefontfamily[mainface][cg][Recursive]
[features={default, cali}]
  \setupbodyfont[mainface]
  \starttext
  \startTEXpage[offset=1em]
  \scale[width=\textwidth]
{\rm áéíóúijrf}
  \scale[width=\textwidth]
{\tt áéíóúijrf}
  \scale[width=\textwidth]
{\hw áéíóúijrf}
  \scale[width=\textwidth]
{\cg áéíóúijrf}
  \stopTEXpage
  \stoptext

'mono=1' misplaces the dot in i and j and the accent in i (all to the
left). It also misses bottom lines in i, r and f. And it also misses the
upper left stroke in r.

'crsv=1' gives no alternate glyphs.

I use Recursive for a project and I discovered the issues.

Many thanks for your help,

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

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


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("to"))

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 Gavin via ntg-context
Hi Hans,

> On Dec 6, 2022, at 2:15 AM, Hans Hagen via ntg-context  
> wrote:
> On 12/6/2022 12:39 AM, Gavin via ntg-context wrote:
>> 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

I tried using \mathboxanchored, and was able to get the bottom two equations 
shown here. (The top equation uses \hpos, for comparison.)



mathboxanchored.pdf
Description: Adobe PDF document

There are two problems that I didn’t know how to fix.

1) The line connects to the box including the subscript or superscript, not 
just to the e.
2) I cannot make multiple connections to a single object, like the e^\mu in the 
center. If I try to connect top and bottom, I get no connections anywhere in 
the entire document.

The code for the formulas is:

\startformula
  % Each \connectboxanchors works alone, but both together make trouble:
\connectboxanchors[top][top]{X}{Y}
%\connectboxanchors[bottom][bottom]{Y}{Z}
  \mathboxanchored{X}{e}_\alpha \mathboxanchored{Y}{e}^\mu 
\mathboxanchored{Z}{e}_{\dot\beta}
= \textfrac{1}{\sqrt{2}}\sigma_{\alpha\dot\beta}^\mu
\stopformula

I added code to turn the arrow produced by \connectboxanchors into my 
contraction overlay, but that doesn’t affect these issues.

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

Yes, we only need to anchor to e. 

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


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
___


[NTG-context] \hpos in math

2022-12-05 Thread Gavin via ntg-context
Hello List,

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



hposQuestion.pdf
Description: Adobe PDF document


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.

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?

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.

Thanks!
Gavin

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] 



hposQuestion.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] Spacing in \unit

2022-09-25 Thread Bruce Horrocks via ntg-context


> On 25 Sep 2022, at 14:30, Gavin via ntg-context  wrote:
> 
> Hello list,
> 
> I have a few questions about space produced by the unit command. Consider 
> this MWE
> 
> \starttext
> \unit{3.00e8 kg m/s}
> 
> $\unit{3.00e8 kg m/s}$
> \stoptext
> 
> The dot between “kg” and “m” has different spacing depending on whether the 
> \unit command is in text or math mode. I think that the tighter spacing in 
> the first one, in text, is correct.
> 
> I personally would also like less space around the \times. To me, the number 
> 3.00e8 should be typeset more like a single number, rather than like a 
> product of 3.00 and 10^8. I am probably in the minority here. If \unit and 
> \digit had an option for tighter spacing around the \times, I’d use it, but 
> the current output with more space is probably what most people expect and 
> want. Perhaps something like [scispace=tight].

I too would prefer less space around the times e.g. \starttext 3.00×10\high{8} 
\stoptext is fine (except for the 8 which is nicer in \unit).

—
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 in \unit

2022-09-25 Thread Gavin via ntg-context
Hi Hans,

I also just noticed that the space between the number and the unit is missing 
when I typeset with ConTeXt ver: 2022.09.11 20:44 LMTX fmt: 2022.9.25. This 
space was present in with the ConTeXt version I was using earlier, from a 
couple months ago. Thanks for putting it on the math todo list!

Gavin

(I sent the above message to Hans, but failed to cc the mailing list. Sorry if 
some of you get this twice.)

> On Sep 25, 2022, at 9:19 AM, Hans Hagen  wrote:
> 
> On 9/25/2022 3:30 PM, Gavin via ntg-context wrote:
>> Hello list,
>> I have a few questions about space produced by the unit command. Consider 
>> this MWE
>> \starttext
>> \unit{3.00e8 kg m/s}
>> $\unit{3.00e8 kg m/s}$
>> \stoptext
>> The dot between “kg” and “m” has different spacing depending on whether the 
>> \unit command is in text or math mode. I think that the tighter spacing in 
>> the first one, in text, is correct.
>> I personally would also like less space around the \times. To me, the number 
>> 3.00e8 should be typeset more like a single number, rather than like a 
>> product of 3.00 and 10^8. I am probably in the minority here. If \unit and 
>> \digit had an option for tighter spacing around the \times, I’d use it, but 
>> the current output with more space is probably what most people expect and 
>> want. Perhaps something like [scispace=tight].
> 
> that's for the math todo
> 
>> Finally, \unit does not play nicely with surrounding spaces. For example:
>> $2\pi\,\unit{3.00e8 kg m/s}$
>> causes a fatal error:
>> tex error   > tex error on line 9 in file ./Untitled.tex: Incompatible 
>> glue units (case 1)
> that's an interesting case for the engine (Mixing regular and mu skips and 
> so) ... we mighth finaly have a valid case for a primitive zero test
> 
> 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 in \unit

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

On 9/25/2022 3:30 PM, Gavin via ntg-context wrote:

Hello list,

I have a few questions about space produced by the unit command. Consider this 
MWE

\starttext
\unit{3.00e8 kg m/s}

$\unit{3.00e8 kg m/s}$
\stoptext

The dot between “kg” and “m” has different spacing depending on whether the 
\unit command is in text or math mode. I think that the tighter spacing in the 
first one, in text, is correct.

I personally would also like less space around the \times. To me, the number 
3.00e8 should be typeset more like a single number, rather than like a product 
of 3.00 and 10^8. I am probably in the minority here. If \unit and \digit had 
an option for tighter spacing around the \times, I’d use it, but the current 
output with more space is probably what most people expect and want. Perhaps 
something like [scispace=tight].


that's for the math todo


Finally, \unit does not play nicely with surrounding spaces. For example:

 $2\pi\,\unit{3.00e8 kg m/s}$

causes a fatal error:

tex error   > tex error on line 9 in file ./Untitled.tex: Incompatible glue 
units (case 1)
that's an interesting case for the engine (Mixing regular and mu skips 
and so) ... we mighth finaly have a valid case for a primitive zero test


Hans

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

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


[NTG-context] Spacing in \unit

2022-09-25 Thread Gavin via ntg-context
Hello list,

I have a few questions about space produced by the unit command. Consider this 
MWE

\starttext
\unit{3.00e8 kg m/s}

$\unit{3.00e8 kg m/s}$
\stoptext

The dot between “kg” and “m” has different spacing depending on whether the 
\unit command is in text or math mode. I think that the tighter spacing in the 
first one, in text, is correct.

I personally would also like less space around the \times. To me, the number 
3.00e8 should be typeset more like a single number, rather than like a product 
of 3.00 and 10^8. I am probably in the minority here. If \unit and \digit had 
an option for tighter spacing around the \times, I’d use it, but the current 
output with more space is probably what most people expect and want. Perhaps 
something like [scispace=tight].

Finally, \unit does not play nicely with surrounding spaces. For example:

$2\pi\,\unit{3.00e8 kg m/s}$

causes a fatal error:

tex error   > tex error on line 9 in file ./Untitled.tex: Incompatible glue 
units (case 1)

 \phys_units_direct 
#1->\begingroup \the \everyunits \ifdim \lastskip 
>\zeropoint \settrue \c_phys_units_dospace \removelastskip \fi 
\c_phys_digits_method \unitparameter \c!method \relax \ifmmode \else 
\dontleavehmode \fi \edef \currentunit {#1}\always\edef \unitlanguag
 
$2\pi\,\unit
{3.00e8 kg m/s}$

Using \thinspace produces the same fatal error.

Putting the 2\pi after the \unit{…} can also cause surprises.

$\unit{3.00e8 kg m/s}\times 2\pi$

produces a \times that is right up against the “s”.

I am very happy with all of the work done on spacing in math. I hope that my 
observations above are helpful in fine-tuning the excellent system.

Thanks!
Gavin

P.S. I am on as M1 Mac, using ConTeXt  ver: 2022.09.11 20:44 LMTX  fmt: 
2022.9.25  int: english/english.
___
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] Graphviz and ConTeXt

2022-06-23 Thread Taco Hoekwater via ntg-context
Hi,

You could just convert these separately to pdf/svg/jpg/png and then load them 
as \externalfigure. 

You could also use the filter module to be able to take them inline into the 
ConTeXt code:


\usemodule[filter]

\define[1]\ReadFigure{\externalfigure[#1]}

\defineexternalfilter[graphviz]
  [cache=yes,
   readcommand=\ReadFigure,
   output={\externalfilterbasefile.pdf},
   filtercommand={dot -Tpdf -o "\externalfilterbasefile.pdf" 
"\externalfilterinputfile"}]
  
\starttext
\startTEXpage
\startgraphviz
digraph G {
main -> parse -> execute;
main -> init;
main -> cleanup;
execute -> make_string;
execute -> printf
init -> make_string;
main -> printf;
execute -> compare;
}
\stopgraphviz
\stopTEXpage
\stoptext


See the filter module documentation for more details about that.

Best wishes,
Taco

> On 23 Jun 2022, at 14:08, juh via ntg-context  wrote:
> 
> Dear all,
> 
> I have a legacy project that I shall convert to a new ConTeXt project. 
> 
> There are a lot of Graphviz dot-files. What shall I do with these? 
> 
> Any hints?
> juh
> -- 
> Autoren-Homepage: . http://literatur.hasecke.com
> Satiren & Essays: . http://www.sudelbuch.de
> Privater Blog:  http://www.hasecke.eu
> Netzliteratur-Projekt:  http://www.generationenprojekt.de
> 
> 
> ___
> 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
> ___

— 
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 / 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] Graphviz and ConTeXt

2022-06-23 Thread juh via ntg-context
Dear all,

I have a legacy project that I shall convert to a new ConTeXt project. 

There are a lot of Graphviz dot-files. What shall I do with these? 

Any hints?
juh
-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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

2021-12-01 Thread Hans Hagen via ntg-context

On 12/1/2021 9:49 AM, denis.ma...@unibe.ch wrote:

Thank you, Hans!

I don't understand 2, 3, and 4, but I can wikify 1. Just two question: What 
exactly are the limitations? And what is meant by horizontal registers?


% this is a variant of an example on the mailing list

\mainlanguage[es]

\setupbodyfont[dejavu]

\defineregister
  [Russian]
  [n=1,
   command=\Words,
   pagenumber=no,
   language=ru,
   textalternative=horizontal,
   distance=0pt]

\setupregister [Russian] [2] [textstyle=bold,left={, }]
\setupregister [Russian] [3] [textstyle=italic,left={, }]

% word category meaning

\setregisterentry [Russian] [entries:1={исчисление},  entries:2={n. 
neutr.},  entries:3={cálculo}]
\setregisterentry [Russian] [entries:1={исчисление},  entries:2={n. 
neutr.},  entries:3={cálculo}]
\setregisterentry [Russian] [entries:1={вероятность}, entries:2={n. 
fem.},entries:3={probabilidad}]
\setregisterentry [Russian] [entries:1={обозначать},  entries:2={v.}, 
  entries:3={denotar}]
\setregisterentry [Russian] [entries:1={область}, entries:2={n. 
fem}, entries:3={región, área}]
\setregisterentry [Russian] [entries:1={событие}, entries:2={n. 
neutr.},  entries:3={evento}]
\setregisterentry [Russian] [entries:1={определение}, entries:2={n. 
neutr.},  entries:3={definición}]
\setregisterentry [Russian] [entries:1={знание},  entries:2={n. 
neutr,},  entries:3={conocimiento}]
\setregisterentry [Russian] [entries:1={бесконечно},  entries:2={adv.}, 
  entries:3={infinitamente}]
\setregisterentry [Russian] [entries:1={сборник}, entries:2={n. 
masc.},   entries:3={colección, compilación, compendio}]
\setregisterentry [Russian] [entries:1={неравенство}, entries:2={n. 
neutr.},  entries:3={desigualdad}]


\starttext

\starttitle[title=Ruso-español]
\placeRussian
\stoptitle

\stoptext



Regarding the implementation: I've just tried it, and I wondered whether the 
stacking of bars should not happen the other way round. As in
\underbar{\underdot{asdf}}
I would have expected the bar to be below the dot. But maybe that's wrong 
expectations...
that would become rather messy and hard to analyze (this is already a 
runtime consuming feature) and never be consistent, think of


\underbar{%
\underdot{}
x
\underdot{}%
}



-
  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] new upload

2021-12-01 Thread Denis Maier via ntg-context
Thank you, Hans! 

I don't understand 2, 3, and 4, but I can wikify 1. Just two question: What 
exactly are the limitations? And what is meant by horizontal registers?

Regarding the implementation: I've just tried it, and I wondered whether the 
stacking of bars should not happen the other way round. As in 
\underbar{\underdot{asdf}}
I would have expected the bar to be below the dot. But maybe that's wrong 
expectations...

Denis




> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Dienstag, 30. November 2021 19:56
> An: mailing list for ConTeXt users 
> Cc: Hans Hagen 
> Betreff: [NTG-context] new upload
> 
> Hi,
> 
> (1) See previous mails on the list (those who requested it have to wikify):
> 
> - mixed bars (with limitations)
> - horizontal registers (flushing)
> 
> (2) As a side effect of reshuffling some code (as well as being complete):
> 
> - \boxshift 0 = 10pt
> - hbox shift -10pt{...}
> 
> These box shifts are what \moveleft, \raise etc use as well as some internal
> constructors like math.
> 
> (3) Because there is no reason for a limitation to rules and boxes we can now
> also do:
> 
> - x\cleaders \glyph`! \hfill x
> 
> where as usual \glyph taking some options.
> 
> (4) A few internals that users are unlikely to encounter (unless they mess
> with weird tokens in lua).
> 
> Hopefully no bad side effects of all this (and if so, easy to solve).
> 
> 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
> __
> _
___
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] ConTeXt inserts additional dots for Iosevka font

2021-09-11 Thread Marcel Fabian Krüger via ntg-context
Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:
> >  \definefontfeature
> >[default:test]
> >[default]
> >[cv36=2,cv26=6]
> 
> What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.

> 
> >  \definefont
> >[SomeFont]
> >[name:iosevka*default:test]
> >      \starttext
> >  \SomeFont
> >  I live in a dot-heavy world.
> >  \stoptext
> > 
> > has six dots instead of one dot over each "i". Tests with multiple other
> > font shapers and inspection of the font file confirmed that this is not
> > intentional behavior.
> > 
> > Could you take a look at that?
> > (Based on a luotfload bug report at
> > https://github.com/latex3/luaotfload/issues/202)
> when a number is specified for a multiple and the is > 1 we repeat the last
> glyph ... this is a 'secret' feature that (already a while ago) we added
> when discussing / testing a experimental arabic font in combination with a
> paragraph optimizer ... normally users will say 'yes' and not give a number

Thanks, this explains a lot. In this font it's problematic though
because the cv.. features have multiple loopup tables, one of which is a
"multiple" lookup (used to decompose characters before applying the
replacements, especially decomposing i into the stem and the dot)
and another one is an "alternate" lookup providing multiple character
variants.
So selecting one of the other alternates requires that a number is
passed, but passing the number enables the repetition in the multiple
lookup...

> 
> i can make that a 'context only' feature if needed

That would certainly solve the issue for me, but it might be nice to
provide a solution for context users too. Maybe the feature could be
adapted to only interpret the argument as a replication factor if the
"multiple" is the only lookup for the feature or if no other lookup
for the feature is an alternate lookup?

Best,
Marcel
___
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] ConTeXt inserts additional dots for Iosevka font

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

On 9/11/2021 10:36 PM, Marcel Fabian Krüger via ntg-context wrote:

Hi,

ConTeXt has some issues with the character variant features of the
Iosevka font available at
https://github.com/be5invis/Iosevka/releases/download/v10.1.1/super-ttc-iosevka-10.1.1.zip

E.g. the following document

 \definefontfeature
   [default:test]
   [default]
   [cv36=2,cv26=6]


What is the number supposed to indicate ? It is not an alternate, right?


 \definefont
   [SomeFont]
   [name:iosevka*default:test]
 \starttext
 \SomeFont
 I live in a dot-heavy world.
 \stoptext

has six dots instead of one dot over each "i". Tests with multiple other
font shapers and inspection of the font file confirmed that this is not
intentional behavior.

Could you take a look at that?
(Based on a luotfload bug report at
https://github.com/latex3/luaotfload/issues/202)
when a number is specified for a multiple and the is > 1 we repeat the 
last glyph ... this is a 'secret' feature that (already a while ago) we 
added when discussing / testing a experimental arabic font in 
combination with a paragraph optimizer ... normally users will say 'yes' 
and not give a number


i can make that a 'context only' feature if needed

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] ConTeXt inserts additional dots for Iosevka font

2021-09-11 Thread Marcel Fabian Krüger via ntg-context
Hi,

ConTeXt has some issues with the character variant features of the
Iosevka font available at
https://github.com/be5invis/Iosevka/releases/download/v10.1.1/super-ttc-iosevka-10.1.1.zip

E.g. the following document

\definefontfeature
  [default:test]
  [default]
  [cv36=2,cv26=6]
\definefont
  [SomeFont]
  [name:iosevka*default:test]
\starttext
\SomeFont
I live in a dot-heavy world.
\stoptext

has six dots instead of one dot over each "i". Tests with multiple other
font shapers and inspection of the font file confirmed that this is not
intentional behavior.

Could you take a look at that?
(Based on a luotfload bug report at
https://github.com/latex3/luaotfload/issues/202)

Best regards,
Marcel
___
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] Unicode normalization and Hebrew in ConTeXt

2021-08-16 Thread Joey McCollum via ntg-context
Hans,

Sorry to bring this up after over a year, but I just noticed something that
doesn't seem right. I implemented some contextual substitutions in my own
fork of the Keter YG Hebrew font (.ttf file attached) under the "dlig"
feature that should do the following two things:

   1. If a *shin *with a *sin *dot (שׂ) is pointed with a *holam *(the
   vowel point placed high and on the left), then the *shin*, *sin *dot,
   and *holam *are combined into a single ligature that depicts the *sin *dot
   and *holam *merged into a single point.
   2. If a *shin *with a *shin *dot (שׁ) follows another letter pointed
   with a *holam *(except for *vav*, which must be pointed with a *holam
   haser*), then the shin and shin dot are replaced with a ligature that
   moves the *shin* dot a bit to the right (so that it appears to be merged
   with the preceding *holam*), and the combination of the preceding letter
   and the actual holam is changed to just the preceding letter (thus
   effectively stripping the old *holam*).

I've tested both of these features in FontForge, and they work as expected
there. Likewise, if I test them in the following XeLaTeX script, XeLaTeX
handles both rules correctly:

```
\documentclass{article}
%Set fonts and font features:
\usepackage{fontspec}
\setmainfont[Path=../fonts/KeterYG/, UprightFont = *-Medium, Script=Hebrew,
Ligatures=Discretionary]{KeterYG} % I'm using a local copy of the attached
font
\begin{document}
שֹׂבַע

עָשׂוֹר

קֹשֶׁט

שֹׁשַׁנִּים

עָשׂוֹר

מֹשֶׁה

שַׁלֹשׁ
\end{document}
```

But in ConTeXt, only rule (1) above works as expected. Here is a minimal
(non-)working example:

```

\starttypescriptcollection[keteryg]

\starttypescript[serif][keteryg]

\definefontsynonym[Serif][file:../fonts/KeterYG/KeterYG-Medium.ttf][features=hebrew]
% use a local copy of the attached font, with all the necessary Hebrew
features (this includes dlig by default)

\stoptypescript


\starttypescript[keteryg]

\definetypeface[keteryg][rm][serif][keteryg][default]

\stoptypescript

\stoptypescriptcollection


%Set up the main font:

\setupbodyfont[keteryg]

%Set up right-to-left alignment:

\setupalign[r2l]

\starttext

שֹׂבַע

עָשׂוֹר

קֹשֶׁט

שֹׁשַׁנִּים

עָשׂוֹר

מֹשֶׁה

שַׁלֹשׁ

\stoptext
```

In examples 3, 4, 6, and 7, the *holam *dot still appears before the *shin*
-with-merged-*shin*-dot-and-*holam *ligature, when it should be absent. (I
realize that it may be difficult to tell; in the last two examples, the
presence of two dots is easier to make out.)

Do you have any idea why this might be happening in ConTeXt? Does the glyph
reordering in font-imp-combining.lua take place before any OpenType
features in the font are applied?

Thanks again!

Joey

On Thu, Apr 30, 2020 at 4:17 PM Joey McCollum 
wrote:

> Okay! I have not figured out how to add a new page to the wiki, but I was
> able to add a section to the end of the "Arabic and Hebrew" page (
> https://www.contextgarden.net/Arabic_and_Hebrew) discussing the issue,
> providing a test, and briefly describing the fix.
>
> Joey
>
> On Thu, Apr 30, 2020 at 11:14 AM Hans Hagen  wrote:
>
>> On 4/30/2020 4:28 PM, Joey McCollum wrote:
>> > Thanks so much, Hans! I should be able to add a wiki page summarizing
>> > the tests before the end of the week.
>> >
>> > For reference purposes, do you know which version of ConTeXt has (or
>> > will have) this update included?
>> todays upload
>>
>>
>> -
>>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] Question about \groupedcommand{}{}

2021-07-28 Thread Fabrice Couvreur via ntg-context
Hi Wolfgang,
Thank you for this nice solution.
Fabrice

Le mar. 27 juil. 2021 à 21:31, Wolfgang Schuster via ntg-context <
ntg-context@ntg.nl> a écrit :

> Fabrice Couvreur via ntg-context schrieb am 27.07.2021 um 18:57:
> > Hi,
> > The name of the environment must always end with a dot both with a title
> > and without title. How to do ?
> > Thanks
> > Fabrice
> >
> > [...]
>
>
> You can create simple dummy environments to test the parameters.
>
> \defineenumeration
>[grouptest]
>[title=yes,
>  text={dummy text},
> titleleft=,
>titleright=,
>   headcommand=\groupedcommand{[}{]},
> numbercommand=\groupedcommand{(}{)},
>  titlecommand=\groupedcommand{<}{>}]
>
> \starttext
>
> \startgrouptest [title={dummy title}]
> \unknown
> \stopgrouptest
>
> \startgrouptest
> \unknown
> \stopgrouptest
>
> \blank[2*line]
>
> \setupenumeration
>[grouptest]
>[number=no]
>
> \startgrouptest [title={dummy title}]
> \unknown
> \stopgrouptest
>
> \startgrouptest
> \unknown
> \stopgrouptest
>
> \stoptext
>
> Wolfgang
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Question about \groupedcommand{}{}

2021-07-27 Thread Wolfgang Schuster via ntg-context

Fabrice Couvreur via ntg-context schrieb am 27.07.2021 um 18:57:

Hi,
The name of the environment must always end with a dot both with a title 
and without title. How to do ?

Thanks
Fabrice

[...]



You can create simple dummy environments to test the parameters.

\defineenumeration
  [grouptest]
  [title=yes,
text={dummy text},
   titleleft=,
  titleright=,
 headcommand=\groupedcommand{[}{]},
   numbercommand=\groupedcommand{(}{)},
titlecommand=\groupedcommand{<}{>}]

\starttext

\startgrouptest [title={dummy title}]
\unknown
\stopgrouptest

\startgrouptest
\unknown
\stopgrouptest

\blank[2*line]

\setupenumeration
  [grouptest]
  [number=no]

\startgrouptest [title={dummy title}]
\unknown
\stopgrouptest

\startgrouptest
\unknown
\stopgrouptest

\stoptext

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

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


[NTG-context] Question about \groupedcommand{}{}

2021-07-27 Thread Fabrice Couvreur via ntg-context
Hi,
The name of the environment must always end with a dot both with a title
and without title. How to do ?
Thanks
Fabrice

\setupenumerations
  [before={\blank},
   after={\blank},
   alternative=serried,
   title=yes,
   titleleft={(},
   titleright={)},
   titlestyle=normal,
   titlecommand=\groupedcommand{}{\bf.},
   width=broad]

\defineenumeration
   [definition]
   [text=Définition,
number=no,
headcommand=\groupedcommand{}{},
style=italic]

\starttext
\startdefinition{With a title}
\samplefile{lorem}
\stopdefinition
Without title but no dot after the name of the environment.
\startdefinition
\samplefile{lorem}
\stopdefinition
\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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-01 Thread Nicola
-mpost,\
texosquery-jre8,\

% we'd like to allow:
% dvips - but external commands can be executed, need at least -R1.
% epspdf, ps2pdf, pstopdf - need to respect openout_any,
%   and gs -dSAFER must be used and check for shell injection with filenames.
% pygmentize - but is the filter feature insecure?
% ps4pdf - but it calls an unrestricted latex.
% rpdfcrop - maybe ok, but let's get experience with repstopdf first.
% texindy,xindy - but is the module feature insecure?
% ulqda - but requires optional SHA1.pm, so why bother.
% tex, latex, etc. - need to forbid --shell-escape, and inherit openout_any.

% plain "tex" should remain unenhanced.
shell_escape.tex = f
shell_escape.initex = f

% This is used by the Windows script wrapper for restricting searching
% for the purportedly safe shell_escape_commands above to system
% directories.
TEXMF_RESTRICTED_SCRIPTS = \
  {!!$TEXMFLOCAL,!!$TEXMFDIST}/scripts/{$progname,$engine,}//

% Do we allow TeX \input or \openin (openin_any), or \openout
% (openout_any) on filenames starting with `.' (e.g., .rhosts) or
% outside the current tree (e.g., /etc/passwd)?
% a (any): any file can be opened.
% r (restricted) : disallow opening dot files
% p (paranoid)   : as `r' and disallow going to parent directories, and
%  restrict absolute paths to be under $TEXMFOUTPUT.
openin_any = a
openout_any = p

% Write .log/.dvi/.aux/etc. files here, if the current directory is unwritable.
%TEXMFOUTPUT = /tmp

% If a dynamic file creation fails, log the command to this file, in
% either the current directory or TEXMFOUTPUT.  Set to the
% empty string or  0  to avoid logging.
MISSFONT_LOG = missfont.log

% Set to a colon-separated list of words specifying warnings to suppress.
% To suppress everything, use TEX_HUSH = all; this is currently equivalent to
% TEX_HUSH = checksum:lostchar:readable:special
% To suppress nothing, use TEX_HUSH = none or do not set the variable at all.
TEX_HUSH = none

% Allow TeX and MF to parse the first line of an input file for
% the % construct.
parse_first_line = t

% But don't parse the first line if invoked as "tex", since we want that
% to remain Knuth-compatible.  The src_specials and
% file_line_error_style settings, as well as the options -enctex,
% -mltex, -8bit, etc., also affect this, but they are all off by default.
parse_first_line.tex = f
parse_first_line.initex = f

% Normally we mention files created by \openout in the log file,
% but again, trip-compatibility forbids this for (ini)tex.
log_openout = t
log_openout.tex = f
log_openout.initex = f

% Control file:line:error style messages.
file_line_error_style = f

% Enable the mktex... scripts by default?  These must be set to 0 or 1.
% Particular programs can and do override these settings, for example
% dvips's -M option.  Your first chance to specify whether the scripts
% are invoked by default is at configure time.
%
% These values are ignored if the script names are changed; e.g., if you
% set DVIPSMAKEPK to `foo', what counts is the value of the environment
% variable/config value `FOO', not the `MKTEXPK' value.
%
%MKTEXTEX = 0
%MKTEXPK = 0
%MKTEXMF = 0
%MKTEXTFM = 0
%MKTEXFMT = 0
%MKOCP = 0
%MKOFM = 0

% Used by makempx to run TeX.  We use "etex" because MetaPost is
% expecting DVI, and not "tex" because we want first line parsing.
TEX = etex

% Use Japanese eptex for Japanese pmpost.
TEX.pmpost = eptex

% These variables specify the external program called for the
% interactive `e' option.  %d is replaced by the line number and %s by
% the current filename.  The default is specified at compile-time, and
% we let that stay in place since different platforms like different values.
%TEXEDIT = vi +%d '%s'% default for Unix
%TEXEDIT = texworks --position=+%d "%s"   % default for Windows
%MFEDIT = ${TEXEDIT}
%MPEDIT = ${TEXEDIT}

% The default `codepage and sort order' file for BibTeX8, when none is
% given as command line option or environment variable.
BIBTEX_CSFILE = 88591lat.csf

% This variable is specific to Unix, to fall back to case-insensitive
% search in non-system directories if there is no exact match. It is
% enabled by default in texmf.cnf, but not enabled by default at
% compile-time.
%
texmf_casefold_search = 1

% This variable is specific to Windows.  It must be set to 0 or 1.  The
% default is 0.  Setting it to 1 tells the Windows script wrappers to
% use an already installed Perl interpreter if one is found on the
% search path, in preference to the Perl shipped with TeX Live.  Thus,
% it may be useful if you both (a) installed a full Perl distribution
% for general use, and (b) need to run Perl programs from TL that use
% additional modules we don't provide.  The TL Perl does provide all the
% standard Perl modules.
%
%TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 0


% 
   Part 3: Array and other sizes for TeX, Metafont, etc.
%
% If you want to change some of these sizes only for a certain

Re: [NTG-context] Hyphenation patterns

2021-04-09 Thread Arthur Rosendahl
  Denis’ latest question reminded me of an earlier query he had about
hyphenation, asking why “applicable” and “obligated” were hyphenated by
ConTeXt as ap-plic-a-ble and ob-lig-at-ed, and not ap-pli-ca-ble and
ob-li-ga-te(d) like in Merriam-Webster (the discussion started at
https://mailman.ntg.nl/pipermail/ntg-context/2020/099695.html).

  First of all, I note that while Webster’s dictionary is a useful
guide, and indeed a major reference for any American typographer,
there’s no absolute rule that we have to follow it either.  The break
applic-able, for example, does look acceptable to me; oblig-ated, less
so.

  Taco reminded that when producing a set of hyphenation patterns from a
list of hyphenated words, we’re essentially compressing information, and
that some minor deviations are to be expected.  However, in my
experience, unexpected breakpoints are almost never due to chance, but
to a deliberate decision.

  Then Hraban said that:

On Fri, Oct 09, 2020 at 10:15:17AM +0200, Henning Hraban Ramm wrote:
> Usually Arthur’s (hail the emperor of hyphenation and protector of the 
> patterns) patterns are flawless, so I guess it’s not a bug but an exception 
> of the rules.

  I see that my self-appointed title is catching on, nice :-)
Unfortunately the patterns are just as likely to contain errors as
anything else, and in this particular case we’ll probably never know for
sure, because the original hyphenated word list was never published (all
the word lists from which patterns were produced in the 80s and 90s have
been lost, for all languages).  We’re thus reduced to guessing the
intent of those who compiled the lists.

  We can get hints from looking at the patterns involved in the
debatable breaks.  Hans has a useful script:

$ mtxrun --script patterns --language=us --left=2 --right=2 --hyphenate 
applicable
hyphenator  |
hyphenator  | . a p p l i c a b l e .   . a p p l i c a b l e .  
hyphenator  |4p1p0   0 4 1 0 0 0 0 0 0 0 0  
hyphenator  |  1p2l2 0 4 1 2 2 0 0 0 0 0 0  
hyphenator  |  0p0l0i2c1a0b0 0 4 1 2 2 2 1 0 0 0 0  
hyphenator  |1c0a0   0 4 1 2 2 2 1 0 0 0 0  
hyphenator  |0c0a1b0l0   0 4 1 2 2 2 1 1 0 0 0  
hyphenator  |0b2l2   0 4 1 2 2 2 1 1 2 2 0  
hyphenator  |0b4l0e0.0   0 4 1 2 2 2 1 1 4 2 0  
hyphenator  | .0a4p1p2l2i2c1a1b4l2e0.   . a p-p l i c-a-b l e .  
hyphenator  |
mtx-patterns| us 2 2 : applicable : ap-plic-a-ble

  That tells us that there are seven patterns involved in hyphenating
the word applicable: 4p1, 1p2l2, pli2c1ab, 1ca, ca1bl, b2l2, and b4le.
(the final dot is part of that last pattern).  The pattern responsible
for the break applic-able is pli2c1ab.  If we now refer to the source
repository for hyphenation patterns (since comments are stripped in the
ConTeXt sources): 
https://github.com/hyphenation/tex-hyphen/blob/master/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex
-- we can see line 4508

hyphen.tex patterns end here, and additional patterns begin:

which means that the pattern pli2c1ab, line 4817, is an “additional
pattern”.  The background story is that hyphen.tex, the original
hyphenation pattern file for American English, produced in 1982-1983
from a list of hyphenated words (following mostly Webster’s), was later
augmented with more patterns that were supposed to improve hyphenation
for many words.  The person who added these new patterns apparently had
a list of words hyphenated incorrectly (according to him) by hyphen.tex,
but both that list and the one used to produce hyphen.tex are as
mentioned above now lost, probably forever.

  In any case, the pattern that causes the break applic-able was clearly
added intentionally; and as I said that break seems quite reasonable to
me.  Not so for the one in oblig-ated, so let’s have a look at that:

$ mtxrun --script patterns --language=us --left=2 --right=2 --hyphenate 
obligated
hyphenator  |
hyphenator  | . o b l i g a t e d .   . o b l i g a t e d .  
hyphenator  |  0o0b0l0i2g1 0 0 0 0 2 1 0 0 0 0  
hyphenator  |0b2l2 0 0 2 2 2 1 0 0 0 0  
hyphenator  |  5l0i0g0a0t0e0   0 0 5 2 2 1 0 0 0 0  
hyphenator  |2i0g0 0 0 5 2 2 1 0 0 0 0  
hyphenator  |  1g0a0   0 0 5 2 2 1 0 0 0 0  
hyphenator  |  2t1e0d0 0 0 5 2 2 1 2 1 0 0  
hyphenator  | .0o0b5l2i2g1a2t1e0d0.   . o b-l i g-a t-e d .  
hyphenator  |
mtx-patterns| us 2 2 : obligated : ob-lig-at-ed

  Here we see that the dubious break is caused by the pattern obli2g1,
also an “additional pattern” (line 4783), and here it’s not hard to
gu

Re: [NTG-context] composing commands

2021-02-08 Thread Richard Mahoney
Hans,

For me, at least, having these covered would be useful:

   acute á
   double acute ő
   grave à
   double grave ȍ
   circumflex â
   circumflex below ḙ
   diaeresis ä
   tilde ã
   tilde below ḭ
   macron ā
   line below ḵ
   cedilla ç
   comma below ş
   hook ȥ
   ring above å
   ring below ḁ
   dot above ṁ
   middle dot ŀ
   dot below ṃ
   breve ă
   inverted breve ȃ
   caron ǩ
   stroke ø



Best, Richard  





-Original Message-
From: Hans Hagen 
Reply-To: mailing list for ConTeXt users 
To: mailing list for ConTeXt users , T. Kurt Bond

Cc: Thomas A. Schmitz 
Subject: Re: [NTG-context] composing commands
Date: Mon, 8 Feb 2021 10:53:01 +0100
Mailer: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0)
Gecko/20100101
 Thunderbird/78.7.1
X-Spam-Score: 0.0

On 2/6/2021 11:41 PM, T. Kurt Bond wrote:
> I think that it would be useful.  I use Unicode characters
> extensively in my ConTeXt input, but only because I edit it in Emacs
> and can set up keymaps that map to the Unicode characters in a way
> that I can actually remember.  I think that this would add an easily
> remembered way for people to add combining characters to their
> documents.  Sometimes a slightly more verbose way to do something is
> helpful when it is more easily remembered.  (Honestly, I can't
> remember the hex codes for any Unicode characters after you get out
> of the range that maps to plain ASCII
I anyway uprgade this mechanism. First of all, the short commands will
be equivalents to more verbose ones.
\withgrave   {a} == \\`{a}\withacute   {a} ==
\\'{a}\withcircumflex  {a} == \\^{a}\withtilde   {a} ==
\\~{a}\withmacron  {a} == \\={a}\withbreve   {e} ==
\\u{e}\withdot {c} == \\.{c}\withdieresis{e} ==
\\"{e}\withring{u} == \\r{u}\withhungarumlaut{u} ==
\\H{u}\withcaron   {e} == \\v{e}\withcedilla {e} ==
\\c{e}\withogonek  {e} == \\k{e}
Did I miss one?
Then we can deprecate the short ones (keep them a low profile, with
permission to overload). After all, I don't expect someone who needs
lots of them to use these commands, so more verbose is better then.
Aas I already mentioned, in bib files they are treated differently
already.
The low level helper is \chr, that can be used as
\chr {à} \chr {á} \chr {ä}\chr {`a} \chr {'a} \chr {"a}\chr {a
acute} \chr {a grave} \chr {a umlaut}\chr {aacute}  \chr
{agrave}  \chr {aumlaut}
(I can add more of the verbose, like {cyrillic a} if really needed. It
means that we can declare \eacute etc also depricated (these verbose
names date from \MKII, encoding neutral labels, utf handling,
remapping to backend encodings etc but we don't need that and I'm not
sure if anyone ever used those long names. Again, depricated, not
removed (yet).)
Then there is the question what to do with \AE and \ij and such ...
these were used to enforce specific ligatures into a file assuming
that f ont has them but nowadays that's the job of a font handler
(script language control). We can keep them but assume them legacy.
They normally don't belong in input. (Being Dutch I actually never
used \IJ or \ij).
Now, we can assume that when your languages needs characters with
accents that you use a font that has them. In MKIV and LMTX one
canenable a checker
\enabletrackers[fonts.missing]\enabletrackers[fonts.missing=replace]\e
nabletrackers[fonts.missing=remove]
but in LMTX it's upgraded with more clever replacements (Jano will
document that + more about checking missing stuff in the wiki).
So, in LMTX we have more options (maybe I'll backport that to MKIV)
\checkmissingcharacters   \enabletrackers[fonts.missing]\removemissing
characters  \enabletrackers[fonts.missing=remove]\replacemissingcharac
ters
\enabletrackers[fonts.missing=replace]\handlemissingcharacters  \enabl
etrackers[fonts.missing={decompose,replace}]
the last one will inject decomposed characters into the list when font
lacks the real thing. The replacements visualize similar to MKIV but
adapt to the style.
Hans
(no upload yet)
---
--   Hans Hagen | PRAGMA
ADE   Ridderstraat 27 | 8061 GH Hasselt | The
Netherlandstel: 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
__
_
-- 
T +6433121699  M +642106402

[NTG-context] Minor issue with font kern amount being doubled

2020-12-31 Thread Joseph
Dear list, Rare cases only but I thought it’d worth reporting this difference I could not understand.Could reproduce this problem with a simple MWE below. Kerning between ‘v’ and dot is doubled if \feature macro is used. Thanks \definefontfeature[xvicentury][mode=node]\definefontfeature[default][default][kern=yes]\definefontfamily[mainfont][serif][EBGaramond]\setupbodyfont[mainfont, 9pt]\showfontkerns \starttextChapitre {\feature[-][xvicentury]v}. % double kerning between v and . compared to below line. Chapitre v.\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] upload / metafun

2020-12-15 Thread Otared Kavian
Hi Hans,

Thanks for the new upload. 
With your comments, I understand that, following the discussion with Aditya, 
when using the new version I should not define in Metafun a new function named
dotlabel
in order to have a square dot… Actually I called it mydotlabel in order to be 
able to change the shape of the dot, so I will be on the safe side when I can 
download the new version.

However after running install. sh on MacOS, I still get current version: 
2020.12.10 22:26, even after removing the .tma files.
So I guess I have to wait a little bit for the new version to be upoaded.

Best regards: Otared



> On 15 Dec 2020, at 10:35, Hans Hagen  wrote:
> 
> Hi,
> 
> I uploaded a new lmtx. This time some work has been done at the metafun end.
> 
> At the tex end we're working on some overload protection mechanism which 
> involves tagging many macro so that will take a while (most tagging is done 
> but checking left over cases take time).
> 
> So, I wondered if we can do something similar in metapost: flag macros and 
> variables in order to issue a warnings when a dangerous overload happens.
> 
> The current lmtx has this as an experiment: primitives, permanent, immutable 
> and mutable (so far); you can look at the *.mpxl files to get an idea. If you 
> say for instance
> 
>path fullcircle;
> 
> there will be a warning
> 
>   metapost> overloading immutable 'fullcircle'
> 
> or when
> 
>   \enabledirectives[metapost.overloadmode=error]
> 
> has been given you get an error.
> 
> The implementation is rather simple and non intrusive and differs from
> the one in tex. There it is tightly integrated for all kind of reasons 
> (millions of macro definitions per run so efficiency matters). Also, in 
> metapost variables (tags) can have complex name constructions and we only 
> test the top level. When a overload happens (overloadmode internal <> 0) a 
> lua callback takes care of it.
> 
> A side effect is that we can query all hash entries and check for consistency 
> which is what i've done and am doing now. Of course that can introduce issues 
> ... just that you know.
> 
> 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
> ___

___
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: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen

On 12/10/2020 8:37 PM, Aditya Mahajan wrote:

On Thu, 10 Dec 2020, Hans Hagen wrote:


dotlabel uses a pen to draw the dot, and I am not sure why it uses that rather
than a path. Here is a (to me) simpler definition, where you can change the
shape:


just look in the pdf ... in your case the dot is a n point path while otherwise
it uses the default postscript pen (which is a dot)


Ah, that makes sense.


it surprised me that a math guru like you doesn't do this:

vardef dotlabel@#(expr s,z) text t_ =
% draw textext("$\bullet$") scaled (1/2) shifted z ;
% draw textext("$\blacktriangle$") scaled (1/4) shifted z ;
 draw textext("$\blacksquare$") scaled (1/4) shifted z ;
 label@#(s,z) t_ ;
enddef ;
\stopMPdefinitions


Ha! I know that you said this as a joke, but as someone who did try to use the old 
font-based picture environment in LaTeX back in the day, I would never try to use fonts 
for "drawing". Especially, math fonts, where every designer has a different 
idea of what the shape should look like.

ah pictex memories ... drawing lines with cmr5 periods ...

but actually, we can define a stable font with symbols in metafun and 
use that (quite efficient too) and then one can even cut'n'paste those 
tiny symbols (don't worry ... not much of a challenge so low on my list)


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] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Hans Hagen wrote:

> > dotlabel uses a pen to draw the dot, and I am not sure why it uses that 
> > rather
> > than a path. Here is a (to me) simpler definition, where you can change the
> > shape:
> 
> just look in the pdf ... in your case the dot is a n point path while 
> otherwise
> it uses the default postscript pen (which is a dot)

Ah, that makes sense. 

> it surprised me that a math guru like you doesn't do this:
> 
> vardef dotlabel@#(expr s,z) text t_ =
> % draw textext("$\bullet$") scaled (1/2) shifted z ;
> % draw textext("$\blacktriangle$") scaled (1/4) shifted z ;
> draw textext("$\blacksquare$") scaled (1/4) shifted z ;
> label@#(s,z) t_ ;
> enddef ;
> \stopMPdefinitions

Ha! I know that you said this as a joke, but as someone who did try to use the 
old font-based picture environment in LaTeX back in the day, I would never try 
to use fonts for "drawing". Especially, math fonts, where every designer has a 
different idea of what the shape should look like. 

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

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


Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen

On 12/10/2020 6:44 PM, Aditya Mahajan wrote:

On Thu, 10 Dec 2020, Otared Kavian wrote:


Hi all,

In Metafun when representing a point I woul dlike to have some dots represented 
by a square (or even by another scalable symbol): for instance in the following 
I would like the dot at the point B to be a square:

\starttext
\startMPcode
draw (2cm,3cm) -- (3cm,5cm) ;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm))
withpen pencircle scaled 12pt
withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm))
withpen pencircle scaled 12pt
withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

I wonder whether it is possible to define something like « drawsquaredot » or « 
squaredotlabel » in order to do this.


dotlabel uses a pen to draw the dot, and I am not sure why it uses that rather 
than a path. Here is a (to me) simpler definition, where you can change the 
shape:


just look in the pdf ... in your case the dot is a n point path while 
otherwise it uses the default postscript pen (which is a dot)


actually fullcircle is pencircle so you can ponder why that is the case -)


\startMPdefinitions
newpath dotlabelshape;

dotlabelshape := fullcircle;

vardef dotlabel@#(expr s,z) text t_ =
 label@#(s,z) t_ ;
 fill (dotlabelshape scaled 2dotlabeldiam) shifted z t_;
enddef ;
\stopMPdefinitions

\starttext
\startMPcode
newpath p ;
p := (2cm, 3cm) -- (3cm, 5cm);
dotlabeldiam := 12pt;

% Default
draw p;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p)
 withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p)
 withcolor transparent("exclusion",.5,red) ;

% Using a square "dot"
p := p shifted (5cm, 0);
dotlabelshape := fullsquare;

draw p;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p)
 withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p)
 withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

These types of macros are also a good candidate for the new LMTX syntax, where 
we can make all components configurable via a key-value interface 
(labeldistance etc. as well).

it surprised me that a math guru like you doesn't do this:

vardef dotlabel@#(expr s,z) text t_ =
% draw textext("$\bullet$") scaled (1/2) shifted z ;
% draw textext("$\blacktriangle$") scaled (1/4) shifted z ;
draw textext("$\blacksquare$") scaled (1/4) shifted z ;
label@#(s,z) t_ ;
enddef ;
\stopMPdefinitions



-
  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] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi Aditya,
Thank you very much !
That's great indeed, you gave me an elegant solution.
 
One more question, in order for me to understand a little more: when defining a 
new dotlabel as you do, might it not conflict with the internal definitions of 
dotlabel in Metafun in some other place?
Maybe it is safer for me to call it something like  « dotshapelabel » ?

Best regards and agin many thanks: Otared

> On 10 Dec 2020, at 18:44, Aditya Mahajan  wrote:
> 
> On Thu, 10 Dec 2020, Otared Kavian wrote:
> 
>> Hi all,
>> 
>> In Metafun when representing a point I woul dlike to have some dots 
>> represented by a square (or even by another scalable symbol): for instance 
>> in the following I would like the dot at the point B to be a square:
>> 
>> \starttext
>> \startMPcode
>> draw (2cm,3cm) -- (3cm,5cm) ;
>> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
>>  withpen pencircle scaled 12pt 
>>  withcolor transparent("exclusion",.5,red) ;
>> 
>> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
>>  withpen pencircle scaled 12pt 
>>  withcolor transparent("exclusion",.5,red) ;
>> \stopMPcode
>> \stoptext
>> 
>> I wonder whether it is possible to define something like « drawsquaredot » 
>> or « squaredotlabel » in order to do this.
> 
> dotlabel uses a pen to draw the dot, and I am not sure why it uses that 
> rather than a path. Here is a (to me) simpler definition, where you can 
> change the shape:
> 
> \startMPdefinitions
> newpath dotlabelshape;
> 
> dotlabelshape := fullcircle;
> 
> vardef dotlabel@#(expr s,z) text t_ =
>label@#(s,z) t_ ;
>fill (dotlabelshape scaled 2dotlabeldiam) shifted z t_;
> enddef ;
> \stopMPdefinitions
> 
> \starttext
> \startMPcode
> newpath p ; 
> p := (2cm, 3cm) -- (3cm, 5cm);
> dotlabeldiam := 12pt;
> 
> % Default
> draw p;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> % Using a square "dot"
> p := p shifted (5cm, 0);
> dotlabelshape := fullsquare;
> 
> draw p;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
>withcolor transparent("exclusion",.5,red) ;
> \stopMPcode
> \stoptext
> 
> These types of macros are also a good candidate for the new LMTX syntax, 
> where we can make all components configurable via a key-value interface 
> (labeldistance etc. as well).
> 
> Aditya
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Otared Kavian wrote:

> Hi all,
> 
> In Metafun when representing a point I woul dlike to have some dots 
> represented by a square (or even by another scalable symbol): for instance in 
> the following I would like the dot at the point B to be a square:
> 
> \starttext
> \startMPcode
> draw (2cm,3cm) -- (3cm,5cm) ;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
>   withpen pencircle scaled 12pt 
>   withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
>   withpen pencircle scaled 12pt 
>   withcolor transparent("exclusion",.5,red) ;
> \stopMPcode
> \stoptext
> 
> I wonder whether it is possible to define something like « drawsquaredot » or 
> « squaredotlabel » in order to do this.

dotlabel uses a pen to draw the dot, and I am not sure why it uses that rather 
than a path. Here is a (to me) simpler definition, where you can change the 
shape:

\startMPdefinitions
newpath dotlabelshape;

dotlabelshape := fullcircle;

vardef dotlabel@#(expr s,z) text t_ =
label@#(s,z) t_ ;
fill (dotlabelshape scaled 2dotlabeldiam) shifted z t_;
enddef ;
\stopMPdefinitions

\starttext
\startMPcode
newpath p ; 
p := (2cm, 3cm) -- (3cm, 5cm);
dotlabeldiam := 12pt;

% Default
draw p;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
withcolor transparent("exclusion",.5,red) ;

% Using a square "dot"
p := p shifted (5cm, 0);
dotlabelshape := fullsquare;

draw p;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

These types of macros are also a good candidate for the new LMTX syntax, where 
we can make all components configurable via a key-value interface 
(labeldistance etc. as well).

Aditya

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

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


[NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi all,

In Metafun when representing a point I woul dlike to have some dots represented 
by a square (or even by another scalable symbol): for instance in the following 
I would like the dot at the point B to be a square:

\starttext
\startMPcode
draw (2cm,3cm) -- (3cm,5cm) ;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
withpen pencircle scaled 12pt 
withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
withpen pencircle scaled 12pt 
withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

I wonder whether it is possible to define something like « drawsquaredot » or « 
squaredotlabel » in order to do this.
If I use for B the command
withpen pensquare scaled 12pt
then the dot is a square, but the label B is drawn in a strange way.

Thanks for any help: Otared
___
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] defining font family for several options

2020-09-03 Thread jbf

Thanks Otared. That clears up that little item :-)

BTW I know how to reduce font size in the headers (chapter titles) that 
appear on the recto pages, which I can do with something like 
\setupheader [style={\ss\switchtobodyfont[10pt]}], but it doesn't seem 
to affect the header (title of the book) on the verso pages, which is 
drawn from the simple statement:


\startdocument
  [metadata:title={Book title}]

Shouldn't  \setupheader affect both headers? Or is it possible I have 
left something out of my \setupheader declaration?


Julian

On 4/9/20 5:30 am, Otared Kavian wrote:

Hi Julian,

The tilde ~ in {\bf\ss #1.~#2} is only there to have an unbreakable fixed space 
between the dot and the first character of the chapter title.  Also in this way 
one can see that one has put a space there… :-)

Best tegards: Otared


On 2 Sep 2020, at 23:29, jbf  wrote:

Thanks Otared,

Still off list. You are very patient but also very thorough, and this is making 
a huge difference to what is in fact a considerable challenge for me, but one I 
am coming to grips with. I believe this aspect of things is now clear to me. No 
hurry, but when you have a moment can you explain the significance of the ~ in 
the {\bf\ss #1.~#2}}part of the definition, before the 2nd element?

After this I'll go back on list! I still have a couple of other queries (not 
font related) about things that are not functioning as they ought at the 
moment, which means I'll need either some understanding or some tweaking, but 
as always there are people on the list like yourself who are prompt with their 
assistance.

Kind regards,

Julian

On 3/9/20 12:34 am, Otared Kavian wrote:

Hi Julian,

First of all, your definition of mychapterfont is incomplete: a font family 
should contain also math fonts, because even if you don't have mathematics in 
your text where you use that font, ConTeXt may pick some characters from math 
fonts. So in my opinion you should define a whole font family named 
mychapterfont, where in particular the sans serif comes from what you are 
indicating.

The second point is that you should not setup bodyfont twice: when you say 
twice \setupbodyfont, ConTeXt will take the last one for the rest of your 
document…
So you say only once
\setupbodyfont[mainface]
and then only where you want to change the font you say
\start \switchtobodyfont[mychapterfont] \ss My special text. \stop

By the way, as we said earlier, you can also use braces instead of \start\stop, 
and even better you can say

\start \switchtobodyfont[mychapterfont,sans] My special text. \stop

A third point is that if you are using mychapterfont only to set the titles of 
chapters, in my opinion it would be better to define a command which takes care 
of all the formatting you are wishing, and then use it in the chapter header. 
Something like

\define[2]\MyChapterCommand{\switchtobodyfont[mychapterfont,12pt] {\bf\ss 
#1.~#2}}
\setuphead[chapter][command=\MyChapterCommand]

In this way you can just say

\startchapter[title={This is my first chapter}]

\input ward.tex

\stopchapter

without the hassles of formatting each title. If only some chapters have the 
special font, then you can define a new family of chapters which may share the 
same counter as the rest of your chapters.

Best regards: Otared


On 2 Sep 2020, at 03:30, jbf  wrote:

Otared, I thought I had it right - and it is partly right, but that newly 
declared font now applies to everything, not just the chapter title. So I 
haven't got it quite right! Maybe I shouldn't bother the list with these extra 
bits so am writing off list. Here is what my font definitions now look like 
(new one highlighted):

\definefontfamily [mainface] [rm] [alegreya] [sc=file:alegreyasc-bold]
\definefontfamily [mainface] [ss] [dax][tf=file:dax-regular,bf=file:dax-medium]
\definefontfamily [mainface] [mm] [alegreya]
\definefontfamily [mychapterfont] [ss] [itcavantgardepromd] 
[ss=file:itcavantgardepro-md]
\setupbodyfont[mainface]
\setupbodyfont[mychapterfont]

I presumed I would have to \setupbodyfont[mychapterfont], but is this where I 
have gone wrong?.

Then in the first chapter, I wrote as follows:

\chapter{{\switchtobodyfont[mychapterfont] \ss Introduction to the BDACE Online 
Project}} and I am getting my AvanteGardePro-MD font alright, but it now 
applies to the whole document!

I tried following title with \start switchtobodyfont[mainface] \rm and then my 
body text (followed by \stop obviously, at the end of the chapter). But this 
did not work.

I then thought that I could use this [mychapterfont] and include it somehow in 
my \setuphead[chapter] so it would work for all chapter titles, along the lines 
of: \setuphead [chapter] [header=empty, {\switchtobodyfont[mychapterfont] \ss}] 
but that hasn't worked either - my body text throughout is still in the sans 
serif, not the usual [mainface] [rm]

I think the problem is that if I define two or more \setupbodyfont items, it is 
the last

Re: [NTG-context] No dots in \dotfill with new font

2020-06-17 Thread Hans Hagen

On 6/16/2020 11:13 PM, James Withers wrote:

Many thanks Hans. That has made the dots appear. If possible I would
like to use the dot from the same font, especially if using a font
where full stops are diamond shaped rather than circular.

Is there any way to map the dot from the external font so that it can
be used by the \dotfill command?



dotfill is actually a plain tex command using periods and spacing from 
the math font / mode ... (maybe we should redefine it to behave 
differently in text mode)


you can use this:

\definefiller
  [myfill]
  [symbol=.,
   method=middle,
   width=.5\emwidth,
   leftmargin=.25em,
   rightmargin=.25em]

\starttext

text before \filler[myfill] text after

\stoptext



James

On Tue, 16 Jun 2020 at 21:04, Hans Hagen  wrote:


On 6/16/2020 1:03 PM, James Withers wrote:

Hello

I've followed the instructions on the Context Garden wiki to make use
of a different font. Unfortunately when using \dotfill the dots do not
show up. My minimal example is below. I think this might be because
\dotfill takes its dots from the math mode font which I have not set
up correctly.

Grateful for any assistance

James


\starttypescript [cormorant]
\definefontsynonym[Cormorant-Regular] [file:Cormorant-Regular]
\stoptypescript

\starttypescript [cormorant]
\setups[font:fallback:serif]
\definefontsynonym[Serif] [Cormorant-Regular] [features=default]
\stoptypescript

\starttypescript [cormorant]
\definetypeface [cormorant] [rm] [serif] [cormorant] [default]
\definetypeface [cormorant] [mm] [math] [cormorant] [default]
\stoptypescript

\setupbodyfont [cormorant]

\starttext

.

text before dotfill\dotfill text after dotfill

.

\stoptext

you need a math font

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



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



--

-
  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] No dots in \dotfill with new font

2020-06-16 Thread James Withers
Many thanks Hans. That has made the dots appear. If possible I would
like to use the dot from the same font, especially if using a font
where full stops are diamond shaped rather than circular.

Is there any way to map the dot from the external font so that it can
be used by the \dotfill command?

James

On Tue, 16 Jun 2020 at 21:04, Hans Hagen  wrote:
>
> On 6/16/2020 1:03 PM, James Withers wrote:
> > Hello
> >
> > I've followed the instructions on the Context Garden wiki to make use
> > of a different font. Unfortunately when using \dotfill the dots do not
> > show up. My minimal example is below. I think this might be because
> > \dotfill takes its dots from the math mode font which I have not set
> > up correctly.
> >
> > Grateful for any assistance
> >
> > James
> >
> >
> > \starttypescript [cormorant]
> > \definefontsynonym[Cormorant-Regular] [file:Cormorant-Regular]
> > \stoptypescript
> >
> > \starttypescript [cormorant]
> > \setups[font:fallback:serif]
> > \definefontsynonym[Serif] [Cormorant-Regular] [features=default]
> > \stoptypescript
> >
> > \starttypescript [cormorant]
> > \definetypeface [cormorant] [rm] [serif] [cormorant] [default]
> > \definetypeface [cormorant] [mm] [math] [cormorant] [default]
> > \stoptypescript
> >
> > \setupbodyfont [cormorant]
> >
> > \starttext
> >
> > .
> >
> > text before dotfill\dotfill text after dotfill
> >
> > .
> >
> > \stoptext
> you need a math font
>
>  \definetypeface [cormorant] [mm] [math]  [pagella] [default]
>
>
>
> -
>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] 'debug' version of METAPOST draw?

2020-05-28 Thread Keith McKay
Would Chapter 11, section 11.1 Showing Paths of the MetaPost manual, be 
any help here?


Below is a MWE of a random path of curves and straight lines. The points 
are shown using drawpoints. The arrow path and control lines are also 
shown and are better described in the Metapost manual.


MWE%%%

\setuppapersize [A4,landscape]

\starttext

\startMPpage[instance=doublefun]

StartPage;

width := PaperWidth ; height := PaperHeight ; unit := cm ;

path p ;

path pat;

pat := (5cm,5cm);

for a = 1 step 1 until 10:

x:= uniformdeviate(10) +10;

y:= uniformdeviate(10) +10;

if odd a:

pat := pat .. (x*cm,y*cm);

else:

pat := pat -- (x*cm,y*cm);

fi;

draw pat withpen pencircle scaled 5mm withcolor .5green;

endfor;

drawarrowpath pat;

drawpoints pat;

drawcontrollines pat withcolor .625red ;

StopPage;

\stopMPpage

\stoptext

%%% end MWE %

A better coder than me may be able to incorporate it into what you require.

Best Wishes

Keith McKay

On 28/05/2020 12:33, Gerben Wierda wrote:

I would like to be able (during development) to draw paths where the points of 
the path (and maybe thing slike directions) are visualised. E.g. a path where 
each pair in teh path is also drawn as a dot and maybe teh directions drawn as 
small arrows.

Does someone have such a beast lying around?

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


[NTG-context] 'debug' version of METAPOST draw?

2020-05-28 Thread Gerben Wierda
I would like to be able (during development) to draw paths where the points of 
the path (and maybe thing slike directions) are visualised. E.g. a path where 
each pair in teh path is also drawn as a dot and maybe teh directions drawn as 
small arrows.

Does someone have such a beast lying around?

G
___
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] Strangely placed dot

2020-05-04 Thread Mikael P. Sundqvist
Hi,

I realized that at work I did not have this problem, so there must have
been some problem with my installation on the laptop. Perhaps it will go
away when erasing the cache.

/Mikael


On Sun, May 3, 2020 at 7:48 AM Mikael P. Sundqvist  wrote:

> Hi,
>
> what is going on with the placement of the dot in this example, and how
> can I avoid it?
>
> \starttext
> \startTEXpage[offset=3bp]
> $E_tE_s=E_{\min(t,s)}$.
>
> \switchtobodyfont[stixtwo]$E_tE_s=E_{\min(t,s)}$.
>
> \switchtobodyfont[lucidaot]$E_tE_s=E_{\min(t,s)}$.
> \stopTEXpage
> \stoptext
>
> Output 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
___


[NTG-context] Strangely placed dot

2020-05-02 Thread Mikael P. Sundqvist
Hi,

what is going on with the placement of the dot in this example, and how can
I avoid it?

\starttext
\startTEXpage[offset=3bp]
$E_tE_s=E_{\min(t,s)}$.

\switchtobodyfont[stixtwo]$E_tE_s=E_{\min(t,s)}$.

\switchtobodyfont[lucidaot]$E_tE_s=E_{\min(t,s)}$.
\stopTEXpage
\stoptext

Output attached.

/Mikael


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


[NTG-context] Fwd: Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Joey McCollum
Thank you for the prompt and thorough response!

If the reorderings have to be done for each pair of characters in different
combining classes that are not in the expected typographical order, then
there will be a lot (probably hundreds) of substitution rules. I am not
very familiar with coding in Lua, but if there is a way to add substitution
features for specific classes of points, then that would require a lot
fewer cases.

Unicode's canonical ordering of Hebrew marks is based on their combining
classes, with characters in higher combining classes being sorted after
those with lower combining classes in canonical order. The typographically
recommended ordering of certain characters is found in Table 1 (p. 12) of
https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf. The following
list of character classes, with information about their Unicode combining
classes (which I retrieved from the Lua script
https://raw.githubusercontent.com/michal-h21/uninormalize/master/char-def-with-ccc.lua),
is indexed after the character classes described in that table:
1. The consonants (Unicode points 05D0-05EA) have no combining class and
are never reordered; this is typographically correct.
2. Shin dot and sin dot (05C1-05C2) should be next, but Unicode places them
in combining classes 24 and 25, after the characters in recommended classes
3-5 and many of the characters in recommended class 6.
3. Dagesh / mapiq (05BC) should be next, but Unicode assigns it a combining
class of 21. This means that it will be incorrectly ordered before
characters in recommended class 2 and after characters in recommended
classes 4-6 after Unicode normalization.
4. Rafe (05BF) should be next, but Unicode assigns it a combining class of
23. Thus, it will be correctly placed after characters in recommended class
3, but incorrectly placed before characters in recommended class 2 after
Unicode normalization.
5. The holam and holam haser vowel points (05B9-05BA) should be next, but
Unicode places them in combining class 19. This means that it will be
placed incorrectly before characters in recommended classes 2-4 and after
all characters in recommended class 6 except 05BB after Unicode
normalization.
6. The characters in 0591, 0596, 059B, 05A2-05A7, 05AA, 05B0-05B8, 05BB,
05BD, 05C5, 05C7 should be treated as being in the same class, but Unicode
places them in combining classes 10-18, 20, 22, and 220.
7. The prepositive marks yetiv and dehi (059A, 05AD) should be next;
Unicode places them in combining class 222, so they should correctly come
after all characters in recommended classes 1-6.
8. The characters 0307, 0593-0595, 0597-0598, 059C-05A1, 05A8, 05AB-05AC,
05AF, 05C4 should be treated as being in the same class; Unicode places
them in combining class 230, so they should correctly come after all
characters in recommended classes 1-7.
9. The postpositive marks segolta, pashta, telisha qetana, and zinor (0592,
0599, 05A9, 05AE) should be next; Unicode places them in combining class
230, so they will need to be reordered after the characters in recommended
class 8.

This a lot of information, and I've probably not presented it as clearly as
I could, so if there is any confusion, please let me know, and I can try to
explain better. If there is any other information you need, please let me
know.

Thanks again!

On Tue, Apr 28, 2020 at 9:17 AM Hans Hagen  wrote:

> On 4/28/2020 1:59 PM, Joey McCollum wrote:
> > \definefontfeature[f:pointedhebrew][default][
> >  ccmp=yes,
> >  mark=yes,
> >  script=hebr
> > ]
> > \definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]
> > %Set the body font:
> > \setupbodyfont[hebrew]
> > %Set up right-to-left alignment:
> > \setupalign[r2l]
> > \starttext
> >  %Characters after normalization, in Unicode canonical order (bet +
> > segol + dagesh + final nun):
> >  בֶּן
> >
> >  %A word with characters in typographically recommended order (bet +
> > dagesh + segol + final nun):
> >  בֶּן
> > \stoptext
>
> \startluacode
>  fonts.handlers.otf.addfeature {
>  name= "normalizehebrew",
>  type= "chainsubstitution",
>  prepend = 1,
>  lookups = {
>  {
>  type = "multiple",
>  data = {
>  [0x5B6] = { 0x5BC, 0x5B6 },
>  },
>  },
>  },
>  data = {
>  rules = {
>  {
>  current = { { 0x5B6 }, { 0x5BC } },
>  lookups = { 1, 0 },
>  },
>  },
>  },
>  }
> \stopluacode
>
> \definefontfeature
>[f:pointedhebrew]
>[hebrew]
>[normalizehebrew=yes]
>
> \definefontfamily[hebrew] [rm] [

Re: [NTG-context] Setting up macvim in mac os catalina to work with LMTX

2020-04-23 Thread Nicola
On 2020-04-22, Jan-Erik Hägglöf  wrote:
> Output from :messages
>
>   
>   
> [ConTeXt] Typesetting...  
> Fel upptäcktes vid bearbetning av function 
> context#typeset[6]..39_typeset[2
> ]..context#callback[1]..39_callback:
> rad   17:
> E40: Kan inte öppna felfil /Users/janneman/Documents/CTX/GNUPLOT/test3.log

FYI, that error means that test3.log was not found - I guess, as that's
not a language I understand :-) - which likely means that your command
somehow failed without producing a log file (e.g., because the command
name was misspelled).

You seem to have fixed your issue, but, should you bump into further
issues, first make sure that your ConTeXt installation works properly
from the command line. Also, keep in mind that your shell environment
may be different from the environment in which ConTeXt is executed
inside Vim, so you may need to explicitly set some environment variables
(e.g., inside g:context_mtxrun) to make things sail smoothly.

Global variables (whose names start with `g:`) may be set in your vimrc,
which is typically located at $HOME/.vim/vimrc (note that the filename
does *not* start with a dot, only the directory's name does).

Good ConTeXt typesetting in Vim!
Nicola


___
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] Official file ending?

2020-02-05 Thread Hans Hagen

On 2/5/2020 11:00 AM, Henning Hraban Ramm wrote:




Am 2020-02-05 um 10:24 schrieb Hans Hagen :

On 2/4/2020 8:27 PM, kaddour kardio wrote:

Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate to got the 
"dot tex" than latex :)

I always wonder where such info comes from. Plain tex is a 45K file that is 
described in the tex book and serves as template for Don Knuths own styles for 
his books. Much of it is dedicated to setting up fonts and math. I think it was 
never meant to be a general purpose macro package but serve as starting point 
and example of how to apply primitives.


Maybe not PlainTeX, but plain TeX.

E.g. we usually use TeX primitives like \def (even if we have \define), while 
with LaTeX you use \newcommand, similar with \vbox and others.

I understood LuaMetaTeX, as a stripped-down typesetting engine, would be closer 
to the spirit of Knuth’s TeX than a bloated pdfTeX/LuaTeX.
Indeed, although I admit that I added some primitives that I felt were 
missing (which is why we will have foo.lmtx source files).


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] Official file ending?

2020-02-05 Thread Henning Hraban Ramm


> Am 2020-02-05 um 10:24 schrieb Hans Hagen :
> 
> On 2/4/2020 8:27 PM, kaddour kardio wrote:
>> Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate to 
>> got the "dot tex" than latex :)
> I always wonder where such info comes from. Plain tex is a 45K file that is 
> described in the tex book and serves as template for Don Knuths own styles 
> for his books. Much of it is dedicated to setting up fonts and math. I think 
> it was never meant to be a general purpose macro package but serve as 
> starting point and example of how to apply primitives.

Maybe not PlainTeX, but plain TeX.

E.g. we usually use TeX primitives like \def (even if we have \define), while 
with LaTeX you use \newcommand, similar with \vbox and others.

I understood LuaMetaTeX, as a stripped-down typesetting engine, would be closer 
to the spirit of Knuth’s TeX than a bloated pdfTeX/LuaTeX.

Hraban
___
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] Official file ending?

2020-02-05 Thread Philipp A.
Ha, I was just writing about my confusion, thank you for clearing this up.

So how about I add those four to Wikipedia and the ConTeXt wiki?

Am Mi., 5. Feb. 2020 um 10:23 Uhr schrieb Hans Hagen :

> On 2/4/2020 8:27 PM, kaddour kardio wrote:
> > Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate
> > to got the "dot tex" than latex :)
> >
> > Le mar. 4 févr. 2020 à 17:57, Pablo Rodriguez  > <mailto:oi...@gmx.es>> a écrit :
> >
> > On 2/3/20 3:28 PM, Hans Hagen wrote:
> >  > On 2/3/2020 3:07 PM, Philipp A. wrote:
> >  >> Hi!
> >  >>
> >  >> Most text editors have LaTeX specific syntax highlighting, so it
> > makes
> >  >> sense to give your ConTeXt file a ending it can be distinguished
> > with.
> >  >> Is there a blessed one?
> >  >>
> >  >>   * .ctx: Would mirror the semi-common .ltx, but is used for XML
> > files
> >  >> inside of ConTeXt itself
> >  >
> >  > context ctx files are xml files indeed
> >  >
> >  >>   * .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would
> > it make
> >  >> sense to give text documents that extension?
> >  >
> >  > you can do that (or mkvi or lmtx or ...)
> >
> > Since there are already *.mkxl files in the ConTeXt distribution, I
> > think it may make sense to name the LMTX version MkXL.
> >
> > In any case, MkXL is simpler and clearer that MkIV with LMTX.
> mkiv (four)   : files that expect mkiv (or lmtx)
> mkvi (six): mkiv (or lmtx) files that pass a filter
> mkxl (fourty) : files that expect lmtx
> mklx (sixty)  : lmtx files that pass a filter
>
> (there are some more, like template files and so)
>
> I suppose that latex syntax highlighting filters support tex and sty and
> maybe suffixes i'm noti aware of. So a context specific highlighter
> could support mkiv, mkvi, mkxk and mkvi. At least that's what I do here.
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> 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] Official file ending?

2020-02-05 Thread Hans Hagen

On 2/4/2020 8:27 PM, kaddour kardio wrote:
Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate 
to got the "dot tex" than latex :)
I always wonder where such info comes from. Plain tex is a 45K file that 
is described in the tex book and serves as template for Don Knuths own 
styles for his books. Much of it is dedicated to setting up fonts and 
math. I think it was never meant to be a general purpose macro package 
but serve as starting point and example of how to apply primitives.


Anyway, it's alway interesting to see folws coming up with descriptions 
of context (or whatever relates to it) which then become kind of truths. 
In todays terms we shouls say that 'the community has its own 
influencers' and 'origins of fake news' and ...


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] Official file ending?

2020-02-05 Thread Hans Hagen

On 2/4/2020 8:27 PM, kaddour kardio wrote:
Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate 
to got the "dot tex" than latex :)


Le mar. 4 févr. 2020 à 17:57, Pablo Rodriguez <mailto:oi...@gmx.es>> a écrit :


On 2/3/20 3:28 PM, Hans Hagen wrote:
 > On 2/3/2020 3:07 PM, Philipp A. wrote:
 >> Hi!
 >>
 >> Most text editors have LaTeX specific syntax highlighting, so it
makes
 >> sense to give your ConTeXt file a ending it can be distinguished
with.
 >> Is there a blessed one?
 >>
 >>   * .ctx: Would mirror the semi-common .ltx, but is used for XML
files
 >>     inside of ConTeXt itself
 >
 > context ctx files are xml files indeed
 >
 >>   * .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would
it make
 >>     sense to give text documents that extension?
 >
 > you can do that (or mkvi or lmtx or ...)

Since there are already *.mkxl files in the ConTeXt distribution, I
think it may make sense to name the LMTX version MkXL.

In any case, MkXL is simpler and clearer that MkIV with LMTX.

mkiv (four)   : files that expect mkiv (or lmtx)
mkvi (six): mkiv (or lmtx) files that pass a filter
mkxl (fourty) : files that expect lmtx
mklx (sixty)  : lmtx files that pass a filter

(there are some more, like template files and so)

I suppose that latex syntax highlighting filters support tex and sty and 
maybe suffixes i'm noti aware of. So a context specific highlighter 
could support mkiv, mkvi, mkxk and mkvi. At least that's what I do here.


Hans


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

maillist : ntg-context@ntg.nl / 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] Official file ending?

2020-02-04 Thread Henning Hraban Ramm

> Am 2020-02-04 um 20:27 schrieb kaddour kardio :
> 
> Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate to got 
> the "dot tex" than latex :) 

I’d suggest to start a war to claim it…

HR
___
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] Official file ending?

2020-02-04 Thread kaddour kardio
Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate to
got the "dot tex" than latex :)

Le mar. 4 févr. 2020 à 17:57, Pablo Rodriguez  a écrit :

> On 2/3/20 3:28 PM, Hans Hagen wrote:
> > On 2/3/2020 3:07 PM, Philipp A. wrote:
> >> Hi!
> >>
> >> Most text editors have LaTeX specific syntax highlighting, so it makes
> >> sense to give your ConTeXt file a ending it can be distinguished with.
> >> Is there a blessed one?
> >>
> >>   * .ctx: Would mirror the semi-common .ltx, but is used for XML files
> >> inside of ConTeXt itself
> >
> > context ctx files are xml files indeed
> >
> >>   * .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would it make
> >> sense to give text documents that extension?
> >
> > you can do that (or mkvi or lmtx or ...)
>
> Since there are already *.mkxl files in the ConTeXt distribution, I
> think it may make sense to name the LMTX version MkXL.
>
> In any case, MkXL is simpler and clearer that MkIV with LMTX.
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Impacts Project

2019-12-05 Thread Thangalin
Hi list!

Thank you for helping to answer so many questions and remove so many
roadblocks with my project. The result is a photobook written in
Markdown, piped through pandoc to generate ConTeXt code, then stylized
using a series of .tex files.

The coolest ConTeX part, IMO, is the orange dot in the timeline. Using
MetaPost, the date for the timeline is read directly from the
document, then plotted relative to the \overlaywidth. Changing the
date in the Markdown document winds up repositioning the timeline dot
automagically.

https://impacts.to/

The book is going to be released under a CC BY 4.0 license, including
all the source code necessary to generate the book. Meanwhile, if
anyone is interested in nabbing a copy of the PDF, let me know
(preferably via the web form).

Again, my sincerest gratitude, this project would have been a much
more time-consuming and arduous journey without your generous help.
___
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] Indenting number in TOC, particular numbering scheme, and other questions

2019-12-02 Thread Daniel Haid

Hello everyone,

I just started to experiment with ConTeXt. I have a few issues with my 
first document structure. I need a very particular numbering scheme, 
which I have tried to implement. I have appended the document below.


1. Why is there no indenting in the TOC starting with (what I call) 
level 7? This could have to something with the fact that the levels 
starting from 7 are defined in the subsub module?


2. Why are the numbers in the headings inside the main text not printed 
for levels 8 and 9? Interestingly, they *are* printed for level 7, which 
is defined in the subsub module. I have looked into m-subsub.mkiv and 
saw no difference at all between the different levels defined there.


3. Is it possible to indent not only the section name but also the 
number in the TOC? Moreover, I would like to have a dot after the first 
three levels, but not the other ones (in the TOC and in the text), like 
this:


A. First Level .. 1
I. Second Level . 2
1. Third Level .. 3
a) Fourth Level . 4
...

4. I use the conversions A, I, 1 (without dot), and then defined my own 
ones "a)", "aa)", etc. *with* the ")". I think this is correct, since 
the way a section has to be referenced in the text is like this (for 
example):


B.IV.5.c).aa).(4)

Is there a way to get this? Moreover, is it possible to have a relative 
referencing command, for example, if section B.IV.5.d) is quoted from 
inside section B.IV.6.f) the command should only print 5.d) since the 
B.IV is implied.


5. How can I get rid of the additional vertical space before the second 
entry "B. Another first level" (chapter)?


6. I wanted to define aliases for the \subsub...subsection commands, 
since they are difficult to read, and I used \def as you can see below. 
Is this the right way to do it or would you recommend something else?


Any help would be greatly appreciated.

D.

--

\usemodule[subsub]

\usetypescript[termes]
\setupbodyfont[termes,12pt]

\def\arconv#1{\alphabeticnumerals{#1})}
\defineconversion[ar][\arconv]

\def\aarconv#1{\alphabeticnumerals{#1}\alphabeticnumerals{#1})}
\defineconversion[aar][\aarconv]

\def\lnrconv#1{(\numbers{#1})}
\defineconversion[lnr][\lnrconv]

\def\larconv#1{(\alphabeticnumerals{#1})}
\defineconversion[lar][\larconv]

\def\laarconv#1{(\alphabeticnumerals{#1}\alphabeticnumerals{#1})}
\defineconversion[laar][\laarconv]

\def\alpharconv#1{\greeknumerals{#1})}
\defineconversion[alphar][\alpharconv]

\definestructureconversionset[myconvset][,A,I,n,ar,aar,lnr,lar,laar,alphar]

\setupheads[part,
  chapter,
  section,
  subsection,
  subsubsection,
  subsubsubsection,
  subsubsubsubsection,
  subsubsubsubsubsection,
  subsubsubsubsubsubsection,
  subsubsubsubsubsubsubsection][sectionconversionset=myconvset]

\setuphead[chapter][sectionsegments=chapter]
\setuphead[section][sectionsegments=section]
\setuphead[subsection][sectionsegments=subsection]
\setuphead[subsubsection][sectionsegments=subsubsection]
\setuphead[subsubsubsection][sectionsegments=subsubsubsection]
\setuphead[subsubsubsubsection][sectionsegments=subsubsubsubsection]
\setuphead[subsubsubsubsubsection][sectionsegments=subsubsubsubsubsection]
\setuphead[subsubsubsubsubsubsection][sectionsegments=subsubsubsubsubsubsection]
\setuphead[subsubsubsubsubsubsubsection][sectionsegments=subsubsubsubsubsubsubsection]

\def\startA{\startchapter}
\def\stopA{\stopchapter}
\def\startI{\startsection}
\def\stopI{\stopsection}
\def\startS{\startsubsection}
\def\stopS{\stopsubsection}
\def\startSS{\startsubsubsection}
\def\stopSS{\stopsubsubsection}
\def\startSSS{\startsubsubsubsection}
\def\stopSSS{\stopsubsubsubsection}
\def\startX{\startsubsubsubsubsection}
\def\stopX{\stopsubsubsubsubsection}
\def\startXX{\startsubsubsubsubsubsection}
\def\stopXX{\stopsubsubsubsubsubsection}
\def\startXXX{\startsubsubsubsubsubsubsection}
\def\stopXXX{\stopsubsubsubsubsubsubsection}
\def\start{\startsubsubsubsubsubsubsubsection}
\def\stop{\stopsubsubsubsubsubsubsubsection}

\setupcombinedlist[content][list={chapter,
section,
subsection,
subsubsection,
subsubsubsection,
subsubsubsubsection,
subsubsubsubsubsection,
subsubsubsubsubsubsection,
subsubsubsubsubsubsubsection},alternative=c]

\starttext

\placecontent

\startA[title={First level}]
  \startI[title={Second level}]
\startS[title={Third level}]
  \startSS[title={Fourth level}]
\startSSS[title={Fifth level}]
  \startX[title={Sixth level}]
\startXX[title={Seventh level}]
  \startXXX[title={Eighth level}]
\start[title={Ninth level}]
\stop
  \stopXXX
\stopXX
  \stopX
\stopSSS
  \stopSS
\stopS
  \stopI
\stopA

\startA[title={Another first level}]
\stopA

\stoptext

Re: [NTG-context] Referencing equation, missing dot

2019-11-14 Thread Hans Hagen

On 11/13/2019 9:20 PM, Mikael P. Sundqvist wrote:

Hi,

The following example used to work.

But with an LMTX updated today, the numbering \eqref produces is (11) 
instead of the expected (1.1). The numbering in the equation itself is fine.


Did something change on purpose?

/Mikael

%%% TEST FILE
\definereferenceformat[eqref][left=(,right=)]

\starttext
\chapter[title=Foo]

\placeformula[eq:bar]
\startformula
1+1=2
\stopformula
We see in \eqref[eq:bar].
\stoptext

fixed in next beta

-
  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] Referencing equation, missing dot

2019-11-13 Thread Mikael P. Sundqvist
Hi,

The following example used to work.

But with an LMTX updated today, the numbering \eqref produces is (11)
instead of the expected (1.1). The numbering in the equation itself is fine.

Did something change on purpose?

/Mikael

%%% TEST FILE
\definereferenceformat[eqref][left=(,right=)]

\starttext
\chapter[title=Foo]

\placeformula[eq:bar]
\startformula
1+1=2
\stopformula
We see in \eqref[eq:bar].
\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] metafun 2

2019-08-19 Thread Jorge Manuel

Thanks a lot for the new features.


In my system this code don’t work.

macOS Mojave

This is LuaMetaTeX, Version 2.00.0
open source > level 1, order 1, name 'cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2019.08.17 12:16 MKIV beta  fmt: 2019.8.19  
int: English/English




\startMPcode{doublefun}
draw lmt_function [

xmin =  0, xmax = 10, xstep = .05,
ymin = -2, ymax =  2,

xticks = "bottom", xsmall = 80, xlarge = 20,
yticks = "left",   ysmall = 40, ylarge =  4,

code = "1.5 * math.cosd(240 * math.sqrt(x))",

xlabels = "yes",
ylabels = "yes",

ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
xcaption = "\strut\tfd horizontal",

pointsymbol = "dot", pointsize = 4, pointcolor = "orange",

sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
]
xsized 8cm
;
\stopMPcode

The output error:

loading metafun, including plain.mp version 1.004 for metafun iv and xl


pages   > flushing realpage 9, userpage 8, subpage 9
metapost log> ! Missing ':' has been inserted.
metapost log> 
metapost log>addto
metapost log> draw->addto
metapost log>
.currentpicture.if.picture(EXPR0):also(EXPR0)else:doublepath(EXPR…









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

2019-08-14 Thread Aditya Mahajan

On Wed, 14 Aug 2019, Otared Kavian wrote:


Hi Hans,

Thank you very much for the new features! I haven't yet read all the 
mag-1104-mkiv.pdf where you explain some of them, but after modifying one of 
your examples, I noticed that some funtions get a strange graph, which is 
probably due to the fact that metafun2 is interpolating between points in a way 
which is not correct.
For instance, in the following example (which is a slight modification of 
yours), the curve drawn is not a graph, in the sense that for some values of x 
it seems to be two or more values of y.

How does metafun 2 traces the curve between two discretization points?

Best regards: OK

%%% begin draw-2.tex

\starttext
\startMPcode{doublefun}
draw lmt_function [
xmin =  1.0, xmax = 2.5066283, xstep = .1,
ymin = -2, ymax =  2,
%   xticks = "bottom", xsmall = 80, xlarge = 20,
%   yticks = "left", ysmall = 40, ylarge = 4,
code = "1.5 * math.sin(2*x^2)",
xlabels = "yes",
ylabels = "yes",
ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
    xcaption = "\strut\tfd horizontal",
pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
]
xsized 8cm ;
\stopMPcode

\stoptext


This looks like a typical .. vs -- issue. I think there is a way to change 
how the points are connected, but I'll have to look at the code again.


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

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


Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen

On 8/14/2019 4:22 PM, Otared Kavian wrote:

Hi Hans,

Thank you very much for the new features! I haven't yet read all the 
mag-1104-mkiv.pdf where you explain some of them, but after modifying one of 
your examples, I noticed that some funtions get a strange graph, which is 
probably due to the fact that metafun2 is interpolating between points in a way 
which is not correct.
For instance, in the following example (which is a slight modification of 
yours), the curve drawn is not a graph, in the sense that for some values of x 
it seems to be two or more values of y.

How does metafun 2 traces the curve between two discretization points?


it doesn't, it just connects the dots, so, just use a smaller step, like

xstep = .01

(The upcoming luagraph module will provide some interpolators so at some 
point we can hook these in.)


(btw, there are a lot of extra math functions, also or complex numbers)


Best regards: OK

%%% begin draw-2.tex

\starttext
\startMPcode{doublefun}
draw lmt_function [
xmin =  1.0, xmax = 2.5066283, xstep = .1,
ymin = -2, ymax =  2,
%   xticks = "bottom", xsmall = 80, xlarge = 20,
%   yticks = "left", ysmall = 40, ylarge = 4,
code = "1.5 * math.sin(2*x^2)",
xlabels = "yes",
ylabels = "yes",
ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
    xcaption = "\strut\tfd horizontal",
pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
]
xsized 8cm ;
\stopMPcode

\stoptext

%%% end draw-2.tex


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] metafun 2

2019-08-14 Thread Otared Kavian
Hi Hans,

Thank you very much for the new features! I haven't yet read all the 
mag-1104-mkiv.pdf where you explain some of them, but after modifying one of 
your examples, I noticed that some funtions get a strange graph, which is 
probably due to the fact that metafun2 is interpolating between points in a way 
which is not correct.
For instance, in the following example (which is a slight modification of 
yours), the curve drawn is not a graph, in the sense that for some values of x 
it seems to be two or more values of y.

How does metafun 2 traces the curve between two discretization points?

Best regards: OK

%%% begin draw-2.tex

\starttext
\startMPcode{doublefun} 
draw lmt_function [
xmin =  1.0, xmax = 2.5066283, xstep = .1,
ymin = -2, ymax =  2,
%   xticks = "bottom", xsmall = 80, xlarge = 20, 
%   yticks = "left", ysmall = 40, ylarge = 4,
code = "1.5 * math.sin(2*x^2)", 
xlabels = "yes",
ylabels = "yes",
ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
    xcaption = "\strut\tfd horizontal",
pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm, 
]
xsized 8cm ;
\stopMPcode

\stoptext

%%% end draw-2.tex



draw-2.pdf
Description: Adobe PDF document


> On 14 Aug 2019, at 11:54, Hans Hagen  wrote:
> 
> Hi,
> 
> In the process of providing an additional (more abstract) interface to some 
> of the old and also new MetaFun code we wonder what kind of features users 
> would like to see.
> 
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> 
> As a teaser I uploaded a MyWay document that shows some of what is coming. 
> All is experimental but it shows the direction. We're talking ConTeXt LMTX 
> here. For instance,
> 
>draw lmt_outline [
>content   = "hello",
>kind  = "reverse",
>fillcolor = "darkred",
>drawcolor = "darkblue",
>rulethickness = 1/2,
>] ysized h shifted (3.75h,-1.25h) ;
> 
> Wraps all the outline drawing in one macro with a set of options (there will 
> be xml interface definitions for that). Or take:
> 
>draw lmt_followtext [
>content = "How well does it work {\bf 1}! ",
>path= (fullcircle scaled 4cm),
>trace   = true,
>spread  = true,
>] ysized 5cm ;
> 
> which is an easier interface to text along a curve. Arrows can be drawn with
> 
>draw lmt_arrow [
>kind= "draw",
>location= "middle",
>alternative = "curved",
>path= fullcircle
>scaled  3cm
>shifted (3.5cm,0cm),
>] withcolor "darkblue" ;
> 
> but of course the low level interface with its many variables for tweaking 
> stays around. Other examples are shown in the mentioned document.
> 
> So the question is: What do you miss in metapost support? Of course it should 
> fit within the concept, so 'artistic freehand drawings' is not something that 
> is likely to get interfaced. We are particularly interested in educational 
> applications, if only because ConTeXt started out that way.
> 
> 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
> ___

___
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] translating LyX/LaTex book into ConTeXt (was Re: [Context] Xindy)

2019-07-21 Thread Gour
On Sat, 13 Sep 2008 12:21:21 +0200
Hans Hagen  wrote:

Hello Hans,

It was long ago since I did work on two parts of my mother's
autobiography and it was done in LyX/LaTeX/xindy...

Now, after her departure, there is an interest to write down 3rd
(final) part and I'm considering to do it as single book using ConTeXt.

> you can define your own sort order (in mkiv this is somewhat easier 
> because there we're in unicode space)

The two parts along with the to-be-written 3rd part would make it over
1k pages (currently part I & II are over 900p), there is mix of
Croatian and English in each book (although we published editions in
both languages), there are lot of Sanskrit words written using
diacritics, bibliography, glossary as well as color pictures.

I'm sure there is no problem in doing English/Croatian, but wonder
about Sanskrit diacritics, eg. when I typeset small snippet from the
LyX source I notice things like:

fonts   > checking > char ṁ (U+01E41) in font
'LMRoman12-Regular' with id 1: missing backend > xmp > using
file '/usr/share/texmf/tex/context/base/mkiv/lpdf-pdx.xml'

so I wonder if you have some suggestions in regard to fonts which cover
those diacritics well?

When using LaTeX, accents were just handled by putting e.g. dot over
'm'. Any hint how to easily enter such things in one's editor?

Now, I wonder how can one "define one's own sort order" since I'd like
that words containing e.g. 'ṁ' are to be sorted as 'm'?

> personally i have no plans for using xindy (i looked into it real
> long ago but at that time it was rather latex oriented and could not
> carry enough info around which i want in context)

As far as I understand Xindy is not developed any longer, so I hope ConTeXt can
do everything?

What about generating Glossary?

> currently the index mechanism in mkiv still uses the same tex
> interface when typesetting the index itself, but i will provide a
> more extensive mechanism (first i redo the sectioning and list); at
> that point we will also have one-pass index handling

What is the status of the above now?


Any further hint in translating LyX/LaTeX sources into ConTeXt?


Sincerely,
Gour

-- 
Those who are on this path are resolute in purpose,
and their aim is one. O beloved child of the Kurus,
the intelligence of those who are irresolute is many-branched.


___
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] devanagari is missing an accent in newest beta

2018-10-23 Thread Arthur Reutenauer
On Mon, Oct 22, 2018 at 10:08:01AM +0200, Melroch wrote:
> I haven't seen the examples since my tablet refuses to display them, but I
> wonder if you have run into a difference between Hindi and Marathi
> typography. The repha in Marathi is sometimes represented as a slightly
> curved stroke between two letters.

  Thanks Benct, but the little dot I think I see (actually a square
shape) does not look like that.

>Googling "eyelash repha" I found this:
> 
> http://unicode.org/~emuller/iwg/p8/utcdoc.html

  The source standard also works :-)

  The Unicode Standard version 11.0, p. 455 (part of chapter 12,
http://www.unicode.org/versions/Unicode11.0.0/ch12.pdf)

Best,

Arthur
___
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] devanagari is missing an accent in newest beta

2018-10-23 Thread Melroch
I haven't seen the examples since my tablet refuses to display them, but I
wonder if you have run into a difference between Hindi and Marathi
typography. The repha in Marathi is sometimes represented as a slightly
curved stroke between two letters. Googling "eyelash repha" I found this:

http://unicode.org/~emuller/iwg/p8/utcdoc.html

Den fre 19 okt 2018 13:30Ulrike Fischer  skrev:

> Am Fri, 19 Oct 2018 11:36:48 +0200 schrieb Arthur Reutenauer:
>
> >> Screenshots and code that show the difference and the missing accent
> >> in the xelatex and context output are in this comment
>
> >> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-431288932
>
> >> the older (perfect) output is in a comment above
> >> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-426978522
> >
> >   The missing “accent” is a repha, a form of the consonant ra.  It seems
> > to have been replaced by a middle dot, to the right of the base
> > consonant.  I can’t be completely sure because it’s protruding into the
> > next consonant so it’s almost indistinguishable from it, but I think
> > that’s what happened.
>
> Yes, good catch. there is a dot. But I'm wondering if I saw ghosts
> when thinking that it worked before. I can't find no commit which
> changes to the "right" output and also in a older context it is
> wrong.
>
>
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
>
> ___
> 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] devanagari is missing an accent in newest beta

2018-10-19 Thread Ulrike Fischer
Am Fri, 19 Oct 2018 11:36:48 +0200 schrieb Arthur Reutenauer:

>> Screenshots and code that show the difference and the missing accent
>> in the xelatex and context output are in this comment

>> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-431288932

>> the older (perfect) output is in a comment above
>> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-426978522
> 
>   The missing “accent” is a repha, a form of the consonant ra.  It seems
> to have been replaced by a middle dot, to the right of the base
> consonant.  I can’t be completely sure because it’s protruding into the
> next consonant so it’s almost indistinguishable from it, but I think
> that’s what happened.

Yes, good catch. there is a dot. But I'm wondering if I saw ghosts
when thinking that it worked before. I can't find no commit which
changes to the "right" output and also in a older context it is
wrong. 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] devanagari is missing an accent in newest beta

2018-10-19 Thread Arthur Reutenauer
On Fri, Oct 19, 2018 at 10:50:14AM +0200, Ulrike Fischer wrote:
> Screenshots and code that show the difference and the missing accent
> in the xelatex and context output are in this comment
> 
> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-431288932
> 
> the older (perfect) output is in a comment above
> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-426978522

  The missing “accent” is a repha, a form of the consonant ra.  It seems
to have been replaced by a middle dot, to the right of the base
consonant.  I can’t be completely sure because it’s protruding into the
next consonant so it’s almost indistinguishable from it, but I think
that’s what happened.

Best,

Arthur
___
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] decomposed and precomposde glyphs

2017-02-24 Thread Hans Hagen

On 2/24/2017 10:35 AM, Ulrike Fischer wrote:

Am Thu, 23 Feb 2017 17:20:05 +0100 schrieb Arthur Reutenauer:


I looked at the code and it actually uses an idea that I had already
tried. The problem I couldn't solve was do decompose a glyph.
Looking at an context example it seems that context can do it. The B
with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
context does it?


It uses the Unicode composition information (part of UnicodeData.txt),
they’re made into a Lua table in ConTeXt (named char-def.lua, if it
hasn’t changed).


I know of char-def.lua but the question was more *how* the
information is used and *when*. In an input call back? Through a
font feature?


in the case of the feature i sent you it's a font feature (so it 
operates on the stream of characters that the font machinery sees)


but in context we can also do it in the input (several ways)

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] decomposed and precomposde glyphs

2017-02-24 Thread Ulrike Fischer
Am Thu, 23 Feb 2017 17:20:05 +0100 schrieb Arthur Reutenauer:

>> I looked at the code and it actually uses an idea that I had already
>> tried. The problem I couldn't solve was do decompose a glyph.
>> Looking at an context example it seems that context can do it. The B
>> with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
>> context does it?
> 
> It uses the Unicode composition information (part of UnicodeData.txt),
> they’re made into a Lua table in ConTeXt (named char-def.lua, if it
> hasn’t changed).

I know of char-def.lua but the question was more *how* the
information is used and *when*. In an input call back? Through a
font feature?

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] decomposed and precomposde glyphs

2017-02-23 Thread Arthur Reutenauer
> I looked at the code and it actually uses an idea that I had already
> tried. The problem I couldn't solve was do decompose a glyph.
> Looking at an context example it seems that context can do it. The B
> with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
> context does it?

  It uses the Unicode composition information (part of UnicodeData.txt),
they’re made into a Lua table in ConTeXt (named char-def.lua, if it
hasn’t changed).

Best,

Arthur
___
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] decomposed and precomposde glyphs

2017-02-23 Thread Hans Hagen

On 2/23/2017 4:12 PM, Ulrike Fischer wrote:

Am Thu, 23 Feb 2017 14:08:54 +0100 schrieb Hans Hagen:


Did you sent the second mail only for me for a reason or did you
only forget to add the list? Imho this is interesting for others
too.


well, it had an attachment that you can test which is not meant for
context (to which i'll add a similar collapse feature, off by default of
course as an escape) .. if that kind of stuff makes it into the latex
font code is up to others


I looked at the code and it actually uses an idea that I had already
tried. The problem I couldn't solve was do decompose a glyph.
Looking at an context example it seems that context can do it. The B
with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
context does it? It doesn't happen with a similar latex example.
There the U+1E04 is simply missing.

And why is the dot of the first B better placed than the second?


\starttext
\directlua
{
  fonts.handlers.otf.addfeature
  {
name = "compose",
type = "ligature",
data =
{
  ["Ạ"]={ "A", "̣" },
  ["Ḅ"]={ "B", "̣" },
},
  }
}

\font\test={file:lmroman10-regular.otf:+compose;}

\test

Ḅ Ạ Ḅ %why are both B in the pdf???

\stoptext


it's not a ligature but a multiple

fonts.handlers.otf.addfeature
  {
name= "decompose",
type= "multiple",
nocheck = true, -- new trick
data=
{
  ["Ḅ"] = { "Q", "̣" },
  ["Ạ"] = { "X", "̣" },
},
  }

as with all features we check against the font so of the font has no Ḅ
nothing happens and you won't see one either (as the font has no)

i'll add the nocheck option (but of course one can expect side effects 
when a font has nothing relevant)



-
  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] decomposed and precomposde glyphs

2017-02-23 Thread Ulrike Fischer
Am Thu, 23 Feb 2017 14:08:54 +0100 schrieb Hans Hagen:

>> Did you sent the second mail only for me for a reason or did you
>> only forget to add the list? Imho this is interesting for others
>> too.
> 
> well, it had an attachment that you can test which is not meant for 
> context (to which i'll add a similar collapse feature, off by default of 
> course as an escape) .. if that kind of stuff makes it into the latex 
> font code is up to others

I looked at the code and it actually uses an idea that I had already
tried. The problem I couldn't solve was do decompose a glyph.
Looking at an context example it seems that context can do it. The B
with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
context does it? It doesn't happen with a similar latex example.
There the U+1E04 is simply missing.

And why is the dot of the first B better placed than the second?
 

\starttext
\directlua
{
  fonts.handlers.otf.addfeature
  {
name = "compose",
type = "ligature",
data =
{
  ["Ạ"]={ "A", "̣" },
  ["Ḅ"]={ "B", "̣" },
},
  }
}

\font\test={file:lmroman10-regular.otf:+compose;}

\test

Ḅ Ạ Ḅ %why are both B in the pdf???

\stoptext




-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] decomposed and precomposde glyphs

2017-02-23 Thread Hans Hagen

On 2/23/2017 3:05 PM, Ulrike Fischer wrote:

Am Thu, 23 Feb 2017 14:08:54 +0100 schrieb Hans Hagen:


btw, i suppose most context enter composed glyphs anyway instead of
separate thingies


But as my example (for the B with dot below) shows that this fails
if the font hasn't the precomposed glyph.

Also the problem is not so much to control the direct input but
copy


collapsing only can work for direct chars (so not \char for which we 
need that pseudo feature) ... when you put this on the first line it 
should do better


% directives="filters.utf.collapse=yes"

\starttext
ạ ị Ạ g̣
\stoptext

should work (and it should be on by default which somehow it wasn't, 
probably disabled when i added some other input handling but no one 
noticed so far)


-
  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] decomposed and precomposde glyphs

2017-02-23 Thread Ulrike Fischer
Am Thu, 23 Feb 2017 14:08:54 +0100 schrieb Hans Hagen:

> btw, i suppose most context enter composed glyphs anyway instead of 
> separate thingies

But as my example (for the B with dot below) shows that this fails
if the font hasn't the precomposed glyph.

Also the problem is not so much to control the direct input but
copy  

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] decomposed and precomposde glyphs

2017-02-23 Thread Ulrike Fischer
Am Thu, 23 Feb 2017 13:19:12 +0100 schrieb Hans Hagen:

> On 2/23/2017 11:58 AM, Ulrike Fischer wrote:
>> When using input like the following with xetex then harfbuzz kicks
>> in and one would always get the good looking precomposed U+1EA0 for
>> the A and the decomposed B+U+0323 for the B.
>>
>> With context (and lualatex) one get a rather bad looking -- as the
>> dot is misplaced -- output for the A0323 input and no output at
>> all for 1e04.
>>
>> As the coverage for precomposed glyphs varies a lot across fonts
>> this is rather a nuisance.  Is there a way to get the fontloader
>> (also the one used by luaotfload) to do a similar substituation as
>> done by harfbuzz?
>>
>> \starttext
>> \catcode`\^= 7
>> Ạ A0323  %decomposed input -> U+1EA0 with xetex
>>
>> Ạ  1ea0  %precomposed input
>>
>>
>> Ḅ B0323  %decomposed input
>>
>> 1e04 %precomposed input -> B+U+0323 with xetex
>>
>>
>> \stoptext
>>
>>
>> (I added the ^^-notation to avoid problems with copy)
> 
> In context one can enable a collapse (last week i found out that it was 
> off by default).
> 
> Anyway, there are two issues here:
> 
> (1) one can in the input stream collapse the dot accent and the other 
> character but of course an altered input might not be what one wants,

No changing the input is imho not a solution as the document fonts
can have different coverage of the glyphs. Whatever is done must be
font dependant. 

> (btw, I suppose that xetex can disable that on demand as from your
> post I deduce that it's default behaviour and fighting defaults
> is a pain).

I don't think that one disable the behaviour in xetex, the internal
harfbuzz library is doing it. There is imho no way to get a
A+combining accent in a document.

I agree that it would be neat to be able to disable it but on the
whole: if I had only the choice between "the xetex-substituation"
and the current luatex/context behaviour I would prefer the first.
For normal documents it is preferable. 

Did you sent the second mail only for me for a reason or did you
only forget to add the list? Imho this is interesting for others
too. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] decomposed and precomposde glyphs

2017-02-23 Thread Hans Hagen

On 2/23/2017 11:58 AM, Ulrike Fischer wrote:

When using input like the following with xetex then harfbuzz kicks
in and one would always get the good looking precomposed U+1EA0 for
the A and the decomposed B+U+0323 for the B.

With context (and lualatex) one get a rather bad looking -- as the
dot is misplaced -- output for the A0323 input and no output at
all for 1e04.

As the coverage for precomposed glyphs varies a lot across fonts
this is rather a nuisance.  Is there a way to get the fontloader
(also the one used by luaotfload) to do a similar substituation as
done by harfbuzz?

\starttext
\catcode`\^= 7
Ạ A0323  %decomposed input -> U+1EA0 with xetex

Ạ  1ea0  %precomposed input


Ḅ B0323  %decomposed input

1e04 %precomposed input -> B+U+0323 with xetex


\stoptext


(I added the ^^-notation to avoid problems with copy)


In context one can enable a collapse (last week i found out that it was 
off by default).


Anyway, there are two issues here:

(1) one can in the input stream collapse the dot accent and the other 
character but of course an altered input might not be what one wants, 
for instance because fonts fonts not always provide a decompose (ccmp) 
or composed glyphs


(2) one can mess at the node list level which has a potyential drawback 
that one cannot get a character (explicit \char) there without the 
danger of it being mangled


so, whatever method one chooses, it has to be controlled because in tex 
all is about control (think of verbatim)


I have a file here that implements a pseudo feature that does this kind 
of (trivial) magic and I can add that to the distribution. (btw, I 
suppose that xetex can disable that on demand as from your post I deduce 
that it's default behaviour and fighting defaults is a pain).


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] decomposed and precomposde glyphs

2017-02-23 Thread Ulrike Fischer
When using input like the following with xetex then harfbuzz kicks
in and one would always get the good looking precomposed U+1EA0 for
the A and the decomposed B+U+0323 for the B.

With context (and lualatex) one get a rather bad looking -- as the
dot is misplaced -- output for the A0323 input and no output at
all for 1e04. 

As the coverage for precomposed glyphs varies a lot across fonts
this is rather a nuisance.  Is there a way to get the fontloader
(also the one used by luaotfload) to do a similar substituation as
done by harfbuzz?

\starttext
\catcode`\^= 7
Ạ A0323  %decomposed input -> U+1EA0 with xetex

Ạ  1ea0  %precomposed input 


Ḅ B0323  %decomposed input

1e04 %precomposed input -> B+U+0323 with xetex


\stoptext


(I added the ^^-notation to avoid problems with copy) 

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] Dot fills shifted down

2017-01-31 Thread Procházka Lukáš Ing .

Hello,

the solution works fine, thank you!

Best regards,

Lukas


On Tue, 31 Jan 2017 13:08:28 +0100, Otared Kavian  wrote:


Hi Lukas,

Maybe you can use

symbol=\lower.25em\hbox{.},

instead of what you set in your \definefiller definition is what you need?

Best regards: OK


On 31 Jan 2017, at 12:33, Procházka Lukáš Ing.  wrote:

Hello,

the following code:


 \definefiller
  [DotFill]
  [alternative=symbol,
  symbol=.,
  width=.5em,
  style=\txx]

Fill here: \filler[DotFill]{}


produces filler with dots on the baseline.

Is there a way to shift the dots a bit lower, bellow the baseline, e.g. to 
0.25em bellow?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___
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] Dot fills shifted down

2017-01-31 Thread Otared Kavian
Hi Lukas,

Maybe you can use

symbol=\lower.25em\hbox{.},

instead of what you set in your \definefiller definition is what you need?

Best regards: OK

> On 31 Jan 2017, at 12:33, Procházka Lukáš Ing.  wrote:
> 
> Hello,
> 
> the following code:
> 
> 
>  \definefiller
>   [DotFill]
>   [alternative=symbol,
>   symbol=.,
>   width=.5em,
>   style=\txx]
> 
> Fill here: \filler[DotFill]{}
> 
> 
> produces filler with dots on the baseline.
> 
> Is there a way to shift the dots a bit lower, bellow the baseline, e.g. to 
> 0.25em bellow?
> 
> Best regards,
> 
> Lukas
> 
> 
> -- 
> Ing. Lukáš Procházka | mailto:l...@pontex.cz
> Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
> IDDS:nrpt3sn
> Bezová 1658
> 147 14 Praha 4
> 
> Tel: +420 241 096 751 (+420 720 951 172)
> Fax: +420 244 461 038
> 
> ___
> 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
___

  1   2   3   4   5   6   >