Theses, Books, Title pagesspanish configuration

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
smallperalta
Posts: 4
Joined: Tue Nov 03, 2015 4:43 pm

spanish configuration

Post by smallperalta »

Hi!
Is it possible to use the masters-doctoral-thesis template in spanish?

I know its only english/german, but is there a way around it so i can use it in spanish? Any files where i could replace the words "author" with "autor", "supervisor" with "director", "chapter" with "capítulo" and so on....

Regards,
Stan.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

spanish configuration

Post by Johannes_B »

Hi there, the template can be used with other languages as well, right now it just fires a stupid error message. This will be gone with the next release.

You can check all occurences one at the time, or look in the class file where the different names are preset. It would be cool if you could provide the spanish names for other users here in this thread.

For further reference, please have a look at the answer i gave yesterday.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
smallperalta
Posts: 4
Joined: Tue Nov 03, 2015 4:43 pm

spanish configuration

Post by smallperalta »

Hi.
I have stumbled upon a series of obstacles:
Is spanish an available language?

I tried "ngerman" as language while defining documentclass (so to repeat the process shown in the earlier thread) and got this:
Package babel Error: You haven't specified a language option ...ry to proceed from here, type x to quit
Was this the error message you mentioned?


How could I do the modification of the different names? You mentioned the MasterThesisDoctoral.cls, but i'm not quite sure how to.

I could provide a list of translated words too.

I'm running Kile on Lubuntu 14.04 in an intel dual core T4300@2GHz, and 2GB of memory.

Regards,
Stan
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

spanish configuration

Post by Johannes_B »

hi,
Package babel Error: You haven't specified a language option
This is the normal behaviour. When you change the language, a bit is still in a helper file and LaTeX gets confused. Just let happen or remove the helper file (aux) because it is re-generated every run. Nothing to worry here. That is just how LaTeX works, not the template.

Not checked the other thread, it's late, but if you could supply the missing names for spanish, that would be great.

Edit: the error message i mentioned is due to my not-thinking, the error message you mention is standard LaTeX. It is easy to confuse a human, as well as a computer program. Luckily, there are arror messages :-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
smallperalta
Posts: 4
Joined: Tue Nov 03, 2015 4:43 pm

Re: spanish configuration

Post by smallperalta »

Hi,
well, I was able to change some stuff in the .cls file, such as the Declaration of Authorship and similar "extra" stuff, but I'm not sure how to change. I'll list the translations for the different words in order here:

"Abstract" by "Resumen"
"by" by "por"
"Acknowledgements" by "Agradecimientos"
"Contents" by "Indice"
"List of Figures" by "Indice de Figuras"
"List of Abbreviations" by "Lista de Abreviaciones"
"Physical Constants" by "Constantes Físicas" (which is encoded f\'isica, as far as I know).
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

spanish configuration

Post by Johannes_B »

There is no need to tangle the class file at all, the template was designed that way. All you need to do, is add the language strings that are yet unknown:

Code: Select all

\newcaptionname{italian}{\acknowledgementname}{Ringraziamenti}
\newcaptionname{italian}{\authorshipname}{Title of that page}
\newcaptionname{italian}{\abbrevname}{Elenco delle abbreviazioni}
that's copy and pasted from the earlier answer i linked above. In your case, you need to substitute italian with spanish (or the dialiect you passed as global option):

Code: Select all

\newcaptionname{spanish}{\acknowledgementname}{Agradecimientos}
\newcaptionname{spanish}{\byname}{por}
There is even another anwer explaining what to do: Add one more abstract.

Can you explain in more detail what you have tried?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
smallperalta
Posts: 4
Joined: Tue Nov 03, 2015 4:43 pm

spanish configuration

Post by smallperalta »

Ok, I got a way around it. I was just having some trouble with the babel package. Luckily there are arror messages! It worked both ways but I chose to use

Code: Select all

\providecaptionname{spanish}{\acknowledgementname}{Agradecimientos}
and so on in the .cls file.
Thanks a lot!!!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

spanish configuration

Post by Johannes_B »

You should not change the class file!
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

spanish configuration

Post by Stefan Kottwitz »

Hi Stan,

thanks for telling us your solution!

Indeed, a .cls file should never be changed (except by the programmer/maintainer). It would work for the moment, but you would run into problems when you update your TeX installation or the bundle with the class file. Your document would only work with a copy of that changed class file, not with the same class on any other computer without your copy. Imagine, users would change article.cls or book.cls...

You can make your own settings in the preamble of your LaTeX document. So simply put your definitions or redefinitions before \begin{document}.

That's what Johannes meant. :-)

Stefan
LaTeX.org admin
Airatx
Posts: 2
Joined: Sun Mar 17, 2019 1:43 pm

spanish configuration

Post by Airatx »

Hello,

I know that this is an old post , but I struggling with this same problem right now , and although it has solved almost all my problems I'm still have a few. I haven't been able of change "Author" for "Autor" or "in the" for "en el".

Any help will be appreciate!!
Post Reply