Images as TikZ nodes

In diagrams, I need to include images, such as symbolic icons or photos of actual hardware. I defined a generic TikZ style with two arguments: the name of the image, and the desired width. The height comes automatically with the same aspect ratio.

For the final node style, I apply this style plus adjustments such as actual node width and x or y separation:

All style definitions above go into a \tikzset command, separated by comma, plus many more global styles I need:

This way I get photos with annotations for larger physical diagrams:

core-switch

Leave a Reply

Your email address will not be published.