0

I would like to fix the width of an Inkscape document. That is, no matter what I draw on it, I want the width to be some fixed x, such that the text is always the correct size relative to the document size. I see a way in the ^D settings to resize the page to context, but that is not what I want.

I understand I could do some math to figure out what the correct text size would be for any given document size, but I have to do this for about 65 detailed maps, so I'd really like to avoid doing that every time I have to edit one of the svg such that their dimensions change slightly.


My use case may shine some light on why I need this: I am attempting to create svgs to import into a LaTeX document via the svg CTAN package. This converts text to the correct font and size which the LaTeX document is being built with. This makes it somewhat difficult to correctly visualize where my text will end up in LaTeX unless I make the font and size exactly the same as I plan on using in the document. I do know the final dimensions of the LaTeX document. It will be 6x9 or 7x10 page size with an 8pt font size, so I'd like to fix the width of my Inkscape documents to 6 or 7 inches and make all text 8pt in order to get an accurate representation of what the text will look like and where it will wrap on the page.

5
  • While it may not answer this particular question, if anyone has a better way to create an svg and include it in a LaTeX document in a way that I can accurately see where the text will wrap and align, I am open to suggestions.
    – Logan
    Jun 25 at 19:16
  • Hi. Welcome to GDSE. There is no such functionality in Inkscape, at least not that I am aware of. The size of text can't be resized dynamically/automatically to fit a specified width. I have no real experience with LaTeX, but did you know there is a Tex Stack Exchange site? This might be better posted there.
    – Billy Kerr
    Jun 25 at 22:28
  • Hi, this question was specifically about Inkscape, so I decided to post it here. Since this functionality does not exist I will definitely post there to see if anyone else has found an accurate workaround for my particular case. I am able to work around the issue by specifying the width and resizing all objects by eye -- but it's not very accurate. I may look into forking Inkscape and trying to implement something like this myself. Thanks! If someone doesn't come by with another answer I will submit my own as a solution soon.
    – Logan
    Jun 26 at 2:08
  • Are you sure that SVG is the right format for importing into LaTeX. It's just that if it's causing you problems then perhaps PDF would be better. Inkscape can export PDFs too.
    – Billy Kerr
    Jun 26 at 2:14
  • Hi, @Billy. I am exporting the document as PDF+LaTeX, so it is being imported as a PDF. Everything looks correct in the resulting document, but only if these conditions are met: Inkscape pagewidth to text size ratio is the same as the width to text size ratio of where I am importing the PDF+LaTeX result document.
    – Logan
    Jun 27 at 16:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.