Replies: 2 comments 6 replies
-
I think is was originally intentional and the attributes, if present, are passed to an implicit div around the underlying blockquote, where linking etc. is implemented. This being said, I realize that for a captioned blockquote the attributes are passed both to the underlying environment (= epigraph when resilient.sile is used) and a surrounding div.... So there's some small discrepancy here, so perhaps we could do something about it... Yet, it has always been a grey area here, due to the fact that SILE originally didn't have a working blockquote environment (I proposed one upstream, which went into SILE 0.15.0); we had (and still have) a fallback in markdown.sile; and resilient.sile provides its own "styled" environments... -- So I refrained adding too "clever" options, there, due to the multiple path... I haven't tested them, but djot.lua also has filters (similar to Pandoc in that regard), so perhaps they could also be used for such things? |
Beta Was this translation helpful? Give feedback.
-
Which "other" implementations? Markdown.sile's Djot support Lua predates the Djot support in Pandoc by several months. (And "standard" Djot doesn't have captioned block quotes yet either, or citations, etc.) (By the way, style guides varies a lot between countries, so I cannot speak in general without more research, but some would argue that a "block" quote is always paragraph-indented... and starts with an ellipsis (possibly bracketed) if not quoted in full -- or one doesn't use a blockquote in those case, but an inline quotation. Is your mentioned use case generic enough for being considered?) Anyhow, maybe it is. And I did say it above:
Or to put it otherwise, SILE didn't have half of the constructs needed at the time (hey, it didn't have multi-line strikethrough or underline then! And it still doesn't really has BCP47 language support at this time!). It was a constant effort on bringing new things to SILE upstream, improving resilient.sile and adding Djot while re-using as much as the existing Markdown / Pandoc AST support already in place. There are sure some areas where it could be improved. But "I feel like it would probably make more sense to split that functionality out into something more generic" is just a reinvented history, in some ways... I also explained the rationale:
E.g. What if it supported the custom-style attribute, and allowed to pick a different style? (This would imply using resilient.sile, obviously. Would this be a problem, though?) -- after all that's what I eventually did for underline/strikethrough etc. that can be fully styled and hence even used for another semantics... And that's only one of the possibilities. |
Beta Was this translation helpful? Give feedback.
-
I wanted to try using
markdown.sile
's Djot inputter for a project I'm working on which involves re-typesetting an old book. As part of this I need to be able to have, depending on context, block quotes treated as being part of the same contiguous paragraph, meaning, among other things, that e.g. the paragraph following it should not have any paragraph indentation.The simple solution would be to just define my own
blockquote
environment which ends inSILE.call("set", { parameter="current.parindent", value="0pt" })
, which works. The problem I had though is that I'd like to be able to toggle this behavior based on e.g. specifying a class attribute for the block quote, but attributes don't end up being passed in to the called commands.Is this intentional, and is there any simple way to access the attributes from my custom command?
Beta Was this translation helpful? Give feedback.
All reactions