On Wed, May 20, 2026 at 05:20:46PM +0100, Gavin Smith wrote:
> > One possibility could be to consider that @html in @documentinfo is only
> > for EPUB, but this seems less natural to me than adding an @epub raw
> > format command.
> 
> I would prefer this possibility.  Do not output anything extra in <head> for
> EPUB output, only outputting to <metadata>.

Ok.  It may not be so easy to implement since it requires having
specific code for EPUB in HTML conversion code, which is not the case
for now, I'll see.

> As there is already @ifepub it may make sense to add @epub as well, although
> I feel that the relationship between @html and @epub could be confusing for
> users, where one format implies the other.

On the one hand I agree, on the other hand, it parallels what EPUB is as
a "format" as it is more a 'meta format' than a format, it is a
collection of resources, which are mainly XHTML files, but could also be
a mix of images, films and XHTML.

> I feel if there are two commands,
> it makes the formats appear to be completely separate formats, so users could
> be surprised to see the contents of @html output as well as the contents
> of @epub for EPUB output.  In nearly all usages (outside of @documentinfo),
> the two commands would be synonymous, as you propose, so it seems unwarranted
> to have them both.

That is not what I propose, actually.  My idea was that @epub would only
be valid in @documentinfo (and in similar specific contexts where output
will end up in the EPUB specific data, not in a resource), while it
would be ignored in the conversion to XHTML, where @html only would be
output.

> It is a similar situation to the @ifplaintext command (which is hardly used
> AFAIK), where Info and plaintext output are considered variants of each other.
> The manual has to go to the trouble of explaining that @ifinfo is true for
> plaintext output as well.  (It is not exactly the same, though, as @info and
> @plaintext are not real commands.)

It is a somewhat similar situation, as Info may be considered as
plaintext with headers and tag tables, but it is also different as
plaintext is a full format in itself.

-- 
Pat

Reply via email to