Fix faust2mathdoc to convert all mathdoc SVG diagrams to PDF - #1265
Open
oneilltomhq wants to merge 1 commit into
Open
Fix faust2mathdoc to convert all mathdoc SVG diagrams to PDF#1265oneilltomhq wants to merge 1 commit into
oneilltomhq wants to merge 1 commit into
Conversation
oneilltomhq
force-pushed
the
fix/faust2mathdoc-convert-all-svgs
branch
from
June 17, 2026 10:44
9c26d83 to
74c5632
Compare
Named <diagram>expr</diagram> blocks emit per-expression SVG files that the generated TeX references as PDFs, but the script only converted process.svg, so xelatex aborted with "File not found" on the named diagrams. Use the existing convert_svgdirs2pdf helper (as faust2mathviewer already does) so every generated SVG is converted first. Also add tests/mathdoc/signalFlowPatternsMathdoc.dsp, a small repro with multiple <diagram> tags. Co-authored-by: Cursor <cursoragent@cursor.com>
oneilltomhq
force-pushed
the
fix/faust2mathdoc-convert-all-svgs
branch
from
June 17, 2026 11:03
74c5632 to
e0eb42a
Compare
Member
|
Is the PR ready now ? |
Author
|
@sletz I believe so - maybe the test file is a little sloppy in its substance - but the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
faust2mathdoconly convertedprocess.svgin each mathdoc SVG directory, but--mathdoccan emit named<diagram>expr</diagram>SVGs that the generated.texreferences as PDFs.convert_svgdirs2pdfhelper (same approach asfaust2mathviewer) so every generated.svgis converted beforexelatexruns.tests/mathdoc/signalFlowPatternsMathdoc.dsp, a small repro with multiple<diagram>tags.Problem
For DSP files with
<diagram>parallel_tank</diagram>(and similar),faust --mathdocwrites SVGs likeparallel-*.svgunder*-mdoc/svg/svg-*/, and the TeX output references the corresponding PDFs. The script never created those PDFs, soxelatexfailed with missing file errors:Repro
Before this fix, only
process.svgwas converted (1 PDF for 39 generated SVGs); the named diagram PDFs were missing andxelatexaborted. After the fix, all 39 generated SVGs are converted and the PDF builds successfully (46 pages).Test plan
faust2mathdoc tests/mathdoc/signalFlowPatternsMathdoc.dspcompletes and writes*-mdoc/pdf/*.pdf.svgfiles and 39 matching.pdffiles undersvg/tests/mathdoc/rms.dspstill builds (no regression)Notes
supertabular(or similar LaTeX packages) on some systems is a separate dependency issue, not addressed here.