emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] ox-html does not export captions of source blocks without lang


From: Johan Bolmsjö
Subject: Re: [BUG] ox-html does not export captions of source blocks without language
Date: Wed, 14 Dec 2022 23:05:11 +0100
User-agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730

On Wed, Dec 14, 2022, at 22:51, Kaushal Modi wrote:
> On Wed, Dec 14, 2022, 4:44 PM Johan Bolmsjö <org-mode@johan.bitmaster.se> 
> wrote:
>> The caption "Caption 1" is not exported by ox-html in the following
>> source block.
>> 
>> #+caption: Caption 1
>> #+begin_src
>> foo bar baz
>> #+end_src
> 
> The begin_src block always requires a "language" as far as I know. If you 
> don't want to specify a language, you can use #+begin_example instead. 
> 
> You can even do "#+begin_src text".
> 
> It's a different issue as to why you are seeing a different behavior between 
> the two exporters. 

Okay, the manual confirms that the language is mandatory.
https://orgmode.org/manual/Structure-of-Code-Blocks.html

"#+begin_src text" exports the caption with both ox-html and ox-ascii.
"#+begin_example" export the caption with neither ox-html nor ox-ascii.

So the only discrepancy is how the two exporters handles this non-conforming 
source block.



reply via email to

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