Skip to main content

Posts

Showing posts from September, 2010

Plot the zeros of transcendental equations in Mathematica

A transcendental equation is defined as function f. It is solved not by the usual Solve routine but by the new Refine routine because it includes all the different possibilities of the unknown variables the equation has.  Assuming is used to tell the kernel that the variables XX and YY  are always positive. Note the way the two conditions are clubbed. With an &&. Now, we have to set XX and YY to some value, otherwise Mathematica would not be able to Plot it.  Then to evaluate at what point the zeros of the function f occurs using the {v,f(v)} and setting v= {the solution}. Now, we can inject this point into the Plot by the Epilog command.  Epilog command is an option for graphics functions which gives a list of graphics primitives to be rendered after the main part of the graphics is rendered.  The options used for the point size / color are standard commands. Now mathematics plots the function f. Then renders the points of its zeros directly into the plot. So, th

How to use Latex formulas with xfig

Source : http://graphics.stanford.edu/lab/howto/xfig_latex.html Use the normal method in xfig for adding text, but set the "special text" mode using the "Text flags" menu at the bottom of the screen for math mode. To input LaTex set the "special text" mode using the "Text flags" menu at the bottom of the screen. Then use text tool and write $...$ to switch to math-mode.  Type the equation. Export the figure from xfig : using the format "Combined PS/LaTeX (PS part)". Two files would be created: foo.pstex and foo.pstex_t Now save the following as some file, say create-xfig-eps and make it executable - cp $1.pstex_t temp.pstex_t cp $1.pstex .temp.pstex echo "\documentclass{article} \usepackage{epsfig} \usepackage{color} \setlength{\textwidth}{100cm} \setlength{\textheight}{100cm} \begin{document} \pagestyle{empty} \input{.temp.pstex_t} \end{document}" > temp.tex latex temp.tex dvips -E temp.dvi -o $1.eps

Evince and Firefox

Follow link in Evince : Evince fails to follow a link to Firefox with the following error : Failed to execute child process "/usr/lib/firefox35/firefox" (Permission denied) Some people suggest to set the path correctly by creating a soft link. For example if the Firefox is now in the directory /usr/local/bin/firefox then create the following soft link: ln -s /usr/local/bin/firefox /usr/lib/firefox35/firefox This DOES NOT work. The correct way to do this is to set the path correctly in the gconf-editor. Open gconf-editor . Goto /desktop/gnome/url-handlers/http/. Change the command to just firefox "%s". The OS would figure out where the Firefox is installed and act accordingly. To open the pdf's in the Firefox window with Evince instead of acroread : The mozplugger does not work. The best way is to goto Firefox -> Preferences -> Applications. Change the Adobe documents handler to use Evince.