branch: externals/auctex commit edabf207b4d66005d3828cb1b5135b7c07e38095 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Insert a space between \caption and \\ in tables * style/longtable.el (LaTeX-env-longtable): * style/xltabular.el (LaTeX-env-xltabular): Insert a space between the end of \caption macro and \\. --- style/longtable.el | 11 ++++++----- style/xltabular.el | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/style/longtable.el b/style/longtable.el index 8db4083c66..55384bca4c 100644 --- a/style/longtable.el +++ b/style/longtable.el @@ -88,11 +88,12 @@ insert line break macro." (insert TeX-grop caption) ;; ask for a label and insert it (LaTeX-label environment 'environment) - ;; the longtable `\caption' is equivalent to a - ;; `\multicolumn', so it needs a `\\' at the - ;; end of the line. Prior to that, add } to - ;; close `\caption{' - (insert TeX-grcl "\\\\") + ;; the longtable `\caption' is equivalent to a `\multicolumn', + ;; so it needs a `\\' at the end of the line. Prior to that, + ;; add } to close `\caption{' and a space: + (insert TeX-grcl) + (just-one-space) + (insert "\\\\") ;; fill the caption (when auto-fill-function (LaTeX-fill-paragraph)) ;; Insert a new line and indent diff --git a/style/xltabular.el b/style/xltabular.el index 3fb3e0d220..bcd190b7ce 100644 --- a/style/xltabular.el +++ b/style/xltabular.el @@ -87,11 +87,12 @@ nested curly brace pair nor escaped \"}\".") (insert TeX-grop caption) ;; ask for a label and insert it (LaTeX-label environment 'environment) - ;; the longtable `\caption' is equivalent to a - ;; `\multicolumn', so it needs a `\\' at the - ;; end of the line. Prior to that, add } to - ;; close `\caption{' - (insert TeX-grcl "\\\\") + ;; the longtable `\caption' is equivalent to a `\multicolumn', + ;; so it needs a `\\' at the end of the line. Prior to that, + ;; add } to close `\caption{' and a space: + (insert TeX-grcl) + (just-one-space) + (insert "\\\\") ;; fill the caption (when auto-fill-function (LaTeX-fill-paragraph)) ;; Insert a new line and indent