[NTG-context] Re: font error in float placement?

2024-01-13 Thread Henning Hraban Ramm

Am 13.01.24 um 21:09 schrieb Henning Hraban Ramm:

Here’s the image:
https://yemaya.fiee.net/s/8TqwfcP7mLMmy9p
(In a simple document it works.)


I found a workaround: I opened the file with Inkscape and converted 
everything in curves. The PDF is even smaller now, and it proves that 
the problem was with the fonts. Saving it in Acrobat Pro didn’t help.


BTW the "compact" settings didn’t change anything for my big songbook 
(hundreds of note line PDFs with included fonts); I’m not sure about the 
code examples in my ConTeXt book.


I found more graphics (PDFs with included fonts) that triggered the 
error, one of them a LilyPond example that was no problem in the songbook.
Something in my ConTeXt book setup causes a different handling of these 
externalfigures – but a small example with the same environments worked.


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

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


[NTG-context] Re: font error in float placement?

2024-01-13 Thread Henning Hraban Ramm

Am 13.01.24 um 19:43 schrieb Henning Hraban Ramm:

(LMTX, latest beta with self-compiled binary on OSX-intel.)

With my book, I run into an Lua error while placing a sidefloat.
If I comment \externalfigure or replace the image with a different one, 
the error disappears.


I can’t reproduce it in a minimal example, so I guess it depends on the 
current surroundings.


Since it points to some font handling and the figure is a PDF containing 
fonts, I guess it might depend on the new handling of fonts in PDFs, but 
it doesn’t change regardless of 
\setupexternalfigures[compact=preset:merge] or other settings.


Here’s the image:
https://yemaya.fiee.net/s/8TqwfcP7mLMmy9p
(In a simple document it works.)


I found a workaround: I opened the file with Inkscape and converted 
everything in curves. The PDF is even smaller now, and it proves that 
the problem was with the fonts. Saving it in Acrobat Pro didn’t help.


BTW the "compact" settings didn’t change anything for my big songbook 
(hundreds of note line PDFs with included fonts); I’m not sure about the 
code examples in my ConTeXt book.


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

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


[NTG-context] font error in float placement?

2024-01-13 Thread Henning Hraban Ramm

(LMTX, latest beta with self-compiled binary on OSX-intel.)

With my book, I run into an Lua error while placing a sidefloat.
If I comment \externalfigure or replace the image with a different one, 
the error disappears.


I can’t reproduce it in a minimal example, so I guess it depends on the 
current surroundings.


Since it points to some font handling and the figure is a PDF containing 
fonts, I guess it might depend on the new handling of fonts in PDFs, but 
it doesn’t change regardless of 
\setupexternalfigures[compact=preset:merge] or other settings.


Here’s the image:
https://yemaya.fiee.net/s/8TqwfcP7mLMmy9p
(In a simple document it works.)

Hraban

"""
lua error   > lua error on line 516 in file de/c_feinheiten.tex:

registered function call [1565]: 
...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:596: attempt 
to index a nil value (field 'embed')

stack traceback:
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:596: in 
local 'handler'
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:709: in 
upvalue 'plugin'
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:938: in 
upvalue 'lpdf_epdf_fontplugin'
	[string "local lpdf_epdf_fontplugin = lpdf.epdf.fontpl..."]:3: in local 
'runner'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:97: in 
upvalue 'lpdf_epdf_contentplugin'
	[string "local lpdf_epdf_contentplugin = lpdf.epdf.con..."]:3: in local 
'runner'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:119: in 
field 'pageplugin'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:1371: in 
upvalue 'copypage'
	...-10/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:112: in 
function <...-10/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:97>
	...-10/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1680: in 
function <...-10/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1665>

(...tail calls...)
506 \startsubsection[title=Schriftwahl]
…
513
514 \startplacefigure[title={Beispiele für gebrochene Schriften, 
halbherzig von Hand ausgeglichen},location=right,reference=abb:fraktur]

515 \externalfigure[gebrochene_schriften][width=.5\textwidth]
516 >>  \stopplacefigure
"""
___
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: Do we have a geometry library for Metafun?

2024-01-13 Thread Shiv Shankar Dayal
Can we please add
https://github.com/jemmybutton/byrne-euclid/blob/master/byrne.mp to Wiki
because files have a tendency to disappear?
Similarly, can we please add
https://github.com/thruston/Drawing-with-Metapost/blob/main/Drawing-with-Metapost.pdf
file to Wiki?
-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Shiv Shankar Dayal
The fiziko library by the same author is also very interesting:
> https://github.com/jemmybutton/fiziko
> Since it has some pseudo-3D features, maybe you can learn from it.
>

Thanks for all this info. I will look into this and perhaps come up with a
Metapost file, and then we can possibly add that in Wiki.
I do not know Lua, and I am too old to learn another programming language.
These days, I program only in Rust/Javascript.

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

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


[NTG-context] Re: Why the way key-value argument is called affected the document's output?

2024-01-13 Thread Wolfgang Schuster

Ali Ali schrieb am 08.01.2024 um 23:53:

Since in the "setup-en.pdf" on p. 234, in "\setuplayout" the possible values for "grid" key is 
"yes", "no" (default), and "off" respectively.


The commands in the document are not always up to date and somtimes miss 
entries or list no longer valid ones, in this case the NAME placeholder 
is missing.



So what does the "yes " (with a trailing space) sets "grid" key to?


The expected behavior is to ignore invalid arguments and fall back to a 
default (in this case "no")option.


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: Do we have a geometry library for Metafun?

2024-01-13 Thread Henning Hraban Ramm

Am 13.01.24 um 15:54 schrieb Gavin via ntg-context:

One pretty MetaPost drawing option is the byrne package by Sergey Slyusarev, 
which he used (with ConTeXt) to reproduce Oliver Byrne’s 1847 quirky edition on 
the first six books of Euclid’s “Elements”. All of the drawing is in MetaPost, 
and would work with MetaFun (I think). The LaTeX package is in TeX Live, and 
the ConTeXt version is at https://github.com/jemmybutton/byrne-euclid/.


The fiziko library by the same author is also very interesting:
https://github.com/jemmybutton/fiziko
Since it has some pseudo-3D features, maybe you can learn from it.

Hraban

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

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


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Gavin via ntg-context
Hi Shiv,

The author of tikz-euclide has another package, tikz-elements, which looks like 
it could be used to do all of these calculations for MetaFun.

The tikz-elements package, in spite of its name, appears to contain exactly one 
line of TikZ code. This line is in the very simple style file, 
tkz-elements.sty. Everything else is written in Lua. I think we could write a 
simple ConTeXt environment file that would replace tkz-elements.sty, making all 
of the tikz-elements package available for MetaFun rather than TikZ.

This would not give you the pretty drawing features of tikz-euclide, since 
those features really are written in TikZ. I do not know of a MetaPost package 
that does the same thing, but there might be one.

One pretty MetaPost drawing option is the byrne package by Sergey Slyusarev, 
which he used (with ConTeXt) to reproduce Oliver Byrne’s 1847 quirky edition on 
the first six books of Euclid’s “Elements”. All of the drawing is in MetaPost, 
and would work with MetaFun (I think). The LaTeX package is in TeX Live, and 
the ConTeXt version is at https://github.com/jemmybutton/byrne-euclid/.

Gavin


> On Jan 12, 2024, at 6:27 PM, Shiv Shankar Dayal  
> wrote:
> 
> 
> No library that I know of, but drawing tangents (and therefore, 
> perpendiculars) is straight-forward:
> 
>https://tex.stackexchange.com/a/108060/323
> 
> Circumcircle, orthocenter, etc... are you thinking of triangles or general 
> polynomails?
> 
> Triangles. I understand that most of it is very easy, but still a library 
> will help new users.
> Tikz has Tikz-Euclide and Asymptote has a Geometry package. A similar library 
> for Metafun
> will be very useful.
>  -- 
> Respect,
> Shiv Shankar Dayal
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

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


[NTG-context] Re: Asking help for better way to make tickets.

2024-01-13 Thread Jeong Dal via ntg-context
Dear Bruce and Marco,

Thank you for your suggestions. 
I think that it would be good enough to replace my code.
I learned new method which doesn’t use metaFun.

I’ll modify what you suggested for my purpose.

Thank you again.

Best regards,

Dalyoung


> 2024. 1. 13. 오전 7:38, Bruce Horrocks  작성:
> 
> 
> 
>> On 12 Jan 2024, at 14:05, Jeong Dal via ntg-context  
>> wrote:
>> 
>> Dear all,
>> 
>> I’d like to make a ticket on A4 as follows:
>> 
>> 1. Use all of A4(no margin, no header, no footer,…)
>> 2. Arange 12 tickets in the form of 3 x 4 on one page,
>> 3. Two rows are same,
>> 4. Numbers in the center of the ticket which is increasing.
>> 
>> I use the following code to make it.
>> 
>> but I think that there is a better and simpler way to do it which I don’t 
>> know.
>> 
>> I hope that someone give me a nicer way to do it.
> 
> Not sure if it is 'nicer' but I use a table to print addresses onto sticky 
> labels. The code should be fairly easy to adapt or just borrow some ideas.
>  >
> 
> —
> Bruce Horrocks
> Hampshire, UK
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl  / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl 
> 
> webpage  : https://www.pragma-ade.nl  / 
> https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context 
> 
> wiki : https://wiki.contextgarden.net 
> ___

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

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