pandoc icon indicating copy to clipboard operation
pandoc copied to clipboard

Sticky sections for Chunkedhtml with `{+}`

Open iagobaapellaniz opened this issue 1 year ago • 3 comments

Describe your proposed improvement and the problem it solves.

Would it be possible to make some chunks sticky? I mean, not to cut the document on that point (header)

Describe alternatives you've considered.

I think a good option would be to use a custom attribute as it happens with unnumbered {-}.

In this case my suggestion is to use {+}

# Header for the first file

# Another header on the first file {+}

# This header is appears on a separated file

iagobaapellaniz avatar Dec 22 '23 18:12 iagobaapellaniz

I'm not inclined to implement this. More complexity = more bugs, so we need a very strong reason for introducing it.

jgm avatar Dec 22 '23 18:12 jgm

I think that it is difficult to achieve this by other means, if not impossible. I mean that one cannot simply change the chunkhtml.default template, or add some JavaScript into the header, etc. If implemented, it should be implemented in the Chunkedhtml writer, I guess.

There are some circumstances, specially first sections inside a chapter or first chapters in a long text like "preamble", "acknowledgements", that are better together IMHO.

iagobaapellaniz avatar Dec 24 '23 15:12 iagobaapellaniz

I think that it is difficult to achieve this by other means, if not impossible.

But why do you need to achieve this?

There are some circumstances, specially first sections inside a chapter or first chapters in a long text like "preamble", "acknowledgements", that are better together IMHO.

This doesn't strike me as a strong enough justification for the change, but we can leave this open for a while to see if people have strong feelings either way.

jgm avatar Dec 24 '23 20:12 jgm