emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Booktabs in new LaTeX exporter
@ 2012-12-27 23:57 RCY
  2012-12-28  0:17 ` Thomas S. Dye
  0 siblings, 1 reply; 9+ messages in thread
From: RCY @ 2012-12-27 23:57 UTC (permalink / raw)
  To: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]

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}

[-- Attachment #2: Type: text/html, Size: 3081 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-28 23:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27 23:57 Booktabs in new LaTeX exporter RCY
2012-12-28  0:17 ` Thomas S. Dye
2012-12-28  1:20   ` RCY
2012-12-28  1:42     ` Thomas S. Dye
2012-12-28 10:50       ` RCY
2012-12-28 17:27         ` Thomas S. Dye
2012-12-28 18:05           ` RCY
2012-12-28 19:06             ` Thomas S. Dye
2012-12-28 23:07               ` RCY

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).