8

I apologise if I don't make sense but this is my first LaTeX document. Basically, I have been writing my thesis and included the bibliography today. I imported the bibliography using Mendeley as references.bib. It has imported fine and I can cite and the bibliography list at the end is okay. However, it has caused some problems. It is related to the name "Hồ Thiện" in two of the references. As I understand, the imputenc (utf8 or utfx) package doesn't recognise the characters in this name. However, my problem is that because it is a .bib file, I don't know how I can edit the reference list so that the characters are recognised (I also can't find the unicode characters for these characters).

I've included the error message below in case this helps...In the bibliography text, "Hồ Thiện" ends up as "H, T.,". Any help would be appreciated!

Thank you! Amelia

**Package inputenc Error: Unicode char ồ (U+1ED3) (inputenc) not set up for use with LaTeX.

l.23 ...nni, A.~L., Hepojoki, J., Hetzel, U., Hồ , T., H{\'{o}}ng, N., Your command was ignored.**

  • Welcome to Tex.SE. – Mico Jun 1 '20 at 11:35
  • 1
    Is using XeLaTeX or LuaLaTeX an option for you? – Mico Jun 1 '20 at 11:35
  • I'm working on Overleaf - how would I change it and how would it affect my document? – Amelia Jun 1 '20 at 11:39
  • you are using accent command for the "easy" case but direct character for ồ you could use \DeclareUnicodeCharacter{1ED3}{\`{\^{o}}} but you might need to tune the accent positioning a bit for the double accent – David Carlisle Jun 1 '20 at 11:52
  • If you're working in Overleaf on a tex file, click on the stylized "O" symbol in the upper-left area; in the drop-down menu, you'll see headings such as Download, Actions, Sync, Settings, and Help. Under Settings, you'll see a line item named "Compiler"; choose LuaLaTeX or XeLaTeX from the drop-down menu. Next, load the fontspec package in the preamble and issue a \setmainfont directive with a suitable argument, i.e., a font that provides Vietnamese characters natively. – Mico Jun 1 '20 at 12:23
7

You can load the relevant font encoding, namely T5.

\begin{filecontents*}{\jobname.bib}
@article{test,
  author={\viet{Hồ Thiện}},
  title={Title},
  journal={Journal},
  year=2020,
}
\end{filecontents*}

\documentclass{article}
\usepackage[T5,T1]{fontenc}

\newcommand{\viet}[1]{{\fontencoding{T5}\selectfont#1}}

\begin{document}

\cite{test}

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

enter image description here

If needed for sorting, you might include a dummy argument, say

\newcommand{\viet}[2]{{\fontencoding{T5}\selectfont#2}}

and change the entry in the .bib file to

\viet{HoThien}{Hồ Thiện}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.