Le jeudi 23 décembre 2021 à 03:16:13 UTC+1, John H Palmieri a écrit :
> Sure, that sounds like a good idea.
>
>
In the above example, I used LatexExpr as a place holder for
_bold_command, but maybe there is a better way (at least, LatexExpr has the
advantage to not require any new injection in the global namespace).
Eric.
> - John
>
> On Wednesday, December 22, 2021 at 3:05:44 AM UTC-8 Eric Gourgoulhon wrote:
>
>> Le mercredi 22 décembre 2021 à 00:26:58 UTC+1, John H Palmieri a écrit :
>>
>>> I have no objection to this, but the purpose for using \Bold{...} was to
>>> make its behavior easily customizable, since some people might want
>>> \mathbf{...} and some might want \mathbb{...}.
>>>
>>
>> The customization could be performed at the Python level, instead of the
>> LaTeX one, e.g. something like:
>>
>> def _latex_(self):
>> return LatexExpr.bold_command() + r"{Q}"
>>
>> with bold_command() being a static method of LatexExpr that returns the
>> class attribute _bold_command. The latter would be initialized to
>> r"\mathbf" and could be customized by the end user thanks to some
>> static/class method of LatexExpr, e.g.
>>
>> sage: LatexExpr.set_bold_command("mathbb")
>>
>> Eric.
>>
>
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/1f9a5ff7-11f0-4cc5-a7c8-bf0bb0521382n%40googlegroups.com.