Closed tecosaur closed 6 months ago
With the current options it's not possible to only print the filename, unfortunately, but it shouldn't be too complicated to add this functionality. To keep compatibility with previous versions, it's probably not a good idea to introduce a separate verbosity flag for the filename.
Maybe I could add a new option --message
to print arbitrary user messages that may contain the macros already evaluated by special dvisvgm:message
. I just have to add macro svgfile
. Then you could call dvisvgm with -v3 --message "Output file: {?svgfile}"
or something like that.
As proposed above, I've added option --message
that allows you to output your own message text after creating an SVG file. It will be available as of the next version 3.2. If you want to use it in your scripts, you probably need to check the available dvisvgm version to prevent errors.
Thanks Martin!
I've been wondering if this could be done in a backwards-compatible way, but that does seem like a bit of a stretch (I guess depending on the implementation a new verbosity number could maybe work).
I thought about assigning the filename output to its own verbosity flag, but decided against it because you also needed to adapt the verbosity levels depending on the dvisvgm version, e.g. 7 for versions < 3.2. and 11 for the newer ones. To me, the current, more generic way is more flexible and might support further needs of other users without having to introduce many special verbosity flags.
Makes sense, thanks again!
You're welcome.
Hello again!
In the continuing optimisation efforts around org-mode's incoming new preview system, we've identified that reducing the amount of output (and thus text processing required) from dvisvgm can make an appreciable difference when producing 100+ previews.
Currently, we scan the stdout to see use the generated SVGs as they are produced, which seems to be information in the "info" (
4
) verbosity category.The only bit of information needed here is the file name written to, however, with the available verbosity flags we can't see a way to get rid of the extraneous output without also losing the crucial line containing
output written to org-tex-000000001.svg
.It would be great if we could get just the filename line + error/warning messages somehow.