Skip to content

Commit

Permalink
feat(classes): Add warning to \noindent if called after input
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jul 25, 2020
1 parent 4c4bae2 commit f29b9d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions classes/plain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 36,9 @@ plain.declareOption = function (self, name, default)
end

SILE.registerCommand("noindent", function (_, content)
if #SILE.typesetter.state.nodes ~= 0 then
SU.warn("\\noindent called after nodes already recieved in a paragraph, the setting will have no effect because the parindent (if any) has already been output")
end
SILE.settings.set("current.parindent", SILE.nodefactory.glue())
SILE.process(content)
end, "Do not add an indent to the start of this paragraph")
Expand Down

0 comments on commit f29b9d9

Please sign in to comment.