From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: Quick insert of characters into a column? Date: Wed, 24 Jun 2009 08:55:47 +0200 Organization: http://groups.google.com Message-ID: References: <7e588b3f-b88f-4ca5-abb9-f43c9348792c@c19g2000prh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1245829250 6080 80.91.229.12 (24 Jun 2009 07:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jun 2009 07:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 24 09:40:43 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MJN62-0005ko-4i for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2009 09:40:42 +0200 Original-Received: from localhost ([127.0.0.1]:34370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJN61-0004FZ-Jh for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2009 03:40:41 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!newsserver.news.garr.it!newsserver.cilea.it!univ-lyon1.fr!news.cs.univ-paris8.fr!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp4-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Cancel-Lock: sha1:D0m5ifn8x/IZNhGJrgTd4OYojLs= Original-Lines: 50 Original-NNTP-Posting-Date: 24 Jun 2009 08:55:47 MEST Original-NNTP-Posting-Host: 82.240.200.149 Original-X-Trace: 1245826547 news-3.free.fr 9919 82.240.200.149:49826 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:170251 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65471 Archived-At: Chad 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