emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/latex-table-wizard bb01371e2a 35/70: Bump to version 1.


From: ELPA Syncer
Subject: [elpa] externals/latex-table-wizard bb01371e2a 35/70: Bump to version 1.0.0
Date: Sat, 13 May 2023 08:59:12 -0400 (EDT)

branch: externals/latex-table-wizard
commit bb01371e2a3079d7e535e3a980ee17ac2b448a4f
Author: Enrico Flor <nericoflor@gmail.com>
Commit: Enrico Flor <nericoflor@gmail.com>

    Bump to version 1.0.0
    
    + Add info file
    + Make all customization accessible through Customize
    + Change, expand and simplify set of interactive commands
---
 latex-table-wizard.el  | 491 +++++++++++++++++++++++++++++++++----------------
 latex-table-wizard.org | 395 ++++++++++++++++++++++++---------------
 scratch-latex.info     |  29 +++
 3 files changed, 608 insertions(+), 307 deletions(-)

diff --git a/latex-table-wizard.el b/latex-table-wizard.el
index 76b8460252..57a62d6c80 100644
--- a/latex-table-wizard.el
+++ b/latex-table-wizard.el
@@ -5,7 +5,8 @@
 ;; Author: Enrico Flor <enrico@eflor.net>
 ;; Maintainer: Enrico Flor <enrico@eflor.net>
 ;; URL: https://github.com/enricoflor/latex-table-wizard
-;; Version: 0.3.0
+;; Version: 1.0.0
+;; Keywords: convenience
 
 ;; Package-Requires: ((emacs "27.1") (auctex "12.1") (transient "0.3.7"))
 
@@ -57,14 +58,9 @@
 
 ;; The keybinding set by default in the transient prefix are inspired
 ;; to some extent by Emacs defaults.  If you want to change these
-;; keybindings or change the layout of the transient interface in any
-;; way you should redefine the transient prefix in your configuration
-;; (or define a new one with another name), by taking inspiration from
-;; the one defined in this file (the macro that does that is called
-;; transient-define-prefix).  Check out the documentation transient.el
-;; and
-;;
-;;   M-x describe-function transient-define-prefix
+;; keybindings you should change the value of the variable
+;; latex-table-wizard-transient-keys.  See the info page for
+;; explanations.
 
 ;; By default, the syntax this package expects is the one of standards
 ;; LaTeX tabular environments, whereby "&" separates columns and "\\"
@@ -86,7 +82,7 @@
 ;;  '("mytable" . (:col '("\\COL") :row '("\\ROW") :lines '("myhline")))
 
 ;; Each value is a list of strings to allow for more than one macro to
-;; have the same function.
+;; have the same function.  See the info page for explanations.
 
 ;;; Code:
 
@@ -196,7 +192,7 @@ A macro is escaped if it is preceded by a single 
\\='\\\\='."
           (when (eq (logand len 1) 0) t))))))
 
 ;; Every time latex-table-wizard--parse-table is evaluated, the values
-;; of the variables below is set:
+;; of the variables below are set:
 (defvar latex-table-wizard--current-col-delims nil)
 (defvar latex-table-wizard--current-row-delims nil)
 (defvar latex-table-wizard--current-hline-macros nil)
@@ -251,13 +247,6 @@ If NAME is nil, skip any LaTeX macro that point is looking 
at."
       (when (looking-at macro-re)
         (match-end 0)))))
 
-(defsubst latex-table-wizard--disjoin (str-list &optional sep)
-  "Concatenate strings in STR-LIST with separator SEP.
-
-If SEP is nil, the separator used is \"\\\\|\""
-  (let ((separator (or sep "\\|")))
-    (mapconcat #'identity str-list separator)))
-
 (defun latex-table-wizard--skip-stuff (limit)
   "Skip comments, blank space and hline macros.
 
@@ -276,7 +265,7 @@ Stop the skipping at LIMIT (a buffer position or a marker)."
             (setq new-start-of-line (point))
             (when (looking-at (concat
                                "[[:space:]]*"
-                               (latex-table-wizard--disjoin
+                               (string-join
                                 latex-table-wizard--current-col-delims)))
               (throw 'stop nil)))
           (ignore-errors
@@ -403,10 +392,8 @@ Each value is an integer, S and E are markers."
                     (point-marker)))
          (hash (secure-hash 'sha256
                             (buffer-substring-no-properties env-beg env-end)))
-         (col-re (latex-table-wizard--disjoin
-                  latex-table-wizard--current-col-delims))
-         (row-re (latex-table-wizard--disjoin
-                  latex-table-wizard--current-row-delims)))
+         (col-re (string-join latex-table-wizard--current-col-delims))
+         (row-re (string-join latex-table-wizard--current-row-delims)))
     (if (and (equal `(,env-beg . ,env-end) (nth 0 latex-table-wizard--parse))
              (equal hash (nth 1 latex-table-wizard--parse)))
         (nth 2 latex-table-wizard--parse)
@@ -597,7 +584,7 @@ current DIR."
     (nth land sorted)))
 
 (defun latex-table-wizard--remove-overlays (&optional table beg end)
-  "Remove table internal overlays generated by latex-table-wizard.
+  "Remove table internal overlays.
 
 These are the overlays that have a non-nil value for the name
 property \\='table-inside-ol\\='.
@@ -626,9 +613,7 @@ The overlay has a non-nil value for the name property
             ols))
     (dolist (x ols)
       (overlay-put x 'tabl-inside-ol t)
-      (overlay-put x 'face
-                   `((nil (:background ,(face-attribute 'region
-                                                        :background))))))))
+      (overlay-put x 'face 'latex-table-wizard-highlight))))
 
 (defvar-local latex-table-wizard--selection nil
   "Current selection, a list of cell objects.")
@@ -793,7 +778,7 @@ DIR is either \\='forward\\=', \\='backward\\=', 
\\='next\\=' or
 \\='previous\\='.
 TYPE is either \\='cell\\=', \\='column\\=' or \\='row\\='."
   (latex-table-wizard--remove-overlays)
-  (cond ((eq type 'cell) (latex-table-wizard-select-cell t))
+  (cond ((eq type 'cell) (latex-table-wizard-select-deselect-cell t))
         ((latex-table-wizard--or dir 'forward 'backward)
          (latex-table-wizard-select-column t))
         ((latex-table-wizard--or dir 'previous 'next)
@@ -852,62 +837,63 @@ Cycle through three modes of alignment for the text in 
the cells:
 align left, center, right and no alignment (minimize space at
 cell borders)."
   (interactive)
-  (let ((message-log-max 0)
-        (mode (car latex-table-wizard--align-status))
-        (max-col (thread-last (latex-table-wizard--parse-table)
-                              (mapcar (lambda (x) (plist-get x :column)))
-                              (delete-dups)
-                              (apply #'max))))
-    (setq latex-table-wizard--align-status
-          (append (cdr latex-table-wizard--align-status)
-                  (list (car latex-table-wizard--align-status))))
-    (save-excursion
+  (latex-table-wizard--remove-overlays)
+  (save-excursion
+    (let ((message-log-max 0)
+          (mode (car latex-table-wizard--align-status))
+          (max-col (thread-last (latex-table-wizard--parse-table)
+                                (mapcar (lambda (x) (plist-get x :column)))
+                                (delete-dups)
+                                (apply #'max))))
+      (setq latex-table-wizard--align-status
+            (append (cdr latex-table-wizard--align-status)
+                    (list (car latex-table-wizard--align-status))))
       (dolist (x (seq-filter (lambda (x) (= 0 (plist-get x :column)))
                              (latex-table-wizard--parse-table)))
         (goto-char (plist-get x :start))
         (unless (looking-back "^[[:space:]]*" (line-beginning-position))
-          (insert "\n"))))
-    (whitespace-cleanup-region (caar latex-table-wizard--parse)
-                               (cdar latex-table-wizard--parse))
-    (dolist (x (flatten-list (mapcar (lambda (x) `(,(plist-get x :start)
-                                                   ,(plist-get x :end)))
-                                     (latex-table-wizard--parse-table))))
-      (goto-char x)
-      (just-one-space))
-    (if (eq mode 'compress)
-        (message "Table compressed")
-      (let ((count 0))
-        (while (<= count max-col)
-          (let ((line (seq-filter (lambda (x) (= count (plist-get x :column)))
-                                  (latex-table-wizard--parse-table)))
-                (col-pos '()))
-            (dolist (cell line)
-              (goto-char (plist-get cell :end))
-              (push (current-column) col-pos))
-            (let ((longest (apply #'max col-pos)))
+          (insert "\n")))
+      (whitespace-cleanup-region (caar latex-table-wizard--parse)
+                                 (cdar latex-table-wizard--parse))
+      (dolist (x (flatten-list (mapcar (lambda (x) `(,(plist-get x :start)
+                                                     ,(plist-get x :end)))
+                                       (latex-table-wizard--parse-table))))
+        (goto-char x)
+        (just-one-space))
+      (if (eq mode 'compress)
+          (message "Table compressed")
+        (let ((count 0))
+          (while (<= count max-col)
+            (let ((line (seq-filter (lambda (x) (= count (plist-get x 
:column)))
+                                    (latex-table-wizard--parse-table)))
+                  (col-pos '()))
               (dolist (cell line)
                 (goto-char (plist-get cell :end))
-                (when (< (current-column) longest)
-                  (let* ((tot (- longest (current-column)))
-                         (pre (/ tot 2))
-                         (post (- tot pre)))
-                    (cond ((eq mode 'left)
-                           (insert (make-string tot
-                                                (string-to-char " ")))
-                           (message "Table content aligned left"))
-                          ((eq mode 'right)
-                           (goto-char (plist-get cell :start))
-                           (insert (make-string tot
-                                                (string-to-char " ")))
-                           (message "Table content aligned right"))
-                          ((eq mode 'center)
-                           (insert (make-string post
-                                                (string-to-char " ")))
-                           (goto-char (plist-get cell :start))
-                           (insert (make-string pre
-                                                (string-to-char " ")))
-                           (message "Table content centered"))))))))
-          (setq count (1+ count)))))))
+                (push (current-column) col-pos))
+              (let ((longest (apply #'max col-pos)))
+                (dolist (cell line)
+                  (goto-char (plist-get cell :end))
+                  (when (< (current-column) longest)
+                    (let* ((tot (- longest (current-column)))
+                           (pre (/ tot 2))
+                           (post (- tot pre)))
+                      (cond ((eq mode 'left)
+                             (insert (make-string tot
+                                                  (string-to-char " ")))
+                             (message "Table content aligned left"))
+                            ((eq mode 'right)
+                             (goto-char (plist-get cell :start))
+                             (insert (make-string tot
+                                                  (string-to-char " ")))
+                             (message "Table content aligned right"))
+                            ((eq mode 'center)
+                             (insert (make-string post
+                                                  (string-to-char " ")))
+                             (goto-char (plist-get cell :start))
+                             (insert (make-string pre
+                                                  (string-to-char " ")))
+                             (message "Table content centered"))))))))
+            (setq count (1+ count))))))))
 
 (defun latex-table-wizard-right (&optional n)
   "Move point N cells to the right.
@@ -1064,8 +1050,7 @@ TABLE is a list of cell plists.  If it is nil, evaluate
                (e (plist-get next :start)))
           (push (buffer-substring b e) kills)
           (delete-region b e)))
-      (kill-new (latex-table-wizard--disjoin
-                 (nreverse kills) "\n")))))
+      (kill-new (string-join (nreverse kills) "\n")))))
 
 (defun latex-table-wizard-insert-row ()
   "Insert empty row below the one at point."
@@ -1096,28 +1081,37 @@ TABLE is a list of cell plists.  If it is nil, evaluate
                  (latex-table-wizard--get-thing 'row table))))
       (kill-region (car b-e) (cdr b-e)))))
 
-(defun latex-table-wizard-select-cell (&optional no-message)
-  "Add cell at point to selection for swapping.
-
-If NO-MESSAGE is non-nil, do not print anything in the echo area."
-  (interactive)
-  (latex-table-wizard--select-thing 'cell no-message))
+(defun latex-table-wizard--echo-selection ()
+  "Print status of selection in the echo area."
+  (let ((sel (latex-table-wizard--sort latex-table-wizard--selection
+                                       nil 'forward))
+        (message-log-max 0))
+    (if (not sel)
+        (message "Nothing is selected")
+      (let ((str (mapcar (lambda (x) (format "(%d,%d)"
+                                             (plist-get x :column)
+                                             (plist-get x :row)))
+                         sel)))
+        (message "Current selection: %s"
+                 (string-join str ", "))))))
 
 (defun latex-table-wizard-select-row (&optional no-message)
   "Add row at point to selection for swapping.
 
 If NO-MESSAGE is non-nil, do not print anything in the echo area."
   (interactive)
-  (latex-table-wizard--select-thing 'row no-message))
+  (latex-table-wizard--select-thing 'row no-message)
+  (latex-table-wizard--echo-selection))
 
 (defun latex-table-wizard-select-column (&optional no-message)
   "Add column at point to selection for swapping.
 
 If NO-MESSAGE is non-nil, do not print anything in the echo area."
   (interactive)
-  (latex-table-wizard--select-thing 'column no-message))
+  (latex-table-wizard--select-thing 'column no-message)
+  (latex-table-wizard--echo-selection))
 
-(defun latex-table-wizard-deselect-cell ()
+(defun latex-table-wizard--deselect-cell ()
   "Remove cell at point from selection for swapping."
   (interactive)
   (let* ((table (latex-table-wizard--parse-table))
@@ -1130,17 +1124,24 @@ If NO-MESSAGE is non-nil, do not print anything in the 
echo area."
     (setq latex-table-wizard--selection
           (remove curr-cell latex-table-wizard--selection))))
 
-(defun latex-table-wizard-deselect-row ()
-  "Remove row at point from selection for swapping."
-  (interactive)
-  (latex-table-wizard--remove-overlays)
-  (setq latex-table-wizard--selection nil))
+(defun latex-table-wizard-select-deselect-cell (&optional no-message)
+  "Add or remove cell at point to selection for swapping.
 
-(defun latex-table-wizard-deselect-column ()
-  "Remove column at point from selection for swapping."
+If NO-MESSAGE is non-nil, do not print anything in the echo area."
+  (interactive)
+  (let* ((table (latex-table-wizard--parse-table))
+         (curr (latex-table-wizard--get-thing 'cell table)))
+    (if (member curr latex-table-wizard--selection)
+        (latex-table-wizard--deselect-cell)
+      (latex-table-wizard--select-thing 'cell no-message)))
+  (latex-table-wizard--echo-selection))
+
+(defun latex-table-wizard-deselect-all ()
+  "Remove all selected cells from selection."
   (interactive)
   (latex-table-wizard--remove-overlays)
-  (setq latex-table-wizard--selection nil))
+  (setq latex-table-wizard--selection nil)
+  (latex-table-wizard--echo-selection))
 
 (defun latex-table-wizard-swap ()
   "Swap selection and thing at point.
@@ -1171,73 +1172,242 @@ at point.  If it is none of those object, return nil."
 
 ;;; Transient
 
-(transient-define-prefix latex-table-wizard-prefix ()
-  [:description
-   "      LaTeX table wizard"
-   [("f" "move right" latex-table-wizard-right :transient t)
-    ("b" "move left" latex-table-wizard-left :transient t)
-    ("p" "move down" latex-table-wizard-up :transient t)
-    ("n" "move up" latex-table-wizard-down :transient t)
-    ""
-    ("F" "end of row" latex-table-wizard-end-of-row :transient t)
-    ("B" "beginning of row" latex-table-wizard-beginning-of-row :transient t)
-    ("P" "top" latex-table-wizard-top :transient t)
-    ("N" "bottom" latex-table-wizard-bottom :transient t)
-    ""
-    ("a" "beginning of cell" latex-table-wizard-beginning-of-cell :transient t)
-    ("e" "end of cell" latex-table-wizard-end-of-cell :transient t)
-    ("m c" "mark cell" latex-table-wizard-mark-cell :transient t)
-    ("x" "exchange point and mark" exchange-point-and-mark :transient t)]
-   [("C-f" "swap cell right" latex-table-wizard-swap-cell-right :transient t)
-    ("C-b" "swap cell left" latex-table-wizard-swap-cell-left :transient t)
-    ("C-p" "swap cell up" latex-table-wizard-swap-cell-up :transient t)
-    ("C-n" "swap cell down" latex-table-wizard-swap-cell-down :transient t)
-    ""
-    ("M-f" "swap column right" latex-table-wizard-swap-column-right :transient 
t)
-    ("M-b" "swap column left" latex-table-wizard-swap-column-left :transient t)
-    ("M-p" "swap row up" latex-table-wizard-swap-row-up :transient t)
-    ("M-n" "swap row down" latex-table-wizard-swap-row-down :transient t)
-    ""
-    ("TAB" "cycle alignment" latex-table-wizard-align :transient t)
-    ("/" "undo" undo :transient t)
-    ("u" "universal argument" universal-argument :transient t)
-    ("RET" "done" transient-quit-one)]
-   [("SPC" "select cell" latex-table-wizard-select-cell :transient t)
-    ("c" "select column" latex-table-wizard-select-column :transient t)
-    ("r" "select row" latex-table-wizard-select-row :transient t)
-    ("d SPC" "deselect cell" latex-table-wizard-deselect-cell :transient t)
-    ("d c" "select column" latex-table-wizard-deselect-column :transient t)
-    ("d r" "select row" latex-table-wizard-deselect-row :transient t)
-    ""
-    ("s" "swap selection" latex-table-wizard-swap :transient t)
-    ""
-    ("i c" "insert column right" latex-table-wizard-insert-column :transient t)
-    ("i r" "insert row below" latex-table-wizard-insert-row :transient t)
-    ("k c" "kill current column" latex-table-wizard-kill-column :transient t)
-    ("k r" "kill current row" latex-table-wizard-kill-row :transient t)]])
+(defconst latex-table-wizard-default-keys
+  '((toggle-truncate-lines                   "t" "toggle truncate-lines")
+    (latex-table-wizard-kill-row             "k r" "kill current row")
+    (latex-table-wizard-kill-column          "k c" "kill current column")
+    (latex-table-wizard-insert-row           "i r" "insert row below")
+    (latex-table-wizard-insert-column        "i c" "insert column right")
+    (latex-table-wizard-swap                 "s" "swap selection")
+    (latex-table-wizard-deselect-all         "d" "deselect all")
+    (latex-table-wizard-select-row           "r" "select row")
+    (latex-table-wizard-select-column        "c" "select column")
+    (latex-table-wizard-select-deselect-cell "SPC" "select/deselect cell")
+    (transient-quit-all                      "RET" "done")
+    (universal-argument                      "u" "universal argument")
+    (undo                                    "/" "undo")
+    (latex-table-wizard-align                "TAB" "cycle alignment")
+    (latex-table-wizard-swap-row-down        "M-n" "swap row down")
+    (latex-table-wizard-swap-row-up          "M-p" "swap row up")
+    (latex-table-wizard-swap-column-left     "M-b" "swap column left")
+    (latex-table-wizard-swap-column-right    "M-f" "swap column right")
+    (latex-table-wizard-swap-cell-down       "C-n" "swap cell down")
+    (latex-table-wizard-swap-cell-up         "C-p" "swap cell up")
+    (latex-table-wizard-swap-cell-left       "C-b" "swap cell left")
+    (latex-table-wizard-swap-cell-right      "C-f" "swap cell right")
+    (exchange-point-and-mark                 "x" "exchange point and mark")
+    (latex-table-wizard-mark-cell            "m c" "mark cell")
+    (latex-table-wizard-end-of-cell          "e" "end of cell")
+    (latex-table-wizard-beginning-of-cell    "a" "beginning of cell")
+    (latex-table-wizard-bottom               "N" "bottom")
+    (latex-table-wizard-top                  "P" "top")
+    (latex-table-wizard-beginning-of-row     "B" "beginning of row")
+    (latex-table-wizard-end-of-row           "F" "end of row")
+    (latex-table-wizard-down                 "n" "move up")
+    (latex-table-wizard-up                   "p" "move down")
+    (latex-table-wizard-left                 "b" "move left")
+    (latex-table-wizard-right                "f" "move right"))
+  "Default values for constructing `latex-table-wizard-prefix'.
+
+Each member of this list is a list of the form
+
+    (C K D)
+
+where C is the name of a command, K is a key description
+string (in the syntax of `kbd'), and D is a string that acts as
+description of the command.
+
+See Info node `(transient) Suffix Specifications' for more
+information.")
+
+(defcustom latex-table-wizard-transient-keys
+  (mapcar (lambda (x) (cons (nth 0 x) (nth 1 x)))
+          latex-table-wizard-default-keys)
+  "Alist mapping command symbols to key description strings.
+
+Each time the value of this variable is changed, a new transient
+prefix `latex-table-wizard-prefix' is defined, based on the
+values stored here.
+
+Each cons cell in this alist has the form (C . K), where C is the
+name of a command and C is a key description string (in the
+syntax of `kbd').  These, together with the description strings
+in `latex-table-wizard-default-keys', determine what the
+transient prefix will look like.
+
+The transient prefix will only have suffixes for the commands
+that are mapped to a key in this alist.  As usual with alists,
+you can just shadow default values by adding a new mapping to the
+top of the list, but be sure that no key ends up bound to more
+than one command, otherwise you will experience loss of
+functionality of the transient interface.
+
+A safer way would be to replace the default values you don't like
+with other.
+
+See Info node `(transient) Suffix Specifications' for more
+information about how transient suffixes are defined (that is,
+how the data stored in this variable and in
+`latex-table-wizard-default-keys' contributes to the definition
+of the transient prefix)."
+  :type '(alist :key-type
+                (symbol :tag "Command:"
+                        :options (toggle-truncate-lines
+                                  exchange-point-and-mark
+                                  universal-argument
+                                  transient-quit-all
+                                  undo
+                                  latex-table-wizard-right
+                                  latex-table-wizard-right
+                                  latex-table-wizard-left
+                                  latex-table-wizard-up
+                                  latex-table-wizard-down
+                                  latex-table-wizard-end-of-row
+                                  latex-table-wizard-beginning-of-row
+                                  latex-table-wizard-top
+                                  latex-table-wizard-bottom
+                                  latex-table-wizard-beginning-of-cell
+                                  latex-table-wizard-end-of-cell
+                                  latex-table-wizard-mark-cell
+                                  latex-table-wizard-swap-cell-right
+                                  latex-table-wizard-swap-cell-left
+                                  latex-table-wizard-swap-cell-up
+                                  latex-table-wizard-swap-cell-down
+                                  latex-table-wizard-swap-column-right
+                                  latex-table-wizard-swap-column-left
+                                  latex-table-wizard-swap-row-up
+                                  latex-table-wizard-swap-row-down
+                                  latex-table-wizard-align
+                                  latex-table-wizard-select-column
+                                  latex-table-wizard-select-row
+                                  latex-table-wizard-select-deselect-cell
+                                  latex-table-wizard-deselect-all
+                                  latex-table-wizard-swap
+                                  latex-table-wizard-insert-column
+                                  latex-table-wizard-insert-row
+                                  latex-table-wizard-kill-column
+                                  latex-table-wizard-kill-row))
+                :value-type string)
+  :group 'latex-table-wizard)
+
+(defun latex-table-wizard--make-suffix (symbol)
+  "Return a transient suffix for command SYMBOL.
+
+Retrieve the value of the description string from
+`latex-table-wizard-default-keys', and the value of the key
+description string from `latex-table-wizard-transient-keys'.
+
+See Info node `(transient) Suffix Specifications' for more
+information."
+  (let ((descr (nth 2 (assq symbol latex-table-wizard-default-keys)))
+        (custom-key (cdr (assq symbol latex-table-wizard-transient-keys))))
+    (when custom-key
+      `(,custom-key ,descr ,symbol :transient t))))
+
+(defun latex-table-wizard--make-prefix ()
+  "Redefine transient prefix `latex-table-wizard-prefix'.
+
+This is done through the macro `transient-define-prefix' with the
+suffixes provided by evaluating `latex-table-wizard--make-suffix'."
+  (eval
+   `(transient-define-prefix latex-table-wizard-prefix ()
+      [:description
+       "      LaTeX table wizard"
+       [,(latex-table-wizard--make-suffix 'latex-table-wizard-right)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-left)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-up)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-down)
+        ,(latex-table-wizard--make-suffix 'universal-argument)
+        ""
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-end-of-row)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-beginning-of-row)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-top)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-bottom)
+        ,(latex-table-wizard--make-suffix 
'latex-table-wizard-beginning-of-cell)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-end-of-cell)]
+       [,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-cell-right)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-cell-left)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-cell-up)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-cell-down)
+        ,(latex-table-wizard--make-suffix 
'latex-table-wizard-swap-column-right)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-column-left)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-row-up)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap-row-down)
+        ""
+        ,(latex-table-wizard--make-suffix 'toggle-truncate-lines)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-align)
+        ,(latex-table-wizard--make-suffix 'undo)
+        ,(latex-table-wizard--make-suffix 'transient-quit-all)]
+       [,(latex-table-wizard--make-suffix 
'latex-table-wizard-select-deselect-cell)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-select-column)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-select-row)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-deselect-all)
+        ""
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-swap)
+        ""
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-insert-column)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-insert-row)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-kill-column)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-kill-row)
+        ,(latex-table-wizard--make-suffix 'latex-table-wizard-mark-cell)
+        ,(latex-table-wizard--make-suffix 'exchange-point-and-mark)]])))
 
 ;;; Aesthetics
 
+(defcustom latex-table-wizard-no-highlight nil
+  "Whether or not current or selected cells are highlighted."
+  :type 'boolean
+  :group 'latex-table-wizard)
+
+(defcustom latex-table-wizard-no-focus nil
+  "Whether or not the outside of the table is greyed out.
+
+If this is nil, upon calling `latex-table-wizard' the face
+`latex-table-wizard-background' is applied on the portions of the
+buffer before and after the table-like environment.  By default,
+this means they are greyed out, but you can set the value of
+`latex-table-wizard-background' to whatever face you prefer.
+
+See Info node `(emacs) Face Customization' for more information."
+  :type 'boolean
+  :group 'latex-table-wizard)
+
 (defgroup latex-table-wizard-faces nil
-  "Faces used by latex-table-wizard."
+  "Faces used by \\='latex-table-wizard\\='."
   :group 'latex-table-wizard
   :group 'faces)
 
 (defface latex-table-wizard-background
-  '((t (:foreground "gray40")))
-  "Face for hiding non-table buffer content."
+  '((nil (:foreground "gray40")))
+  "Face for hiding non-table buffer content.
+
+See Info node `(emacs) Face Customization' for more information
+about customizing faces and `list-faces-display' for a list of
+all defined faces."
+  :group 'latex-table-wizard)
+
+(defface latex-table-wizard-highlight
+  '((nil :inherit region))
+  "Face for highlighting current or selected cells.
+
+See Info node `(emacs) Face Customization' for more information
+about customizing faces and `list-faces-display' for a list of
+all defined faces."
   :group 'latex-table-wizard)
 
 (defun latex-table-wizard--hide-rest ()
-  "Grey out parts of buffer outside of table at point."
-  (latex-table-wizard--parse-table)
-  (let* ((tab-b (car (car latex-table-wizard--parse)))
-         (tab-e (cdr (car latex-table-wizard--parse)))
-         (ols `(,(make-overlay (point-min) tab-b)
-                ,(make-overlay tab-e (point-max)))))
-    (dolist (x ols)
-      (overlay-put x 'tabl-outside-ol t)
-      (overlay-put x 'face 'latex-table-wizard-background))))
+  "Apply foreground on parts of buffer outside of table at point.
+
+Do nothing if `latex-table-wizard-foreground-color' is nil."
+  (when latex-table-wizard-foreground-color
+    (latex-table-wizard--parse-table)
+    (let* ((tab-b (car (car latex-table-wizard--parse)))
+           (tab-e (cdr (car latex-table-wizard--parse)))
+           (ols `(,(make-overlay (point-min) tab-b)
+                  ,(make-overlay tab-e (point-max)))))
+      (dolist (x ols)
+        (overlay-put x 'tabl-outside-ol t)
+        (overlay-put x 'face 'latex-table-wizard-background)))))
 
 (defun latex-table-wizard--cleanup ()
   "Remove all overlays created by \\='latex-table-wizard\\='.
@@ -1252,7 +1422,7 @@ Only remove them in current buffer."
   "If point is on column or row delimiter, move to its beginning."
   (latex-table-wizard--set-current-values)
   (when-let ((macro (latex-table-wizard--point-on-regexp-p
-                     (latex-table-wizard--disjoin
+                     (string-join
                       `(,(regexp-opt
                           (append latex-table-wizard--current-row-delims
                                   latex-table-wizard--current-col-delims))
@@ -1271,23 +1441,28 @@ Only remove them in current buffer."
   :group 'convenience
   (if latex-table-wizard-mode
       (progn
+        (latex-table-wizard--make-prefix)
         (add-hook 'before-save-hook #'latex-table-wizard--cleanup nil t)
         (add-hook 'transient-exit-hook #'latex-table-wizard--cleanup nil t))
     (remove-hook 'before-save-hook #'latex-table-wizard--cleanup t)
     (remove-hook 'transient-exit-hook #'latex-table-wizard--cleanup t)))
 
+(defalias 'latex-table-wizard-do 'latex-table-wizard)
+
 ;;;###autoload
-(defun latex-table-wizard-do ()
+(defun latex-table-wizard ()
   "Edit table-like environment with a transient interface."
   (interactive)
-  (unless latex-table-wizard-mode
-    (latex-table-wizard-mode 1))
+  (when (region-active-p) (deactivate-mark))
+  (if latex-table-wizard-mode
+      (latex-table-wizard-mode 1)
+    (latex-table-wizard--make-prefix))
   (latex-table-wizard--get-out)
   (latex-table-wizard--hide-rest)
   (call-interactively #'latex-table-wizard-prefix))
 
 (defun latex-table-wizard-customize ()
-  "Call the customize function with latex-table-wizard as argument."
+  "Access customization interface for \\='latex-table-wizard\\='."
   (interactive)
   (customize-browse 'latex-table-wizard))
 
diff --git a/latex-table-wizard.org b/latex-table-wizard.org
index 0060567735..848f39714f 100644
--- a/latex-table-wizard.org
+++ b/latex-table-wizard.org
@@ -4,8 +4,8 @@
 #+EMAIL: enrico@eflor.net
 
 #+OPTIONS: ':t toc:t author:t email:t
-#+MACRO: version 0.1.0
-#+MACRO: updated last updated 14 November 2022
+#+MACRO: version 1.0.0
+#+MACRO: updated last updated 14 December 2022
 
     
[[https://melpa.org/#/latex-table-wizard][file:https://melpa.org/packages/latex-table-wizard-badge.svg]]
 
@@ -21,42 +21,69 @@ Copyright (C) 2022 Enrico Flor.
 
      (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and
      modify this GNU manual.”
-* Overview
+* Introduction
 
 One of org-mode's magic features is its table editing capabilities.
-The goal of this package is to replicate that luxury for LaTeX
+The goal of this package is to replicate that magic for LaTeX
 table(-like) environments.
 
-LaTeX-table-wizard's UI is based on 
[[https://elpa.gnu.org/packages/transient.html][transient]].  While the user can
-change all the bindings, and can use all the commands without the
-transient interface, this readme will refer to the commands through
-the default bindings as they can be seen in the transient below.
+The way this is done is through a series of interactive commands that
+are exposed as *transient suffixes* through the transient interface
+invoked by the command ~latex-table-wizard~.  What this means is that
+by calling ~latex-table-wizard~ when point is in a table-like
+environment, you will be presented with a choice of keys that are
+bound to all the commands provided by this package.
+
+All these commands can of course be called through
+~execute-extended-command~, and you can bind any key you want to them.
+See [[#custom-transient-prefix]] for how to change the default bindings
+offered by the transient prefix.
+
+An important feature of LaTeX-table-wizard is that it *tries to be
+smart*: for instance, it should not be fooled if the current
+table-like environments contains *embedded tables* (that is, other
+tabular environments inside of its cells).  The table is parsed so
+that these big cells are treated like any other cell.
+
+For example, if you call ~latex-table-wizard~ when point is outside of
+the embedded ~tabular~ environment, LaTeX-table-wizard will behave as if
+it was in any other 3x3 table, and the embedded table will be treated
+just as any other cell content.
 
-The transient interface is invoked through the ~latex-table-wizard-do~
-command, and exited, as usual, with ~C-g~.
+#+begin_src LaTeX
+\begin{tabular}{lll}
+  \begin{tabular}{ll}
+    a & b \\
+    c & d
+  \end{tabular}
+  & █B2 & C2 \\\hline
+ A1 & B1 & C1 \\
+ A0 & B0 \makecell{longer & nested cell} & C0
+\end{tabular}
+#+end_src
 
-An important feature of LaTeX-table-wizard is that it tries to be
-smart: for instance, it should not be fooled if the current table-like
-environments contains embedded tables (that is, other tabular
-environments inside of its cells).  The table is parsed so that these
-big cells are treated like any other cell.
+Of course you can call ~latex-table-wizard~ with point inside of the
+embedded table, in which case any command you use will operate only on
+the embedded table.
 
-[[./wizard-01.gif]]
+For most of this document we will assume the table-like environment
+has the standard LaTeX2e syntax, but you can define your own types of
+table-like environments (more on this [[#user-defined-envs][below]]).
 
 * Available commands
 For now, we will assume a standard LaTeX syntax for tabular
-environments, where ~&~ delimits columns and ~\\~ rows (see 
[[#user-defined-envs][below]] for info
-as to how to specify additional syntaxes).
+environments, where ~&~ delimits columns and ~\\~ rows (see 
[[#user-defined-envs][below]] for
+info as to how to specify additional environments).
 
 Whenever we say "current" we mean "at point".
 
 ** Start editing
-Just call ~latex-table-wizard-do~ when point is inside of table-like
+Just call ~latex-table-wizard~ when point is inside of table-like
 environment.
 
 This commands actually activates the non-global minor mode
 ~latex-table-wizard-mode~.  If you intend to use this package's commands
-without the transient interface brought up by ~latex-table-wizard-do~,
+without the transient interface brought up by ~latex-table-wizard~,
 activate this minor mode to have the interactive functions loaded.
 ** Relative motion commands
 
@@ -64,12 +91,12 @@ These commands move point N cells to the right, left, down, 
and up.  N
 is passed as a prefix argument, and if it's not passed, it defaults
 to 1.
 
-| Command                  | Default key |
-|--------------------------+-------------|
-| ~latex-table-wizard-right~ | ~f~           |
-| ~latex-table-wizard-left~  | ~b~           |
-| ~latex-table-wizard-down~  | ~n~           |
-| ~latex-table-wizard-up~    | ~p~           |
+| Command                    | Default key |
+|----------------------------+-------------|
+| ~latex-table-wizard-right~   | ~f~           |
+| ~latex-table-wizard-left~    | ~b~           |
+| ~latex-table-wizard-down~    | ~n~           |
+| ~latex-table-wizard-up~      | ~p~           |
 
 With just one of these you can get anywhere you want in the table:
 
@@ -90,6 +117,12 @@ suitable cell to move to:
 + Point on ~B0~, ~latex-table-wizard-up~ ⇒ point on ~A2~
 
 and so on.
+
+These four commands accept a positive integer passed as a prefix
+argument that determines how many steps (i.e. how many cells) the
+movement will consist of.  By default, you can pass this argument
+from the transient interface of ~latex-table-wizard~ with the key ~u~
+(bound to ~universal-argument~).
 ** Absolute motion commands
 
 | Command                              | Default key | Move to...              
      |
@@ -128,7 +161,7 @@ opposite end of the current cell.  So for example:
 
 #+begin_src LaTeX
 \begin{tabular}{lll}
-  A0 & B0 & C0 \\\hline
+  A0 & B0    & C0 \\\hline
   A1 & B1 & C1 \\
   A2 & B2 & C2
 \end{tabular}
@@ -137,47 +170,58 @@ opposite end of the current cell.  So for example:
 This is because these commands try to Do What You Mean if there is no
 suitable cell to move to:
 
-+ Point on ~B0~, ~latex-table-wizard-swap-row-up~
+Point on ~C0~, ~latex-table-wizard-swap-cell-right~
   ⇒
 #+begin_src LaTeX
 \begin{tabular}{lll}
- A2  & B2  & C2  \\\hline
+ C0 & B0    & A0 \\\hline
   A1 & B1 & C1 \\
- A0  & B0  & C0
+  A2 & B2 & C2
 \end{tabular}
 #+end_src
-+ Point on ~C2~, ~latex-table-wizard-swap-cell-right~
+
+Point on ~B0~, ~latex-table-wizard-swap-row-up~
   ⇒
-#+begin_src latex
+#+begin_src LaTeX
 \begin{tabular}{lll}
- C0  & B0 & A0  \\\hline
+ A2 & B2 & C2 \\\hline
   A1 & B1 & C1 \\
-  A2 & B2 & C2
+ A0 & B0 & C0
+\end{tabular}
+#+end_src
+
+Point on ~A1~, ~latex-table-wizard-swap-column-right~
+  ⇒
+#+begin_src LaTeX
+\begin{tabular}{lll}
+ B0 & A0 & C0 \\\hline
+ B1 & A1 & C1 \\
+ B2 & A2 & C2
 \end{tabular}
 #+end_src
 
 ** Swap arbitrary fields
-To swap arbitrary fields one must first *select* something and then
-move point somewhere else and perform the swap.  Importantly,
-*selecting does not mean marking*: the mark is not even moved when
-selecting.
+To swap arbitrary fields one must first *select* something and then move
+point somewhere else and perform the swap.  Importantly, *selecting
+does not mean marking*: the mark is not even moved when selecting
+(however, by default the selected cell will receive the same kind of
+highlighting the loaded theme defines for the active region, but this
+is a purely graphical equivalence).  "Selecting", for the purposes of
+LaTeX-table-wizard only means storing a cell, a line or a row to be
+swapped with another.
 
 The simplest case is one in which the current cell, column or row are
 selected:
 
-| Command                          | Default key | Select current... |
-|----------------------------------+-------------+-------------------|
-| ~latex-table-wizard-select-cell~   | ~SPC~         | cell              |
-| ~latex-table-wizard-select-column~ | ~c~           | column            |
-| ~latex-table-wizard-select-row~    | ~r~           | row               |
-
-Things can be deselected too:
+| Command                                 | Default key | Select current...    
|
+|-----------------------------------------+-------------+----------------------|
+| ~latex-table-wizard-select-deselect-cell~ | ~SPC~         | select/deselect 
cell |
+| ~latex-table-wizard-select-column~        | ~c~           | select column    
    |
+| ~latex-table-wizard-select-row~           | ~r~           | deselect row     
    |
+| ~latex-table-wizard-deselect-all~         | ~d~           | deselect all     
    |
 
-| Command                              | Default key | Deselect current... |
-|--------------------------------------+-------------+---------------------|
-| ~latex-table-wizard-deselect-cell~   | ~d SPC~     | cell                |
-| ~latex-table-wizard-deselect-column~ | ~d c~       | column              |
-| ~latex-table-wizard-deselect-row~    | ~d r~       | row                 |
+The first command, ~latex-table-wizard-select-deselect-cell~ toggles the
+status of the current cell as being selected or not.
 
 Once things are selected, you move point somewhere else in the table
 (with the above mentioned motion commands), and then:
@@ -190,26 +234,94 @@ potentially discontinuous segment of) a column or a row, 
then that
 selection is swapped with the current column or row or the
 corresponding portion thereof.  If you selected multiple cell that are
 not part of the same column or row, the swap won't happen
-(LaTeX-table-wizard doesn't know what to do).
+(LaTeX-table-wizard doesn't know what you want it to do in that case).
 
 ** Format the table
 
-Two more command fix the appearance of the table.  To "compress" the
-table by removing excess white space at the edges of each cell, call
-~latex-table-wizard-clean-whitespace~.
-
-Call ~latex-table-wizard-align~ if you want the columns to be vertically
-aligned too (and each row starting on its own line).  If you call this
-command repeatedly, it will cycle through three modes of alignment of
-the text in the cells: align text left, center, and right.  This
-alignment command tries to be smart and not be fooled by column or row
-delimiters embedded in a cell.
+The only command to format the table is ~latex-table-wizard-align~.  The
+behavior of this command is cyclic, in the sense that calling it
+repeatedly causes the table to cycle through four types of formatting:
+left aligned, centered, right aligned and compressed.  The latter
+state is actually not one of alignment (that is, the column separators
+are not vertically aligned): it just means that all the extra space at
+the beginning and end of each cell is collapsed into one.
 
 | Command                             | Default key |
 |-------------------------------------+-------------|
-| ~latex-table-wizard-clean-whitespace~ | ~w~           |
 | ~latex-table-wizard-align~            | ~TAB~         |
 
+The following five tables illustrate the effect of calling
+~latex-table-wizard-align~ repeatedly.
+
+This is the original cell:
+
+#+begin_src LaTeX
+\begin{tabular}{lll}
+ A2 longer cell & B2  & C2  \\\hline
+  A1 & B1 & C1 \\ A0  & B0 \makecell{longer & nested cell}     & C0
+\end{tabular}
+#+end_src
+
+left aligned:
+
+#+begin_src LaTeX
+\begin{tabular}{lll}
+ A2 longer cell & B2                                 & C2 \\\hline
+ A1             & B1                                 & C1 \\
+ A0             & B0 \makecell{longer & nested cell} & C0
+\end{tabular}
+#+end_src
+
+centered:
+
+#+begin_src LaTeX
+\begin{tabular}{lll}
+ A2 longer cell &                 B2                 & C2 \\\hline
+       A1       &                 B1                 & C1 \\
+       A0       & B0 \makecell{longer & nested cell} & C0
+\end{tabular}
+#+end_src
+
+right aligned:
+
+#+begin_src LaTeX
+\begin{tabular}{lll}
+ A2 longer cell &                                 B2 & C2 \\\hline
+             A1 &                                 B1 & C1 \\
+             A0 & B0 \makecell{longer & nested cell} & C0
+\end{tabular}
+#+end_src
+
+compressed:
+
+#+begin_src LaTeX
+\begin{tabular}{lll}
+ A2 longer cell & B2 & C2 \\\hline
+ A1 & B1 & C1 \\
+ A0 & B0 \makecell{longer & nested cell} & C0
+\end{tabular}
+#+end_src
+
+As you can see, ~latex-table-wizard-align~ also forces every row of the
+table to start on its own line.
+
+As always, this alignment command tries to be smart and not be fooled
+by column or row delimiters embedded in a cell.
+
+** Extra commands in the transient prefix
+The transient interfaces invoked by ~latex-table-wizard~ also exposes
+some other commands that are not defined by this package but are
+useful for its usage.  These are:
+
+| Command                 | Default key |
+|-------------------------+-------------|
+| ~toggle-truncate-lines~   | ~t~           |
+| ~undo~                    | ~/~           |
+| ~exchange-point-and-mark~ | ~x~           |
+| ~universal-argument~      | ~u~           |
+| ~transient-quit-one~      | ~RET~         |
+
+
 * Known issues
 
 ** Empty cells in single-column tables
@@ -230,80 +342,29 @@ parser sees some text.
 
 So instead of ~\\ \\~ we will have ~\\ \blk{} \\~.
 * Customization
-** Change keybindings
-To change the default keybindings, you need to provide a new
-definition of the transient prefix ~latex-table-wizard-prefix~ through
-the macro ~transient-define-prefix~.
 
-The default definition, which is the one assumed in this readme so
-far, is below:
+To quickly access all customizations pertinent to LaTeX-table-wizard
+through the Customize interface, call ~latex-table-wizard-customize~.
 
-#+begin_src emacs-lisp
-(transient-define-prefix latex-table-wizard-prefix ()
-  [:description
-   "      LaTeX table wizard"
-   ["Motion"
-    ;; latex-table-wizard--motion-suffixes
-    ("f" "move right" latex-table-wizard-right :transient t)
-    ("b" "move left" latex-table-wizard-left :transient t)
-    ("p" "move down" latex-table-wizard-up :transient t)
-    ("n" "move up" latex-table-wizard-down :transient t)
-    ""
-    ("F" "end of row" latex-table-wizard-end-of-row :transient t)
-    ("B" "beginning of row" latex-table-wizard-beginning-of-row :transient t)
-    ("P" "top" latex-table-wizard-top :transient t)
-    ("N" "bottom" latex-table-wizard-bottom :transient t)
-    ""
-    ("a" "beginning of cell" latex-table-wizard-beginning-of-cell :transient t)
-    ("e" "end of cell" latex-table-wizard-end-of-cell :transient t)
-    ""
-    ("u" "universal argument" universal-argument :transient t)]
-   ["Swap"
-    ;; latex-table-wizard--swap-cell-suffixes
-    ("C-f" "swap cell right" latex-table-wizard-swap-cell-right :transient t)
-    ("C-b" "swap cell left" latex-table-wizard-swap-cell-left :transient t)
-    ("C-p" "swap cell up" latex-table-wizard-swap-cell-up :transient t)
-    ("C-n" "swap cell down" latex-table-wizard-swap-cell-down :transient t)
-    ""
-    ;; latex-table-wizard--swap-line-suffixes
-    ("M-f" "swap column right" latex-table-wizard-swap-column-right :transient 
t)
-    ("M-b" "swap column left" latex-table-wizard-swap-column-left :transient t)
-    ("M-p" "swap row up" latex-table-wizard-swap-row-up :transient t)
-    ("M-n" "swap row down" latex-table-wizard-swap-row-down :transient t)
-    ""
-    "Other"
-    ;; latex-table-wizard--other-suffixes
-    ("w" "compress table" latex-table-wizard-clean-whitespace :transient t)
-    ("TAB" "align table" latex-table-wizard-align :transient t)
-    ("/" "undo" undo :transient t)
-    ""
-    ("RET" "done" transient-quit-one)]
-   ["Select and swap"
-    ("SPC" "select cell" latex-table-wizard-select-cell :transient t)
-    ("c" "select column" latex-table-wizard-select-column :transient t)
-    ("r" "select row" latex-table-wizard-select-row :transient t)
-    ("d SPC" "deselect cell" latex-table-wizard-deselect-cell :transient t)
-    ("d c" "select column" latex-table-wizard-deselect-column :transient t)
-    ("d r" "select row" latex-table-wizard-deselect-row :transient t)
-    ""
-    ("s" "swap selection" latex-table-wizard-swap :transient t)
-    ""
-    "Mark, kill and insert"
-    ;; latex-table-wizard--mark-suffixes
-    ("x" "exchange point and mark" exchange-point-and-mark :transient t)
-    ("m c" "mark cell" latex-table-wizard-mark-cell :transient t)
-    ("i c" "insert column right" latex-table-wizard-insert-column :transient t)
-    ("i r" "insert row below" latex-table-wizard-insert-row :transient t)
-    ("k c" "kill current column" latex-table-wizard-kill-column :transient t)
-    ("k r" "kill current row" latex-table-wizard-kill-row :transient t)]])
-#+end_src
+** Customize transient prefix
+:PROPERTIES:
+:CUSTOM_ID: custom-transient-prefix
+:END:
+To change the default key bindings, you need to provide change the
+value of the alist ~latex-table-wizard-transient-keys~.  The easiest and
+most convenient way to do it is through ~latex-table-wizard-customize~.
+
+Each cons cell in this alist maps a command to a key description
+string (the kind of strings that the macro ~kbd~ takes as arguments).
 
-Just put a copy of this macro calling with the appropriate
-modifications in your configuration file.  The first element of each
-list in the vectors is the key (given in the same syntax as the ~kbd~
-macro accepts).  You can also move around or remove some of these
-cells if you want to change the layout of the transient interface.
+For example, these three cons cells are members of the default value of
+~latex-table-wizard-transient-keys~:
 
+#+begin_src emacs-lisp
+(undo . "//")
+(latex-table-wizard-swap-cell-right . "C-f")
+(latex-table-wizard-insert-row . "i r")
+#+end_src
 
 ** Define rules for new environments
 :PROPERTIES:
@@ -334,7 +395,23 @@ Each member of this list is a string that would be between 
the
 \"\\\" and the arguments."
   :type '(repeat string)
   :group 'latex-table-wizard)
+#+end_src
 
+ LaTeX-table-wizard will always presume the table you want operate on
+ has a syntax specified like this.  But suppose you use different
+ environments with non-standard syntax: suppose you define a
+ table-like environment of your choice, let's call it ~mytable~, that
+ uses ~!ROW~ and ~!COL~ instead of ~&~ and ~\\~ as delimiters, and a macro
+ ~\horizontal~ for horizontal lines.  When you are in a ~mytable~
+ environments, you want LaTeX-table-wizard to adapt to this new
+ syntax.
+
+ All you need to do add an appropriate cons cell to the
+ ~latex-table-wizard-new-environments-alist~ association list, mapping
+ the name of the environment, as a string, to a property list
+ specifying the values.  Here is this variable's ~defcustom~ expression:
+
+ #+begin_src emacs-lisp
 (defcustom latex-table-wizard-new-environments-alist nil
   "Alist mapping environment names to property lists.
 
@@ -363,27 +440,47 @@ of a macro that inserts some horizontal line.  For a macro
                                    :value-type (repeat string)))
 
   :group 'latex-table-wizard)
-#+end_src
-
- LaTeX-table-wizard will always presume the table you want operate on
- has a syntax specified like this.  But suppose you use different
- environments with non-standard syntax: suppose you define a
- table-like environment of your choice, let's call it ~mytable~, that
- uses ~!ROW~ and ~!COL~ instead of ~&~ and ~\\~ as delimiters, and a macro
- ~\horizontal~ for horizontal lines.  When you are in a ~mytable~
- environments, you want LaTeX-table-wizard to adapt to this new
- syntax.
+ #+end_src
 
- All you need to do add an appropriate cons cell to the
- ~latex-table-wizard-new-environments-alist~ association list, mapping
- the name of the environment, as a string, to a property list
- specifying the values.  For the case of ~mytable~ you would do:
+You can add the new syntax for the ~mytable~ environment through the
+Customize interface, which will present you with the correct values to
+set, or you can just add a cons cell of your writing to the alist:
 
  #+begin_src emacs-lisp
 (add-to-list 'latex-table-wizard-new-environments-alist
              '("mytable" . (:col ("!COL") :row ("!ROW") :lines 
("horizontal"))))
  #+end_src
 
- A more convenient way to customize these variables is through the
- ~customize~ interface, which is easily accessed through the interactive
- command ~latex-table-wizard-customize~.
+Each of the values in the plist is a list of strings: this way you can
+define environments that can use more than one type of column
+separator.  Importantly, the strings in the ~:lines~ list are *names of
+LaTeX* macros, which means that they should not start with the
+backslash and you should not add any argument to them.  In the example
+above a buffer substring like =\horizontal{1}= will be interpreted as a
+hline macro if in a ~mytable~ environment.
+
+** Customizing faces
+
+ Calling ~latex-table-wizard~ by default causes the portions of the
+ buffer before and after the table at point to be "grayed out", so
+ that you can clearly focus on the table.  If you don't want this to
+ happen, set the value of the variable ~latex-table-wizard-no-focus~ to
+ ~t~.
+
+ If instead you want effect to be different than the default (which is
+ applying a foreground of color ~gray40~), change the value of the face
+ ~latex-table-wizard-background~.
+
+ By default, when you move around the table and select objects from it
+ the relevant portions of the table are highlighted.  If you don't
+ want this to happen, set the value of the variable
+ ~latex-table-wizard-no-highlight~ to ~t~.
+
+ If instead you want the highlighting to be done differently than the
+ default (which is applying a background of the same color as the
+ loaded theme defines for the active region), change the value of the
+ face ~latex-table-wizard-highlight~.
+
+ The easiest and most convenient way to set these variables,
+ especially the two faces, is through the Customize interface, which
+ you can access quickly by calling ~latex-table-wizard-customize~.
diff --git a/scratch-latex.info b/scratch-latex.info
new file mode 100644
index 0000000000..ea04337018
--- /dev/null
+++ b/scratch-latex.info
@@ -0,0 +1,29 @@
+This is scratch-latex.info, produced by makeinfo version 6.8 from
+scratch-latex.texi.
+
+
+File: scratch-latex.info,  Node: Top,  Up: (dir)
+
+(add-to-list ’latex-table-wizard-transient-keys
+’(latex-table-wizard-right .  "OL") )
+
+   latex-table-wizard–align-status
+
+   latex-table-wizard–parse
+
+   & B2 & C2 \\ A1 & B1 & C1
+A0 & B0 & C0
+
+   latex-table-wizard-transient-keys
+
+
+
+Tag Table:
+Node: Top87
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]