Patch for the issues #28 and #29
*Created originally on Bitbucket by Anonymous* Dear Eli, First of all, thanks for your great work, the `table_styling` extension in `cloud_sptheme` is definitely the thing that is missing in off-the-shelf Sphinx distribution. I would like to agree with the people reporting the issues #28 and #29 that colspan and first row alignment support will be a nice-to-have feature. As I need this in my docs, I decided to fix these issues by myself, the patch is attached. The patch adds first row special alignment by using `:first-row-alignment:` option with the same syntax as `:column-alignment:` and supports the column spanning. The alignment of spanned cell is taken from its left column and the proper right divider is taken from its right column. The `:first-row-alignment:` option does not distinguish between header rows and body rows, the alignment applies to the **absolute** first row, but this behavior can be easily changed. Please note, that I am *not* a Python programmer at all :), so the patch may not be perfect, but it definitely works. Right now I am able to do the things like ``` #!rst .. table:: :widths: 1 1 1 1 2 2 4 4 :column-alignment: cccccccc :first-row-alignment: lrlrlrlr :column-wrapping: tttttttt ==== ==== ==== ==== ======== ======== ================= ================= 63 56 55 48 47 32 31 0 ==== ==== ==== ==== ======== ======== ================= ================= x111xx01 Partition\_ID (24-bit) Offset (32-bit) --------- --------------------------- ----------------------------------- Domain\_UUID Low ------------------------------------------------------------------------- Domain\_UUID High ========================================================================= ``` that renders as ![Screenshot from 2017-03-30 10-47-10.png](https://bitbucket.org/repo/KRMz5/images/2292702231-Screenshot%20from%202017-03-30%2010-47-10.png) I hope this patch will be useful. WBR, Andrey
issue