From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: label and ref in latex export Date: Wed, 10 Oct 2012 17:04:44 -1000 Message-ID: References: <20121011012131.GA20544@panahar> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM94x-000415-8M for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 23:04:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TM94v-0000xO-U0 for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 23:04:55 -0400 Received: from oproxy12-pub.bluehost.com ([50.87.16.10]:35713) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TM94v-0000sM-JG for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 23:04:53 -0400 Received: from [72.253.173.33] (port=50354 helo=poto.myhome.westell.com) by box472.bluehost.com with esmtpa (Exim 4.76) (envelope-from ) id 1TM94r-000842-51 for emacs-orgmode@gnu.org; Wed, 10 Oct 2012 21:04:49 -0600 In-Reply-To: <20121011012131.GA20544@panahar> (Vikas Rawal's message of "Thu, 11 Oct 2012 10:21:32 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Aloha Vikas, Perhaps "table *" -> "table*"? All the best, Tom Vikas Rawal writes: > The following has been taken from my org file. > > ------------- > > #+CAPTION: Average output, cost and net income per acre, by area, (2005-06 prices) > #+LABEL: tab:avprofit > #+ATTR_LATEX: table * tabulary width=\textwidth align=l|RRRR > #+BEGIN_SRC R :results value raw :colnames yes :hline yes > subset(a,Crop_group=="Paddy")->a > a[,c(8:10)]*a[,6]/a[,7]->a[,c(8:10)] > vtab1(a,8,10,1,wtd.mean)->a1 > round(as.numeric(as.character(a1[,2])))->a1[,2] > round(as.numeric(as.character(a1[,3])))->a1[,3] > round(as.numeric(as.character(a1[,4])))->a1[,4] > names(a1)<-c("Area","output","Cost","Net income") > #+END_SRC > > \ref{tab:avprofit} shows that the average levels of are highest in > Area 7. > > ------------------ > > When I export it to latex/pdf, \ref{tab:avprofit} is just shown as ??. > What am I not doing correctly? > > Also, is it okay if the text where the table is referenced comes > before the table (and therefore its label) itself? > > Vikas > > -- Thomas S. Dye http://www.tsdye.com