1

I am writing my bachelor thesis using TeXMaker. There is a .sty file available for us to use. The default language used by the .sty file is Czech and I want to change that to English.

There is a Czech and English version of each element on the title page, such as:

%% School name
\newcommand\skola@cz{České vysoké uČení technické v~Praze }
\newcommand\skola@en{Czech Technical University in Prague}

The .sty file lists following options:

\DeclareOption{semestral}%semestral project
    {\TT@diplomafalse \TT@bachelorfalse \TT@semestraltrue}
\DeclareOption{bachelor}%bachelor thesis
    {\TT@diplomafalse \TT@bachelortrue \TT@semestralfalse}
\DeclareOption{diploma}%diploma thesis
    {\TT@diplomatrue \TT@bachelorfalse \TT@semestralfalse}
\DeclareOption{cvutstyle}% title page styled according to requirements
    {\TT@cvutstyletrue}
\DeclareOption{english}% title page in English
    {\TT@englishtrue}

I thought I would change the language to English by changing this:

\usepackage[
  cvutstyle,
  bachelor,
]{thesiscvut}

to this:

\usepackage[
  cvutstyle,
  bachelor,
  english
]{thesiscvut}

However, this - as far as I can see - does not do anything at all. When I change "bachelor" to "diploma" it works as expected (it shows Diploma thesis instead of Bachelor thesis on the title page).

EDIT:

This is the code for a complete minimal document demonstrating the problem:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                  %%
%%  BAKALÁŘSKÁ PRÁCE -  Database Output Storage Support in PyWPS Framework          %%
%%               Jan Pišl                           %%
%%                                                  %%
%% pro formátování využita šablona: http://geo3.fsv.cvut.cz/kurzy/mod/resource/view.php?id=775  %%
%%                                                  %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\documentclass[%
  12pt,                     % Velikost základního písma je 12 bodů
  a4paper,                  % Formát papíru je A4
  oneside,                  % Oboustranný tisk
  pdftex,                   % překlad bude proveden programem 'pdftex' do PDF
%%%  draft
]{report}                   % Dokument třídy 'zpráva'
%

\newcommand{\Fbox}[1]{\fbox{\strut#1}}

\usepackage[english, czech]{babel}  % použití češtiny, angličtiny
\usepackage[utf8]{inputenc}     % Kódování zdrojových souborů je UTF8

\usepackage[square,sort,comma,numbers]{natbib}

\usepackage{caption}
\usepackage{subcaption}
\captionsetup{font=small}
\usepackage{enumitem} 
\setlist{leftmargin=*} % bez odsazení

\makeatletter
\setlength{\@fptop}{0pt}
\setlength{\@fpbot}{0pt plus 1fil}
\makeatletter

\usepackage[dvips]{graphicx}   
\usepackage{color}
\usepackage{transparent}
\usepackage{wrapfig}
\usepackage{float} 

\usepackage{cmap}           
\usepackage[T1]{fontenc}    

\usepackage{textcomp}
\usepackage[compact]{titlesec}
\usepackage{amsmath}
\addtolength{\jot}{1em} 

\usepackage{chngcntr}
\counterwithout{footnote}{chapter}

\usepackage{acronym}

\usepackage[
    unicode,                
    breaklinks=true,        
    hypertexnames=false,
    colorlinks=true, % true for print version
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
]{hyperref}         

\usepackage{url}
\usepackage{fancyhdr}
%\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{algcompatible}
\renewcommand{\ALG@name}{Pseudokód}% Update algorithm name
\def\ALG@name{Pseudokód}

\usepackage[
  cvutstyle,          
  bachelor,           
]{thesiscvut}


\newif\ifweb
\ifx\ifHtml\undefined % Mimo HTML.
    \webfalse
\else % V HTML.
    \webtrue
\fi 

\renewcommand{\figurename}{Obrázek}
\def\figurename{Obrázek}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Definice informací o dokumentu  %%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Název práce
\nazev{Database Output Storage Support in PyWPS Framework}
{Možnosti integrace databázového úložiště v rámci frameworku PyWPS}

%% Jméno a příjmení autora
\autor{Jan}{Pišl}

%% Jméno a příjmení vedoucího práce včetně titulů
\garant{Ing.~Martin~Landa,~Ph.D.}

%% Označení programu studia
\programstudia{Geodézie a~kartografie}{}

%% Označení oboru studia
\oborstudia{Geodézie, kartografie a~geoinformatika}{}

%% Označení ústavu
\ustav{Katedra geomatiky}{}

%% Rok obhajoby
\rok{2018}

%Mesic obhajoby
\mesic{leden}

%% Místo obhajoby
\misto{Praha}

%% Abstrakt
\abstrakt{Bude doplněno} {To be implemented.}

%% Klíčová slova
\klicovaslova
{PyWPS, databáze, Python, GDAL}
{PyWPS, databases, Python, GDAL}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Nastavení polí ve Vlastnostech dokumentu PDF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nastavenipdf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Začátek dokumentu
\begin{document}

\catcode`\-=12  % pro vypnuti aktivniho znaku '-' pouzivaneho napr. v \cline 

% aktivace záhlaví
\zahlavi

% předefinování vzhledu záhlaví
\renewcommand{\chaptermark}[1]{%
    \markboth{\MakeUppercase
    {%
    \thechapter.%
    \ #1}}{}}

% Vysázení přebalu práce
%\vytvorobalku

% Vysázení titulní stránky práce
\vytvortitulku

% Vysázení stránky s abstraktem
\vytvorabstrakt

% Vysázení prohlaseni o samostatnosti
\vytvorprohlaseni

% Vysázení poděkování
\stranka{%nahore
       }{%uprostred
       }{%dole
       \sffamily
    \begin{flushleft}
        \large
        \MakeUppercase{Poděkování}
    \end{flushleft}
    \vspace{1em}
        %\noindent
    \par\hspace{2ex}
    {Bude doplněno.}
}

% Vysázení obsahu
%\obsah

% Vysázení seznamu obrázků
%\seznamobrazku

% Vysázení seznamu tabulek
%\seznamtabulek



% Vysázení seznamu zkratek
%\include{zkratky}

% Literatura
\nocite{*}
\def\refname{Literatura}
\bibliographystyle{mystyle}
\bibliography{literatura}


% Začátek příloh
\def\figurename{Figure}%
\prilohy

% Vysázení seznamu příloh
%\seznampriloh

% Vložení souboru s přílohami
%\include{prilohy}

% Konec dokumentu
\end{document}

This is the .sty file:

http://textuploader.com/dq6ej

  • Welcome! Please edit your question to provide code for a complete minimal document demonstrating the problem. If we need a custom sty file, provide a link. – cfr Nov 25 '17 at 21:38
  • 1
    Does \PassOptionsToPackage{english}{thesiscvut} help? – user31729 Nov 25 '17 at 21:45
  • your question is unrelated to texmaker that is just the editor in which you are writing the document, but the question is about a package thesiscvut the documentation of that thesis package will tell you how to select the english versions, the answer will be specific to that package. – David Carlisle Nov 25 '17 at 21:45
  • @ChristianHupfer it does not. – Jan Pisl Nov 25 '17 at 21:50
  • @DavidCarlisle yes, you are right it doesnt relate to texmaker, sorry. i didnt realize that. I have added a link to the thesiscvut.sty file. I am going through it but cannot find anything useful. – Jan Pisl Nov 25 '17 at 21:52
2

The english option is only partially implemented.

I picked on one word, faculty (I guess:-) and prefixed each use by !!

so around line 856

    \ifTT@english %
        \MakeUppercase{!!1\fakulta@en} \\[0.4em] %
    \else %
        \MakeUppercase{!!1\fakulta@cz} \\[0.4em]

note that would use english

but the version at line 908 only has

                    \MakeUppercase{!!2\fakulta@cz} \\

at line 1021 again it tests for english

\ifTT@english %
    \MakeUppercase{!!3\fakulta@en} \\[0.4em] %
\else
    \MakeUppercase{!!3\fakulta@cz} \\[0.4em] %
\fi %

but actually your page uses this version (!!4) at line 1094

            \sffamily \Large    
                \MakeUppercase{!!4\fakulta@cz}\\
                \MakeUppercase{\programstudiatext@cz

which again does not test for English.

the simplest thing to do is use this command which ought to define the Czech and English versions but

%% Definice fakulty
\def\fakulta#1#2{%
    \renecommand{\fakulta@cz}{#1}%
    \renewcommand{\fakulta@en}{#1}%
}

as you see it uses #1 for both so defines them to be the same thing, however if you only want the english version then

\fackulta{English word}{}

will define it to be whatever you want.

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.