LyXInkscape PDF LaTeX in LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
lyx-dennis
Posts: 1
Joined: Fri Jul 08, 2011 3:39 pm

Inkscape PDF LaTeX in LyX

Post by lyx-dennis »

Hello,

I want to place a .pdf- or .svg-figure created with Inkscape in my Lyx-Document. In the Inkscape-file I want to use LaTeX-comands and I want the text to appear in the same size and font as it is in the Lyx-document.

I found this for "normal" LaTeX, but I don´t know how to do this with Lyx. See: http://mirrors.ctan.org/info/svg-inksca ... FLaTeX.pdf

Is it possible to place an Inkscape-file created as "pdf+latex" like normal figures in Lyx?

Thanks in advance for your answers!
Dennis

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Inkscape PDF LaTeX in LyX

Post by meho_r »

Sure, the same way you use in "normal" LaTeX:

1. Create a file in Inkscape and save it with PDF+LaTeX option. Let's call it Test.pdf. After that, you'll get two files: Test.pdf (containing graphics) and Test.pdf_tex (containing coordinates etc.).

2. Place both files in the same folder as your .lyx file (if you place it in some other place, don't forget to add full absolute or relative path to the file in step 3. instead of the name of the file).

3. In LyX, insert an ERT box (Ctrl+L) and type in:

Code: Select all

\input{Test.pdf_tex)
Note: if you get errors, make sure you have graphicx and xcolor packages loaded in Documents > Settings > LaTeX Preamble:

Code: Select all

\usepackage{graphicx}
\usepackage{xcolor}
Post Reply