How to insert U+20B4 unicode character in LaTeX text? I've read that it is possible with XeTeX, but can it be done in LaTeX? Ive tried \char"U+20B4
, but obtained bad character code 8372
.
Thanks in advance
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityAs far as I know there is no font for pdflatex
that has U+20B4 HRYVNIA SIGN ₴ (the symbol for the Ukrainian currency).
You can emulate it, with something like
\documentclass[a4paper]{article}
\usepackage[ukrainian]{babel}
\usepackage{graphicx}
\DeclareRobustCommand{\hryvnia}{{%
\fontencoding{OT1}\upshape
\settoheight{\dimen255}{S}%
\vphantom{S}%
\smash{\ooalign{%
\hfil\reflectbox{S}\hfil\cr % a reflected S
\hfil\raisebox{0.25ex}{--}\hfil\cr % upper bar
\hfil\raisebox{-0.05ex}{--}\hfil\cr % lower bar
}}%
}}
\DeclareUnicodeCharacter{20B4}{\hryvnia}
\begin{document}
Ви заборгували мені ₴2000.
\end{document}
The definition of \hryvnia
maybe is not the best, but the idea is this: you find out how to print the symbol and then use \DeclareUnicodeCharacter
to get it when you type in the Unicode character.
\reflectbox
move box horizontally but does not reflect it. Command \scalebox{-1}[1]
does the same as \reflectbox
.
Oct 13, 2020 at 9:07
yap
, for lack of Windows, which I'm very satisfied of. ;-)
DeclareUnicodeCharacter
(see tex.stackexchange.com/a/443042/38080). (Obviously, you need a font with that shape, or fake it somehow). Btw, the character is ₴ fileformat.info/info/unicode/char/20b4/index.htmDeclareUnicodeCharacter
does not work here because there is not such char in LaTeX font.