[OS X TeX] Sysquake for LaTeX (and TeXShop)

Ramón Figueroa-Centeno ramonf at hawaii.edu
Sat Mar 28 15:54:00 EDT 2009


Aloha,

I have added some lines to the engine to delete some files. The reason is that if I do not remove them bounding boxes are incorrectly modified in subsequent compilations.

Here it is:

#!/bin/sh
PATH="$PATH:/usr/texbin:/usr/local/bin"
pdflatex --shell-escape "$1"
pdflatex --shell-escape "$1"
name=$(basename "$1" .tex)
rm "$name".lme
rm "$name".lmeout
rm lmefrag*

Now, if you use the preview package you can get a plot in its own pdf, that then can be included in another document through \includegraphics. Here is an example:

% !TEX TS-program = Sysquake

\documentclass{article}
\usepackage[latexingraphics]{sysquake}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{epstopdf}

\usepackage[%
active,% Comment this to inactivate preview
pdftex,tightpage]{preview}
\PreviewEnvironment{sysquake}

\begin{document}
\begin{figure}[ht!]
\centering
\begin{sysquake}(300, 300)
plotoption nomargin; 
plotoption fill3d;
use colormaps; 
colormap(blue2yellow2redcm); 
s = -3:0.25:3; 
t = s; 
[x,y] = meshgrid(s,t); 
z = x.^2 - y.^2; 
surf(x,y,z); 
\end{sysquake}
\caption{$f(x,y)=x^{2}-y^{2}$}
\end{figure}
\end{document}

Finally, I typed the following in the Terminal to be able to remove Sysquake auxiliary files from within TeXShop:

defaults write TeXShop OtherTrashExtensions -array-add "lmelog"
defaults write TeXShop OtherTrashExtensions -array-add "lmeout"
defaults write TeXShop OtherTrashExtensions -array-add "lme"

(the last two lines are redundant if you use the engine, but they do not hurt and you may want them if you do not use the engine).

Enjoy!

Ramón
-- 
View this message in context: http://n2.nabble.com/Sysquake-for-LaTeX-%28and-TeXShop%29-tp2548365p2550289.html
Sent from the MacOSX-TeX mailing list archive at Nabble.com.




More information about the MacOSX-TeX mailing list