pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
613 stars 166 forks source link

include-files: add a "inline" options #229

Open loicreynier opened 2 years ago

loicreynier commented 2 years ago

The include-files creates a new paragraph for each included file. This is great when including files such as documents parts but one may need to includes files without creating a new paragraph.

I personaly use mainly the filter to include equations in LaTeX document, which should not be written in a new paragraph to prevent an indent after the equation. I would like to produce

... in the following equation

f(x) = sin(x)

where x is ...

instead of

... in the following equation

f(x) = sin(x)

____ where x is ...

using

... in the following equation
```{.include}
equations.tex

where x is ...


It is a matter of taste but I think an option like `{.include inline=1}` could be usefull in other cases. I don't know enough about the API to know if such a feature could be implemented without making too many changes to the filter code/behaviour.