[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: export to html, colored dates: org-mime export works but org to html
From: |
Bruno Barbier |
Subject: |
Re: export to html, colored dates: org-mime export works but org to html does not |
Date: |
Sat, 11 Feb 2023 11:05:54 +0100 |
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "BB" == Bruno Barbier <brubar.cs@gmail.com> writes:
>
>> Uwe Brauer <oub@mat.ucm.es> writes:
>> ..
>
>>> (add-to-list 'org-export-filter-plain-text-functions 'my-html-red)
>> ..
>
>>> But if I have
>>> #<2023-02-11>#
>>> in an org file and export it to html, no color is added to the timestamp.
>>>
>>> I don't know how to debug this.
>>>
>>> Any idea?
>
>> In org, "<2023-02-11>" is a date, not plain text. Thus, your function
>> doesn't get called with a text matching your date.
>
>> Note that using macros, you could get almost what you want.
>
>> #+MACRO: IDATE @@html:<span style="color: red">$1</span>@@
>
>> {{{IDATE(<2023-02-11>)}}}
>
>> And maybe ther is a way to also customize date format to get rid of the
>> brackets.
>
> Thanks, did you test it?
> I am asking because for me
I even did! :-)
You need to call the macro named 'IDATE' like this:
* Title {{{IDATE(2023-02-11)}}}
{{{IDATE(2023-02-11)}}}
See:
(info "(org) Macro Replacement")
And it will work for you too.
Bruno
>
> #+LANGUAGE:
> #+EXPORT_FILE_NAME: /home/oub/Desktop/testdate.html
> #+OPTIONS: toc:nil
> #+HTML_HEAD_EXTRA: <style> body {font-size:150%}</style>
> #+MACRO: IDATE @@html:<span style="color: red">$1</span>@@
>
> * Title {{{<2023-02-11>}}}
> {{{(<2023-02-11>)}}}
>
>
> Does not work when exporting to html, and I have recent developer org
> version installed
>
> Uwe
> --
> Warning: Content may be disturbing to some audiences
> I strongly condemn Putin's war of aggression against the Ukraine.
> I support to deliver weapons to Ukraine's military.
> I support the ban of Russia from SWIFT.
> I support the EU membership of the Ukraine.
> https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
- export to html, colored dates: org-mime export works but org to html does not, Uwe Brauer, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Bruno Barbier, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Uwe Brauer, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Ihor Radchenko, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Uwe Brauer, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Ihor Radchenko, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Uwe Brauer, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Ihor Radchenko, 2023/02/11
- Message not available
- Re: export to html, colored dates: org-mime export works but org to html does not, Ihor Radchenko, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not, Uwe Brauer, 2023/02/11
- Re: export to html, colored dates: org-mime export works but org to html does not,
Bruno Barbier <=