1

I am using Arxiv template example of overleaflatex. Sometimes I got some errors that I regarding Unicode characters that can fix. In my research paper I have used the latex symbol r_\ell. I have got the bellow error it asked me to provide a definition with

\DeclareUnicodeCharacter  , The latex error is ⌊ (U+230A).

However, I have included all needed package but it can't be fixed. Any help ?

not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.245 ... \le 6$ we observe that $r_{\ell-1} = ⌊ r_{\ell}/10⌋$ You may provide a definition with \DeclareUnicodeCharacter

Paul Gessler
  • 29,607
  • 5
    Duplicate of Entering Unicode characters in LaTeX (blanket question but I think it's fine as a duplicate target) – user202729 Nov 21 '23 at 00:56
  • 1
    Note: It seems, you are thinking, that r_\ell is the problem. The problematic source is immediately before the line break in the error message. So not r_\ell is the problem. The problem is the unicode symbol (at the end of the code line before the line break in the error message). – cabohah Nov 21 '23 at 08:24

2 Answers2

6

why do you say you have included all needed packages?

⌊ is not set up for pdflatex (you have tagged unicode-math, but that is lualatex)

As the message says, add

\DeclareUnicodeCharacter{230A}{\lfloor}

If you are usng pdflatex. (Or configure the system to use unicode-mathand lualatex)

David Carlisle
  • 757,742
0

As, David Carlisle's answer suggested, the following solution

\DeclareUnicodeCharacter{230A}{\lfloor}

works without errors only for mathematical formulas.

If you want to have it added for a regular text (like in code, for example), you need to provide the "$" signs, just to avoid errors about lacking a mathematical formula signs ($).

i.e.:

\DeclareUnicodeCharacter{230A}{\ifmmode \lfloor \else $\lfloor$ \fi}

works for every type of text, checking for mathmatical mode (big thanks to @Teepeemm for pointing that out)

satk0
  • 111