TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add this symbol: � to a beamer presentation. It is shown when something went wrong with the encoding.

Sadly, I can't simply include this symol:

! Package inputenc Error: Unicode char \u8:� not set up for use with LaTeX.
See the inputenc package documentation for explanation.

and I don't have any idea how to get it in LaTeX

(An image is not the solution I would like to use!)

Detexify didn't help either.

Description of the symbol (to make it easier to find):

  • a black diamond with a white question mark within or
  • a black sexagon with a white question mark
  • seems to be "\xa0" in sed

How is this symbol � called? How can I print it with LaTeX?

share|improve this question
up vote 8 down vote accepted

Following David Carlisle's suggestion here's a TikZ solution:


% w/o following space!
\newcommand{\quem}{\tikz[baseline=(wi.base)]{\node[fill=black,rotate=45,inner sep=.1ex, text height=1.8ex, text width=1.8ex] {};%
\node[ font=\color{white}] (wi) {?};}}


 Some  \quem Text


You may alter the size of the black triangle by playing with inner sep and keep in mind that there is no space an the end of the macro.

share|improve this answer

The symbol you actually pasted into this question is U+FFFD Thus is the Unicode replacement character that applications use as a substitute when they are otherwise confused. It doesn't have a default presentation as it is essentially a kind of control character. The font here is showing it in that form.

If you don't specifically need it as a single text character you could of course produce it in latex by including an image or by over-printing a white question mark over a black diamond.

So in pdflatex this works:

enter image description here





% Methode 1                                             

This is U+FFFD (�)


Obviously you can put more design into the white on black ? if needed, this just shows the basic idea.

share|improve this answer
+1. I was so free as to use your suggestion (over-printing) for another answer. Now there are three solutions: \DeclareUnicodeCharacter, TikZ, over-printing. Nice! – Stephen Nov 11 '12 at 11:35
@Stephen the \DeclareUnicodeCharacter is an input side declaration independent of the way the character is rendered, you could use it with either of the other two solutions posted so that the input character (�) produce the tikz code \DeclareUnicodeCharacter{FFFD}{\quem} or the overprint \DeclareUnicodeCharacter{FFFD}{\encodingerror} – David Carlisle Nov 11 '12 at 11:47

and a solution without loading a bombastic package:

\newsavebox\Diam@nd \newlength\x@D\newlength\y@D


Some  \Quem\ Text \huge \Quem\ Text 


enter image description here

It also takes the fontsize into account

share|improve this answer
Doesn't beamer anyway load tikz? – gerrit Nov 11 '12 at 12:47
as far as I know, only pgf – Herbert Nov 11 '12 at 13:09

Over-printing a white question mark over a black diamond, as suggested by David Carlisle, could be accomplished by






An \encodingerror occurred.


An <?> [encoding error] occurred.

The xspace could also be used for bloodworks' answer, of course.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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