aboutsummaryrefslogtreecommitdiff
path: root/test/command/4063.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-22 21:56:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-22 22:03:54 -0700
commit1af2cfb2873c5bb6ddd9fc00d076088b2e62af30 (patch)
treebedfe3a41ffd0fb4f88560d8e834b74a486ccbba /test/command/4063.md
parent80b4b3fe82a19a4ea1e76fc4a81c9c88676c7ce0 (diff)
downloadpandoc-1af2cfb2873c5bb6ddd9fc00d076088b2e62af30.tar.gz
Handle relative lengths (e.g. `2*`) in HTML column widths.
See <https://www.w3.org/TR/html4/types.html#h-6.6>. "A relative length has the form "i*", where "i" is an integer. When allotting space among elements competing for that space, user agents allot pixel and percentage lengths first, then divide up remaining available space among relative lengths. Each relative length receives a portion of the available space that is proportional to the integer preceding the "*". The value "*" is equivalent to "1*". Thus, if 60 pixels of space are available after the user agent allots pixel and percentage space, and the competing relative lengths are 1*, 2*, and 3*, the 1* will be alloted 10 pixels, the 2* will be alloted 20 pixels, and the 3* will be alloted 30 pixels." Closes #4063.
Diffstat (limited to 'test/command/4063.md')
-rw-r--r--test/command/4063.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/command/4063.md b/test/command/4063.md
new file mode 100644
index 000000000..838472b46
--- /dev/null
+++ b/test/command/4063.md
@@ -0,0 +1,29 @@
+```
+% pandoc -f html -t native
+<table>
+<colgroup>
+ <col width="30%" />
+ <col width="*" />
+</colgroup>
+<tr>
+ <td>1</td>
+ <td>2</td>
+</tr>
+</table>
+^D
+[Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 0.3)
+ ,(AlignDefault,ColWidth 0.7)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "2"]]]])]
+ (TableFoot ("",[],[])
+ [])]
+```