* label and ref in latex export
@ 2012-10-11 1:21 Vikas Rawal
2012-10-11 3:04 ` Thomas S. Dye
0 siblings, 1 reply; 8+ messages in thread
From: Vikas Rawal @ 2012-10-11 1:21 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: label and ref in latex export
2012-10-11 1:21 label and ref in latex export Vikas Rawal
@ 2012-10-11 3:04 ` Thomas S. Dye
2012-10-11 3:53 ` Vikas Rawal
0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2012-10-11 3:04 UTC (permalink / raw)
To: emacs-orgmode
Aloha Vikas,
Perhaps "table *" -> "table*"?
All the best,
Tom
Vikas Rawal <vikaslists@agrarianresearch.org> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: label and ref in latex export
2012-10-11 3:04 ` Thomas S. Dye
@ 2012-10-11 3:53 ` Vikas Rawal
2012-10-11 7:15 ` Thomas S. Dye
0 siblings, 1 reply; 8+ messages in thread
From: Vikas Rawal @ 2012-10-11 3:53 UTC (permalink / raw)
To: emacs-orgmode
> Aloha Vikas,
>
> Perhaps "table *" -> "table*"?
>
I have corrected that. But it still says "Exporting to PDF...done, with some
errors: [undefined reference]"
The warning [undefined reference] seems to be on account of not
finding the label reference.
Vikas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: label and ref in latex export
2012-10-11 3:53 ` Vikas Rawal
@ 2012-10-11 7:15 ` Thomas S. Dye
2012-10-11 8:34 ` Vikas Rawal
0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2012-10-11 7:15 UTC (permalink / raw)
To: emacs-orgmode
You might want to check the .tex file to see if the label is there.
Also, compiling with LaTeX yields a detailed log, which will tell you
the line number of errors and warnings. You could look there to pinpoint
the error(s).
Tom
Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>> Aloha Vikas,
>>
>> Perhaps "table *" -> "table*"?
>>
>
> I have corrected that. But it still says "Exporting to PDF...done, with some
> errors: [undefined reference]"
>
> The warning [undefined reference] seems to be on account of not
> finding the label reference.
>
> Vikas
>
>
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: label and ref in latex export
2012-10-11 7:15 ` Thomas S. Dye
@ 2012-10-11 8:34 ` Vikas Rawal
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Rawal @ 2012-10-11 8:34 UTC (permalink / raw)
To: emacs-orgmode
On Wed, Oct 10, 2012 at 09:15:52PM -1000, Thomas S. Dye wrote:
> You might want to check the .tex file to see if the label is there.
> Also, compiling with LaTeX yields a detailed log, which will tell you
> the line number of errors and warnings. You could look there to pinpoint
> the error(s).
I was using this in the preamble:
#+LaTeX_HEADER: \usepackage[hmargin=3cm,vmargin=3.5cm]{geometry}
This was conflicting with my use of tabulary. I remove this line and
the errors disappeared.
Thanks very much for pointers.
Vikas
^ permalink raw reply [flat|nested] 8+ messages in thread
* label and ref in latex export
@ 2009-01-19 19:26 Manish
2009-01-19 20:47 ` Carsten Dominik
0 siblings, 1 reply; 8+ messages in thread
From: Manish @ 2009-01-19 19:26 UTC (permalink / raw)
To: Emacs-orgmode mailing list
Hello,
How do I refer to labels created for tables and figures in Org mode so
it appears in LaTeX export?
Currently I am using a BEGIN_LaTeX and END_LaTeX to enclose \ref like
so. I am sure this is not how it was intended to be used but I couldn't
locate anything in documentation.
,----
| Please see figure
| #+BEGIN_LaTeX
| \ref{fig:results}
| #+END_LaTeX
|
| #+CAPTION: Business Transaction over Business Units
| #+LABEL: fig:results
| [[./xxxxx.png]]
| #+ATTR_LaTeX: scale=0.7
`----
Thanks,
--
Manish
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: label and ref in latex export
2009-01-19 19:26 Manish
@ 2009-01-19 20:47 ` Carsten Dominik
2009-01-20 2:30 ` Manish
0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-01-19 20:47 UTC (permalink / raw)
To: Manish; +Cc: Emacs-orgmode mailing list
On Jan 19, 2009, at 8:26 PM, Manish wrote:
> Hello,
>
> How do I refer to labels created for tables and figures in Org mode so
> it appears in LaTeX export?
>
> Currently I am using a BEGIN_LaTeX and END_LaTeX to enclose \ref like
> so. I am sure this is not how it was intended to be used but I
> couldn't
> locate anything in documentation.
>
> ,----
> | Please see figure
> | #+BEGIN_LaTeX
> | \ref{fig:results}
> | #+END_LaTeX
> |
> | #+CAPTION: Business Transaction over Business Units
> | #+LABEL: fig:results
> | [[./xxxxx.png]]
> | #+ATTR_LaTeX: scale=0.7
> `----
Just write \ref{fig:results} anywhere in the text and you should be
fine.
And the ATTR_LaTeX: has to be *before* the link to the figure.
- Carsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: label and ref in latex export
2009-01-19 20:47 ` Carsten Dominik
@ 2009-01-20 2:30 ` Manish
0 siblings, 0 replies; 8+ messages in thread
From: Manish @ 2009-01-20 2:30 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Emacs-orgmode mailing list
On Tue, Jan 20, 2009 at 2:17 AM, Carsten Dominik wrote:
>
> On Jan 19, 2009, at 8:26 PM, Manish wrote:
>
>> Hello,
>>
>> How do I refer to labels created for tables and figures in Org mode so
>> it appears in LaTeX export?
>>
>> Currently I am using a BEGIN_LaTeX and END_LaTeX to enclose \ref like
>> so. I am sure this is not how it was intended to be used but I couldn't
>> locate anything in documentation.
>>
>> ,----
>> | Please see figure
>> | #+BEGIN_LaTeX
>> | \ref{fig:results}
>> | #+END_LaTeX
>> |
>> | #+CAPTION: Business Transaction over Business Units
>> | #+LABEL: fig:results
>> | [[./xxxxx.png]]
>> | #+ATTR_LaTeX: scale=0.7
>> `----
>
>
> Just write \ref{fig:results} anywhere in the text and you should be fine.
I did not realize that I could put that literal LaTeX in text which can
then be processed by PDFLaTeX.
>
>
> And the ATTR_LaTeX: has to be *before* the link to the figure.
Yes, I switched it by mistake while creating the example.
Thank you.
--
Manish
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-10-11 8:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 1:21 label and ref in latex export Vikas Rawal
2012-10-11 3:04 ` Thomas S. Dye
2012-10-11 3:53 ` Vikas Rawal
2012-10-11 7:15 ` Thomas S. Dye
2012-10-11 8:34 ` Vikas Rawal
-- strict thread matches above, loose matches on Subject: below --
2009-01-19 19:26 Manish
2009-01-19 20:47 ` Carsten Dominik
2009-01-20 2:30 ` Manish
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).