From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: latex export and booktabs tables Date: Tue, 22 Jun 2010 13:03:32 -1000 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38659 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORCVJ-0003vS-Lg for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 19:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORCVI-0004Vr-7w for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 19:03:41 -0400 Received: from oproxy2-pub.bluehost.com ([67.222.39.60]:45739) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1ORCVH-0004VU-UF for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 19:03:40 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Butz Cc: emacs-orgmode@gnu.org Aloha Erik, The rules defined in booktabs work with longtables, if that is what you are asking. All the best, Tom On Jun 22, 2010, at 11:36 AM, Erik Butz wrote: > Hi all, > > I found a very old thread on the list about using the booktabs package > to have nicer tables in latex export. > > I found that, making the changes below I can use the booktab package > to export tables, and using standard tables only, this seems to work > fine. > > Can anyone advice on whether this kind of change is meaningful or if > this is likely to introduce difficulties elsewhere which I did not > experience due to the limited scope of usage? It should be said that I > did not at all look into longtables so far. > > Cheers, > > Erik > > diff --git a/lisp/org-latex.el b/lisp/org-latex.el > index 01a4b05..31ceba4 100644 > --- a/lisp/org-latex.el > +++ b/lisp/org-latex.el > @@ -1658,7 +1658,7 @@ The conversion is made depending of > STRING-BEFORE and STRING-AFTER." > (if (and longtblp caption) "\\\\\n" "\n") > (if (and org-export-latex-tables-centered > (not longtblp)) > "\\begin{center}\n") > - (if (not longtblp) (concat > "\\begin{tabular}{" align "}\n")) > + (if (not longtblp) (concat > "\\begin{tabular}{" align "}\n\\toprule\n")) > (orgtbl-to-latex > lines > `(:tstart nil :tend nil > @@ -1670,7 +1670,7 @@ The conversion is made depending of > STRING-BEFORE and STRING-AFTER." > \\endfoot > \\endlastfoot" (length org-table-last-alignment)) > nil))) > - (if (not longtblp) (concat "\n\ > \end{tabular}")) > + (if (not longtblp) (concat > "\n\\bottomrule\n\\end{tabular}")) > (if longtblp "\n" (if org-export-latex- > tables-centered > "\n\\end{center}\n" > "\n")) > (if longtblp > diff --git a/lisp/org-table.el b/lisp/org-table.el > index 46efc28..130ccf2 100644 > --- a/lisp/org-table.el > +++ b/lisp/org-table.el > @@ -4222,7 +4222,7 @@ this function is called." > :tstart (concat "\\begin{tabular}{" alignment "}") > :tend "\\end{tabular}" > :lstart "" :lend " \\\\" :sep " & " > - :efmt "%s\\,(%s)" :hline "\\hline"))) > + :efmt "%s\\,(%s)" :hline "\\midrule"))) > (orgtbl-to-generic table (org-combine-plists params2 params)))) > > (defun orgtbl-to-html (table params) > diff --git a/lisp/org.el b/lisp/org.el > index 2628152..ed6dabe 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -3087,6 +3087,7 @@ will be appended." > ("" "wasysym" t) > ("" "latexsym" t) > ("" "amssymb" t) > + ("" "booktabs" t) > ("" "hyperref" nil) > "\\tolerance=1000" > ) > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode