2

I wish to write something that includes many IPA characters as well as some more obscure Unicode characters.

This is a test document:

  \documentclass{article}
  \usepackage[utf8]{inputenc}
  \begin{document}
  This is a unicode character: ƿ.
  \end{document}

I compile it with XelaTeX, and it compiles fine, but the character does not show. This works with some Unicode characters, but not all.

This is the output when XelaTeX is run:

This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/Debian) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./test2.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def)
(./test2.aux) (/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd) [1]
(./test2.aux) )
(see the transcript file for additional information)
Output written on test2.pdf (1 page).
Transcript written on test2.log.

Note: if the character does not show on your screen, it is the character Wynn (unicode ref: 01BF).

2
  • 1
    You need to understand that just because you can enter a character in your editor, LaTeX still needs a font to display it. When you load no other font, LaTeX falls back on Latin Modern (I think), which has limited support for such exotic characters. Get a font which has the required glyphs and try again …
    – Ingmar
    Commented Aug 17, 2022 at 19:53
  • 1
    If you add the command \tracinglostchars=3 near the top, TeX will make it an error when the font doesn’t have a character you need, instead of silently printing a warning in the middle of a .log file. \trancinglostchars=2 will at least print a warning message to the console. You always want to do this unless you really need backward-compatibility with some very old source files.
    – Davislor
    Commented Aug 17, 2022 at 20:39

1 Answer 1

3

You need to use a font that contains this character. Try, e.g.:

\documentclass{article}
\usepackage{fontspec}
\setromanfont{DejaVu Serif}
\begin{document}
This is a unicode character: ƿ.
\end{document}

with xelatex, assuming you have DejaVu Serif installed in your machine:

result

2
  • Thank you. That worked. Is there a way to find out what fonts contain which characters? Or is it a case of finding a font you like and then seeing if it contains the right characters?
    – JRCSalter
    Commented Aug 17, 2022 at 20:23
  • 4
    @JRCSalter run albatross U+01BF Commented Aug 17, 2022 at 20:54

You must log in to answer this question.

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