Could you send us the latex_elements definition?
I think you should put \usepackage[utf8]{inputenc} in the LaTex preamble.
https://www.overleaf.com/learn/how-to/What_file_encodings_and_line_endings_should_I_use%3F
On Fri, 27 Mar 2020, 16:45 'Vinay Sajip' via sphinx-users, <
[email protected]> wrote:
> I have some examples in my documentation of Unicode text characters \u2603
> and \U0001F602. These appear fine in the HTML documentation, but I'm having
> trouble getting them to appear in PDF output generated using the latexpdf
> builder. I've set the utf8extra key in latex_elements to define the
> characters (using DeclareUnicodeCharacter) but nothing appears in the
> final PDF output for the characters.
>
> I'm using Sphinx 1.6.7 and the build completes with warnings but no errors
> (on Sphinx 2.x, the LateX build fails, but I haven't had time to shave that
> particular yak). The .tex file just contains the utf-8 encoded characters.
>
> What do I need to do to get arbitrary Unicode characters (in this case,
> they happen to be emojis) to appear in LaTeX/PDF output?
>
> Thanks and regards,
>
> Vinay Sajip
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sphinx-users/687ee7f4-230c-40f4-af2e-1f674a27a6c9%40googlegroups.com
> <https://groups.google.com/d/msgid/sphinx-users/687ee7f4-230c-40f4-af2e-1f674a27a6c9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/CACnYWReKnWmr7N7K6%2B-PxwpmRm19xGPUEP4C0Ym9eSZKK%3Df%3D7w%40mail.gmail.com.