Document Classesbeamer | Changing Environment Names

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

beamer | Changing Environment Names

Post by bkarpuz »

Dear LC members,

I am using beamer for my presentation but I have a little problem. When I use the definition environment, it shows a box with a title Definition. How can I change that title?


Thanks.
bkarpuz
Last edited by bkarpuz on Sat Jan 14, 2012 11:31 pm, edited 3 times in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: beamer | Changing Environment Names

Post by localghost »

How do you want to name it? Do you want to give it a completely new name or just have a translation of the term "Definition"?


Thorsten
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

beamer | Changing Environment Names

Post by bkarpuz »

localghost wrote:How do you want to name it? Do you want to give it a completely new name or just have a translation of the term "Definition"?


Thorsten
I will just type the translation...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: beamer | Changing Environment Names

Post by localghost »

Then give more information about the language and how "Definition" reads in this language. My crystal ball is out of order at the moment.
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

beamer | Changing Environment Names

Post by bkarpuz »

localghost wrote:Then give more information about the language and how "Definition" reads in this language. My crystal ball is out of order at the moment.
Ooops, localghost, I am very sorry for my poor answer.
My thesis is in Turkish, For Definition, we use the word Tan{\i}m. If you can help me with this one, I think I can figure the rest for other environments like theorem, example...

Thanks
bkarpuz
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | Changing Environment Names

Post by localghost »

For translations the solution becomes quite easy. The beamer class comes with the »translator« package (and uses it internally). This package is documented in Chapter 25 of the beamer user guide.

Code: Select all

\documentclass[smaller,turkish]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{fix-cm}

\newtranslation[to=Turkish]{Definition}{Tan{\i}m}

\begin{document}
  \begin{frame}
    \begin{definition}
      Definition body
    \end{definition}
  \end{frame}
\end{document}
The code for such environments can be found in the file »beamerbasetheorems.sty«. These environments are prepared for usage with the »translator« package. Other translations happen analogous.
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

beamer | Changing Environment Names

Post by bkarpuz »

localghost wrote:For translations the solution becomes quite easy. The beamer class comes with the »translator« package (and uses it internally). This package is documented in Chapter 25 of the beamer user guide.

The code for such environments can be found in the file »beamerbasetheorems.sty«. These environments are prepared for usage with the »translator« package. Other translations happen analogous.
Many thanks for your reply but this yield another problem.
I use \beamergotobutton when I apply the code you have supplied I get an error with the following part \begin{frame}[label=mr] in the minimized example below.

Code: Select all

\documentclass[smaller,turkish]{beamer}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{fix-cm}

\usetheme{Warsaw}

\newtranslation[to=Turkish]{Theorem}{Teorem}
\newtranslation[to=Turkish]{Definition}{Tan{\i}m}

\begin{document}

\section{Introduction}

\begin{frame}
\frametitle{Introduction}
\begin{definition}
--
\end{definition}
\hyperlink{mr<1>}{\beamergotobutton{Skip Introduction}}
\end{frame}

\section{Main Results}

\begin{frame}[label=mr] %If I remove [label=mr], it works fine
\frametitle{Main Results}
\begin{theorem}
--
\end{theorem}
\end{frame}

\end{document} 
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | Changing Environment Names

Post by localghost »

The issue is not the related to the translations themselves, but to babel and its »turkish« language option. For details refer to the babel manual. The "=" character undergoes a special handling which is the probable cause. With other language options like »ngerman« this problem does not occur. At the moment I can't offer a solution to this. Perhaps somebody else can.
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

beamer | Changing Environment Names

Post by bkarpuz »

localghost wrote:The issue is not the related to the translations themselves, but to babel and its »turkish« language option. For details refer to the babel manual. The "=" character undergoes a special handling which is the probable cause. With other language options like »ngerman« this problem does not occur. At the moment I can't offer a solution to this. Perhaps somebody else can.
Thank you again localghost for your reply. I defined new environments as follows.

Code: Select all

\newtheorem{ctheorem}{Teorem}[subsection]
\newtheorem{ccorollary}[theorem]{Sonu\c{c}}
\theoremstyle{definition}
\newtheorem{cdefinition}[theorem]{Tan{\i}m}
\newtheorem{cexample}[theorem]{\"{O}rnek}
\newtheorem{clemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Uyar{\i}}
\newtheorem{property}[theorem]{\"{O}zellik}
Best regards.
bkarpuz
Post Reply