branch: externals/latex-table-wizard
commit 681c03010e38e8cb4089171be72d73e6d28cd472
Merge: b55d215dbe fcdc34960e
Author: enricoflor <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #3 from ananashawaw/master
1.5.5 : Update News, Copyright and improve documentation.
---
NEWS | 40 +++--
latex-table-wizard.el | 75 ++++-----
latex-table-wizard.info | 418 +++++++++++++++++++++++-------------------------
latex-table-wizard.org | 178 +++++++++++----------
latex-table-wizard.texi | 98 +++++-------
5 files changed, 387 insertions(+), 422 deletions(-)
diff --git a/NEWS b/NEWS
index 5ba050d123..862373da3c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,19 +1,27 @@
-*- mode: org -*-
-* 1.4
+* 1.5.3 <2023-08-21 Mon>
+** Commands changed:
+*** latex-table-wizard-align
+Makes it so calling latex-table-wizard-align always start the cycle
+with left alignment. This behavior was suggested by fountainer
+* 1.5.2 <2023-05-16 Tue>
+** User option changed: latex-table-wizard-row-delimiters
+Default value changed from "\\\\\\\\" to "\\\\".
+* 1.4.0 <2023-05-02 Tue>
** New commands:
*** latex-table-wizard-edit-cell
*** latex-table-wizard-copy-cell-content
*** latex-table-wizard-yank-cell-content
*** latex-table-wizard-kill-cell-content
-* 1.3.1
+* 1.3.1 <2023-04-13 Thu>
** Added new hook: latex-table-wizard-after-table-modified-hook
-This hook is ran whenever a latex-table-wizard command is called that
-potentially changes the table. This fixes a bug that previously
+This hook is ran whenever a latex-table-wizard command that
+potentially changes the table is called. This fixes a bug that previously
occurred when the user would swap around things in a table
"vacuously", such that after the command the content of the table was
exactly the same as before.
-* 1.3.0
+* 1.3.0 <2023-04-10 Mon>
** New commands:
*** latex-table-wizard-kill-row-content
*** latex-table-wizard-kill-column-content
@@ -23,19 +31,18 @@ exactly the same as before.
*** latex-table-wizard-comment-out-content
** Commands changed:
*** latex-table-wizard-kill-column
-aliased to new command "latex-table-wizard-kill-column-content"
+Aliased to new command "latex-table-wizard-kill-column-content".
*** latex-table-wizard-kill-row
-aliased to new command "latex-table-wizard-kill-row-content"
+Aliased to new command "latex-table-wizard-kill-row-content".
*** latex-table-wizard-right, latex-table-wizard-left,
latex-table-wizard-down, latex-table-wizard-up
-added a second optional argument NOCYCLE that makes the command return
+Added a second optional argument NOCYCLE that makes the command return
nil (instead of moving point), in case the movement in the chosen
direction hits the boundaries of the table.
-
* 1.2.0 <2022-12-20 Tue>
** New user option: latex-table-wizard-allow-detached-args
Same as texmathp-allow-detached-args and
reftex-allow-detached-macro-args, but for the purposes of parsing the
-table (especially determining where the table content starts). By
+table (especially, determining where the table content starts). By
default, nil.
** New user option: latex-table-wizard-warn-about-detached-args
If t (default value) and latex-table-wizard-allow-detached-args is
@@ -43,12 +50,11 @@ nil, the user is warned about suspect cases of detachment
of a macro
and its arguments when the table is parsed.
* 1.1.0 <2022-12-18 Sun>
** Four interactive commands added
-
-+ latex-table-wizard-align-left
-+ latex-table-wizard-align-right
-+ latex-table-wizard-center
-+ latex-table-wizard-compress
-
-Each of these commands performs one of the transformations that
+Each of these commands performs one of the transformation that
latex-table-wizard-align cycles through. Unlike this command, these
new ones are not exposed through the transient interface.
+*** latex-table-wizard-align-left
+*** latex-table-wizard-align-right
+*** latex-table-wizard-center
+*** latex-table-wizard-compress
+
diff --git a/latex-table-wizard.el b/latex-table-wizard.el
index 30643c2aad..99fec49e99 100644
--- a/latex-table-wizard.el
+++ b/latex-table-wizard.el
@@ -1,12 +1,12 @@
;;; latex-table-wizard.el --- Magic editing of LaTeX tables -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022, 2023 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2026 Free Software Foundation, Inc.
;; Author: Enrico Flor <[email protected]>
;; Maintainer: Enrico Flor <[email protected]>
;; URL: https://github.com/enricoflor/latex-table-wizard
-;; Version: 1.5.4
-;; Keywords: convenience
+;; Version: 1.5.5
+;; Keywords: convenience, tex
;; Package-Requires: ((emacs "27.1") (auctex "12.1") (transient "0.3.7"))
@@ -96,6 +96,9 @@
(eval-when-compile (require 'subr-x))
(require 'transient)
+;; quiet compiler warning.
+(declare-function latex-table-wizard-prefix "latex-table-wizard")
+
(defgroup latex-table-wizard nil
"LaTeX table wizard configuration options."
:prefix "latex-table-wizard-"
@@ -106,22 +109,22 @@
(defcustom latex-table-wizard-allow-detached-args nil
"If t, allow arguments of macros to be detached in parsing.
-This means that if non-nil, this package will parse argument
+This means that, if non-nil, this package will parse argument
groups (strings in brackets or in braces) as arguments of the
macro even if they are separated by whitespace, one line break,
and comments. This conforms to how LaTeX interprets them.
However, doing this may cause some troubles if you happen to have
a string in braces at the start of the first
-cell (position (0,0)): this is because if there is no blank line
+cell (position (0,0)). This is because, if there is no blank line
between that cell and the table opening \\='\\begin\\=' macro
-with its arguments, that string which should be in the first cell
+with its arguments, that string, which should be in the first cell,
may end up being parsed as an additional argument to the
\\='\\begin\\=' macro.
-You avoid this danger if you set this variable to nil, but then
+You avoid this danger if you set this variable to nil, but then,
you should never have whitespace between the macro and its
-arguments and between the arguments themselves."
+arguments, and, between the arguments themselves."
:type 'boolean)
(defcustom latex-table-wizard-warn-about-detached-args t
@@ -129,15 +132,15 @@ arguments and between the arguments themselves."
The warning will be echoed in the echo area any time that, while
parsing the table, cases in which a LaTeX macro and its
-arguments, or two arguments of the same LaTeX macro might be
-separated from its arguments by whitespace or comment are found.
+arguments, or two arguments of the same LaTeX macro, might be
+separated from its arguments by whitespace or comment, are found.
Since the parser doesn't quite know what string preceded by an
-unescaped backslash is a valid LaTeX macro and whether it accepts
-what number of arguments, false positives are likely to be found.
+unescaped backslash is a valid LaTeX macro, and whether it accepts
+what number of arguments; false positives are likely to be found.
If `latex-table-wizard-allow-detached-args' is non-nil, detached
-arguments are allowed and so no warning will ever be issued
+arguments are allowed and so, no warning will ever be issued,
regardless of the value of this variable."
:type 'boolean
:link '(variable-link latex-table-wizard-allow-detached-args))
@@ -180,7 +183,7 @@ The cdr of each mapping is a property list with three keys:
The values for :col and :row are two lists of strings.
-The value for :lines is a list of strings just like is the case
+The value for :lines is a list of strings, just like is the case
for `latex-table-wizard-hline-macros', each of which is the name
of a macro that inserts some horizontal line. For a macro
\"\\foo{}\", use string \"foo\"."
@@ -238,14 +241,14 @@ interactive commands are called.")
;; + :start (marker, beginning of inside of the cell) ;;
;; + :end (marker, end of inside of the cell) ;;
;; ;;
-;; A parse of a table is a list of all its cells represented as such ;;
-;; plists. ;;
+;; A parse of a table is a list of all of its cells, ;;
+;; represented as such plists. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; this rx expression matches what can separate different arguments of
-;; a (La)TeX macro: whitespace and comments. If
+;; a (La)TeX macro, i.e. whitespace and comments. If
;; latex-table-wizard-allow-detached-args is nil, this rx
-;; expression will effectively never be used.
+;; expression will, effectively, never be used.
(defconst latex-table-wizard--blank-detach-arg-re
(rx (seq (* space)
(? (seq "%" (* not-newline)))
@@ -257,14 +260,14 @@ interactive commands are called.")
(defvar latex-table-wizard--detached nil)
(defun latex-table-wizard--warn-detached ()
- "Warn the user if suspected detached macros are found in table.
+ "Warn the user if suspected detached macros are found in the table.
A macro is detached if there is any blank string separating the
-macro from its arguments or one argument from the next.
+macro from its arguments, or one argument from the next.
Don't do anything if
`latex-table-wizard-allow-detached-args' is non-nil,
-because it means that the user is aware of this and is taking the
+because, it means that the user is aware of this and is taking the
measures needed for the parser not to be confused."
(unless latex-table-wizard-allow-detached-args
(let ((message-log-max 0))
@@ -578,7 +581,7 @@ to the one that precedes point."
(point-marker)))
(env-end (save-excursion
(LaTeX-find-matching-end)
- (if-let ((end-macro
+ (if-let* ((end-macro
(latex-table-wizard--macro-at-point
(1- (point))
latex-table-wizard-allow-detached-args)))
@@ -1667,7 +1670,7 @@ It replaces the content of current cell upon calling
`latex-table-wizard-yank-cell-content'.")
(defun latex-table-wizard--get-cell-content (&optional kill)
- "Get content of cell at point.
+ "Get the content of the cell at point.
Add it to the `kill-ring' and as the value of
`latex-table-wizard--copied-cell-content'.
@@ -1773,7 +1776,7 @@ Each member of this list is a list of the form
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.
+the description of the command.
See Info node `(transient) Suffix Specifications' for more
information.")
@@ -1793,7 +1796,7 @@ information.")
This consists of the commands with a default binding for the
transient prefix as specified in
`latex-table-wizard-default-transient-keys', and adds to them
-those that are not there specified.
+those that are not specified there.
The value of this list is used in `latex-table-wizard--setup' and
`latex-table-wizard--cleanup'.")
@@ -1821,7 +1824,7 @@ 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.
+with others.
See Info node `(transient) Suffix Specifications' for more
information about how transient suffixes are defined (that is,
@@ -1935,7 +1938,7 @@ AuCTeX indents as tabular according to the specification
in
(defun latex-table-wizard--in-tabular-env-p (&optional pos)
"Non-nil if POS is inside a tabular-like environment.
-That is, if POS is in an envionment among those in
+That is, if POS is in an environment among those in
`latex-table-wizard--environments'. If POS is nil, it defaults
to the value of (point)."
(let* ((p (or pos (point)))
@@ -1948,14 +1951,14 @@ to the value of (point)."
"Prepare for an operation on the table.
These preparations are only needed before the first of a chain of
-\\='latex-table-wizard\\=' commands is used, hence do nothing if
+\\='latex-table-wizard\\=' commands is used, hence, do nothing if
`last-command' is in `latex-table-wizard--interactive-commands'.
Preparations mean:
- - deactivate the mark
- - activate `latex-table-wizard-mode' if needed
- - move the point inside the closest cell
+ - deactivate the mark.
+ - activate `latex-table-wizard-mode' if needed.
+ - move the point inside the closest cell.
- put the overlays if appropriate."
(unless (memq last-command latex-table-wizard--interactive-commands)
(when (region-active-p) (deactivate-mark))
@@ -1990,7 +1993,7 @@ Preparations mean:
;;; Aesthetics
(defcustom latex-table-wizard-no-highlight nil
- "Whether or not current or selected cells are highlighted."
+ "Whether or not the current or selected cells are highlighted."
:type 'boolean
:group 'latex-table-wizard)
@@ -1999,7 +2002,7 @@ Preparations mean:
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,
+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.
@@ -2031,7 +2034,7 @@ all defined faces."
:group 'latex-table-wizard)
(defun latex-table-wizard--hide-rest ()
- "Apply face `latex-table-wizard-background' outside of table."
+ "Apply face `latex-table-wizard-background' outside of the table."
(unless latex-table-wizard-no-focus
(latex-table-wizard--parse-table)
(let* ((tab-b latex-table-wizard--table-begin)
@@ -2056,8 +2059,8 @@ remove if `last-command' but not `this-command' is in
latex-table-wizard--interactive-commands)
(not this-comm-wiz))))
;; now we want to remove stuff either if this function was called
- ;; "unconditionally" of if it seems like we exited a chain of
- ;; latex-table-wizard operations
+ ;; "unconditionally", or if it seems like we exited a chain of
+ ;; latex-table-wizard operations.
(when (or (not if-not-in-chain) exited (not this-comm-wiz))
(remove-overlays (point-min) (point-max) 'tabl-inside-ol t)
(remove-overlays (point-min) (point-max) 'tabl-outside-ol t))))
diff --git a/latex-table-wizard.info b/latex-table-wizard.info
index 11502f0156..d60cf41543 100644
--- a/latex-table-wizard.info
+++ b/latex-table-wizard.info
@@ -1,13 +1,8 @@
-This is latex-table-wizard.info, produced by makeinfo version 7.0.2 from
+This is latex-table-wizard.info, produced by makeinfo version 7.2 from
latex-table-wizard.texi.
-INFO-DIR-SECTION Emacs misc features
-START-INFO-DIR-ENTRY
-* LaTeX-table-wizard: (latex-table-wizard). Magic editing of LaTeX tables.
-END-INFO-DIR-ENTRY
-
-File: latex-table-wizard.info, Node: Top, Next: Introduction, Up: (dir)
+File: latex-table-wizard.info, Node: Top, Next: Introduction, Prev: (dir),
Up: (dir)
LaTeX table wizard - Magic editing of LaTeX tables
**************************************************
@@ -15,14 +10,15 @@ LaTeX table wizard - Magic editing of LaTeX tables
file:https://melpa.org/packages/latex-table-wizard-badge.svg
(https://melpa.org/#/latex-table-wizard)
- Copyright (C) 2022, 2023 Enrico Flor.
+ Copyright (C) 2022-2026 Enrico Flor.
- Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and
-with the Back-Cover Texts as in (a) below. A copy of the license is
-included in the section entitled “GNU Free Documentation License.”
+ Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License,
+Version 1.3 or any later version published by the Free Software
+Foundation; with no Invariant Sections, with the Front-Cover Texts
+being “A GNU Manual,” and with the Back-Cover Texts as in (a) below.
+A copy of the license is included in the section entitled “GNU Free
+Documentation License.”
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and
modify this GNU manual.”
@@ -35,48 +31,22 @@ modify this GNU manual.”
* Customization::
* Example setup without Transient interface (Emacs 28 and later)::
-— The Detailed Node Listing —
-
-Available commands
-
-* Start editing::
-* Relative motion commands::
-* Absolute motion commands::
-* Mark, kill and insert commands: Mark kill and insert commands.
-* Swap adjacent fields::
-* Swap arbitrary fields::
-* Comment out cells::
-* Format the table::
-* Extra commands in the transient prefix::
-
-Known issues
-
-* Empty cells in single-column tables::
-
-Customization
-
-* Customize transient prefix::
-* Define rules for new environments::
-* Customizing faces::
-* Detached arguments::
-
-
File: latex-table-wizard.info, Node: Introduction, Next: Available commands,
Prev: Top, Up: Top
1 Introduction
**************
-One of org-mode’s magic features is its table editing capabilities. The
-goal of this package is to replicate that magic for LaTeX table(-like)
-environments.
+One of org-mode's magic features is its table editing capabilities.
+The goal of this package is to replicate that magic for LaTeX
+table(-like) environments.
- 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.
+ 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.
@@ -84,15 +54,15 @@ See *note Customize 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.
+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.
+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.
\begin{tabular}{lll}
\begin{tabular}{ll}
@@ -104,14 +74,14 @@ just as any other cell content.
A0 & B0 \makecell{longer & nested cell} & C0
\end{tabular}
- 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.
+ 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.
- 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 *note below: Define rules for new
-environments.).
+ 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 *note below: Define
+rules for new environments.).
File: latex-table-wizard.info, Node: Available commands, Next: Known issues,
Prev: Introduction, Up: Top
@@ -120,11 +90,11 @@ File: latex-table-wizard.info, Node: Available commands,
Next: Known issues,
********************
For now, we will assume a standard LaTeX syntax for tabular
-environments, where ‘&’ delimits columns and ‘\\’ rows (see *note below:
-Define rules for new environments. for info as to how to specify
-additional environments).
+environments, where ‘&’ delimits columns and ‘\\’ rows (see *note
+below: Define rules for new environments. for info as to how to
+specify additional environments).
- Whenever we say “current” we mean “at point”.
+ Whenever we say "current" we mean "at point".
* Menu:
@@ -139,18 +109,19 @@ additional environments).
* Extra commands in the transient prefix::
-File: latex-table-wizard.info, Node: Start editing, Next: Relative motion
commands, Up: Available commands
+File: latex-table-wizard.info, Node: Start editing, Next: Relative motion
commands, Prev: Available commands, Up: Available commands
2.1 Start editing
=================
-Just call ‘latex-table-wizard’ when point is inside of table-like
+Just call ‘latex-table-wizard’ when point is inside of a 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’,
-activate this minor mode to have the interactive functions loaded.
+‘latex-table-wizard-mode’. If you intend to use this package's
+commands without the transient interface brought up by
+‘latex-table-wizard’, activate this minor mode to have the interactive
+functions loaded.
File: latex-table-wizard.info, Node: Relative motion commands, Next:
Absolute motion commands, Prev: Start editing, Up: Available commands
@@ -159,7 +130,7 @@ File: latex-table-wizard.info, Node: Relative motion
commands, Next: Absolute
============================
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
+is passed as a prefix argument, and if it's not passed, it defaults to
1.
Command Default key
@@ -169,7 +140,7 @@ Command Default key
‘latex-table-wizard-down’ ‘n’
‘latex-table-wizard-up’ ‘p’
- With just one of these you can get anywhere you want in the table:
+ With just one of these, you can get anywhere you want in a table.
\begin{tabular}{lll}
A0 & B0 & C0 \\\hline
@@ -177,8 +148,8 @@ Command Default key
A2 & B2 & C2
\end{tabular}
- This is because these commands try to Do What You Mean if there is no
-suitable cell to move to:
+ This is because these commands try to Do What You Mean if there is
+no suitable cell to move to:
• Point on ‘C0’, ‘latex-table-wizard-right’ ⇒ point on ‘A1’
• Point on ‘A0’, ‘latex-table-wizard-left’ ⇒ point on ‘C2’
@@ -190,14 +161,14 @@ suitable cell to move to:
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’).
+the transient interface of ‘latex-table-wizard’ with the key ‘u’
+(bound to ‘universal-argument’).
- These four commands also accept a second optional argument which, if
-non-nil, prevents the Do What You Mean behavior. This is useful if you
-want to use these functions to write your own functions to edit tables.
-Given the table above, if point is on ‘A2’, both of the following
-expressions will return nil and won’t move point:
+ These four commands also accept a second optional argument which,
+if non-nil, prevents the Do What You Mean behavior. This is useful if
+you want to use these functions to write your own functions to edit
+tables. Given the table above, if point is on ‘A2’, both of the
+following expressions will return nil and won't move point:
(latex-table-wizard-left 1 t)
(latex-table-wizard-down 1 t)
@@ -223,7 +194,7 @@ File: latex-table-wizard.info, Node: Mark kill and insert
commands, Next: Swap
2.4 Mark, kill and insert commands
==================================
-Command Default key
+Command Default key Action
----------------------------------------------------------------------------------------------
‘latex-table-wizard-edit-cell’ ‘.’ edit current cell
‘latex-table-wizard-mark-cell’ ‘m c’ mark current cell
@@ -236,19 +207,20 @@ Command Default key
‘latex-table-wizard-kill-row-content’ ‘k r’ kill content of
current row
‘latex-table-wizard-delete-column’ ‘D c’ delete current column
‘latex-table-wizard-delete-row’ ‘D r’ delete current row
-‘exchange-point-and-mark’ ‘x’
+‘exchange-point-and-mark’ ‘x’ exchange position of
point and the
+ mark
‘latex-table-wizard-kill-cell-content’ and
‘latex-table-wizard-copy-cell-content’ add the content of current cell
both to the kill ring (like the default kill and copy commands) and to
-the value of a special variable: ‘latex-table-wizard-yank-cell-content’
-will replace the content of the current cell with whatever that value
-is.
+the value of a special variable:
+‘latex-table-wizard-yank-cell-content’ which will replace the content
+of the current cell with whatever that value is.
‘latex-table-wizard-delete-column’ and
-‘latex-table-wizard-delete-row’ modify the structure of the table (they
-actually remove the column/table, not just the content of the cells in
-them).
+‘latex-table-wizard-delete-row’ modify the structure of the table
+(they actually remove the column/table, not just the content of the
+cells in them).
File: latex-table-wizard.info, Node: Swap adjacent fields, Next: Swap
arbitrary fields, Prev: Mark kill and insert commands, Up: Available commands
@@ -269,7 +241,12 @@ Command Default key
Swap current...
For these commands, think of the cells and columns as circular: if
there is no item in the direction given, the target is the one on the
-opposite end of the current cell. So for example:
+opposite end of the current cell.
+
+ This is because these commands try to Do What You Mean if there is
+no suitable cell to move to.
+
+ So, for example:
\begin{tabular}{lll}
A0 & B0 & C0 \\\hline
@@ -277,12 +254,9 @@ opposite end of the current cell. So for example:
A2 & B2 & C2
\end{tabular}
- This is because these commands try to Do What You Mean if there is no
-suitable cell to move to:
-
Point on ‘C0’, ‘latex-table-wizard-swap-cell-right’ ⇒
\begin{tabular}{lll}
- C0 & B0 & A0 \\\hline
+ C0 & B0 & A0 \\\hline
A1 & B1 & C1 \\
A2 & B2 & C2
\end{tabular}
@@ -307,17 +281,17 @@ File: latex-table-wizard.info, Node: Swap arbitrary
fields, Next: Comment out
2.6 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 (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.
+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:
+ The simplest case is one in which the current cell, column or row
+are selected:
Command Default key Select current...
---------------------------------------------------------------------------------
@@ -326,21 +300,21 @@ Command Default key
Select current...
‘latex-table-wizard-select-row’ ‘r’ deselect row
‘latex-table-wizard-deselect-all’ ‘d’ deselect all
- The first command, ‘latex-table-wizard-select-deselect-cell’ toggles
-the status of the current cell as being selected or not.
+ 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:
+ Once things are selected, you move point somewhere else in the
+table (with the above mentioned motion commands), and then:
‘latex-table-wizard-swap’ ‘s’ swap selection and current thing
What is swapped depends on what is selected: if the selection was
-only a cell, then that cell and the current one are swapped. If it was
-(a 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 you want it to do in that case).
+only a cell, then that cell and the current one are swapped. If it
+was (a 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 you want it to do in that case).
File: latex-table-wizard.info, Node: Comment out cells, Next: Format the
table, Prev: Swap arbitrary fields, Up: Available commands
@@ -348,18 +322,19 @@ File: latex-table-wizard.info, Node: Comment out cells,
Next: Format the table
2.7 Comment out cells
=====================
-These two commands act on all the selected cells, if any is; otherwise,
-on the current cell point is on.
+These two commands act on all the selected cells, if any is;
+otherwise, on the current cell point is on.
-Command Default key Select current...
+Command Default key Comment out
+ current...
-------------------------------------------------------------------------------
-‘latex-table-wizard-comment-out-content’ ‘; c’ comment out content
-‘latex-table-wizard-comment-out’ ‘; ;’ comment out
+‘latex-table-wizard-comment-out-content’ ‘; c’ cell content
+‘latex-table-wizard-comment-out’ ‘; ;’ cell
The difference between the two is that one only comments out the
content, preserving both delimiters around the cell; the other one
-actually modifies the structure of the table because for any cell that
-is commented out, one delimiter around it is commented out too.
+actually modifies the structure of the table because, for any cell
+that is commented out, one delimiter around it is commented out too.
File: latex-table-wizard.info, Node: Format the table, Next: Extra commands
in the transient prefix, Prev: Comment out cells, Up: Available commands
@@ -367,13 +342,13 @@ File: latex-table-wizard.info, Node: Format the table,
Next: Extra commands in
2.8 Format the table
====================
-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
+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.
+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 gets collapsed into one.
Command Default key
-------------------------------------------
@@ -382,7 +357,7 @@ Command Default key
The following five tables illustrate the effect of calling
‘latex-table-wizard-align’ repeatedly.
- This is the original cell:
+ This is the original table:
\begin{tabular}{lll}
A2 longer cell & B2 & C2 \\\hline
@@ -424,12 +399,12 @@ Command Default key
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.
+ As always, this alignment command tries to be smart and not be
+fooled by column or row delimiters embedded in a cell.
Beside ‘latex-table-wizard-align’ with its cycling behavior, four
-commands are defined (but not exposed by the transient interface), each
-of which just performs one of these transformations. These are:
+commands are defined (but not exposed by the transient interface),
+each of which just performs one of these transformations. These are:
• ‘latex-table-wizard-align-left’
• ‘latex-table-wizard-align-right’
@@ -442,9 +417,9 @@ File: latex-table-wizard.info, Node: Extra commands in the
transient prefix, P
2.9 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:
+The transient interfaces invoked by ‘latex-table-wizard’ also expose
+some other commands that are not defined by this package but are
+useful for its usage. These are:
Command Default key
------------------------------------------
@@ -465,7 +440,7 @@ File: latex-table-wizard.info, Node: Known issues, Next:
Customization, Prev:
* Empty cells in single-column tables::
-File: latex-table-wizard.info, Node: Empty cells in single-column tables,
Up: Known issues
+File: latex-table-wizard.info, Node: Empty cells in single-column tables,
Prev: Known issues, Up: Known issues
3.1 Empty cells in single-column tables
=======================================
@@ -473,9 +448,9 @@ File: latex-table-wizard.info, Node: Empty cells in
single-column tables, Up:
This package handles empty cells (that is, cells without any text in
them except perhaps comments) well. The only exception is in tables
with a single column. The problem is that a buffer substring like ‘\\
-\\’ is not parsed as a cell. This is normally not a problem, but if the
-table has only one column then that substring could be meant to be an
-empty or blank cell.
+\\’ is not parsed as a cell. This is normally not a problem, but if
+the table has only one column then that substring could be meant to be
+an empty or blank cell.
A way to avoid this problem may be defining a LaTeX macro that does
nothing, and use it in the cell you intend to be empty so that the
@@ -500,20 +475,20 @@ through the Customize interface, call
‘latex-table-wizard-customize’.
* Detached arguments::
-File: latex-table-wizard.info, Node: Customize transient prefix, Next:
Define rules for new environments, Up: Customization
+File: latex-table-wizard.info, Node: Customize transient prefix, Next:
Define rules for new environments, Prev: Customization, Up: Customization
4.1 Customize transient prefix
==============================
-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
+To change the default key bindings, you need to 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).
- For example, these three cons cells are members of the default value
-of ‘latex-table-wizard-transient-keys’:
+ For example, these three cons cells are members of the default
+value of ‘latex-table-wizard-transient-keys’:
(undo . "//")
(latex-table-wizard-swap-cell-right . "C-f")
@@ -532,7 +507,7 @@ Remember the default values used for parsing table
environments:
:type '(repeat string)
:group 'latex-table-wizard)
- (defcustom latex-table-wizard-row-delimiters '("\\\\\\\\")
+ (defcustom latex-table-wizard-row-delimiters '("\\\\")
"List of strings that are row delimiters if unescaped."
:type '(repeat string)
:group 'latex-table-wizard)
@@ -550,18 +525,19 @@ Remember the default values used for parsing table
environments:
:type '(repeat string)
:group 'latex-table-wizard)
- 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’
+ LaTeX-table-wizard will always presume the table you want to
+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
+ All you need to do is 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:
+the name of the environment, as a string, to a property list
+specifying the values. Here is this variable's ‘defcustom’
+expression:
(defcustom latex-table-wizard-new-environments-alist nil
"Alist mapping environment names to property lists.
@@ -592,20 +568,21 @@ the values. Here is this variable’s ‘defcustom’
expression:
:group 'latex-table-wizard)
- 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:
+ 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:
(add-to-list 'latex-table-wizard-new-environments-alist
'("mytable" . (:col ("!COL") :row ("!ROW") :lines
("horizontal"))))
- Each of the values in the plist is a list of strings: this way you
+ 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.
+separator. Importantly, the strings in the ‘:lines’ list are *names
+of LaTeX* macros, which means that they should not start with a
+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.
File: latex-table-wizard.info, Node: Customizing faces, Next: Detached
arguments, Prev: Define rules for new environments, Up: Customization
@@ -614,27 +591,27 @@ File: latex-table-wizard.info, Node: Customizing faces,
Next: Detached argumen
=====================
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,
+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’.
+ If instead you want the 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
+ 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’.
+ 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’.
+especially the two faces, is through the Customize interface, which
+you can access quickly by calling ‘latex-table-wizard-customize’.
File: latex-table-wizard.info, Node: Detached arguments, Prev: Customizing
faces, Up: Customization
@@ -642,16 +619,17 @@ File: latex-table-wizard.info, Node: Detached arguments,
Prev: Customizing fac
4.4 Detached arguments
======================
-Optional or obligatory arguments can be separated from the macro or from
-each other in LaTeX. Suppose there is a macro ‘\macro’ that takes one
-optional and one obligatory argument. Now, LaTeX can deal with all of
-the following forms:
+Optional or obligatory arguments can be separated from the macro or
+from each other in LaTeX. Suppose there is a macro ‘\macro’ that
+takes one optional and one obligatory argument. Now, LaTeX can deal
+with all of the following forms:
This fact matters for this package for several reasons but the most
-important is that, in parsing the table, we need to know where the table
-content starts. Suppose you defined a tabular like environment ‘myenv’
-whose ‘\begin’ macro accepts an optional argument. Is ‘[abc]’ below the
-optional argument of the environment or content of the first cell?
+important is that, in parsing the table, we need to know where the
+table content starts. Suppose you defined a tabular like environment
+‘myenv’ whose ‘\begin’ macro accepts an optional argument. Is ‘[abc]’
+below the optional argument of the environment or content of the first
+cell?
By default, ‘latex-table-wizard’ will consider ‘[abc]’ part of the
first cell in the example above, because it does not recognize the
@@ -659,21 +637,21 @@ possibility for the arguments of LaTeX macros to be
detached. If you
want to change this default, set the value of
‘latex-table-wizard-allow-detached-args’ to t.
- If ‘latex-table-wizard-allow-detached-args’ is set to t (that is, if
-detached arguments are allowed), you should not have in your table
-strings between braces or brackets after a macro without them be
+ If ‘latex-table-wizard-allow-detached-args’ is set to t (that is,
+if detached arguments are allowed), you should not have in your table
+strings between braces or brackets after a macro without them being
separated by a blank line, unless these strings between braces or
-brackets are in fact the arguments of the macro. This is not a problem
-for LaTeX, because it knows what is a valid macro and what isn’t, and
-how many arguments a macro accepts: ‘latex-table-wizard’ however does
-not know it and it could get confused while parsing, and thus get the
-start of the first cell wrong.
+brackets are, in fact, the arguments of the macro. This is not a
+problem for LaTeX, because it knows what is a valid macro and what
+isn't, and how many arguments a macro accepts: ‘latex-table-wizard’
+however, does not know it and it could get confused while parsing, and
+thus get the start of the first cell wrong.
- Good practice is to never separate arguments from each other or from
-the LaTeX macro: if you respect this good practice, you will never need
-to be concerned with this customization.
+ Good practice is to never separate arguments from each other or
+from the LaTeX macro: if you respect this good practice, you will
+never need to be concerned with this customization.
- If detached arguments are “disallowed” (that is,
+ If detached arguments are "disallowed" (that is,
‘latex-table-wizard-allow-detached-args’ is nil as per default), you
have the option to be warned when ‘latex-table-wizard’ finds cases of
suspect detached arguments. The warning is just a message in the echo
@@ -703,33 +681,33 @@ below uses ‘repeat-mode’ (built-in with Emacs 28 and
later):
(dolist (cmd (mapcar #'car latex-table-wizard-transient-keys))
(put cmd 'repeat-map 'latex-table-wizard-map))
-
Tag Table:
-Node: Top99
-Node: Introduction1630
-Node: Available commands3771
-Node: Start editing4505
-Node: Relative motion commands5020
-Node: Absolute motion commands6966
-Node: Mark kill and insert commands7882
-Node: Swap adjacent fields9859
-Node: Swap arbitrary fields11915
-Node: Comment out cells14002
-Node: Format the table14881
-Node: Extra commands in the transient prefix17567
-Node: Known issues18244
-Node: Empty cells in single-column tables18438
-Node: Customization19218
-Node: Customize transient prefix19676
-Node: Define rules for new environments20465
-Node: Customizing faces24317
-Node: Detached arguments25685
-Node: Example setup without Transient interface (Emacs 28 and later)27946
+Node: Top97
+Node: Introduction1120
+Node: Available commands3260
+Node: Start editing3986
+Node: Relative motion commands4528
+Node: Absolute motion commands6470
+Node: Mark kill and insert commands7386
+Node: Swap adjacent fields9485
+Node: Swap arbitrary fields11546
+Node: Comment out cells13628
+Node: Format the table14556
+Node: Extra commands in the transient prefix17244
+Node: Known issues17920
+Node: Empty cells in single-column tables18114
+Node: Customization18915
+Node: Customize transient prefix19373
+Node: Define rules for new environments20176
+Node: Customizing faces24024
+Node: Detached arguments25389
+Node: Example setup without Transient interface (Emacs 28 and later)27650
End Tag Table
Local Variables:
coding: utf-8
+Info-documentlanguage: en
End:
diff --git a/latex-table-wizard.org b/latex-table-wizard.org
index 2b80338ea7..ffefa37d50 100644
--- a/latex-table-wizard.org
+++ b/latex-table-wizard.org
@@ -4,13 +4,13 @@
#+EMAIL: [email protected]
#+OPTIONS: ':t toc:t author:t email:t
-#+MACRO: version 1.4.0
-#+MACRO: updated last updated 2 May 2023
+#+MACRO: version 1.5.5
+#+MACRO: updated last updated 24 Jan 2026
[[https://elpa.gnu.org/packages/latex-table-wizard.html][https://elpa.gnu.org/packages/latex-table-wizard.svg]]
[[https://melpa.org/#/latex-table-wizard][file:https://melpa.org/packages/latex-table-wizard-badge.svg]]
-Copyright (C) 2022, 2023 Enrico Flor.
+Copyright (C) 2022-2026 Enrico Flor.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -64,10 +64,10 @@ just as any other cell content.
#+end_src
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
+embedded table, in which case, any command you use will operate only on
the embedded table.
-For most of this document we will assume the table-like environment
+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]]).
@@ -79,7 +79,7 @@ info as to how to specify additional environments).
Whenever we say "current" we mean "at point".
** Start editing
-Just call ~latex-table-wizard~ when point is inside of table-like
+Just call ~latex-table-wizard~ when point is inside of a table-like
environment.
This commands actually activates the non-global minor mode
@@ -94,12 +94,13 @@ 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~ |
+| ~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:
+With just one of these, you can get anywhere you want in a table.
#+begin_src LaTeX
\begin{tabular}{lll}
@@ -137,35 +138,36 @@ following expressions will return nil and won't move
point:
#+end_src
** Absolute motion commands
-| Command | Default key | Move to...
|
-|--------------------------------------+-------------+-------------------------------|
-| ~latex-table-wizard-beginning-of-cell~ | ~a~ | end of current cell
|
-| ~latex-table-wizard-end-of-cell~ | ~e~ | beginning of
current cell |
-| ~latex-table-wizard-beginning-of-row~ | ~B~ | leftmost cell in
current row |
-| ~latex-table-wizard-end-of-row~ | ~F~ | rightmost cell in
current row |
-| ~latex-table-wizard-bottom~ | ~N~ | bottom cell in
current column |
-| ~latex-table-wizard-top~ | ~P~ | top cell in current
column |
+| Command | Default key | Move to...
|
+|----------------------------------------+-------------+-------------------------------|
+| ~latex-table-wizard-beginning-of-cell~ | ~a~ | end of current cell
|
+| ~latex-table-wizard-end-of-cell~ | ~e~ | beginning of current
cell |
+| ~latex-table-wizard-beginning-of-row~ | ~B~ | leftmost cell in
current row |
+| ~latex-table-wizard-end-of-row~ | ~F~ | rightmost cell in
current row |
+| ~latex-table-wizard-bottom~ | ~N~ | bottom cell in
current column |
+| ~latex-table-wizard-top~ | ~P~ | top cell in current
column |
** Mark, kill and insert commands
-| Command | Default key |
|
-|----------------------------------------+-------------+------------------------------------|
-| ~latex-table-wizard-edit-cell~ | ~.~ | edit current cell
|
-| ~latex-table-wizard-mark-cell~ | ~m c~ | mark current cell
|
-| ~latex-table-wizard-insert-column~ | ~i c~ | insert empty
column to the right |
-| ~latex-table-wizard-insert-row~ | ~i r~ | insert row below
|
-| ~latex-table-wizard-copy-cell-content~ | ~w~ | copy content of
current cell |
-| ~latex-table-wizard-yank-cell-content~ | ~y~ | replace and yank
into current cell |
-| ~latex-table-wizard-kill-cell-content~ | ~k k~ | kill content of
current cell |
-| ~latex-table-wizard-kill-column-content~ | ~k c~ | kill content of
current column |
-| ~latex-table-wizard-kill-row-content~ | ~k r~ | kill content of
current row |
-| ~latex-table-wizard-delete-column~ | ~D c~ | delete current
column |
-| ~latex-table-wizard-delete-row~ | ~D r~ | delete current
row |
-| ~exchange-point-and-mark~ | ~x~ |
|
+
+| Command | Default key | Do...
|
+|------------------------------------------+-------------+-----------------------------------------|
+| ~latex-table-wizard-edit-cell~ | ~.~ | edit current cell
|
+| ~latex-table-wizard-mark-cell~ | ~m c~ | mark current cell
|
+| ~latex-table-wizard-insert-column~ | ~i c~ | insert empty column
to the right |
+| ~latex-table-wizard-insert-row~ | ~i r~ | insert row below
|
+| ~latex-table-wizard-copy-cell-content~ | ~w~ | copy content of
current cell |
+| ~latex-table-wizard-yank-cell-content~ | ~y~ | replace and yank
into current cell |
+| ~latex-table-wizard-kill-cell-content~ | ~k k~ | kill content of
current cell |
+| ~latex-table-wizard-kill-column-content~ | ~k c~ | kill content of
current column |
+| ~latex-table-wizard-kill-row-content~ | ~k r~ | kill content of
current row |
+| ~latex-table-wizard-delete-column~ | ~D c~ | delete current
column |
+| ~latex-table-wizard-delete-row~ | ~D r~ | delete current row
|
+| ~exchange-point-and-mark~ | ~x~ | exchange position
of point and the mark |
~latex-table-wizard-kill-cell-content~ and
~latex-table-wizard-copy-cell-content~ add the content of current cell
both to the kill ring (like the default kill and copy commands) and to
the value of a special variable: ~latex-table-wizard-yank-cell-content~
-will replace the content of the current cell with whatever that value
+which will replace the content of the current cell with whatever that value
is.
~latex-table-wizard-delete-column~ and ~latex-table-wizard-delete-row~
@@ -174,20 +176,25 @@ column/table, not just the content of the cells in them).
** Swap adjacent fields
-| Command | Default key | Swap current...
|
-|--------------------------------------+-------------+----------------------------------|
-| ~latex-table-wizard-swap-cell-right~ | ~C-f~ | cell with the one
to the right |
-| ~latex-table-wizard-swap-cell-left~ | ~C-b~ | cell with the one
to the left |
-| ~latex-table-wizard-swap-cell-down~ | ~C-n~ | cell with the one
below |
-| ~latex-table-wizard-swap-cell-up~ | ~C-p~ | cell with the one
above |
-| ~latex-table-wizard-swap-column-right~ | ~M-f~ | column with the one
to the right |
-| ~latex-table-wizard-swap-column-left~ | ~M-b~ | column with the one
to the left |
-| ~latex-table-wizard-swap-row-down~ | ~M-n~ | row with the one
below |
-| ~latex-table-wizard-swap-row-up~ | ~M-p~ | row with the one
above |
+| Command | Default key | Swap current...
|
+|----------------------------------------+-------------+----------------------------------|
+| ~latex-table-wizard-swap-cell-right~ | ~C-f~ | cell with the one to
the right |
+| ~latex-table-wizard-swap-cell-left~ | ~C-b~ | cell with the one to
the left |
+| ~latex-table-wizard-swap-cell-down~ | ~C-n~ | cell with the one
below |
+| ~latex-table-wizard-swap-cell-up~ | ~C-p~ | cell with the one
above |
+| ~latex-table-wizard-swap-column-right~ | ~M-f~ | column with the one
to the right |
+| ~latex-table-wizard-swap-column-left~ | ~M-b~ | column with the one
to the left |
+| ~latex-table-wizard-swap-row-down~ | ~M-n~ | row with the one
below |
+| ~latex-table-wizard-swap-row-up~ | ~M-p~ | row with the one
above |
For these commands, think of the cells and columns as circular: if
there is no item in the direction given, the target is the one on the
-opposite end of the current cell. So for example:
+opposite end of the current cell.
+
+This is because these commands try to Do What You Mean if there is no
+suitable cell to move to.
+
+So, for example:
#+begin_src LaTeX
\begin{tabular}{lll}
@@ -197,14 +204,11 @@ opposite end of the current cell. So for example:
\end{tabular}
#+end_src
-This is because these commands try to Do What You Mean if there is no
-suitable cell to move to:
-
Point on ~C0~, ~latex-table-wizard-swap-cell-right~
⇒
#+begin_src LaTeX
\begin{tabular}{lll}
- C0 & B0 & A0 \\\hline
+ C0 & B0 & A0 \\\hline
A1 & B1 & C1 \\
A2 & B2 & C2
\end{tabular}
@@ -231,10 +235,10 @@ Point on ~A1~, ~latex-table-wizard-swap-column-right~
#+end_src
** Swap arbitrary fields
-To swap arbitrary fields one must first *select* something and then move
+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
+(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
@@ -243,14 +247,14 @@ 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-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 | 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
|
-The first command, ~latex-table-wizard-select-deselect-cell~ toggles the
+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
@@ -270,14 +274,14 @@ not part of the same column or row, the swap won't happen
These two commands act on all the selected cells, if any is;
otherwise, on the current cell point is on.
-| Command | Default key | Select current... |
-|----------------------------------------+-------------+---------------------|
-| ~latex-table-wizard-comment-out-content~ | ~; c~ | comment out
content |
-| ~latex-table-wizard-comment-out~ | ~; ;~ | comment out
|
+| Command | Default key | Comment out
current... |
+|------------------------------------------+-------------+------------------------|
+| ~latex-table-wizard-comment-out-content~ | ~; c~ | cell's content
|
+| ~latex-table-wizard-comment-out~ | ~; ;~ | cell
|
The difference between the two is that one only comments out the
content, preserving both delimiters around the cell; the other one
-actually modifies the structure of the table because for any cell that
+actually modifies the structure of the table because, for any cell that
is commented out, one delimiter around it is commented out too.
** Format the table
@@ -287,16 +291,16 @@ 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.
+the beginning and end of each cell gets collapsed into one.
-| Command | Default key |
-|-------------------------------------+-------------|
-| ~latex-table-wizard-align~ | ~TAB~ |
+| Command | Default key |
+|----------------------------+-------------|
+| ~latex-table-wizard-align~ | ~TAB~ |
The following five tables illustrate the effect of calling
~latex-table-wizard-align~ repeatedly.
-This is the original cell:
+This is the original table:
#+begin_src LaTeX
\begin{tabular}{lll}
@@ -361,17 +365,17 @@ each of which just performs one of these transformations.
These are:
+ ~latex-table-wizard-compress~
** Extra commands in the transient prefix
-The transient interfaces invoked by ~latex-table-wizard~ also exposes
+The transient interfaces invoked by ~latex-table-wizard~ also expose
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~ |
+| Command | Default key |
+|---------------------------+-------------|
+| ~toggle-truncate-lines~ | ~t~ |
+| ~undo~ | ~/~ |
+| ~exchange-point-and-mark~ | ~x~ |
+| ~universal-argument~ | ~u~ |
+| ~transient-quit-one~ | ~RET~ |
* Known issues
@@ -401,7 +405,7 @@ through the Customize interface, call
~latex-table-wizard-customize~.
:PROPERTIES:
:CUSTOM_ID: custom-transient-prefix
:END:
-To change the default key bindings, you need to provide change the
+To change the default key bindings, you need to 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~.
@@ -448,7 +452,7 @@ Each member of this list is a string that would be between
the
:group 'latex-table-wizard)
#+end_src
- LaTeX-table-wizard will always presume the table you want operate on
+ LaTeX-table-wizard will always presume the table you want to 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
@@ -457,7 +461,7 @@ Each member of this list is a string that would be between
the
environments, you want LaTeX-table-wizard to adapt to this new
syntax.
- All you need to do add an appropriate cons cell to the
+ All you need to do is 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:
@@ -502,10 +506,10 @@ set, or you can just add a cons cell of your writing to
the alist:
'("mytable" . (:col ("!COL") :row ("!ROW") :lines
("horizontal"))))
#+end_src
-Each of the values in the plist is a list of strings: this way you can
+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
+LaTeX* macros, which means that they should not start with a
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.
@@ -518,11 +522,11 @@ hline macro if in a ~mytable~ environment.
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
+ If instead you want the 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
+ 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~.
@@ -570,12 +574,12 @@ want to change this default, set the value of
If ~latex-table-wizard-allow-detached-args~ is set to t (that is, if
detached arguments are allowed), you should not have in your table
-strings between braces or brackets after a macro without them be
+strings between braces or brackets after a macro without them being
separated by a blank line, unless these strings between braces or
-brackets are in fact the arguments of the macro. This is not a
+brackets are, in fact, the arguments of the macro. This is not a
problem for LaTeX, because it knows what is a valid macro and what
-isn't, and how many arguments a macro accepts: ~latex-table-wizard~
-however does not know it and it could get confused while parsing, and
+isn't, and how many arguments a macro accepts; ~latex-table-wizard~
+however, does not know it and it could get confused while parsing, and
thus get the start of the first cell wrong.
Good practice is to never separate arguments from each other or from
diff --git a/latex-table-wizard.texi b/latex-table-wizard.texi
index 06a4d95ec2..9ee36678e4 100644
--- a/latex-table-wizard.texi
+++ b/latex-table-wizard.texi
@@ -9,7 +9,7 @@
@finalout
@titlepage
@title @LaTeX{} table wizard - Magic editing of @LaTeX{} tables
-@subtitle for version 1.4.0
+@subtitle for version 1.5.5
@author Enrico Flor (@email{enrico@@eflor.net})
@end titlepage
@@ -21,7 +21,7 @@
@uref{https://melpa.org/#/latex-table-wizard,
file:https://melpa.org/packages/latex-table-wizard-badge.svg}
-Copyright (C) 2022, 2023 Enrico Flor.
+Copyright (C) 2022-2026 Enrico Flor.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -41,34 +41,6 @@ modify this GNU manual.”
* Known issues::
* Customization::
* Example setup without Transient interface (Emacs 28 and later)::
-
-@detailmenu
---- The Detailed Node Listing ---
-
-Available commands
-
-* Start editing::
-* Relative motion commands::
-* Absolute motion commands::
-* Mark, kill and insert commands: Mark kill and insert commands.
-* Swap adjacent fields::
-* Swap arbitrary fields::
-* Comment out cells::
-* Format the table::
-* Extra commands in the transient prefix::
-
-Known issues
-
-* Empty cells in single-column tables::
-
-Customization
-
-* Customize transient prefix::
-* Define rules for new environments::
-* Customizing faces::
-* Detached arguments::
-
-@end detailmenu
@end menu
@node Introduction
@@ -114,10 +86,10 @@ just as any other cell content.
@end example
Of course you can call @code{latex-table-wizard} with point inside of the
-embedded table, in which case any command you use will operate only on
+embedded table, in which case, any command you use will operate only on
the embedded table.
-For most of this document we will assume the table-like environment
+For most of this document, we will assume the table-like environment
has the standard @LaTeX{}2e syntax, but you can define your own types of
table-like environments (more on this @ref{Define rules for new environments,
, below}).
@@ -145,7 +117,7 @@ Whenever we say ``current'' we mean ``at point''.
@node Start editing
@section Start editing
-Just call @code{latex-table-wizard} when point is inside of table-like
+Just call @code{latex-table-wizard} when point is inside of a table-like
environment.
This commands actually activates the non-global minor mode
@@ -173,7 +145,7 @@ to 1.
@tab @code{p}
@end multitable
-With just one of these you can get anywhere you want in the table:
+With just one of these, you can get anywhere you want in a table.
@example
\begin@{tabular@}@{lll@}
@@ -249,7 +221,7 @@ following expressions will return nil and won't move point:
@multitable {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaa}
{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@headitem Command
@tab Default key
-@tab
+@tab Do@dots{}
@item @code{latex-table-wizard-edit-cell}
@tab @code{.}
@tab edit current cell
@@ -285,14 +257,14 @@ following expressions will return nil and won't move
point:
@tab delete current row
@item @code{exchange-point-and-mark}
@tab @code{x}
-@tab
+@tab exchange position of point and the mark
@end multitable
@code{latex-table-wizard-kill-cell-content} and
@code{latex-table-wizard-copy-cell-content} add the content of current cell
both to the kill ring (like the default kill and copy commands) and to
the value of a special variable: @code{latex-table-wizard-yank-cell-content}
-will replace the content of the current cell with whatever that value
+which will replace the content of the current cell with whatever that value
is.
@code{latex-table-wizard-delete-column} and
@code{latex-table-wizard-delete-row}
@@ -334,7 +306,12 @@ column/table, not just the content of the cells in them).
For these commands, think of the cells and columns as circular: if
there is no item in the direction given, the target is the one on the
-opposite end of the current cell. So for example:
+opposite end of the current cell.
+
+This is because these commands try to Do What You Mean if there is no
+suitable cell to move to.
+
+So, for example:
@example
\begin@{tabular@}@{lll@}
@@ -344,14 +321,11 @@ opposite end of the current cell. So for example:
\end@{tabular@}
@end example
-This is because these commands try to Do What You Mean if there is no
-suitable cell to move to:
-
Point on @code{C0}, @code{latex-table-wizard-swap-cell-right}
⇒
@example
\begin@{tabular@}@{lll@}
- C0 & B0 & A0 \\\hline
+ C0 & B0 & A0 \\\hline
A1 & B1 & C1 \\
A2 & B2 & C2
\end@{tabular@}
@@ -380,10 +354,10 @@ Point on @code{A1},
@code{latex-table-wizard-swap-column-right}
@node Swap arbitrary fields
@section Swap arbitrary fields
-To swap arbitrary fields one must first @strong{select} something and then move
+To swap arbitrary fields, one must first @strong{select} something and then
move
point somewhere else and perform the swap. Importantly, @strong{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
+(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
@@ -410,7 +384,7 @@ selected:
@tab deselect all
@end multitable
-The first command, @code{latex-table-wizard-select-deselect-cell} toggles the
+The first command, @code{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
@@ -439,18 +413,18 @@ otherwise, on the current cell point is on.
@multitable {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaa}
{aaaaaaaaaaaaaaaaaaa}
@headitem Command
@tab Default key
-@tab Select current@dots{}
+@tab Comment out current@dots{}
@item @code{latex-table-wizard-comment-out-content}
@tab @code{; c}
-@tab comment out content
+@tab cell content
@item @code{latex-table-wizard-comment-out}
@tab @code{; ;}
-@tab comment out
+@tab cell
@end multitable
The difference between the two is that one only comments out the
content, preserving both delimiters around the cell; the other one
-actually modifies the structure of the table because for any cell that
+actually modifies the structure of the table because, for any cell that
is commented out, one delimiter around it is commented out too.
@node Format the table
@@ -462,7 +436,7 @@ 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.
+the beginning and end of each cell gets collapsed into one.
@multitable {aaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaa}
@headitem Command
@@ -474,7 +448,7 @@ the beginning and end of each cell is collapsed into one.
The following five tables illustrate the effect of calling
@code{latex-table-wizard-align} repeatedly.
-This is the original cell:
+This is the original table:
@example
\begin@{tabular@}@{lll@}
@@ -547,7 +521,7 @@ each of which just performs one of these transformations.
These are:
@node Extra commands in the transient prefix
@section Extra commands in the transient prefix
-The transient interfaces invoked by @code{latex-table-wizard} also exposes
+The transient interfaces invoked by @code{latex-table-wizard} also expose
some other commands that are not defined by this package but are
useful for its usage. These are:
@@ -605,7 +579,7 @@ through the Customize interface, call
@code{latex-table-wizard-customize}.
@node Customize transient prefix
@section Customize transient prefix
-To change the default key bindings, you need to provide change the
+To change the default key bindings, you need to change the
value of the alist @code{latex-table-wizard-transient-keys}. The easiest and
most convenient way to do it is through @code{latex-table-wizard-customize}.
@@ -651,7 +625,7 @@ Each member of this list is a string that would be between
the
:group 'latex-table-wizard)
@end lisp
-@LaTeX{}-table-wizard will always presume the table you want operate on
+@LaTeX{}-table-wizard will always presume the table you want to 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 @code{mytable}, that
@@ -660,7 +634,7 @@ uses @code{!ROW} and @code{!COL} instead of @code{&} and
@code{\\} as delimiters
environments, you want @LaTeX{}-table-wizard to adapt to this new
syntax.
-All you need to do add an appropriate cons cell to the
+All you need to do is add an appropriate cons cell to the
@code{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 @code{defcustom} expression:
@@ -705,10 +679,10 @@ set, or you can just add a cons cell of your writing to
the alist:
'("mytable" . (:col ("!COL") :row ("!ROW") :lines
("horizontal"))))
@end lisp
-Each of the values in the plist is a list of strings: this way you can
+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 @code{:lines} list are
@strong{names of
-@LaTeX{}} macros, which means that they should not start with the
+@LaTeX{}} macros, which means that they should not start with a
backslash and you should not add any argument to them. In the example
above a buffer substring like @samp{\horizontal@{1@}} will be interpreted as a
hline macro if in a @code{mytable} environment.
@@ -722,11 +696,11 @@ that you can clearly focus on the table. If you don't
want this to
happen, set the value of the variable @code{latex-table-wizard-no-focus} to
@code{t}.
-If instead you want effect to be different than the default (which is
+If instead you want the effect to be different than the default (which is
applying a foreground of color @code{gray40}), change the value of the face
@code{latex-table-wizard-background}.
-By default, when you move around the table and select objects from it
+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
@code{latex-table-wizard-no-highlight} to @code{t}.
@@ -762,12 +736,12 @@ want to change this default, set the value of
If @code{latex-table-wizard-allow-detached-args} is set to t (that is, if
detached arguments are allowed), you should not have in your table
-strings between braces or brackets after a macro without them be
+strings between braces or brackets after a macro without them being
separated by a blank line, unless these strings between braces or
-brackets are in fact the arguments of the macro. This is not a
+brackets are, in fact, the arguments of the macro. This is not a
problem for @LaTeX{}, because it knows what is a valid macro and what
isn't, and how many arguments a macro accepts: @code{latex-table-wizard}
-however does not know it and it could get confused while parsing, and
+however, does not know it and it could get confused while parsing, and
thus get the start of the first cell wrong.
Good practice is to never separate arguments from each other or from