[NTG-context] Re: simplify side by side Poems

2024-05-23 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 23.05.2024 um 14:13:

Hi all,

i want to use tables for constructing poems structure
this snippet of code works well:

\startsetups tablepoem
\setupTABLE[column][each][width=5cm]
\stopsetups
\starttext
\bTABLE[setups=tablepoem]
\bTR \bTD One one ons ksl   \eTD \bTD  two gfjgfd oski kwo \eTD \eTR
\bTR \bTD One wer s dft tgf \eTD \bTD  two gfkdsjg dfs we  \eTD \eTR
\eTABLE
\stoptext

but when i use this code for simplifying of changing cells I get an error:

\startsetups tablepoem
\setupTABLE[column][each][width=5cm]
\stopsetups

\def\Poemstart{\bTABLE[setups=tablepoem] \bTR \bTD}
\def\Mesra{\eTD \bTD}
\def\nextBeyt{\eTD\eTR\bTR\bTD}
\def\Poemstop{\eTD\eTR\eTABLE}

\starttext
\Poemstart
One one ons ksl\Mesratwo gfjgfd oski kwo  \nextBeyt
One wer s dft tgf   \Mesratwo gfkdsjg dfs we
\Poemstop
\stoptext

what is the problem?


The table environment collects the content of the table cell-wise which 
means when TeX sees a \bTD in the input it reads the following text 
until it finds the corresponding \eTD. When you put the \eTD in the 
definition of another command the scanner will never find the end of a 
cell and you either run out of memory or reach the end of the file etc.


Below are a few alternative solutions to simplify the input, one of them 
is an alternative version of input (\startTABLE) for natural tables 
which uses the same commands to separate columns as tabulate does.


 begin example
\starttext

\startTABLE[width=5cm]
\NC One one ons ksl   \NC two gfjgfd oski kwo \NC\NR
\NC One wer s dft tgf \NC two gfkdsjg dfs we  \NC\NR
\stopTABLE

\starttabulate[|*{2}{k{0}lw(5cm)|}]
\NC One one ons ksl   \NC two gfjgfd oski kwo \NC\NR
\NC One wer s dft tgf \NC two gfkdsjg dfs we  \NC\NR
\stoptabulate

\defineparagraphs[poem][n=2,width=5cm]
\setupparagraphs[poem][each][width=5cm,distance=0pt]

\startpoem
  \startlines
  One one ons ksl
  One wer s dft tgf
  \stoplines
\nextpoem
  \startlines
  two gfjgfd oski kwo
  two gfkdsjg dfs we
  \stoplines
\stoppoem

\stoptext
 end example

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

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


[NTG-context] simplify side by side Poems

2024-05-23 Thread seyal . zavira
Hi all,

i want to use tables for constructing poems structure
this snippet of code works well:

\startsetups tablepoem
\setupTABLE[column][each][width=5cm]
\stopsetups
\starttext
\bTABLE[setups=tablepoem]
\bTR \bTD One one ons ksl   \eTD \bTD  two gfjgfd oski kwo \eTD \eTR
\bTR \bTD One wer s dft tgf \eTD \bTD  two gfkdsjg dfs we  \eTD \eTR
\eTABLE
\stoptext

but when i use this code for simplifying of changing cells I get an error:

\startsetups tablepoem
\setupTABLE[column][each][width=5cm]
\stopsetups

\def\Poemstart{\bTABLE[setups=tablepoem] \bTR \bTD}
\def\Mesra{\eTD \bTD}
\def\nextBeyt{\eTD\eTR\bTR\bTD}
\def\Poemstop{\eTD\eTR\eTABLE}

\starttext
\Poemstart
One one ons ksl\Mesratwo gfjgfd oski kwo  \nextBeyt
One wer s dft tgf   \Mesratwo gfkdsjg dfs we  
\Poemstop
\stoptext

what is the problem?
___
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: Playing with math font setup

2024-05-21 Thread Hans Hagen

On 5/21/2024 4:40 PM, Ali Ali wrote:

Hi, hope everyone's doing well!

Is it possible to setup math font so that all the basic ascii characters (i.e. 
a..zA..Z0..9) glyphs are substituted with current serif (or sans) font. I tried 
playing with fallback thing but it didn't got me anywhere!

e.g. $x$ will use the 'x' glyph from current serif italic font, and $\bf x$ 
will use the 'x' glyph from current serif bold font!
I would appreciate any suggestions and help!

Suppose we have all the required font files in the 'font' directory of the 
working directory, and below is the minimal source code!
"""
\starttypescriptcollection[CustomFontSelection]
   \starttypescript [serif] [CustomFontSelection] [name]
 \setups[font:fallback:serif]
 \definefontsynonym [Serif]
 % [file:font/Lora-Regular.ttf]
 [file:font/Lora-Medium.ttf]
 [features=default,fallbacks=Serif]
 \definefontsynonym [SerifBold]
 [file:font/Lora-Bold.ttf]
 [features=default,fallbacks=SerifBold]
 \definefontsynonym [SerifItalic]
 % [file:font/Lora-Italic.ttf]
 [file:font/Lora-MediumItalic.ttf]
 [features=default,fallbacks=SerifItalic]
 \definefontsynonym [SerifBoldItalic]
 [file:font/Lora-BoldItalic.ttf]
 [features=default,fallbacks=SerifBoldItalic]
   \stoptypescript

   \starttypescript [math] [CustomFontSelection] [name]
 %%% \definefontfallback [MathRomanFallBack]
 %%% [SansItalic]
 %%% [extendedlatin]
 %%% [force=yes]
 \definefontsynonym [MathRoman]
 [file:font/STIXTwoMath-Regular.otf]
 [features=math,fallbacks=MathRomanFallBack]
   \stoptypescript

   \starttypescript[CustomFontSelection]
 \definetypeface [CustomFontSelection] [rm] [serif] [CustomFontSelection]   
 [default] [rscale=0.9]
 \definetypeface [CustomFontSelection] [ss] [sans]  
[newcomputermodern-book] [default]
 \definetypeface [CustomFontSelection] [tt] [mono]  
[newcomputermodern-book] [default]
 \definetypeface [CustomFontSelection] [mm] [math]  [CustomFontSelection]   
 [default] [rscale=0.97]
   \stoptypescript
\stoptypescriptcollection

\setupbodyfont[CustomFontSelection]


\starttext

We use $X$, $Y$, $Z$ and $n$, $m$, etc. $\sin(x) \to \limsup x_n$ whatever.

\mathematics{%
   \delta_{ij} =
 \startmathcases
 \NC 1 \NC \text{if } i = j \NR
 \NC 0 \NC \text{otherwise} \NR
 \stopmathcases
}

We use $\bf X$, $\bf Y$, $\bf Z$ and $\bf n$, $\bf m$, etc. $\bf \sin(x) \gets 
\limsup x_n$ whatever.

\stoptext
"""


More like this (if you want decent math). Also, use a math font as base 
that matches the fallbacks, also metric wise.


\starttypescriptcollection[CustomFontSelection]

\starttypescript [serif] [CustomFontSelection] [name]
\setups[font:fallback:serif]
\definefontsynonym [Serif]   [name:dejavuserif] 
  [features=default]
\definefontsynonym [SerifBold]   [name:dejavuserifbold] 
  [features=default]
\definefontsynonym [SerifItalic] [name:dejavuserifitalic] 
  [features=default]
\definefontsynonym [SerifBoldItalic] 
[name:dejavuserifbolditalic] [features=default]

\stoptypescript

\starttypescript [math] [CustomFontSelection] [name]
\definefontfallback [MathRomanFallBack]
[name:dejavuserifitalic]
[lowercaseitalic,uppercaseitalic]
[force=yes]
\definefontfallback [MathRomanFallBack]
[name:dejavuserifbolditalic]
[lowercasebolditalic,uppercasebolditalic]
[force=yes]
\definefontfallback [MathRomanFallBack]
[name:dejavuserif]
[lowercasenormal,uppercasenormal]
[force=yes]
\definefontfallback [MathRomanFallBack]
[name:dejavuserifbold]
[lowercasebold,uppercasebold]
[force=yes]
\definefontsynonym
[MathRoman]
[file:stixtwomath-regular.ttf]

[features={math\mathsizesuffix,stixtwomath,stixtwo:mathextra,mathextra},%
 fallbacks=MathRomanFallBack,%
 goodies=stixtwo-math]
\definefontsynonym
[MathRomanBold]
[file:stixtwomath-regular.ttf]

[features={math\mathsizesuffix,stixtwo-math-bold,stixtwomath,stixtwo:mathextra,mathextra},%
 fallbacks=MathRomanFallBack,%
 goodies=stixtwo-math]
\stoptypescript

\starttypescript[CustomFontSelection]
\definetypeface [CustomFontSelection] [rm] [serif] 
[CustomFontSelection][default] [rscale=0.9]
\definetypeface [CustomFontSelection] [ss] [sans] 
[newcomputermodern-book] [default]
\definetypeface [CustomFontSelection] [tt] [mono] 
[newcomputermodern-book] [default]
\definetypeface [CustomFontSelection] [mm] [math] 
[CustomFontSelection][default] [rscale=0.97]

\stoptypescript

\stoptypescriptcollection

\setupbodyfont[CustomFontSelection]


\starttext

We use $X$, $Y$, $Z$ and $n$, 

[NTG-context] Playing with math font setup

2024-05-21 Thread Ali Ali
Hi, hope everyone's doing well!

Is it possible to setup math font so that all the basic ascii characters (i.e. 
a..zA..Z0..9) glyphs are substituted with current serif (or sans) font. I tried 
playing with fallback thing but it didn't got me anywhere!

e.g. $x$ will use the 'x' glyph from current serif italic font, and $\bf x$ 
will use the 'x' glyph from current serif bold font!
I would appreciate any suggestions and help!

Suppose we have all the required font files in the 'font' directory of the 
working directory, and below is the minimal source code! 
"""
\starttypescriptcollection[CustomFontSelection]
  \starttypescript [serif] [CustomFontSelection] [name]
\setups[font:fallback:serif]
\definefontsynonym [Serif]
% [file:font/Lora-Regular.ttf]
[file:font/Lora-Medium.ttf]
[features=default,fallbacks=Serif]
\definefontsynonym [SerifBold]
[file:font/Lora-Bold.ttf]
[features=default,fallbacks=SerifBold]
\definefontsynonym [SerifItalic]
% [file:font/Lora-Italic.ttf]
[file:font/Lora-MediumItalic.ttf]
[features=default,fallbacks=SerifItalic]
\definefontsynonym [SerifBoldItalic]
[file:font/Lora-BoldItalic.ttf]
[features=default,fallbacks=SerifBoldItalic]
  \stoptypescript

  \starttypescript [math] [CustomFontSelection] [name]
%%% \definefontfallback [MathRomanFallBack]
%%% [SansItalic]
%%% [extendedlatin]
%%% [force=yes] 
\definefontsynonym [MathRoman]
[file:font/STIXTwoMath-Regular.otf]
[features=math,fallbacks=MathRomanFallBack] 
  \stoptypescript

  \starttypescript[CustomFontSelection]
\definetypeface [CustomFontSelection] [rm] [serif] [CustomFontSelection]
[default] [rscale=0.9]
\definetypeface [CustomFontSelection] [ss] [sans]  [newcomputermodern-book] 
[default]
\definetypeface [CustomFontSelection] [tt] [mono]  [newcomputermodern-book] 
[default]
\definetypeface [CustomFontSelection] [mm] [math]  [CustomFontSelection]
[default] [rscale=0.97] 
  \stoptypescript  
\stoptypescriptcollection

\setupbodyfont[CustomFontSelection] 


\starttext

We use $X$, $Y$, $Z$ and $n$, $m$, etc. $\sin(x) \to \limsup x_n$ whatever.

\mathematics{%
  \delta_{ij} =
\startmathcases
\NC 1 \NC \text{if } i = j \NR
\NC 0 \NC \text{otherwise} \NR
\stopmathcases
}

We use $\bf X$, $\bf Y$, $\bf Z$ and $\bf n$, $\bf m$, etc. $\bf \sin(x) \gets 
\limsup x_n$ whatever.

\stoptext
"""

Best regards,
Ali
___
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: LUA API for page numbers

2024-05-21 Thread Luc Chabassier
Excerpts from Wolfgang Schuster's message of May 21, 2024 3:54 pm:
> Luc Chabassier schrieb am 21.05.2024 um 15:35:
>> Excerpts from Hans Hagen's message of May 21, 2024 11:45 am:
>>> concerning notes in the margin ... did you try the built in magin text
>>> mechanisms?
>> I did, but as far as I know they place the text on the margin next to
>> the \inmargin invocation in the text, so they may overlap, which is what
>> I want to avoid.
> 
> \setupmarginblocks[inbetween=]
> 
> \starttext
> 
> \dorecurse{100}
>{\bold{#1:} \samplefile{ward}%
> \startmarginblock Note #1\stopmarginblock
> \par}
> 
> \stoptext
I did not know about margin blocks, they are nice. But is there a way to
place them next to the \startmarginblock invocation, instead of flushing
them all either to the top or bottom of the page ?
___
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: LUA API for page numbers

2024-05-21 Thread Wolfgang Schuster

vm via ntg-context schrieb am 21.05.2024 um 16:07:



On 21/05/2024 15:54, Wolfgang Schuster wrote:

\setupmarginblocks[inbetween=]

\starttext

\dorecurse{100}
   {\bold{#1:} \samplefile{ward}%
    \startmarginblock Note #1\stopmarginblock
    \par}

\stoptext



when I compile this, i get per page with
\par 1..10 -> the notes 1..11
\par 11..20 -> the notes 12..21
\par 21..30 -> the notes 32..31

...

is this expected standard?

i'd expect \par and notes synced on page.
1..10 -> 1..10


TeX was still on page 1 to collect text when it put note 11 into the 
buffer for the margin and the decision to make the break after block 10 
happened afterwards.


You can control page breaks to a certain degree with the \testpage 
command between paragraphs.


\starttext

\dorecurse{100}
  {\testpage[3]
   \bold{#1:} \samplefile{ward}%
   \startmarginblock Note #1\stopmarginblock
   \par}

\stoptext

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

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


[NTG-context] Re: LUA API for page numbers

2024-05-21 Thread vm via ntg-context
just noticed that if the notes need more margin space then are pages 
available by the text, they get lost. e.g. this mwe generates 10 pages 
with 100 par but only 80 notes will show up.



\setupmarginblocks[inbetween=]

\starttext

\dorecurse{100}
  {\bold{#1:} \samplefile{ward}%
   \startmarginblock {\bf #1} one two three four five six seven eight 
nine ten eleven twelve thirteen\stopmarginblock

   \par}

\stoptext


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

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


[NTG-context] Re: LUA API for page numbers

2024-05-21 Thread vm via ntg-context



On 21/05/2024 15:54, Wolfgang Schuster wrote:

\setupmarginblocks[inbetween=]

\starttext

\dorecurse{100}
   {\bold{#1:} \samplefile{ward}%
    \startmarginblock Note #1\stopmarginblock
    \par}

\stoptext



when I compile this, i get per page with
\par 1..10 -> the notes 1..11
\par 11..20 -> the notes 12..21
\par 21..30 -> the notes 32..31

...

is this expected standard?

i'd expect \par and notes synced on page.
1..10 -> 1..10



___
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: LUA API for page numbers

2024-05-21 Thread Wolfgang Schuster

Luc Chabassier schrieb am 21.05.2024 um 15:35:

Excerpts from Hans Hagen's message of May 21, 2024 11:45 am:

you have to provide some mwe so that we can see what is intended; in
principle much info is available one way or the other

I joined a minimal working example. The lua function
`userdata.sidenotes_save_run` places the notes so that they do not
intersect (the method I actually use is more complicated, but the idea
is the same).


concerning notes in the margin ... did you try the built in magin text
mechanisms?

I did, but as far as I know they place the text on the margin next to
the \inmargin invocation in the text, so they may overlap, which is what
I want to avoid.


\setupmarginblocks[inbetween=]

\starttext

\dorecurse{100}
  {\bold{#1:} \samplefile{ward}%
   \startmarginblock Note #1\stopmarginblock
   \par}

\stoptext

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

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


[NTG-context] Re: LUA API for page numbers

2024-05-21 Thread Hans Hagen

On 5/21/2024 10:26 AM, Luc Chabassier wrote:

Hi everyone,

I have recently migrated my PhD dissertation from LaTeX to ConTeXt. In
LaTeX I was using kaobook, a template with lots of margin notes, but I
was frustrated with the automatic placement of the notes.

I implemented a system using overlays that automatically places the
notes using lua. To know where the ideal placement should be (if they do
not interact with each other), I use lua to insert a latelua whatsit
that uses lpdf.getpos() to get the coordinate on the rendered page.
However, I haven't found a way to get the page number using lua, and the
tex macro \pagenumber is unreliable near pagebreaks.

Furthermore, it would be helpful to know if there is a way to access the
position and sizes of figures at the end.
you have to provide some mwe so that we can see what is intended; in 
principle much info is available one way or the other


concerning notes in the margin ... did you try the built in magin text 
mechanisms?


Hans


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

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

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


[NTG-context] LUA API for page numbers

2024-05-21 Thread Luc Chabassier
Hi everyone,

I have recently migrated my PhD dissertation from LaTeX to ConTeXt. In
LaTeX I was using kaobook, a template with lots of margin notes, but I
was frustrated with the automatic placement of the notes.

I implemented a system using overlays that automatically places the
notes using lua. To know where the ideal placement should be (if they do
not interact with each other), I use lua to insert a latelua whatsit
that uses lpdf.getpos() to get the coordinate on the rendered page.
However, I haven't found a way to get the page number using lua, and the
tex macro \pagenumber is unreliable near pagebreaks.

Furthermore, it would be helpful to know if there is a way to access the
position and sizes of figures at the end.

Thanks,
Luc

___
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: defining hashtag simulator

2024-05-20 Thread Hans Hagen

On 5/20/2024 8:01 AM, seyal.zav...@gmail.com wrote:

Thanks.

What if we want the text to be copied when it is clicked?
I found these link on the stack site for this
https://tex.stackexchange.com/questions/174637/copy-to-clipboard-feature-in-pdf-output/545107#545107

also i defined this:
\def\Hashtag#1{
 \hbox{\tfa\ctxlua{
 str = "#1"
 replacespace = string.gsub(str," ","_")

 context.letterhash()
 context(replacespace)
 }
 }
}
\starttext
\Hashtag{hello}
\stoptext

i used hbox for making phrase unbreakable.

How can you put all the code in the one Lua function and not need to put hbox 
or goto function outside of Lua?

In the next upload you can do this:

\protected\def\Hashtag#1%
  {\begingroup
   \nohyphens
   \spacechar\underscoreasciicode
   \nospaces\plusthree
   \letterhash#1%
   \endgroup}

(was an easy extension given what we already have)

Hans

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

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

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


[NTG-context] Re: luatex doesn't see installed 3rd party module

2024-05-20 Thread Arthur Rosendahl via ntg-context
On Mon, May 20, 2024 at 02:31:29AM +0400, and...@borisov.dev wrote:
> Correction for misspelling : `context --latex` —>  `context --luatex`

  It was a funny typo ;-)

Arthur
___
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: Special charakter

2024-05-20 Thread Thomas Meyer

Thank you Axel for the hint!

Thank you Hraban for the keylayout!

Greetings
Thomas

Am 19.05.24 um 07:16 schrieb Axel Kielhorn:

Am 18.05.24 um 11:17 schrieb Thomas Meyer:

Hi folks,

I have problems to produce the polish l.

\l gives ł, but \L gives nothing!

How can I write Łódź (on a Mac)?


It seems that you can´t write it with the normal keyboard.
There is an action "stroke" but it is not bound to any key.

There are two alternatives:

You can design your own keyboard layout with Ukulele:
https://software.sil.org/ukelele/

Or you could use the "Deutsch-Europa" keylayout from:
https://github.com/fiee/tools

This Layout has been designed by Henning Hraban Ramm and offers easy 
access to greek and cyrillic letter, as well as ł and Ł (via option-o 
l and option-o L).


Greetings Axel
___ 

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: luatex doesn't see installed 3rd party module

2024-05-20 Thread Hans Hagen via ntg-context

On 5/20/2024 12:38 AM, and...@borisov.dev wrote:

Hello!

I’ve installed a 3rd party module by copying its TDS folder structure and 
invoking `context --generate` as described in 
https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

When I compile my project with `context` (using LuaMetaTeX), it's found and 
works just fine; however, when I try to compile with LuaTeX by invoking 
`context --luatex`, it can’t find the module.

Do I need to do something special to make it visible for LuaTeX? I can’t find 
the answer in the wiki.

I use standalone ConTeXt distribution.

Any help would be appreciated 


Did you run

context --generate --luatex

after adding the file?

Hans

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

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

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


[NTG-context] Re: defining hashtag simulator

2024-05-20 Thread Hans Hagen via ntg-context

On 5/20/2024 8:01 AM, seyal.zav...@gmail.com wrote:

Thanks.

What if we want the text to be copied when it is clicked?
I found these link on the stack site for this
https://tex.stackexchange.com/questions/174637/copy-to-clipboard-feature-in-pdf-output/545107#545107

also i defined this:
\def\Hashtag#1{
 \hbox{\tfa\ctxlua{
 str = "#1"
 replacespace = string.gsub(str," ","_")

 context.letterhash()
 context(replacespace)
 }
 }
}
\starttext
\Hashtag{hello}
\stoptext

i used hbox for making phrase unbreakable.

How can you put all the code in the one Lua function and not need to put hbox 
or goto function outside of Lua?


\startluacode
interfaces.implement {
name  = "Hashtag",
public= true,
protected = true,
arguments = "string",
actions   = function(str)
context("{\\nohyphens\\letterhash %s}",string.gsub(str," ","_"))
 -- str = string.gsub(str," ","_")
 -- context.bgroup()
 -- context.nohyphens()
 -- context.letterhash()
 -- context(str)
 -- context.egroup()
end
}
\stopluacode


--

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

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

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


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

2024-05-20 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 20.05.2024 um 03:30:
I'm using mostly default ConTeXt settings, but an editor has warned I 
should avoid using hyphenation at the end of lines--at least for my 
particular audience.


I've found manual text that says how to disable specific words from 
being hyphenated.


Is there a whole-document switch to disable it?


You can disable hyphenation with \setupalign[nothyphenated] but this 
setting alone isn't enough because now text tends to stick into the 
right margin. To get better result you have to combine it with other 
option like "tolerant" or "verytolerant".


The example below show also how you can use font enpansion in 
combination with a lesser tolerance value to align the text on both 
margins with result in smaller interword spacer than a larger tolerance 
value. You can combine this with font protrusion to move punctuation 
marks slightly into the margin area to have a better alignment of the 
text alone.


 begin example
\setupwhitespace[big]

\showframe[text][text]

\definefontfeature[default][default][expansion=quality,protrusion=quality]

\starttext

\type{alignment: default}

\samplefile{lorem}

\page

\type{alignment: nothyphenated}

\start \setupalign[nothyphenated]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,flushleft}

\start \setupalign[nothyphenated,flushleft]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,verytolerant}

\start \setupalign[nothyphenated,verytolerant]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,tolerant,hz}

\start \setupalign[nothyphenated,tolerant,hz]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,verytolerant,hanging}

\start \setupalign[nothyphenated,verytolerant,hanging]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,tolerant,hz,hanging}

\start \setupalign[nothyphenated,tolerant,hz,hanging]
\samplefile{lorem}
\stop

\stoptext
 end example

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

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


[NTG-context] Re: defining hashtag simulator

2024-05-20 Thread seyal . zavira
Thanks.

What if we want the text to be copied when it is clicked?
I found these link on the stack site for this
https://tex.stackexchange.com/questions/174637/copy-to-clipboard-feature-in-pdf-output/545107#545107

also i defined this:
\def\Hashtag#1{
\hbox{\tfa\ctxlua{
str = "#1"
replacespace = string.gsub(str," ","_")

context.letterhash()
context(replacespace)
}
}
}
\starttext
\Hashtag{hello}
\stoptext

i used hbox for making phrase unbreakable.

How can you put all the code in the one Lua function and not need to put hbox 
or goto function outside of Lua?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2024-05-19 Thread Mikael Sundqvist
Hi,

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

\finalhyphendemerits

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

/Mikael

On Mon, May 20, 2024 at 3:33 AM Joel via ntg-context  wrote:
>
> I'm using mostly default ConTeXt settings, but an editor has warned I should 
> avoid using hyphenation at the end of lines--at least for my particular 
> audience.
>
> I've found manual text that says how to disable specific words from being 
> hyphenated.
>
> Is there a whole-document switch to disable it?
>
> --Joel
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2024-05-19 Thread Joel via ntg-context
I'm using mostly default ConTeXt settings, but an editor has warned I should 
avoid using hyphenation at the end of lines--at least for my particular 
audience.
I've found manual text that says how to disable specific words from being 
hyphenated.

Is there a whole-document switch to disable it?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: luatex doesn't see installed 3rd party module

2024-05-19 Thread andrei
Correction for misspelling : `context --latex` —>  `context --luatex`

> On May 20, 2024, at 02:29, and...@borisov.dev wrote:
> 
> Hello!
> 
> I’ve installed a 3rd party module by copying its TDS folder structure and 
> invoking `context --generate` as described in 
> https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
> 
> When I compile my project with `context` (using LuaMetaTeX), it's found and 
> works just fine; however, when I try to compile with LuaTeX by invoking 
> `context --latex`, it can’t find the module.
> 
> Do I need to do something special to make it visible for LuaTeX? I can’t find 
> the answer in the wiki.
> 
> Any help would be appreciated 
> 
> Best,
> Andrei.

___
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: luatex doesn't see installed 3rd party module

2024-05-19 Thread andrei
Correction for misspelling : `context --latex` —>  `context --luatex`
___
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] luatex doesn't see installed 3rd party module

2024-05-19 Thread andrei
Hello!

I’ve installed a 3rd party module by copying its TDS folder structure and 
invoking `context --generate` as described in 
https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

When I compile my project with `context` (using LuaMetaTeX), it's found and 
works just fine; however, when I try to compile with LuaTeX by invoking 
`context --luatex`, it can’t find the module.

Do I need to do something special to make it visible for LuaTeX? I can’t find 
the answer in the wiki.

I use standalone ConTeXt distribution.

Any help would be appreciated 

Best,
Andrei.
___
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] luatex doesn't see installed 3rd party module

2024-05-19 Thread andrei
Hello!

I’ve installed a 3rd party module by copying its TDS folder structure and 
invoking `context --generate` as described in 
https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

When I compile my project with `context` (using LuaMetaTeX), it's found and 
works just fine; however, when I try to compile with LuaTeX by invoking 
`context --latex`, it can’t find the module.

Do I need to do something special to make it visible for LuaTeX? I can’t find 
the answer in the wiki.

Any help would be appreciated 

Best,
Andrei.___
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: build_parshape and \getshapetext - need for a deeper understanding

2024-05-19 Thread Hans Hagen via ntg-context

On 5/19/2024 2:29 PM, garu...@azules.eu wrote:

I still get some difficulties with build_parshape, \getshapetex and sectionning.

I though I find a solution by removing \blank with
   \setuphead  [subsection]  [before=,  after=, style=, 
command=\MySubSectionCommand, alternative=text ]

But actually it's not enough : when I add text before the first section, new 
issues appear.

I tried to build a MVE by refactoring and tidying as much as I could.
It build 3 comparative pages (i) basic issue, (ii) solution, (iii) remaining 
issue.

Your guidance are most welcome :-)


you have to fight several issues:

- parshapes being reset at the end paragraph (handled here by luametatex 
context)
- parshapes operate on lines, not dimension (i might add an aletnative 
one day)

- you use a bit old mechanism (checkout the luametafun-paragraphs chapter)

Now, is there a solution? It really depends on the circumstances, so 
here is one.


\setupbodyfont[11pt]

\definemeasure [mywidth]  [7cm]
\definemeasure [mywidtha] [5cm]
\definemeasure [myheight] 
[{\the\dimexpr\baselineskip*37+\lineskip\relax}]
\definemeasure [myheighta] 
[{\the\dimexpr\baselineskip*18+\lineskip*1\relax}]
\definemeasure [myheightb] 
[{\the\dimexpr\baselineskip*25-\lineskip*1\relax}]


\startuseMPgraphic{shape:1}
  path p ;
  numeric mywidth   ; mywidth   := \measure{mywidth};
  numeric mywidtha  ; mywidtha  := \measure{mywidtha};
  numeric myheight  ; myheight  := \measure{myheight};
  numeric myheighta ; myheighta := \measure{myheighta};
  numeric myheightb ; myheightb := \measure{myheightb};
  p := (0,0)-- (mywidth,0) --
   (mywidth,myheighta)  -- (mywidtha,myheighta) --
   (mywidtha,myheightb) -- (mywidth,myheightb) --
   (mywidth,myheight)   -- (0cm,myheight) -- cycle;

build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) 
;

  path SavedShape ; SavedShape := p ;
\stopuseMPgraphic

\startuseMPgraphic{shape:2}
  SavedShape := SavedShape shifted (0,-ypart urcorner OverlayBox) ;
  SavedShape := SavedShape shifted (0,positiony("test")) ;
  fill SavedShape withcolor red;
 setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\showframe

\defineoverlay[myoverlay][\useMPgraphic{shape:2}]

\setupbackgrounds[text][text][background=myoverlay]

\startsection[title={test}]

\startshapedparagraph[mp=shape:1]%
\setupalign[verytolerant,stretch]%
\hpos{test}{!}\samplefile{tufte}
\samplefile{tufte}
\stopshapedparagraph

\stopsection

The "test" position is hard coded but should be namespaced, the ! can be 
a \strut instead.


So, more thinking from the end of the text flow.

Hans



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

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

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


[NTG-context] Re: Wiki - test/proposal to further clarify documentation

2024-05-19 Thread garulfo
> So is the plan to go through each of the main headings in the left side-bar 
> and make the same type of change?
Yes. 

Maybe new ones will have to be added
___
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] build_parshape and \getshapetext - need for a deeper understanding

2024-05-19 Thread garulfo
I still get some difficulties with build_parshape, \getshapetex and sectionning.

I though I find a solution by removing \blank with
  \setuphead  [subsection]  [before=,  after=, style=, 
command=\MySubSectionCommand, alternative=text ]

But actually it's not enough : when I add text before the first section, new 
issues appear.

I tried to build a MVE by refactoring and tidying as much as I could.
It build 3 comparative pages (i) basic issue, (ii) solution, (iii) remaining 
issue.

Your guidance are most welcome :-)


\setupbodyfont[11pt]

%--

\usecolors[svg]

\definemeasure [mywidth]  [7cm]
\definemeasure [mywidtha] [5cm]
\definemeasure [myheight] [{\the\dimexpr\baselineskip*37+\lineskip\relax}]
\definemeasure [myheighta][{\the\dimexpr\baselineskip*18+\lineskip*1\relax}]
\definemeasure [myheightb][{\the\dimexpr\baselineskip*25-\lineskip*1\relax}]

\startuseMPgraphic{mymetafunpath}
  path p ;
  numeric mywidth   ; mywidth   := \measure{mywidth};
  numeric mywidtha  ; mywidtha  := \measure{mywidtha};
  numeric myheight  ; myheight  := \measure{myheight};
  numeric myheighta ; myheighta := \measure{myheighta};
  numeric myheightb ; myheightb := \measure{myheightb};
  p := (0,0)-- (mywidth,0) --
   (mywidth,myheighta)  -- (mywidtha,myheighta) --
   (mywidtha,myheightb) -- (mywidth,myheightb) --
   (mywidth,myheight)   -- (0cm,myheight) -- cycle;
  build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) ;
  fill p withcolor \MPcolor{tan};
\stopuseMPgraphic

\defineoverlay[myoverlay][\useMPgraphic{mymetafunpath}]

%--

\define[2]\MySubSectionCommand{\leftaligned{#2}}

%--

\define[2]\MyPageBuilder{%
\page
\setupbackgrounds[page][background=testA]
\definelayer[testA] [x=0mm, y=0mm,width=\paperwidth, height=\paperheight]
~

\startshapetext[mymetafunpath, mymetafunpath]   % <=== WITHOUT \startsubsection
#2
%\startsubsection[title={Title for section  #1}]
\MySubSectionCommand{1}{Title for section #1}
\input knuth \endgraf \input ward
%\stopsubsection
\stopshapetext

\setlayer
  [testA]
  [hoffset={\the\dimexpr\backspace\relax},
   voffset={\the\dimexpr\topspace+\headerheight+\headerdistance\relax},]
  {\framed[background=myoverlay,frame=off]{\strut\getshapetext}}

\startshapetext[mymetafunpath, mymetafunpath]   % <=  WITH \startsubsection
#2
\startsubsection[title={Title for section  #1}]
%\MySubSectionCommand{1}{Title for section #1}
\input knuth \endgraf \input ward
\stopsubsection
\stopshapetext

\setlayer
  [testA]
  [hoffset={\the\dimexpr\backspace+\measure{mywidth}+5mm\relax},
   voffset={\the\dimexpr\topspace+\headerheight+\headerdistance\relax},]
  {\framed[background=myoverlay,frame=off]{\strut\getshapetext}}
}

%==

%\showboxes

\starttext

\MyPageBuilder{A}{}

\setuphead
  [subsection]
  [
   before=,
   after=,
   style=,
   command=\MySubSectionCommand,
   alternative=text,
   ]

\MyPageBuilder{B}{}

\MyPageBuilder{C}{\strut Hi from here. \endgraf}

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

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


[NTG-context] Re: MyWay from dl.contextgarden.net

2024-05-19 Thread garulfo
Thanks Wolfgang, links are up-to-date
https://wiki.contextgarden.net/This_Way_-_My_Way#MyWay
___
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: defining hashtag simulator

2024-05-19 Thread Hans Hagen

On 5/19/2024 5:40 AM, seyal.zav...@gmail.com wrote:

Hi all,

I want to define a command that simulate hashtag behavior in social networks,

In other words, this command should put the hashtag sign at the beginning of 
it, replace spaces with dashes and also it should be a clickable link and 
unbreakable world.
I mean like this, for example:
\myhashtag{hello world}
It should be displayed as #hello_world in the final PDF and when clicked it 
will search for #hello_world throughout the pdf
How is this possible?
One of the disppointments of pdf (some things indeed got worse over 
time) ...


"Table 215 — Named actions" lists several named actions (PDF 1.2) that 
interactive PDF processors

shall support; further names may be added in the future.
Table 215 — Named ac

Only a few were ever formal ok. Acrobat supports some more (at least 
did) but even on the


\goto{test}[action(search)]

one could not set a string. Adding a decent subset of commands is way 
easier than whatever came later to the standard. It's especially ironic 
in the perspective of accessibility.


However, if one could agree on a subset (as the standard is open) and 
open source viewers would support it ... but getting all on board is 
probably not possible).


Hans

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

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

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


[NTG-context] Re: Special charakter

2024-05-18 Thread Axel Kielhorn

Am 18.05.24 um 11:17 schrieb Thomas Meyer:

Hi folks,

I have problems to produce the polish l.

\l gives ł, but \L gives nothing!

How can I write Łódź (on a Mac)?


It seems that you can´t write it with the normal keyboard.
There is an action "stroke" but it is not bound to any key.

There are two alternatives:

You can design your own keyboard layout with Ukulele:
https://software.sil.org/ukelele/

Or you could use the "Deutsch-Europa" keylayout from:
https://github.com/fiee/tools

This Layout has been designed by Henning Hraban Ramm and offers easy 
access to greek and cyrillic letter, as well as ł and Ł (via option-o l 
and option-o L).


Greetings Axel
___
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] defining hashtag simulator

2024-05-18 Thread seyal . zavira
Hi all,

I want to define a command that simulate hashtag behavior in social networks,

In other words, this command should put the hashtag sign at the beginning of 
it, replace spaces with dashes and also it should be a clickable link and 
unbreakable world.
I mean like this, for example:
\myhashtag{hello world}
It should be displayed as #hello_world in the final PDF and when clicked it 
will search for #hello_world throughout the pdf
How is this possible?
___
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: Special charakter

2024-05-18 Thread BPJ
For those characters which your OS doesn't make it easy to input:

https://jkorpela.fi/fui.html8

Most OSes also have apps for this.

Den lör 18 maj 2024 17:36Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> skrev:

> Thomas Meyer schrieb am 18.05.2024 um 14:53:
>
> Thanks to all of you for your hints and comments!
> I thought \l does work, why \L does not.
> To type \L is faster than changing the keyboard language when I write in
> German normally.
>
>
> 1. Hans made a while ago the decision to reduce the number of commands to
> output certain characters and create accented characters. To still be able
> to create them he added the \with... commands.
>
> 2. The reason why \L doesn't produce Ł are the following lines from
> chem-str.mkxl which nils the values of all listed commands.
>
> \permanent\let\X\relax
> \permanent\let\T\relax
> \permanent\let\B\relax
> \permanent\let\L\relax
> \permanent\let\M\relax
> \permanent\let\R\relax
>
> The same thing happens for the \CC commands which gets reset in
> tabl-com.mkxl
>
> \permanent\protected\lettonothing\CC
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Special charakter

2024-05-18 Thread Wolfgang Schuster

Thomas Meyer schrieb am 18.05.2024 um 14:53:

Thanks to all of you for your hints and comments!
I thought \l does work, why \L does not.
To type \L is faster than changing the keyboard language when I write 
in German normally.


1. Hans made a while ago the decision to reduce the number of commands 
to output certain characters and create accented characters. To still be 
able to create them he added the \with... commands.


2. The reason why \L doesn't produce Ł are the following lines from 
chem-str.mkxl which nils the values of all listed commands.


\permanent\let\X\relax
\permanent\let\T\relax
\permanent\let\B\relax
\permanent\let\L\relax
\permanent\let\M\relax
\permanent\let\R\relax

The same thing happens for the \CC commands which gets reset in 
tabl-com.mkxl


\permanent\protected\lettonothing\CC

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: Special charakter

2024-05-18 Thread Herbert Voss



Am 18.05.24 um 14:53 schrieb Thomas Meyer:

Thanks to all of you for your hints and comments!
I thought \l does work, why \L does not.
To type \L is faster than changing the keyboard language when I write 
in German normally.


try

\def\L{\char"0141}

but I have no real knowledge about ConTeXt ...

Herbert




Greetings

Am 18.05.24 um 13:33 schrieb Bruce Horrocks:

On 18 May 2024, at 11:54, Thomas Meyer  wrote:

I know I can copy and paste it, like here (copied from Wikipedia), but if I 
don't have a template in a hurry ...

On the Mac, if you are using an 'English' keyboard, you can hold down any letter 
for half a second or so and see a popup selection of alternate accented versions of 
that letter. Not all text editors / word processors support it but TeXShop does. No 
need for cut & paste templates.

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


___
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: Special charakter

2024-05-18 Thread Thomas Meyer

Thanks to all of you for your hints and comments!
I thought \l does work, why \L does not.
To type \L is faster than changing the keyboard language when I write in 
German normally.


Greetings

Am 18.05.24 um 13:33 schrieb Bruce Horrocks:



On 18 May 2024, at 11:54, Thomas Meyer  wrote:

I know I can copy and paste it, like here (copied from Wikipedia), but if I 
don't have a template in a hurry ...


On the Mac, if you are using an 'English' keyboard, you can hold down any letter 
for half a second or so and see a popup selection of alternate accented versions of 
that letter. Not all text editors / word processors support it but TeXShop does. No 
need for cut & paste templates.

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


[NTG-context] Re: Special charakter

2024-05-18 Thread Bruce Horrocks


> On 18 May 2024, at 11:54, Thomas Meyer  wrote:
> 
> I know I can copy and paste it, like here (copied from Wikipedia), but if I 
> don't have a template in a hurry ...


On the Mac, if you are using an 'English' keyboard, you can hold down any 
letter for half a second or so and see a popup selection of alternate accented 
versions of that letter. Not all text editors / word processors support it but 
TeXShop does. No need for cut & paste templates.

—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Re: Special charakter

2024-05-18 Thread vm via ntg-context




On 18/05/2024 12:54, Thomas Meyer wrote:
I know I can copy and paste it, like here (copied from Wikipedia), but 
if I don't have a template in a hurry ...


Your local OS might support some kind of keyboard language typing to 
place accents, dots and strikings. Check your mac os manual.




___
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: Wiki - test/proposal to further clarify documentation

2024-05-18 Thread Bruce Horrocks
On 17 May 2024, at 21:40, garu...@azules.eu wrote:
> 
> I have tested on 2 pages :
> - https://wiki.contextgarden.net/Sciences (only mathematics part)
> - https://wiki.contextgarden.net/Fonts
> 
> After these tests, I think this may help users to find their way around the 
> various sources of documentation :
> In one small table he/she has an overview of the documentation for a given 
> topic,  :
> - the few key tutorials
> - link to one "main wiki page" about the topic
> - the few key manuals
> - the reference for commands

The fonts page is a lot better than before[1], IMHO. I would prefer the table 
were 90% width rather than 50 but that is minor.

So is the plan to go through each of the main headings in the left side-bar and 
make the same type of change?

> 
> I'm not sure I've selected the few documents that are considered by the 
> community as the key tutorials.
> Thanks for your feedback again.

I don't think that is a problem - the Wiki can be updated by others as long as 
the layout/structure of the page is clear so people know where to add links.

> PS : in order to benefit from mediawiki page organization features, I moved 
> some pages, for example
> wiki.contextgarden.net/blablabla
> ==> wiki.contextgarden.net/Topic/blablabla


[1] Previous style for reference: 

—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-18 Thread Pablo Rodriguez via ntg-context
On 5/17/24 20:46, madiazm.eo...@gmail.com wrote:
> [...]
> here is the last part of my script (the prior definitions are not
> problematic, since they worked when only using "miFuente". It seems to
> be something in "miCorm" that produces the protruding

Just a comment about typescripts.

At least in how I use ConTeXt, I live happily without having to use them.

See the following sample:

  \definefontfamily[libertin][rm][Libertinus Serif]
  \definefontfamily[libertin][ss][Libertinus Sans]
  \definefontfamily[libertin][tt][Libertinus Mono]
  \definefontfamily[cormora][rm][Cormorant]
  \setupbodyfont[cormora]
  \starttext
  \input zapf\par
  \switchtobodyfont[libertin]
  \doloopoverlist{\rm,\ss,\tt}
  {\recursestring\input zapf\par}
  \stoptext

You may define font families (which are actually typeface families).

I think they may be easier to use than typefaces.

Just in case it might help,

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-18 Thread Pablo Rodriguez via ntg-context
On 5/17/24 20:22, madiazm.eo...@gmail.com wrote:
> thanks Pablo, but this is strange
> [...]
> The strange thing is that it is only the first section that
> protrudes, the other sections are right (as seen in the link).
> Therefore it must not be the code definition, since in that case all
> sections should protrude...
It might be a buggy code definition, but it may be only triggered by
(yet unknown) special conditions.

> Over the weekend I will slowly move my code to a new file with your
> code adding a bit everytime to try to spot the moment when I get this
> strange behaviour and then I will write again.

I hope you have already solved the issue, but I’m afraid this is the way
testing for new bugs introduced in code works.

> ps. I included the link because there is no attach option here in the
> online-mailing-list. Sorry if it not ok.
Sorry, I no Google fan. But it is essential to provide problematic code
(reduced to a minimal sample) in the messages to the list, not just the
output.

Having the sample code, others can confirm that they are able to
reproduce your issue.

It wouldn’t be the first time for issues only arising in only on a
single installation, on a single computer or on a single OS.

The mailing list (at least when sending from a real email address)
allows attachments up to 100kb. This may be enough for most minimal samples.

I hope it helps,

Pablo
___
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: Special charakter

2024-05-18 Thread Thomas Meyer
I know I can copy and paste it, like here (copied from Wikipedia), but 
if I don't have a template in a hurry ...


Am 18.05.24 um 11:45 schrieb vm via ntg-context:



On 18/05/2024 11:17, Thomas Meyer wrote:

How can I write Łódź (on a Mac)?


Just as you wrote it in your mail message?
ConTeXt knows how to deal with utf-8

___ 

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: Special charakter

2024-05-18 Thread Wolfgang Schuster

vm via ntg-context schrieb am 18.05.2024 um 11:45:



On 18/05/2024 11:17, Thomas Meyer wrote:

How can I write Łódź (on a Mac)?


Just as you wrote it in your mail message?
ConTeXt knows how to deal with utf-8


And in case you can't use the \with... commands.

\starttext

Łódź

%\Lslash\aacute d\zacute

\withslash{L}\withacute{o}d\withacute{z}

\stoptext

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

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


[NTG-context] Re: Special charakter

2024-05-18 Thread vm via ntg-context



On 18/05/2024 11:17, Thomas Meyer wrote:

How can I write Łódź (on a Mac)?


Just as you wrote it in your mail message?
ConTeXt knows how to deal with utf-8

___
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] Special charakter

2024-05-18 Thread Thomas Meyer

Hi folks,

I have problems to produce the polish l.

\l gives ł, but \L gives nothing!

How can I write Łódź (on a Mac)?

Thanks and nice weekend.
Thomas

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread madiazm . eoicc
yeee that's it.
adding the command after the scripts solved the protruding.
thanks to all of you who took time to look into the thing... and to you Hans. 
It would be imposible that I had thought of this as the source of my problem!!!
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread Hans Hagen via ntg-context

On 5/17/2024 8:22 PM, madiazm.eo...@gmail.com wrote:

thanks Pablo, but this is strange

If I reproduce your code in a new file I see the perfect alignment of the frames. But I 
had changed the code in my original file as suggested by Wolfgang and I additionally 
commented all lines in the "firstHeadings" definitions following your advice 
and after compiling... the same result.

The strange thing is that it is only the first section that protrudes, the 
other sections are right (as seen in the link). Therefore it must not be the 
code definition, since in that case all sections should protrude...

Over the weekend I will slowly move my code to a new file with your code adding 
a bit everytime to try to spot the moment when I get this strange behaviour and 
then I will write again.

ps. I included the link because there is no attach option here in the 
online-mailing-list. Sorry if it not ok.
thanks
if you do something \switchtobodyfont without ever having loaded it 
(before starttext) spaces can creep in depending on what files are 
loaded for that font


also, in order to avoid grouping issues / side effects you can do this 
before \starttext:


\usebodyfont[foo]

when you use multiple bodyfont sets

Hans



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

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

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


[NTG-context] Re: MyWay from dl.contextgarden.net

2024-05-17 Thread Hans Hagen

On 5/17/2024 10:49 PM, garu...@azules.eu wrote:

Several documents previously stored on dl.contextgarden.net are no longer 
accessible.

https://wiki.contextgarden.net/This_Way_-_My_Way#MyWay

Are they available on another server ? or is there a copy somewhere else ?
Thanks for your help


everything that makes sense (also historically) is in the distribution 
under doc


Hans


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

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

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


[NTG-context] MyWay from dl.contextgarden.net

2024-05-17 Thread garulfo
Several documents previously stored on dl.contextgarden.net are no longer 
accessible.

https://wiki.contextgarden.net/This_Way_-_My_Way#MyWay

Are they available on another server ? or is there a copy somewhere else ?
Thanks for your help

Garulfo
___
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: Wiki - test/proposal to further clarify documentation

2024-05-17 Thread garulfo
I have tested on 2 pages :
- https://wiki.contextgarden.net/Sciences (only mathematics part)
- https://wiki.contextgarden.net/Fonts

After these tests, I think this may help users to find their way around the 
various sources of documentation :
In one small table he/she has an overview of the documentation for a given 
topic,  :
- the few key tutorials
- link to one "main wiki page" about the topic
- the few key manuals
- the reference for commands

I'm not sure I've selected the few documents that are considered by the 
community as the key tutorials.
Thanks for your feedback again.

PS : in order to benefit from mediawiki page organization features, I moved 
some pages, for example
wiki.contextgarden.net/blablabla
==> wiki.contextgarden.net/Topic/blablabla
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread madiazm . eoicc
here again...
incredibly the protruding comes after creating the second script. If I only use 
the libertinus fonts every thing is ok. the code definitions don't find the 
cormorant font and use libertinus. But after adding the second typescript  and 
compiling... there comes the protruding of the first frame!!
I deleted all spaces in the definitions for the case, but no. Definitively I 
can't get it right and I don't find a logical explanation.


here is the last part of my script (the prior definitions are not problematic, 
since they worked when only using "miFuente". It seems to be something in 
"miCorm" that produces the protruding

\starttypescript[miFuente]
\definetypeface [miFuente] [rm] [serif] [libertinus] [default]
\definetypeface [miFuente] [ss] [sans]  [libertinussans] [default]
\definetypeface [miFuente] [tt] [mono]  [libertinusmono] [default]
\stoptypescript

\starttypescript[miCorm]
\definetypeface[miCorm][rm][serif][cormorant][default]
\stoptypescript
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread madiazm . eoicc
thanks Pablo, but this is strange

If I reproduce your code in a new file I see the perfect alignment of the 
frames. But I had changed the code in my original file as suggested by Wolfgang 
and I additionally commented all lines in the "firstHeadings" definitions 
following your advice and after compiling... the same result.

The strange thing is that it is only the first section that protrudes, the 
other sections are right (as seen in the link). Therefore it must not be the 
code definition, since in that case all sections should protrude...

Over the weekend I will slowly move my code to a new file with your code adding 
a bit everytime to try to spot the moment when I get this strange behaviour and 
then I will write again.

ps. I included the link because there is no attach option here in the 
online-mailing-list. Sorry if it not ok.
thanks
___
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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2024-05-17 Thread Cron Daemon
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 show-fil.pdf
 context/latest/
 context/latest/cont-lmt.zip
 context/latest/cont-mpd.zip
 context/latest/cont-ppc.zip
 context/latest/cont-sci.zip
 context/latest/cont-tmf.zip
 context/latest/cont-tst.7z
 context/latest/cont-tst.tar.xz
 context/latest/cont-tst.zip
 general/manuals/
 general/manuals/pdfmerge.pdf
 general/qrcs/
 general/qrcs/setup-mapping-en.pdf
 general/qrcs/setup-mapping-it.pdf
 
 sent 185,981 bytes  received 43,500,122 bytes  2,647,642.61 bytes/sec
 total size is 581,971,883  speedup is 13.32


Running archiver:

New dir: /var/www/aanhet.net/context//htdocs/archives/context-2024-05-17.17
248030043   
/var/www/aanhet.net/context//htdocs/archives/context-2024-05-17.17/latest
126745317   
/var/www/aanhet.net/context//htdocs/archives/context-2024-05-17.17/current
374779456   
/var/www/aanhet.net/context//htdocs/archives/context-2024-05-17.17
374779456   total
___
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] update

2024-05-17 Thread Hans Hagen

Hi,

This weekends update:

- we're currently checking the upcoming math manual and in the process 
we streamline some mechanisms


- as part of the BT presentation about par passes we introduced 
\toddlerpenalty but we leave it to the user to guess what that is (it 
fits into widow, club and orphan penalty collection)


- we could already produce pdf 2.0 but especially when one mises with 
older files, some care is needed; the inclusion 'compact' mechanism has 
been cleaned up a bit and the merge interface is converging (it has to 
do with efficient font sharing, cleanup and fixing of files outside our 
control); when one has issues with inclusion, try with compact= (set to 
nothing)


- although we're mostly done with tagging it will get some attention as 
we go; it's mostly about playing safe and getting valid pdf's


- for rhaban (posters) another fancy feature was added:

\startTEXpage[offset=1ts]
\samplefile{tufte}\removeunwantedspaces\space

\startshadow[contrastcolor=red,weight=100]\blue\samplefile{tufte}\removeunwantedspaces\stopshadow\space
\samplefile{tufte}\removeunwantedspaces\space

\startshadow[contrastcolor=red,weight=100,dx=0,dy=0]\blue\samplefile{tufte}\removeunwantedspaces\stopshadow\space
\samplefile{tufte}
\blank
\setupshadows[shadowed][unit=pt,dx=.5,dy=-.5,weight=200]
\shadowed{\bfd Tufte\setstrut\strut}
\stopTEXpage


Hans


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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread Pablo Rodriguez via ntg-context
On 5/17/24 11:02, madiazm.eo...@gmail.com wrote:
> thanks Wolfgang for your advice and sorry for being so verbose, but
> since the margins are "included" in the problem I decided to put my
> layout there too.
>
> I made your suggested changes and unfortunately it doesnt work, but
> being a bit surprised by the margins I printed a copy of the page
> and still worse...
Hi Miguel,

this should work (also in the sense of a minimal sample):

  \showframe\showgrid
  \defineframedtext[FunnyText]
[frame=on, align=flushright,location=right]

  \def\FrameTitle#1%
  {\setMPtext{FunnyFrame}
{\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado #1}\hss}}}

  \define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm]%
\FrameTitle#1%

\startFunnyText
  {\switchtobodyfont[miCorm,20.7pt] #2}
\stopFunnyText}

  \setuphead [section] [command=\firstHeadings, indentnext=no]

  \starttext
  \startsection[title=a]
  b
  \stopsection
  \startsection[title=a]
  b
  \stopsection
  \startsection[title=a]
  b
  \stopsection
  \stoptext

BTW, you inadvertely introduce the space here:

  \define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm]%
\FrameTitle#1%

Unless you comment the space after the right bracket, it will be
included in your definition of first headings.

As for external downloads, better avoid unless required.

In any case, the minimal code should be part of your message.

Just in case it helps,

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread madiazm . eoicc
I finally found showframe (so difficult to remember things...) to see and 
indeed the first frame is ignoring the margin-distance (apart from the issues 
of printed margins in paper, that I should persue too...

page with frames:
https://drive.google.com/file/d/1684nQRH_Cgm2P_5dW1JbODJjdscrj3tB/view?usp=sharing
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread madiazm . eoicc
thanks Wolfgang for your advice and sorry for being so verbose, but since the 
margins are "included" in the problem I decided to put my layout there too.

I made your suggested changes and unfortunately it doesnt work, but being a bit 
surprised by the margins I printed a copy of the page and still worse...

It semms that the first frame is good aligned to the specified margin, and it 
is the rest of the text that gets more than 5mm extra space at the right margin 
and about 2 mm less in the left margin.
I think the printer is a bit involved too, but since in the pdf we can see this 
protruding I think there must be something strange to get this outcome. The 
papers are for my fellows, so it is not critical if it stays so, but since I'm 
trying to learn a bit more to use context, it annoys me that I don't get to 
understand some problems...

thanks again for taking time
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread Wolfgang Schuster

madiazm.eo...@gmail.com schrieb am 17.05.2024 um 00:05:

Hi,
I used some code from the meta-fun manual to recreate a labelled frame around 
my sections. But the first framedtext protrudes a couple of mm into the margin. 
Only the first one in the page. I intentionaly added other sections and the 
frames aline to the margin ok.
I tried to put something before the first frame (noindentation, dontleavehmode) 
because I sometimes read it solves problems, but not the case here.
so Why is the first frame protruding and only the first?


[...]



Include only setups in your examples which are necessary to show the 
problem, the custom layout isn't necessary and can be left out.




\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt(\MPstring{FunnyFrame}) ;
w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart center p) ; draw p ;
drawoptions (withpen pencircle scaled .25pt withcolor blue) ;
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
%draw boundingbox p ; %%%quitamos el frame pequeño
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][width=.85\textwidth, height=20mm, frame=off,  
background=FunnyFrame, align=flushright,location=right, 
after={\blank[2*big]}]%foregroundsytel amplía la palabra Apartado

\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado 
#1}\hss}}}

\setMPtext{FunnyFrame}{} % initialize the text variable



\define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm]
\FrameTitle#1%

\dontleavehmode \startFunnyText  {\switchtobodyfont[miCorm,20.7pt] #2} 
\stopFunnyText
}

\setuphead [section] [color=blue, command=\firstHeadings, indentnext=no]



Get rid of \dontleavehmode in your custom section layout, avoid blank 
lines in definitions and move the font changes to \setuphead.



\define[2]\firstHeadings
  {\FrameTitle{#1}%
   \startFunnyText
 #2%
   \stopFunnyText}

\setuphead
  [section]
  [color=blue,
   style={\switchtobodyfont[miCorm]},
   textstyle={\switchtobodyfont[20.7pt]},
   command=\firstHeadings,
   indentnext=no]



\startsection[title=Aspectos generales]
Esta guía contiene toda la documentación necesaria para administrar la prueba 
unificada de certificación que ha diseñado la comisión de alemán. Se ruega al 
profesorado\footnote{Todas las alusiones a la forma del masculino genérico que 
se recogen en este documento deberán entenderse referidas a la condición 
masculina o femenina de cada persona según corresponda.} que se familiarice con 
las secciones del documento a través del índice y acuda a ellas según vaya 
siendo necesario, de manera que se pueda administrar y corregir la prueba de la 
manera más satisfactoria posible.
\stopsection



Use dummy text when it possible to keep the example short and clean.

\startsection[title=Aspectos generales]
\samplefile{lorem}
\stopsection


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: Why is only the first frame protruding into the margin?

2024-05-17 Thread madiazm . eoicc
buahhh, I'm on context-on-web too, but I get this protruding...
I even tried to put something before the section (letter k in the pdf) to see 
if the reason was being the frame the first thing on the page, but persists...


... I can't atach my pdf! here the link

https://drive.google.com/file/d/1pICcD3EY7q1CVP7Q5tJSDJzRTh-uorzj/view?usp=sharing

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-16 Thread garulfo
it seems to work with no protruding on https://context-on-web.eu
could you confirm ?
___
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] Why is only the first frame protruding into the margin?

2024-05-16 Thread madiazm . eoicc
Hi,
I used some code from the meta-fun manual to recreate a labelled frame around 
my sections. But the first framedtext protrudes a couple of mm into the margin. 
Only the first one in the page. I intentionaly added other sections and the 
frames aline to the margin ok.
I tried to put something before the first frame (noindentation, dontleavehmode) 
because I sometimes read it solves problems, but not the case here.
so Why is the first frame protruding and only the first?


\definepapersize[vertical][A4, portrait]
\definepapersize[horizontal][A4, landscape] 
\setuppapersize[vertical]


\setuplayout[location=middle,
 marking=off,
 topspace=1cm,
 topdistance=0cm,
 backspace=2.5cm,   
 height=fit,
 width=fit,
 rightedge=5mm,
 rightedgedistance=0cm,
 rightmargin=20mm,
 rightmargindistance=7mm,
 leftmargin=1.5cm,
 header=1cm,
 headerdistance=.5cm,
 bottomspace=.5cm,
 bottomdistance=0mm,
 footer=.8cm,
 footerdistance=.2cm,
 setup=strict,]



\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt(\MPstring{FunnyFrame}) ;
w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart center p) ; draw p ;
drawoptions (withpen pencircle scaled .25pt withcolor blue) ;
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
%draw boundingbox p ; %%%quitamos el frame pequeño
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][width=.85\textwidth, height=20mm, frame=off,  
background=FunnyFrame, align=flushright,location=right, 
after={\blank[2*big]}]%foregroundsytel amplía la palabra Apartado

\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado 
#1}\hss}}}

\setMPtext{FunnyFrame}{} % initialize the text variable



\define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm] 
\FrameTitle#1%

\dontleavehmode \startFunnyText  {\switchtobodyfont[miCorm,20.7pt] #2} 
\stopFunnyText
}

\setuphead [section] [color=blue, command=\firstHeadings, indentnext=no]


\starttext
\noindentation 
\dontleavehmode 

\startsection[title=Aspectos generales]


Esta guía contiene toda la documentación necesaria para administrar la prueba 
unificada de certificación que ha diseñado la comisión de alemán. Se ruega al 
profesorado\footnote{Todas las alusiones a la forma del masculino genérico que 
se recogen en este documento deberán entenderse referidas a la condición 
masculina o femenina de cada persona según corresponda.} que se familiarice con 
las secciones del documento a través del índice y acuda a ellas según vaya 
siendo necesario, de manera que se pueda administrar y corregir la prueba de la 
manera más satisfactoria posible.
\stopsection


\startsection[title=another section]
Las carpetas con las pruebas aparecen nombradas por idioma, nivel y set de 
pruebas, no apareciendo ninguna referencia a convocatorias anuales ni tampoco 
fechas. Sí aparece la referencia a la convocatoria en cada una de las guías de 
administración para los diferentes niveles.
 \stopsection
\startsection[title=another section]
La carpeta correspondiente a cada nivel contiene las distintas actividades de 
lengua, los audios para CTO y el audio/vídeo base para la mediación escrita. 
Además contiene esta guía con la información necesaria para tener una visión 
global de la prueba: los solucionarios, transcripciones, tablas de corrección, 
tablas de conversión y la rúbrica para la mediación escrita. Igualmente se 
incorporarán o enlazarán subcarpetas con los archivos necesarios para las 
pruebas orales: monólogos, diálogos y mediaciones orales.
 \stopsection

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

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


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

2024-05-16 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): No 
route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2024-05-16 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): No 
route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
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: Is there any command that equates to "keep with previous paragraph"?

2024-05-16 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 16.05.2024 um 05:04:
If I have text like this, it interprets the gap as needing a paragraph 
break:


This is some text.

This is some other text, it will appear in a new paragraph.

Is there any macro I can place that will ignore the gap before it, 
treating the next text as if it belongs at the end of that sentence?


Ex.

This is some text.

\ignorebreak This is some other text, it will appear in a new paragraph.

That way output is more like this:

This is some text.This is some other text, it will appear in a new 
paragraph.



There is a similar command to ignore the next blank line or \par but you 
have to add it at the end paragraph and not at the start.


In the old MkII days \GotoPar (the commands is still available) did the 
job but with Luametatex you can now use the \ignorepars primitive to 
achieve the result.


 begin example
\starttext

This is some text.

This is some other text, it will appear in a new paragraph.

\blank

This is some text. \ignorepars % add space before \ignorepars

This is some other text, it will appear in a new paragraph.

\blank

This is some text. \GotoPar

This is some other text, it will appear in a new paragraph.

\stoptext
 end example

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

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


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

2024-05-16 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): No 
route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2024-05-16 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): No 
route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2024-05-16 Thread Cron Daemon
rsync: [Receiver] failed to connect to rsync.pragma-ade.nl (213.125.29.165): No 
route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(139) 
[Receiver=3.2.7]
___
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] Is there any command that equates to "keep with previous paragraph"?

2024-05-15 Thread Joel via ntg-context
If I have text like this, it interprets the gap as needing a paragraph break:
This is some text.
This is some other text, it will appear in a new paragraph.
Is there any macro I can place that will ignore the gap before it, treating the 
next text as if it belongs at the end of that sentence?
Ex.
This is some text.
\ignorebreak This is some other text, it will appear in a new paragraph.
That way output is more like this:
This is some text. This is some other text, it will appear in a new paragraph.
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: How to use fonts without typescripts?

2024-05-15 Thread Bruce Horrocks

> On 15 May 2024, at 15:33, Shiv Shankar Dayal  
> wrote:
> 
> Hi,
> 
> Defining typescripts to use a font is very painful. How can I use a font 
> without using a typescript?

If you just want a very small amount of text in a different font you can use:

\definefont [useWarningFont] [name:arialbold*default at 22pt]
\starttext
This is the regular body text font but {\useWarningFont BE AWARE} that others 
can be used.
\stoptext


—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Re: compatibility between \startshapetext and \startsection ?

2024-05-15 Thread Garulfo

Thanks you Wolfgang.

If it's not possible to use \blank, it appears that using for example 
\strut\par\strut\par is OK (but \par\par is not, )


\dorecurse{5}{
\strut\par\strut\par
\leftaligned{Title for section{\recurselevel}}
\strut\par\strut\par
\darkred\input knuth \par
\darkblue\input ward}

Please, what would be a \setuphead that removes the introduction of 
these "uncompatible" verticals skips ?


I've tried several, but even this one isn't compatible.

\setuphead
  [section]
  [before={}, % also tried \blank[nowhite] and \blank[back]
   inbetween={},
   after={},
   beforesection={},
   aftersection={},
   alternative=text,
   style=\tf]


Le 15/05/2024 à 13:09, Wolfgang Schuster a écrit :

garu...@azules.eu schrieb am 14.05.2024 um 23:13:

Hi all,

\startshapetext works pretty well, but when I use \startsection 
\stopsection, shapes are not respected  anymore.
I use layers, to be able to place the content anywhere, but the issue 
remains without layers.


Any clues ?
(\placeinitial seems also to break the shaping)


Example : 2 pages without sectioning, and after 2 pages by 
uncommenting the \startsection and \stopsection commands.



[...]
\dorecurse{5}{
\startsection[title={Title for section{\recurselevel}}]
\darkred\input knuth \par
\darkblue\input ward
\stopsection
}



The problem aren't the section command but the vertical skips added 
before and after each section, you can reproduce the effect when you add 
\blank to your example.


\dorecurse{5}{
\blank
\leftaligned{Title for section{\recurselevel}}
\blank
\darkred\input knuth \par
\darkblue\input ward
}

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] expansion question

2024-05-15 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

\setupinteraction[state=start]
\setupattachments[method=hidden]
\protected\def\PDFfile[#1]%
  {\cldcontext{file.addsuffix("#1", "pdf")}}
\starttext
  \doifelsefile{\PDFfile[xml-mkiv]}
{yes}{no}
  \attachment[file={\PDFfile[xml-mkiv]}]
\stoptext

I need the \PDFfile definition to be \protected for only one case (that
I cannot reproduce in my sample).

Is there any way to define an unprotected command and invoke it as
protected only for a particular case?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to use fonts without typescripts?

2024-05-15 Thread Henri Menke via ntg-context
On Wed, 2024-05-15 at 20:03 +0530, Shiv Shankar Dayal wrote:
> Hi,
> 
> Defining typescripts to use a font is very painful. How can I use a
> font
> without using a typescript?

Use \definefontfamily which is essentially the successor of the old
simplefonts module.

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

Cheers, Henri

> 
> _
> __
> 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: How to use fonts without typescripts?

2024-05-15 Thread Wolfgang Schuster

Shiv Shankar Dayal schrieb am 15.05.2024 um 16:33:

Hi,

Defining typescripts to use a font is very painful. How can I use a 
font without using a typescript?


\definefontfamily [windows] [rm] [Times New Roman]
\definefontfamily [windows] [ss] [Arial]
\definefontfamily [windows] [tt] [Courier New] [features=none]
\definetypeface   [windows] [mm] [math] [termes] % use \definetypeface 
to load a math font


\setupbodyfont[windows]

\starttext
\showbodyfont
\stoptext

Wolfgang

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

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


[NTG-context] How to use fonts without typescripts?

2024-05-15 Thread Shiv Shankar Dayal
Hi,

Defining typescripts to use a font is very painful. How can I use a font
without using a typescript?

-- 
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: what am I missing in the typescript?

2024-05-15 Thread Wolfgang Schuster

madiazm.eo...@gmail.com schrieb am 15.05.2024 um 14:01:

indeed! thanks a lot, I'm trying different things since yesterday and got no 
clues...

I just adapted it to the other script that works good (and there reads 
[SerifRegular]...[SerifItalic]...[SerifBold]...

why is no Regular needed here? (just trying to learn)


Below is a snippet from font-unk.mkxl where you can see which names are 
mapped
to a certain font alternative, e.g. \tf (the normal upright style) 
expect a fontsynonym

with the name Serif.

\definebodyfont [default] [rm]
  [\s!tf=Serif    sa 1,
   \s!bf=SerifBold    sa 1,
   \s!it=SerifItalic  sa 1,
   \s!sl=SerifSlanted sa 1,
   \s!bi=SerifBoldItalic  sa 1,
   \s!bs=SerifBoldSlanted sa 1,
   \s!sc=SerifCaps    sa 1] % obsolete, is a font feature now

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: what am I missing in the typescript?

2024-05-15 Thread madiazm . eoicc
indeed! thanks a lot, I'm trying different things since yesterday and got no 
clues...

I just adapted it to the other script that works good (and there reads 
[SerifRegular]...[SerifItalic]...[SerifBold]...

why is no Regular needed here? (just trying to learn)

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

maillist : ntg-context@ntg.nl / 
https://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: what am I missing in the typescript?

2024-05-15 Thread Taco Hoekwater



> On 15 May 2024, at 13:38, madiazm.eo...@gmail.com wrote:
> 
> 
> \definefontsynonym [SerifRegular] [Cormorant-Regular]
> [features=default]

The line above should read:

> \definefontsynonym [Serif] [Cormorant-Regular]
> [features=default]

Best wishes,
Taco

___
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] what am I missing in the typescript?

2024-05-15 Thread madiazm . eoicc
Hi all,
I'm trying to configure my document to use Libertinus font for the general text 
and Cormorant for the headings, but I can't get the cormorant-font applied 
(neither in the text self). The Libertinus fonts get loaded without problems 
but for cormorant I don't get even a message in log, as if it was invisible.
What am I missing? here my script:


 
\definefontfeature[Libertinusfeatures][
  mode=node,
  ccmp=yes, % character composition
  liga=yes, tlig=yes, % ligatures
  tnum=yes,
  cpsp=yes, % capital spacing
  kern=yes,
  language=dflt,
  protrusion=quality,
  expansion=quality,
]

\definefontfeature[smallcaps][% use with \addff
  smcp=yes, % smallcaps
  % c2sc=yes, % caps to smallcaps
]


\starttypescript[serif][libertinus]
\definefontsynonym[LibertinusSerif-Regular]   
[file:/fonts/LibertinusSerif-Regular.otf]
\definefontsynonym[LibertinusSerif-Italic]
[file:/fonts/LibertinusSerif-Italic.otf]
\definefontsynonym[LibertinusSerif-Bold]  
[file:/fonts/LibertinusSerif-Semibold.otf]
\definefontsynonym[LibertinusSerif-BoldItalic]
[file:/fonts/LibertinusSerif-SemiboldItalic.otf]
\definefontsynonym[LibertinusSerif-Slanted]   
[file:/fonts/LibertinusSerif-Italic.otf]
\stoptypescript

\starttypescript[serif][libertinus][name]

\definefontsynonym [Serif] [LibertinusSerif-Regular]
[features=Libertinusfeatures]
\definefontsynonym [SerifRegular]  [LibertinusSerif-Regular]
[features=Libertinusfeatures]
\definefontsynonym [SerifItalic]   [LibertinusSerif-Italic] 
[features=Libertinusfeatures]
\definefontsynonym [SerifSlanted]  [LibertinusSerif-Italic]   
[features=Libertinusfeatures]
\definefontsynonym [SerifCaps] [LibertinusSerif-Regular]
[features={Libertinusfeatures,smallcaps}]
\definefontsynonym [SerifBold] [LibertinusSerif-Bold]   
[features=Libertinusfeatures]
\definefontsynonym [SerifBoldItalic]   [LibertinusSerif-BoldItalic]   
[features=Libertinusfeatures]
\definefontsynonym [SerifBoldSlanted]  [LibertinusSerif-BoldItalic] 
[features=Libertinusfeatures]

\stoptypescript



% SANS

\starttypescript[sans][libertinussans]
\definefontsynonym[LibertinusSans-Regular]
[file:/fontsSans/LibertinusSans-Regular.otf]
\definefontsynonym[LibertinusSans-Italic] 
[file:/fontsSans/LibertinusSans-Italic.otf]
\definefontsynonym[LibertinusSans-Bold]   
[file:/fontsSans/LibertinusSans-Bold.otf]
\stoptypescript


\starttypescript[sans][libertinussans][name]
\definefontsynonym [Sans] [LibertinusSans-Regular]
[features=Libertinusfeatures]
\definefontsynonym [SansItalic]   [LibertinusSans-Italic] 
[features=Libertinusfeatures]
\definefontsynonym [SansSlanted]  [LibertinusSans-Italic] 
[features=Libertinusfeatures]
\definefontsynonym [SansCaps] [LibertinusSans-Regular]
[features={Libertinusfeatures,smallcaps}]
\definefontsynonym [SansBold] [LibertinusSans-Bold]
[features=Libertinusfeatures]
\stoptypescript

%MONO

\starttypescript[mono][libertinusmono]
\definefontsynonym[LibertinusMono-Regular]
[file:/fontsMono/LibertinusMono-Regular.otf]
\stoptypescript


\starttypescript[mono][libertinusmono][name]
\definefontsynonym [Mono] [LibertinusMono-Regular]
[features=none]
\stoptypescript

%CORMORANT

\starttypescript[serif][cormorant]
\definefontsynonym[Cormorant-Regular][file:/fonts/Cormorant-Regular.otf]
\stoptypescript


\starttypescript[serif][cormorant][name]
\definefontsynonym [SerifRegular] [Cormorant-Regular]
[features=default]
\stoptypescript

% FAMILY



\starttypescript[miFuente]
\definetypeface [miFuente] [rm] [serif] [libertinus] [default]
\definetypeface [miFuente] [ss] [sans]  [libertinussans] [default]
\definetypeface [miFuente] [tt] [mono]  [libertinusmono] [default]
\stoptypescript

\starttypescript[miCorm]
\definetypeface [miCorm] [rm] [serif] [cormorant] [default]
\stoptypescript


\setupbodyfont[miFuente, 12pt]


\starttext


\startsection[title=Aspectos generales]

Esta guía contiene toda la documentación necesaria para administrar la {\it 
prueba unificada de certificación} que ha diseñado la comisión de alemán. Se 
ruega al profesorado que se familiarice con las secciones del documento a 
través del índice y acuda a ellas según vaya siendo necesario, de manera que se 
pueda {\bf administrar y corregir} la prueba de la manera más satisfactoria 
posible.

%%% trying to get cormorant working...

\startsubsection[title=Organización de carpetas]
{\switchtobodyfont[miCorm] {\tfc la fuente Cormorant no funciona}}
\stopsubsection



Las carpetas aparecen nombradas {\ss por idioma}, nivel y set de pruebas, no 
apareciendo ninguna referencia a convocatorias ni tampoco fechas. Sí aparece la 
referencia a la convocatoria en cada una de las guías de administración para 
los diferentes niveles.
La carpeta correspondiente a cada nivel contiene las distintas 

[NTG-context] Re: compatibility between \startshapetext and \startsection ?

2024-05-15 Thread Wolfgang Schuster

garu...@azules.eu schrieb am 14.05.2024 um 23:13:

Hi all,

\startshapetext works pretty well, but when I use \startsection \stopsection, 
shapes are not respected  anymore.
I use layers, to be able to place the content anywhere, but the issue remains 
without layers.

Any clues ?
(\placeinitial seems also to break the shaping)


Example : 2 pages without sectioning, and after 2 pages by uncommenting the 
\startsection and \stopsection commands.


[...]
\dorecurse{5}{
\startsection[title={Title for section{\recurselevel}}]
\darkred\input knuth \par
\darkblue\input ward
\stopsection
}



The problem aren't the section command but the vertical skips added 
before and after each section, you can reproduce the effect when you add 
\blank to your example.


\dorecurse{5}{
\blank
\leftaligned{Title for section{\recurselevel}}
\blank
\darkred\input knuth \par
\darkblue\input ward
}

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] compatibility between \startshapetext and \startsection ?

2024-05-14 Thread garulfo
Hi all,

\startshapetext works pretty well, but when I use \startsection \stopsection, 
shapes are not respected  anymore.
I use layers, to be able to place the content anywhere, but the issue remains 
without layers.

Any clues ?
(\placeinitial seems also to break the shaping)


Example : 2 pages without sectioning, and after 2 pages by uncommenting the 
\startsection and \stopsection commands.


\setupbodyfont [pagella, 8pt]
\setupframed
  [frame=on,
   offset=0.000pt,
   rulethickness=0.000pt,
   location=top,
   align=normal,
   strut=yes,
   ]
\setuplayout [grid=yes]
\setupinteraction [state=start]

%--

\definemeasure [myheight] [{\the\dimexpr\baselineskip*33+\lineskip\relax}]
\definemeasure [myheighta][{\the\dimexpr\baselineskip*10+\lineskip*2\relax}]
\definemeasure [myheightb][{\the\dimexpr\baselineskip*20-\lineskip*2\relax}]

\startuseMPgraphic{mp1}
  path p ;
  numeric myheight  ; myheight := \measure{myheight};
  numeric myheighta ; myheighta := \measure{myheighta};
  numeric myheightb ; myheightb := \measure{myheightb};
  p := (0,0) -- (6cm,0) --
   (6cm,myheighta) -- (4cm,myheighta) -- (4cm,myheightb) -- (6cm,myheightb) 
--
   (6cm,myheight) -- (0cm,myheight) -- cycle;
  build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) ;
  fill p withcolor \MPcolor{lightyellow};
\stopuseMPgraphic

\defineoverlay[ol1][\useMPgraphic{mp1}]


%==
\starttext
%==

{\sc\bfd Version A, without sectionning, pages 1\ampersand 2}

\startshapetext[mp1, mp1, mp1, mp1, mp1, mp1]
\setupalign[hz,hanging,verytolerant,stretch,normal]%
\setupindenting[yes,small]%
\strut%
\reference[myref1]{MyRef1}Here is the first reference.\par
See reference \in[myref2] on \at{page}[myref2]\par
%
\dorecurse{5}{
%\startsection[title={Title for section{\recurselevel}}]
\darkred\input knuth \par
\darkblue\input ward
%\stopsection
}

\reference[myref2]{MyRef2} Here is the second reference.\par
See reference \in[myref1] on \at{page}[myref1]\par

\stopshapetext

\definelayer[testA]

\setlayer[testA][x=-1cm,y=3cm]{\framed[background=ol1]{\strut\getshapetext}}
\setlayer[testA][x=9cm,y=3cm] {\framed[background=ol1]{\strut\getshapetext}}
\flushlayer[testA]

\page

\setlayer[testA][x=-1cm,y=3cm]{\framed[background=ol1]{\strut\getshapetext}}
\setlayer[testA][x=9cm,y=3cm] {\framed[background=ol1]{\strut\getshapetext}}
\flushlayer[testA]

\page
%==

{\sc\bfd Version B, with sectionning, pages 3\ampersand 4}

\startshapetext[mp1, mp1, mp1, mp1, mp1, mp1]
\setupalign[hz,hanging,verytolerant,stretch,normal]%
\setupindenting[yes,small]%
\strut%
\reference[myref3]{MyRef3}Here is the first reference.\par
See reference \in[myref4] on \at{page}[myref4]\par
%
\dorecurse{5}{
\startsection[title={Title for section{\recurselevel}}]
\darkred\input knuth \par
\darkblue\input ward
\stopsection
}

\reference[myref4]{MyRef4} Here is the second reference.\par
See reference \in[myref3] on \at{page}[myref3]\par

\stopshapetext

\definelayer[testB]

\setlayer[testB][x=-1cm,y=3cm]{\framed[background=ol1]{\strut\getshapetext}}
\setlayer[testB][x=9cm,y=3cm] {\framed[background=ol1]{\strut\getshapetext}}
\flushlayer[testB]

\page

\setlayer[testB][x=-1cm,y=3cm]{\framed[background=ol1]{\strut\getshapetext}}
\setlayer[testB][x=9cm,y=3cm] {\framed[background=ol1]{\strut\getshapetext}}
\flushlayer[testB]

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

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


[NTG-context] index sort order (de)

2024-05-14 Thread Henning Hraban Ramm

Hi,
I checked the German index sorting rules, and as far as I can tell, all 
of them are somewhat wrong.


– de, default, or no setting (just mainlanguage de)
– Duden
- DIN 5007-1(:2005)
- DIN 5007-2(:1996)
- de-AT

IMO, "Duden" is obsolete, should be the same as default; it makes no 
sense to have a default setting that doesn’t adhere to the official 
rules. If Û#m not mistaken it’s also the same as DIN 5007-1; maybe there 
was a difference before 2005. (DIN 5007-2 and de-AT have their uses.)


The order of umlauts etc. should be ok.

[ß]
In tex/context/base/mkiv/sort-lan.lua, ß is replaced by s, while it 
should be sorted like ss in default and both DIN versions. (de-AT sorts 
ss after ß.)


[upper-/lowercase]
While casing is not mentioned in Wikipedia 
(https://de.wikipedia.org/wiki/Alphabetische_Sortierung), Duden „Satz 
und Korrektur“ says:


Uppercase characters get sorted the same as lowercase (i.e. mixed), but 
if both appear, lowercase comes first.


ATM all German settings sort lowercase behind uppercase.



Generally, default method seems to be not "default" but "before". Does 
this make sense?


If we look at the method presets, there’s none for {zm,pm,zc,zm,uc} 
(upper like lower, ignore diacritics – basic default for German).


"""
\mainlanguage[de]
\setupregister[index][language=de]

\starttext

\index{Apfel}
\index{Äpfel}
\index{apfel}
\index{äpfel}
\index{aepfel}
\index{Aepfel}
\index{Ápfel}
\index{ápfel}

\page
\completeindex

\stoptext
"""

default order should be:

aepfel
Aepfel
apfel
Apfel
äpfel
Äpfel
ápfel
Ápfel
aqua

DIN 5007-2 sorts like:

aepfel
Aepfel
äpfel
Äpfel
apfel
Apfel
ápfel
Ápfel
aqua

de-AT sorts like:

aepfel
Aepfel
apfel
Apfel
aqua
äpfel
Äpfel
ápfel
Ápfel




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: weird \inlinetypebuffer interaction

2024-05-14 Thread Pablo Rodriguez via ntg-context
On 5/9/24 15:18, Pablo Rodriguez via ntg-context wrote:
> [...]
> Many thanks for your improvement, Wolfgang.
>
> It would be great to have it included in standard ConTeXt.

Hans,

many thanks for having added this to current latest (2024.05.13 19:19).

Pablo
___
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] [installation] "unzipping" gives 0K files on windows

2024-05-14 Thread yashpalgoyal1304+ntgcontext
hi! greetings of the day.

-
### QoL improvements for installation

* on win10 22h2 pc, i am facing problems (attached below) in installing context 
via [`context-win64.zip`].
* so, i had to run the install.bat again and again. 
* due to which the same step of "fetching 
'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip'" and "fetching 
'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip'" was performed 
repeatedly
* this consumes lots of time, will & internet bandwidth 
& takes away the focus from other important part of installation

So, 
1. can `install.bat` (or whatever responsible) pick these zips from current 
directory if these exist there?
of course, it should match their hash from the internet for verifying that 
these are same zips it needs.
2. rather than blindly removing the zips after (trying to) unzip, the 
`mtx-install.lua` should confirm 
if the "unzipping" hasn't resulted in these empty 0B files - as it seems some 
fundamental issue on windows
(description & context attached below)

-
### version number

i understand that there's [only a 'latest' version, ... no stable 
release][context_history], 
* but still where is the version number for this latest shown on web?
* i am looking for a plaintext way, i.e. which can be accessed from anywhere 
without any install. 
* so, it might be via some "Releases" section on an html webpage, or some file 
like xml, yml, json, etc containing release versions listing

also, please don't use `:` colon or ` ` spaces in version as various package 
managers use version as directory names.
so, my suggested one is: `2025.01.08.T1320` i.e. `.MM.dd.THHmm`

i found various places which mentioned versions, but none of those mentioned 
"latest stable" version:
* news on [main_page]: `The Wiki's ConTeXt installation is on version ConTeXt 
2024.01.08 11:23 LMTX.`
again, it shows the "wiki's context installation". not the release.
* installation wiki: [check_installation]: `mtx-context | current version: 
2024.04.01 08:59`
it is aimed at illustration & outdated. no reason for it to be kept up-to-date.
* [pragma-ade] shows: `2024-05-11 12:57 | 118925584`
but it seems for the sources i guess? and it uses `-` dashes as date separator 
rather than dots at other places above. 
also, what does last column show with '118925584'?


-
### details of the problem:

* on running `context-win64/install.bat` even as admin & finishing the 
procedure, the `context --version` is not running. 
* the `texmf` directory tree matches [`texmf.zip`] (~52MB), but rather than 
`fonts`, `web2c` being dirs, those appear as files of 0B
* similarly the `texmf-context` dir tree matches [`texmf-context.zip`] 
(~115MB), but again, all the `colors`, `context`, `doc`, `tex`, `web2c` are 
shown as 0B files rather than being dirs
* also the `texmf-win64/bin/` contains a link-file (broken) of 0B with its name 
in chinese: `畬浡瑥瑡硥攮數`

just for records:
i have already enabled the developer tools on windows since a long time ago. 
so, creating filesystem links should work here already.

here's exerpt from the `install.bat` run's console output for "unzipping":

```
mtx-install | fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip'
mtx-install | unzipping 'texmf.zip'
  70 files of  706 done,6960406 bytes, 0.083 seconds
 140 files of  706 done,   10371456 bytes, 0.151 seconds
 210 files of  706 done,   14124718 bytes, 0.234 seconds
 280 files of  706 done,   19504148 bytes, 0.318 seconds
 350 files of  706 done,   24662280 bytes, 0.401 seconds
 420 files of  706 done,   33169752 bytes, 0.484 seconds
 490 files of  706 done,   40851921 bytes, 0.583 seconds
 560 files of  706 done,   47678981 bytes, 0.672 seconds
 630 files of  706 done,   68347030 bytes, 0.818 seconds
 700 files of  706 done,   85872915 bytes, 0.943 seconds
 706 files of  706 done,   86963093 bytes, 0.963 seconds
mtx-install | fetching 
'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip'
mtx-install | unzipping 'texmf-context.zip'
 533 files of 5333 done,   88905129 bytes, 0.807 seconds
1066 files of 5333 done,   96885926 bytes, 1.333 seconds
1599 files of 5333 done,  116688474 bytes, 1.911 seconds
2132 files of 5333 done,  125260237 bytes, 2.375 seconds
2665 files of 5333 done,  142877653 bytes, 2.890 seconds
3198 files of 5333 done,  152403593 bytes, 3.375 seconds
3731 files of 5333 done,  160173210 bytes, 3.854 seconds
4264 files of 5333 done,  170072731 bytes, 4.333 seconds
4797 files of 5333 done,  176877135 bytes, 4.791 seconds
5330 files of 5333 done,  183560838 bytes, 5.270 seconds
5333 files of 5333 done,  183587012 bytes, 5.270 seconds
mtx-install | installing tex/texmf-win64, 5 files
mtx-install | skipping tex/texmf-win64/bin/context.exe
mtx-install | new  :  31 % : 1315 : tex/texmf-win64/bin/context.lua
mtx-install | new  :  62 % :  3075584 : 
tex/texmf-win64/bin/luametatex.exe
mtx-install | skipping tex/texmf-win64/bin/mtxrun.exe

[NTG-context] Re: Hbox error with itemized list on second page

2024-05-14 Thread Ross Schulman
Hi, sorry. The example was in an earlier message in the thread: 
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/ZLVFEBU73KBBCBUQMWXZWER2CZHR6ZR2/

I fixed the problem for now by forcing a page break where it was needed.

On Tue, May 14, 2024, at 6:57 AM, Wolfgang Schuster wrote:
> Ross Schulman schrieb am 07.05.2024 um 01:33:
>> So, unfortunately while using `\testpage` helped in the version of the 
>> resume I was working on at the time, I've encountered the error again now 
>> that some different content is making the page break at a different point, 
>> and setting `\testpage` as high as 6 is not fixing the problem. Is there 
>> something else I can/should try?
> 
> For the start you can show us a minimal example with the problem.
> 
> When you're still trying to create a paragraph with different text widths 
> there are limitations. TeX always typesets more text than it can fit on the 
> current page and when on the next page the text widths changes this is to 
> late for TeX at this moment because the text has already been set with the 
> width of the previous page.
> 
> 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: Hbox error with itemized list on second page

2024-05-14 Thread Wolfgang Schuster

Ross Schulman schrieb am 07.05.2024 um 01:33:
So, unfortunately while using `\testpage` helped in the version of the 
resume I was working on at the time, I've encountered the error again 
now that some different content is making the page break at a 
different point, and setting `\testpage` as high as 6 is not fixing 
the problem. Is there something else I can/should try?


For the start you can show us a minimal example with the problem.

When you're still trying to create a paragraph with different text 
widths there are limitations. TeX always typesets more text than it can 
fit on the current page and when on the next page the text widths 
changes this is to late for TeX at this moment because the text has 
already been set with the width of the previous page.


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: applying style to frame content

2024-05-14 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 14.05.2024 um 09:57:

Hi all,

what is the better way to apply a metapost effect to a piece of any structure 
text
for example when defining footnotes, frames , etc.
i use this method for frames:

this is my MWE:
\defineframed[Myframe][frame=off]
\starttexdefinition spaces protected Mystyle #1
\startMPcode
  picture tt ; tt:= lmt_outline [
kind = "path",
text = "\Myframe{#1}",
  ];
fill
  for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red,blue);
\stopMPcode
\stoptexdefinition

\starttext
\Mystyle{hello}
\stoptext


but what is the proper way if i want to use this style as simple as \tfb in 
definition of this structures? such as:
\defineframed[Myframe][frame=off,style=\tfb\Mystyle,]


You can't apply commands which take arguments (like \Mystyle) to pass 
content fro TeX to Metapost with the style key. The only solution here 
is to create a new commands which takes the content as argument and 
combine the frame and shade in the command definition.


\defineframed[Myframe][frame=off]

\starttexdefinition spaces protected Mystyle #1
   \startMPcode
 picture tt ; tt:= lmt_outline [
   kind = "path",
   text = "#1",
 ];
   fill
 for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red,blue);
   \stopMPcode
\stoptexdefinition

\define[1]\Mycommand
  {\Myframe{\Mystyle{#1}}}

% \define[1]\Mycommand
%   {\Mystyle{\Myframe{#1}}}

\starttext
\Mycommand{hello}
\stoptext

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

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


[NTG-context] applying style to frame content

2024-05-14 Thread seyal . zavira
Hi all,

what is the better way to apply a metapost effect to a piece of any structure 
text
for example when defining footnotes, frames , etc.
i use this method for frames:

this is my MWE:
\defineframed[Myframe][frame=off]
\starttexdefinition spaces protected Mystyle #1
   \startMPcode
 picture tt ; tt:= lmt_outline [
   kind = "path",
   text = "\Myframe{#1}",
 ];
   fill
 for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red,blue);
   \stopMPcode
\stoptexdefinition

\starttext
\Mystyle{hello}
\stoptext


but what is the proper way if i want to use this style as simple as \tfb in 
definition of this structures? such as:
\defineframed[Myframe][frame=off,style=\tfb\Mystyle,]

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

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


[NTG-context] Re: Fwd: outlinetext broken?

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

On 5/13/2024 11:54 PM, Jairo A. del Rio wrote:



-- Forwarded message -
De: *Jairo A. del Rio* >

Date: lun, 13 may 2024 a la(s) 9:53 p.m.
Subject: Re: outlinetext broken?
To: Hans Hagen mailto:j.ha...@xs4all.nl>>


Hi, Hans! Thank you for the update! I'm curious about the following 
issue: when I use Latin Modern (by default), a thick, filled line is 
drawn next to the radical. However, when I use another font such as TeX 
Gyre Schola, I get something similar to outlines-003.pdf, which is, in 
turn, similar to the result of applying PDF effects. So, shouldn't this 
result be the default? Thanks a lot again.
it depends on how a radical is composed; we try create an extensible 
using snippets which looks better in the case of fontd where rules (have 
to) have roun dcorners etc


Hans

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

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

maillist : ntg-context@ntg.nl / 
https://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] Fwd: outlinetext broken?

2024-05-13 Thread Jairo A. del Rio
-- Forwarded message -
De: Jairo A. del Rio 
Date: lun, 13 may 2024 a la(s) 9:53 p.m.
Subject: Re: outlinetext broken?
To: Hans Hagen 


Hi, Hans! Thank you for the update! I'm curious about the following issue:
when I use Latin Modern (by default), a thick, filled line is drawn next to
the radical. However, when I use another font such as TeX Gyre Schola, I
get something similar to outlines-003.pdf, which is, in turn, similar to
the result of applying PDF effects. So, shouldn't this result be the
default? Thanks a lot again.

Best regards,

Jairo

El sáb, 11 may 2024 a la(s) 10:04 p.m., Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 5/11/2024 8:33 PM, Jairo A. del Rio wrote:
> > As for the current ConTeXt, the example above still produces the wrong
> > output. Can anyone reproduce this case? Thank you in advance.
> It's a bit tricky but this is what i can get ... see attached.
>
> (You have to wait till a next upload.)
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2024-05-13 Thread Cron Daemon
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 show-fil.pdf
 context/latest/
 context/latest/cont-lmt.zip
 context/latest/cont-mpd.zip
 context/latest/cont-ppc.zip
 context/latest/cont-sci.zip
 context/latest/cont-tmf.zip
 context/latest/cont-tst.7z
 context/latest/cont-tst.tar.xz
 context/latest/cont-tst.zip
 
 sent 180,450 bytes  received 40,343,045 bytes  2,794,723.79 bytes/sec
 total size is 582,476,037  speedup is 14.37


Running archiver:

New dir: /var/www/aanhet.net/context//htdocs/archives/context-2024-05-13.21
248566476   
/var/www/aanhet.net/context//htdocs/archives/context-2024-05-13.21/latest
126745317   
/var/www/aanhet.net/context//htdocs/archives/context-2024-05-13.21/current
375315889   
/var/www/aanhet.net/context//htdocs/archives/context-2024-05-13.21
375315889   total
___
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: Errors with 2024-05-11 LMTX

2024-05-13 Thread Alain Delmotte

Hi!

Le 13-05-24 à 01:01, Hans Hagen a écrit :

On 5/12/2024 6:50 PM, Rik Kabel wrote:
I have come across an error that halts processing with 
the latest release. The following demonstrates this:
That one was hard to find as it was not something new hut 
just showing up now.


Can you try the latest binary from

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

Hans


Thanks, that also solved the problem when I tried to compile 
"Hello-world.tex" from the distribution !


It was crashing for the lines 39-46.

Thanks for ConTeXt,

Alain


___
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: Errors with 2024-05-11 LMTX

2024-05-12 Thread Rik Kabel


On 2024-05-12 19:01, Hans Hagen wrote:

On 5/12/2024 6:50 PM, Rik Kabel wrote:
I have come across an error that halts processing with the latest 
release. The following demonstrates this:
That one was hard to find as it was not something new hut just showing 
up now.


Can you try the latest binary from

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

Hans

Thank you. That works for both of the examples and for the larger 
project from which they were derived.


--
Rik
___
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: Errors with 2024-05-11 LMTX

2024-05-12 Thread Hans Hagen

On 5/12/2024 6:50 PM, Rik Kabel wrote:
I have come across an error that halts processing with the latest 
release. The following demonstrates this:
That one was hard to find as it was not something new hut just showing 
up now.


Can you try the latest binary from

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

Hans

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

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

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


[NTG-context] Re: Metapost limitation ?

2024-05-12 Thread Mikael Sundqvist
Hi,

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

Very good. You can still try the thing below:

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

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

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

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

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

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

Then you do not need to think about the first and/or last point separately.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Errors with 2024-05-11 LMTX

2024-05-12 Thread Rik Kabel
I have come across an error that halts processing with the latest 
release. The following demonstrates this:


   \setuppagenumbering [location=]

   \starttext

 \dorecurse{36}{\dorecurse{19}{abc }}

 \startplacetable[location=split,title={Table}]
    \starttabulate[|p|p|]
    \HL
    \NC Heading \crlf
    heading
    \NC Heading \crlf
    heading
    \NC\AR
    \HL
    \NC abc \crlf
    abc
    \NC abc
    \NC\AR
    \NC abc \crlf
    abc
    \NC abc
    \NC\AR
    \NC abc \crlf
    abc
    \NC abc
    \NC\AR
    \NC abc \crlf
    abc
    \NC abc
    \NC\AR
    \HL
    \stoptabulate
    \stopplacetable

   \stoptext

while this version ends with the error : error (nodes): attempt to 
double-free rule node 55342, ignored


   \setuppagenumbering [location=]
   \starttext

 \dorecurse{37}{\dorecurse{19}{abc }}

 \startplacetable[location=split,title={Table}]

    \starttabulate[|p|p|]
    \HL
    \NC Heading \crlf
    heading
    \NC Heading \crlf
    heading
    \NC\AR
    \HL
    \NC abc \NC abc \NC\AR
    \NC abc \NC abc \NC\AR
    \NC abc \NC abc \NC\AR
    \HL
    \stoptabulate

    \stopplacetable

   \stoptext

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

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


[NTG-context] Re: Metapost limitation ?

2024-05-12 Thread Fabrice Couvreur
With Okular, it works !

Le dim. 12 mai 2024 à 17:55, Hans Hagen  a écrit :

> On 5/12/2024 5:36 PM, Fabrice Couvreur wrote:
> > Sorry for the comment !
> > I use Evince
> so how about okular or mupdf
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Metapost limitation ?

2024-05-12 Thread Hans Hagen

On 5/12/2024 5:36 PM, Fabrice Couvreur wrote:

Sorry for the comment !
I use Evince

so how about okular or mupdf

-
  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: no effect of \definefontfeature for adobevariablefontprototype

2024-05-12 Thread Hans Hagen

On 5/9/2024 10:38 PM, garu...@azules.eu wrote:

Hi,

trying to work with variable fonts, I am stuck at the very beginning.

I can't see any effect of weight parameter.
Using adobevariablefontprototypebold and adobevariablefontprototypelight is 
working.

\starttext

\definefontfeature[whatever][axis={weight:150}]%
\definedfont[name:adobevariablefontprototype*whatever]foo@bar

\definefontfeature[whatever][axis={weight:350}]%
\definedfont[name:adobevariablefontprototype*whatever]foo@bar

\definefontfeature[whatever][axis={weight:550}]%
\definedfont[name:adobevariablefontprototype*whatever]foo@bar

\definefontfeature[whatever][axis={weight:750}]%
\definedfont[name:adobevariablefontprototype*whatever]foo@bar

\stoptext

Can it be something from with my font file ?

\starttext

\definefontfeature[whatever01][default][axis={weight=0250}]
\definefontfeature[whatever02][default][axis={weight=0500}]
\definefontfeature[whatever03][default][axis={weight=0750}]
\definefontfeature[whatever04][default][axis={weight=1000}]

\definefontfeature[whatever10][default][axis={=000}]
\definefontfeature[whatever20][default][axis={=050}]
\definefontfeature[whatever30][default][axis={=075}]
\definefontfeature[whatever40][default][axis={=100}]

\definefontfeature[whatever11][default][axis={weight=0250,=000}]
\definefontfeature[whatever22][default][axis={weight=0500,=050}]
\definefontfeature[whatever33][default][axis={weight=0750,=075}]
\definefontfeature[whatever44][default][axis={weight=1000,=100}]

\definedfont[name:adobevariablefontprototype*whatever01]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever02]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever03]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever04]foo@bar\blank

\definedfont[name:adobevariablefontprototype*whatever10]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever20]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever30]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever40]foo@bar\blank

\definedfont[name:adobevariablefontprototype*whatever11]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever22]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever33]foo@bar\par
\definedfont[name:adobevariablefontprototype*whatever44]foo@bar\par

\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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Metapost limitation ?

2024-05-12 Thread Fabrice Couvreur
Sorry for the comment !
I use Evince

Le dim. 12 mai 2024 à 17:30, Hans Hagen  a écrit :

> On 5/12/2024 3:57 PM, Fabrice Couvreur wrote:
> > Hi,
> > When I want to draw the curve which corresponds to n=60 (blue curve), it
> > doesn't seem possible: I don't understand.
> > Thanks
> > Fabrice
> >
> >   \startMPpage[offset=1DK]
> >
> >numeric u;
> >u = 6cm;
> >
> >interim linejoin := mitered;
> >interim ahangle := 30;
> >
> >path xx, yy;
> >xx = ( (-0.3,0) -- 1.4 right) scaled u;
> >yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u;
> >
> >def compute_curve(suffix f)(expr xmin, xmax, xinc) =
> >((xmin,f(xmin))
> >for x=xmin+xinc step xinc until xmax:
> > .. (x,f(x))
> >endfor)
> >enddef;
> >
> >
> >for i = 1 upto 4:
> >
> >vardef f(expr x) =x+exp(-i*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;
> >
> >draw curve;
> >
> >endfor;
> >
> >vardef f(expr x) =x+exp(-6*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;
> >
> >draw curve;
> >
> >vardef f(expr x) =x+exp(-15*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;
> >
> >draw curve;
> >
> >
> >vardef f(expr x) =x+exp(-60*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; -> not
> > drawn
>
> best put a comment before the ->>>
>
> >draw curve withcolor blue;
> >
> >
> >drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp;
> >drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp;
> >
> >
> >label.urt("A",(0,1u));
> >
> >draw xx;
> >draw  yy;
> >
> >draw (1u,0) -- (1u,1.8u);
> >
> >
> >label.llft("0",(0,0));
> >
> > vardef mark_y_axis(expr value, name) =
> >  save p; pair p; p = value * u * up;
> >  draw (left--right) scaled 1 shifted p;
> >  label.lft(name, p shifted 2 left);
> >enddef;
> >
> >for a = 1 upto 1:
> >  mark_y_axis(a, "");
> >endfor
> >
> > mark_y_axis(1, "$1$");
> >
> >
> >   vardef mark_x_axis(expr value, name) =
> > save p; pair p; p = value * u * right;
> > draw (up--down) scaled 1 shifted p;
> > label.bot(name, p shifted 2 down);
> >   enddef;
> >
> >   for a = 1 upto 1:
> > mark_x_axis(a, "");
> >   endfor
> >
> >   mark_x_axis(1, "$1$");
> >
> >
> >path rectangle;
> >rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) --
> > (1.3u,1.4u) -- (-0.3u,1.4u)--cycle;
> >
> >clip currentpicture to rectangle;
> >   \stopMPpage
> >
> your exp usage:
>
>exp(-60*-0.4)
>
> if you see what huge numbers come out of that, like
>
> -51.006602 11100558579.857309 l
> -50.989594 11034154639.123087 l
> -50.972586 10968147929.149401 l
> -50.955579 10902536073.687559 l
> -50.938571 10837316710.703716 l
>
> you could imagine a viewer crapping out on that because no matter what
> one clips it still is 'kind of drawn', so what viewer do you use?
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Metapost limitation ?

2024-05-12 Thread Hans Hagen

On 5/12/2024 3:57 PM, Fabrice Couvreur wrote:

Hi,
When I want to draw the curve which corresponds to n=60 (blue curve), it 
doesn't seem possible: I don't understand.

Thanks
Fabrice

  \startMPpage[offset=1DK]

           numeric u;
           u = 6cm;

           interim linejoin := mitered;
           interim ahangle := 30;

           path xx, yy;
           xx = ( (-0.3,0) -- 1.4 right) scaled u;
           yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u;

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


           for i = 1 upto 4:

           vardef f(expr x) =x+exp(-i*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

           draw curve;

           endfor;

           vardef f(expr x) =x+exp(-6*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

           draw curve;

           vardef f(expr x) =x+exp(-15*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

           draw curve;


           vardef f(expr x) =x+exp(-60*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; -> not 
drawn


best put a comment before the ->>>


           draw curve withcolor blue;


           drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp;
           drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp;


           label.urt("A",(0,1u));

           draw xx;
           draw  yy;

           draw (1u,0) -- (1u,1.8u);


           label.llft("0",(0,0));

            vardef mark_y_axis(expr value, name) =
             save p; pair p; p = value * u * up;
             draw (left--right) scaled 1 shifted p;
             label.lft(name, p shifted 2 left);
           enddef;

           for a = 1 upto 1:
             mark_y_axis(a, "");
           endfor

            mark_y_axis(1, "$1$");


          vardef mark_x_axis(expr value, name) =
            save p; pair p; p = value * u * right;
            draw (up--down) scaled 1 shifted p;
            label.bot(name, p shifted 2 down);
          enddef;

          for a = 1 upto 1:
            mark_x_axis(a, "");
          endfor

          mark_x_axis(1, "$1$");


           path rectangle;
           rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) -- 
(1.3u,1.4u) -- (-0.3u,1.4u)--cycle;


           clip currentpicture to rectangle;
          \stopMPpage


your exp usage:

  exp(-60*-0.4)

if you see what huge numbers come out of that, like

-51.006602 11100558579.857309 l
-50.989594 11034154639.123087 l
-50.972586 10968147929.149401 l
-50.955579 10902536073.687559 l
-50.938571 10837316710.703716 l

you could imagine a viewer crapping out on that because no matter what 
one clips it still is 'kind of drawn', so what viewer do you use?


Hans

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

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

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


[NTG-context] Metapost limitation ?

2024-05-12 Thread Fabrice Couvreur
Hi,
When I want to draw the curve which corresponds to n=60 (blue curve), it
doesn't seem possible: I don't understand.
Thanks
Fabrice

 \startMPpage[offset=1DK]

  numeric u;
  u = 6cm;

  interim linejoin := mitered;
  interim ahangle := 30;

  path xx, yy;
  xx = ( (-0.3,0) -- 1.4 right) scaled u;
  yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u;

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


  for i = 1 upto 4:

  vardef f(expr x) =x+exp(-i*x) enddef;

  path curve;

  curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

  draw curve;

  endfor;

  vardef f(expr x) =x+exp(-6*x) enddef;

  path curve;

  curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

  draw curve;

  vardef f(expr x) =x+exp(-15*x) enddef;

  path curve;

  curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

  draw curve;


  vardef f(expr x) =x+exp(-60*x) enddef;

  path curve;

  curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; -> not
drawn

  draw curve withcolor blue;


  drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp;
  drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp;


  label.urt("A",(0,1u));

  draw xx;
  draw  yy;

  draw (1u,0) -- (1u,1.8u);


  label.llft("0",(0,0));

   vardef mark_y_axis(expr value, name) =
save p; pair p; p = value * u * up;
draw (left--right) scaled 1 shifted p;
label.lft(name, p shifted 2 left);
  enddef;

  for a = 1 upto 1:
mark_y_axis(a, "");
  endfor

   mark_y_axis(1, "$1$");


 vardef mark_x_axis(expr value, name) =
   save p; pair p; p = value * u * right;
   draw (up--down) scaled 1 shifted p;
   label.bot(name, p shifted 2 down);
 enddef;

 for a = 1 upto 1:
   mark_x_axis(a, "");
 endfor

 mark_x_axis(1, "$1$");


  path rectangle;
  rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) --
(1.3u,1.4u) -- (-0.3u,1.4u)--cycle;

  clip currentpicture to rectangle;
 \stopMPpage
___
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
___


  1   2   3   4   5   6   7   8   9   10   >