summaryrefslogtreecommitdiff
path: root/itches/emacs/language-support.org
diff options
context:
space:
mode:
Diffstat (limited to 'itches/emacs/language-support.org')
-rw-r--r--itches/emacs/language-support.org29
1 files changed, 29 insertions, 0 deletions
diff --git a/itches/emacs/language-support.org b/itches/emacs/language-support.org
index 8d007d3..76f1f5e 100644
--- a/itches/emacs/language-support.org
+++ b/itches/emacs/language-support.org
@@ -57,3 +57,32 @@ of overwriting when pressing $ again.
**** pressing ="= on active region does not surround it with quotes even with electric-pair-mode
TeX-insert-quote erases the region and inserts =``= instead.
**** pressing =$= inserts a single $
+*** =catcode`$= starts a math environment
+Minimal example:
+
+#+BEGIN_SRC latex
+\documentclass{article}
+
+\usepackage{fancyvrb}
+\usepackage{listings}
+\usepackage{xcolor}
+
+\lstset{
+ fancyvrb=true
+}
+
+\begin{document}
+
+\begin{Verbatim}[
+ commandchars=\\\{\},
+ codes={\catcode`$=3},
+ formatcom={\lstset{fancyvrb=false}}
+]
+Things increased: \textcolor{red}{+32.05%} (189818 $\nearrow$ 250657)
+Things decreased: \textcolor{green}{-49.22%} (514 $\searrow$ 261)
+\end{Verbatim}
+
+\end{document}
+#+END_SRC
+
+Can workaround it with =\catcode36= instead of =\catcode`$=.