TeX - LaTeX Asked by bmv on August 8, 2020
The command uppercase
does not work properly with certain accented characters, like the Hungarian ő
or ű
or such characters as ł
, đ
and ć
. If I type the characters like H{o}
, it works, but I’d like to type it directly as ő
, as it’s used multiple times.
Could you suggest a workaround?
documentclass{article}
usepackage{t1enc}
usepackage[utf8]{inputenc}
begin{document}
uppercase{árvíztH{u}űrH{o}ő tükörfúrógép đdłlćc}
end{document}
uppercase
is a TeX "primitive". If you use the LaTeX macro MakeUppercase
instead, you'll achieve your objective easily.
You should also replace the obsolete usepackage{t1enc}
with usepackage[T1]{fontenc}
.
Observe, incidentally, that the output of uppercase{ű}
is ő
, which is rather incorrect.
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
begin{document}
texttt{stringuppercase}:
uppercase{árvíztH{u}űrH{o}ő tükörfúrógép đdłlćc}
medskip
texttt{stringMakeUppercase}:
MakeUppercase{árvíztH{u}űrH{o}ő tükörfúrógép đdłlćc}
end{document}
Correct answer by Mico on August 8, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP