TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to specify fragile mode as default for all frames? Now I know how to define a fragile frame: \begin{frame}[fragile].

share|improve this question
up vote 19 down vote accepted

You could define your own frame environment like it is explained in the user manual p.62, e.g.:


The environment option does the trick. It tells beamer that the frame ends with an \end{xframe} now.

Note that the frame has a complex set of optional arguments, including two < > and to optional(!) braced arguments for the frame title and sub-title. Not all of these arguments might be supported by the above code. You might write it better as:


which should support both optional title and sub-title arguments. You also can define the frame title using an explicit \frametitle command.

Another, more complex alternative is to use the xparse package to define xframe with the same arguments of frame and pass it along.

share|improve this answer
Is there a way to set fragile as default for frame, instead of creating xframe? – Alvaro Carril Dec 3 '15 at 19:27
@Majoko: I'm not aware of one. – Martin Scharrer Dec 5 '15 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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