[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.
- [BUG] ox-html does not export captions of source blocks without language, Johan Bolmsjö, 2022/12/14
- Re: [BUG] ox-html does not export captions of source blocks without language, Kaushal Modi, 2022/12/14
- Re: [BUG] ox-html does not export captions of source blocks without language,
Johan Bolmsjö <=
- [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language), Ihor Radchenko, 2022/12/15
- Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language), Kaushal Modi, 2022/12/15
- Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language), Max Nikulin, 2022/12/15
- Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?, Max Nikulin, 2022/12/17
- [BUG] org-latex-src-block-backend is directly used as variable instead of querying export option (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?), Ihor Radchenko, 2022/12/18
- Re: [BUG] org-latex-src-block-backend is directly used as variable instead of querying export option (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?), Timothy, 2022/12/18