Re: xfig figure with formula
>>From: Andre Poenitz <[EMAIL PROTECTED]> >>Subject: Re: xfig figure with formula >>To: [EMAIL PROTECTED] >>Date: Mon, 13 Mar 2000 15:56:44 +0100 (MET) >>Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] >> >>> >Yes, use the other way round: import LyX formulas in xfig. >>> interesting idea, thanks, >> >>Maybe another way (I have not used it for ages): >> >>There is a package called psfrac(?) (or something similar) psfrag Right, did not use it but seems efficient too, from the examples (I have browsed the doc). The formula import is more powerful IMHO (in fact, you may use it to patch any typesetting in xfig - for use in viewgraphs e.g.) -- JPierre
Re: xfig figure with formula
> >Yes, use the other way round: import LyX formulas in xfig. > interesting idea, thanks, Maybe another way (I have not used it for ages): There is a package called psfrac(?) (or something similar) You need to put some unique text somewhere in your xfig picture (like 'a_over_b'), and have to define some replacement afterwards - something like \replace{a_over_b}{$\frac{a}{b}$}, this syntax is probably wrong, but you get the idea ;-). So LyX is able to show at least the 'drawing part' of your eps. Andre' -- It'll take a long time to eat 63.000 peanuts. André Pönitz . [EMAIL PROTECTED]
Re: xfig figure with formula
>Yes, use the other way round: import LyX formulas in xfig. interesting idea, thanks, Torsten
Re: xfig figure with formula
>>Date: Mon, 13 Mar 2000 14:32:39 +0100 (MET) >>From: Torsten Mueller <[EMAIL PROTECTED]> >>Subject: Re: xfig figure with formula >>To: [EMAIL PROTECTED] >> >>>Insert a \usepackage{epsfig} in your preamble (doesn't work without it here) >>this was the problem, now with this it works, thanks for your help. >> >>The disadvantage is, that I cannot see the figure anymore on the screen. >>This is the thing I like most with LyX compared to other LaTeX editors. >>Is there any other solution, where I can see the figures on the screen? >> >> >>Thanks, >>Torsten >> Yes, use the other way round: import LyX formulas in xfig. A bit cumbersome, but efficient: - create a LyX document for each math insert in xfig, say foo.lyx - export as LateX -> foo.tex - compile and produce an eps image -> foo.eps (option -E of dvips) - insert in xfig Be sure to have a \pagestyle{empty} if you want an eps of the right size. Here is an example in foo.tex (one step back for foo.lyx): \documentclass[12pt]{article} \pagestyle{empty} \begin{document} $\mathcal{H}_\infty$ \end{document} then latex foo;dvips -E -o foo.eps foo When you use it often, you will be happy to build a bank of formulas. You might probably use the customize command of LyX to implement it. Regards -- Jean-Pierre
Re: xfig figure with formula
>Insert a \usepackage{epsfig} in your preamble (doesn't work without it here) this was the problem, now with this it works, thanks for your help. The disadvantage is, that I cannot see the figure anymore on the screen. This is the thing I like most with LyX compared to other LaTeX editors. Is there any other solution, where I can see the figures on the screen? Thanks, Torsten
Re: xfig figure with formula
* is there a special directory, where they should be? It is easier if both your figures (pstex and pstex_t) are in the same directory as the lyx file (since, as far as I understand, the pstex_t includes the path for the pstex). * 2. ->insert->file *I have given filename.pstex_t *It does not display anything in xdvi. I am just a novice lyx user, so forgive me if I cannot answer your needs: Insert a \usepackage{epsfig} in your preamble (doesn't work without it here) Insert float/Figure and inside the figure red box, try Insert/Include File (input checked) It works at least for me. Since a picture is worth a 1000 words, a sample file is included. If it doesn't work for you, I can't help. #This file was created by Mon Mar 13 14:02:36 2000 #LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team \lyxformat 2.15 \textclass book \begin_preamble \usepackage[T1]{fontenc} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{babel} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} \usepackage{setspace} \onehalfspacing \makeatletter \usepackage[T1]{fontenc} \usepackage{amsmath} \pagestyle{headings} \usepackage{babel} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} \usepackage{graphics} \usepackage{epsfig} \usepackage{setspace} \onehalfspacing \makeatletter \makeatother \end_preamble \language french \inputencoding default \fontscheme default \graphics default \float_placement htp \paperfontsize default \spacing onehalf \papersize Default \paperpackage a4wide \use_geometry 0 \use_amsmath 1 \paperorientation portrait \secnumdepth 5 \tocdepth 5 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 2 \paperpagestyle fancy \layout Standard \begin_float fig \layout Standard \begin_inset Include \input{gblt2ch.pstex_t} \end_inset \layout Caption Test figure. \end_float \the_end \begin{picture}(0,0)% \epsfig{file=gblt2ch.pstex}% \end{picture}% \setlength{\unitlength}{0.00087500in}% % \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}(6417,4335)(-8,-6490) \put(2145,-3031){\makebox(0,0)[rb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$P_a$\special{ps: grestore \put(2145,-3481){\makebox(0,0)[rb]{\smash{\SetFigFont{12}{14.4}{\familydefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$\tilde{x}$\special{ps: grestore \put(2145,-2581){\makebox(0,0)[rb]{\smash{\SetFigFont{12}{14.4}{\familydefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$x$\special{ps: grestore \put(2145,-3931){\makebox(0,0)[rb]{\smash{\SetFigFont{12}{14.4}{\familydefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$P_s$\special{ps: grestore \put(2145,-4381){\makebox(0,0)[rb]{\smash{\SetFigFont{12}{14.4}{\familydefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$\widetilde{\widetilde{x}}$\special{ps: grestore \put(2145,-6181){\makebox(0,0)[rb]{\smash{\SetFigFont{12}{14.4}{\familydefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$\hat{x}$\special{ps: grestore \put(2566,-2581){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$b_{e0}$\special{ps: grestore \put(3466,-2581){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$b_{e1}$\special{ps: grestore \put(4366,-2581){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$b_{e2}$\special{ps: grestore \put(3691,-2311){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$x_3$\special{ps: grestore \put(3241,-2311){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$x_2$\special{ps: grestore \put(3241,-4156){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$\widetilde{\widetilde{x}}_{02}$\special{ps: grestore \put(3241,-5551){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$\widetilde{\widetilde{x}}_{12}$\special{ps: grestore \put(3241,-6451){\makebox(0,0)[b]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}\special{ps: gsave 0 0 0 setrgbcolor}$\hat{x}_2$\special{ps: grestore \end{picture} gblt2ch.pstex
Re: xfig figure with formula
>At least, it works fine with lyx 1.0.4, when I input the figure (use >Insert/Include File and check the input box) inside a figure float. >There may be problems when the special text flag in Xfig is not set, or when >a formula misses a $. If I do this, then it displays "file=filename.pstex" and thats it. >Futhermore, figures should be in the proper directory. is there a special directory, where they should be? >I don't know if it really can help you, I don't understand what you exactly >tried. Maybe my explanation was not very clear: I have produced a figure with xfig 3.1 and called xfig with -specialtext flag. Then I have tried two things: 1. ->insert->figure encapsulated postscript I have given filename.pstex_t Nothing is displayed on the screen and in xdvi When I take filename.pstex then I can see the figure, but the LaTeX code is not translated. It is only the information in the eps file. 2. ->insert->file I have given filename.pstex_t It does not display anything in xdvi. Thanks, Torsten
Re: xfig figure with formula
* until now I have included my figures from xfig with eps which works * fine. * Now I need a formula inside the figure. The manual says, that I should * save the figure in xfig as ps_tex and ps_tex_t. * However, when I load ps_tex_t, I get an error message, that there is no * bounding box. * When I try it with include file, then I cannot see the figure (not on the * screen and not with xdvi). * I work with Lyx 1.0.3 and Solaris 2.7. Hallo, At least, it works fine with lyx 1.0.4, when I input the figure (use Insert/Include File and check the input box) inside a figure float. There may be problems when the special text flag in Xfig is not set, or when a formula misses a $. Futhermore, figures should be in the proper directory. I don't know if it really can help you, I don't understand what you exactly tried. If you succeed in figure centering, I'd be glad to know how.