[XeTeX] OFFLIST initex stuff Re: [MacTeX] XeTeX (fwd)

Wendy McKay wgm at cds.caltech.edu
Mon Apr 12 05:01:51 CEST 2004


Hi Ross

Funny that this initex stuff is coming up now as I
had Cal in my office on Thursday trying to figure out how to make a  
format
to be visitble in TeXshop.

Could we summarize the instructions

TO CREATE A CUSTOMIZED FORMAT?
	Plain/LaTeX/pdfTeX/pdfLaTeX??

I am attaching your instructions and that of Joachim Koch.
Does this cover everything we need to know about making formats?
I wonder if we could post it in Stephan's FAQ and on a MacTeX page.



Ross Moore wrote:
-------

    1.  use  pdfinitex   instead of  pdftex
        or   pdfinilatex  instead of  pdflatex

       Later versions of teTeX allow options instead:
          pdftex -ini
          pdflatex -ini
       Similarly use  initex   or   tex -ini
         or  inilatex  or   latex -ini
       for non-PDF formats.

     (Textures allows you to bypass this "safety" step,
      by allowing the standard formats to recognise \dump ;
      but it does provide a VirTeX format with fewer definitions
      preloaded.)


    2.  place  \dump  at the place in your code where you want
        the format to be dump'd from --- same with Textures.


Upon running the command on your modified source a .fmt
   file will be produced, having name
           \jobname.fmt
   ... where \jobname  is either the prefix part of the name
   of the main file that was \input ,
   or is a name specified explicitly using  -jobname
    e.g.  -jobname=myformat .


    3.  rename the .fmt (if you want --- no spaces allowed!!)
        move the .fmt  into a place where TeX expects to look
        for such format files; e.g.
               ...../texmf.local/web2c/


    4.  add a line into   texmf.cnf  that will help TeX find
        any support files that your new format needs;
        e.g.
          (for  myformat.fmt  being customised from LaTeX)

          TEXINPUTS.myformat  =  .;$TEXMF/tex/{generic,latex}//


    5.  make sure to run:  sudo texhash


Now you should be able to use commands such as:

       pdftex &myformat  <document-name>

or, if 1st-line parsing is on, then you can start documents with:
      % &myformat
then just use   pdftex <document-name>  .

But if you want to use a command like:
       pdfmytex  <document-name>
then you need to write a short executable script command,
similar to those shown above.

------ End Ross' instructions.



Here is what Bruno Voisin in July 2001
and Joachim Koch in March 2004

------
> From wgm at cds.caltech.edu Sun Apr 11 19:27:32 2004
Date: Wed, 7 Apr 2004 17:41:05 -0700 (PDT)
From: Wendy McKay <wgm at cds.caltech.edu>
To: "Calvin W. Jackson, Jr." <calvin at caltech.edu>
Cc: wendy g mckay <wgm at cds.caltech.edu>
Subject: Re: Fwd: initex:  to create tex formats

Hi Cal
This looks like a good set of instructions, if they work!!
I'll try it out when Jerry leaves.
Can you export your format? ---
The one you created so I can test it

...
Later...
	wendy


============================================================
From: "Bruno Voisin" <Bruno.Voisin at hmg.inpg.fr>

Date: Tue, 10 Jul 2001 17:35:00 +0200

Does anybody know how to make other formats than plain TeX and LaTeX
available to TeXShop, so that you can just select the format name in the
scroll-down "Programme" menu (in the French localization) and click on
the button nearby to have a document composed (or use the "Composer"
menu)?

My problem is that for some time I must (publisher's choice!) use an old
format based on plain and called cupplain (CUP aka Cambridge University
Press). I suppose people willing to use AMS-TeX or eplain will
experience the same problem.

After a bit of experimentation I was able to create the format itself
(the .fmt file) by:

- modifying fmtutil.cnf (placing an updated version in
~/Library/texmf/web2c/) by adding the lines
cupplain                tex             -       cupplain.ini
pdfcupplain     pdftex  -       pdfcupplain.ini

- creating cupplain.ini (based on
/usr/local/teTeX/share/texmf/tex/plain/config/tex.ini) and
pdfcupplain.ini (based on
/usr/local/teTeX/share/texmf/pdftex/plain/config/pdftex.ini)

- then running texconfig then texhash.

(I'm not quite sure all these steps are necessary.)

But now I don't know how to make TeXShop aware of the new format. I have
attempted using the new "Script" preference (typing in something like
"pdftex &pdfcupplain" or just "&pdfcupplain") then asking for "Tex", but
everything I get is a blank console window.

In addition, I would like to have both the "Pdftex" and "Tex and
Ghostscript" possibilities available for the new format.

Has anybody tried such devious things?

Thanks,

Bruno Voisin

----------------------------------------------------------------------


>> X-Original-To: calvin at caltech.edu
>> X-Authentication-Warning: shannon.cds.caltech.edu: wgm owned process  
>> doing -bs
>> Date: Thu, 18 Mar 2004 13:41:16 -0800 (PST)
>> From: Wendy McKay <wgm at cds.caltech.edu>
>> To: "Calvin W. Jackson, Jr." <calvin at caltech.edu>
>> Cc: wendy g mckay <wgm at cds.caltech.edu>
>> Subject: initex:  to create tex formats
>> X-Spam-Status: No, hits=-5.0 tagged_above=-100000.0 required=5.0
>>  tests=FROM_CALTECH
>> X-Spam-Level:
>>
>>> De : Joachim Kock > Date : Mer 17 avr 2002  10:16:04 AM Europe/Paris
>>>  Ã- : "TeX on Mac OS X Mailing List" > Objet : [OS X TeX] Re: LaTeX  
>>> 2.09
>>>  RŽpondre Ë^Æ : "TeX on Mac OS X Mailing List"   
>>> 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
>>>   
>>> --------------------------------------------------------------------- 
>>> -









More information about the XeTeX mailing list