Hello I'm using the complexity package to write a text where I would like to highlight some complexity classes.
However the text is being written in a Latin language which requires the use of accents in some words. When I try to make a newfunc using a word as an example, for example, "difícil" the "í" vanished.
\documentclass{article}
\usepackage[brazil]{babel}
\usepackage[T1]{fontenc} % Support Icelandic Characters
\usepackage[utf8]{inputenc} % Support Icelandic Characters
\usepackage{type1ec}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage[table, xcdraw, dvipsnames]{xcolor}
\usepackage{tkz-graph}
\usepackage{subfig}
\usepackage{amsmath}
\usepackage{float}
\captionsetup[figure]{labelfont = {bf}, labelsep = period}
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}P{#1}}
\usetikzlibrary{arrows}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usepackage[a4paper,
portuguese,
bookmarks=true,
bookmarksnumbered=true,
linktocpage,
colorlinks,
citecolor=black,
urlcolor=black,
linkcolor=black,
filecolor=black,
]{hyperref}
\usepackage[square]{natbib}
\usepackage{complexity}
\newfunc{\dificil}{difícil}
\begin{document}
problemas $\NP\text{-}\dificil$
\end{document}
I would like to know how I make the letter "i" appear accented in the math environment.
Thanks


dif\acute{i}ciland you'll see why. Please, vote for reopening. – egreg Sep 08 '21 at 08:48\imath:dif\acute{\imath}cil. – O'Neil Sep 08 '21 at 12:11