Repository navigation
Improve heapq documentation #133530
Description
Activity
The image looks generated. If it is, would you mind including instructions/scripts for making it, for the benefit of future editors? Even if they're platform-/tool-specific and they'd only work as inspiration.
The image looks generated.
That's because it is. :-)
instructions/scripts for making it
I used tkiz, so it should work on any platform.
My code for the binary tree
\documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[ level 1/.style={sibling distance=80mm}, level 2/.style={sibling distance=40mm}, level 3/.style={sibling distance=20mm}, level 4/.style={sibling distance=10mm}, every node/.style={ circle, draw=blue, fill=blue!20, minimum size=6mm } ] \node {0} child {node {1} child {node {3} child {node {7} child {node {15}} child {node {16}} } child {node {8} child {node {17}} child {node {18}} } } child {node {4} child {node {9} child {node {19}} child {node {20}} } child {node {10} child {node {21}} child {node {22}} } } } child {node {2} child {node {5} child {node {11} child {node {23}} child {node {24}} } child {node {12} child {node {25}} child {node {26}} } } child {node {6} child {node {13} child {node {27}} child {node {28}} } child {node {14} child {node {29}} child {node {30}} } } }; \end{tikzpicture} \end{document}
Then generated the pdf (
pdflatex) and converted it to an svg (there are many ways to do this). There are other ways to generate it but that is just the one I am most familiar with.If there are other similar text diagrams in the docs I am happy to replace them with images. They look much better, are clearer, and scale better.
Reacted by Mikhail EfimovThanks! Hopefully people can find the source in this issue. It would be better still to put it, for example, as a comment in the SVG file :)
In dark mode, the connecting lines aren't very visible. Could you add
:class: invert-in-dark-mode?@StanFromIreland would it be possible for you to upload also the PDF version and use asterisk in the image extension to let LaTeX builder grab the PDF version of the image? This would fix the regression, I think in a simplest way.
Duplicating images does not seem like a nice solution to this issue IMO.
@StanFromIreland LaTeX does not support svg. This format has to be converted to another image format that LaTeX supports. Tools such as Inkscape are a big dependency. Besides for example on my macOS 15.6.1 with Inkscape v1.4, to let LaTeX use the
svgpackage I need adding\svgsetup{inkscapeexe=/Applications/Inkscape.app/Contents/MacOS/inkscape}to the document preamble and I must executepdflatexwith the--shell-escapeoption, which means arbitrary commands such asrm -fr /can be executed from malicious obfuscated TeX code.Reacted by Maciej Olko
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo

With the implementation of max-heaps, the docs should be revised with examples and descriptions for both.
The docs should also be made more formal (#62480)
I will be working on this.
Linked PRs