From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Alexander Gerds Subject: Re: Latex export of tables Date: Tue, 16 Apr 2013 15:13:40 +0200 Message-ID: References: <20130412080600.GA18235@panahar> <20130414232953.GC11696@kuru.dyndns-at-home.com> <20130416115619.GA12405@panahar> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US6JV-0006Or-1r for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 09:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US63v-0006OM-PP for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 09:36:56 -0400 Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]:49164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US5hg-0007i5-2w for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 09:13:44 -0400 Received: by mail-ea0-f173.google.com with SMTP id k11so233112eaj.32 for ; Tue, 16 Apr 2013 06:13:42 -0700 (PDT) In-Reply-To: <20130416115619.GA12405@panahar> (Vikas Rawal's message of "Tue, 16 Apr 2013 17:26:19 +0530") 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: Vikas Rawal Cc: emacs-orgmode@gnu.org 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=20 tab <- matrix(1:12,nrow=3D4) 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=3D"&"),"\\\\\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 writes: >> > I am using org-mode version 8.0-pre (release_8.0-pre-247-gbc3ccd @ >> > /home/vikas/lisp/org-mode/lisp/). >> >=20 >> > 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} >> >=20 >> > \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, =D8ster Farimagsgade 5, 1014 Copenhagen, Denmark Office: CSS-15.2.07 (Gamle Kommunehospital) tel: 35327914 (sec: 35327901)=20