1

I am using latex to compose a letter. It works well in English, but how can I handle other languages (Spanish, French). Emacs actually prints the foreign characters, but when I run pdflatexon the file, pdflatex complains on some of the characters.

NickD
  • 29,717
  • 3
  • 27
  • 44
Dilna
  • 1
  • 3
  • 11
  • pdflatex handles UTF-8 with difficulty. Use a more modern, UTF-8 aware processor, like xelatex or lualatex. But the question has nothing to do with emacs. You should take it to the TeX SE. – NickD Aug 31 '22 at 12:08

2 Answers2

0

Here is a french document that should compile fine with pdflatex. I think you can adapt it to provide a similar document for spanish.

\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}

\begin{document} Dès Noël, où un zéphyr haï me vêt de glaçons würmiens, je dîne d’exquis rôtis de bœuf au kir, à l’aÿ d’âge mûr, &cætera \end{document}

gigiair
  • 2,166
  • 1
  • 9
  • 15
  • 1
    You also need \usepackage[utf8]{inputenc} if you are using UTF-8 (and if not, you should!). – NickD Aug 31 '22 at 12:11
  • I get LaTeX Error: Unicode character ħ (U+0127) not set up for use with LaTeX. – Dilna Aug 31 '22 at 12:18
  • Is it possible to use multiple languages in a single document (e.g. in situations requiring original citations in other languages than document class of document)? – Dilna Aug 31 '22 at 12:27
  • 1
    Please take this whole discussion to TeX SE - it has nothing to do with emacs. And actually before doing that, search TeX SE: these questions have been asked before. – NickD Aug 31 '22 at 13:31
0

If possible, you can opt to use LuaLatex instead of the default engine.

(setq TeX-engine 'luatex)
Daanturo
  • 180
  • 8