I am using Inkscape, together with its LaTeX output feature, to create a block diagram for a report. I want to link each block in the diagram to a particular section in the report, using a hyperref.

Suppose I create a simple block, containing the text \hyperref[sect:eg]{Example}, and I export this diagram from Inkscape to files called example.pdf and example.pdf_tex.

Inkscape block with example text

Then, in my LaTeX file, I write:



\section{example \label{sect:eg}}



This works as expected: the text within the block diagram is clickable and links to the section.

However, I am now facing a problem where I want a block to contain two lines.

Inserting a linebreak from the Inkscape text editor does not work, nor does adding a linebreak manually ('\\').

The compiler (pdflatex) complains about the following line in the example.pdf_tex file:


Are there any clever workarounds for this? I could try messing around with the pdf_tex source code, but ideally a solution from within Inkscape or my main.tex file would be great.


Turns out you can use the makecell package.

enter image description here

Result with same MWE as in question:

enter code here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.