using different font families with?LaTeX-generated text

Darren Dale <dd55@...163...> writes:

Darren Dale <dd55@...163...> writes:
I'd *really* like the ability to ``usepackage`` for various reasons and it
would clearly add useful functionality that is not otherwise obtainable.

I understand concern about an additional support burden, but couldn't this
be handled by explicitly noting that it's unsupported, possibly even
printing out an unsubtle warning

[...]

As far as I'm concerned, being unsupported disqualifies the feature from being
included in mpl.

Well, if ever there was a compelling use-case for an undocumented/unsupported
feature it would be this one, I think.

We are talking about something that involves very little implementation effort
(< 5 LOC or so), right? So provided it doesn't result in either an
implementation burden or in additional support requests, why wouldn't you
allow people to obtain functionality, at their own risk, that may be of high
utility to them?

For example, I use a few lower-case bold greek symbols in my work, and I also
want to use them in my plots. Due to some arbitrary braindamage in latex, this
essentially requires a ``\usepackage{bm}`` somewhere in your preamble, and
there are other fairly standard things are as far as I can see impossible to
obtain without (if it doesn't cause portability hassles of the type you
mentioned etc., I think it might actually be worth-while considering to add
things like 'bm' and 'ammssymb' to the default-preamble).

I don't think me and other users editing texmanager by hand or resulting to
some really nasty hacks in order to just extend simple template string being a
better solution (or one that necessarily results in fewer support requests --
"oops, sorry I just noticed I actually screwed around with this file in order
to change my latex-preamble").

It wouldn't even be necessary to add some proper latex_preamble option, as
long as there is some TexManager attribute that's easily enough to modify.

cheers,

'as

···

On Monday 14 May 2007 1:29:05 pm Alexander Schmolck wrote:

I'll give this some more thought.

···

On Wednesday 16 May 2007 01:29:56 pm Alexander Schmolck wrote:

Darren Dale <dd55@...163...> writes:
> On Monday 14 May 2007 1:29:05 pm Alexander Schmolck wrote:
>> Darren Dale <dd55@...163...> writes:
>> I'd *really* like the ability to ``usepackage`` for various reasons and
>> it would clearly add useful functionality that is not otherwise
>> obtainable.
>>
>> I understand concern about an additional support burden, but couldn't
>> this be handled by explicitly noting that it's unsupported, possibly
>> even printing out an unsubtle warning

[...]

> As far as I'm concerned, being unsupported disqualifies the feature from
> being included in mpl.

Well, if ever there was a compelling use-case for an
undocumented/unsupported feature it would be this one, I think.

We are talking about something that involves very little implementation
effort (< 5 LOC or so), right? So provided it doesn't result in either an
implementation burden or in additional support requests, why wouldn't you
allow people to obtain functionality, at their own risk, that may be of
high utility to them?

For example, I use a few lower-case bold greek symbols in my work, and I
also want to use them in my plots. Due to some arbitrary braindamage in
latex, this essentially requires a ``\usepackage{bm}`` somewhere in your
preamble, and there are other fairly standard things are as far as I can
see impossible to obtain without (if it doesn't cause portability hassles
of the type you mentioned etc., I think it might actually be worth-while
considering to add things like 'bm' and 'ammssymb' to the
default-preamble).

I don't think me and other users editing texmanager by hand or resulting to
some really nasty hacks in order to just extend simple template string
being a better solution (or one that necessarily results in fewer support
requests -- "oops, sorry I just noticed I actually screwed around with this
file in order to change my latex-preamble").

It wouldn't even be necessary to add some proper latex_preamble option, as
long as there is some TexManager attribute that's easily enough to modify.

Published figures will generally be embedded in text that is Times/
Palatino etc.
Computer Modern doesn't look right inside such text.

If it were possible to allow use of the other font packages, it would
be very useful.

George Nurser.

Alright, svn 3277 lets you add additional commands to the preamble:

text.latex.preamble : \usepackage{bm},\renewcommand{etc...}

See the default matplotlibrc file for more information.

THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl mailing
lists without submitting a patch to fix them.

Alex, please give this a spin. Tell me if it meets your needs, and if it
doesnt, send a patch.

Darren

···

On Wednesday 16 May 2007 01:29:56 pm Alexander Schmolck wrote:

Darren Dale <dd55@...163...> writes:
> On Monday 14 May 2007 1:29:05 pm Alexander Schmolck wrote:
>> Darren Dale <dd55@...163...> writes:
>> I'd *really* like the ability to ``usepackage`` for various reasons and
>> it would clearly add useful functionality that is not otherwise
>> obtainable.
>>
>> I understand concern about an additional support burden, but couldn't
>> this be handled by explicitly noting that it's unsupported, possibly
>> even printing out an unsubtle warning

[...]

> As far as I'm concerned, being unsupported disqualifies the feature from
> being included in mpl.

Well, if ever there was a compelling use-case for an
undocumented/unsupported feature it would be this one, I think.