3

I have a problem with AUCTeX loading the correct hooks with a Beamer file.

If my file contains line breaks in the documentclass line, the style hooks are not loaded. (Thus I have no frames in my AUCTeX environments, and other commands are also unavailable.) For instance:

\documentclass[14pt,
  handout, % no transitions
  xcolor=svgnames]
  {beamer}

But if there are indeed no breaks, the style hooks are correctly loaded. For instance:

\documentclass[handout,xcolor=svgnames]{beamer}

Note that both ways are correct in LaTeX, but the first one enhances readability.

Is there a way to fix this?

1
  • Did you mean that the former enhances readability?
    – giordano
    Feb 19, 2016 at 15:36

1 Answer 1

3

The regexp matching \documentclass commands is contained in LaTeX-auto-minimal-regexp-list. It does accept breaks withing optional arguments, but it expects the closing square bracket be followed by the opening curly bracket. You can either write

\documentclass[14pt,
  handout, % no transitions
  xcolor=svgnames
  ]{beamer}

in your document or change the regexp in order to accept a newline after the closing square bracket. I think the former is easier to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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