From mboxrd@z Thu Jan 1 00:00:00 1970 From: RCY Subject: Booktabs in new LaTeX exporter Date: Thu, 27 Dec 2012 18:57:29 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d044469094b055104d1de4fb4 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToNKQ-00072q-3W for Emacs-orgmode@gnu.org; Thu, 27 Dec 2012 18:57:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToNKN-0004AB-Cp for Emacs-orgmode@gnu.org; Thu, 27 Dec 2012 18:57:34 -0500 Received: from mail-oa0-f52.google.com ([209.85.219.52]:53724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToNKN-00049y-6Q for Emacs-orgmode@gnu.org; Thu, 27 Dec 2012 18:57:31 -0500 Received: by mail-oa0-f52.google.com with SMTP id o6so9189766oag.25 for ; Thu, 27 Dec 2012 15:57:30 -0800 (PST) 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: Emacs-orgmode@gnu.org --f46d044469094b055104d1de4fb4 Content-Type: text/plain; charset=ISO-8859-1 I am trying to use the booktabs package for tables in the new exporter, however I am unable to get \toprule, etc instead of \hrule I would appreciate any suggestions to fix this. As a minimal example, I started emacs -q, and evaluated the following: (setq org-install-dir "~/.emacs.d/src/org-mode") (add-to-list 'load-path (concat org-install-dir "/contrib/lisp")) (add-to-list 'load-path (concat org-install-dir "/lisp")) (require 'org-e-latex) (add-to-list 'org-e-latex-classes '("article" "\\documentclass[11pt]{article} \[DEFAULT-PACKAGES] \[PACKAGES] \[EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) -----org.file----------- #+LATEX_CLASS: article #+LATEX_HEADER: \usepackage{booktabs} * Test #+ATTR_LATEX: :booktabs #+CAPTION: Test table |----+----| | 1 | 2 | |----+----| | A1 | A2 | | B1 | B2 | | C1 | C2 | |----+----| ------latex-buffer from org-export-latex-as-buffer------- % Created 2012-12-27 Thu 18:44 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{soul} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} \usepackage{latexsym} \usepackage{amssymb} \usepackage{hyperref} \tolerance=1000 \usepackage{booktabs} \providecommand{\alert}[1]{\textbf{#1}} \title{tst} \author{RC} \date{\today} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs Org-mode version 7.9.2+}} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{Test} \label{sec-1} \begin{table}[htb] \caption{Test table} \begin{center} \begin{tabular}{ll} \hline 1 & 2 \\ \hline A1 & A2 \\ B1 & B2 \\ C1 & C2 \\ \hline \end{tabular} \end{center} \end{table} \end{document} --f46d044469094b055104d1de4fb4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am trying to use the booktabs package for tables in the new exporter, how= ever I am unable to get \toprule, etc instead of \hrule
I would appreci= ate any suggestions to fix this.=A0

As a minimal e= xample, I started emacs -q, and evaluated the following:

=A0 =A0(setq org-install-dir "~/.emacs.d/src/= org-mode")
=A0 =A0(add-to-list 'load-path (concat org-in= stall-dir "/contrib/lisp"))
=A0 =A0(add-to-list 'lo= ad-path (concat org-install-dir "/lisp"))
=A0 =A0(require 'org-e-latex)

=A0 =A0(add= -to-list 'org-e-latex-classes
=A0 =A0'("article"= ;
=A0 =A0"\\documentclass[11pt]{article}
=A0 =A0\[= DEFAULT-PACKAGES]
=A0 =A0\[PACKAGES]
=A0 =A0\[EXTRA]"
=A0 =A0(&= quot;\\section{%s}" . "\\section*{%s}")
=A0 =A0(&q= uot;\\subsection{%s}" . "\\subsection*{%s}")
=A0 = =A0("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

-----org.file-----------
#+LATEX_C= LASS: article
#+LATEX_HEADER: \usepackage{booktabs}
* T= est
#+ATTR_LATEX: :booktabs
#+CAPTION: Test table
=A0|----+----|
=A0| 1 =A0| 2 |
=A0|----+----|
=A0| A1 | A2 |
=A0| B1 | B2 |
=A0| C1 | C2 |
=A0|----+----|

------latex-buffer from= org-export-latex-as-buffer-------
% Created 2012-12-27 Thu 18:44
\documentclass[11pt]{art= icle}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fonte= nc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepack= age{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{= hyperref}
\tolerance=3D1000
\usepackage{booktabs}
=
\providecommand{\alert}[1]{\textbf{#1}}

\titl= e{tst}
\author{RC}
\date{\today}
\hypersetup{
= =A0 pdfkeywords=3D{},
=A0 pdfsubject=3D{},
=A0 pdfcreat= or=3D{Emacs Org-mode version 7.9.2+}}

\begin{docum= ent}

\maketitle

\setcounter{tocdept= h}{3}
\tableofcontents
\vspace*{1cm}
\section= {Test}
\label{sec-1}

\begin{table}[htb]<= /div>
\caption{Test table}=A0
\begin{center}
\begin{tabu= lar}{ll}
\hline
=A01 =A0 & =A02 =A0 \\
\h= line
=A0A1 =A0& =A0A2 =A0\\
=A0B1 =A0& =A0B2 = =A0\\
=A0C1 =A0& =A0C2 =A0\\
\hline
\end{tabular}
\end{center}
\end{t= able}

\end{document}

--f46d044469094b055104d1de4fb4--