[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

editing tables in emacs/org-mode, latex and emacspeak



I love the table browsing capability in emacspeak-table and
emacspeak-table-ui. 
I have two use cases, though, that I haven't found a good way to do.

1) Reading a colleague's LATeX document with tabular environments. I'd
like to be able to turn the capabilities of emacs-table loose on
these. My solution is to write a very dumb parser for the LATeX
tabular environment into the vector of vectors used by
emacspeak-table. \multicolumn would be a bit trickier but I think
duplicating its content across cells would be a reasonable first cut.
So is this feature already present and/or easily constructed e.g. via
conversion to html?
If that worked I would probably add org-mode tables as well. 

2) Editing or creating tables. The preferred way to do this seems to
be table.el advised by emacspeak-etable.el. This is good for producing ascii tables but I miss the
emacspeak browsing capability and I still can't turn off table.el
splitting cells if you add  a lot of content. To see what I mean do
the following

In an empty text buffer type
table-insert
follow the defaults to give a 3x3 table with cells of 1 row and 5
columns.
Now in cell (0,0) enter something like
this is a particularly large amount of information to squeeze into one
cell
You get a buffer which looks like this:
+-----+-----+-----+
|this |     |     |
|is a |     |     |
|part\|     |     |
|icul\|     |     |
|arly |     |     |
|large|     |     |
|amou\|     |     |
|nt   |     |     |
|of   |     |     |
|info\|     |     |
|rmat\|     |     |
|ion  |     |     |
|to   |     |     |
|sque\|     |     |
|eze  |     |     |
|into |     |     |
|1    |     |     |
|cell |     |     |
+-----+-----+-----+
|     |     |     |
+-----+-----+-----+
|     |     |     |
+-----+-----+-----+

The cell will be split vertically which is fine, the dashes suggest
you have very tall cells for the first row.
Now run table-generate-source (ctrl-caret) into latex. It generates:
% This LaTeX table template is generated by emacs 24.2.1
\begin{tabular}{|l|l|l|}
\hline
this & & \\
is a & & \\
part$\backslash$ & & \\
icul$\backslash$ & & \\
arly & & \\
large & & \\
amou$\backslash$ & & \\
nt & & \\
of & & \\
info$\backslash$ & & \\
rmat$\backslash$ & & \\
ion & & \\
to & & \\
sque$\backslash$ & & \\
eze & & \\
into & & \\
1 & & \\
cell & & \\
\hline
 & & \\
\hline
 & & \\
\hline
\end{tabular}

for me, this isn't the LATeX I would like to see here. I would prefer
to see our very large cell preserved as a single cell. Sure I would
need to replace the l specifier in the begin{tabular} with a p but
I could live with that. 

So is it worth extending the data structure in emacspeak-table to
handle spanning columns and to make it editable? Or are we better off
trying to enhance the emacs table facilities? Or, in the best case, am
I reinventing the wheel? 
thanks in advance for any suggestions
Peter





-- 

Peter Rayner
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: prayner@xxxxxxxxxxx

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help".



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog