On Tue, Oct 6, 2026 at 09:59 (+0200), Fabrice C wrote:
> Hi,
> Wolfgang suggested some code to me for inserting a Python script. It
> worked perfectly until today.
> Thanks
> Fabrice
> \defineframedtext
> [algorithmframe]
> [width=fit,
> foregroundstyle={\tt\switchtobodyfont[11pt]},
> framecolor=,
> rulethickness=,
> location=middle,
> after=,
> before=,
> ]
> \starttext
> \startlinecorrection[blank]
> \startmidaligned
> \algorithmframe{def pyramide(n) :
> \hskip 5ex S = 0
> \hskip 5ex for i in range(1,n+1) :
> \hskip 10ex S = \ldots
> \hskip 5ex return \ldots
> }
> \stopmidaligned
> \stoplinecorrection
> \stoptext
Hi Fabrice,
did it really work "recently" ?
In any case, your algorithm is a bit too tense and needs to relax more.
Here is a working version of your document:
\defineframedtext
[algorithmframe]
[width=fit,
foregroundstyle={\tt\switchtobodyfont[11pt]},
framecolor=,
rulethickness=,
location=middle,
after=,
before=,
]
\starttext
\startlinecorrection[blank]
\startmidaligned
\algorithmframe{def pyramide(n) :
\hskip 5ex\relax S = 0
\hskip 5ex\relax for i in range(1, n+1) :
\hskip 10ex\relax S = \ldots
\hskip 5ex\relax return \ldots
}
\stopmidaligned
\stoplinecorrection
\stoptext
I hope this helps.
Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________