vim-latex and the beamer LaTeX presentation class, among other vim-latexey things

the norm is to compile beamer presentations with pdflatex. this wasn’t good enough for me, since I wanted to compile using vim-latex‘s nifty \ll command, while using the .vimrc settings that I use for all other documents. (compiling via the latex, dvips, ps2pdf method.)

if you use \usepackage{lmodern} you can get around the fontsize warnings when compiling beamer class documents with latex. the page labels warning can be dealt with like so:

\documentclass[hyperref={pdfpagelabels=false},xcolor=pst,dvips]{beamer}

the hyperref part deals with the page labels. xcolor and dvips make it so that I can compile with the regular latex (as many times as necessary), dvips, ps2pdf combination. (this is also what I have vim-latex configured to in my .vimrc.)

i have the following stuff in my .vimrc:
let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi'
let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'
let g:Tex_ViewRule_pdf = 'evince'
let g:Tex_DefaultTargetFormat = 'pdf'
if has('win32')
    let g:Tex_ViewRule_dvi = 'yap'
    let g:Tex_ViewRule_pdf = 'SumatraPDF-TeX'
endif

(yes, I use the same .vimrc for vim and gvim across different Windows and Linux machines.. =D)

the dvips command used to have a -t letter argument, but we don’t want that anymore with presentations. besides, we can specify to use letter paper in the .tex file itself like: \documentclass[letterpaper]{article}.. for some reason this (more proper way) doesn’t seem to be working correctly for me, though.

on Windows I use SumatraPDF-TeX while editing LaTeX documents for its autorefresh features (and random bug fixes.) the rendering isn’t up to my standards, and I actually prefer viewing the .dvi using Yap for most documents, but this will have to do for now.

now, when you want to separate your files so that you have some sort of main.tex and 2 separate .tex files that \input{main.tex}, getting that to work with vim-latex‘s compiling is kinda weird. as with most multi-file projects, you can specify a name.tex.latexmain file that will be compiled when you \ll from another file. (see here for exact mechanics.)

so how do you edit main.tex and have \ll compile a presentation.beamer.tex (the presentation files) and a presentation.article.tex at the same time? I have no idea.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: