Emacs AucTeX - Folding natbib Citations

1

In the Emacs AucTex environment, there exists a fold mode, which allows to hide much of the LaTeX markup to focus on the content.

I am using natbib citations, i.e. instead of \cite{key} citations I also have \citep{key} (and \citep{key1,key2}) citations in my document.

Unfortunately, AucTeX folds only the \cite{key} citations but leaves all \citep{key} citations untouched.

What do I have to do, to have also these natbib citations being folded in AucTeX?

Christian Herenz

Posted 2015-05-13T16:02:10.743

Reputation: 366

Answers

3

I just wondered about this myself and found your post unanswered so had to look a bit further. I assume you've resolved the issue by now but perhaps my answer will help others in the future.

I run Emacs 24.5.1 and AUCTex 11.88.

The AUCTex folding customization can be found under Options(menu)->Customize Emacs(menu)->Browse Customization Groups(menu) Then in the buffer that appears, follow the following branches from Group Emacs: Text -> Tex -> AUCTex -> Tex Fold and click Option where it lists Tex Fold Macro Spec List.

There you will find a list of the wrappers that fold into [c], currently probably only containing "cite". Add the natbib citations structures, I also added the Harvard ones.

SimonDS

Posted 2015-05-13T16:02:10.743

Reputation: 46

No, I haven't solved the issue by now. If so, I would have posted my own answer here. Thanks - you're answer indeed solves the problem. – Christian Herenz – 2015-09-14T15:29:33.327