TransWikia.com

Make node size independent of content?

TeX - LaTeX Asked by flawr on May 19, 2021

This answer mentioned that the size of a node usually depends on the size of the content. For instance in following example the circle will have size 2cm as long as the content doesn’t force it to make it bigger. Is it possible then to set the size of this circle to a fixed value that is independent of the size of the content? (So a too large content might possibly overflow.)

begin{tikzpicture}
     draw node[fill,circle,minimum size=2cm] {content};
end{tikzpicture}

One Answer

enter image description here

documentclass[tikz, border=10]{standalone}
usepackage{tikz}
begin{document}
    begin{tikzpicture}
        
         node[fill,circle,minimum size=2cm,label=center:Huge content] {};
        
    end{tikzpicture}
end{document} 

Correct answer by js bibra on May 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP