[OS X TeX] Language.dat

Bruno Voisin Bruno.Voisin at hmg.inpg.fr
Thu Aug 29 05:38:34 EDT 2002



Le jeudi, 29 aoû 2002, à 10:08 Europe/Paris, Josep M. Font a écrit :

> [...]
>
> 1.2 Can I \dump my own format files (especialized LaTeXs with several 
> packages incorporated? Should I just compile them and save them as 
> .fmt files in some directory? Which one?

Some time ago there was a post on this topic, for TeXShop. Here it is 
(I didn't try this solution though, as I know almost nothing on shell 
scripts so ${1+"$@"} looks like a random succession of characters to 
me; I'm pretty sure it isn't).

Bruno Voisin


De: Joachim Kock <kock at math.unice.fr>
Date: Mer 17 avr 2002  10:16:04 Europe/Paris
À: "TeX on Mac OS X Mailing List" <MacOSX-TeX at email.esm.psu.edu>
Objet: [OS X TeX] Re: LaTeX 2.09
Répondre à: "TeX on Mac OS X Mailing List" 
<MacOSX-TeX at email.esm.psu.edu>

It is not too difficult to add a custom format to TeXShop.  At
least, the following recipe worked for me for some simple personal
formats --- most of it was explained to me by Gerben.

However there are probably additional problems with running
LaTeX209: many of the files it reads have the same names as those
used by modern latex, and unless some custom search instructions
are given to latex209, it will find the 2e files instead and get
very confused.  I think a way to deal with this was described in
older versions of the OzTeX manual --- unfortunately these
instructions are not included in the new version.

Ignoring these problems for the moment --- assume the .ini file
for the custom format is called yourtex.ini :


Step 1: in the Terminal, build the format doing

   initex

and type

   yourtex\dump

in the * prompt.

Step 2: move the resulting file yourtex.fmt to a place where
tex can find it.  If your installation is a TeXLive one, this
would be in ~/Library/texmf/web2c (which you need to create if
it doesn't exist).  (If your installation is the tetex-style one,
I think there is another location --- in any case, one way to find
out is to issue the command

   kpsewhich latex.fmt

and study the response --- substitute the /usr/local/teTeX/share/texmf
part with ~/Library/texmf)

Step 3: create a script for running tex with this format.  This
is a text file whose content is something like this:

#!/bin/sh
test -f "`kpsewhich yourtex.fmt`" || fmtutil --byfmt yourtex
exec pdftex -fmt=yourtex -progname=pdftex ${1+"$@"}

Name the file yourtex and make it executable (doing chmod +x yourtex),
and place it somewhere where TeXShop can find it.  A good place is
in ~/bin

(If your installation is a tetex-style one, the procedure is
a bit different for this step: instead of a script there is
a symbolic link.  Create a symbolic link to the pdftex binary
(whose path you find with kpsewhich and substitute for the
bracket in the following command):

	cd ~/bin
	ln -s   [path-to-the-pdftex-binary]  yourtex
	chmod +x yourtex

)

Step 4: Inside TeXShop, go to  "Preferences --> Script".
In the latex field, write the complete path to the file yourtex

To use the format, tick "Personal Script" in the Typeset Menu
(for each document you want to typeset with this script).  If
you want to make this script the default typesetting method,
go to "Preferences --> Typesetting" and choose "Personal Script".

Before it works it may be necessary to restart the shell or
perhaps issue the command texhash --- I'm not too sure about
this...


Cheers,
Joachim.

----------------------------------------------------------------------
Joachim KOCK
Laboratoire de Mathématiques J.A.Dieudonné    Tél.  +33 04.92.07.62.40
Université de Nice Sophia-Antipolis           Fax   +33 04.93.51.79.74
Parc Valrose - 06108 Nice cédex 2 - FRANCE    Mél.  kock at math.unice.fr
----------------------------------------------------------------------

-----------------------------------------------------------------
Threaded list archives can be found at:
<http://www.masda.vxu.se/~pku/MacOSX_TeX/>
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------




More information about the MacOSX-TeX mailing list