[NTG-context] Using \overloaded

2021-01-23 Thread Rik Kabel

Hans and all,

Preparing my standard environments for future strict enforcement of 
overloading prevention, I have run into one issue.


I had been using the following construction to change the formatting of 
URLs:


   \let\OrigHyphenatedurl\hyphenatedurl
   \starttexdefinition hyphenatedurl #URL
  \begingroup
    \URLfont\OrigHyphenatedurl{#URL}
  \endgroup
   \stoptexdefinition

This results in the following warning about overloading \hyphenatedurl:

   csname overload > warning, protection level 3, control sequence
   'hyphenatedurl', properties 'permanent protected', file
   'env_layout.mkvi', line 1

I have tried adding \overloaded to indicate the intentional overloading, 
but \overloaded cannot be used with \starttexdefinition, so I rewrote it as:


   \let\OrigHyphenatedurl\hyphenatedurl
   \overloaded\define[1]\hyphenatedurl{%
  \begingroup%
    \URLfont\OrigHyphenatedurl{#1}%
  \endgroup}%

but that (and also with \overloaded\def\hyphenatedurl#1...) gives the 
same (except for the line number) warning:


   csname overload > warning, protection level 3, control sequence
   'hyphenatedurl', properties 'permanent protected', file
   'env_layout.mkvi', line 822

So, what is the proper way to indicate intentional overloading? Or 
should this redefinition be done in another way?


(Also, it is interesting that the line number in the first warning 
message does not point to the actual line.)


--
Rik

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

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


[NTG-context] m-ipsum broken

2021-01-23 Thread Jairo A. del Rio
Hi, list

Compiling m-ipsum yields an error in latest LMTX (2021.01.22 09:41)

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

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


Re: [NTG-context] lmtx-20210118 | Corruption with rotated floats

2021-01-23 Thread Pablo Rodriguez
On 1/23/21 10:43 PM, Hans Hagen wrote:
> On 1/23/2021 12:10 PM, Pablo Rodriguez wrote:
>> [...]
>> LMTX misplaces next paragraph on next page with both 90 and 270.
>> [...]
> The code is not different from mkiv but instead we swap dimens using a
> primitive. When you set \overloadmode=4 (which can be interesting as it
> might reveal issues in a style) the run will quit with an error ... this
> is a fix:
>
> \def\strc_floats_set_page_variant
>{\bgroup
> \strc_floats_set_local_hsize
> \ifcase\c_strc_floats_rotation\else
>   \scratchdimen\hsize
>   \hsize\vsize
>   \vsize\scratchdimen
> \fi
>
> (it also indicates that we're cheating with the sizes which when it
> happens global is pretty dangerous ... it works but i admit that it is
> not nice)

Many thanks for the fast fix, Hans.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] lmtx-20210118 | Corruption with rotated floats

2021-01-23 Thread Hans Hagen

On 1/23/2021 12:10 PM, Pablo Rodriguez wrote:

On 1/23/21 8:59 AM, Richard Mahoney wrote:

[...]
\placetable[here,90]

results in the trashing of all subsequent body text in the PDF.
[...]
This error has been occurring for some time now, and unfortunately,
while I would like to keep up the recent releases of LMTX, it is
essential that I should be able to rotate tables and images. Does
anyone know of a fix?


Richard,

a minimal sample with images would read:

   \setupexternalfigures[location=default]
   \starttext
   \placefigure[90, here]{Rotated sample}{\externalfigure[hacker.jpg]}
   \input zapf
   \stoptext

I don’t know why, but both MkIV and current latest (LMTX from
2021.01.22 09:41) place the rotated figure on a different page (with 90
and 270).

LMTX misplaces next paragraph on next page with both 90 and 270.

To show the issues with tables, a minimal sample would help. I’m afraid
I don’t have any experience rotating tables.
The code is not different from mkiv but instead we swap dimens using a 
primitive. When you set \overloadmode=4 (which can be interesting as it 
might reveal issues in a style) the run will quit with an error ... this 
is a fix:


\def\strc_floats_set_page_variant
  {\bgroup
   \strc_floats_set_local_hsize
   \ifcase\c_strc_floats_rotation\else
 % Swapping fails in overloadmode and is also wrong (as it then is 
persistent due

 % to global being inherited).
%\swapdimens\hsize\vsize
 \scratchdimen\hsize
 \hsize\vsize
 \vsize\scratchdimen
   \fi

(it also indicates that we're cheating with the sizes which when it 
happens global is pretty dangerous ... it works but i admit that it is 
not nice)


Hans

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

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


Re: [NTG-context] \doassign variable - updates not picked up

2021-01-23 Thread Werner Hennrich

Am 22.01.21 um 23:46 schrieb Wolfgang Schuster:

I guess you set the value in a local group and at the end of the group
your setting is forgotten, ...


you're right Wolfgang!

I removed a \begingroup-\endgroup pair in the macro that sets the value
by calling my \setHeaderVar and now I get the updates being visible
inside the header code.


a simple change you can make is to replace
\doassign with \getgparameters which makes global settings.


I couldn't find any docu on \getgparameters except for its parameter
list (in setup-en.pdf) but what I have now will totally suffice.


A alternative to your current approach is to use the variables mechanism
to set and access values (you still have to ensure all values you set
are global).


I didn't even try the \setvariables approach now,
even though I had checked that one out before I wrote to this list
(w/out checking the begin/endgroup thing though).

Thank you very much and best regards,
Werner


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

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


[NTG-context] lmtx-20210118 | Corruption with rotated floats

2021-01-23 Thread Richard Mahoney
List members,

I've found that recent versions of LMTX seem to have broken table and
figure floats using rotation. Lmtx-20210118 with for example:

\placetable[here,90]

results in the trashing of all subsequent body text in the PDF.

This can be corrected with something such as:

\placetable[here] ...

\framed[orientation=90]

(although one looses the ability to rotate the title of the table).

The last really stable version of LMTX, which I'm finding that I'm 
constantly returning to as my default, is lmtx-20200920.

This error has been occurring for some time now, and unfortunately,
while I would like to keep up the recent releases of LMTX, it is
essential that I should be able to rotate tables and images. Does
anyone know of a fix.


Best, Richard




-- 
T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
IM https://t.me/rmahoney  W https://indica-et-buddhica.org/


Indica et Buddhica  Littledene  Bay Road  Oxford  NZ
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] lmtx-20210118 | Corruption with rotated floats

2021-01-23 Thread Pablo Rodriguez
On 1/23/21 8:59 AM, Richard Mahoney wrote:
> [...]
> \placetable[here,90]
>
> results in the trashing of all subsequent body text in the PDF.
> [...]
> This error has been occurring for some time now, and unfortunately,
> while I would like to keep up the recent releases of LMTX, it is
> essential that I should be able to rotate tables and images. Does
> anyone know of a fix?

Richard,

a minimal sample with images would read:

  \setupexternalfigures[location=default]
  \starttext
  \placefigure[90, here]{Rotated sample}{\externalfigure[hacker.jpg]}
  \input zapf
  \stoptext

I don’t know why, but both MkIV and current latest (LMTX from
2021.01.22 09:41) place the rotated figure on a different page (with 90
and 270).

LMTX misplaces next paragraph on next page with both 90 and 270.

To show the issues with tables, a minimal sample would help. I’m afraid
I don’t have any experience rotating tables.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] web server

2021-01-23 Thread Pablo Rodriguez
On 1/23/21 3:43 AM, Hans Hagen wrote:
> On 1/23/2021 1:38 AM, Jairo A. del Rio wrote:
>> So, is it still broken?
> [...]
> but ... i need to quit now in order not to get into a too bad mood but
> updating ... lmtx should work (well, it does here) .. tomorrow i'll play
> a bit more (we're locked down here anyway)

Hans,

LMTX update is working fine for me now and all pragma-ade.com,
www.pragma-ade.com, pragma-ade.nl and www.pragma-ade.nl work fine for me.

Many thanks for your excellent work,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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