all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: harven <harven@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: Quick insert of characters into a column?
Date: Wed, 24 Jun 2009 08:55:47 +0200	[thread overview]
Message-ID: <m2my7yce8c.fsf@free.fr> (raw)
In-Reply-To: 7e588b3f-b88f-4ca5-abb9-f43c9348792c@c19g2000prh.googlegroups.com

Chad <chad.jones@gmail.com> writes:

> Hi,
>
> I'm using emacs to edit a latex file to create a table with many rows,
> say 20.  I need to insert & to separate the columns, so I need a
> column of 20 ampersands.
>
> What is the quickest way to do this?  I'd like to highlight a region
> (column) and then tell emacs to insert the ampersand into that region,
> but I can't figure out how to do this.
>
> Thanks for your help!
>
> Chad

Instead of manually creating the table, I would suggest using templates
provided by emacs. 

M-x table-insert

you are then prompted for the number of columns, of rows, the width
of the cell and their height.

Fill the template if you want. When you're done, generate the latex source with

M-x table-generate-source

you are then prompted for the language (latex), the name of a buffer
where goes the result, and a title for the table. That's it.
If you didn't fill the template, you get something like this

% This LaTeX table template is generated by emacs 22.1.1
\begin{tabular}{|l|l|l|}
\hline
lala & ceci & tous \\
\hline
 & & \\
\hline
 & & \\
...
\hline
 & & \\
\hline
 & & \\
\hline
\end{tabular}

Have a look at the wiki for more details
http://www.emacswiki.org/emacs/TableMode


  parent reply	other threads:[~2009-06-24  6:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 23:38 Quick insert of characters into a column? Chad
2009-06-24  3:10 ` Joost Kremers
2009-06-24  6:55 ` harven [this message]
2009-06-24 16:46   ` Chad
2009-06-30 17:57 ` Ken Goldman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2my7yce8c.fsf@free.fr \
    --to=harven@free.fr \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.