LyXIncluding a Diagram from an external File

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
NewLyxUser
Posts: 2
Joined: Tue Aug 02, 2011 4:02 am

Including a Diagram from an external File

Post by NewLyxUser »

When I converted a tex file to lyx, I got lots of errors on this particular part, which I was unable to resolve. Any ideas?
In the original tex file it was as follows:

Code: Select all

\begin{align}
\dot{x}& =Ax+bu,  \notag \\
y& =c' x,
\end{align}%
and a function~$\phi \in S_{k}$.
\begin{figure}[tbp]
\begin{center}
\input{abst.pstex_t}
\end{center}
\caption{}
\label{fig:abs}
\end{figure}


The contents of abst.pstex_t are:

Code: Select all

\begin{picture}(0,0)%
\includegraphics{abst.pstex}%
\end{picture}%
\setlength{\unitlength}{3355sp}%
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
  \reset@font\fontsize{#1}{#2pt}%
  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
  \selectfont}%
\fi\endgroup%
\begin{picture}(4224,2724)(439,-3673)
\put(901,-2911){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}$\phi(t,z)$}}}}
\put(3976,-2911){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}$z$}}}}
\put(2026,-1486){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}$\dot{x}=A x+ b u$}}}}
\put(2026,-1786){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}$y=c' x$}}}}
\put(4051,-1411){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}$y$}}}}
\put(1051,-1411){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}$u$}}}}
\end{picture}%
Last edited by Stefan Kottwitz on Thu Aug 11, 2011 8:04 pm, edited 1 time in total.

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

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Including a Diagram from an external File

Post by Stefan Kottwitz »

Hi,
NewLyxUser wrote:When I converted a tex file to lyx, I got lots of errors on this particular part, which I was unable to resolve.
I don't get an error if I put those parts into separate documents, complete that and compile. So the error is probably somewhere else in your code. It would be good if you would tell us the error messages you got, besides mentioning there are some.

Stefan
LaTeX.org admin
Post Reply