Re: Ability to add logo to HTML export

2023-03-26 Thread Vladimir Alexiev
Thanks, that works!

On Fri, Mar 24, 2023 at 4:04 PM Ihor Radchenko  wrote:

> Vladimir Alexiev  writes:
>
> > But then C-c C-e h h complains: "org-export--parse-option-keyword: End of
> > file during parsing".
>
> Please update Org mode.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


Re: Ability to add logo to HTML export

2023-03-24 Thread Ihor Radchenko
Vladimir Alexiev  writes:

> But then C-c C-e h h complains: "org-export--parse-option-keyword: End of
> file during parsing".

Please update Org mode.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Ability to add logo to HTML export

2023-03-24 Thread Vladimir Alexiev
#+OPTIONS: html-preamble:"Author: %a(%e)Date: %d"

C-c happily says "Local setup has been refreshed"

But then C-c C-e h h complains: "org-export--parse-option-keyword: End of
file during parsing".
I don't see any problem in the string; evaluating it in *scratch* returns
it just fine.
But I think  org-export--parse-option-keyword uses some limited reader...


Re: Ability to add logo to HTML export

2023-03-24 Thread Ihor Radchenko
Vladimir Alexiev  writes:

> Right now I have to resort to a bad kludge to do that: a local variable in
> the org file:
>
> #+comment: -*- org-html-preamble: "Author:
> %a(%e)Date: %d src='./img/SemBSDD-Logo-400px.png'/>" -*-

If you have good ideas how to improve `org-html--build-pre/postamble',
patches welcome.

> So I tried this, but it had no effect"
>
> #+OPTION: html-preamble: "Author: %a(%e) class='date'>Date: %d"

OPTION_S_ and you cannot have space after html-preamble: _

Try

#+OPTIONS: html-preamble:"Author: %a(%e)Date: %d"

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Ability to add logo to HTML export

2023-03-23 Thread Vladimir Alexiev
Some projects have a logo, which one may want to add to the beginning of a
HTML document.
Eg like this (before authors and Title):
[image: image.png]

Right now I have to resort to a bad kludge to do that: a local variable in
the org file:

#+comment: -*- org-html-preamble: "Author:
%a(%e)Date: %d" -*-

And also this in my org setup:

(put 'org-html-preamble 'safe-local-variable 'stringp)

I looked at

(org-export-define-backend 'html
  :options-alist
(:html-preamble nil "html-preamble" org-html-preamble)

and the help for org-export-options-alist:
this word "html-preamble" corresponds to:

OPTION is a string that could be found in an #+OPTIONS: line.

So I tried this, but it had no effect"

#+OPTION: html-preamble: "Author: %a(%e)Date: %d"

Minor note: normally, I distribute the standard variables between preamble
and postamble as follows:

(setq
 org-html-preamble-format '(("en" "Author: %a (%e)
Date: %d"))
 org-html-postamble t   ; was 'auto which inserts author,
date: but I want those in preamble
 org-html-postamble-format  '(("en" "Exported by %c
%v"))
)