3

The fonts configuration in LaTeX is a little confusing me. In my present knowledge system of LaTeX fonts, because my mother tougne is Chinese, which in my document I have three kinds of fonts to set:

  1. the mainfonts
  2. the CJKfonts
  3. the math-fonts

Although I came across the docs of fntguide and know the five arrtibutes of each fonts:encoding, family, series, shape, size, but I have trouble in classifing them into differernt type with fc-list in command line:

fc-list :lang=en % to list the main fonts
fc-list :lang=zh % to list the CJK fonts

My First Question is : how to list the math-fonts installed in my computer could be assign as the math fonts in command line?

Moreover, if I get three list of fonts(mainfont,CJKfonts,mathfonts), how could I assign them into three categories command(setmainfont,setsansfont,setmonofont), how could I get the detailed infomation of fonts.

My Second Question is: could I assigned a font name 'xxxxFontMono' as the sansfont, or use the CJKfonts like 'Microsoft Yahei' as the mathfonts? In other word, could I assign the font-family mixed?

As for my final question, I want to replica the following PDF:

the fonts of main,CJK and math typeset

Although the edited above is via Microsoft Word, but I tried to replica it in XeLaTeX.

My OS is Windows 11 professional, with TeXLive2024, XeLaTeX.

Some infomation is as below:

  • The title is \zihao{4} and \yahei with the ctex package
  • The mathfonts, as the MSoffice set, is also the Microsoft YaHei fonts with \zihao{5}, but as the Question 2 mentioned, I don't know that is it reasonable to assign the CJKfonts as mathfont with unicode-math, or the MSoffice just automatically substituted another math fonts to fixed the case.

How could I get the basic fonts configured tutorial like fntguide for basically configured the fonts, fonts actually mess me in learning LaTeX. thanks!

Any other infomation of the PDF is needed I will supplement them as soon as possible.

Here below is updated with the font information in the formula.

the font type of the formula

1 Answer 1

3
  1. I'm not sure what math fonts have been installed on your system. You can run fc-list | grep math on the terminal to have a look.

    However, in the texmf tree (texlive/2024/texmf-dist/fonts/opentype/public) there are some math fonts:

    • lete-sans-math (previous name is lato-math)
    • euler-math
    • lm-math
    • xcharter-math
    • garamond-math
    • etc.

    They can be used together with the unicode-math package.

  2. You can set sans-type or mono-type fonts in the argument of \setmainfont (It's your choice but this kind of practice is quite uncommon). If you are using unicode-math, you must choose some OpenType math font.

    If you set some CJK font as the math font, such as \setmathfont{FandolSong-Regular.otf}, fontspec will issue the following warning:

    Package unicode-math Warning: The first font loaded by unicode-math must be an
    (unicode-math)                OpenType Math font (with script=math). If you
    (unicode-math)                simply want ‘the default’ before loading
    (unicode-math)                supplementary fonts over the top for certain
    (unicode-math)                ranges, use: 
    (unicode-math)                \setmathfont{latinmodern-math.otf}
    

    and the math in use is Latin Modern Math.

4
  • Okay, that is to said the CJK font couldn't be set as math fonts in LaTeX(Actually it sound werid). so, if I have the PDF file, and the formula is displayed at the picture in the problem, and via the pdf-editor I know that the formula font-name is CID-font6 . Could I have any chance to replica the font and the integral symbol in LaTeX.
    – Explorer
    Commented Aug 4 at 14:03
  • I also have another doubt about, is there any method to classify a font to be mono**/**sans or neither of them, is there any command could we classify the font family. And what will happened if I set the FandolSong-Mono as the sanif font?
    – Explorer
    Commented Aug 4 at 14:18
  • It's hard to say since I don't have CIDFont+F6 on my machine.
    – Stephen
    Commented Aug 4 at 16:57
  • Actually the ·CIDFont family` is actually the named Microsoft YaHei is commonly seen in Windows System,may be? I just a little curious the math symbols style set as Microsoft YaHei.
    – Explorer
    Commented Aug 5 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .