From mboxrd@z Thu Jan 1 00:00:00 1970 From: RCY Subject: Re: Booktabs in new LaTeX exporter Date: Fri, 28 Dec 2012 05:50:34 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff252e0de139304d1e76e3c Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToXWU-0002ze-86 for Emacs-orgmode@gnu.org; Fri, 28 Dec 2012 05:50:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToXWP-0005eX-JA for Emacs-orgmode@gnu.org; Fri, 28 Dec 2012 05:50:42 -0500 Received: from mail-oa0-f50.google.com ([209.85.219.50]:35520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToXWP-0005eQ-8W for Emacs-orgmode@gnu.org; Fri, 28 Dec 2012 05:50:37 -0500 Received: by mail-oa0-f50.google.com with SMTP id n16so9835062oag.9 for ; Fri, 28 Dec 2012 02:50:36 -0800 (PST) In-Reply-To: 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: "Thomas S. Dye" Cc: Emacs-orgmode@gnu.org --e89a8ff252e0de139304d1e76e3c Content-Type: text/plain; charset=ISO-8859-1 Hi, Thanks for looking into this. I tried your suggestions but I am still having the problem. It seems that some but not all attributes I set are recognized. So in the example below it sets sideways table but ignores the booktabs and positioning attributes. #+LATEX_CLASS: article #+LATEX_HEADER: \usepackage{booktabs} ----org-file----- * Test #+CAPTION: Test table #+attr_latex: :booktabs t :align |r|l| :float sidewaystable |----+----| | 1 | 2 | |----+----| | A1 | A2 | | B1 | B2 | | C1 | C2 | |----+----| -----latex buffer----- : \begin{sidewaystable}[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{sidewaystable} ------------------------- On Thu, Dec 27, 2012 at 8:42 PM, Thomas S. Dye wrote: > Hmm, > > It works like a charm here. > > I add booktabs like this: > > (add-to-list 'org-export-latex-packages-alist '("" "booktabs")) > > Also, I noticed you have \[PACKAGES]. I don't escape the opening brace: > > (add-to-list 'org-e-latex-classes > '("koma-article" > "\\documentclass{scrartcl} > [NO-DEFAULT-PACKAGES] > [PACKAGES] > [EXTRA] > \\let\\itemize\\compactitem > \\let\\description\\compactdesc > \\let\\enumerate\\compactenum > \\bibliography{local} > \\newcommand{\\rc}{\\textsuperscript{14}C} > \\newcolumntype{Y}{>{\\RaggedRight\\arraybackslash}X}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}") > ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) > > hth, > Tom > > RCY writes: > > > Hi, > > I had tried t but then removed it when it did not work and the > > documentation seemed to indicate that :booktabs was a toggle. > > I tried your suggestion to add (setq org-e-latex-tables-booktabs t) to > the > > .emacs file but I am still getiing \hline. I did make sure to get the > > latest version from git and I am running emacs 24.3.50.1. > > > > Thanks. > > > > > > On Thu, Dec 27, 2012 at 7:17 PM, Thomas S. Dye wrote: > > > >> Aloha RCY, > >> > >> You can have this in your setup to enable booktabs globally: > >> > >> (setq org-e-latex-tables-booktabs t) > >> > >> Or, you can give a table this attribute: > >> > >> #+attr_latex: :booktabs t > >> > >> I think your example should work if you add the t after :booktabs. > >> > >> hth, > >> Tom > >> > >> RCY writes: > >> > >> > 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} > >> > 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} > >> > > >> > >> -- > >> Thomas S. Dye > >> http://www.tsdye.com > >> > > Hi, > > > > I had tried t but then removed it when it did not work and the > > documentation seemed to indicate that :booktabs was a toggle. > > I tried your suggestion to add (setq org-e-latex-tables-booktabs t) > > to the .emacs file but I am still getiing \hline. I did make sure to > > get the latest version from git and I am running emacs 24.3.50.1. > > > > Thanks. > > > > > > On Thu, Dec 27, 2012 at 7:17 PM, Thomas S. Dye wrote: > > > > Aloha RCY, > > > > You can have this in your setup to enable booktabs globally: > > > > (setq org-e-latex-tables-booktabs t) > > > > Or, you can give a table this attribute: > > > > #+attr_latex: :booktabs t > > > > I think your example should work if you add the t after :booktabs. > > > > hth, > > Tom > > > > > > > > RCY writes: > > > > > 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} > > > 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} > > > > > > > > > -- > > Thomas S. Dye > > http://www.tsdye.com > > > > > > -- > Thomas S. Dye > http://www.tsdye.com > --e89a8ff252e0de139304d1e76e3c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,
=A0Thanks for looking into this. I tried your suggestions but I am = still having the problem. It seems that some but not all attributes I set a= re recognized. So in the example below it sets sideways table but ignores t= he booktabs and positioning attributes.

#+LATEX_CLASS: article
#+LATEX_HEADER: \= usepackage{booktabs}
----org-file-----
* Test
#+CAPTION: Test table
#+attr_latex: :booktabs t :align |r|l| :fl= oat sidewaystable
=A0|----+----|
=A0| 1 =A0| 2 =A0|
=A0|----+----|
=A0| A1 | A2 |
=A0| B1 | B2 |
=A0| C1 | C2 |
=A0|----+----|

-----latex buffer-----
:
\begin{sidewaystable}[htb]
\caption{Test table}=A0
\begin{center}
\begin{tabular}{ll}
\hline
= =A01 =A0 & =A02 =A0 \\
\hline
=A0A1 =A0& =A0A2 = =A0\\
=A0B1 =A0& =A0B2 =A0\\
=A0C1 =A0& =A0C2 =A0\\
\= hline
\end{tabular}
\end{center}
\end{sideway= stable}
-------------------------

On Thu, Dec 27, 2012 at 8:42 PM, Thomas S. Dye <tsd@tsdye.com> w= rote:
Hmm,

It works like a charm here.

I add booktabs like this:

=A0 (add-to-list 'org-export-latex-packages-alist '("" &q= uot;booktabs"))

Also, I noticed you have \[PACKAGES]. =A0I don't escape the opening bra= ce:

=A0 (add-to-list 'org-e-latex-classes
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'("koma-article"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"\\documentclass{scrartcl}
=A0 =A0 =A0 [NO-DEFAULT-PACKAGES]
=A0 =A0 =A0 [PACKAGES]
=A0 =A0 =A0 [EXTRA]
=A0 =A0 =A0 \\let\\itemize\\compactitem
=A0 =A0 =A0 \\let\\description\\compactdesc
=A0 =A0 =A0 \\let\\enumerate\\compactenum
=A0 =A0 =A0 \\bibliography{local}
=A0 =A0 =A0 \\newcommand{\\rc}{\\textsuperscript{14}C}
=A0 =A0 =A0 \\newcolumntype{Y}{>{\\RaggedRight\\arraybackslash}X}"<= br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0("\\section{%s}&q= uot; . "\\section*{%s}")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0("\\subsection{%s}" . "\\= subsection*{%s}")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0("\\subsubsection{%s}" . "= ;\\subsubsection*{%s}")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0("\\paragraph{%s}" . &qu= ot;\\paragraph*{%s}")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0("\\subparagraph{%s}" . "= \\subparagraph*{%s}")))

hth,
Tom

RCY <recif@yahoo.com> writes:<= br>
> Hi,
> =A0I had tried t but then removed it when it did not work and the
> documentation seemed to indicate that :booktabs was a toggle.
> I tried your suggestion to add =A0(setq org-e-latex-tables-booktabs t)= to the
> .emacs file but I am still getiing \hline. I did make sure to get the<= br> > latest version from git and I am running emacs 24.3.50.1.
>
> Thanks.
>
>
> On Thu, Dec 27, 2012 at 7:17 PM, Thomas S. Dye <tsd@tsdye.com> wrote:
>
>> Aloha RCY,
>>
>> You can have this in your setup to enable booktabs globally:
>>
>> =A0 (setq org-e-latex-tables-booktabs t)
>>
>> Or, you can give a table this attribute:
>>
>> #+attr_latex: :booktabs t
>>
>> I think your example should work if you add the t after :booktabs.=
>>
>> hth,
>> Tom
>>
>> RCY <recif@yahoo.com>= writes:
>>
>> > 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 f= ollowing:
>> >
>> > =A0 =A0(setq org-install-dir "~/.emacs.d/src/org-mode&qu= ot;)
>> > =A0 =A0(add-to-list 'load-path (concat org-install-dir &q= uot;/contrib/lisp"))
>> > =A0 =A0(add-to-list 'load-path (concat org-install-dir &q= uot;/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("\\section{%s}" . "\\section*{%s}"= ;)
>> > =A0 =A0("\\subsection{%s}" . "\\subsection*{%s= }")
>> > =A0 =A0("\\subsubsection{%s}" . "\\subsubsecti= on*{%s}")))
>> >
>> > -----org.file-----------
>> > #+LATEX_CLASS: article
>> > #+LATEX_HEADER: \usepackage{booktabs}
>> > * Test
>> > #+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]{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=3D1000
>> > \usepackage{booktabs}
>> > \providecommand{\alert}[1]{\textbf{#1}}
>> >
>> > \title{tst}
>> > \author{RC}
>> > \date{\today}
>> > \hypersetup{
>> > =A0 pdfkeywords=3D{},
>> > =A0 pdfsubject=3D{},
>> > =A0 pdfcreator=3D{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
>> > =A01 =A0 & =A02 =A0 \\
>> > \hline
>> > =A0A1 =A0& =A0A2 =A0\\
>> > =A0B1 =A0& =A0B2 =A0\\
>> > =A0C1 =A0& =A0C2 =A0\\
>> > \hline
>> > \end{tabular}
>> > \end{center}
>> > \end{table}
>> >
>> > \end{document}
>> > 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 f= ollowing:
>> >
>> > =A0 =A0(setq org-install-dir "~/.emacs.d/src/org-mode&qu= ot;)
>> > =A0 =A0(add-to-list 'load-path (concat org-install-dir &q= uot;/contrib/lisp"))
>> > =A0 =A0(add-to-list 'load-path (concat org-install-dir &q= uot;/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("\\section{%s}" . "\\section*{%s}"= ;)
>> > =A0 =A0("\\subsection{%s}" . "\\subsection*{%s= }")
>> > =A0 =A0("\\subsubsection{%s}" . "\\subsubsecti= on*{%s}")))
>> >
>> > -----org.file-----------
>> > #+LATEX_CLASS: article
>> > #+LATEX_HEADER: \usepackage{booktabs}
>> > * Test
>> > #+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]{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=3D1000
>> > \usepackage{booktabs}
>> > \providecommand{\alert}[1]{\textbf{#1}}
>> >
>> > \title{tst}
>> > \author{RC}
>> > \date{\today}
>> > \hypersetup{
>> > =A0 pdfkeywords=3D{},
>> > =A0 pdfsubject=3D{},
>> > =A0 pdfcreator=3D{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
>> > =A01 =A0 & =A02 =A0 \\
>> > \hline
>> > =A0A1 =A0& =A0A2 =A0\\
>> > =A0B1 =A0& =A0B2 =A0\\
>> > =A0C1 =A0& =A0C2 =A0\\
>> > \hline
>> > \end{tabular}
>> > \end{center}
>> > \end{table}
>> >
>> > \end{document}
>> >
>>
>> --
>> Thomas S. Dye
>> http://www.tsdy= e.com
>>
> Hi,
>
> =A0I had tried t but then removed it when it did not work and the
> documentation seemed to indicate that :booktabs was a toggle.=A0
> I tried your suggestion to add=A0=A0(setq org-e-latex-tables-booktabs = t)
> to the .emacs file but I am still getiing \hline. I did make sure to > get the latest version from git and I am running emacs 24.3.50.1.
>
> Thanks.
>
>
> On Thu, Dec 27, 2012 at 7:17 PM, Thomas S. Dye <tsd@tsdye.com> wrote:
>
> =A0 =A0 Aloha RCY,
>
> =A0 =A0 You can have this in your setup to enable booktabs globally: >
> =A0 =A0 =A0 (setq org-e-latex-tables-booktabs t)
>
> =A0 =A0 Or, you can give a table this attribute:
>
> =A0 =A0 #+attr_latex: :booktabs t
>
> =A0 =A0 I think your example should work if you add the t after :bookt= abs.
>
> =A0 =A0 hth,
> =A0 =A0 Tom
>
>
>
> =A0 =A0 RCY <recif@yahoo.com= > writes:
>
> =A0 =A0 > I am trying to use the booktabs package for tables in the= new
> =A0 =A0 exporter,
> =A0 =A0 > however I am unable to get \toprule, etc instead of \hrul= e
> =A0 =A0 > I would appreciate any suggestions to fix this.
> =A0 =A0 >
> =A0 =A0 > As a minimal example, I started emacs -q, and evaluated t= he
> =A0 =A0 following:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0(setq org-install-dir "~/.emacs.d/src/org-mod= e")
> =A0 =A0 > =A0 =A0(add-to-list 'load-path (concat org-install-di= r
> =A0 =A0 "/contrib/lisp"))
> =A0 =A0 > =A0 =A0(add-to-list 'load-path (concat org-install-di= r "/lisp"))
> =A0 =A0 > =A0 =A0(require 'org-e-latex)
> =A0 =A0 >
> =A0 =A0 > =A0 =A0(add-to-list 'org-e-latex-classes
> =A0 =A0 > =A0 =A0'("article"
> =A0 =A0 > =A0 =A0"\\documentclass[11pt]{article}
> =A0 =A0 > =A0 =A0\[DEFAULT-PACKAGES]
> =A0 =A0 > =A0 =A0\[PACKAGES]
> =A0 =A0 > =A0 =A0\[EXTRA]"
> =A0 =A0 > =A0 =A0("\\section{%s}" . "\\section*{%s}&= quot;)
> =A0 =A0 > =A0 =A0("\\subsection{%s}" . "\\subsection= *{%s}")
> =A0 =A0 > =A0 =A0("\\subsubsection{%s}" . "\\subsubs= ection*{%s}")))
> =A0 =A0 >
> =A0 =A0 > -----org.file-----------
> =A0 =A0 > #+LATEX_CLASS: article
> =A0 =A0 > #+LATEX_HEADER: \usepackage{booktabs}
> =A0 =A0 > * Test
> =A0 =A0 > #+ATTR_LATEX: :booktabs
> =A0 =A0 > #+CAPTION: Test table
> =A0 =A0 > =A0|----+----|
> =A0 =A0 > =A0| 1 =A0| 2 |
> =A0 =A0 > =A0|----+----|
> =A0 =A0 > =A0| A1 | A2 |
> =A0 =A0 > =A0| B1 | B2 |
> =A0 =A0 > =A0| C1 | C2 |
> =A0 =A0 > =A0|----+----|
> =A0 =A0 >
> =A0 =A0 > ------latex-buffer from org-export-latex-as-buffer-------=
> =A0 =A0 > % Created 2012-12-27 Thu 18:44
> =A0 =A0 > \documentclass[11pt]{article}
> =A0 =A0 > \usepackage[utf8]{inputenc}
> =A0 =A0 > \usepackage[T1]{fontenc}
> =A0 =A0 > \usepackage{fixltx2e}
> =A0 =A0 > \usepackage{graphicx}
> =A0 =A0 > \usepackage{longtable}
> =A0 =A0 > \usepackage{float}
> =A0 =A0 > \usepackage{wrapfig}
> =A0 =A0 > \usepackage{soul}
> =A0 =A0 > \usepackage{textcomp}
> =A0 =A0 > \usepackage{marvosym}
> =A0 =A0 > \usepackage{wasysym}
> =A0 =A0 > \usepackage{latexsym}
> =A0 =A0 > \usepackage{amssymb}
> =A0 =A0 > \usepackage{hyperref}
> =A0 =A0 > \tolerance=3D1000
> =A0 =A0 > \usepackage{booktabs}
> =A0 =A0 > \providecommand{\alert}[1]{\textbf{#1}}
> =A0 =A0 >
> =A0 =A0 > \title{tst}
> =A0 =A0 > \author{RC}
> =A0 =A0 > \date{\today}
> =A0 =A0 > \hypersetup{
> =A0 =A0 > =A0 pdfkeywords=3D{},
> =A0 =A0 > =A0 pdfsubject=3D{},
> =A0 =A0 > =A0 pdfcreator=3D{Emacs Org-mode version 7.9.2+}}
> =A0 =A0 >
> =A0 =A0 > \begin{document}
> =A0 =A0 >
> =A0 =A0 > \maketitle
> =A0 =A0 >
> =A0 =A0 > \setcounter{tocdepth}{3}
> =A0 =A0 > \tableofcontents
> =A0 =A0 > \vspace*{1cm}
> =A0 =A0 > \section{Test}
> =A0 =A0 > \label{sec-1}
> =A0 =A0 >
> =A0 =A0 > \begin{table}[htb]
> =A0 =A0 > \caption{Test table}
> =A0 =A0 > \begin{center}
> =A0 =A0 > \begin{tabular}{ll}
> =A0 =A0 > \hline
> =A0 =A0 > =A01 =A0 & =A02 =A0 \\
> =A0 =A0 > \hline
> =A0 =A0 > =A0A1 =A0& =A0A2 =A0\\
> =A0 =A0 > =A0B1 =A0& =A0B2 =A0\\
> =A0 =A0 > =A0C1 =A0& =A0C2 =A0\\
> =A0 =A0 > \hline
> =A0 =A0 > \end{tabular}
> =A0 =A0 > \end{center}
> =A0 =A0 > \end{table}
> =A0 =A0 >
> =A0 =A0 > \end{document}
> =A0 =A0 > I am trying to use the booktabs package for tables in the= new
> =A0 =A0 > exporter, however I am unable to get \toprule, etc instea= d of
> =A0 =A0 \hrule
> =A0 =A0 >
> =A0 =A0 > I would appreciate any suggestions to fix this.=A0
> =A0 =A0 >
> =A0 =A0 > As a minimal example, I started emacs -q, and evaluated t= he
> =A0 =A0 following:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0(setq org-install-dir "~/.emacs.d/src/org-mod= e")
> =A0 =A0 > =A0 =A0(add-to-list 'load-path (concat org-install-di= r
> =A0 =A0 "/contrib/lisp"))
> =A0 =A0 > =A0 =A0(add-to-list 'load-path (concat org-install-di= r "/lisp"))
> =A0 =A0 > =A0 =A0(require 'org-e-latex)
> =A0 =A0 >
> =A0 =A0 > =A0 =A0(add-to-list 'org-e-latex-classes
> =A0 =A0 > =A0 =A0'("article"
> =A0 =A0 > =A0 =A0"\\documentclass[11pt]{article}
> =A0 =A0 > =A0 =A0\[DEFAULT-PACKAGES]
> =A0 =A0 > =A0 =A0\[PACKAGES]
> =A0 =A0 > =A0 =A0\[EXTRA]"
> =A0 =A0 > =A0 =A0("\\section{%s}" . "\\section*{%s}&= quot;)
> =A0 =A0 > =A0 =A0("\\subsection{%s}" . "\\subsection= *{%s}")
> =A0 =A0 > =A0 =A0("\\subsubsection{%s}" . "\\subsubs= ection*{%s}")))
> =A0 =A0 >
> =A0 =A0 > -----org.file-----------
> =A0 =A0 > #+LATEX_CLASS: article
> =A0 =A0 > #+LATEX_HEADER: \usepackage{booktabs}
> =A0 =A0 > * Test
> =A0 =A0 > #+ATTR_LATEX: :booktabs
> =A0 =A0 > #+CAPTION: Test table
> =A0 =A0 > =A0|----+----|
> =A0 =A0 > =A0| 1 =A0| 2 |
> =A0 =A0 > =A0|----+----|
> =A0 =A0 > =A0| A1 | A2 |
> =A0 =A0 > =A0| B1 | B2 |
> =A0 =A0 > =A0| C1 | C2 |
> =A0 =A0 > =A0|----+----|
> =A0 =A0 >
> =A0 =A0 > ------latex-buffer from org-export-latex-as-buffer-------=
> =A0 =A0 > % Created 2012-12-27 Thu 18:44
> =A0 =A0 > \documentclass[11pt]{article}
> =A0 =A0 > \usepackage[utf8]{inputenc}
> =A0 =A0 > \usepackage[T1]{fontenc}
> =A0 =A0 > \usepackage{fixltx2e}
> =A0 =A0 > \usepackage{graphicx}
> =A0 =A0 > \usepackage{longtable}
> =A0 =A0 > \usepackage{float}
> =A0 =A0 > \usepackage{wrapfig}
> =A0 =A0 > \usepackage{soul}
> =A0 =A0 > \usepackage{textcomp}
> =A0 =A0 > \usepackage{marvosym}
> =A0 =A0 > \usepackage{wasysym}
> =A0 =A0 > \usepackage{latexsym}
> =A0 =A0 > \usepackage{amssymb}
> =A0 =A0 > \usepackage{hyperref}
> =A0 =A0 > \tolerance=3D1000
> =A0 =A0 > \usepackage{booktabs}
> =A0 =A0 > \providecommand{\alert}[1]{\textbf{#1}}
> =A0 =A0 >
> =A0 =A0 > \title{tst}
> =A0 =A0 > \author{RC}
> =A0 =A0 > \date{\today}
> =A0 =A0 > \hypersetup{
> =A0 =A0 > =A0 pdfkeywords=3D{},
> =A0 =A0 > =A0 pdfsubject=3D{},
> =A0 =A0 > =A0 pdfcreator=3D{Emacs Org-mode version 7.9.2+}}
> =A0 =A0 >
> =A0 =A0 > \begin{document}
> =A0 =A0 >
> =A0 =A0 > \maketitle
> =A0 =A0 >
> =A0 =A0 > \setcounter{tocdepth}{3}
> =A0 =A0 > \tableofcontents
> =A0 =A0 > \vspace*{1cm}
> =A0 =A0 > \section{Test}
> =A0 =A0 > \label{sec-1}
> =A0 =A0 >
> =A0 =A0 > \begin{table}[htb]
> =A0 =A0 > \caption{Test table}=A0
> =A0 =A0 > \begin{center}
> =A0 =A0 > \begin{tabular}{ll}
> =A0 =A0 > \hline
> =A0 =A0 > =A01 =A0 & =A02 =A0 \\
> =A0 =A0 > \hline
> =A0 =A0 > =A0A1 =A0& =A0A2 =A0\\
> =A0 =A0 > =A0B1 =A0& =A0B2 =A0\\
> =A0 =A0 > =A0C1 =A0& =A0C2 =A0\\
> =A0 =A0 > \hline
> =A0 =A0 > \end{tabular}
> =A0 =A0 > \end{center}
> =A0 =A0 > \end{table}
> =A0 =A0 >
> =A0 =A0 > \end{document}
> =A0 =A0 >
>
>
> =A0 =A0 --
> =A0 =A0 Thomas S. Dye
> =A0 =A0 http://www.= tsdye.com
>
>

--
Thomas S. Dye
http://www.tsdye.com=

--e89a8ff252e0de139304d1e76e3c--