I-ve been using LaTeX for over 10 years, but only basic out-of-the-box stuff. I am now setting up a book I wrote in spanish and I want to use Wiley's template. However, I need to modify the wileySev.cls file so that chapters are named "Capítulo" instead of Chapter, and that the headings say "Prefacio" rather than "Preface". I looked at the cls file and thought that just changing the following lines would do the trick>

\newcommand{\listfigurename}{Lista de Figuras}
\newcommand{\listtablename}{Lista de Cuadros}

but that had no effect at all.

I was wondering if it would be a simple task to change the "cls" file or is it a better idea to start modifying the memoir book from scratch?

Can someone help me understand what needs to be changed in the "cls" file in order to make it spanish compatible? I tried to understand it, but the language is just too complex for me.

Thanks for any suggestion.

The wiley template can be found here> http://www.latextemplates.com/template/wiley-book-style


  • 2
    Are you loading babel with the spanish option? – Gonzalo Medina Feb 20 '15 at 17:35
  • If the answer is yes, then the module provides a simple mechanism to change the predefined names, prepending "spanish" to the standard names, as in \newcommand{\spanishcontentsname}{CONTENTS} \newcommand{\spanishlistfigurename}{Lista de Figuras} \newcommand{\spanishlisttablename}{Lista de Cuadros} – Gonzalo Medina Feb 20 '15 at 17:41
  • It's very peculiar that the class defines \chaptername, but then uses an explicit CHAPTER string in \@makechapterhead. – egreg Feb 20 '15 at 17:56
  • Yes, I added babel from the beginning and I also tried to redefine the langue in very aspect. It did't work. – Efuchs Feb 22 '15 at 2:46

Sorry, there's no way to use the class with languages different from English, without extensive work. It uses several \font declarations and the same happens in the accompanying w-bookps.sty file.

This is due to the fact that Wiley uses proprietary fonts for the final printout. Accents are all wrong or swallowed.

There are other horrible features in the class. For instance, besides defining \chaptername, the class hardwires “CHAPTER” in the definition of \@makechapterhead, so no matter how you redefine \chaptername it will have no effect. Similarly, the definition of \listoffigures is

    \chapter*{List of Figures
        \@mkboth{\uppercase{List of Figures}}{\uppercase{List of Figures}}}%
\addcontentsline{toc}{schapter}{List of Figures}

and you can clearly see that “List of Figures” is hardwired.

| improve this answer | |
  • Thanks for pointing this out. I was able to get a working copy by modifying these "hardwired" definitions. For example in the above example, in the fifth and following lines you change \uppercase{Lista de Figuras} and also change it on line 693 for chapter. So basically I hardwired the names into spanish. I also had to change fonts in the sty file to get accents to print correctly. For example helvetica had to be redefined from ` \def\helvetica{phvr} ` to \def\helvetica{phvr8t}. That made it work. Don't know if this is going to break later, but it seems to be working now. Thx – Efuchs Feb 22 '15 at 2:51

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.