Is there a way to figure out the output format in a pandoc lua filter

Viewed 131

Lets say I have a code like this:

return {
  {
    Str = function (elem)
      if elem.text == "any string" then
        return pandoc.RawInline ("latex", "anything")
      end
    end,
  }
}

Can i include a if statement that says: If the output file is latex then use this code and if the output file is html (or not latex) do that...

So I essentially wonder if there is a way of figuring out the output file format within the lua-filter.

1 Answers
Related