* New HTML exporter: Oddities with figure placement [not found] <mailman.115.1361811618.4057.emacs-orgmode@gnu.org> @ 2013-02-25 17:55 ` Richard Stanton 2013-02-25 22:17 ` Stefan Vollmar 2013-02-25 18:03 ` HTML export: no date in postamble unless set manually Richard Stanton 1 sibling, 1 reply; 7+ messages in thread From: Richard Stanton @ 2013-02-25 17:55 UTC (permalink / raw) To: emacs-orgmode@gnu.org It seems that figure placement has changed in HTML files generated by the new (compared with the old) exporter. For example, here's a simple org file: --------- This is an org file [[file:figure.png]] * Abstract This is an abstract --------- When I export, all looks fine, except that the figure is centered (left to right) rather than being left-justified, which I could have sworn it used to be. Since I prefer left justification by default, I tried adding the line #+ATTR_HTML: align="left" immediately before the figure link. Now when I export to HTML, the figure is left justified as I want, but the following text appears to the right of the figure, not below it, which isn't what I want. It seems odd that this would happen even when I have a blank line separating the figure link from the following text. Am I missing something? Thanks. Richard Stanton ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: New HTML exporter: Oddities with figure placement 2013-02-25 17:55 ` New HTML exporter: Oddities with figure placement Richard Stanton @ 2013-02-25 22:17 ` Stefan Vollmar 2013-02-25 23:14 ` Nicolas Goaziou 0 siblings, 1 reply; 7+ messages in thread From: Stefan Vollmar @ 2013-02-25 22:17 UTC (permalink / raw) To: Richard Stanton; +Cc: Org-mode [-- Attachment #1: Type: text/plain, Size: 1657 bytes --] Dear Richard, On 25.02.2013, at 18:55, Richard Stanton wrote: > It seems that figure placement has changed in HTML files generated by the > new (compared with the old) exporter. > > For example, here's a simple org file: > > --------- > > This is an org file > > [[file:figure.png]] > > * Abstract > This is an abstract > > --------- > > When I export, all looks fine, except that the figure is centered (left to > right) rather than being left-justified, which I could have sworn it used > to be. Since I prefer left justification by default, I tried adding the > line [...] You are right, the effect has to do with the new exporter but is easy to explain and change: if you look at the HTML code generated by Org-mode you will find this line in the embedded CSS code (line 45): div.figure p { text-align: center; } which causes the effect you have described. This code used to be suppressed by :style-include-default nil :style-include-scripts nil in the org-publish-project-alist - either this functionality is currently not available or the keyword has changed. Thanks for any help with this! However, here is a simple fix for now: include this line in a CSS file (it will be parsed after the embedded CSS code and overwrites it): div.figure p { text-align: left; } Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 4409 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: New HTML exporter: Oddities with figure placement 2013-02-25 22:17 ` Stefan Vollmar @ 2013-02-25 23:14 ` Nicolas Goaziou 2013-02-26 0:05 ` Stefan Vollmar 0 siblings, 1 reply; 7+ messages in thread From: Nicolas Goaziou @ 2013-02-25 23:14 UTC (permalink / raw) To: Stefan Vollmar; +Cc: Richard Stanton, Org-mode Hello, Stefan Vollmar <vollmar@nf.mpg.de> writes: > if you look at the HTML code generated by Org-mode you will find this line in the embedded CSS code (line 45): > > div.figure p { text-align: center; } > > which causes the effect you have described. > This code used to be suppressed by > > :style-include-default nil > :style-include-scripts nil > > in the org-publish-project-alist - either this functionality is > currently not available or the keyword has changed. Thanks for any > help with this! It should be :html-style-include-default and :html-style-include-scripts according to html back-end definition in ox-html.el (lines 122, 123). Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: New HTML exporter: Oddities with figure placement 2013-02-25 23:14 ` Nicolas Goaziou @ 2013-02-26 0:05 ` Stefan Vollmar 0 siblings, 0 replies; 7+ messages in thread From: Stefan Vollmar @ 2013-02-26 0:05 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: Richard Stanton, Org-mode [-- Attachment #1: Type: text/plain, Size: 1174 bytes --] Dear Nicolas, On 26.02.2013, at 00:14, Nicolas Goaziou wrote: >> [...] This code used to be suppressed by >> >> :style-include-default nil >> :style-include-scripts nil >> >> in the org-publish-project-alist - either this functionality is >> currently not available or the keyword has changed. Thanks for any >> help with this! > > It should be :html-style-include-default and :html-style-include-scripts > according to html back-end definition in ox-html.el (lines 122, 123). sorry, I could have looked that up myself - and, again, thank you (somehow these lightning fast responses and fixes of yours remind me of a thread several years ago in which there was speculation about the actual number of excellent programmers using the pseudonym "Carsten Dominik", and of course there also quite a few "Bastien's" out there...). Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 4409 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* HTML export: no date in postamble unless set manually [not found] <mailman.115.1361811618.4057.emacs-orgmode@gnu.org> 2013-02-25 17:55 ` New HTML exporter: Oddities with figure placement Richard Stanton @ 2013-02-25 18:03 ` Richard Stanton 2013-02-25 20:10 ` Nick Dokos 1 sibling, 1 reply; 7+ messages in thread From: Richard Stanton @ 2013-02-25 18:03 UTC (permalink / raw) To: emacs-orgmode@gnu.org I have org-export-html-postamble set to t. When I export a simple org file that has no explicit #+date line (using the new exporter), I get a line that says "Date:" at the bottom of the resulting HTML file, but there's no date listed next to it. If I add an explicit #+date line, it is correctly transferred to the bottom of the HTML file, but wouldn't it make sense to have today's date listed if no explicit alternative is provided? At any rate, adding a line that says "Date:" with nothing after the colon doesn't seem like the optimal default setting. Thanks. Richard Stanton ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: HTML export: no date in postamble unless set manually 2013-02-25 18:03 ` HTML export: no date in postamble unless set manually Richard Stanton @ 2013-02-25 20:10 ` Nick Dokos 2013-02-25 20:59 ` Nick Dokos 0 siblings, 1 reply; 7+ messages in thread From: Nick Dokos @ 2013-02-25 20:10 UTC (permalink / raw) To: Richard Stanton; +Cc: emacs-orgmode@gnu.org Richard Stanton <stanton@haas.berkeley.edu> wrote: > I have org-export-html-postamble set to t. When I export a simple org > file that has no explicit #+date line (using the new exporter), I get a > line that says "Date:" at the bottom of the resulting HTML file, but > there's no date listed next to it. If I add an explicit #+date line, it is > correctly transferred to the bottom of the HTML file, but wouldn't it make > sense to have today's date listed if no explicit alternative is provided? > At any rate, adding a line that says "Date:" with nothing after the colon > doesn't seem like the optimal default setting. > The backend-specific variables have been renamed in the new exporter: try org-html-postamble. Check the FAQ: http://orgmode.org/worg/org-faq.html#new-exporter-switch for more details. Nick ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: HTML export: no date in postamble unless set manually 2013-02-25 20:10 ` Nick Dokos @ 2013-02-25 20:59 ` Nick Dokos 0 siblings, 0 replies; 7+ messages in thread From: Nick Dokos @ 2013-02-25 20:59 UTC (permalink / raw) Cc: Richard Stanton, emacs-orgmode@gnu.org Nick Dokos <nicholas.dokos@hp.com> wrote: > Richard Stanton <stanton@haas.berkeley.edu> wrote: > > > I have org-export-html-postamble set to t. When I export a simple org > > file that has no explicit #+date line (using the new exporter), I get a > > line that says "Date:" at the bottom of the resulting HTML file, but > > there's no date listed next to it. If I add an explicit #+date line, it is > > correctly transferred to the bottom of the HTML file, but wouldn't it make > > sense to have today's date listed if no explicit alternative is provided? > > At any rate, adding a line that says "Date:" with nothing after the colon > > doesn't seem like the optimal default setting. > > > > The backend-specific variables have been renamed in the new exporter: try > org-html-postamble. Check the FAQ: > > http://orgmode.org/worg/org-faq.html#new-exporter-switch > > for more details. > OK, now that I've tried it a bit, I can see that the variable name is not the reason: I can reproduce the empty date after setting org-html-postamble to t. The code looks like this (ox-html.el:org-html--build-postamble): ,---- | (let ((date (if (not (plist-get info :with-date)) "" | (org-export-data (plist-get info :date) info))) `---- :with-date (i.e. org-export-with-date) is set to t but there is no default for an absent :date. This is probably another case of too many cooks (or variables in this case: org-export-with-date, org-html-postamble-format, and the :date entry in the plist have to cooperate in order to produce the desired result), so the behavior is difficult to explain and it's not clear that all the different combinations make sense - e.g. if org-export-with-date is nil, but the format includes a %d, we probably should not have an empty date field, whereas if org-export-with-date is t but there is no date supplied, it should probably default to today. Apologies for rushing to judgment. Nick ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-26 0:05 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <mailman.115.1361811618.4057.emacs-orgmode@gnu.org> 2013-02-25 17:55 ` New HTML exporter: Oddities with figure placement Richard Stanton 2013-02-25 22:17 ` Stefan Vollmar 2013-02-25 23:14 ` Nicolas Goaziou 2013-02-26 0:05 ` Stefan Vollmar 2013-02-25 18:03 ` HTML export: no date in postamble unless set manually Richard Stanton 2013-02-25 20:10 ` Nick Dokos 2013-02-25 20:59 ` Nick Dokos
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).