Bold italic font in Math (\definefallbackfamily)
Hello list, What is correct way to set bold italic font in math? \definefontfamily [Mainface] [rm] [Minion Pro] \definefallbackfamily [Mainface] [mm] [Minion Pro] [preset=math:lowercaseitalic] \definefontfamily [Mainface] [mm] [TeX Gyre Pagella Math] \setupbodyfont[Mainface] \starttext \startformula abc123 \stopformula \stoptext Thanks.
Hello again. After some research, i found what (I think is a bug) in \definefallbackfamily. Check the following code: \starttypescript [serif] [Minion] \definebodyfont [default] [rm] [tf=name:minionproregular sa 1, it=name:minionproit sa 1, mb=name:minionpromedium sa 1, mi=name:minionpromediumit sa 1, bf=name:minionprobold sa 1, bi=name:minionproboldit sa 1] \stoptypescript \definefallbackfamily [Minion] [mm] [Minion] [tf=name:minionprobold,preset=math:digitsnormal] \definefallbackfamily [Minion] [mm] [Minion] [tf=name:minionprobold,preset=math:lowercaseitalic] \definetypeface [Minion] [rm] [serif] [Minion] \definefontfamily [Minion] [mm] [TeX Gyre Pagella Math] \setupbodyfont [Minion] \starttext \startformula abcy123 \stopformula \stoptext Log: selectfont > The requested fallback font 'Minion' for typeface 'Minion' style 'mm' was ignored because no files where found. As you can see, \definefallbackfamily works just fine in numbers, but unfortunately fails in lowercaseitalic. This is a bug? Thanks
Jose Luis Arellano mailto:jose.4rellano@gmail.com 10. September 2016 um 03:24 Hello list,
What is correct way to set bold italic font in math?
\definefontfamily [Mainface] [rm] [Minion Pro] \definefallbackfamily [Mainface] [mm] [Minion Pro] [preset=math:lowercaseitalic] \definefontfamily [Mainface] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[Mainface]
\starttext \startformula abc123 \stopformula \stoptext \definefontfamily [minionmath] [rm] [Minion Pro] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercasenormal] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercaseitalic] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercasebold] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercasebolditalic] \definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[pagella] \starttext \startformula {\tf xyz} xyz {\bf xyz} {\bi xyz} \stopformula \switchtobodyfont[minionmath] \startformula {\tf xyz} xyz {\bf xyz} {\bi xyz} \stopformula \stoptext Wolfgang
Dear Wolfgang. There is way to instruct to (\definefallbackfamily) to use shapes defined in typescript (eg: mi,mb)? \starttypescript [serif] [Minion Pro] \definebodyfont [default] [rm] [tf=name:minionproregular sa 1, it=name:minionproit sa 1, mb=name:minionpromedium sa 1, mi=name:minionpromediumit sa 1, bf=name:minionprobold sa 1, bi=name:minionproboldit sa 1] \stoptypescript
Jose Luis Arellano mailto:jose.4rellano@gmail.com 10. September 2016 um 09:38 Dear Wolfgang. There is way to instruct to (\definefallbackfamily) to use shapes defined in typescript (eg: mi,mb)? Is this for normal text or math?
Wolfgang
Jose Luis Arellano mailto:jose.4rellano@gmail.com 10. September 2016 um 09:56
For Math. The \tf and \bf commands in math aren’t font switches like in text.
Most math fonts come only with a regular style which provides upright, italic, bold and bolditalic symbols but all of them part of the same font, only a few fonts provide also a bold style (which is usefull in sections) which comes also with upright – and sometimes bold – symbols. \setupbodyfont[xits] \starttext \startformula {\tf xyz} \; xyz \; {\bf xyz} \; {\bi xyz} \quad \mb {\tf xyz} \; xyz \; {\bf xyz} \; {\bi xyz} \stopformula \stoptext Wolfgang
On 9/10/2016 10:09 AM, Wolfgang Schuster wrote:
Jose Luis Arellano mailto:jose.4rellano@gmail.com 10. September 2016 um 09:56
For Math. The \tf and \bf commands in math aren’t font switches like in text.
Most math fonts come only with a regular style which provides upright, italic, bold and bolditalic symbols but all of them part of the same font, only a few fonts provide also a bold style (which is usefull in sections) which comes also with upright – and sometimes bold – symbols.
\setupbodyfont[xits]
\starttext
\startformula {\tf xyz} \; xyz \; {\bf xyz} \; {\bi xyz} \quad \mb {\tf xyz} \; xyz \; {\bf xyz} \; {\bi xyz} \stopformula
\stoptext
Depending on if the font project can arrange funding funding for it, the texgyre project will come up with a few bold math fonts (so bold + heavy) and sans math for titling etc. as well as a monospace math font (dejavu based) for editing and documentation. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Thanks Wolfgang for explanation, as always very clear. Another related question: If I want to use italic numbers in math, I use: \definefallbackfamily[...][math][...][tf=style:italic,preset=math:digitsnormal] But I lose upright numbers this way. How can I solve this issue. I've tried without success: \definefallbackfamily[...][math][...][preset=math:digitsitalic] Thanks.
Jose Luis Arellano mailto:jose.4rellano@gmail.com 10. September 2016 um 11:20 Thanks Wolfgang for explanation, as always very clear.
Another related question: If I want to use italic numbers in math, I use: \definefallbackfamily[...][math][...][tf=style:italic,preset=math:digitsnormal]
But I lose upright numbers this way.
How can I solve this issue. I've tried without success: \definefallbackfamily[...][math][...][preset=math:digitsitalic] Math symbols in MkIV are (mostly?) restricted to Unicode which doesn’t define italic digits (but you can choose between regular, bold, sans serif, sans serif bold and monospaced).
Wolfgang
On 10 Sep 2016, at 10:09, Wolfgang Schuster
wrote:
Most math fonts come only with a regular style which provides upright, italic, bold and bolditalic symbols but all of them part of the same font, only a few fonts provide also a bold style (which is usefull in sections) which comes also with upright – and sometimes bold – symbols.
\setupbodyfont[xits] …
The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these: \setupbodyfont[xits,10pt] \setupmathematics[lcgreek=normal, default=normal] \starttext \startformula x 𝐱 𝑥 𝒙 𝗑 𝘅 𝘹 𝙭 𝓍 𝔁 𝔵 𝖝 𝚡 𝕩 ξ 𝛏 𝜉 𝝃 𝝽 𝞷 \stopformula \stoptext
On 9/10/2016 12:57 PM, Hans Åberg wrote:
On 10 Sep 2016, at 10:09, Wolfgang Schuster
wrote: Most math fonts come only with a regular style which provides upright, italic, bold and bolditalic symbols but all of them part of the same font, only a few fonts provide also a bold style (which is usefull in sections) which comes also with upright – and sometimes bold – symbols.
\setupbodyfont[xits] …
The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these:
what tex commands ... we're talking characters and they don't expand there is a pseudo bold mode but the number of bold symbols is small so it's not that useful
\setupbodyfont[xits,10pt]
\setupmathematics[lcgreek=normal, default=normal]
\starttext
\startformula x 𝐱 𝑥 𝒙 𝗑 𝘅 𝘹 𝙭 𝓍 𝔁 𝔵 𝖝 𝚡 𝕩 ξ 𝛏 𝜉 𝝃 𝝽 𝞷 \stopformula
\stoptext
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 10 Sep 2016, at 16:06, Hans Hagen
wrote: On 9/10/2016 12:57 PM, Hans Åberg wrote:
The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these:
what tex commands ... we're talking characters and they don't expand
If one writes ASCII ${\bf x} {\bi x}$, it would expand to the expected Unicode $𝐱 𝒙$.
On Sat, 10 Sep 2016, Hans Åberg wrote:
On 10 Sep 2016, at 16:06, Hans Hagen
wrote: On 9/10/2016 12:57 PM, Hans Åberg wrote:
The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these:
what tex commands ... we're talking characters and they don't expand
If one writes ASCII ${\bf x} {\bi x}$, it would expand to the expected Unicode $𝐱 𝒙$.
That is already the case. Aditya
On 10 Sep 2016, at 17:13, Aditya Mahajan
wrote: On Sat, 10 Sep 2016, Hans Åberg wrote:
On 10 Sep 2016, at 16:06, Hans Hagen
wrote: On 9/10/2016 12:57 PM, Hans Åberg wrote: The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these: what tex commands ... we're talking characters and they don't expand
If one writes ASCII ${\bf x} {\bi x}$, it would expand to the expected Unicode $𝐱 𝒙$.
That is already the case.
Does it cover those listed here: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols
Hans Åberg mailto:haberg-1@telia.com 10. September 2016 um 17:31
Does it cover those listed here: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols \setupbodyfont[xits,30pt]
\starttext \startformula {\mathtf A} {\mathit A} {\mathbf A} {\mathbi A} {\mathss A} {\mathss\mathit A} {\mathss\mathbf A} {\mathss\mathbi A} {\mathtt A} {\mathscript A} {\mathscript\mathbf A} {\mathfraktur A} {\mathfraktur\mathbf A} {\mathblackboard A} \stopformula \stoptext Wolfgang
On 10 Sep 2016, at 18:19, Wolfgang Schuster
wrote: Hans Åberg 10. September 2016 um 17:31
Does it cover those listed here: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols \setupbodyfont[xits,30pt]
OK. Fine. Adding a comparison with Unicode input, with greek letters as well. It seems that \mathcal expands to \mathscript: On the Unicode list, they mentioned that they plan to add a calligraphic style, parallel with the script style. This is the AMS calligraphic font style that originally was intended as a script style, but people feel it is a sufficiently different style that can be used in combination with the script style. \setupbodyfont[xits,10pt] \setupmathematics[lcgreek=normal, default=normal] \starttext \startformula \startalign \NC {\mathtf A} {\mathbf A} {\mathit A} {\mathbi A} {\mathss A} {\mathss\mathbf A} {\mathss\mathit A} {\mathss\mathbi A} {\mathscript A} {\mathscript\mathbf A} {\mathfraktur A} {\mathfraktur\mathbf A} {\mathtt A} {\mathblackboard A} \,\NC {\mathtf α} {\mathbf α} {\mathit α} {\mathbi α} {\mathss\mathbf α} {\mathss\mathbi α} \NR \NC A 𝐀 𝐴 𝑨 𝖠 𝗔 𝘈 𝘼 𝒜 𝓐 𝔄 𝕬 𝙰 𝔸\,\NC α 𝛂 𝛼 𝜶 𝝰 𝞪\NR \stopalign \stopformula \stoptext
On 10 Sep 2016, at 17:13, Aditya Mahajan
wrote: On Sat, 10 Sep 2016, Hans Åberg wrote:
On 10 Sep 2016, at 16:06, Hans Hagen
wrote: On 9/10/2016 12:57 PM, Hans Åberg wrote: The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these: what tex commands ... we're talking characters and they don't expand
If one writes ASCII ${\bf x} {\bi x}$, it would expand to the expected Unicode $𝐱 𝒙$.
That is already the case.
FYI, I found a neat trick: If one does not know the Unicode character, because the translation is correct, one can typeset using legacy TeX commands, and copy from the output PDF. It can then be used in the input file, if one so likes.
On 9/15/2016 6:33 PM, Hans Åberg wrote:
On 10 Sep 2016, at 17:13, Aditya Mahajan
wrote: On Sat, 10 Sep 2016, Hans Åberg wrote:
On 10 Sep 2016, at 16:06, Hans Hagen
wrote: On 9/10/2016 12:57 PM, Hans Åberg wrote: The STIX fonts, and XITS then, support Unicode math semantic styles. So perhaps the TeX commands should expand to these: what tex commands ... we're talking characters and they don't expand
If one writes ASCII ${\bf x} {\bi x}$, it would expand to the expected Unicode $𝐱 𝒙$.
That is already the case.
FYI, I found a neat trick:
If one does not know the Unicode character, because the translation is correct, one can typeset using legacy TeX commands, and copy from the output PDF. It can then be used in the input file, if one so likes.
or maybe your editor has some selection menu (the scite setup that ships with context provides alphabet / symbol strips) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 15 Sep 2016, at 18:50, Hans Hagen
wrote: On 9/15/2016 6:33 PM, Hans Åberg wrote:
If one does not know the Unicode character, because the translation is correct, one can typeset using legacy TeX commands, and copy from the output PDF. It can then be used in the input file, if one so likes.
or maybe your editor has some selection menu
Some characters are hard to find in a Unicode symbols table. One example is lower case italic “ℎ”, others are the double-struck letters, which are also out of order. There are more examples, symbols that have lookalike non-math variants. So I made a alphanumeric text file for those. And there is also [1]. But if one has written and compiled some math, it may be quicker to copy from the PDF. 1. http://milde.users.sourceforge.net/LUCR/Math/unimathsymbols.xhtml
On 15 Sep 2016, at 18:50, Hans Hagen
wrote: (the scite setup that ships with context provides alphabet / symbol strips)
I use Xcode on MacOS (former OS X), which has very good Unicode support (including RTL scripts). There is a Unicode symbols table, but it is slow. One can also design one's own keyboard map, but that is very time consuming.
Hans Åberg mailto:haberg-1@telia.com 15. September 2016 um 19:44
I use Xcode on MacOS (former OS X), which has very good Unicode support (including RTL scripts). There is a Unicode symbols table, but it is slow. One can also design one's own keyboard map, but that is very time consuming. Another input method is shown in the following video [1] where each symbol get its own command, e.g. \mbfitx is equal to {\bi x}. The source table mentioned in the video can be found on the STIX page [2].
[1] http://zeeba.tv/reconciling-unicode-math-with-latex2e-mathematics/ [2] http://www.ams.org/STIX/ Wolfgang
On 15 Sep 2016, at 20:19, Wolfgang Schuster
wrote: Hans Åberg 15. September 2016 um 19:44
I use Xcode on MacOS (former OS X), which has very good Unicode support (including RTL scripts). There is a Unicode symbols table, but it is slow. One can also design one's own keyboard map, but that is very time consuming.
Another input method is shown in the following video [1] where each symbol get its own command, e.g. \mbfitx is equal to {\bi x}. The source table mentioned in the video can be found on the STIX page [2].
One can have text translations on MacOS, for example, "…" is translated into “…”, and as an experiment, I have set |-> translated into ↦. (Xcode does not translate, though.) But the GUI is cumbersome and there may be risk for errors, for example in a computer language where -> should be exactly that instead of →. Also, the characters have the advantage that they off-load human memory. :-)
On 15 Sep 2016, at 20:19, Wolfgang Schuster
wrote: Hans Åberg 15. September 2016 um 19:44
I use Xcode on MacOS (former OS X), which has very good Unicode support (including RTL scripts). There is a Unicode symbols table, but it is slow. One can also design one's own keyboard map, but that is very time consuming.
Another input method is shown in the following video [1] where each symbol get its own command, e.g. \mbfitx is equal to {\bi x}. …
In fact, I used the PDF copying method on a LaTeX unicode-math file. But the package expands ASCII to math italic, which I pointed out to the author last year, but got no reply. So ConTeXt seems to be more up to date and in line with Unicode.
On 15 Sep 2016, at 20:19, Wolfgang Schuster
wrote:
Another input method is shown in the following video [1] where each symbol get its own command, e.g. \mbfitx is equal to {\bi x}. The source table mentioned in the video can be found on the STIX page [2].
[1] http://zeeba.tv/reconciling-unicode-math-with-latex2e-mathematics/ [2] http://www.ams.org/STIX/
The video speaks about a file stix-tbl.txt containing those translation commands, but on [2], the stix-tbl.* table files, not ending with .txt, do not contain those.
Dear list.
Please your help
I've troubles to use this code from Wolfgang.
\definefontfamily [minionmath] [rm] [Minion Pro]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercasenormal]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercaseitalic]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercasebold]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercasebolditalic]
\definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[pagella]
\starttext
\startformula
{\tf xyz} xyz {\bf xyz} {\bi xyz}
\stopformula
\switchtobodyfont[minionmath]
\startformula
{\tf xyz} xyz {\bf xyz} {\bi xyz}
\stopformula
\stoptext
It seems that \definefallbackfamily doesn't works like before.
What is the right way to use \it, \bf, etc. in maths?
2016-09-15 17:06 GMT-03:00 Hans Åberg
On 15 Sep 2016, at 20:19, Wolfgang Schuster
wrote: Another input method is shown in the following video [1] where each symbol get its own command, e.g. \mbfitx is equal to {\bi x}. The source table mentioned in the video can be found on the STIX page [2].
[1] http://zeeba.tv/reconciling-unicode-math-with-latex2e-mathematics/ [2] http://www.ams.org/STIX/
The video speaks about a file stix-tbl.txt containing those translation commands, but on [2], the stix-tbl.* table files, not ending with .txt, do not contain those.
____________________________________________________________ _______________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ____________________________________________________________ _______________________
On 05/12/2017 07:58 PM, Jose Luis Arellano wrote:
Dear list. Please your help I've troubles to use this code from Wolfgang.
\definefontfamily [minionmath] [rm] [Minion Pro] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercasenormal] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercaseitalic] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercasebold] \definefallbackfamily [minionmath] [mm] [Minion Pro] [preset=math:lowercasebolditalic] \definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[pagella]
Hi José Luis, I see two issues here: 1. AfaIk, \definefontfamily should be placed always after \definefallbackfamily. 2. \setupbodyfont should be set to [minionmath]. With [pagella] you don’t need to define any font or fallback families. Just in case it helps, Pablo -- http://www.ousia.tk
On 15 Sep 2016, at 20:19, Wolfgang Schuster
wrote:
Another input method is shown in the following video [1] where each symbol get its own command, e.g. \mbfitx is equal to {\bi x}.
This works on MacOS 10.12 in any application that uses the standard text services. One has an XML .plist file as listed below. Then in such an application, one turns on "Text Replacements". (The video shows TeXShop.) Using the .plist file below, \mbfitx is translated into 𝒙. The replacement text can be anything. ---- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>phrase</key> <string>𝒙</string> <key>shortcut</key> <string>\mbfitx</string> </dict> <dict> <key>phrase</key> <string>𝒚</string> <key>shortcut</key> <string>\mbfity</string> </dict> <dict> <key>phrase</key> <string>𝒛</string> <key>shortcut</key> <string>\mbfitz</string> </dict> </array> </plist> ----
FYI, I made interactive text substitutions (on MacOS) for the Unicode math letters plus a number of symbols. With it in hand, it is not particularly difficult to use Unicode symbols in the input file.
Hans Åberg mailto:haberg-1@telia.com 26. September 2016 um 11:00 FYI, I made interactive text substitutions (on MacOS) for the Unicode math letters plus a number of symbols. With it in hand, it is not particularly difficult to use Unicode symbols in the input file. Can you provide your file(s) for download?
Wolfgang
On 26 Sep 2016, at 11:25, Wolfgang Schuster
wrote: Hans Åberg 26. September 2016 um 11:00
FYI, I made interactive text substitutions (on MacOS) for the Unicode math letters plus a number of symbols. With it in hand, it is not particularly difficult to use Unicode symbols in the input file. Can you provide your file(s) for download?
They are at [1] with instructions. Using an escape character as "\" is not necessary, but helps against unwanted replacements. And it is not necessary to use letters only. For the math letters, I have focused on making them short and easy to remember. 1. https://secure2.storegate.com/Shares/Home.aspx?ShareID=f20eb983-f0d9-4440-ab...
On 26 Sep 2016, at 11:25, Wolfgang Schuster
wrote: Can you provide your file(s) for download?
I have made a new set, at [1], as before: Abbreviations using non-alphanumerical symbols now drop the leading "\", as they seemed to caused strange conflicts. Easier to type, but will have funny consequences in say C++ code. The alphanumerical abbreviations all start with a "\". I have changed the letters for bold, italic and bold italic, so as to not conflict with Greek two-letter abbreviations. In addition, added one letter shorthands for normal italic, as they are so common. Also, some ConTeXt commands added. Not all of these math letters work: the MacOS implementation is buggy. All symbols work, though. I also experimented with a variation where math letter abbreviations used non-alphanumerical symbols, but it turns out they are harder to use, because one needs to learn where they are on the keyboard. So it seems, using letter-only abbreviations is most efficient, except for a few common cases. 1. https://secure2.storegate.com/Shares/Home.aspx?ShareID=f20eb983-f0d9-4440-ab...
On 26 Sep 2016, at 11:25, Wolfgang Schuster
wrote: Can you provide your file(s) for download?
I made a C++ program "text_to_plist" that computes a text substitution plist from a sequence of input files [1]. It checks for duplicates, does some XML translations, and sorts it, making it fairly easy to try different setups. There is an example, showing how to generate them. 1. https://secure2.storegate.com/Shares/Home.aspx?ShareID=f20eb983-f0d9-4440-ab...
participants (6)
-
Aditya Mahajan
-
Hans Hagen
-
Hans Åberg
-
Jose Luis Arellano
-
Pablo Rodriguez
-
Wolfgang Schuster