emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag


From: Tim Visher
Subject: Re: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag
Date: Thu, 22 Apr 2021 10:08:55 -0400

On Thu, Apr 22, 2021 at 9:52 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Tim Visher <tim.visher@gmail.com> writes:

> Awesome. Do you know whether there's an official way to share this sort of
> behavior between ox backends or is it just creating a function and calling
> it from both places or something?

Do you want to remove all markup from some parsed text?

You could define temporary export back-end with
`org-export-create-backend', and apply it with
`org-export-data-with-backend'. See for example, how
`org-latex-headline' formats headings (`text' binding in the function).

If that's the case, you need to know exactly what you want. It is pretty
obvious for bold markup, but what would happen to, e.g., a_b or \alpha
or <<target>>?

Thanks for the tip. What I'm thinking more is somehow getting the heading pre-output generation, stripping any characters that `org` would consider special (I'm hoping there's already a function that can at least mark 'markup' text in a given org string), and _then_ passing it to whatever ox function is responsible for using the title. That way it's as genericĀ as it can possibly be.

I confess though that I don't follow exactly what you're talking about defining a temporary export back-end. Why would that be necessary or beneficial to the end of teaching org how to use only the 'plain text' of a heading for the title in N ox backends?

--

In Christ,

Timmy V.

https://blog.twonegatives.com
http://five.sentenc.es

reply via email to

[Prev in Thread] Current Thread [Next in Thread]