I have a unicode text (XeLaTeX) in which I use vowels with umlaut, like ü and ö, which worked but suddenly stoped working. These give an error message:
! Package inputenc Error: Keyboard character used is undefined (inputenc) in inputencoding `utf8'.
Removed inputenc and babel and changed \setromanfont to \setmainfont from the .sty file and the ü and ö appear again.
But the command \d{h} to create ḥ no longer works as it did previously, the text simply produces h. The font does not have the desired glyph of its own. I am using XeLaTeX; most of the information below (and more) is in a .sty file.
\documentclass[12pt,twoside,a4paper,openright]{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{overpic}
\usepackage{lettrine}
\usepackage{makeidx}
\usepackage{fontspec}
\usepackage[normalem]{ulem}
\usepackage[paperwidth=6.3in,paperheight=9.45in]{geometry}
\setromanfont[BoldFont={SeriaPro-Bold},ItalicFont={SeriaPro-Italic},BoldItalicFont={SeriaPro-BoldItalic}]{SeriaPro}
\begin{document}
The suggestion below to redefine \d works :
\renewcommand*\d[1]{\makebox[\widthof{#1}][c]{\raisebox{-.45ex-\depthof{#1}}{.}}\llap{#1}}
Even better is a solution I found elsewhere:
\usepackage{xunicode}
Note: when used together with the xlxtra package it resulted in errors, so don't
Note: you cannot use this last solution at the same time as \renewcommand*\d
inputencif you qre using xelatex; xelatex already expects input in unicode encoding. – Gonzalo Medina Oct 05 '12 at 02:26babelwith xelatex; usepolyglossiainstead. – Gonzalo Medina Oct 05 '12 at 02:42\setromanfontto\setmainfont(the\setromanfontcommand is deprecated), (ii) replace the=>afterBoldItalicFontwith a simple=, and (iii) check whether yourpaperwidthandpaperheightspecifications are consistent with the documentclass optiona4paper. Finally, the documentclass optionsopenrightandtwosideare enabled by default for thebookclass and are thus redundant. – Mico Oct 05 '12 at 02:43