From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] Date: Wed, 06 May 2015 16:13:28 +0200 Message-ID: <87vbg5bxpz.fsf@gmx.us> References: <87k2wp11v4.fsf@gmail.com> <87egmuc6tv.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq04u-0002Gc-TT for emacs-orgmode@gnu.org; Wed, 06 May 2015 10:13:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq04p-0005ta-Qk for emacs-orgmode@gnu.org; Wed, 06 May 2015 10:13:36 -0400 Received: from mout.gmx.net ([212.227.15.18]:61218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq04p-0005tI-HN for emacs-orgmode@gnu.org; Wed, 06 May 2015 10:13:31 -0400 In-Reply-To: (Matt Price's message of "Wed, 6 May 2015 09:26:59 -0400") 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: moptop99@gmail.com Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Matt Price writes: >> I guess it should, but I don't know the rational for the always-centering >> of headers. . . If we imposed that change headlines of tables with no >> instructions would no longer be centered as they default to the "left" >> class. This could be an issue if this is a good default style... >> > > Not use if this belongs in the same thread, but another potential issue > with the" left" and "right" classes is a namespace clash with external css > frameworks which use those classes to assign float values. I export to > WordPress using a zurb foundation based css framework, and my tables were > all messed up until I figured that out. I don't know what e.g. zurb foundation means, but perhaps something like the attached fixes your problem. It's probably a good idea not to use generic names like "left" as class names anyway. =E2=80=94Rasmus --=20 To err is human. To screw up 10=E2=81=B6 times per second, you need a compu= ter --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-ox-html-Less-generic-names-for-table-aligns.patch >From fee51384c0384c2a4ead9b9eead109b941408db7 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Wed, 6 May 2015 16:08:44 +0200 Subject: [PATCH 2/2] ox-html: Less generic names for table aligns. * ox-html.el (org-html-style-default): (org-html-table-cell, org-html-table): Prefix left, right, center classes. Reported-by: Matt Price --- lisp/ox-html.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 0e69e6a..96e9f92 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -286,9 +286,9 @@ for the JavaScript code in this tag. padding: 2px; font-size: 80%; font-weight: normal; } .timestamp { color: #bebebe; } .timestamp-kwd { color: #5f9ea0; } - .right { margin-left: auto; margin-right: 0px; text-align: right; } - .left { margin-left: 0px; margin-right: auto; text-align: left; } - .center { margin-left: auto; margin-right: auto; text-align: center; } + .org-right { margin-left: auto; margin-right: 0px; text-align: right; } + .org-left { margin-left: 0px; margin-right: auto; text-align: left; } + .org-center { margin-left: auto; margin-right: auto; text-align: center; } .underline { text-decoration: underline; } #postamble p, #preamble p { font-size: 90%; margin: .2em; } p.verse { margin-left: 3%; } @@ -327,12 +327,12 @@ for the JavaScript code in this tag. caption.t-above { caption-side: top; } caption.t-bottom { caption-side: bottom; } td, th { vertical-align:top; } - th.right { text-align: center; } - th.left { text-align: center; } - th.center { text-align: center; } - td.right { text-align: right; } - td.left { text-align: left; } - td.center { text-align: center; } + th.org-right { text-align: center; } + th.org-left { text-align: center; } + th.org-center { text-align: center; } + td.org-right { text-align: right; } + td.org-left { text-align: left; } + td.org-center { text-align: center; } dt { font-weight: bold; } .footpara:nth-child(2) { display: inline; } .footpara { display: block; } @@ -3279,7 +3279,7 @@ channel." (if (not (plist-get info :html-table-align-individual-fields)) "" (format (if (and (boundp 'org-html-format-table-no-css) org-html-format-table-no-css) - " align=\"%s\"" " class=\"%s\"") + " align=\"%s\"" " class=\"org-%s\"") (org-export-table-cell-alignment table-cell info))))) (when (or (not contents) (string= "" (org-trim contents))) (setq contents " ")) @@ -3399,7 +3399,7 @@ contextual information." (alignspec (if (and (boundp 'org-html-format-table-no-css) org-html-format-table-no-css) - "align=\"%s\"" "class=\"%s\"")) + "align=\"%s\"" "class=\"org-%s\"")) (table-column-specs (function (lambda (table info) -- 2.4.0 --=-=-=--