[Tex/LaTex] Presentations that don’t take up too much time to create

beamergraphicslyxpresentationstexmacs

I am teaching a course in the upcoming semester and am trying to settle on a way to prepare presentations as rapidly as possible.

I have used LaTeX beamer for years, and have even contributed some themes to it. I love using LaTeX in various contexts.

However, the situation I am in is a little peculiar and I would be glad of some advice:

  1. I am writing a textbook that will be based partially on the contents of this course. For this purpose, I was hoping to keep as much of the math (and there is going to be a non-trivial amount) in a reusable form as possible.

  2. My presentations make heavy use of drag and drop of images from various sources (of course with proper attributions). Any workflow involving saving an image and then using it in an \includegraphics block is a non-starter. Just too much of typing and clicking overhead involved and my presentations for this class are very likely to be extremely graphics heavy (some self-created using TikZ, and the rest borrowed as above).

  3. TeXmacs is useless on Mac for this purpose as its drag and drop support, despite patches, is non-existent because they have chosen to go with Qt for obvious reasons. It may have been the perfect solution for me otherwise.

  4. I am not sure if LyX is a good option for me. They have cut and paste, but no drag and drop as far as I can tell. Plus, I will not be writing the book in LyX. I find it … stifling … When I last used LyX many years ago, and I did not use it much, I found its LaTeX export to be a mess.

  5. I have so far been using a combination of Keynote and LaTeXIt to typeset the math. Problem is – that does not use the full power of beamer as overlays are absent. This course will involve some long derivations of expressions, where "playing striptease with my audience" will not be a bad idea. The alternative is to typeset separate equation objects and use Keynote's own transitions to create the effect. A little painful (I used it in a course I previously taught, which was far less math intensive).

  6. Typing it up in full on LaTeX has a huge markup overhead (compared to writing an article or a book). I have been looking into orgmode and multimarkdown, but I would rather not learn those unless I am certain that they check all the boxes (and I do not think they help me with drag and drop). In every single one of my past experiences, LaTeX/beamer has taken longer to work with than Keynote (the reverse is true for longer text dominated documents for LaTeX vis a vis MS Word).

An ideal solution would involve using beamer in some reduced fashion (I have newcommands etc. defined that could make frame definitions a little less painful to type in) but also involve drag and drop support. That is a contradiction in terms if one sticks to classical LaTeX.

A close approach to the solution of this problem is possible if LaTeXIt could harness the power of beamer and do overlays (internally of course, as I doubt they would allow overlays that are timed to occur with external Keynote transitions – like showing an image or hiding it, etc.).

Any suggestions that help resolve this somewhat rambling set of requirements would be welcome.

Best Answer

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.