1

I have following problem - I want to use \blackbox in my file, which is provided by amssymb package. I use the following packages: babel, [T1]{fontenc}, [latin2]{inputenc}, none of which allows \blackbox. As if I try to add amssymb to list of packages and then compile the file, an error occurs. Can anyone suggest some way to overcome this problem?

doncherry
  • 54,637
rytt
  • 13

1 Answers1

4

There exists a comprehensive list of symbols in LaTeX. Alternatively you can try the Detexify homepage. According to both, there is no symbol called \blackbox.

But there is a symbol called \blacksquare, which might be an alternative here. It is made available by the amssymb package. The following MWE shows how to use that symbol.

\documentclass{article}

\usepackage{amssymb}

\usepackage[T1]{fontenc} % font encoding
\usepackage[utf8]{inputenc} % input encoding
\usepackage[english]{babel} % keyword translation and hyphenation
\usepackage{lmodern} % lmodern looks better than cm-super

%% ==================
\begin{document}
Lorem ipsum dolor sit amet.
%\blackbox
Some text about a little black $\blacksquare$ square.
\begin{equation}
    3+4 = \blacksquare
\end{equation}
\end{document}

PS: You can change the input encoding back to latin2, but utf8 has only advantages.

matth
  • 12,381