pandoc/tests/tables.latex

177 lines
3.3 KiB
Text
Raw Normal View History

Simple table with caption:
\ctable[caption = Demonstration of simple table syntax.,
pos = H, center, botcap]{rlcl}
{% notes
}
{% rows
\FL
Right & Left & Center & Default
\ML
12 & 12 & 12 & 12
\\\noalign{\medskip}
123 & 123 & 123 & 123
\\\noalign{\medskip}
1 & 1 & 1 & 1
\LL
}
Simple table without caption:
\ctable[pos = H, center, botcap]{rlcl}
{% notes
}
{% rows
\FL
Right & Left & Center & Default
\ML
12 & 12 & 12 & 12
\\\noalign{\medskip}
123 & 123 & 123 & 123
\\\noalign{\medskip}
1 & 1 & 1 & 1
\LL
}
Simple table indented two spaces:
\ctable[caption = Demonstration of simple table syntax.,
pos = H, center, botcap]{rlcl}
{% notes
}
{% rows
\FL
Right & Left & Center & Default
\ML
12 & 12 & 12 & 12
\\\noalign{\medskip}
123 & 123 & 123 & 123
\\\noalign{\medskip}
1 & 1 & 1 & 1
\LL
}
Multiline table with caption:
\ctable[caption = Here's the caption. It may span multiple lines.,
pos = H, center, botcap]{clrl}
{% notes
}
{% rows
\FL
\parbox[b]{0.15\columnwidth}{\centering
Centered Header
} & \parbox[b]{0.14\columnwidth}{\raggedright
Left Aligned
} & \parbox[b]{0.16\columnwidth}{\raggedleft
Right Aligned
} & \parbox[b]{0.34\columnwidth}{\raggedright
Default aligned
}
\ML
\parbox[t]{0.15\columnwidth}{\centering
First
} & \parbox[t]{0.14\columnwidth}{\raggedright
row
} & \parbox[t]{0.16\columnwidth}{\raggedleft
12.0
} & \parbox[t]{0.34\columnwidth}{\raggedright
Example of a row that spans multiple lines.
}
\\\noalign{\medskip}
\parbox[t]{0.15\columnwidth}{\centering
Second
} & \parbox[t]{0.14\columnwidth}{\raggedright
row
} & \parbox[t]{0.16\columnwidth}{\raggedleft
5.0
} & \parbox[t]{0.34\columnwidth}{\raggedright
Here's another one. Note the blank line between rows.
}
\LL
}
Multiline table without caption:
\ctable[pos = H, center, botcap]{clrl}
{% notes
}
{% rows
\FL
\parbox[b]{0.15\columnwidth}{\centering
Centered Header
} & \parbox[b]{0.14\columnwidth}{\raggedright
Left Aligned
} & \parbox[b]{0.16\columnwidth}{\raggedleft
Right Aligned
} & \parbox[b]{0.34\columnwidth}{\raggedright
Default aligned
}
\ML
\parbox[t]{0.15\columnwidth}{\centering
First
} & \parbox[t]{0.14\columnwidth}{\raggedright
row
} & \parbox[t]{0.16\columnwidth}{\raggedleft
12.0
} & \parbox[t]{0.34\columnwidth}{\raggedright
Example of a row that spans multiple lines.
}
\\\noalign{\medskip}
\parbox[t]{0.15\columnwidth}{\centering
Second
} & \parbox[t]{0.14\columnwidth}{\raggedright
row
} & \parbox[t]{0.16\columnwidth}{\raggedleft
5.0
} & \parbox[t]{0.34\columnwidth}{\raggedright
Here's another one. Note the blank line between rows.
}
\LL
}
Table without column headers:
\ctable[pos = H, center, botcap]{rlcr}
{% notes
}
{% rows
\FL
12 & 12 & 12 & 12
\\\noalign{\medskip}
123 & 123 & 123 & 123
\\\noalign{\medskip}
1 & 1 & 1 & 1
\LL
}
Multiline table without column headers:
\ctable[pos = H, center, botcap]{clrl}
{% notes
}
{% rows
\FL
\parbox[t]{0.15\columnwidth}{\centering
First
} & \parbox[t]{0.14\columnwidth}{\raggedright
row
} & \parbox[t]{0.16\columnwidth}{\raggedleft
12.0
} & \parbox[t]{0.34\columnwidth}{\raggedright
Example of a row that spans multiple lines.
}
\\\noalign{\medskip}
\parbox[t]{0.15\columnwidth}{\centering
Second
} & \parbox[t]{0.14\columnwidth}{\raggedright
row
} & \parbox[t]{0.16\columnwidth}{\raggedleft
5.0
} & \parbox[t]{0.34\columnwidth}{\raggedright
Here's another one. Note the blank line between rows.
}
\LL
}