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
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
As 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.
– Spectorsky
Oct 13 '20 at 09:07
yap, for lack of Windows, which I'm very satisfied of. ;-)
– egreg
Oct 13 '20 at 09:47
DeclareUnicodeCharacter(see https://tex.stackexchange.com/a/443042/38080). (Obviously, you need a font with that shape, or fake it somehow). Btw, the character is ₴ https://www.fileformat.info/info/unicode/char/20b4/index.htm – Rmano Oct 13 '20 at 07:49DeclareUnicodeCharacterdoes not work here because there is not such char in LaTeX font. – Spectorsky Oct 13 '20 at 08:57