[OS X TeX] .sty curio

Alain Schremmer schremmer.alain at gmail.com
Fri May 15 14:18:12 EDT 2009


I am rebuilding my "exam maker" from scratch.

1) Because I have to define a lot of commands etc, I do that in a  
style sheet which I normally keep with the other ones in Users >  
schremmer > Library > texmf > tex > latex.

2) Because I am programming impaired, I am incrementing a new version  
and to keep the successive versions of .tex and .sty synchornized,  
the preamble of the .tex consists of just the following:

	\usepackage{fink}
	\xdef\thisfile{\finkbase}%This picks up the name of this file
	\usepackage{\thisfile}%This says to use the stylesheet with that  
same name.

Which I should have thought of a long time before I did because it  
simplifies my life enormously.

3) But then, to simplify backups, I thought to copy the nth.sty into  
the folder that contains the nth.tex so it would be automatically  
backedup. The next day, after some confusion, I realized that  
the .tex file was using the .sty in the same folder rather than  
the .sty in the latex folder. Another thing I should have thought of  
before as it simplified my life even more: now, I just duplicate the  
folder, get rid of the .aux and the .pdf and  increment the .tex  
and .sty numbers.

4) And here is the curiosity: when I double-click on the .tex, it of   
course also opens the pdf but when I double-click on the .sty it too  
opens … the pdf so that there are now two copies of the pdf.

Intrigued, but mostly amused regards
--schremmer


More information about the MacOSX-TeX mailing list