Graphics, Figures & TablesLine break in PDF-to-LaTeX export from Inkscape

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
camoesas
Posts: 3
Joined: Fri Feb 11, 2011 6:04 pm

Line break in PDF-to-LaTeX export from Inkscape

Post by camoesas »

Hey Everybody,

The new Inkscape to pdf to latex output is really awesome!

But does anybody know how to produce a line break in Inkscape? I have tried with \\ and with \newline but it doesnt work! :roll:

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Re: Line break in PDF-to-LaTeX export from Inkscape

Post by Frits »

Why would you need a linebreak command in Inkscape? Can't you just create two text boxes?
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
camoesas
Posts: 3
Joined: Fri Feb 11, 2011 6:04 pm

Re: Line break in PDF-to-LaTeX export from Inkscape

Post by camoesas »

Creating a new textbox would be the "quick and dirty" solution, i already had this in mind. But then you have to twiddle with the position of the new text box to get the right space between. Not to mention that the size of the letters differ in inkscape and in Latex. This would be a real Sysiphusian struggle. :idea:
camoesas
Posts: 3
Joined: Fri Feb 11, 2011 6:04 pm

Line break in PDF-to-LaTeX export from Inkscape

Post by camoesas »

Code: Select all

\linebreak[4]
also fails... :?:
Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Line break in PDF-to-LaTeX export from Inkscape

Post by Frits »

I also tested the \linebreak command, that's why I suggested the separate textbox solution.
Do you know that you can change the positions of the of the text afterwards, when opening the .pdf_tex file in your TeX editor? It is mentioned here.

I know it's a quick and dirty way, but apparently the other linebreak commands don't work.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
flyingbike
Posts: 3
Joined: Thu Feb 16, 2012 6:31 pm

Re: Line break in PDF-to-LaTeX export from Inkscape

Post by flyingbike »

Hi there

Does someone came with a solution to this problem ?

neither \\ or \linebreak works in inkscape

I tried to manually edit the pdf_tex file but still generates an error. (and even if it worked, it is not a good solution since I automatized pdf_tex export from svg)

It would be nice to be able to have two lines in one text box in inkscape and keep two lines after latex compiles.
flyingbike
Posts: 3
Joined: Thu Feb 16, 2012 6:31 pm

Re: Line break in PDF-to-LaTeX export from Inkscape

Post by flyingbike »

Found a solution by myself (and it was pretty easy)

When inserting a textbox in inkscape, I usually click once on my draw area, enter text with or without a manual line break (which didn't work)

Instead, take the "A" tool, click and drag to make a bigger area, then put text in.

To get text on two lines, simply double click on the text area. A square appears with a little square at the bottom right.Use this square to resize the box so that text adjusts on two lines.

When exporting in pdf+tex, text keeps on two lines.

The reason : the second methods puts the text in a "minipage" environment, which accepts line breaks.

ENjoy !
pedro_paro
Posts: 1
Joined: Sat Nov 21, 2015 3:55 pm

Re: Line break in PDF-to-LaTeX export from Inkscape

Post by pedro_paro »

You're a life saver flyingbike.
Thanks!
Post Reply