Table column specifiers with merged cells

143 views
Skip to first unread message

Will

unread,
Jul 29, 2011, 10:59:28 AM7/29/11
to asciidoc
Hi,

I found a small issue with table formats set at the column level when
using merged cells. The following example illustrates (rendered using
asciidoc 8.6.5 with Win xp sp3).

[cols="<1m,>1,^1s, ^1e"]
|==========================================
.2+| .2+|1- A 2+|2- B
|i- a |ii- b
|Values 1 |v1 |v2 |v3
|Values 2 |v4 |v5 |v6
|==========================================

This results in:

* the style applied for the first column (left aligned, monospaced) is
also being applied to the first cell directly beneath the merged cell.
* the style applied for the second column (right aligned) is also
applied to the second cell directly beneath the merged cell.
* the style applied to the third column (centred, strong) is then
applied to the remainder of the first column below the merged cell.
* the style applied to the fourth column (centred, emphasis) is then
applied to the remainder of the second column below the merged cell.


Cheers,
Will

Stuart Rackham

unread,
Aug 9, 2011, 1:03:01 AM8/9/11
to asci...@googlegroups.com
Thanks for spotting the bug Will. It was quite tricky, vertically spanned cells
where not being taken into account when the column styles were applied. I think
I've fixed it:

http://code.google.com/p/asciidoc/source/detail?r=cdfc037bf4d0df50f3891c0235d0d43302e32bf8


Cheers, Stuart

Simon Ruderich

unread,
Aug 10, 2011, 5:10:01 AM8/10/11
to asci...@googlegroups.com
On Tue, Aug 09, 2011 at 05:03:01PM +1200, Stuart Rackham wrote:
> Thanks for spotting the bug Will. It was quite tricky, vertically spanned
> cells where not being taken into account when the column styles were
> applied. I think I've fixed it:
>
> http://code.google.com/p/asciidoc/source/detail?r=cdfc037bf4d0df50f3891c0235d0d43302e32bf8

Hi,

This patch adds Will's example as test case.

Regards,
Simon
---
tests/data/testcases.txt | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/tests/data/testcases.txt b/tests/data/testcases.txt
index f30dac8..83c46b8 100644
--- a/tests/data/testcases.txt
+++ b/tests/data/testcases.txt
@@ -596,6 +596,16 @@ hard + 1min really hard taking the HR up to 160).
- Replacement from `testcases.conf` configuration file: test-replacement
|====

+== Table column specifiers with merged cells
+
+[cols="<1m,>1,^1s, ^1e"]
+|============================================
+ .2+| .2+|1- A 2+|2- B
+ |i- a |ii- b
+ |Values 1 |v1 |v2 |v3
+ |Values 2 |v4 |v5 |v6
+|============================================
+
Floating tables and images
--------------------------
.Simple table
@@ -750,4 +760,3 @@ endif::[]
ifeval::[not ({rs458}==2)]
This will not be processed.
endif::[]
-
--
1.7.6

--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Stuart Rackham

unread,
Aug 10, 2011, 7:58:10 PM8/10/11
to asci...@googlegroups.com
Thanks for the patch Simon, I've committed it to the trunk:

http://code.google.com/p/asciidoc/source/detail?r=4d7c8779a6b4d1533a8711813ef96c10b5ed2de6


Cheers, Stuart

Reply all
Reply to author
Forward
0 new messages