I started to create a custom theme for beamer slides, and I want to change the default aspect ratio for this theme. Of course I can use \documentclass[aspectratio=169]{beamer} in every document, but I'd like to keep everything in *.sty files. In beamer.cls I found definitions of \beamer@paperwidth and \beamer@paperheight, but setting these lengths in bemerthemeMYTHEME.sty as follows has no effect on the result.


What would be a proper way to change the default aspect ratio in *.sty? Shell I use beamerouterthemeMYTHEME.sty or bemerthemeMYTHEME.sty for this?

  • 1
    Themes really should not be changing the aspect ratio: the two are separate concepts. Can you explain a bit more what you are doing: it sounds like you are making a custom class based on beamer more than a theme. – Joseph Wright May 3 '13 at 10:06
  • @Papiro This is not a duplicate, IMO. Based on her/his post, zeliboba already knows how to set the aspect ratio. The question here is how to set the aspect ratio after \documentclass{...}. – jub0bs May 3 '13 at 10:10
  • I try to translate corporate PowerPoint style to beamer, they use 16:9 aspect ratio, and I do not want to keep it as an option to \documentclass. Could you please elaborate a bit more on the "concepts"? For me it is just changing the defaults, you can do it with margins, why not with paper size? – zeliboba May 3 '13 at 10:15
  • The problem is that a lot of the document settings derive from options passed to the class (such as aspectratio=169). You could probably adjust those settings after \documentclass{...} but you would probably have to rerun a lot of lines from the class file in order to get the desired result. I had a similar problem a while back: I wanted the output to look just as if I had loaded the smaller beamer class option while keeping all my tweaks in my .sty file. It turned out to be unwieldy and I ended up simply passing smaller as an option to the class: \documentclass[smaller]{beamer}. – jub0bs May 3 '13 at 10:28
  • So you can do two things: 1) simply pass the class option in the \documentclass{...} command; 2) as Joseph Wright suggested, modify the beamer class file to create your own, which would set the aspect ratio to a different value by default. – jub0bs May 3 '13 at 10:38

A wrapper class beamer16x9.cls can be easily written:


Then starting a document with


is equivalent to saying


The beamer16x9.cls file should be in one of the canonical places where TeX engines look for input.

  • That's great; much easier than my approach (I'll delete it). However, the difference between typing \documentclass[<options>]{beamer16x9} and typing \documentclass[aspectratio=169,<options>]{beamer} is marginal. I would personally just resign myself to doing the latter. – jub0bs May 3 '13 at 11:05
  • @Jubobs With a custom class you might also make other changes, for example the theme-like stuff the OP asked about. – Joseph Wright May 3 '13 at 11:15
  • Perfect! I was looking for something like this, thanks. – zeliboba May 3 '13 at 12:41
  • Note: this topic may be useful to understand the details of class loading tex.stackexchange.com/questions/9908/… – zeliboba May 3 '13 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.