Zim

Render tables in pages

Bug #208589 reported by Peter Morgan
308
This bug affects 62 people
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Wishlist
Unassigned

Bug Description

We need to include tables in zim pages. Main problem is to create a table widget to embed text buffer. Also add syntax definition and add table support for export formats.

description: updated
Changed in zim:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Refactoring use of prioities, using whishlist for new features

Changed in zim:
importance: Medium → Wishlist
Revision history for this message
dotancohen (dotancohen) wrote :

This page describes the table syntax used in Wikipedia:
http://en.wikipedia.org/wiki/Help:Table

Revision history for this message
nachiket (nachiket) wrote :

This is a very useful feature to have. One more vote for adding this.

Revision history for this message
rylleman (rylleman) wrote :

I also think this would be very useful for Zim.
I went here to file a wish for it and found this one already existing.

Revision history for this message
maximaximax (mvv73) wrote :

+1. It would be very useful to have such a feature

Revision history for this message
Michael Mulqueen (michael.mulqueen) wrote :

I would also be very for a table widget.

The Wikipedia format would be one approach, but I've always felt that it's rather... ugly. Obviously, if you could actually edit it like you'd edit a table in say OpenOffice.org Writer, that would be less of an issue.

I'm wondering whether having this as the format might work a little better:
{**Name**|**Address**|**Tel No**}
{Anne|12 South Street, Swanage|01929 223789}
{[Jack]|40 Leafy Avenue, Bournemouth|01202 168735}
{Rebecca|5 Anvil Crescent, Gussage All Saints|01202 896741}

You don't need any specialised formatting for headers, you just use bold type. Or if you wanted to make more use of semantics, then you could use the header syntax I guess (=Name=), just inside a cell - this would aid translation to HTML. Rather than having those awkward new row demarkations that you have with MediaWiki, you'd just use {asdasdasd} as a row. Rather than using MediaWiki's format to format the entire cell (using CSS), we could just render cells as if they were any other part of a zim document. So if you wanted a cell italic you'd just surround the contents with "//"s (of course, you could do this with the GUI, you wouldn't have to type it).

I don't mean to play down anyone else's idea. I think that what Zim needs isn't always what MediaWiki or LaTeX needs. We don't want to unnecessarily add bloat, by reusing the work of other projects - not that that would always been the case. Just my two pence.

Jaap, are there any plans to implement this in PyZim in the future?

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 208589] Re: Render tables in pages

Agree that tables are a very interesting feature to have. Unfortunately I
have no concrete plan to do this yet. Problem is not so much the wiki syntax
to use but how to implement in the Gtk text editor.

Revision history for this message
Jakob Gager (jakob-gager) wrote :

About adding tables,I'm sure somebody has tried it before but it is very easy to add tables via the latex equation function.
Just enter a table definition instead an equation and voilá you have a table in your notebook. The only nice feature would be to extend the search function to look up the .tex files as well, so you can find table entries even they are just a png in the pages.

A screen of an inserted table can be found here:
http://dl.dropbox.com/u/4149389/Tabular_Zim.png

For non Latex users a simplified interface may be necessary to create such tables.

Revision history for this message
Wolf (wolf-beckmanns-nest) wrote :

Yes Tables are a very interesting feature.
The DokuWiki syntax is very simple and readable.
The Syntax is:
^ Heading 1 ^ Heading 2 ^ Heading 3 ^
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
| Row 2 Col 1 | some colspan (note the double pipe) ||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |

Revision history for this message
Wolf (wolf-beckmanns-nest) wrote :

You ask for a method to display a Table in the gtk Text Editor.

I found an Article about using WebKit:
http://arstechnica.com/open-source/guides/2009/07/how-to-build-a-desktop-wysiwyg-editor-with-webkit-and-html-5.ars

It's an interesting idea, because you get all other html-features for further enhancements like Javascript etc.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Definitely the usage of webkit for the editor rendering is very
interesting. However my feeling is that it is not yet mature enough to
replace the current editor. Will keep an eye on it for future work.

Revision history for this message
nomnex (nomnex) wrote :

Comment #10. Not sure if this can be ported to zim but woa (Wiki on a Stick) as also a basic table feature very easy to use. see, attachment for information.

Revision history for this message
Henning Stree (hs-piano) wrote :

Dear Mr. Karssenberg,
what do you think about editing tables in the source text of a zim-page only?
When the user goes back from source-view to zim-view, the program could do it's work: formating the table.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

On Tue, Apr 6, 2010 at 9:34 PM, Henning Stree <email address hidden> wrote:
> what do you think about editing tables in the source text of a zim-page only?
> When the user goes back from source-view to zim-view, the program could do it's work: formating the table.

This could work as a temporary work around, but is not satisfactory
for a real solution.

Regards,

Jaap

Revision history for this message
steve trebotich (dayguess) wrote :

hi-
just curious if there has been any new thoughts on this?

thanks
steve

Revision history for this message
Zinc Linux (zinc-linux) wrote :

Sortable tables via GUI-based plugin would be simple, quick, and easy-- for the end user.

The reason I love Zim-- its quick & easy.

Thanks to all the developers for making a great app. I prefer it over Xmind & oneNote.

Revision history for this message
aquCHAOS (aquchaos) wrote :

one more vote for adding table function in zim~

cheers,
Chaol

Revision history for this message
aquCHAOS (aquchaos) wrote :

If possible, please also add code box :-)

Revision history for this message
Guillaume Chereau (guillaume-chereau) wrote :

One very nice syntax for tables in wiki is the one used by restructured text : http://docutils.sourceforge.net/docs/user/rst/quickref.html#tables

I specially like the simple table syntax because it is both readable and easily editable.

Guillaume

Revision history for this message
Michael Mulqueen (michael.mulqueen) wrote :
Revision history for this message
Brendan Kidwell (bkidwell) wrote :

Hackish workaround while we're waiting for someone to implement this for real:
http://zim-wiki.org/wiki/doku.php?id=create_tables_using_graphviz

Revision history for this message
Svenn (svenn-bjerkem) wrote :

Regarding the markup format of tables, I would just mention the way asciidoc generates tables. Asciidoc is also written i python and ideas could be borrowed from that project.

tags: added: embedded missing objects
removed: wiki-source
Revision history for this message
Yves Rousselle (yvesrousselle) wrote :

Hi,
Like the other one, I agree that the possibility to do tables in Zim would be great ! In fact, it's the only issue that led me sometimes to look for another note software... But I never find a good subsitute because Zim answer all my needs !
The solution of Jakob Gager (https://bugs.launchpad.net/zim/+bug/208589/comments/8) consisting in (of?) using LaTeX tables in the equation tools works fine. I think I won't look elsewhere for a while.

tags: added: embedded-objects
removed: embedded objects
Revision history for this message
Nikolaus Klumpp (nickk-137) wrote :

I'd love to see a feature - but only if it allows tables to be sorted without much hassle (i.e. sorting by the contents of arbitrary columns).

Revision history for this message
Egon A. Rath (egon-rath) wrote :

Any news about this feature?

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

On Tue, Apr 17, 2012 at 1:11 PM, Egon A. Rath <email address hidden> wrote:
> Any news about this feature?

Nope. If there was, it would have been posted here.

-- Jaap

Revision history for this message
Mike Smith (mlsmith) wrote :

I'd also love to see this feature added. How much time and resources would it take to implement this? Have any more funds been added to the Bounty that Mike Mulqueen put up? I'm willing to add to that bounty as this feature is important.

Jaap: Is Webkit really that unstable or lacking maturity? It seems like the flexibility that Webkit offers would outweigh the limitations of GTK even if Webkit is not fully matured.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

On Thu, Jun 28, 2012 at 3:21 PM, Mike Smith <email address hidden> wrote:
> I'd also love to see this feature added. How much time and resources
> would it take to implement this? Have any more funds been added to the
> Bounty that Mike Mulqueen put up? I'm willing to add to that bounty as
> this feature is important.

I think at the moment we need someone with python / gtk knowledge to
contribute time, rather than adding to the bounty. Unfortunately the
bounties have so far not resulted in people joining the development.

> Jaap: Is Webkit really that unstable or lacking maturity? It seems like
> the flexibility that Webkit offers would outweigh the limitations of GTK
> even if Webkit is not fully matured.

Webkit itself is quite mature. It is the bindings for embedding it
that are not mature. At this moment switching would mean we loose a
lot of the editor features in zim.

-- Jaap

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

P.S. I should mention that I'm working slowly on adding a framework
for embedded objects. This framework will allow embedded tables as
well. See the "pyzim-next" development tree.

Revision history for this message
Sebastian (sebastianspublicaddress) wrote :

Another workaround: Use the ditaa plugin.
I still have to discover how to pass option "-E" to ditaa, though.

Revision history for this message
Sebastian (sebastianspublicaddress) wrote :

Adding option "-E" to ditaa globally is possible in ditaaeditor.py:

# TODO put these commands in preferences
#dotcmd = ('ditaa')
dotcmd = ('ditaa -E')

Revision history for this message
K. Bauer (k.bauer) wrote :

@Jaap: Will said embedded-objects framework allow placing zim's self-updating Links inside such objects?

I am currently trying to reorganize the data from my thesis in preparation for a paper. In that process I wanted to have links to the details how the data was obtained in the summary table.

Having tables that allow links would be pretty powerful for that purpose. Together with the backlinks feature it would help enormously organizing and tracking e.g. simulation data.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

On Sat, Jul 6, 2013 at 7:15 PM, K. Bauer <email address hidden> wrote:

> @Jaap: Will said embedded-objects framework allow placing zim's self-
> updating Links inside such objects?
>
> I am currently trying to reorganize the data from my thesis in
> preparation for a paper. In that process I wanted to have links to the
> details how the data was obtained in the summary table.
>
> Having tables that allow links would be pretty powerful for that
> purpose. Together with the backlinks feature it would help enormously
> organizing and tracking e.g. simulation data.
>

 The framework will allow plugins to define custom objects, so probably
should be able to make a special table that gathers backlinks etc. But
would need additional work to write a plugin that supports your exact work
flow.

Regards,

Jaap

Revision history for this message
K. Bauer (k.bauer) wrote :

Ah, there is a misunderstanding. I meant the backlink
mechanism that is already in zim.

What I mean is being able to place links in a table; I just
mentioned backlinks because it is useful how Zim pages know
that they are "in use".

Also, I found a workaround for my usecase.

1. Emulate a table by using the typewriter formatting,
   handadjusting the columns.
2. In the last column links (i.e. non-typewriter text) can
   be placed without breaking the tabular formatting.
3. When exporting to html, the <code> tag isn't rendered
   with spaces preserved. Also, both in HTML and in ZIM when
   the table is too wide for the window, the tabular
   character is lost. Both can be corrected by using
   non-breaking spaces (Unicode 0x00A0) instead of normal
   spaces.

Here an example table (from the source):

''                Value     Error   Source''
''Volume           35 Å³    0.3 Å³  ''[[CopyEquations]]
''Lattice Const.   30 Å     0.1 Å   ''[[Home]]

Revision history for this message
Nick (nick222-yandex) wrote :

And how about tables?
For example, in RedNotebook user can insert tables in note by |||

Revision history for this message
Celcal (celinocaliente) wrote :

Could any code or library from Libre Office Writer be used in Zim to help implement this functionality?

Revision history for this message
Pablo Cabrera (pablo-rocka) wrote :

+1 for this feature, it would be really useful!

Revision history for this message
Jack Candle (spam123-q) wrote :

2008-03-29 :D ... Funny

Anyway... +1 from me too because slowy i get familar with these wonderfull Programm!

Best regards...

Revision history for this message
Luc C. (lucouluke) wrote :

I just discovered zim...impressive!

Inserting tables is missing though...

Changed in zim:
status: Confirmed → Fix Released
Revision history for this message
feluxe (feluxe) wrote :

I really like Zim. Though I'm having a hard time migrating from OneNote beacuse of missing table feature.
+1 for DokuWiki like syntax.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.