Re: [O] Orgtbl, Radiotables: :booktabs t

2014-08-19 Thread Jorge A. Alfaro-Murillo
Hi Nicolas, 

Are there any news on this? I was just trying to accomplish the 
same thing (get \midrule instead of \hline in a LaTeX orgtbl), but 
adding :booktabs t seems to not be enough.


Best,

Jorge.

On [2013-12-01 Sun 10:18], Nicolas Goaziou wrote:


Hello,

AW alexander.will...@t-online.de writes:


 #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 :booktabs t
 | Month | Days | Nr sold | per day |
 |
 |---+--+-+-|
 |
 | Jan   |   23 |  55 | 2.4 |
 | Feb   |   21 |  16 | 0.8 |
 | March |   22 | 278 |12.6 |
 |
 |---+--+-+-|
 |
 | S:|   66 | | |

 #+TBLFM: $4=$3/$2;%.1f::@5$2=vsum(@I..II)




The parameter :booktabs t would be new.


[...]


So would it be possible to implement the parameter :booktabs t
without much trouble?


I don't think :booktabs belong to #+ORGTBL keyword because it is not
specific to radio tables.

I have a half baked patch which allows to use export framework to handle
radio tables. I'll try to complete it by the end of the year and propose
it on the ML.

Since ox-latex supports booktabs extension, radio tables will logically
inherit that feature.


Regards,




Re: [O] Orgtbl, Radiotables: :booktabs t

2014-08-19 Thread Jorge A. Alfaro-Murillo
Well for now and until :booktabs t is incorporated this is what I 
am using:


#+BEGIN_SRC emacs-lisp 
 (defun orgtbl-to-latex-booktabs (table params) 
   Convert the Orgtbl mode TABLE to LaTeX using booktabs 
   package.  (let* ((alignment (mapconcat (lambda (x) (if x r 
   l)) 
org-table-last-alignment )) 
  (params2 
   (list 
:tstart (concat \\begin{tabular}{ alignment 
}\n\\toprule) :tend \\bottomrule\n\\end{tabular} 
:lstart  :lend   :sep:efmt %s\\,(%s) 
:hline \\midline))) 
 (orgtbl-to-generic table (org-combine-plists params2 
 params 

 (setq orgtbl-radio-table-templates 
   (delete-if (lambda (x) (equal (car x) 'latex-mode))  
  orgtbl-radio-table-templates)) 

 (add-to-list 'orgtbl-radio-table-templates 
  '(latex-mode % BEGIN RECEIVE ORGTBL %n\n% END 
  RECEIVE ORGTBL %n\n\\begin{comment}\n#+ORGTBL: SEND 
  %n orgtbl-to-latex-booktabs :splice nil :skip 0\n| 
  | |\n\\end{comment}\n)) 
#+END_SRC


--
Jorge.




Re: [O] Orgtbl, Radiotables: :booktabs t

2014-08-19 Thread Jorge A. Alfaro-Murillo

Ups... it should be midrule not midline.
--
Jorge.




Re: [O] Orgtbl, Radiotables: :booktabs t

2014-08-19 Thread Nicolas Goaziou
Hello,

jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

 Are there any news on this? I was just trying to accomplish the same
 thing (get \midrule instead of \hline in a LaTeX orgtbl), but
 adding :booktabs t seems to not be enough.

Unfortunately, progress is slow. This is still in my TODO list anyway.
I'll post a patch when it's ready.


Regards,

-- 
Nicolas Goaziou



Re: [O] Orgtbl, Radiotables: :booktabs t

2013-12-01 Thread AW
Push?! 

Am Dienstag, 26. November 2013, 11:15:21 schrieb AW:
 \documentclass[parskip=half]{scrartcl}
 \usepackage{booktabs, verbatim}
 
 \begin{document}
 
 Hello!
 
 Once in a while I need a radiotable inside my LaTeX file and I'm asking to
 implement a parameter for the use of booktabs.
 
 This is an example I picked from the manual of orgmode and added
 \verb|\toprule|, \verb|\bottomrule|, :booktabs t and some other details.
 
 This is the tabular in \LaTeX:
 
  \begin{tabular}{lrrr}\toprule
  Month  \multicolumn{1}{c}{Days}  Nr.\ sold  per day\\\midrule
  % BEGIN RECEIVE ORGTBL salesfigures
 Jan  23  55  2.4 \\
 Feb  21  16  0.8 \\
 March  22  278  12.6 \\
 \hline
 S:  66 \\
  % END RECEIVE ORGTBL salesfigures
   \bottomrule
  \end{tabular}
 
 And here comes the source:
 
 \begin{verbatim}
  #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 :booktabs
 t
  | Month | Days | Nr sold | per day |
  |
  |---+--+-+-|
  |
  | Jan   |   23 |  55 | 2.4 |
  | Feb   |   21 |  16 | 0.8 |
  | March |   22 | 278 |12.6 |
  |
  |---+--+-+-|
  |
  | S:|   66 | | |
 
  #+TBLFM: $4=$3/$2;%.1f::@5$2=vsum(@I..II)
 
 \end{verbatim}
 
 The parameter :booktabs t would be new.
 
 To what end? You see, my table uses the booktabs package and I can, as
 displayed above, use \verb|\toprule| and \verb|\bottomrule| in the spliced
 tabular. But inside the tabular, all horizontal lines become
 hline(s), which is, well, not ugly, but disturbing. Instead of each
 hline a midrule is needed.
 
 You can take this email and compile it with pdflatex. You'll see, that
 some space is missing between the ``S:'' and the hline.
 
 So would it be possible to implement the parameter :booktabs t
 without much trouble?
 
 Kind regards,
 
 Alexander
 
 \end{document}




Re: [O] Orgtbl, Radiotables: :booktabs t

2013-12-01 Thread Nicolas Goaziou
Hello,

AW alexander.will...@t-online.de writes:

  #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 :booktabs 
 t
  | Month | Days | Nr sold | per day |
  |
  |---+--+-+-|
  |
  | Jan   |   23 |  55 | 2.4 |
  | Feb   |   21 |  16 | 0.8 |
  | March |   22 | 278 |12.6 |
  |
  |---+--+-+-|
  |
  | S:|   66 | | |
 
  #+TBLFM: $4=$3/$2;%.1f::@5$2=vsum(@I..II)
 

 The parameter :booktabs t would be new.

[...]

 So would it be possible to implement the parameter :booktabs t
 without much trouble?

I don't think :booktabs belong to #+ORGTBL keyword because it is not
specific to radio tables.

I have a half baked patch which allows to use export framework to handle
radio tables. I'll try to complete it by the end of the year and propose
it on the ML.

Since ox-latex supports booktabs extension, radio tables will logically
inherit that feature.


Regards,

-- 
Nicolas Goaziou



[O] Orgtbl, Radiotables: :booktabs t

2013-11-26 Thread AW

\documentclass[parskip=half]{scrartcl}
\usepackage{booktabs, verbatim}

\begin{document}

Hello!

Once in a while I need a radiotable inside my LaTeX file and I'm asking to 
implement a parameter for the use of booktabs.

This is an example I picked from the manual of orgmode and added
\verb|\toprule|, \verb|\bottomrule|, :booktabs t and some other details.

This is the tabular in \LaTeX:

 \begin{tabular}{lrrr}\toprule
 Month  \multicolumn{1}{c}{Days}  Nr.\ sold  per day\\\midrule
 % BEGIN RECEIVE ORGTBL salesfigures
Jan  23  55  2.4 \\
Feb  21  16  0.8 \\
March  22  278  12.6 \\
\hline
S:  66 \\
 % END RECEIVE ORGTBL salesfigures
\bottomrule
 \end{tabular}

And here comes the source:
 
\begin{verbatim}
 #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 :booktabs t
 | Month | Days | Nr sold | per day |
 |---+--+-+-|
 | Jan   |   23 |  55 | 2.4 |
 | Feb   |   21 |  16 | 0.8 |
 | March |   22 | 278 |12.6 |
 |---+--+-+-|
 | S:|   66 | | |
 #+TBLFM: $4=$3/$2;%.1f::@5$2=vsum(@I..II)
 
\end{verbatim}

The parameter :booktabs t would be new. 

To what end? You see, my table uses the booktabs package and I can, as
displayed above, use \verb|\toprule| and \verb|\bottomrule| in the spliced
tabular. But inside the tabular, all horizontal lines become
hline(s), which is, well, not ugly, but disturbing. Instead of each
hline a midrule is needed.

You can take this email and compile it with pdflatex. You'll see, that
some space is missing between the ``S:'' and the hline.

So would it be possible to implement the parameter :booktabs t
without much trouble?

Kind regards,

Alexander

\end{document}