5

I'm making a presentation and I have to include some text in Ethiopic script. For documents, the ethiop-package is a great help, but when in beamer mode, I get an error:

/usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def:16: Undefined control sequence. \eth@altchar #1->\def \eth@res {\eth@doaltchar {#1}} l.16 ...2011/01/21 Fixes to fontencodings LGR, T3]

I think there is some conflict between beamer mode and the ethiop package. What should I do?

\documentclass{beamer}

\mode<presentation>
{ \usetheme{Warsaw}      
  \usecolortheme{default} 
  \usefonttheme{default}  
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]} 

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{ethiop}
\newcommand{\etp}{\selectlanguage{ethiop}}

\begin{document}

\begin{frame}

{\etp 'ana negu'sa wa-'antemu 'agbertya .tabbabt}

\end{frame}

\end{document}

O, and this is my first presentation with LaTeX.

  • Avoid utf8x and use utf8. – egreg May 2 '14 at 16:37
  • Or load ucs through the documentclass \documentclass[ucs]{beamer}. (But I agree with egreg, that one should avoid it). – Ulrike Fischer May 2 '14 at 16:39
4

The package ucs and its utf8x option for inputenc are often cause for troubles and, in general, I don't recommend using them.

Your document compiles just fine if you change utf8x into utf8. However, I suggest not using \selectlanguage, but other features of babel:

\documentclass{beamer}

\mode<presentation>
{ \usetheme{Warsaw}      
  \usecolortheme{default} 
  \usefonttheme{default}  
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]} 


\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{ethiop}
\newcommand{\textetp}[1]{\foreignlanguage{ethiop}{#1}}
\newenvironment{etp}
  {\begin{otherlanguage*}{ethiop}}
  {\end{otherlanguage*}}

\begin{document}

\begin{frame}

\textetp{'ana negu'sa wa-'antemu 'agbertya .tabbabt}

\begin{etp}
'ana negu'sa wa-'antemu 'agbertya .tabbabt
\end{etp}

\end{frame}

\end{document}

The two ways are essentially equivalent, but clearer.

enter image description here

As Ulrike Fischer remarks in a comment, you could also use utf8x, provided you pass the ucs option to the class:

\documentclass[ucs]{beamer}

otherwise the package is loaded too late. However, I don't think you need utf8x.

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.