Fix generic graph LaTeX vertex styling#41785
Merged
vbraun merged 1 commit intosagemath:developfrom Mar 22, 2026
Merged
Conversation
|
Documentation preview for this PR (built with commit 6763d16; changes) is ready! 🎉 |
dcoudert
approved these changes
Mar 11, 2026
Collaborator
dcoudert
left a comment
There was a problem hiding this comment.
LGTM.
I checked using view(g) the result and it looks good. Thanks.
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Mar 15, 2026
sagemathgh-41785: Fix generic graph LaTeX vertex styling Fixes sagemath#38282. The problem was that Sage encoded custom vertex appearance in `\Vertex[style={...}]`, but tkz-graph applies these options through `VertexStyle`, so options such as `vertex_shape`, `vertex_color`, and related vertex styling settings were present in the generated LaTeX but had no visual effect. This patch emits the custom vertex styling via `VertexStyle/.append style={...}` around each vertex, so tkz-graph applies the intended shape, color, and size overrides. Tests: - updated doctests for generated LaTeX output - added a regression doctest for `vertex_shape='rectangle'` and `vertex_color='red'` - `python -m py_compile src/sage/graphs/graph_latex.py src/sage/graphs/generic_graph.py` URL: sagemath#41785 Reported by: Muhammet Doğukan Bingöl Reviewer(s): David Coudert
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Mar 18, 2026
sagemathgh-41785: Fix generic graph LaTeX vertex styling Fixes sagemath#38282. The problem was that Sage encoded custom vertex appearance in `\Vertex[style={...}]`, but tkz-graph applies these options through `VertexStyle`, so options such as `vertex_shape`, `vertex_color`, and related vertex styling settings were present in the generated LaTeX but had no visual effect. This patch emits the custom vertex styling via `VertexStyle/.append style={...}` around each vertex, so tkz-graph applies the intended shape, color, and size overrides. Tests: - updated doctests for generated LaTeX output - added a regression doctest for `vertex_shape='rectangle'` and `vertex_color='red'` - `python -m py_compile src/sage/graphs/graph_latex.py src/sage/graphs/generic_graph.py` URL: sagemath#41785 Reported by: Muhammet Doğukan Bingöl Reviewer(s): David Coudert
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Mar 21, 2026
sagemathgh-41785: Fix generic graph LaTeX vertex styling Fixes sagemath#38282. The problem was that Sage encoded custom vertex appearance in `\Vertex[style={...}]`, but tkz-graph applies these options through `VertexStyle`, so options such as `vertex_shape`, `vertex_color`, and related vertex styling settings were present in the generated LaTeX but had no visual effect. This patch emits the custom vertex styling via `VertexStyle/.append style={...}` around each vertex, so tkz-graph applies the intended shape, color, and size overrides. Tests: - updated doctests for generated LaTeX output - added a regression doctest for `vertex_shape='rectangle'` and `vertex_color='red'` - `python -m py_compile src/sage/graphs/graph_latex.py src/sage/graphs/generic_graph.py` URL: sagemath#41785 Reported by: Muhammet Doğukan Bingöl Reviewer(s): David Coudert
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.
Fixes #38282.
The problem was that Sage encoded custom vertex appearance in
\Vertex[style={...}],but tkz-graph applies these options through
VertexStyle, so options such asvertex_shape,vertex_color, and related vertex styling settings were present inthe generated LaTeX but had no visual effect.
This patch emits the custom vertex styling via
VertexStyle/.append style={...}around each vertex, so tkz-graph applies the intended shape, color, and size
overrides.
Tests:
vertex_shape='rectangle'andvertex_color='red'python -m py_compile src/sage/graphs/graph_latex.py src/sage/graphs/generic_graph.py