Post

Elisp to generate a list of macros in latex

In emacs, 计算机与 Internet, latex, softwares on November 12, 2011 by hoxide Tagged:

I just write following code in emacs to generate a list of macros in latex:

(mapcar '(lambda (x) (insert (format "\n\\def\\s%s{\\mathscr{%s}}"
                                (string x) (string x))))
                                (concatenate 'list
                                 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))

Now press C-x C-E, it will insert following latex codes.

\def\sA{\mathscr{A}}
….
\def\sZ{\mathscr{Z}}

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.