Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newcommand{cA}{mathcal A}
- newcommand{cB}{mathcal B}
- newcommand{cC}{mathcal C}
- ...
- ...
- newcommand{cY}{mathcal Y}
- newcommand{cZ}{mathcal Z}
- A
- B
- C
- D
- .
- .
- .
- Y
- Z
- (loop
- for n from (string-to-char "A") to (string-to-char "Z")
- for c = (char-to-string n)
- do (insert (concat "\newcommand{\c" c "}{\mathcal " c "}n")))
- (loop
- for n from (string-to-char "A") to (string-to-char "Z")
- for c = (char-to-string n)
- do (insert (concat "\newcommand{\c" c "}{\mathcal " c "}n")))
- (loop
- for n from (string-to-char "A") to (string-to-char "Z")
- for c = (char-to-string n)
- do (insert (concat "\newcommand{\c" c "}{\mathcal " c "}n")))
- perl -e"print map {q(newcommand{c).$_.q(}{mathcal ).qq($_}n)} A..Z
- (loop
- for n from (string-to-char "A") to (string-to-char "Z")
- for c = (char-to-string n)
- do (insert (concat "\newcommand{\c" c "}{\mathcal " c "}n")))
- (loop for n from ?A to ?Z
- do (insert (format "\newcommand{\c%s}{\mathcal %s}n" n n)))
- (defun my-append (str)
- "Substitute A-Z in STR and insert into current buffer.
- Looks for '--HERE--' (without quotes) in string STR, substitutes the
- letters A-Z in the string and then inserts the resulting string into
- the current buffer."
- (interactive "sInput String: ")
- (let ((lcv 0)
- letter newstr)
- (while (< lcv 26)
- (setq letter (+ ?A lcv))
- (insert (replace-regexp-in-string "--HERE--" (char-to-string letter) str t t) "n")
- (setq lcv (+ lcv 1)))))
- (defun somefun(inputval)
- (interactive "sInputVal: ")
- (insert ( format "\newcommand{\c%s}{\mathcal %s}" inputval inputval) )
- )
Add Comment
Please, Sign In to add comment