Comments (6)
There is serif italic bold math alphabet, but no sans-serif italic bold one. There are italic bold math alphabets, both serif and sans serif, what makes you think otherwise?
from xits.
Thanks for your help Khaled. I know nothing about fonts and I'm probably misunderstanding things. Apologies! Clarification: I was referring to a xits-math bold+italic font. So here was my reasoning.
First, I noticed that in http://tex.stackexchange.com/questions/43642 or more recently http://tex.stackexchange.com/questions/296603, you and other font experts only ever write
\setmathfont
[ Extension = .otf,
BoldFont = *bold,
]{xits-math}
with no reference to bold italic math fonts. So that was my first clue. When I added the line
BoldItalicFont = *-bolditalic,
to the above, I received an error message 'fontspec error: "font-not-found". Second clue.
When I looked inside the font .otf files, I didn't see a bold-italic-math font. Third clue.
And when I tried to insert this in the preamble:
\DeclareMathAlphabet{\mathbit}{OML}{cmm}{b}{it}
which is something I read here (http://tex.stackexchange.com/questions/14395/bold-italic-vectors) about how to emulate a bold italic font, the outcome was very ugly. That was my fourth clue. But perhaps I just don't know how to set it up properly?
Below a MWE used for my experiments:
\documentclass{article}
\usepackage[bold-style=ISO]{unicode-math}
%\usepackage[bold-style=TEX]{unicode-math}
\setmainfont
[ Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]{xits}
\setmathfont
[ Extension = .otf,
BoldFont = *bold,
]{xits-math}
\DeclareMathAlphabet{\mathbit}{OML}{cmm}{b}{it}
\begin{document}
\begin{itemize}
\item
mainfont:
\[x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df\]
\item
boldmath:
{\boldmath
\[ x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df\]
}
\item
mathbf:
\[\mathbf{x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df}\]
\item
mathbit:
\[\mathbit{x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df}\]
\end{itemize}
\end{document}
from xits.
The way OpenType math fonts is structured is different than traditional TeX fonts. All math alphabets are included in a single font file, so If you installed XITS Math in the system font directories (the recommended way), then all you need is \setmathfont{XITS Math}
. The invocation you use is for loading the fonts by file name and in this case you need to load the bold font manually, however this bold font is not for bold math alphabets but for \boldmath
, \boldsymbol
and similar commands that expects a math font where everything is bold.
The \DeclareMathAlphabet
is definitely wrong, you are trying to load the Computer Modern Math (cmm
) bold italic font, you should drop it. \mathbf
and \mathbi
used to work with uncode-math
out of box, but it seems that for some LaTeX people compatibility with crippled 8-bit TeX engines is more important than a system that works in the 21 century, so that was dropped and you now have to use \symbf
and \symbfit
instead, please refer to unicode-math
documentation (hopefully it was updated, I didn’t check).
So your document should look like:
\documentclass{article}
\usepackage[bold-style=ISO]{unicode-math}
%\usepackage[bold-style=TEX]{unicode-math}
\setmainfont
[ Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]{xits}
\setmathfont
[ Extension = .otf,
BoldFont = *bold,
]{xits-math}
\begin{document}
\begin{itemize}
\item
mainfont:
\[x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df\]
\item
boldmath:
{\boldmath
\[ x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df\]
}
\item
mathbf:
\[\symbf{x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df}\]
\item
mathbit:
\[\symbfit{x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df}\]
\end{itemize}
\end{document}
from xits.
Thanks Khaled! Your explanation clarifies a lot of things for me. I noticed \setmainfont{XITS}
is throwing errors, so I'm going to look into my setup again.
I'm not seeing a big difference between \symbf
and \symbfit
and no difference at all between \symbf{A}
and \symbfit{A}
. See screenshot here: http://s33.postimg.org/gt176cu6n/tmp.png
Should there not be a difference ?
from xits.
They are different in the font. You probably need to ask in unicode-math
tracker, or some general TeX questions site like http://tex.stackexchange.com/.
from xits.
Will do, thanks Khaled!
from xits.
Related Issues (20)
- Multiplication dot is too large HOT 8
- Wrong angle bracket sizes under unicode-math + fontspec HOT 1
- No basic usage documentation in TeXLive (2019) HOT 5
- Unite Adam Twardoch's Schticks Text (link below) and this XITS project HOT 2
- "u+027cc" symbol looks broken in LuaTeX HOT 2
- Old-style figures? HOT 19
- Support alternative minus sign
- Issue with line spacing in some programs HOT 4
- Circumflex and diaresis misplaced on lowercase i HOT 15
- Arrays and systems of equations HOT 12
- backport? HOT 2
- Some accented glyphs missing kerning HOT 12
- Cut release 1.301
- Add more mark attachments HOT 1
- Horizontal bar is exteremely wide HOT 4
- Extend small capital i/ı variant to other languages
- Math italic i/j spacing HOT 1
- Display variants of big operators have wrong “depth” HOT 7
- Too much spacing above glyphs in the denominator when fractions are scaled HOT 4
- Double acute accent looks slightly off-center on "o" and "u" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xits.