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?

  • Did you mean that the former enhances readability? – giordano Feb 19 '16 at 15:36
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, privacy policy and cookie policy

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