Text FormattingDisplaying unicode in latex file

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ponilavarasu
Posts: 7
Joined: Thu Sep 19, 2019 2:23 pm

Displaying unicode in latex file

Post by ponilavarasu »

Dear Genius,

How to display the unicode character output in latex document using pdflatex option.

Regards
Pon ilavarasu

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Displaying unicode in latex file

Post by Ijon Tichy »

Current LaTeX already supports it (if you use a proper font encoding, proper font and for some characters some additional packages):

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{lmodern}
\begin{document}
ÄÖÜéâ€
\end{document}
With older LaTeX distributions you need \usepackage[utf8]{inputenc}. But this does not provide all unicode symbols. For some you have to load additional symbol fonts and declare the character yourself using \DeclareUnicodeCharacter or package newunicodechar.

Things would become more easy using xelatex or lualatex and a font that provides all needed glyphs.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply