diff options
Diffstat (limited to 't/fmt/asciidoc/TablesCells.trans')
-rw-r--r-- | t/fmt/asciidoc/TablesCells.trans | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/t/fmt/asciidoc/TablesCells.trans b/t/fmt/asciidoc/TablesCells.trans new file mode 100644 index 0000000..6181b1d --- /dev/null +++ b/t/fmt/asciidoc/TablesCells.trans @@ -0,0 +1,161 @@ +TABLES WITH CELLS TRANSLATED +============================ + +EXAMPLES TAKEN FROM ASCIIDOCTOR TABLE GUIDE + +.SIMPLE TABLE +|=== +| CELL IN COLUMN 1, ROW 1 | CELL IN COLUMN 2, ROW 1 +| CELL IN COLUMN 1, ROW 2 | CELL IN COLUMN 2, ROW 2 +| CELL IN COLUMN 1, ROW 3 | CELL IN COLUMN 2, ROW 3 +|=== + +.NO SPACE AROUND COLUMN SEPARATOR +|=== +|CELL IN COLUMN 1, ROW 1|CELL IN COLUMN 2, ROW 1 +|=== + +.CELLS ON EACH LINE +[cols="3*"] +|=== +|CELL IN COLUMN 1, ROW 1 +|CELL IN COLUMN 2, ROW 1 +|CELL IN COLUMN 3, ROW 1 + +|CELL IN COLUMN 1, ROW 2 +|CELL IN COLUMN 2, ROW 2 +|CELL IN COLUMN 3, ROW 2 +|=== + +.CELL DUPLICATED +|=== +|CELL IN COLUMN 1, ROW 1 |CELL IN COLUMN 2, ROW 1 |CELL IN COLUMN 3, ROW 1 +3*|SAME CELL CONTENT IN COLUMNS 1, 2, AND 3 +|CELL IN COLUMN 1, ROW 3 +|CELL IN COLUMN 2, ROW 3 +|CELL IN COLUMN 3, ROW 3 +|=== + +.CELL SPAN +|=== + +|CELL IN COLUMN 1, ROW 1 |CELL IN COLUMN 2, ROW 1 |CELL IN COLUMN 3, ROW 1 + +3+|CONTENT IN A SINGLE CELL THAT SPANS COLUMNS 1, 2, AND 3 + +|CELL IN COLUMN 1, ROW 3 +|CELL IN COLUMN 2, ROW 3 +|CELL IN COLUMN 3, ROW 3 + +|=== + +.CELL SPAN IN ROWS +|=== + +|CELL IN COLUMN 1, ROW 1 |CELL IN COLUMN 2, ROW 1 |CELL IN COLUMN 3, ROW 1 + +.2+|CONTENT IN A SINGLE CELL THAT SPANS ROWS 2 AND 3 +|CELL IN COLUMN 2, ROW 2 +|CELL IN COLUMN 3, ROW 2 + +|CELL IN COLUMN 2, ROW 3 +|CELL IN COLUMN 3, ROW 3 + +|=== + +.CELL SPAN IN COLUMNS AND ROWS +|=== + +|COLUMN 1, ROW 1 |COLUMN 2, ROW 1 |COLUMN 3, ROW 1 |COLUMN 4, ROW 1 + +|COLUMN 1, ROW 2 +2.3+|CONTENT IN A SINGLE CELL THAT SPANS OVER ROWS AND COLUMNS +|COLUMN 4, ROW 2 + +|COLUMN 1, ROW 3 +|COLUMN 4, ROW 3 + +|COLUMN 1, ROW 4 +|COLUMN 4, ROW 4 +|=== + +.CELLS ALIGNED HORIZONTALLY, VERTICALLY, AND ACROSS A SPAN OF THREE COLUMNS +[cols="3"] +|=== +^|PREFIX THE `{VBAR}` WITH `{CARET}` TO CENTER CONTENT HORIZONTALLY +<|PREFIX THE `{VBAR}` WITH `<` TO ALIGN THE CONTENT TO THE LEFT HORIZONTALLY +>|PREFIX THE `{VBAR}` WITH `>` TO ALIGN THE CONTENT TO THE RIGHT HORIZONTALLY + +.^|PREFIX THE `{VBAR}` WITH A `.` AND `{CARET}` TO CENTER THE CONTENT IN THE CELL VERTICALLY +.<|PREFIX THE `{VBAR}` WITH A `.` AND `<` TO ALIGN THE CONTENT TO THE TOP OF THE CELL +.>|PREFIX THE `{VBAR}` WITH A `.` AND `>` TO ALIGN THE CONTENT TO THE BOTTOM OF THE CELL + +3+^.^|THIS CONTENT SPANS THREE COLUMNS (`3{PLUS}`) AND IS CENTERED HORIZONTALLY (`{CARET}`) AND VERTICALLY (`.{CARET}`) WITHIN THE CELL. + +|=== + +.BUILDING A VARIETY OF CELL SPECIFIERS +|=== + +2*>m|THIS CONTENT IS DUPLICATED ACROSS TWO COLUMNS. + +IT IS ALIGNED RIGHT HORIZONTALLY. + +AND IT IS MONOSPACED. + +.3+^.>s|THIS CELL SPANS 3 ROWS. THE CONTENT IS CENTERED HORIZONTALLY, ALIGNED TO THE BOTTOM OF THE CELL, AND STRONG. +e|THIS CONTENT IS EMPHASIZED. + +.^l|THIS CONTENT IS ALIGNED TO THE TOP OF THE CELL AND LITERAL. + +v|THIS CELL CONTAINS A VERSE +THAT MAY ONE DAY EXPOUND ON THE +WONDERS OF TABLES IN AN +EPIC SONNET. + +|=== + +.CELLS WITH ASCIIDOC IN THEM +[cols="2"] +|=== + +a|THIS CELL IS PREFIXED WITH AN `A`, SO THE PROCESSOR INTERPRETS THE FOLLOWING LINES AS AN ASCIIDOC LIST. + +* LIST ITEM 1 +* LIST ITEM 2 +* LIST ITEM 3 +|THIS CELL *IS NOT* PREFIXED WITH AN `A`, SO THE PROCESSOR DOES NOT INTERPRET THE FOLLOWING LINES AS AN ASCIIDOC LIST. + +* LIST ITEM 1 +* LIST ITEM 2 +* LIST ITEM 3 + +a|THIS CELL IS PREFIXED WITH AN `A`, SO THE PROCESSOR HONORS THE `LEAD` STYLE ON THE FOLLOWING PARAGRAPH. + +[.LEAD] +I AM A PARAGRAPH STYLED WITH THE LEAD ATTRIBUTE. +|THIS CELL *IS NOT* PREFIXED WITH AN `A`, SO THE PROCESSOR DOES NOT HONOR THE `LEAD` STYLE ON THE FOLLOWING PARAGRAPH. + +[.LEAD] +I AM A PARAGRAPH STYLED WITH THE LEAD ATTRIBUTE. +|=== + +[format="csv", width="60%", cols="2"] +[frame="topbot", grid="none"] +[options="header"] +|=== +IOCONTROL.0 PIN ,MOTION PIN +TOOL-PREPARE,DIGITAL-OUT-00 +TOOL-PREPARED,DIGITAL-IN-00 +TOOL-CHANGE,DIGITAL-OUT-01 +TOOL-CHANGED,DIGITAL-IN-01 +TOOL-PREP-NUMBER,ANALOG-OUT-00 +TOOL-PREP-POCKET,ANALOG-OUT-01 +TOOL-NUMBER,ANALOG-OUT-02 +|=== + +.EMPTY CELLS +|=== +|0| +| | +|=== |