From d2862421315a0be59e2e2ec088b9b24928224aa2 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Tue, 17 Nov 2020 17:18:15 +0100 Subject: JATS writer: support advanced table features --- test/Tests/Old.hs | 2 +- test/tables.jats_archiving | 204 +++++++++++++++++------------------- test/tables.jats_articleauthoring | 204 +++++++++++++++++------------------- test/tables.jats_publishing | 204 +++++++++++++++++------------------- test/tables/nordics.jats_archiving | 58 ++++++++++ test/tables/planets.jats_archiving | 128 ++++++++++++++++++++++ test/tables/students.jats_archiving | 56 ++++++++++ 7 files changed, 537 insertions(+), 319 deletions(-) create mode 100644 test/tables/nordics.jats_archiving create mode 100644 test/tables/planets.jats_archiving create mode 100644 test/tables/students.jats_archiving (limited to 'test') diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs index 2eb9e9cb0..aca2d05d0 100644 --- a/test/Tests/Old.hs +++ b/test/Tests/Old.hs @@ -101,7 +101,7 @@ tests pandocPath = , testGroup "jats" [ testGroup "writer" [ testGroup "jats_archiving" $ - writerTests' "jats_archiving" + extWriterTests' "jats_archiving" , testGroup "jats_articleauthoring" $ writerTests' "jats_articleauthoring" , testGroup "jats_publishing" $ diff --git a/test/tables.jats_archiving b/test/tables.jats_archiving index 30bacc2e8..78d6a79d4 100644 --- a/test/tables.jats_archiving +++ b/test/tables.jats_archiving @@ -4,35 +4,31 @@

Demonstration of simple table syntax.

- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -41,35 +37,31 @@

Simple table without caption:

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -81,35 +73,31 @@

Demonstration of simple table syntax.

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -121,30 +109,33 @@

Here’s the caption. It may span multiple lines.

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + +
Centered HeaderLeft AlignedRight AlignedDefault alignedCentered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.Secondrow5.0Here’s another one. Note the blank line between + rows.
@@ -152,30 +143,33 @@

Multiline table without caption:

- - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + +
Centered HeaderLeft AlignedRight AlignedDefault alignedCentered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.Secondrow5.0Here’s another one. Note the blank line between + rows.
@@ -183,28 +177,24 @@

Table without column headers:

- - - - - - - - + + + + - - - - + + + + - - - - + + + +
1212121212121212
123123123123123123123123
11111111
@@ -212,21 +202,23 @@

Multiline table without column headers:

- - - - + + + + + + - - - + + + - - - + + + diff --git a/test/tables.jats_articleauthoring b/test/tables.jats_articleauthoring index 30bacc2e8..78d6a79d4 100644 --- a/test/tables.jats_articleauthoring +++ b/test/tables.jats_articleauthoring @@ -4,35 +4,31 @@

Demonstration of simple table syntax.

Firstrow12.0Firstrow12.0 Example of a row that spans multiple lines.
Secondrow5.0Secondrow5.0 Here’s another one. Note the blank line between rows.
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -41,35 +37,31 @@

Simple table without caption:

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -81,35 +73,31 @@

Demonstration of simple table syntax.

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -121,30 +109,33 @@

Here’s the caption. It may span multiple lines.

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + +
Centered HeaderLeft AlignedRight AlignedDefault alignedCentered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.Secondrow5.0Here’s another one. Note the blank line between + rows.
@@ -152,30 +143,33 @@

Multiline table without caption:

- - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + +
Centered HeaderLeft AlignedRight AlignedDefault alignedCentered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.Secondrow5.0Here’s another one. Note the blank line between + rows.
@@ -183,28 +177,24 @@

Table without column headers:

- - - - - - - - + + + + - - - - + + + + - - - - + + + +
1212121212121212
123123123123123123123123
11111111
@@ -212,21 +202,23 @@

Multiline table without column headers:

- - - - + + + + + + - - - + + + - - - + + + diff --git a/test/tables.jats_publishing b/test/tables.jats_publishing index 30bacc2e8..78d6a79d4 100644 --- a/test/tables.jats_publishing +++ b/test/tables.jats_publishing @@ -4,35 +4,31 @@

Demonstration of simple table syntax.

Firstrow12.0Firstrow12.0 Example of a row that spans multiple lines.
Secondrow5.0Secondrow5.0 Here’s another one. Note the blank line between rows.
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -41,35 +37,31 @@

Simple table without caption:

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -81,35 +73,31 @@

Demonstration of simple table syntax.

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - - - - + + + - - - + + + - - - + + + - - - + + + @@ -121,30 +109,33 @@

Here’s the caption. It may span multiple lines.

RightLeftCenterRightLeftCenter Default
121212121212 12
123123123123123123 123
111111 1
- - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + +
Centered HeaderLeft AlignedRight AlignedDefault alignedCentered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.Secondrow5.0Here’s another one. Note the blank line between + rows.
@@ -152,30 +143,33 @@

Multiline table without caption:

- - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + +
Centered HeaderLeft AlignedRight AlignedDefault alignedCentered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.Secondrow5.0Here’s another one. Note the blank line between + rows.
@@ -183,28 +177,24 @@

Table without column headers:

- - - - - - - - + + + + - - - - + + + + - - - - + + + +
1212121212121212
123123123123123123123123
11111111
@@ -212,21 +202,23 @@

Multiline table without column headers:

- - - - + + + + + + - - - + + + - - - + + + diff --git a/test/tables/nordics.jats_archiving b/test/tables/nordics.jats_archiving new file mode 100644 index 000000000..5ac78bacd --- /dev/null +++ b/test/tables/nordics.jats_archiving @@ -0,0 +1,58 @@ + + +
Firstrow12.0Firstrow12.0 Example of a row that spans multiple lines.
Secondrow5.0Secondrow5.0 Here’s another one. Note the blank line between rows.
+

States belonging to the Nordics.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCapitalPopulation + (in 2018)Area + (in km2)
Total27,376,0221,258,336
DenmarkCopenhagen5,809,50243,094
FinlandHelsinki5,537,364338,145
IcelandReykjavik343,518103,000
NorwayOslo5,372,191323,802
SwedenStockholm10,313,447450,295
+
diff --git a/test/tables/planets.jats_archiving b/test/tables/planets.jats_archiving new file mode 100644 index 000000000..e0158b6fa --- /dev/null +++ b/test/tables/planets.jats_archiving @@ -0,0 +1,128 @@ + + +

Data about the planets of our solar system.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameMass (10^24kg)Diameter (km)Density (kg/m^3)Gravity (m/s^2)Length of day (hours)Distance from Sun (10^6km)Mean temperature (C)Number of moonsNotes
Terrestrial planetsMercury0.3304,87954273.74222.657.91670Closest to the Sun
Venus4.8712,10452438.92802.0108.24640
Earth5.9712,75655149.824.0149.6151Our world
Mars0.6426,79239333.724.7227.9-652The red planet
Jovian planetsGas giantsJupiter1898142,984132623.19.9778.6-11067The largest planet
Saturn568120,5366879.010.71433.5-14062
Ice giantsUranus86.851,11812718.717.22872.5-19527
Neptune10249,528163811.016.14495.1-20014
Dwarf planetsPluto0.01462,37020950.7153.35906.4-2255Declassified as a planet in 2006.
+
diff --git a/test/tables/students.jats_archiving b/test/tables/students.jats_archiving new file mode 100644 index 000000000..3edf58a7f --- /dev/null +++ b/test/tables/students.jats_archiving @@ -0,0 +1,56 @@ + + +

List of Students

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Student IDName
Computer Science
3741255Jones, Martha
4077830Pierce, Benjamin
5151701Kirk, James
Russian Literature
3971244Nim, Victor
Astrophysics
4100332Petrov, Alexandra
4100332Toyota, Hiroko
+
-- cgit v1.2.3