## WeBWorK Problems

### localization, problems with accents

by Lenin Augusto Echavarria -
Number of replies: 3
Hi,

I am authoring problems in Spanish and I would like to use accents inside the pg code and watch them in the hardcopy. If I write, for example, Matemáticas, I have not problems in the html output, but in the PDF I obtain Matemticas.

I have been using

$Matematicas=MODES(TeX=>"{Matem\'aticas}",HTML=>"Matem&aacute;ticas"); to obtain the desired output. But then I have to construct a dictionary of all accented words and the code looks less readable. I tried adding the line \usepackage[latin1]{inputenc} in the hardcopyPreamble.tex file, but the output is then MatemÃ¡ticas both in the PDF and the TEX files. Does anybody know how I can add accented words and obtain the desired output in the PDF file? Thanks. In reply to Lenin Augusto Echavarria ### Re: localization, problems with accents by Arnold Pizer - Hi, The following works:$Matematicas=MODES(TeX=>"{Matem\'{a}ticas}",HTML=>"Matem&aacute;ticas");

Arnie
In reply to Lenin Augusto Echavarria

### Re: localization, problems with accents

by Michael Gage -
Some kind of addition to the hardcopyPreamble.tex file should solve your problem.

Here is what worked to add French accents:

French accents are missing when generating the pdf (latex) output.This has to do with the preambule. Something like

\usepackage[french]{babel}   # Vocabulaire en francais

\usepackage[utf8]{inputenc}  % Codage UNICODE (UTF-8)

Do you need these packages for processing equations as well?  If so some kind of modification would need to be made in lib/WeBWorK/Constants.pm

Let us know (on this forum) what ends up working  and remind us to put the proper lines in the next standard distribution of webwork.

\usepackage[utf8]{inputenc}