Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I downloaded some files to build my thesis document from this site http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/. I have a problem, where can I define the spanish language to get titles in spanish. I tried to declare it in the CUEDthesisPSnPDF.cls file with usepackage[spanish]{babel}, but it doesn't work. I'd like to get your help.

share|improve this question
1  
Have you tried in your preambel: \usepackage[spanish]{babel}? –  Kurt Jan 26 '13 at 18:24
    
Are you sure that classicthesis is compatible with that class? It can work only with classes based on scrbook or screprt and I don't think it's good with your custom class. –  egreg Jan 26 '13 at 18:49
    
@egreg You're right, i've changed the question. –  Isai Jan 26 '13 at 19:13

1 Answer 1

If you really need to use that buggy class, you have to edit it.

Make a copy, call it myCUEDthesis.cls and change the first lines, that originally reads (with line numbers added for clarity)

  1 %
  2 % CUEDthesis v1.1
  3 % By Harish Bhanderi <harish.bhanderi@cantab.net
  4 % Version 1.0 released 15/07/2002
  5 % Version 1.1 released 14/07/2010
  6 %-------------------------- identification ---------------------
  7 %\NeedsTeXFormat{LaTeX2e}
  8 \ProvidesClass{CUEDthesisPSnPDF}[2010/07/14 v1.1 CUED thesis class]
  9 %-------------------------- initial code -----------------------
 10 \newif\ifCU@bookmode
 11 \CU@bookmodetrue
 12 
 13 \DeclareOption{report}{\CU@bookmodefalse}
 14 \DeclareOption{book}{\CU@bookmodetrue}
 15 \ProcessOptions\relax%
 16 
 17 \ifCU@bookmode
 18 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}%
 19 \ProcessOptions\relax%
 20 \ifx\pdfoutput\undefined%
 21    \LoadClass[dvips, a4paper]{book}%
 22 \else%
 23    \LoadClass[pdftex, a4paper]{book}%
 24 \fi%
 25 \else
 26 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}%
 27 \ProcessOptions\relax%
 28 \ifx\pdfoutput\undefined%
 29   \LoadClass[dvips, a4paper]{report}%
 30 \else%
 31    \LoadClass[pdftex, a4paper]{report}%
 32 \fi%
 33 %\renewcommand{\refname}{References}%
 34 \fi
 35 
 36 %\DeclareOption{book}{%
 37 %}%
 38 \usepackage{setspace}
 39 \usepackage{tocbibind}
 40 \usepackage{amssymb}
 41 %\usepackage{graphicx}
 42 \usepackage{fancyhdr}
 43 \usepackage{eucal}
 44 \usepackage[english]{babel}
 45 \usepackage[usenames, dvipsnames]{color}
 46 \usepackage[perpage]{footmisc}
 47 \usepackage[square, sort, numbers, authoryear]{natbib}
 48 \usepackage{ifthen}
 49 \usepackage{ifpdf}

to the following

% CUEDthesis v1.1 with modifications by Isai
%%%%%%%
% By Harish Bhanderi <harish.bhanderi@cantab.net
% Version 1.0 released 15/07/2002
% Version 1.1 released 14/07/2010
%-------------------------- identification ---------------------
%\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myCUEDthesis}[2013/01/26 v1.1m CUED thesis class]
%-------------------------- initial code -----------------------
\newif\ifCU@bookmode
\CU@bookmodetrue

\DeclareOption{report}{\CU@bookmodefalse}
\DeclareOption{book}{\CU@bookmodetrue}
\ProcessOptions\relax%

\ifCU@bookmode
  \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
  \ProcessOptions\relax
  \LoadClass[a4paper]{book}
\else
  \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
  \ProcessOptions\relax
  \LoadClass[dvips, a4paper]{report}
\fi
\usepackage{setspace}
\usepackage{tocbibind}
\usepackage{amssymb}
\usepackage{fancyhdr}
\usepackage{eucal}
\usepackage[usenames, dvipsnames]{color}
\usepackage[perpage]{footmisc}
\usepackage[square, sort, numbers, authoryear]{natbib}
\usepackage{ifthen}
\usepackage{ifpdf}

Then you'll be able to say in your document

\documentclass[twoside,11pt]{Classes/myCUEDthesis}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} %%% use the actual input encoding
\usepackage[spanish]{babel}

One might also use the original class and say

\documentclass[twoside,11pt,spanish]{Classes/CUEDthesisPSnPDF}

starting the document with

\begin{document}
\selectlanguage{spanish}

However it not recommendable, in my opinion, to load babel in a class file, because it's a typical user setting. Moreover, the part I've modified is really buggy in the original, because it will never select DVI output, but always setup the document for PDF output.

Every construction like

\ifx\pdfoutput\undefined

is wrong, because \pdfoutput is defined in all cases (at least if the TeX distribution is less than five years old, approximately).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.