How to include tables in a post ?
06-03-2016, 02:42 AM
Post: #6
 Joe Horn Senior Member Posts: 1,859 Joined: Dec 2013
RE: How to include tables in a post ?
(06-03-2016 12:45 AM)rprosperi Wrote:  While far from as elegant as Gerson's tip and your pretty darned good first go at Latex, you could just space out the characters and format your table in a fixed-pitch font like Courier. The default font is fairly readable, but the variable-pitch nature of this (and most currently popular fonts) makes aligned output basically impossible.

As noted, it's not nearly as pretty, but it is far simpler and quicker.

Unfortunately, using a fixed-pitch font (e.g. Courier) is not enough, because most (if not all) browsers remove extra spaces, as you can see here:

+-----------+-----------+------------+-----------+-----------+
| n(base) | 2n+9(29) | 6n+9(69) | sqr(2n+9) | sqr(6n+9) |
+-----------+-----------+------------+-----------+-----------+
| 0(*) | 9 | 9 | 3 | 3 |
| 36 | 81 | 225 | 9 | 15 |
| 540 | 1089 | 3249 | 33 | 57 |
| 7560 | 15129 | 45369 | 123 | 213 |
| 105336 | 210681 | 632025 | 459 | 795 |
| 1467180 | 2934369 | 8803089 | 1713 | 2967 |
| 20435220 | 40870449 | 122611329 | 6393 | 11073 |
| 284625936 | 569251881 | 1707755625 | 23859 | 41325 |
+-----------+-----------+------------+-----------+-----------+

Here's exactly the same data but inside a "Code" box, which forces browsers to show all spaces:

Code:
+-----------+-----------+------------+-----------+-----------+ |  n(base)  |  2n+9(29) |  6n+9(69)  | sqr(2n+9) | sqr(6n+9) | +-----------+-----------+------------+-----------+-----------+ |      0(*) |         9 |          9 |         3 |         3 | |        36 |        81 |        225 |         9 |        15 | |       540 |      1089 |       3249 |        33 |        57 | |      7560 |     15129 |      45369 |       123 |       213 | |    105336 |    210681 |     632025 |       459 |       795 | |   1467180 |   2934369 |    8803089 |      1713 |      2967 | |  20435220 |  40870449 |  122611329 |      6393 |     11073 | | 284625936 | 569251881 | 1707755625 |     23859 |     41325 | +-----------+-----------+------------+-----------+-----------+

So, theoretically, the following is impossible to do. Discerning how it was done is left as an exercise for the student.

+-----------+-----------+------------+-----------+-----------+
|  n(base)  |  2n+9(29) |  6n+9(69)  | sqr(2n+9) | sqr(6n+9) |
+-----------+-----------+------------+-----------+-----------+
|      0(*) |         9 |          9 |         3 |         3 |
|        36 |        81 |        225 |         9 |        15 |
|       540 |      1089 |       3249 |        33 |        57 |
|      7560 |     15129 |      45369 |       123 |       213 |
|    105336 |    210681 |     632025 |       459 |       795 |
|   1467180 |   2934369 |    8803089 |      1713 |      2967 |
|  20435220 |  40870449 |  122611329 |      6393 |     11073 |
| 284625936 | 569251881 | 1707755625 |     23859 |     41325 |
+-----------+-----------+------------+-----------+-----------+

<0|ɸ|0>
-Joe-
 « Next Oldest | Next Newest »

 Messages In This Thread How to include tables in a post ? - Valentin Albillo - 06-02-2016, 07:35 PM RE: How to include tables in a post ? - Gerson W. Barbosa - 06-02-2016, 09:57 PM RE: How to include tables in a post ? - Valentin Albillo - 06-02-2016, 10:22 PM RE: How to include tables in a post ? - rprosperi - 06-03-2016, 12:45 AM RE: How to include tables in a post ? - Gerson W. Barbosa - 06-03-2016, 02:17 AM RE: How to include tables in a post ? - Joe Horn - 06-03-2016 02:42 AM RE: How to include tables in a post ? - rprosperi - 06-03-2016, 01:12 PM RE: How to include tables in a post ? - Dieter - 06-03-2016, 06:11 PM RE: How to include tables in a post ? - rprosperi - 06-03-2016, 08:36 PM Using non-standard blank space character - striegel - 06-03-2016, 09:06 PM RE: How to include tables in a post ? - Gerson W. Barbosa - 06-03-2016, 06:14 PM RE: How to include tables in a post ? - Sylvain Cote - 06-03-2016, 03:14 AM

User(s) browsing this thread: 1 Guest(s)