[O] export latex in a table

2013-09-21 Thread zwz
Hi, I want to export a table to pdf as follows:

* test
| \textcolor{red}{range} | \textcolor{blue}{0\sim2^{8}-1} |

I checked the generated tex.
The first column is OK. While in the second column, the result is something
like:
\textcolor{blue}\{...\}

I don't know what is the right way doing this, but it worked for org-mode 
8.0. 

May somebody help me out?




Re: [O] export latex in a table

2013-09-21 Thread Rasmus
zwz zhangwe...@gmail.com writes:

I'm assuming you're only interested in LaTeX output here.

 Hi, I want to export a table to pdf as follows:

 * test
 | \textcolor{red}{range} | \textcolor{blue}{0\sim2^{8}-1} |

How about this? 

#+MACRO: color  \textcolor{$1}{$2}
| {{{color(red, range)}}} | {{{color(blue, 0\sim2^8-1)}}} |

Unless you're doing something that's not systematic, or which has a
very particular logic it's probably not the right way.

If all entries in a column/row need to be colored you should specify
that rather than doing it manually.  You could use tabu, but be warned
that the interface will change at some point, or you could use
colortbl.  See here:

http://texblog.org/2011/04/19/highlight-table-rowscolumns-with-color/

–Rasmus

-- 
This space is left intentionally blank





Re: [O] export latex in a table

2013-09-21 Thread zwz
Rasmus rasmus at gmx.us writes:

 
 zwz zhangweize at gmail.com writes:
 
 I'm assuming you're only interested in LaTeX output here.
 
  Hi, I want to export a table to pdf as follows:
 
  * test
  | \textcolor{red}{range} | \textcolor{blue}{0\sim2^{8}-1} |
 
 How about this? 
 
 #+MACRO: color  \textcolor{$1}{$2}
 | {{{color(red, range)}}} | {{{color(blue, 0\sim2^8-1)}}} |
 
 Unless you're doing something that's not systematic, or which has a
 very particular logic it's probably not the right way.
 
 If all entries in a column/row need to be colored you should specify
 that rather than doing it manually.  You could use tabu, but be warned
 that the interface will change at some point, or you could use
 colortbl.  See here:
 
 http://texblog.org/2011/04/19/highlight-table-rowscolumns-with-color/
 
 –Rasmus
 

The macro-way does not work.
The generated tex still contains the extra \ before {.
My org version is 8.0.7.

Thanks for your tips.
But I just want to color some column/row.
And I really enjoy the convenience of org table.







Re: [O] export latex in a table

2013-09-21 Thread Nicolas Goaziou
Hello,

zwz zhangwe...@gmail.com writes:

 Rasmus rasmus at gmx.us writes:
 
 How about this? 
 
 #+MACRO: color  \textcolor{$1}{$2}
 | {{{color(red, range)}}} | {{{color(blue, 0\sim2^8-1)}}} |
 
 Unless you're doing something that's not systematic, or which has a
 very particular logic it's probably not the right way.

 The macro-way does not work.

The macro-way does work here.

 The generated tex still contains the extra \ before {.
 My org version is 8.0.7.

 Thanks for your tips.
 But I just want to color some column/row.
 And I really enjoy the convenience of org table.

You can also use an export snippet:

  | @@latex:\textcolor{blue}{0\sim2^{8}-1}@@ |


Regards,

-- 
Nicolas Goaziou



Re: [O] export latex in a table

2013-09-21 Thread zwz
Nicolas Goaziou n.goaziou at gmail.com writes:

 
 Hello,
 
 You can also use an export snippet:
 
   |  at  at latex:\textcolor{blue}{0\sim2^{8}-1} at  at  |
 
 Regards,
 
Yes, it works.
Thanks.