[Seaside] Re: BOLatexWriter

Lukas Renggli renggli at gmail.com
Sun Sep 25 06:49:20 UTC 2011


> Thanks. In the latest version of all Grease packages and the print: method
is not around in the Stream hierarchy.

Ok, then it should be added.

> So, for is it Ok to have the fix in BOLatexWriter>>visitInternalLink: by
replacing stream with latex to work with print: or do you see problems
there?

No, the two strams don't have te same semantics. stream print: '\' should
print '\'; latex print: '\' should print '\\'.

Lukas

>
> Cheers,
> Doru
>
>
> On 24 Sep 2011, at 23:11, Lukas Renggli wrote:
>
>> Yes, this is intentional: 'stream' is the raw low-level stream, 'latex'
is the high-level encoded stream. The choice to which you send the output is
important. Changing it likely breaks the generation of valid LaTeX.
>>
>> GRPharoUtf8CodecStream or better its abstract superclass should implement
#print:. I think this was discussed in the Seaside list recently and fixed,
but I might be wrong.
>>
>> Lukas
>>
>> On Saturday, 24 September 2011, Tudor Girba <tudor at tudorgirba.com> wrote:
>> > Hi,
>> >
>> > I am testing Pier 2 some more, and now I got a problem in the Latex
writer. Specifically, I do not quite understand the difference between the
latex instance variable and the inherited stream one.
>> >
>> > Take a look at the snippet below:
>> >
>> > BOLatexWriter>>visitInternalLink: anInternalLink
>> >                ...
>> >                latex tab ... square: [ stream nextPutAll: 'width=';
print: ((anInternalLink parameterAt: 'width' ifAbsent: [ 100 ]) asNumber /
100.0); ... ]
>> >
>> > When executed on a book we have two instance variables:
>> > - stream: instance of GRPharoUtf8CodecStream (inherited)
>> > - latex: instance of BOLatexStream which wraps stream
>> >
>> > Now, it so happens that GRPharoUtf8CodecStream does not understand
print:, but this method exists in BOLatexStream. I fixed the code by
replacing stream with latex in the above method, and it works.
>> >
>> > But, there are still other places that use stream, and I think they
should all use the BOLatexStream instance instead. So, my question is: Is
this intentional? Or maybe should we actually simply override the setting of
stream and use that one for everything?
>> >
>> > Cheers,
>> > Doru
>> >
>> >
>> >
>> > --
>> > www.tudorgirba.com
>> >
>> > "Yesterday is a fact.
>> >  Tomorrow is a possibility.
>> >  Today is a challenge."
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Magritte, Pier and Related Tools ...
>> > https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>> >
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
> --
> www.tudorgirba.com
>
> "From an abstract enough point of view, any two things are similar."
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

-- 
Lukas Renggli
www.lukas-renggli.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110925/3ebd4032/attachment-0001.htm


More information about the seaside mailing list