diff --git a/csv-table.rst b/csv-table.rst index 7bac037..be11e04 100644 --- a/csv-table.rst +++ b/csv-table.rst @@ -1,13 +1,13 @@ Long tables =========== -You might be dealing with a large table, one that would be difficult to write as a `regular table `_ described before. +You might be dealing with a large table, one that would be difficult to write as a `grid table `_ described before. One possibility is to use CSV files. You can store your data in a CSV table, without the need to worry about misplacing an equal sign in your table. If your table is really long, however, it might sometimes break in the PDF output. Take for example the table below. -In order to make it look good in the PDF, you should use some LaTeX magic, disguised in RST directives. Using the :code:`:class: longtable` parameter in the table definition allows to nicely break long tables into several pages. You can also control the width of the individual columns with the :code:`tabularcolumns` directive: this will be familiar to you if you used LaTeX before. +In order to make it look good in the PDF, you should use some LaTeX magic, disguised as RST directives. Using the :code:`:class: longtable` parameter in the table definition allows to nicely break long tables into several pages. You can also control the width of the individual columns with the :code:`tabularcolumns` directive: this will be familiar to you if you used LaTeX before. Finally, the :code:`:widths: 1 1` parameter controls how the columns look in the HTML page. As you can see, this is independent on the way columns behave in the PDF. diff --git a/regular-table.rst b/grid-table.rst similarity index 59% rename from regular-table.rst rename to grid-table.rst index 708208c..65fefef 100644 --- a/regular-table.rst +++ b/grid-table.rst @@ -1,11 +1,7 @@ -Regular tables +Grid tables ============== -Normal tables in RST can be obtained by simply "drawing" their structure with a combination of symbols, as in the following code snippet (it's easier seen than explained!). - -A row of equal signs separates the first row from the rest, if you want it to be the label of your table. - -This type of tables is well rendered in the PDF output. +Tables in RST can be obtained by simply "drawing" their structure with a combination of symbols, as in the following code snippet (it's easier seen than explained!). These are called `grid tables `_ in the documentation. .. code-block:: rst @@ -17,6 +13,9 @@ This type of tables is well rendered in the PDF output. | 2 | Cinderella | +------+---------------+ +A row of equal signs separates the first row from the rest, if you want it to be the label of your table. + +Grid tables are well rendered in the PDF output. This is the output from the snippet above. .. table:: Regular table diff --git a/index.rst b/index.rst index 0313efe..b6efb4b 100644 --- a/index.rst +++ b/index.rst @@ -11,7 +11,7 @@ Types of table .. toctree:: :maxdepth: 1 - regular-table + grid-table html-table csv-table