I found a symbol that I am interested in in the Comprehensive LaTeX Symbols list, where it is noted that the symbol is part of the ifsym package.

However, when I try to use the symbol, thus:

a \SmallSquare b

the document fails to compile, and I get the following error message:

ERROR: Undefined control sequence.

--- TeX said ---
l.5 a \SmallSquare

EDIT: It was suggested in a comment that I load the package with the geometry option. So I tried it (\usepackage[geometry]{ifsym}). The good news is that now the document compiles successfully. The bad news is that the symbol that gets printed is wrong:

With the geometry option the printed symbol is an ampersand

  • @campa: Thanks. I tried adding the geometry option, but it's still not right. See my edit above. – Evan Aad Nov 12 '18 at 11:23
  • 1
    See edited answer. They are text mode commands. – campa Nov 12 '18 at 11:24

By default the ifsym package defines only a generic \textifsymbol macro. Specific abbreviations are declared in different subsets which can be loaded by the options clock, weather, alpine, misc, geometry, electronic. The geometric shapes must be loaded by

\usepackage{amsmath} % for correct scaling in sub/superscripts
a \textnormal{\SmallSquare} b

The Comprehensive Symbol List lacks this detail.

Note that the symbols are text mode, so they will fail in math mode. As an example, \SmallSquare expands more or less to

\fontencoding{U}\fontfamily{ifgeo}\selectfont \symbol{96}

The font switching stuff is useless in math mode and \symbol{96} is all is left, leaving the @.

  • @egreg Of course... Actually I should know it... :-/ – campa Nov 12 '18 at 12:44
  • @egreg I was slightly puzzled that the expansion of \textnormal is unchanged with or without amsmath. I had forgotten that amstext does \let\nfss@text\text... – campa Nov 12 '18 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.