[Tex/LaTex] How to use figures as inline images

graphicssvg

I have converted SVG images into pdf_tex usable format using inkscape and used it in my document as follows:

% \begin{figure}[h]
%     \def\svgscale{0.02}
%     \input{phone.pdf_tex}
% \end{figure}

I want to use the image inline with some text (Like – " this is an apple #" where '#' = a little image of an apple) .
I'm not able to do it. I'm new to LaTeX and I'm confused. Probably using it in some other file and using it as a package in .tex file might help, but again, I have no idea how that works.

Best Answer

You can use the image inline by simply removing \begin{figure}...\end{figure}. It you don't want to change the \svgwidth for the whole document, you can wrap it into a group ussing {...}.

\documentclass{book}%

\usepackage{graphicx}   

\begin{document}

\begin{figure}
\def\svgwidth{2cm}
\input{name.pdf_tex}
\caption{sdj}
\end{figure}

This is an apple {\def\svgwidth{2cm}\input{name.pdf_tex}} and more text


\end{document}