]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/table/discussion.mdwn
99c7e059be427e179c0537404d65c586406d32a8
[ikiwiki.git] / doc / plugins / table / discussion.mdwn
1 Well, that's an one workaround for (some versions of) markdown's
2 lack of tables..
3
4 Interesting that you chose to use CSV format. Seems there are advantages
5 (standardisation) and disadvantages (limited to simple tables).
6
7 --[[Joey]]
8
9 # Patch for new header options
10
11 I have written a small patch for this plugin to enable the first column as a header instead of just the first row or no header.
12
13 In my version, there is three options for the header field :
14
15 + **no**: no header;
16 + **col**: the first column as header;
17 + **row**: the first row as header (for compatibility reason, **yes** is an alternate value for this option). 
18
19 Here is the links to the patch and to a patched version of the plugin :
20
21 + [table.pm.patch](http://alexandre.dupas.free.fr/code/ikiwiki/table.pm.patch)
22 + [table.pm](http://alexandre.dupas.free.fr/code/ikiwiki/table.pm)
23
24 I hope this might be intresting for some ikiwiki user's.
25
26 --[[AlexandreDupas]]
27
28 > Thanks for the patch, I've merged it in.
29 > (Just FYI, in future, I recommend using a unified diff. Also, not
30 > renaming variables that don't really need to be renamed makes your patch
31 > easier to apply.) --[[Joey]]
32
33 ---
34
35 # Horizontal cell alignment
36
37 Do you know any easy method of horizontal cell alignment? I know I can set `class`
38 attribute for the table, but how to set different `class` for different cells?
39
40 [DokuWiki](http://www.dokuwiki.org/) has a nice horizontal alignment solution.
41 Suppose that we have `|foo|` cell. If I want to align the cell to left,
42 then I should type `|foo |`. If I want to do right alignment, then I type `| foo|`.
43 For centering cell content I need to type `| foo |`. Please note that I used
44 only one space for all examples, but in DokuWiki I can use many spaces.
45
46 Do you like it? Can you implement the same in Ikiwiki? :) --[[PaweÅ‚|ptecza]]
47
48 > Multimarkdown has [table support](http://fletcherpenney.net/multimarkdown/users_guide/multimarkdown_syntax_guide/#tables)
49 > that includes alignment. (Using colons to control it.) So you can turn on
50 > `multimarkdown` in setup to use that.
51
52 > I'd not mind if someone adds alignment to this plugin. Although the
53 > universe of possible table formatting stuff is nearly endless, and at
54 > some point it becomes clearer and simpler to just write the table in
55 > html.. --[[Joey]]
56
57 >> Thanks a lot for the info about Multimarkdown! It seems very interesting.
58
59 >> I'll look at that plugin and try to add that feature, if it's not
60 >> too hard.
61
62 >> I know that people have many ideas how to format their tables
63 >> and it's not easy to create universal tool. Of course `table` plugin
64 >> was written rather for simple usage. However cell alignment is very
65 >> helpful feature, so I think the plugin should be able to do it.
66 >> --[[PaweÅ‚|ptecza]]
67
68 -----
69
70 If you see `[[!table\ Error: ]]` you probably need to `sudo apt-get install libtext-csv-perl`.