mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
@@ -40,4 +40,6 @@ tests = map rtfTest [ "footnote"
|
||||
, "bookmark"
|
||||
, "table_simple"
|
||||
, "table_error_codes"
|
||||
, "table_nested"
|
||||
, "table_nested_malformed_itap"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
Pandoc
|
||||
Meta { unMeta = fromList [] }
|
||||
[ Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignDefault , ColWidthDefault ) ]
|
||||
(TableHead ( "" , [] , [] ) [])
|
||||
[ TableBody
|
||||
( "" , [] , [] )
|
||||
(RowHeadColumns 0)
|
||||
[]
|
||||
[ Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignDefault , ColWidthDefault ) ]
|
||||
(TableHead ( "" , [] , [] ) [])
|
||||
[ TableBody
|
||||
( "" , [] , [] )
|
||||
(RowHeadColumns 0)
|
||||
[]
|
||||
[ Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Level"
|
||||
, Space
|
||||
, Str "two"
|
||||
, Space
|
||||
, Str "before"
|
||||
]
|
||||
, Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignDefault
|
||||
, ColWidthDefault
|
||||
)
|
||||
, ( AlignDefault
|
||||
, ColWidthDefault
|
||||
)
|
||||
]
|
||||
(TableHead ( "" , [] , [] ) [])
|
||||
[ TableBody
|
||||
( "" , [] , [] )
|
||||
(RowHeadColumns 0)
|
||||
[]
|
||||
[ Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Deep"
|
||||
, Space
|
||||
, Str "A"
|
||||
]
|
||||
]
|
||||
, Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Deep"
|
||||
, Space
|
||||
, Str "B"
|
||||
]
|
||||
]
|
||||
]
|
||||
, Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Deep"
|
||||
, Space
|
||||
, Str "C"
|
||||
]
|
||||
]
|
||||
, Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Deep"
|
||||
, Space
|
||||
, Str "D"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
(TableFoot ( "" , [] , [] ) [])
|
||||
, Para
|
||||
[ Str "Level"
|
||||
, Space
|
||||
, Str "two"
|
||||
, Space
|
||||
, Str "after"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
(TableFoot ( "" , [] , [] ) [])
|
||||
, Para [ Str "Outer" , Space , Str "after" ]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
(TableFoot ( "" , [] , [] ) [])
|
||||
, Para [ Str "Outside" , Space , Str "table" ]
|
||||
]
|
||||
@@ -0,0 +1,16 @@
|
||||
{\rtf1\ansi
|
||||
\trowd\cellx5000
|
||||
\pard\intbl\itap2 Level two before\par
|
||||
\pard\intbl\itap3 Deep A\nestcell Deep B\nestcell
|
||||
{\*\nesttableprops\trowd\cellx2000\cellx4000\nestrow}
|
||||
{\nonesttables NESTED FALLBACK ONE\par}
|
||||
\pard\intbl\itap3 Deep C\nestcell Deep D\nestcell
|
||||
{\*\nesttableprops\trowd\cellx2000\cellx4000\nestrow}
|
||||
{\nonesttables NESTED FALLBACK TWO\par}
|
||||
\pard\intbl\itap2 Level two after\nestcell
|
||||
{\*\nesttableprops\trowd\cellx4000\nestrow}
|
||||
{\nonesttables PARENT FALLBACK\par}
|
||||
\pard\intbl\itap1 Outer after\cell
|
||||
\row
|
||||
\pard\itap0 Outside table\par
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
Pandoc
|
||||
Meta { unMeta = fromList [] }
|
||||
[ Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignDefault , ColWidthDefault ) ]
|
||||
(TableHead ( "" , [] , [] ) [])
|
||||
[ TableBody
|
||||
( "" , [] , [] )
|
||||
(RowHeadColumns 0)
|
||||
[]
|
||||
[ Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignDefault , ColWidthDefault ) ]
|
||||
(TableHead ( "" , [] , [] ) [])
|
||||
[ TableBody
|
||||
( "" , [] , [] )
|
||||
(RowHeadColumns 0)
|
||||
[]
|
||||
[ Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Parent"
|
||||
, Space
|
||||
, Str "before"
|
||||
]
|
||||
, Table
|
||||
( "" , [] , [] )
|
||||
(Caption Nothing [])
|
||||
[ ( AlignDefault
|
||||
, ColWidthDefault
|
||||
)
|
||||
]
|
||||
(TableHead ( "" , [] , [] ) [])
|
||||
[ TableBody
|
||||
( "" , [] , [] )
|
||||
(RowHeadColumns 0)
|
||||
[]
|
||||
[ Row
|
||||
( "" , [] , [] )
|
||||
[ Cell
|
||||
( "" , [] , [] )
|
||||
AlignDefault
|
||||
(RowSpan 1)
|
||||
(ColSpan 1)
|
||||
[ Para
|
||||
[ Str "Child"
|
||||
, Space
|
||||
, Str "at"
|
||||
, Space
|
||||
, Str "skipped"
|
||||
, Space
|
||||
, Str "level"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
(TableFoot ( "" , [] , [] ) [])
|
||||
, Para
|
||||
[ Str "Parent"
|
||||
, Space
|
||||
, Str "after"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
(TableFoot ( "" , [] , [] ) [])
|
||||
, Para [ Str "Outer" , Space , Str "cell" ]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
(TableFoot ( "" , [] , [] ) [])
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
{\rtf1\ansi
|
||||
\trowd\cellx5000
|
||||
\pard\intbl\itap2 Parent before\par
|
||||
\pard\intbl\itap5 Child at skipped level\nestcell
|
||||
{\*\nesttableprops\trowd\cellx4000\nestrow}
|
||||
\pard\intbl\itap2 Parent after\nestcell
|
||||
{\*\nesttableprops\trowd\cellx4000\nestrow}
|
||||
\pard\intbl\itap1 Outer cell\cell
|
||||
\row
|
||||
}
|
||||
Reference in New Issue
Block a user