Journal home page
General information
Submit an item
Download style files
Copyright
Contact us
logo for The PracTeX Journal TUG logo

Ask Nelly:
      How do I replace one overlay with another on a Beamer slide?
      How do I typeset ancient Greek quotations?

The Editors

Abstract


Ask Nelly is a question and answer column. Nelly is the quiet person who sits at the back corner desk, who knows a lot, and when asked any question is always ready with a patient answer. If Nelly doesn't know the answer, Nelly will know an expert who has the answer. Feel free to Ask Nelly about any aspect of LaTeX, TeX, Context, etc.


tpjlogo

Q: Dear Nelly: I would like to know how to replace one display with another on a Beamer slide. That is, I would like to dissolve one line and have another appear in its place -- for example, I would like to transwipe

	\[ f(x) = k \cdot e^{-x/3} \]
	
and replace it with
   
	\[ f(x) = \frac{1}{3} \cdot e^{-x/3} \]
	
I don't see an obvious way to do this.

A: There are two ways to do this. The first method was provided by Thomas E. Price:

The code

	\begin{frame}
	 \begin{overlayarea}{\textwidth}{5cm}
	 \only<1>{\[f(x)=\sin x\]}
	 \only<2>{\[g(x)=\cos x\]}
	 \end{overlayarea}
	\end{frame}
	
replaces the first equation with the second. I do not know how to transwipe or dissolve the first equation into the second unless you transwipe or dissolve the entire slide. Your may find http://www.nabble.com/The-LaTeX-Beamer-Class-f4029.html helpful.

Another way of doing it is provided by Paul Blaga:

	\documentclass{beamer}
	\begin{document}
	\begin{frame}
	\begin{overprint}
	\only<1>{
	\[
	
	f(x) = k \cdot e^{-x/3}
	\]
	}
	\only<2>{\[ f(x) = \frac{1}{3}\cdot e^{-x/3} \]}
	\end{overprint}
	\end{frame}
	\begin{frame}
	\begin{overlayarea}{\textwidth}{3cm}
	\only<1>{
	\[
	
	f(x) = k \cdot e^{-x/3}
	\]
	}
        \only<2>{\[ f(x) =\frac{1}{3}\cdot e^{-x/3} \]}
	\end{overlayarea}
	\end{frame}
	\end{document}
	


The above question was answered by Thomas E. Price, and Paul Blaga, , a member of the editorial board of this journal.

tpjlogo

Q: Dear Nelly: In my latest book, I start each chapter with a quotation. Now one of those quotations is in ancient Greek. How do I typeset that in LaTeX, including all the accents?

A: This is actually not all that difficult to achieve. All we need is the Babel package. Include it in the preamble like this:

        \usepackage[greek,english]{babel}
        \languageattribute{greek}{polutoniko}
        
This loads Babel with English as the default language, but also with support for Greek. Setting the polutoniko attribute enables the support for multiple accents. Modern Greek does not use those, but ancient Greek does.

Now one can include a Greek quotation like this:

	\begin{quotation}
	\selectlanguage{polutonikogreek}
	>akr~atos diqogwmon'ew p'anteqnos anafor`es pr`os ~>wrai >'wra.
        \end{quotation}
	
Note the use of > for spiritus lenis, < for spiritus asper, and `, ' and ~ for the regular accents. The correspondence between our own alphabet and the Greek, as used by LaTeX, is quite straightforward. The easiest way to get an overview of the correspondence between your keyboard and the Greek letters is to just print off the alphabet:
	\selectlanguage{polutonikogreek}
	abcdefghijklmnopqrstuvwxyz
	ABCDEFGHIJKLMNOPQRSTUVWXYZ
	


The above question was answered by Yuri Robbers, a member of the editorial board of this journal. He can be reached at

tpjlogo


Page generated June 9, 2010 ;

TUG home page; webmaster; facebook; twitter; mastodon;   (via DuckDuckGo)