* Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] @ 2015-05-04 3:02 Jay Belanger 2015-05-06 10:56 ` Rasmus 0 siblings, 1 reply; 10+ messages in thread From: Jay Belanger @ 2015-05-04 3:02 UTC (permalink / raw) To: emacs-orgmode; +Cc: jay.p.belanger I was trying to get table elements to align left when exported to html, and I was having a bit of trouble doing it. I had a table entry at the top | <l> | in the appropriate column, but that wasn't working. When I looked at the resulting html, it looked fine: <th scope="col" class="left">Math Department</th> But then I checked the css code, which is given by the value of `org-html-style-default' in ox-html.el: 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; } (It's this way in emacs 24.5 and the latest development version of emacs.) Easy to change locally, but am I missing something, or should `org-html-style-default' have th.right { text-align: right; } th.left { text-align: left; } th.center { text-align: center; } td.right { text-align: right; } td.left { text-align: left; } td.center { text-align: center; } Thanks, Jay Emacs : GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of 2015-05-02 on belanger-home Package: Org-mode version 8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/) ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] 2015-05-04 3:02 Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] Jay Belanger @ 2015-05-06 10:56 ` Rasmus 2015-05-06 13:26 ` Matt Price 0 siblings, 1 reply; 10+ messages in thread From: Rasmus @ 2015-05-06 10:56 UTC (permalink / raw) To: emacs-orgmode Jay Belanger <jay.p.belanger@gmail.com> writes: > When I looked at the resulting html, it looked fine: > <th scope="col" class="left">Math Department</th> > But then I checked the css code, which is given by the value of > `org-html-style-default' in ox-html.el: > > 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; } Indeed that looks weird. It seems to be a stylistic hack to have *headers* always centered. I have no clue why. > (It's this way in emacs 24.5 and the latest development version of emacs.) > Easy to change locally, but am I missing something, or should > `org-html-style-default' have > > th.right { text-align: right; } > th.left { text-align: left; } > th.center { text-align: center; } > td.right { text-align: right; } > td.left { text-align: left; } > td.center { text-align: center; } 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... —Rasmus -- With monopolies the cake is a lie! ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] 2015-05-06 10:56 ` Rasmus @ 2015-05-06 13:26 ` Matt Price 2015-05-06 13:49 ` Bug: org-toggle-heading breaks with double colon '::' list items Leo Ufimtsev 2015-05-06 14:13 ` Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] Rasmus 0 siblings, 2 replies; 10+ messages in thread From: Matt Price @ 2015-05-06 13:26 UTC (permalink / raw) To: Rasmus; +Cc: Org Mode [-- Attachment #1: Type: text/plain, Size: 1873 bytes --] On May 6, 2015 06:57, "Rasmus" <rasmus@gmx.us> wrote: > > Jay Belanger <jay.p.belanger@gmail.com> writes: > > > When I looked at the resulting html, it looked fine: > > <th scope="col" class="left">Math Department</th> > > But then I checked the css code, which is given by the value of > > `org-html-style-default' in ox-html.el: > > > > 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; } > > Indeed that looks weird. It seems to be a stylistic hack to have > *headers* always centered. I have no clue why. > > > (It's this way in emacs 24.5 and the latest development version of emacs.) > > Easy to change locally, but am I missing something, or should > > `org-html-style-default' have > > > > th.right { text-align: right; } > > th.left { text-align: left; } > > th.center { text-align: center; } > > td.right { text-align: right; } > > td.left { text-align: left; } > > td.center { text-align: center; } > > 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. Matt > —Rasmus > > -- > With monopolies the cake is a lie! > > [-- Attachment #2: Type: text/html, Size: 2509 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Bug: org-toggle-heading breaks with double colon '::' list items. 2015-05-06 13:26 ` Matt Price @ 2015-05-06 13:49 ` Leo Ufimtsev 2015-05-06 23:18 ` Nicolas Goaziou 2015-05-06 14:13 ` Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] Rasmus 1 sibling, 1 reply; 10+ messages in thread From: Leo Ufimtsev @ 2015-05-06 13:49 UTC (permalink / raw) To: Org Mode Hello, If I have a list with colons like: - List a :: Cheese Bannana - List b :: Pineapples Tomatoes If I then select the entire list and call org-toggle-headings, then I would *expect* this: * List a Cheese Bannana * List b Pineapples Tomatoes But instead the first item is placed on the same line as the heading: * List a Cheese Bannana * List b Pineapples Tomatoes This is happens only with items that have colons. A workaround is not to use colons or add a dot after the colons, e.g - List a :: . Cheese The use case is that I often start making lists, but as things grow turn them into headings. I'm on Emacs 25.0.50.4 (~3 weeks old) and my org-mode is from this morning (8.3beta). Please advise. Thank you Leo ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: org-toggle-heading breaks with double colon '::' list items. 2015-05-06 13:49 ` Bug: org-toggle-heading breaks with double colon '::' list items Leo Ufimtsev @ 2015-05-06 23:18 ` Nicolas Goaziou 2015-05-07 16:44 ` Leo Ufimtsev 0 siblings, 1 reply; 10+ messages in thread From: Nicolas Goaziou @ 2015-05-06 23:18 UTC (permalink / raw) To: Leo Ufimtsev; +Cc: Org Mode Hello, Leo Ufimtsev <lufimtse@redhat.com> writes: > If I have a list with colons like: > > - List a :: > Cheese > Bannana > - List b :: > Pineapples > Tomatoes > > If I then select the entire list and call org-toggle-headings, then I would *expect* this: > > * List a > Cheese > Bannana > * List b > Pineapples > Tomatoes > > But instead the first item is placed on the same line as the heading: > * List a Cheese > Bannana > * List b Pineapples > Tomatoes This should be fixed in 9aa69058bc4cbe3be088df9e96b18caf5359a3a8. Thank you. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: org-toggle-heading breaks with double colon '::' list items. 2015-05-06 23:18 ` Nicolas Goaziou @ 2015-05-07 16:44 ` Leo Ufimtsev 2015-05-07 18:55 ` Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) Leo Ufimtsev 0 siblings, 1 reply; 10+ messages in thread From: Leo Ufimtsev @ 2015-05-07 16:44 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: Org Mode ----- Original Message ----- > From: "Nicolas Goaziou" <mail@nicolasgoaziou.fr> > To: "Leo Ufimtsev" <lufimtse@redhat.com> > Cc: "Org Mode" <emacs-orgmode@gnu.org> > Sent: Wednesday, May 6, 2015 7:18:55 PM > Subject: Re: [O] Bug: org-toggle-heading breaks with double colon '::' list items. > > Hello, > > Leo Ufimtsev <lufimtse@redhat.com> writes: > > > If I have a list with colons like: > > > > - List a :: > > Cheese > > Bannana > > - List b :: > > Pineapples > > Tomatoes > > > > If I then select the entire list and call org-toggle-headings, then I would > > *expect* this: > > > > * List a > > Cheese > > Bannana > > * List b > > Pineapples > > Tomatoes > > > > But instead the first item is placed on the same line as the heading: > > * List a Cheese > > Bannana > > * List b Pineapples > > Tomatoes > > This should be fixed in 9aa69058bc4cbe3be088df9e96b18caf5359a3a8. Thank > you. I downloaded & tested. The fix works well. Thank you for the quick fix ^_^, life is much better now :-D. > Regards, > > -- > Nicolas Goaziou > > -- Leo Ufimtsev | Intern Software Engineer @ Eclipse Team ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) 2015-05-07 16:44 ` Leo Ufimtsev @ 2015-05-07 18:55 ` Leo Ufimtsev 2015-05-08 8:12 ` Nicolas Goaziou 0 siblings, 1 reply; 10+ messages in thread From: Leo Ufimtsev @ 2015-05-07 18:55 UTC (permalink / raw) To: Org Mode; +Cc: Nicolas Goaziou Hello, If I have a list item with a double colon, with the cursor at the end:like: - Hello World :: | And press C-c (org-return-indent), then the cursor is at position 0 on the next line: - Hello World :: | But based on the behavior of a regular list item, one would expect it to be on position 2 like: - Hello World :: | The current workaround is to have something after the colon. - Hello World :: . | then it indents correctly. Using Emacs 25.0.50.4 w/ org-mode from this morning. Thank you Leo ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) 2015-05-07 18:55 ` Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) Leo Ufimtsev @ 2015-05-08 8:12 ` Nicolas Goaziou 2015-05-08 15:15 ` Leo Ufimtsev 0 siblings, 1 reply; 10+ messages in thread From: Nicolas Goaziou @ 2015-05-08 8:12 UTC (permalink / raw) To: Leo Ufimtsev; +Cc: Org Mode Hello, Leo Ufimtsev <lufimtse@redhat.com> writes: > If I have a list item with a double colon, with the cursor at the end:like: > > - Hello World :: | > > > And press C-c (org-return-indent), then the cursor is at position 0 on the next line: > > - Hello World :: > | This should be fixed in 4980a9dbb8ff1690abb54066da0827e1c37378c8. Thank you. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) 2015-05-08 8:12 ` Nicolas Goaziou @ 2015-05-08 15:15 ` Leo Ufimtsev 0 siblings, 0 replies; 10+ messages in thread From: Leo Ufimtsev @ 2015-05-08 15:15 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: Org Mode ----- Original Message ----- > From: "Nicolas Goaziou" <mail@nicolasgoaziou.fr> > To: "Leo Ufimtsev" <lufimtse@redhat.com> > Cc: "Org Mode" <emacs-orgmode@gnu.org> > Sent: Friday, May 8, 2015 4:12:35 AM > Subject: Re: [O] Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) > > Hello, > > Leo Ufimtsev <lufimtse@redhat.com> writes: > > > If I have a list item with a double colon, with the cursor at the end:like: > > > > - Hello World :: | > > > > > > And press C-c (org-return-indent), then the cursor is at position 0 on the > > next line: > > > > - Hello World :: > > | > > This should be fixed in 4980a9dbb8ff1690abb54066da0827e1c37378c8. Thank you. Verified fixed. Now works much better. Thank you so much for the quick fix ! :-). > > Regards, > > -- > Nicolas Goaziou > > -- Leo Ufimtsev | Intern Software Engineer @ Eclipse Team ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] 2015-05-06 13:26 ` Matt Price 2015-05-06 13:49 ` Bug: org-toggle-heading breaks with double colon '::' list items Leo Ufimtsev @ 2015-05-06 14:13 ` Rasmus 1 sibling, 0 replies; 10+ messages in thread From: Rasmus @ 2015-05-06 14:13 UTC (permalink / raw) To: moptop99; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 990 bytes --] Matt Price <moptop99@gmail.com> 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. —Rasmus -- To err is human. To screw up 10⁶ times per second, you need a computer [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0002-ox-html-Less-generic-names-for-table-aligns.patch --] [-- Type: text/x-diff, Size: 2951 bytes --] From fee51384c0384c2a4ead9b9eead109b941408db7 Mon Sep 17 00:00:00 2001 From: Rasmus <rasmus@gmx.us> 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 <moptop99@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/97431> --- 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 ^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-05-08 15:15 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-05-04 3:02 Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] Jay Belanger 2015-05-06 10:56 ` Rasmus 2015-05-06 13:26 ` Matt Price 2015-05-06 13:49 ` Bug: org-toggle-heading breaks with double colon '::' list items Leo Ufimtsev 2015-05-06 23:18 ` Nicolas Goaziou 2015-05-07 16:44 ` Leo Ufimtsev 2015-05-07 18:55 ` Bug: org-return-indent does not work properly with description lists (i.e ending with double colon) Leo Ufimtsev 2015-05-08 8:12 ` Nicolas Goaziou 2015-05-08 15:15 ` Leo Ufimtsev 2015-05-06 14:13 ` Bug: Table alignment [8.2.10 (release_8.2.10 @ /usr/local/src/emacs/lisp/org/)] Rasmus
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).