[XeTeX] linux libertine and number

Philip Taylor (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Fri Dec 31 15:35:41 CET 2010



Ulrike Fischer wrote:

> And please don't repeat that you "was not in any
> way trying to suggest that this is a general or universal
> solution.". You _did_ sent the first example without any code which
> restricted the effect of the catcodes changes and without any
> warnings about side-effects. This was the posting I commented as
> this is not my idea of an helpful answer.

As is so often the case, a suggestion (intended to be
helpful) becomes a protracted argument from which
the original questioner is effectively excluded.  But
as I dislike being accused of something on a fallacious
basis, let me re-cite the original correspondence :

François  (1) :

> I would like to know why the numbers are different if typed with or
> without the $ sign:
>
> Using \setmainfont{Linux Libertine O} 7 is smaller than $7$
>
> Is it possible to correct this? I want the same size (ie. $7$)
>
> Of course I can always write $7$, but is there another way.

François  (2) :

> Thanks for this answer. It is not too nice if you have to write:
>
> Multiply 5 by 7: $7\times 5 = 35$

Self (1) :

> Bonjour, François : is this perhaps the sort of
> thing you had in mind ?
>
> \documentclass {minimal}
> \usepackage {fontspec}
> \setmainfont {Linux Libertine O}
> \begin {document}
> Multiply 5 by 7: $7\times 5 = 35$
>
> \catcode `\5 = \active
> \catcode `\7 = \active
> \def 5{\ifmmode \string 5 \else $5$\fi}
> \def 7{\ifmmode \string 7 \else $7$\fi}
> Multiply 5 by 7: $7\times 5 = 35$
>
> \end {document}
>
> Obviously you can \catcode and \def all digits
> from zero to nine in a simple loop to cope with
> the general case.

My answer thus addressed François' problem /as stated/ :
it did not suggest that it was a solution to such
problems in general (although I can see that it /might/
be possible to misinterpret the last paragraph : when
I spoke of "the general case", I was referring to the
case of all the digits from zero to nine, not to the
entire class of problems of which François' was one
example).

Yes, I completely agree that "[I] sent the first
example without any code which restricted the
effect of the catcodes changes and without any
warnings about side-effects.", but I also assumed
that my answer would be interpreted within the context
of the question being asked, and not within the context
of such questions in general.

** Phil.


More information about the XeTeX mailing list