[Cuis-dev] [RFC] Make \<latex symbol> expansion switchable?
Gerald Klix
cuis.01 at klix.ch
Tue Oct 22 04:55:30 PDT 2024
On 10/22/24 12:34 PM, Luciano Notarfrancesco via Cuis-dev wrote:
> I don’t know what others think, but IMO we could make it a preference, or
> we could make Character class>>namedCharactersMap empty in the base image
> and have an optional package to load all the default table, or let
> individual packages add the symbols that they need (in my packages I add
> extra symbols sometimes, specially when they are not latex standard names).
>
> Gerald, you need to edit latex in a text editor inside Cuis? This is
> implemented only in SmalltalkEditor, so you could use a normal TextEditor
> instead? or you need to write latex in Smalltalk code?
>
> On Tue, Oct 22, 2024 at 17:07 Gerald Klix via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Hi all, Hi Juan,
>>
>> Is there interest in making the expansion of LaTex symbols like
>> "\euro" optional?
>>
>> I just started to write a LaTex based report generator
>> and found e.g. the automatic expansion "\euro" a pain in
>> my bottom. The report should contain the LaTex command
>> "\euro" and not "€".
>>
>>
>> Best Regards,
>>
>> Gerald
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>
Luciano, thanks for your fast response.
I do not edit Latex code in a workspace, I write
methods that write latex into a file(stream).
Entering a code like this is, well, a bit complicated
generateTextForTransaction: aTransaction
"Generate the text for aTransaction."
self latexStream
newLine;
nextPutAll: '\begin{tabular}{ll}';
newLine;
nextPutAll: 'Datum:&'.
aTransaction entryDate printGermanOn: self latexStream.
self latexStream
nextPutAll: '\\';
newLine;
nextPutAll: 'Betrag:&'.
aTransaction amount abs printGermanOn: self latexStream
fractionDigits: 2.
self latexStream
nextPutAll: '\euro\\';
newLine;
nextPutAll: 'Text:&';
nextPutAll: (aTransaction text asString replaceAll: $_ with:
`Character space`);
newLine;
nextPutAll: '\end{tabular}'
My first thought was that a preference might be useful,
but on second thought a menu option in the Smalltalk editor
and an additional preference is more useful.
The best solution are two packages,
one that adds a registry for text substitutions to
various editor classes and another one that adds
the Latex stuff.
Considering that, we two guys, seem to be the only users of this
features, this solution might be overkill.
Currently I only had to fiddle with the Euro-Sign,
maybe I can get away with this.
Again thanks a lot,
Gerald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241022/0a780fa0/attachment.htm>
More information about the Cuis-dev
mailing list