3

Afte reading the post about Importing a Single Symbol From a Different Font I was curious how the people know the symbol's font slot, like "80 in that example.

\DeclareMathSymbol{\varsubset}{3}{matha}{"80}

I'd like to do the similar replacement for \cap and \cup, but I don't know their slots.

antshar
  • 4,238
  • 9
  • 30
  • 1
    if as there you are copying the character from an existing font setup then simply take it from the package the line you quote has the comment % Define a subset character from that font (from mathabx.dcl) that file also has the lines \DeclareMathSymbol{\cap} {2}{matha}{"58} \DeclareMathSymbol{\cup} {2}{matha}{"59} – David Carlisle Sep 24 '20 at 18:53
  • I like using the fonttable package for such things, for example https://tex.stackexchange.com/questions/486288/where-can-i-find-how-to-tex-symbols-for-different-fonts/486292#486292 – Steven B. Segletes Sep 24 '20 at 22:31
  • In the linked question, you could look at the file "mathabx.dcl" to be found in your TexLive distribution (in general in a hidden folder), and here it is: "\DeclareMathSymbol{\subset} {3}{matha}{"80}" – Watson Feb 02 '21 at 20:13

1 Answers1

2

You can, in order of decreasing convenience:

  • Use unicode-math, where you can replace any math symbol with \setmathfont[range=\symbol]{...}. Many OpenType math fonts have variants in stylistic sets.
  • Check the package documentation for a font table.
  • Check whether it uses a standard LaTeX encoding. If it does, it probably has files with names likeoms*.fd and omx*.fd.
  • Search the .sty file for the symbol and copy-paste the commands needed to define it. Usually this is \DeclareSymbolFont, and sometimes \SetSymbolFont for bold, followed by \DeclareMathSymbol.
  • Make font tables for all the package’s symbol fonts and look for the symbol in there.
Davislor
  • 44,045