Re: [XeTeX] linux libertine and number
François Patte wrote: I think that many people are like me: using latex and finding some solutions to their problems but without going deeply into the technical part of it. Mastering the side effects of a solution like yours is not obvious and you should have given some information about the possible dangers. Ulrike's solution is a very interesting one because it gives some homogeneity to the text when you have to mix text and mathematics in a paragraph, I mean, when your text is not fully a mathematical text. Anyway thanks for these answers. Thank you for the feedback, François. I apologise for not having given some information about the possible dangers; this was clearly an error on my part. ** Phil. -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 31/12/2010 15:35, Philip Taylor (Webmaster, Ret'd) a écrit : > > > 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. Philip, there is some problem with your answer: Yes I wrote: >>> Using \setmainfont{Linux Libertine O} 7 is smaller than $7$ >>> >>> Is it possible to correct this? I want the same size (ie. $7$) But it is because I did not think at all that it was possible to change the shape of the digits when latex is in math mode. I know how to use latex for many things but I am not aware of all mechanisms and when I tested your answer, I thought that it was a good solution to my problem, with some restrictions though: I don't know much about the 'catcode' but it seemed to me that this way of doing could affect some other latex commands using digits, and I understood immediadly what could be the disaster with the example given by Ulrike, indeed I will need to use tikz in the same article and I think that if I had chosen your solution, I could have waste a lot of time before understanding that the problem was coming from your solution. I think that many people are like me: using latex and finding some solutions to their problems but without going deeply into the technical part of it. Mastering the side effects of a solution like yours is not obvious and you should have given some information about the possible dangers. Ulrike's solution is a very interesting one because it gives some homogeneity to the text when you have to mix text and mathematics in a paragraph, I mean, when your text is not fully a mathematical text. Anyway thanks for these answers. F. - -- François Patte UFR de mathématiques et informatique Université Paris Descartes 45, rue des Saints Pères F-75270 Paris Cedex 06 Tél. +33 (0)1 4286 2145 http://www.math-info.univ-paris5.fr/~patte -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk0d9+8ACgkQdE6C2dhV2JUjQwCgtm4WcChc8dyEATdxJJsUbIkC hwUAn2nAPy5Md62Pp1UKBJ+/Wpae4pKS =t3fI -END PGP SIGNATURE- -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Could you please calm down. Nobody was hurt, just a little misunderstanding. Am 31.12.2010 15:35, schrieb Philip Taylor (Webmaster, Ret'd): 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. -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
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. -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am Fri, 31 Dec 2010 12:04:22 + schrieb Philip Taylor (Webmaster, Ret'd): > Afterthought : surely the real point is to give François > a choice -- now at least he is aware that there is a simple > TeX solution to his problem, and that he does not need > to learn all the intricacies of fontspec in order to > solve a trivial problem. Sorry this is not a simple solution. Making numbers active on the document level will lead to a lot of problems and whoever does it will have to learn a lot of intricacies of TeX to get around them. Parameters (#1) are only the top of the iceberg. The next is eg this: \documentclass{article} \usepackage{listings} \begin{document} \chardef\one=1 \catcode`\1=\active \def1{\string1} \begin{lstlisting}[linerange=1-2] a b c d \end{lstlisting} \end{document} 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. -- Ulrike Fischer -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Afterthought : surely the real point is to give François a choice -- now at least he is aware that there is a simple TeX solution to his problem, and that he does not need to learn all the intricacies of fontspec in order to solve a trivial problem. ** Phil. -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Ulrike Fischer wrote: Well Francois wanted to avoid to have to write "$7$" or "\text{7)" instead of simply "7" in all sort of places. So I don't think a solution which forces him to write "\seven" in all sort of places "offers him the functionality he needs". But it doesn't; it requires him to write \seven in a very few places (places where typesetting is not taking place) as opposed to the many places where 7 might occur in text to be typeset. And are you really sure that your commands \zero, \one etc can be used in all places where simple numbers are required. E.g. to you tested if there works in \newcommand\mycommand[1]{#1}? No, nor did I suggest that they can : as I said in my earlier message, the idea of making digits active is appropriate only within a restricted universe of discourse -- I was not in any way trying to suggest that this is a general or universal solution. Philip Taylor -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am Thu, 30 Dec 2010 18:51:22 + schrieb Philip Taylor (Webmaster, Ret'd): >> It is a very bad idea to make numbers active and to define them in >> this way. > By way of demonstration that one can make digits active yet > still have access to the functionality that François needs, > I append the following : Well Francois wanted to avoid to have to write "$7$" or "\text{7)" instead of simply "7" in all sort of places. So I don't think a solution which forces him to write "\seven" in all sort of places "offers him the functionality he needs". And are you really sure that your commands \zero, \one etc can be used in all places where simple numbers are required. E.g. to you tested if there works in \newcommand\mycommand[1]{#1}? -- Ulrike Fischer -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Ulrike Fischer wrote: It is a very bad idea to make numbers active and to define them in this way. By way of demonstration that one can make digits active yet still have access to the functionality that François needs, I append the following : ** Phil. \documentclass {minimal} \usepackage {longtable} \usepackage {fontspec} \setmainfont {Linux Libertine O} \def \makedigitsactive { \makedigitactive 0 \makedigitactive 1 \makedigitactive 3 \makedigitactive 4 \makedigitactive 5 \makedigitactive 6 \makedigitactive 7 \makedigitactive 8 \makedigitactive 9 } \def \makedigitactive #1% { \catcode `#1 = \active \uccode `\~ = `#1 \uppercase {\def ~}{\ifmmode \string #1\else $#1$\fi} } \begin {document} \begin {longtable}{c} \hline % \multicolumn {2}{|c||}{1\textsuperscript {st} step} & \multicolumn {1}{c}{} & \multicolumn {2}{||c|}{2\textsuperscript {nd} step}\\\hline \hline \rule {0pt}{15pt}1 & & 1 & $1\times 35 + 5 =$ & 40\\ 7 & $7\times 5 + 0 =$ & 35 & & 35\\ 5 & & 5 & & \\ 0 & & & & \end {longtable} \def \zero {0} \def \one {1} \def \five {5} \makedigitsactive \begin {longtable}{c} \hline % \multicolumn {2}{|c||}{1\textsuperscript {st} step} & \multicolumn {\one}{c}{} & \multicolumn {2}{||c|}{2\textsuperscript {nd} step}\\\hline \hline \rule {\zero pt}{\one \five pt}1 & & 1 & $1\times 35 + 5 =$ & 40\\ 7 & $7\times 5 + 0 =$ & 35 & & 35\\ 5 & & 5 & & \\ 0 & & & & \end {longtable} \end {document} -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Hi, I could have used array instead of longtable but, it is not handy to write "normal text" within the mathematical mode and I need to mix both... the package "array" helps. it defines the >{} and <{} column modifiers for tabular environments: \documentclass{minimal} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{Linux Libertine O} \setmathfont{Asana Math} \usepackage{array} \begin{document} \begin{tabular}{l>{$}l<{$}} 5+7&5+7 \end{tabular} \end{document} The second column is in math mode. Ross has pointed the problem of spacing and shape of mathematical symbol (and some oher ones..): indeed \texttimes is not the same as $\times$ for instance. And that should be thought about. What do you want to express: Some kind of math, then it should be typed like math. A symbol for the grammatical numerals "five" and "seven"? Then it should be typed like text. Btw: It's spacing and font which differ in math- and text-mode. Btw2: The multiplication sign is in unicode at u00d7: ×. I was wondering if there would be some fonts feature like: [Numbers=OldStyle], one could imagine: [Numbers=MathNumbers] You have a lot of similar options if you use kpfonts. Unfortunately, these kpfonts do not work with xelatex and I need xelatex, to have Sanskrit texts (which I mix in my article) hyphenated... I don't know how to adapt the gloss-sanskrit.ldf file for a use with babel. Thanks for all these answers. Another solution: the package "siunitx" supplies a good number parser. Try the following: \documentclass{minimal} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{Linux Libertine O} % \setmainfont{TeX Gyre Pagella} \setmathfont{Asana Math} \usepackage{siunitx} \begin{document} 5×7 : \(5\times 7\) : \num{5x7} : \sisetup{mode=text}\num{5x7}\\ \end{document} Yet another solution: The font TeX Gyre Pagella is similar to Linux Libertine and works like charm with the math font Asana Math. Simply change the comments before the \setmainfont-commands in the above examples. Bye Toscho -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am 29.12.2010 um 10:14 schrieb François Patte: I was wondering if there would be some fonts feature like: [Numbers=OldStyle], one could imagine: [Numbers=MathNumbers] "MathNumbers" can be found in the Supplementary Multilingual Plane (SMP) at U+1D400...1D7FF. -- Greetings Pete Eternity is a terrible thought. I mean, where's it going to end? - Tom Stoppard -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Ulrike Fischer wrote: It is a very bad idea to make numbers active and to define them in this way. As an example try to uncomment one of the last lines: Within a restricted universe of discourse, it is perfectly reasonable to make digits active; if the author then chooses to forget that that is what he/she has done, and use them as per your example, then /caveat emptor/ must surely apply. Philip Taylor -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
I read somewhere that Linux Libertine developers are working on an OpenType math font, may be there is a beta release somewhere. Not yet! Maybe in some weeks a alpha version. By Michael -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am Tue, 28 Dec 2010 19:08:57 + schrieb Philip Taylor (Webmaster, Ret'd): > 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. It is a very bad idea to make numbers active and to define them in this way. As an example try to uncomment one of the last lines: \documentclass {article} \usepackage {fontspec} \setmainfont {Linux Libertine O} \usepackage{tikz} \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$ %\tikz \draw (0,0)--(1,5); %\section{5 and 7} \end {document} -- Ulrike Fischer -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am Tue, 28 Dec 2010 11:06:07 +0100 schrieb François Patte: > I would like to know why the numbers are different if typed with or > without the $ sign: Next times make a complete example that shows the problem. > 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. Math use mostly the standard cm-fonts. It is rather easy to change the font of the numbers in math to libertine: \documentclass {minimal} \usepackage{fontspec} \setmainfont{Linux Libertine O} \makeatletter \AtBeginDocument{% \declaresymbolfont{numbers}{...@enc}{linuxlibertineo(0)}{m}{n} \setsymbolfont{numbers}{bold}{...@enc}{linuxlibertineo(0)}{bx}{n} \DeclareMathSymbol{0}\mathalpha{numbers}{"30} \DeclareMathSymbol{1}\mathalpha{numbers}{"31} \DeclareMathSymbol{2}\mathalpha{numbers}{"32} \DeclareMathSymbol{3}\mathalpha{numbers}{"33} \DeclareMathSymbol{4}\mathalpha{numbers}{"34} \DeclareMathSymbol{5}\mathalpha{numbers}{"35} \DeclareMathSymbol{6}\mathalpha{numbers}{"36} \DeclareMathSymbol{7}\mathalpha{numbers}{"37} \DeclareMathSymbol{8}\mathalpha{numbers}{"38} \DeclareMathSymbol{9}\mathalpha{numbers}{"39}} \makeatother \begin {document} Multiply 5 by 7: $7\times 5 = 35$ \mathversion{bold} \bfseries Multiply 5 by 7: $7\times 5 = 35$ \end {document} -- Ulrike Fischer -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 28/12/2010 21:03, Peter Dyballa a écrit : > > Am 28.12.2010 um 19:44 schrieb François Patte: > >> Multiply 5 by 7: $7\times 5 = 35$ > > With XeTeX and fontspec loaded you also load xunicode. So you can write > as well: > > Multiply 5 by 7: 7 \texttimes{} 5 = 35 > > Multiply 5 by 7: 7 × 5 = 35 > > I see another problem here: Is 5 multiplied by 7 always equal to 7 × 5? Yes, always... But you are right to point the logical problem. In fact I have written things like this only to put the two 7 side by side. The real problem is this one (description of an algorithm...): \begin{longtable}{c} \hline% \multicolumn{2}{|c||}{1\textsuperscript{st} step} & \multicolumn{1}{c}{} & \multicolumn{2}{||c|}{2\textsuperscript{nd} step}\\\hline\hline \rule{0pt}{15pt}1 & & 1 & $1\times 35 + 5 =$ & 40\\ 7 & $7\times 5 + 0 =$ & 35 & & 35\\ 5 & & 5 & & \\ 0 & & & & \end{longtable} I could have used array instead of longtable but, it is not handy to write "normal text" within the mathematical mode and I need to mix both... Ross has pointed the problem of spacing and shape of mathematical symbol (and some oher ones..): indeed \texttimes is not the same as $\times$ for instance. I was wondering if there would be some fonts feature like: [Numbers=OldStyle], one could imagine: [Numbers=MathNumbers] You have a lot of similar options if you use kpfonts. Unfortunately, these kpfonts do not work with xelatex and I need xelatex, to have Sanskrit texts (which I mix in my article) hyphenated... I don't know how to adapt the gloss-sanskrit.ldf file for a use with babel. Thanks for all these answers. F. - -- François Patte UFR de mathématiques et informatique Université Paris Descartes 45, rue des Saints Pères F-75270 Paris Cedex 06 Tél. +33 (0)1 4286 2145 http://www.math-info.univ-paris5.fr/~patte -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk0a/BMACgkQdE6C2dhV2JWXNQCgx8s2UFnAzHQwRDxvjvlQ8Rq0 RZwAoMbM8CzWcy3eBVHd4SSfEnlySXeW =Bq/c -END PGP SIGNATURE- -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
And we can dub this, um, let me see, ... ActiveteX. :-) 2010/12/28 Philip Taylor (Webmaster, Ret'd) > > > François Patte wrote: > > Thanks for this answer. It is not too nice if you have to write: >> >> Multiply 5 by 7: $7\times 5 = 35$ >> > > 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. > > Philip TAYLOR > > > > -- > Subscriptions, Archive, and List information, etc.: > http://tug.org/mailman/listinfo/xetex > -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
On Tue, Dec 28, 2010 at 07:44:42PM +0100, François Patte wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Le 28/12/2010 12:14, Peter Dyballa a écrit : > > > > Am 28.12.2010 um 11:06 schrieb François Patte: > > > >> Is it possible to correct this? > > > > > > Yes: set up the maths font used for $7$ accordingly. (In TeX text and > > maths fonts are different.) > > > > Some like the difference of shape between a text 7 and and a maths 7. If > > you are not among them, then simply save some $! > > Thanks for this answer. It is not too nice if you have to write: > > Multiply 5 by 7: $7\times 5 = 35$ > > I will manage something.. I read somewhere that Linux Libertine developers are working on an OpenType math font, may be there is a beta release somewhere. When such font is available you can use it with unicode-math package and get your math set in Linux Libertine as well. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Hi Peter and François, Sent from my iPad On 29/12/2010, at 7:03 AM, Peter Dyballa wrote: > > Am 28.12.2010 um 19:44 schrieb François Patte: > >> Multiply 5 by 7: $7\times 5 = 35$ > > With XeTeX and fontspec loaded you also load xunicode. So you can write as > well: > >Multiply 5 by 7: 7 \texttimes{} 5 = 35 This will paint the correct symbols on the page, but does not guarantee that correct spacing is used, according to the conventions of mathematical typesetting. You may get this with some fonts, but there is no guarantee. But more importantly, it does not encode anything about the meaning of these symbols, being used as a mathematical expression. Thus it does not help you if you later wish to adapt this to more complicated pieces of mathematics, nor does it allow for more sophisticated processors to embed tagging of this meaning within your document, for later extraction and proper interpretation in the context of an interactive electronic documents. At some time in the future you will come to appreciate the value of having included this extra markup within your document source, by going the whole hog of writing: >Multiply $5$ by $7$: $5 \times 7 = 35$ or even using LaTeX delimiters, as: Multiply \(5\) by \(7\): \(5\times 7 = 35\) > >Multiply 5 by 7: 7 × 5 = 35 > > I see another problem here: Is 5 multiplied by 7 always equal to 7 × 5? Good point. Although multiplication of integers is usually commutative, it is worthwhile to preserve the natural order, as an hint that in higher mathematical contexts this need not be the case. But putting that reason aside, you will also find it easier to make multiple similar examples using different numbers by Copy/Paste/Edit , when the numbers occur in a consistent order within your expressions. > > -- > Greetings > > Pete Hope this helps, Ross -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am 28.12.2010 um 19:44 schrieb François Patte: Multiply 5 by 7: $7\times 5 = 35$ With XeTeX and fontspec loaded you also load xunicode. So you can write as well: Multiply 5 by 7: 7 \texttimes{} 5 = 35 Multiply 5 by 7: 7 × 5 = 35 I see another problem here: Is 5 multiplied by 7 always equal to 7 × 5? -- Greetings Pete Every instructor assumes that you have nothing else to do except study for that instructor's course. – Fourth Law of Applied Terror -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
François Patte wrote: Thanks for this answer. It is not too nice if you have to write: Multiply 5 by 7: $7\times 5 = 35$ 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. Philip TAYLOR -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 28/12/2010 12:14, Peter Dyballa a écrit : > > Am 28.12.2010 um 11:06 schrieb François Patte: > >> Is it possible to correct this? > > > Yes: set up the maths font used for $7$ accordingly. (In TeX text and > maths fonts are different.) > > Some like the difference of shape between a text 7 and and a maths 7. If > you are not among them, then simply save some $! Thanks for this answer. It is not too nice if you have to write: Multiply 5 by 7: $7\times 5 = 35$ I will manage something.. Thanks. - -- François Patte UFR de mathématiques et informatique Université Paris Descartes 45, rue des Saints Pères F-75270 Paris Cedex 06 Tél. +33 (0)1 4286 2145 http://www.math-info.univ-paris5.fr/~patte -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk0aMBoACgkQdE6C2dhV2JX4ygCePNkghWpLtXM4OX/tyMNk0F3y Vz0AoMLWHavI/CP1BvBC+RzWOvqCBLiV =M1X3 -END PGP SIGNATURE- -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] linux libertine and number
Am 28.12.2010 um 11:06 schrieb François Patte: Is it possible to correct this? Yes: set up the maths font used for $7$ accordingly. (In TeX text and maths fonts are different.) Some like the difference of shape between a text 7 and and a maths 7. If you are not among them, then simply save some $! BTW, the key of your signature has expired. Nine months ago. -- Greetings Pete A morning without coffee is like something without something else. -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex