2

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

F 505
  • 525
  • Just add the instruction \usepackage[T1]{fontenc} to the preamble. – Mico Dec 27 '17 at 18:01
  • I assume, you have searched your *.bib files for \ng and ŋ? This might help: https://tex.stackexchange.com/questions/407742/how-to-print-the-essential-supremum-operator – Oleg Lobachev Dec 27 '17 at 18:29
  • Ummm actually no, like I should remove these two characters or what? – F 505 Dec 27 '17 at 19:16
  • @OlegLobachev I searched for these two characters in the bibliography there is no such characters involved. Is there other characters could cause the problem?! – F 505 Dec 27 '17 at 19:21

1 Answers1

3

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}
Mico
  • 506,678
  • Unfortunately the same characters still appears in the bibliography :((((( – F 505 Dec 27 '17 at 19:15
  • @F505 - Did you perform a full recompile cycle — LaTeX, BibTeX, and latex twice more? – Mico Dec 27 '17 at 20:14
  • Actually I'm using sharelatex online editor,I tried to compile with both pdfLatex and xeLatex and both produce these characters. – F 505 Dec 27 '17 at 20:27
  • is the cause of the problem the existence of some characters in the bibliography?! I'm not really sure and this is confusing me – F 505 Dec 27 '17 at 20:46
  • I realized that the problem is because if this package \usepackage{arabtex}, I really don't know what to do – F 505 Dec 27 '17 at 22:21
  • 1
    @F505 - I suggest that you post a new query, in which you describe your document setup in greater detail, including a mention of the fact that you load the package arabtex. In this new query, you should also provide one or two examples of bibliographic entries that are causing you grief. Be sure to mention how you construct the formatted bibliography: By hand, with BibTeX (with or without a citation management package such as natbib), or with biblatex. The aim should be to post a query that actually generates the problem you wish to fix. – Mico Dec 27 '17 at 23:05
  • @F505, I know you said in the other post you don't want to shift to xelatex because you find it too slow... But can I suggest you revisit this thought? RTL languages require a lot of hacks in pdflatex and it's just so much easier using xelatex. You will probably find that the time saved in trying to solve these kind of problems will outweigh any difference in compile time :). – David Purton Dec 28 '17 at 05:29