# Where do I find character codes to make my own “big symbols”?

A couple of months ago I was having trouble getting a \bigtimes symbol that worked well. A few libraries have one, but they all did all sorts of other troublesome things to how math was formatted. In the end I was suggested to just take the code that mathabx uses to make \bigtimes and that's worked fantastically:

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<5> <6> <7> <8> <9> <10>
<10.95> <12> <14.4> <17.28> <20.74> <24.88>
mathx10
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareMathSymbol{\bigtimes}{1}{mathx}{"91}


Now I find myself in deed of a variable sized $\ast$ and I was wondering how to adapt this code to do it. Clearly I need to write a new DeclareMathSymbol line and I presume that I need to input the character code for ast into where "91 is. I wrote something to brute force checking a couple hundred values of integers and see if I could find the symbol that way, but I could not (and it also made me feel mildly silly). I glanced around a little bit and found the \meaning command, which did not seem to give the same result. Furthermore I lack a general understanding of latex programming past defining simple macros. But I presume that there is a table somewhere that would have what I'm looking for, so that if in the future I need to make some math symbol variable-sized I don't always have to ask the fine people of tex.stackexchange.

Edit: For my end solution I ended up switching the base font family to cmsy and just making the sole purpose of the font family be to make large characters, i.e.:

\DeclareFontFamily{U}{large}{\hyphenchar\font45}
\DeclareFontShape{U}{large}{m}{n}{
<27>
cmsy10
}{}
\DeclareMathSymbol{\bigtimes}{1}{large}{"02}
\DeclareMathSymbol{\bigtest}{1}{large}{"03}


Although this isn't quite optimal because it introduces a large number of warnings to my log files.

-
Side note: the mathtools package provides \bigtimes and should not do any unwanted things to your formatting (no luck for \bigast though). –  Caramdir Mar 7 '11 at 2:43

there's a "canned" routine called testfont. use it with plain tex:

tex testfont


it will walk you through what it wants to test. the first question is what font you want. the comprehensive symbols list should show you what fonts the asterisk is in (i'm pretty sure there's one in cmsy10). then you tell it what to do. the usual directive is

\table\bye


if you want to test another font, then respond \table\vfill\eject\init and the "what font" question will come up again. you can preview the result, or print it out for reference. the indices on the top/bottom/sides of the table will identify the addresses of the cells, which is what the last argument of \DeclareMathSymbol wants.

-
So I got a nice table of what the character codes are, but when I try something like \DeclareMathSymbol{\bigast}{1}{mathx}{"03} or "003 I just get a large left paranthesis. What am I missing? –  JSchlather Mar 6 '11 at 23:45
Nevermind, figured it out. Thanks a bunch. –  JSchlather Mar 7 '11 at 0:09

You could use the fonttable package, for example, here with the mathb (of mathabx) symbol font:

\documentclass{article}
\usepackage{fonttable}
\begin{document}
\fonttable{mathb9}
\end{document}


Output:

Font names can be found also by looking into the packages .sty file.

-