Inkscape Text background with LaTeX text

I have a diagram created in Inkscape that I’d like to export to PDF with LaTeX text (so the text keeps the properties of the LaTeX document it’s used in). In this diagram I have several labeled arrows like this:

labeled arrow

Unfortunately if I resize the image in the LaTeX document, these will turn into either

upscaled labeled arrow with too much spacing


downscaled labeled arrow with not enough spacing

Now, I’m OK with the arrow itself limiting how much I can resize the image (without making the text span across the entire arrow), but I’d like at least the spacing of the label to be consistent.

Currently the arrows are composed of the left side (straight line), the text, and the right side (straight line with arrow point). I’d like to instead make the arrow just a single straight line (with an arrow point) and give the text a (non-transparent) white background, which would then expand or contract with the text. Is this possible?


Don’t add the white background in inkscape, just add the text on top of the arrow.

enter image description here

Then export as pdf+tex and open the resulting .pdf_tex file. There search for your text and replace it with \colorbox{white}{text}. This box will automatically adjust to the size of the text.


enter image description here

Source : Link , Question Author : Mate de Vita , Answer Author :

Leave a Comment