Beamer supports an appendix with optional slides which can be jumped to using navigation items. You might have all slides of the default language first, then and end slide (maybe blank) and then as an appendix all slides of the second language. You could add navigation buttons from every slide to its translated slide and vice-versa, which allows you to jump between them easily. Also if you want to have the whole presentation in the second language simply start from the first slide of the appendix.
This should also work in principle with more than two languages, but with increased complexity.
Note that you also can jump from one PDF to another one. So you could have two PDFs and add hyperlinks to the same page of the other PDF. See in the hyperref
manual the section about \href[page=..]
. The zref-abspos
package provides you with the required absolute page number. You also need to choice the correct view for the link (fullscreen).
I made the following proof-of-concept file which works fine for me. I can jump to the translated version of the current slide, both in normal and fullscreen mode. This uses two PDFs.
% presentation-en.tex
% the main file
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english,ngerman]{babel}
\usepackage{comment}
\ifdefined\GERMAN
% Exchange for German version
\includecomment{german}
\excludecomment{english}
\else
\excludecomment{german}
\includecomment{english}
\fi
\makeatletter
\makeatother
% Needs: etc.
% \setlanguage{...}
\setbeamertemplate{navigation symbols}{\langnav}
\begin{german}
\newcommand{\langnav}{%
\href[page=\value{page}]{presentation-en}{{\tiny EN}}
}
\selectlanguage{ngerman}
\end{german}
\begin{english}
\newcommand{\langnav}{%
\href[page=\value{page}]{presentation-de}{{\tiny DE}}
}
\selectlanguage{english}
\end{english}
\begin{document}
\begin{german}
\begin{frame}{Apfelbäume}
Diese Präsentation ist über Apfelbäume.
\end{frame}
\end{german}
\begin{english}
\begin{frame}{Apple trees}
This presentation is about apple trees.
\end{frame}
\end{english}
\begin{german}
\begin{frame}{Äpfel sind lecker}
Sehr sehr lecker!
\only<2>{Man kann es gar nicht glauben!}
\end{frame}
\end{german}
\begin{english}
\begin{frame}{Apples are tasty!}
So tasty!
\only<2>{Can you believe it!}
\end{frame}
\end{english}
\end{document}
% presentation-de.tex
\def\GERMAN{}
\input{presentation-en}
One other option is to invest some time in mastering any decent text editor or latex-specific editor. Either of two will certainly solve your problem with images.
Having math typed in LaTeX is the most portable solution. I find it easier to deal with math when using unicode-math.sty
in xelatex
.
Since you already know beamer I think it is your best bet. Inkscape or Libreoffice impress has a crippled and unmaintainable support for math, IMHO.
Edit:
I'm using Emacs. Its LaTeX modes AUCTeX, RefTeX are great already, but you may want to write some extra things to speed-up workflow.
Drag and drop images
One can use ido-completion-read
to insert images. For this it is convenient to keep images in a separate folder. Here's an example TeX-doc tree:
doc/
├── img/
└── slides.tex
The following defun lets one choose an image with ido-completion:
(defun tex-image-from-./img (image)
"You are editing a TeX file. The images are in the ./img folder.
Call this defun to select the one to insert. Default image width is
0.45\\columnwidth. You can provide the width with C-u arg."
(interactive
(list
(replace-regexp-in-string
"^.+/img" "img"
(ido-read-file-name "Image file: " "./img"))))
(let (
scale
)
(if current-prefix-arg
(setq scale current-prefix-arg)
(setq scale "0.45"))
(insert (format
"\\includegraphics[width=%s\\columnwidth]{%s}"
scale image))))
This is a simple defun which might be further tweaked to match the desired behaviour.
For example one can easily write a defun which will ask for two images, and place them in columns.
As to an exact drag-and-drop behaviour -- one might use it to copy image to the ./img
folder. For example evince
allows one to drag-and-drop given raster image from a pdf file to file manager.
This has an additional benefit of keeping things organized: having all images in the latex doc folder will come handy when you set up to write a book.
Templates
For examples the following defun insert template for a slide:
(defun tex-insert-beamer-slide-template ()
(interactive)
(insert "\\frame{
\\frametitle{}\n\n}")
(search-backward "frametitle{}")
(forward-char 11))
This is just a basic defun, but arbitly complex scripts are not far away.
One can easily template math inputs (for example system of equations template) or whatever. Templates allow to reduce the tex-code to be typed (and looked-up), and thus speed-up workflow.
Custom build script
In order to speed up the workflow one should really build LaTeX doc with a single command. latexmk
might be fine, but personally I prefer a simple bash script. You can make a complex bash script for all cases or a single bash script for each document (to be kept in the doc's folder, smth like make.bash
).
With custom build script one can easily insert svg images in LaTeX. Just make the build script convert file.svg
to file.pdf
if the former is newer then the later, or the later doesn't exist at all (enen better: one can automate the export to latex inkscape functionality to get the same fonts on the svg image as in the latex doc).
Edit 2:
Images in the Internet
If a desired image is in the internet, one can copy it's URL and give the URL to a small elisp defun which would download it in the ./img
and insert with the code similar to posted above to one's tex file. The image's URL might be copied fast with extensions Pentadactyl for Firefox or cVim for Chrome. You might also like to switch between browser and emacs with a hotkey. So three keystrokes overall: copy URL, switch to emacs, call the defun.
Best Answer
I have a mountain of beamer slides that I combine in all sorts of ways for a number of different courses and presentations that I make. Here's what I do, slightly simplified:
I use beamer templates as containers for series of slides (sometimes a series is just a single slide, sometimes it is 40 slides):
I.e. in my source I put everything in "sections" a la:
I use the sections of slides with the macro
\usesection
:I use the optional package to be allow conditional inclusion of stuff:
I include ALL stuff in a master file (
main.tex
):Now each "version" or "course" or "subset of stuff" (or whatever) is basically just a matter of defining the right options and then include
main.tex
.I realise this may seem a bit complicated at first go, but the key idea is to separate definition of some slides (
\defsection
) from the use of them (\usesection
). Once that separation is made, all sorts of reuse, different selections based on options, etc, etc, becomes quite trivial.The one thing I'm missing is an enhancement to the optional package so that I could define things like "include this section if option bar is NOT defined. As it is I need to define EITHER use-bar OR dont-use-bar to be able to trigger on both positive and negative matches.