[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Font changing commands messed up after listings containing $

From: Tassilo Horn
Subject: [AUCTeX] Font changing commands messed up after listings containing $
Date: Fri, 10 Jul 2009 17:12:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi all,

in a document I have several listings like this one:

--8<---------------cut here---------------start------------->8---
\begin{lstlisting}[language=gretl, label={lst:example-ec}, caption={Example:
Creation of a new \textsf{EdgeClass} and instances thereof}]
createEdgeClass("uml.IsA", umlClass, umlClass,
    "from c : keySet(img_uml$Class), c2 : keySet(img_uml$Class) "
  + "with c (<--{IsSuperClassOf} | <--{IsInterfaceOfClass})     "
  + "        <--{IsTypeDefinitionOf} c2                         "
  + "reportSet c, c2 end",

    "from t : $                       "
  + "reportMap t, nthElement(t, 0) end",

    "from t : $$                      "
  + "reportMap t, nthElement(t, 1) end");
--8<---------------cut here---------------end--------------->8---

Before that listing `C-c C-f C-f' inserts \textsf{}, but after that
listing the same key inserts \mathsf{}, because it thinks I was in a
math environment.

How do I teach auctex to ignore any dollars in lstlisting environments?

I'm using auctex version 11.85.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]