It would be helpful to allow the revnumber to be automatically included in the name of the output file. This saves the user from having to remember to use the -o flag to specify a file name and align it with the revnumber.
If there's an easy way to do this without built-in support, then we should simply document it.
We'll need an option or attribute for this. I think an option makes the most sense since this is really something that is controlled at the level of the -o flag. Perhaps --version-out-file?
I think an option is definitely the right choice here as the output file is something that is controlled by the API.
Technically this can be done by hacking the outfilesuffix in the document header:
:outfilesuffix: -{revnumber}{outfilesuffix}
However, this can have side effects, so it's still better to have an option.
Most helpful comment
Technically this can be done by hacking the outfilesuffix in the document header:
However, this can have side effects, so it's still better to have an option.