From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Printable calendar? Date: Fri, 30 May 2014 13:20:21 -0400 Message-ID: <87ha47kwtm.fsf@alphaville.bos.redhat.com> References: <20140530142004.GB25389@pdavismbp15.iscinternal.com> <20140530152342.GD25389@pdavismbp15.iscinternal.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqQU1-0000D1-RX for emacs-orgmode@gnu.org; Fri, 30 May 2014 13:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqQTu-0005Oz-HW for emacs-orgmode@gnu.org; Fri, 30 May 2014 13:20:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:51953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqQTu-0005Od-2a for emacs-orgmode@gnu.org; Fri, 30 May 2014 13:20:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WqQTs-0003wN-Jy for emacs-orgmode@gnu.org; Fri, 30 May 2014 19:20:36 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 May 2014 19:20:36 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 May 2014 19:20:36 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Peter Davis writes: > Ok, I was able to get the column rules I want. (See below) > > I'm still puzzled by the right/left alignment. In the org buffer the > columns appear correctly aligned, but in HTML output, the left (Sun) > and right (Sat) columns are right-aligned, > while all the others are left-aligned. > > Clues? > You can force the misbehaving columns to behave - more or less: the M value on the 17th will cause problems (btw, I prefer to have a non-exported "zeroth" column for things like / and ! that are basically table metadata - see (info "(org) Advanced features") for details): --8<---------------cut here---------------start------------->8--- #+ATTR_HTML: :border 2 :frame border | | Sun | Mon | Tue | Wed | Thu | Fri | Sat | |---+----------+---------+---------+---------+---------+---------+----------| | / | | <> | <> | <> | <> | <> | | |---+----------+---------+---------+---------+---------+---------+----------| | | | | | | 1 | 2 | 3 | | | | | | | | | | | | | | | | AM: 3.6 | AM: 3.6 | AM: 7.6 | | | | | | | PM: 3.7 | PM: 3.7 | AM: 7.6 | |---+----------+---------+---------+---------+---------+---------+----------| | | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | | | | | | | | | | | AM: 11.4 | AM: 3.7 | AM: 3.7 | AM: 5.1 | AM: 3.6 | AM: 3.3 | AM: 5.1 | | | | PM: 3.3 | PM: 3.3 | | PM: 3.3 | PM: 3.3 | | |---+----------+---------+---------+---------+---------+---------+----------| | | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | | | | | *BIKE* | | | AM: 7.6 | | | | AM: 3.7 | AM: 3.7 | AM: 9.2 | AM: 3.7 | AM: 3.7 | M: 6.1 | | | | PM: 3.3 | PM: 3.3 | PM: 9.7 | PM: 3.3 | PM: 3.3 | PM: 13.3 | |---+----------+---------+---------+---------+---------+---------+----------| | | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | | | | | | | | | | | | AM: 3.7 | AM: 3.6 | AM: 3.7 | AM: 3.7 | AM: 7.0 | AM: 5.5 | | | | PM: 3.2 | PM: 3.3 | PM: 3.3 | PM: 3.3 | | | |---+----------+---------+---------+---------+---------+---------+----------| | | 25 | 26 | 27 | 28 | 29 | 30 | 30 | | | *BIKE* | | | *TRIKE* | | | | | | AM: 16.2 | | AM: 3.6 | | AM: 3.8 | AM: 3.6 | | | | | PM: 5.1 | PM: 3.3 | PM: 7.3 | PM: 3.3 | | | |---+----------+---------+---------+---------+---------+---------+----------| --8<---------------cut here---------------end--------------->8--- The misbehaviour is caused by the heuristic used in org-export-table-cell-alignment: ,---- | Return alignment as specified by the last alignment cookie in the | same column as TABLE-CELL. If no such cookie is found, a default | alignment value will be deduced from fraction of numbers in the | column (see `org-table-number-fraction' for more information). `---- You can play around with org-table-number-fraction (default: 0.5) to change the behaviour. A value of 0.25 will right-align them all, whereas a value of 0.75 will left-align them all. But I wouldn't want to bet my life on that: it depends on the contents of the table so it seems like a fragile solution at best. BTW, the 0.25 and 0.75 values above are purely trial-and-error (actually derived from the smallest ratio I found edebugging over the columns: 6/21). Nick Footnotes: [fn:1] The heuristic counts empty cells as numbers if the non-empty row above it is a number, so for the first column for example, there are 21 cells and 11 of them are "numbers".