[metapost] make_text related scanning improvements

Hans Hagen j.hagen at xs4all.nl
Fri May 18 12:49:50 CEST 2018


On 5/18/2018 12:01 PM, Marcel Krueger wrote:
>   ---- On Fri, 18 May 2018 11:32:57 +0200 Hans Hagen <j.hagen at xs4all.nl> wrote ----
>   > On 5/18/2018 11:22 AM, Taco Hoekwater wrote:
>   > > Hi,
>   > >
>   > >> On 18 May 2018, at 11:15, Hans Hagen <j.hagen at xs4all.nl> wrote:
>   > >>
>   > >> 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
>   > >
>   > > As the original ‘author’ of the reimplementation I can attest to that!
>   > >
>   > > It took half a dozen minor adjustments to the reimplementation just to make it compatible with pre-existing metapost source files, due to subtle differences between the Pascal and C handling of whitespace. I am not saying the code cannot be improved at all, but it seems likely that any changes at this point will have side-effects that break already existing metapost source files.
>   > right, so
>   >
>   >    btex ... etex
>   >
>   > will stay as it is, but i'll look if
>   >
>   >    verbatimtex ... etex
>   >
>   > can optionally (!) deal with newlines
> 
> Awesome.
> Regarding breaking existing `make_text` callbacks by allowing newlines: As far as I can tell a make_text callback should already be able to deal with newlines in the passed string, because the current version already allows a user to do something like
> 
>      maketext("abc" & char10 & "def")
> 
> Anyway, thank you very much for your feedback.
i was talking of a feedback into mp ... in which case the string is 
never processed so a newline embedded in a string is then piped into the 
mp input (in this case the feedback only happens in the btex case) but 
this is something context specific

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