0

I faced the error "Unicode character ✰ (U+2730) not set up for use with LaTeX." in my latex document. However, I didn't find the "shadowed star" in my code even though I didn't write it. How may I find it to delete or how may I solve this error, please!

Note: I am running it on Ubuntu 20.04 operating system and with TeXStudio editor and TeXMaker editor.

I really appreciate any help you can provide.

4
  • 1
    Welcome to tex,sx. May 19, 2022 at 12:46
  • 3
    Add \DeclareUnicodeCharacter{2730}{HERE-HERE-HERE!} to your document and then look where the HERE appears. May 19, 2022 at 12:53
  • 1
    @UlrikeFischer Thaaaaank you for your answer. It was very helpful. The error is gone. However, the text "HERE-HERE-HERE!" didn't appear in the document
    – MissKoala
    May 19, 2022 at 13:02
  • 1
    If it's not in your document, is it possible it's being inserted by a package you're using. What are you loading?
    – frabjous
    May 19, 2022 at 17:49

2 Answers 2

2

Using xelatex or lualatex, just use a main font with the glyph:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{FreeSerif}
\begin{document}
Hello ✰
\end{document}

Or only for the symbols:

\documentclass{article}
\usepackage{fontspec}
\usepackage{xcolor}
\newfontfamily{\stars}{FreeSerif}[Scale=1.5,Color=blue]
\begin{document}
 Hello {\stars ✩ ✰ ✱ ✲} stars !!
\end{document}

mwe

For pdflatex, another solution is \FiveStarShadow{} provided by the package bbding.

0

This works for me:

\documentclass{article}
\usepackage{pifont}
\DeclareUnicodeCharacter{2730}{\ding{80}}
\begin{document}
✰
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .