Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is not <em>exactly</em> the answer, but this is how I was doing it:</p> <ol> <li><p>Align on &amp;, for example: <kbd>C-x . &amp;</kbd>.</p></li> <li><p>Select the entire column I need using regular selection commands.</p></li> <li><p>Cut a rectangular area by using <kbd>C-x r k</kbd>.</p></li> </ol> <p>This is not super automatic, but given some exercise isn't really a hurdle, except, perhaps, if you have to re-format some old document and make a lot of changes all at once.</p> <p><strong>EDIT</strong></p> <pre class="lang-lisp prettyprint-override"><code>(defun latex-merge-next-column (start end column) "Works on selected region, removes COLUMN'th ampersand in every line in the selected region" (interactive "r\nnColumn to merge: ") (labels ((%nth-index-of (line) (let ((i -1) (times 0)) (while (and (&lt; times column) i) (setq i (position ?\&amp; line :start (1+ i)) times (1+ times))) i))) (let ((region (split-string (buffer-substring start end) "\n")) amp-pos replacement) (dolist (line region) (setq amp-pos (%nth-index-of line) replacement (cons (if amp-pos (concat (subseq line 0 amp-pos) (subseq line (1+ amp-pos))) line) replacement))) (kill-region start end) (insert (mapconcat #'identity (reverse replacement) "\n"))))) </code></pre> <p>This would work on the selected region and remove the n'th ampersand in every line. You could bind it to some key that is comfortable for you, say:</p> <pre class="lang-lisp prettyprint-override"><code>(global-set-key (kbd "C-c C-n") 'latex-merge-next-column) </code></pre> <p>Then <kbd>C-c C-n 2</kbd> would remove every second ampersand in the selected lines.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload