[NTG-context] Re: get measures as dimension in Lua

2024-06-10 Thread Hans Hagen via ntg-context
On 6/10/2024 7:08 AM, Max Chernoff wrote: Hi Hraban, On Sun, 2024-06-09 at 22:12 +0200, Henning Hraban Ramm wrote: when I define a measure on the TeX side, I used to get at the value in Lua with tex.getdim, like: \definemeasure[Bleed][3mm] tex.getdimen("Bleed") But now I get "incorrect dimen

[NTG-context] Re: get measures as dimension in Lua

2024-06-10 Thread Henning Hraban Ramm
Thank you, Max, for the effort and Hans for a core solution! Am 10.06.24 um 10:28 schrieb Hans Hagen via ntg-context: Indeed we can have:     local namespace = tokens.getters.macro("??measure")     function tex.getmeasure(name,asdimen)     local value = tex.getdimensionvalue(namespace..

[NTG-context] Scale content to height of the font, measure font height

2024-06-10 Thread Gerion Entrup
Hi, I'd like to scale something (actually a symbol drawn in TikZ) to the exact high of the char 'M'. I found the scale environment for it but struggle to measure the correct font height. I found the "definemeasure/measure/measured" commands but they define a dimension and are not for doing meas

[NTG-context] Re: Scale content to height of the font, measure font height

2024-06-10 Thread Hans Hagen
On 6/10/2024 1:16 PM, Gerion Entrup wrote: Hi, I'd like to scale something (actually a symbol drawn in TikZ) to the exact high of the char 'M'. I found the scale environment for it but struggle to measure the correct font height. I found the "definemeasure/measure/measured" commands but they def

[NTG-context] Re: Scale content to height of the font, measure font height

2024-06-10 Thread seyal zavira
Also you can use this: assuming that you have a fixed size figure such as a pdf page: \definesymbol[Bsymbol][{\scale[width=1.6ex]{\externalfigure[myfile.pdf][page=1]}}] \define\mysym{\kern 0.2em \symbol[Bsymbol] \kern 0.3em} \starttext this is a sample\mysym text. \tfa{this is a sample\mysym tex

[NTG-context] dimen 100.0pt not 100.0pt?

2024-06-10 Thread Hans van der Meer via ntg-context
The I do not understand. I am testing if a dimension set can be checked against the expected value. It looks like 100.0pt is not really 100.0pt. Why? And how can I do this test properly with true as result? \scratchdimen=100pt\relax \iftok{\the\scratchdimen}{100.0

[NTG-context] Re: Scale content to height of the font, measure font height

2024-06-10 Thread Wolfgang Schuster
Gerion Entrup schrieb am 10.06.2024 um 13:16: Hi, I'd like to scale something (actually a symbol drawn in TikZ) to the exact high of the char 'M'. I found the scale environment for it but struggle to measure the correct font height. I found the "definemeasure/measure/measured" commands but they

[NTG-context] Re: dimen 100.0pt not 100.0pt?

2024-06-10 Thread Wolfgang Schuster
Hans van der Meer via ntg-context schrieb am 10.06.2024 um 15:46: The I do not understand. I am testing if a dimension set can be checked against the expected value. It looks like 100.0pt is not really 100.0pt. Why? And how can I do this test properly with true as result? \scratchdimen=100pt\r

[NTG-context] Re: dimen 100.0pt not 100.0pt?

2024-06-10 Thread Hans Hagen via ntg-context
On 6/10/2024 3:46 PM, Hans van der Meer via ntg-context wrote: The I do not understand. I am testing if a dimension set can be checked against the expected value. It looks like 100.0pt is not really 100.0pt. Why? And how can I do this test properly with true as result? \scratchdimen=100pt\rela

[NTG-context] [ remove all metadata in pdf ]

2024-06-10 Thread vm via ntg-context
Is there a parameter for context lmtx to strip all metadata from the generated pdf? Or is that a better task for exiftool afterwards? .F ___ If your question is of interest to others as well, please add an entry to

[NTG-context] Re: [ remove all metadata in pdf ]

2024-06-10 Thread Pablo Rodriguez via ntg-context
On 6/10/24 17:49, vm via ntg-context wrote: > Is there a parameter for context lmtx to strip all metadata from the > generated pdf? > Or is that a better task for exiftool afterwards? \enabledirectives[backend.date=none] But this doesn’t remove all metadata. Title, Producer and XMP data still

[NTG-context] suggestion: two templates for the wiki

2024-06-10 Thread Pablo Rodriguez via ntg-context
Dear Taco and Hraban, trying to improve the XML page from the wiki, I think it would be extremely useful to have two templates for inline code: {{xml|…}}: inline XML highlighted as for blocks. {{tex|…}}: inline TeX code highlighted as for blocks. As for the second, {{cmd|…}} includes a link (

[NTG-context] nearly on topic: BoVeX, AI alignment

2024-06-10 Thread Henning Hraban Ramm
Funny idea of replacing hyphenation with LLM-generated alternative wording, also explains a bit how TeX works: http://tom7.org/bovex/ (a SIGBOVIK submission) ;) hr ___ If your question is of interest to others as we