mostly mactex



Jesper's \verb idea is much better mine. With

(defun tex-atom (x l r) ;; atoms: note: can we lose by leaving out {}s ?
  (append l
        (list (cond ((numberp x) (texnumformat x))
                  ((and (symbolp x) (get x 'texword)))
                  ((mstringp x)
                   (concatenate
                  'string "\\verb#" (string-left-trim "&" x) "#"))
                  (t (tex-stripdollar x)))) r))

you get
(c1) tex("b&o");
$$\verb#b&o#$$

and with

(defun tex-atom (x l r) ;; atoms: note: can we lose by leaving out {}s ?
  (append l
        (list (cond ((numberp x) (texnumformat x))
                  ((and (symbolp x) (get x 'texword)))
                  ((mstringp x)
                   (concatenate
                  'string "\\verb#\"" (string-left-trim "&" x) "\"#"))
                  (t (tex-stripdollar x)))) r))

you get

(c2)  tex("b&o");

$$\verb#"b&o"#$$

Barton