LaTeX Email
According to Neil Zanella:
>
> Sure that could be done but I just wanted to know whether there is
> a standard location within the texmf tree where links to style files
> from commercial packages should go. Traditionally, all commercial
> packages on Unix/Linux systems go in the /opt directory which in turn
> may just be a symbolic link to /usr/local. I was wondering if a similar
> convention holds for the texmf tree.
> As far as the $TEXINPUTS variable goes, setting it in a .profile file
> or so does not work for me. I think the correct place to set it is
> /usr/share/texmf/web2c/texmf.cnf
Yes ... there is a convention, which you should follow, particularly
if you are setting it up for other users besides yourself. What you do
is create a `local' texmf tree and put your maple packages/documentclasses
in that tree either physically or via symbolic links (personally I would
use symbolic links in this instance). As you say above you do need to
make some modifications to the texmf.cnf file ... as well as few other
things. It's not difficult, and if you follow my somewhat verbose
instructions it should take you about 15 mins. Note, that you do *not*
need to change anything with regard to HOMETEXMF (what I say there, is
only a suggestion if you wish to pursue it ... it won't affect how well
LaTeX sees your maple files).
CHANGES YOU NEED TO MAKE TO texmf.cnf
#####################################
The main environment variables you are concerned about are:
TEXMF
TEXMFMAIN
TEXMFLOCAL
and maybe TEXMFHOME. The idea is that there are `texmf' directory
trees each containing files that TeX and friends need. Each
`texmf' tree should have the standard TDS (TeX Directory Structure)
... essentially:
texmf/
bibtex/
bib/
bst/
.
.
tex/
latex/
.
.
plain/
To read all the details regarding TDS do: texdoc tds
... or if that doesn't work try: xdvi `locate tds.dvi`
TEXMFMAIN is the environment variable for the main `texmf' tree
(that's ok ... no need to touch that). You should never touch the
main tree ... if you do and you ever update your teTeX you run the
risk of losing whatever you put there. Put any of your extra .sty
files etc. in your local `texmf' tree, which you may have to create
yourself ... I suggest you create a directory (if it doesn't exist):
/usr/share/texmf.local
Now in texmf.cnf you will find a line starting
% TEXMFLOCAL
... uncomment it and set the variable to be: /usr/share/texmf.local
i.e. that line should now read:
TEXMFLOCAL = /usr/share/texmf.local
Also, lower down in texmf.cnf you will find HOMETEXMF ... if you wish,
uncomment this and change it to read:
HOMETEXMF = $HOME/texmf
... then each user will be able to have their own personal texmf
tree, to store all their .bib files (for BibTeX) and any macros files
... but this choice means you have to keep to TDS ... all LaTeX .sty
files you create for yourself should be in ~zanetta/texmf/tex/latex (for
example).
Yet lower down in texmf.cnf is the variable TEXMF ... you need to
set this to be:
TEXMF = {!!$TEXMFMAIN,!!$TEXMFLOCAL,$HOMETEXMF}
(if you want your home directory `texmf' tree to be searched as well
i.e. you made the edit to HOMETEXMF suggested above)
... or just
TEXMF = {!!$TEXMFMAIN,!!$TEXMFLOCAL}
(if you don't).
That should be all you need to do to the texmf.cnf.
PUTTING THE maple STUFF IN THE LOCAL `texmf' TREE
#################################################
Your local `texmf' tree `we' decided above was: /usr/share/texmf.local
We need to create a subdirectory structure according to TDS for the
maple .sty/.cls files ... I suggest you do:
mkdir -p /usr/share/texmf.local/tex/latex/maple
Then move (or copy) all the .sty/.cls files in the maple inputs2e
directory to: /usr/share/texmf.local/tex/latex/maple
*or* use symbolic links e.g. in a csh do:
cd /usr/share/texmf.local/tex/latex/maple
foreach a (/usr/local/maple/etc/inputs2e/*)
? ln -s $a
end
(the `?' is a csh prompt ... you don't type that)
Make sure these files are readable to you when you are *not* root:
cd /usr/share/texmf.local
chmod -R a+r .
ls -R . | grep : | sed 's/\(.*\):/chmod a+x \1/' | sh
I have a .cshrc alias
alias rdR "chmod -R a+r \!*;ls -R \!* | grep : | sed
's/\(.*\):/chmod a+x \1/' | sh"
(that should be one line) which allows me to do the above three lines
with: rdR /usr/share/texmf.local
UPDATE ls-R DATABASES
#####################
Now run (as root): mktexlsr
Since you didn't have an ls-R database for /usr/share/texmf.local
before ... the file: /usr/share/texmf.local/ls-R
will in fact be created for the first time.
CHECK EVERYTHING WORKS
######################
I'm guessing there is a file: maple.sty (or maybe, maple.cls). If not,
make the obvious modifications below.
Do:
kpsewhich maple.sty
... this should respond with:
/usr/share/texmf.local/tex/latex/maple/maple.sty
(if you are *not* in a directory that contains the file: maple.sty)
HTH
Regards,
Greg Gamble
___________________________________________________________________
Greg Gamble __________________ mailto:gregg@csee.uq.edu.au
Centre for Discrete Mathematics & Computing Tel: +61-7 336 52425
Department of Computer Science Fax: +61-7 336 54999
& Electrical Engineering http://www.csee.uq.edu.au/~gregg
The University of Queensland, Queensland 4072 AUSTRALIA

