[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Latex export of tables
From: |
Thomas Alexander Gerds |
Subject: |
Re: [O] Latex export of tables |
Date: |
Tue, 16 Apr 2013 15:13:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Hi Vikas
I am not sure I understand the problem correctly, but how about this?
Here is a table produced by a R-src block
with some descriptive text in a minipage:
-----------------------snip----------------------------------------------
#+BEGIN_SRC R :results output latex :exports results :session *R* :cache yes
tab <- matrix(1:12,nrow=4)
cat("\n\\begin{table}\n")
cat("\\begin{minipage}{\\textwidth}\n")
cat("\\tiny{ Note: some descriptive text}\n")
cat("\\end{minipage}\n")
nix <- apply(tab,1,function(x)cat(paste(x,collab="&"),"\\\\\n"))
cat("\\end{table}\n")
#+END_SRC
#+RESULTS[<2013-04-16 15:11:58> 964853177d477abc1cba212a72dde1f7cf3251c0]:
#+BEGIN_LaTeX
\begin{table}
\begin{minipage}{\textwidth}
\tiny{ Note: some descriptive text}
\end{minipage}
1 & 5 & 9 & \\
2 & 6 & 10 & \\
3 & 7 & 11 & \\
4 & 8 & 12 & \\
\end{table}
#+END_LaTeX
-----------------------snap----------------------------------------------
cheers Thomas
Vikas Rawal <address@hidden> writes:
>> > I am using org-mode version 8.0-pre (release_8.0-pre-247-gbc3ccd @
>> > /home/vikas/lisp/org-mode/lisp/).
>> >
>> > I have a table generated by a source block in a document that I
>> > would like to export to latex. In the exported tex file, I would
>> > like org to insert a line like the following between \end(tabular}
>> > and \end{table}
>> >
>> > \begin{minipage}{\textwidth} \tiny Note: Some descriptive text
>> > here. \end{minipage}
>> I do not think this is possible. You have to realise that Org does
>> not aim to support everything you can do with a backend natively.
>> One of the primary reasons for that is the backend agnostic
>> abstraction provided by Org.
>
> I have seen some way of doing things like this. See section 13.3 at
> http://orgmode.org/worg/org-tutorials/org-latex-export.html
>
> I can't get it to work though. Will keep trying.
>
>> When in need of specific needs like this, I resort to writing LaTeX
>> natively.
>
> I guess one thing about org-mode is that it is addictive. Afterall, if
> it is something to do with manipulating text, it ought to be possible
> :)
>
> There is also a reason for not doing it natively in latex even if the
> org-mode solution is somewhat round-about. I am writing a research
> paper using orgmode, with embedded R source blocks in it. I do not
> mind embedding some latex source block into it but I would not like to
> edit an exported latex file. After all, in the end, the objective is
> to be able to have an org file which produces a full paper when
> exported.
>
> Vikas
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Ă˜ster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901)
- [O] Latex export of tables, Vikas Rawal, 2013/04/12
- Re: [O] Latex export of tables, Suvayu Ali, 2013/04/14
- Re: [O] Latex export of tables, Vikas Rawal, 2013/04/16
- Re: [O] Latex export of tables,
Thomas Alexander Gerds <=
- Re: [O] Latex export of tables, Suvayu Ali, 2013/04/16
- Re: [O] Latex export of tables, Thomas S. Dye, 2013/04/16
- Re: [O] Latex export of tables, Suvayu Ali, 2013/04/16
- Re: [O] Latex export of tables, Thomas S. Dye, 2013/04/16
- Re: [O] Latex export of tables, Myles English, 2013/04/17
- [O] Best practices for literate programming [was: Latex export of tables], Vikas Rawal, 2013/04/16
- Re: [O] Best practices for literate programming [was: Latex export of tables], Thomas S. Dye, 2013/04/16
- Re: [O] Best practices for literate programming [was: Latex export of tables], Rasmus, 2013/04/18
- Re: [O] Best practices for literate programming [was: Latex export of tables], Aaron Ecay, 2013/04/18
- Re: [O] Best practices for literate programming [was: Latex export of tables], Rasmus, 2013/04/18