Closed tecosaur closed 1 year ago
Thank you for your work on this. The screenshot looks really nice. I've fixed the issue regarding the evaluation of the preview data so that it should work now. The patch will be also part of the next release.
Thanks for the quick fix! I'll look forward to the 3.0 release.
Hmm, I was hoping to give the fixed version a spin, so I tried autoreconf -i
then make
and got hit with some compilation errors like
dvisvgm.cpp:87:48: error: ‘CommandLine’ does not name a type
87 | static string get_transformation_string (const CommandLine &args) {
Should I just wait for 3.0 to come out properly, or is there a quick/easy fix to this?
In case it helps, the full log: https://0x0.st/oRUF.txt
I guess something went wrong with the generation of src/CommandLine.hpp
. Is this file empty in your build directory? If so, the script opt2cpp.py
failed to create it and it should help to revert CommandLine.hpp
from the repository. Do you get any further error or warning messages during the build?
Thanks for the pointer, CommandLine.hpp
was 0B. When I manually run pyhon3 opt2cpp.py
no stdout/stderr is produced though. After resetting CommandLine.hpp
though, no errors, and it works like a charm!
Thanks for the quick fix :grinning:
You're welcome. Great to hear you could fix the build issue.
opt2cpp.py
requires argument option.xml
to create the .hpp
file. So it should be used like this:
python3 opt2cpp.py options.xml >CommandLine.hpp
Usually, the build system should automatically take care of that if CommandLine.hpp
is out of date.
Hmm, if I do python3 opt2cpp.py options.xml > CommandLine.hpp
then I get exactly what's currently committed. Perhaps it's just something minor with the build system?
One more thing if I may, do you have a rough idea of when 3.0 might come out? Actually getting correct sizing and baseline information is absolutely lovely, and it would be helpful for working out what to put in the documentation.
I've said it before, but this is working brilliantly, so thanks for not just the fix but dvisvgm. I'm going to put another screenshot here for fun.
Currently, support for recolouring (as in the heading) is done by finding the foreground colour in the SVG file dvisvgm produces and replacing it with currentColor
. It would be cool if there was a command line flag for this, but it's not much effort to do it as a second step.
Hmm, if I do
python3 opt2cpp.py options.xml > CommandLine.hpp
then I get exactly what's currently committed. Perhaps it's just something minor with the build system?
I currently can't reproduce the problem. Maybe the timestamps of options.xml
and CommandLine.hpp
were out of sync for some reason.
One more thing if I may, do you have a rough idea of when 3.0 might come out? Actually getting correct sizing and baseline information is absolutely lovely, and it would be helpful for working out what to put in the documentation.
I'd like to release version 3 sometime this month which is also necessary to get it into TeX Live 2023. Unfortunately, I haven't had much time to test the new stuff that has been added (mainly the new PDF handler and the TTF/WOFF writer). The code works well so far but there could still be some issues that I haven't come across yet.
Currently, support for recolouring (as in the heading) is done by finding the foreground colour in the SVG file dvisvgm produces and replacing it with
currentColor
. It would be cool if there was a command line flag for this, but it's not much effort to do it as a second step.
I really like the look of the output -- especially, the font is quite nice. Have you already tried to change the color in the LaTeX file rather than in the SVG? It might be a bit easier because you just have to add something like
\special{color rgb 0.5 0 0.5}
directly after \begin{preview}
which sets the default text color for that page. I might add a command-line option for this in the future as well but can't promise it yet.
Have you already tried to change the color in the LaTeX file rather than in the SVG? It might be a bit easier because you just have to add something like...
I'm doing that for dvipng (because of the limited colour stack, actually), but it's much nicer with currentColor
because then it "just works" no matter where it's put (body text, heading, etc.) and dynamically adapts to theme changes without having to be regenerated.
So for this use case, having a transparent background and currentColor
foreground is ideal.
Quick question: should I make a new issue requesting a --currentcolor
flag?
Yes, please open a new ticket for that. Otherwise, I'll probably lose track of it. Please also add some information on what the new option is supposed to do and maybe add a small example.
Hello!
Preamble
I'm attempting to make dvisvgm the premiere LaTeX preview system in Emacs' org-mode. I'm really excited about this work, and it can produce some terrific results. Here's an example of an Emacs buffer using dvisvgm-generated image overlays on the LaTeX fragments:
Unfortunately in the process I've run into a few minor bugs/deficiencies in dvisvgm, which I'm hoping might be able to be addressed.
The actual issue
When running dvisvgm on multiple pages, bbox information is only emitted for the first page.
MWE
DVI file
org-tex-pojDTY.dvi.zip (zipped because GitHub will not accept
.dvi
files)dvisvgm command
stdout
converting each page individually
System information