I would have expected the second paragraph (which starts with the info node) to be indented.
Analysis
In my original context, the info node was a verse reference (used for later referencing in page headers etc.). As a workaround, inserting the info node after the textual content would have avoided the issue.
Yet, a possible fix would be:
--- a/packages/infonode/init.lua
+++ b/packages/infonode/init.lua
@@ -54,10 +54,14 @@ function package:registerCommands ()
self:registerCommand("info", function (options, _)
SU.required(options, "category", "info node")
SU.required(options, "value", "info node")
- table.insert(SILE.typesetter.state.nodes, _info({
- category = options.category,
- value = options.value
- }))
+ -- table.insert(SILE.typesetter.state.nodes, _info({
+ -- category = options.category,
+ -- value = options.value
+ -- }))
+ SILE.typesetter:pushHorizontal(_info({
+ category = options.category,
+ value = options.value
+ }))
end, "Inserts an info node onto the current page")
By directly inserting its node in the typesetter's node queue, the "info" command bypasses the initline() logic. (That's the only additional thing pushHorizontal() does.)
This being said, there are several other direct accesses to the typesetter node queue in the code base...
They might all be questionable...
The very principle of checking, each time some horizontal content is pushed via the typesetter methods, whether we are starting a new paragraph, might also be a questionable approach...
SILE 0.14.9, but also reproduced with SILE 0.12.5 so this is likely not related to recent changes.
Minimal script
Observed
Expected
I would have expected the second paragraph (which starts with the info node) to be indented.
Analysis
In my original context, the info node was a verse reference (used for later referencing in page headers etc.). As a workaround, inserting the info node after the textual content would have avoided the issue.
Yet, a possible fix would be:
By directly inserting its node in the typesetter's node queue, the "info" command bypasses the
initline()
logic. (That's the only additional thingpushHorizontal()
does.)This being said, there are several other direct accesses to the typesetter node queue in the code base...