I need to use several Unicode characters in a document I'm writing using Overleaf. I don't need them to do anything special, I just need to be able to write them into my source text and see them the same way in the compiled output. I need to use the entire Ogham block (U+1680 to U+169C) as well as various other linguistic symbols such as the tironian et (U+204A), some combining diacritics (U+030C and U+0304), and more.

I've tried out a few solutions I've found, using XeTeX and LuaTeX compilers. When I use LuaTex I don't get any error messages, which is good. However, only some of the characters show up in the output, and I lose a lot of the document's formatting, which worked fine when using pdfTeX. For example, all my section titles are compiled in lowercase instead of uppercase, and the document title spacing changes and loses the boldface.

Other threads have suggested using something like \DeclareUnicodeCharacter{"204A}{}, but adding this beneath my packages this raises a new error:

Missing number, treated as zero.
LaTeX Error: Missing \Begin{document}.
Package inputenc Error: Cannot define non-active Unicode char value < 00A0.

Is there any way to overcome this and just have pdfTeX compile the document so that it shows my Unicode characters in the output the same way as they are in the input?

  • Welcome to TeX.SX! Whether a character shows up in the compiled PDF or not has to do with whether or not a font that contains this symbol is at hand. If you use XeLaTeX or LuaLaTeX, you are able to load any font that you can use with your system. For example, you could check whether Google's Noto font has the required characters. You can just load the required fonts into the working directory and load them into the document, which would be a solution for Overleaf as well (there are a lot of hints how to do this on this page). Sep 28 at 12:11
  • As for pdfLaTeX, you would need to look for packages that provide the relevant symbols that you need. It is not as simple to install fonts, as they need to be in a special format. I would recommend compiling your document with XeLaTeX or LuaLaTeX. Anyways, there are packages for Ogham or phonetic symbols. Of course, you also could try to draw the needed symbols on your own ... Sep 28 at 12:22
  • Thanks, Jasper. I'll take a look at the fonts available through google. The problem remains with LuaLaTex and XeLaTex that they break the formatting for the rest of the document, and I'm not sure why, or how to fix it.
    – AdeDoyle
    Sep 28 at 12:22
  • Okay, as for problems other that the fonts, it will be necessary to have a look into your code. Therefore, you should provide a minimal (non-)working example that illustrates the problems you have. Sep 28 at 12:24
  • The syntax for the pdflatex declaration is \DeclareUnicodeCharacter{204A}{something} without a quote symbol. But you would need a font which supports your chars there too. Sep 28 at 12:31

With lualatex or xelatex you just need a font that has the characters. Noto Sans Ogham is installed at Overleaf and not surprisingly covers the Ogham block:

enter image description here

The document is



\newfontfamily\og{Noto Sans Ogham}
\date{September 2021}




Some Ogham\\
U+1680 {\og ^^^^1680}\\
U+1681 {\og ^^^^1681}\\
U+1682 {\og ^^^^1682}\\
U+1683 {\og ^^^^1683}\\
U+1684 {\og ^^^^1684}\\
U+1685 {\og ^^^^1685}\\
U+1686 {\og ^^^^1686}\\
U+1687 {\og ^^^^1687}\\
U+1688 {\og ^^^^1688}\\
U+1689 {\og ^^^^1689}\\
U+168A {\og ^^^^168a}\\
U+168B {\og ^^^^168b}\\
U+168C {\og ^^^^168c}\\
U+168D {\og ^^^^168d}\\
U+168E {\og ^^^^168e}\\
U+168F {\og ^^^^168f}\\
U+1690 {\og ^^^^1690}\\
U+1691 {\og ^^^^1691}\\
U+1692 {\og ^^^^1692}\\
U+1693 {\og ^^^^1693}\\
U+1694 {\og ^^^^1694}\\
U+1695 {\og ^^^^1695}\\
U+1696 {\og ^^^^1696}\\
U+1697 {\og ^^^^1697}\\
U+1698 {\og ^^^^1698}\\
U+1699 {\og ^^^^1699}\\
U+169A {\og ^^^^169a}\\
U+169B {\og ^^^^169b}\\
U+169C {\og ^^^^169c}


You could also enter the characters directly rather than via ^^^^ if that is more convenient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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