[Tex/LaTex] LaTeX Error: Command \ng unavailable in encoding OT1

biblatexbibliographieserrorssharelatex

Please I have a problem and the situation is very urgent, my bibliography have certain characters and I'm not sure what is the cause of the problem.

I'm using the online editor sharelatex and this error message appears.

please your fast response will really help

LaTeX Error: Command \ng unavailable in encoding OT1.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.1054 

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

Thank you

Best Answer

The solution depends on the TeX engine that's in use. If you use pdfLaTeX, load the package fontenc with the option T1. If you use either XeLaTeX or LuaLaTeX, nothing special needs be done in order for \ng to work properly, though loading the fontspec package is probably a good idea anyway.

A full MWE (minimum working example)

\documentclass{article}

\usepackage{ifluatex,ifxetex}
\ifluatex
  \usepackage{fontspec} % optional
\else\ifxetex
  \usepackage{fontspec} % optional
\else % assume that pdftex engine is in use
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc} % optional for "\ng"
\fi\fi

\begin{document}
\ng
\end{document}