pandoc/tests/pipe-tables.native
John MacFarlane eb8aee477d Pipe tables with long lines now get relative cell widths.
If a pipe table contains a line longer than the column
width (as set by `--columns` or 80 by default), relative
widths are computed based on the widths of the separator lines
relative to the column width.

This should solve persistent problems with long pipe tables in
LaTeX/PDF output, and give more flexibility for determining
relative column widths in other formats, too.

For narrower pipe tables, column widths of 0 are used,
telling pandoc not to specify widths explicitly in output
formats that permit this.

Closes #2471.
2015-10-30 12:37:08 -07:00

97 lines
3.2 KiB
Text

[Para [Str "Simplest",Space,Str "table",Space,Str "without",Space,Str "caption:"]
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
[[Plain [Str "Default1"]]
,[Plain [Str "Default2"]]
,[Plain [Str "Default3"]]]
[[[Plain [Str "12"]]
,[Plain [Str "12"]]
,[Plain [Str "12"]]]
,[[Plain [Str "123"]]
,[Plain [Str "123"]]
,[Plain [Str "123"]]]
,[[Plain [Str "1"]]
,[Plain [Str "1"]]
,[Plain [Str "1"]]]]
,Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignDefault,AlignCenter] [0.0,0.0,0.0,0.0]
[[Plain [Str "Right"]]
,[Plain [Str "Left"]]
,[Plain [Str "Default"]]
,[Plain [Str "Center"]]]
[[[Plain [Str "12"]]
,[Plain [Str "12"]]
,[Plain [Str "12"]]
,[Plain [Str "12"]]]
,[[Plain [Str "123"]]
,[Plain [Str "123"]]
,[Plain [Str "123"]]
,[Plain [Str "123"]]]
,[[Plain [Str "1"]]
,[Plain [Str "1"]]
,[Plain [Str "1"]]
,[Plain [Str "1"]]]]
,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"]
,Table [] [AlignRight,AlignLeft,AlignCenter] [0.0,0.0,0.0]
[[Plain [Str "Right"]]
,[Plain [Str "Left"]]
,[Plain [Str "Center"]]]
[[[Plain [Str "12"]]
,[Plain [Str "12"]]
,[Plain [Str "12"]]]
,[[Plain [Str "123"]]
,[Plain [Str "123"]]
,[Plain [Str "123"]]]
,[[Plain [Str "1"]]
,[Plain [Str "1"]]
,[Plain [Str "1"]]]]
,Para [Str "Headerless",Space,Str "table",Space,Str "without",Space,Str "caption:"]
,Table [] [AlignRight,AlignLeft,AlignCenter] [0.0,0.0,0.0]
[[]
,[]
,[]]
[[[Plain [Str "12"]]
,[Plain [Str "12"]]
,[Plain [Str "12"]]]
,[[Plain [Str "123"]]
,[Plain [Str "123"]]
,[Plain [Str "123"]]]
,[[Plain [Str "1"]]
,[Plain [Str "1"]]
,[Plain [Str "1"]]]]
,Para [Str "Table",Space,Str "without",Space,Str "sides:"]
,Table [] [AlignDefault,AlignRight] [0.0,0.0]
[[Plain [Str "Fruit"]]
,[Plain [Str "Quantity"]]]
[[[Plain [Str "apple"]]
,[Plain [Str "5"]]]
,[[Plain [Str "orange"]]
,[Plain [Str "17"]]]
,[[Plain [Str "pear"]]
,[Plain [Str "302"]]]]
,Para [Str "One-column:"]
,Table [] [AlignDefault] [0.0]
[[Plain [Str "hi"]]]
[[[Plain [Str "lo"]]]]
,Para [Str "Header-less",Space,Str "one-column:"]
,Table [] [AlignCenter] [0.0]
[[]]
[[[Plain [Str "hi"]]]]
,Para [Str "Indented",Space,Str "left",Space,Str "column:"]
,Table [] [AlignRight,AlignLeft] [0.0,0.0]
[[Plain [Str "Number",Space,Str "of",Space,Str "siblings"]]
,[Plain [Str "Salary"]]]
[[[Plain [Str "3"]]
,[Plain [Str "33"]]]
,[[Plain [Str "4"]]
,[Plain [Str "44"]]]]
,Para [Str "Long",Space,Str "pipe",Space,Str "table",Space,Str "with",Space,Str "relative",Space,Str "widths:"]
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.125,0.1375,0.5]
[[Plain [Str "Default1"]]
,[Plain [Str "Default2"]]
,[Plain [Str "Default3"]]]
[[[Plain [Str "123"]]
,[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "table",Space,Str "cell"]]
,[Plain [Str "and",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "really",Space,Str "long",Space,Str "table",Space,Str "cell",Space,Str "that",Space,Str "will",Space,Str "probably",Space,Str "need",Space,Str "wrapping"]]]
,[[Plain [Str "123"]]
,[Plain [Str "123"]]
,[Plain [Str "123"]]]]]