chasberry / orgmode-accessories

Add ons for orgmode
78 stars 18 forks source link

Link and Caption .Rnw #10

Closed ybkamaleri closed 4 years ago

ybkamaleri commented 8 years ago

How to get internal link properly from org file when converting to .Rnw? Eg.

#+NAME: plot1
#+CAPTION: Plot testing
#+ATTR_RAVEL: echo=FALSE
#+BEGIN_SRC R
  x <- 1:30
  plot(x)
#+END_SRC

What I mean is that, to make internal link for plot1 for example in org then we just write [[plot1]], but when converted to .Rnw to .tex, the link doesn't work. The output in .Rnw file is \ref{orgsrcblock1} instead of \ref{fig:plot1}

What is the solution to make .Rnw convert #+NAME: plot1 to \ref{fig:plot1} correctly?

By the way, it works when converted to .Rmd.

For Caption, is there any method of getting it directly from Org Caption without specifying it in #+ATTR_RAVEL or :ravel options just like what is done with Org name/label?

Thanks for a great work! :+1:

chasberry commented 8 years ago

Note my response to https://github.com/chasberry/orgmode-accessories/issues/9 answers the caption part of this issue and comments on the link issue.