[LaTeX] Reindent

master
Jacopo De Simoi 7 years ago
parent bc74406339
commit 53287c2084
  1. 11
      global.org

@ -1082,13 +1082,14 @@
#+END_SRC
This inserts a char adding some whitespace padding whenever necessary
#+BEGIN_SRC emacs-lisp
(defun insert-char-with-padding (arg)
(defun insert-char-with-padding (arg)
(interactive "*P")
(if (string= (string (preceding-char)) " ") ()
(if (string= (string (preceding-char)) "\&") () (insert " ")))
(unless (string-match (string (preceding-char)) " \&")
(insert " "))
(self-insert-command (prefix-numeric-value arg))
(if (string= (string (following-char)) " ") () (insert " ")) ;; decide what to do with the point
)
(unless (char-equal (following-char) ?\s)
(insert " "))) ;; decide what to do with the point
#+END_SRC
#+END_SRC
This inserts a plain reference (or a reference to an equation with
prefix arg)

Loading…
Cancel
Save