willisb@unk.edu writes:
> 1. tex handles strings ungracefully:
>
> (C2) tex("a+b");
> $$&a+b$$
>
> Here is a version of tex-atom that (I think) does a better
> job with strings
>
> (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 "\\\\'\\\\'" (string-left-trim "&" x) "\\\\'\\\\'"))
> (t (tex-stripdollar x)))) r))
I think we should try to make it more robust by wrapping the string in
\verb (or something similar) -- otherwise stuff like:
tex("B&O");
will cause LaTeX errors.
BTW, is the output from mactex supposed to LaTeX or plain TeX?