Re: [O] Unexpected behaviour with gnuplot source blocks

2013-06-22 Thread Achim Gratz
Eric Schulte writes:
 #+BEGIN_SRC gnuplot :file test.eps
   reset
   ^
   WRT |, I've also added the *org-babel-gnuplot-prefix* variable, which
 may be set to e.g., reset to reset the gnuplot process between code
 blocks.

We have recently introduced similar functionality in ob-perl and it
probably deserves a more general treatment and easier customization.
Doing these things with defcustoms or defvars should be shunned, since
it makes Org files using these options inherently unportable and
non-self-contained.

For the functionality that is implemented here, I'd think two new
general header arguments are appropriate, namely :prolog and :epilog,
which should take the name of a source block (same language), a literal
string in quotes, the result of an inline call of another source block
and inline elisp (the result of execution must be in the appropriate
syntax) as an argument.  We might need some friendlier way than elisp if
we want to use URL (esp. file:…) in the same capacity.  For session
execution there may be a need to distibguish between the session start,
subsequent invocations and perhaps closing of the session (we don't have
that at the moment, I think).


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] One more question on bibliographies in Org

2013-06-22 Thread Richard Lawrence
Vincent Beffara vbeff...@ens-lyon.fr writes:


 The main question is: what would be a convenient way to store the
 references in the .org file, to allow for easy editing and exporting ?

Have you looked at org-bibtex?  It stores bibliographic data as
properties.

I keep a separate Org headline for each reading I do, under which I
write notes, etc.  I use org-bibtex to store the bibliographic data for
each of these entries, and a custom elisp function (which basically just
maps org-bibtex-headline over these entries) to generate a .bib file on
demand.

I imagine it would be easy enough to modify org-bibtex to also provide
an export bibliographic data to some HTML-friendly format.

-- 
Best,
Richard






Re: [O] One more question on bibliographies in Org

2013-06-22 Thread Richard Lawrence
Richard Lawrence richard.lawre...@berkeley.edu writes:

 I imagine it would be easy enough to modify org-bibtex to also provide
 an export bibliographic data to some HTML-friendly format.

Actually, it looks like the (relatively new) contrib/lisp/ox-bibtex.el
does basically this, by running a .bib file through bibtex2html.

Best,
Richard




[O] Displaying regression results from R in beamer

2013-06-22 Thread Vikas Rawal
I want to display regression results from an R source block in a
beamer export. The best I could find was to use R libraries stargazer
or texreg to produce latex code from the regression results.

However, when I use 

#+BEGIN_SRC R :results value latex
R source block here
#+END_SRC

The output I get is enclosed in | on both sides:

#+BEGIN_LaTeX
|   
  |
| % Table created by StarGazer v.3.0.1 by Marek Hlavac, Harvard University. 
E-mail: hlavac at fas.harvard.edu |
| % Date and time: Sun, Jun 23, 2013 - 07:41:02 
  |
| \begin{table}[htb] \centering 
  |
| \caption{}
  |
| \label{}  
  |
| \footnotesize 
  |
|   
  |
| \begin{tabular}{@{\extracolsep{5pt}}lc}   
  |
| \\[-1.8ex]\hline  
  |
| \hline \\[-1.8ex] 
  |
|  \multicolumn{1}{c}{\textit{Dependent variable:}} \\ 
  |
| \cline{2-2}   
  |
| \\[-1.8ex]  Days\_per\_capita\_men \\
  |
| \hline \\[-1.8ex] 
  |
| Land\_cultivated  $0.015$ \\ 
  |
|  $(0.027)$ \\
  |
|  \\  
  |
| Social\_groupScheduled tribe  $0.336^{***}$ \\   
  |
|  $(0.076)$ \\
  |
|  \\  
  |
| Social\_groupMuslim  $-0.022$ \\ 
  |
|  $(0.098)$ \\
  |
|  \\  
  |
| Social\_groupOthers  $0.141^{**}$ \\ 
  |
|  $(0.063)$ \\
  |
|  \\  
  |
| Household\_type2  $0.775^{***}$ \\   
  |
|  $(0.105)$ \\
  |
|  \\  
  |
| Household\_type3  $0.987^{***}$ \\   
  |
|  $(0.100)$ \\
  |
|  \\  
  |
| Household\_type4  $-0.277^{**}$ \\   
  |
|  $(0.120)$ \\
  |
|  \\  
  |
| Household\_type9  $0.684^{***}$ \\   
  |
|  $(0.175)$ \\
  |
|  \\  
  |
| Constant  $4.538^{***}$ \\   
  |
|  $(0.102)$ \\
  |
|  \\

Re: [O] Unexpected behaviour with gnuplot source blocks

2013-06-22 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:
 #+BEGIN_SRC gnuplot :file test.eps
   reset
   ^
   WRT |, I've also added the *org-babel-gnuplot-prefix* variable, which
 may be set to e.g., reset to reset the gnuplot process between code
 blocks.

 We have recently introduced similar functionality in ob-perl and it
 probably deserves a more general treatment and easier customization.
 Doing these things with defcustoms or defvars should be shunned, since
 it makes Org files using these options inherently unportable and
 non-self-contained.


Agreed.


 For the functionality that is implemented here, I'd think two new
 general header arguments are appropriate, namely :prolog and :epilog,

I've added prologue and epilogue header arguments.  They are implemented
for gnuplot and any language which uses `org-babel-expand-body:generic'.

The particular case of closing the gnuplot output terminal does not use
the epilogue, but rather happens automatically only in those cases in
which the output is explicitly set.

 
 which should take the name of a source block (same language), a
 literal string in quotes, the result of an inline call of another
 source block and inline elisp (the result of execution must be in the
 appropriate syntax) as an argument.  We might need some friendlier way
 than elisp if we want to use URL (esp. file:…) in the same capacity.
 For session execution there may be a need to distibguish between the
 session start, subsequent invocations and perhaps closing of the
 session (we don't have that at the moment, I think).


I think standard header arguments should suffice.

Thanks,



 Regards,
 Achim.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte