[metapost] make_text related scanning improvements

Hans Hagen j.hagen at xs4all.nl
Fri May 18 11:15:44 CEST 2018


On 5/18/2018 10:56 AM, Marcel Krueger wrote:
>   ---- On Fri, 18 May 2018 10:03:38 +0200 Hans Hagen <j.hagen at xs4all.nl> wrote ----
>   > [...]
>   > Thanks for the patch / suggestion. The space before etex / verbatim tex
>   > is deliberate (mandate) and that wil not change. Keep in mind that full
>   > compatibility is not our aim, definitely not with extensions (in mp it
>   > was kind of a kludge anyway) and the library has its own logic
>   > sometimes. The text gets passed to a lua function and people can
>   > manipulate there.
> 
> IMO  the bigger problem than the space before etex is the currently required character after etex.
> I think
> 
>          while (loc < limit - 5) {
> 
> should be replaced by
> 
>            while (loc < limit - 4) {
> 
> to allow the x from etex, at this point the character at loc + 4, to be the last charater of the line, limit - 1.

i'll check that

>   >
>   > Incidentely you patch can and will break other macro packages. We take
>   > context as reference here.
> 
> That's sad. I there a short example for breaking code?
> I must be missing something here, because the only incompatibility I could find
> was detecing etex followed by another letter which looks weird anyway.

any application that doesn't expect a newline in a string will have 
problems ... just imagine that you feed back that string to mp as 
string, then you suddenly have newlines in strings which gives an error

changing fundamentals like this nearly always have side effects ... you 
cannot always know how these tools are used (for decades) ... you solve 
one problem and introduces a new one .. such is the world of tex / mp

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


More information about the metapost mailing list