# Center SVG made with Inkscape in PDF document exported by Lyx

I have a SVG made with Inkscape (Windows) imported into my Lyx document,

https://www.lyx.org/

but the exported PDF shows the image beyond the page boundary

PDF here

https://github.com/pedro-vicente/transport/blob/master/transport.pdf

and .lyx, .tex and .svg sources in the same repository

\begin_layout Standard
\align center
\begin_inset Graphics
filename figure_1.svg

\end_inset

\end_layout


EDIT:

@scottkosty, thanks, I exported the section of the image, with text above and below to the following LaTex

%% LyX 2.3.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\renewcommand{\sfdefault}{cmss}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{pdfpages}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% A simple dot to overcome graphicx limitations
\newcommand{\lyxdot}{.}

\makeatother

\usepackage{babel}
\begin{document}
In the Finite Volume Method, values for the above diferential equations
are calculated at discrete places on a grid of volumes, shown in Figure
1,
\begin{center}
\includepdf{figure_1}
\par\end{center}

\begin{center}
\textbf{Figure 1}: Temperature at center of cell, and on left and
right cell borders.
\par\end{center}

\noindent
\end{document}

• Welcome! Can you try converting your .svg to a .pdf (e.g., in Inkscape you can export) and instead include the PDF in your document? Likely LyX is doing that conversion behind-the-scenes, so this way we will know whether it is the behind-the-scenes conversion that's causing problems or the LaTeX placement. Aug 18, 2019 at 19:03
• I converted the .svg to .pdf, and then in Lyx Insert->File->Extern Material with PDF Pages template. The image fits on the page now, but it has huge spaces before and after \begin_layout Standard \align center \begin_inset External template PDFPages filename figure_1.pdf \end_inset Aug 18, 2019 at 19:36
• I suggest you make a LaTeX minimal example. To do that, in LyX go to File > Export > LaTeX (pdflatex). The reason for that is that most people on this site do not use LyX, but they can still comment on a possible solution if you post the .tex. Please post a complete minimal example, not just the part about the graphics. It's great that you link to the actual PDF file. That will be helpful! If you don't get a response here, consider writing to the lyx-users email list. Aug 18, 2019 at 19:47