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

Richard Koch koch at math.uoregon.edu
Mon Apr 12 17:44:21 CEST 2004


Ross and Wendy,

I downloaded the xetex stuff over the weekend. Very exciting
development. Just a couple of weeks ago,
William Adams said "the best solution would be to revive the TeX/GX
project" and lo-and-behold the original author of that program has
done just that, but in a modern Unix way.

There is no doubt that the "personal script" mechanism is no longer
powerful enough. I'm trying to get out version 1.35. Either changes
along the lines below will be in that version or else they will be
in the very next version.

Thanks, Ross, for taking the time to write these detailed
suggestions. I'll try to implement as many as possible. Unfortunately,
I don't know how to do hyperlinks. The Cocoa classes for pdf have
no procedures to do that, so I'd need to directly search the pdf file.
(After 1.35, maybe I'll try)

Dick
koch at math.uoregon.edu


On Apr 11, 2004, at 11:17 PM, Ross Moore wrote:

> Hi Wendy, and Richard
>
> On 12/04/2004, at 1:01 PM, Wendy McKay wrote:
>
>> 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.
>
> If you like.
>
> There is one issue though, that Richard should be able to help with.
>
> At present, TeXShop allows only one "Personal Script".
> I'd like to have access to many different scripts, and to
> be able to access them by name.
> For instance, to install and test  xetex/xelatex , it was
> necessary to throw away my settings for  omega/lambda
> in the Personal Script panel.
>
> Richard has said that he wants to keep the interface simple,
> which is certainly commendable.
> However, it's doubtful that novices ever setup a Personal
> Script anyway, so it wouldn't make the program less useable
> to enrich the "Misc" panel in the preferences.
>
> Here's what I have in mind:
>
>    a.  change "Personal Script" to "Personal Scripts";
>
>    b.  have a popup that starts initially with:
>         "Default" and "Add New Script...";
>
>    c.  each new (pair of) script(s) requires a name,
>        which is added to the popup;
>
>    d.  after visiting the "Misc" preference panel,
>        the last script selected in the popup becomes the
>        one which is used when checking "Typeset:Personal Script"
>        (it's name should show in this location; e.g. as
>           Personal: Omega )
>        Alternatively, the "Personal Script" entry could
>        spawn a submenu, whenever there is more than one,
>        allowing different scripts to be chosen.
>
>    e.  When creating a new Personal Script, there can be a
>        check-box for: "Add to Typeset Menu" which does as
>        it says, putting the name above the bar in that menu.
>
>    f.  There should also be a button which allows the personal
>        script to be removed (and also from "Typeset").
>
>
> I don't think this would complicate the interface unduly,
> and it would allow power users to setup all kinds of
> useful scripts; e.g.
>   for creating and using customised formats,
>   running with different levels of kpathsea tracing,
>   enabling \write18,
>   turning-on the file-recorder,
>   running Claus Gerhardt's scripts,
>  etc.
>
>
> Oh; that reminds me of another item on the wish-list
> for TeXShop...
>
> Thanks for the "Abort" button in the console window.
> However, it would be good to also have an "Interrupt".
>
> In fact, "Abort" is buggy, in the following senses:
>
>  a.  when doing a long tracing, it can take a long time
>      for the "Abort" to happen; whereas when running
>      from the command-line, a Ctrl-C or Ctrl-D interrupt
>      takes effect almost immediately.
>
>      To test this, run any LaTeX document from TeXShop with
>        \tracingall
>        \begin{document}
>
>      Indeed even doing:
>        \begin{document}
>        \tracingall
>        \maketitle
>      will give masses of tracing which is hard to interrupt/abort.
>
>      Also, tracing any Xy-pic diagram (especially with curves)
>      is hard to interrupt from TeXShop.
>
>      I'd guess that the sluggishness in the "Abort" taking effect
>      is due to the Console Window's controls not getting much
>      processing-time while the running pdftex job is spewing
>      lots of information into its contents.
>
>
>  b.  Once an "Abort" has occurred, the "Console" window
>      becomes very fragile.
>      Try to Select/Copy or Search within that window.
>      It has been reported already that such actions can
>      crash TeXShop completely. I've experienced this too.
>
>      I'd guess that part of the problem here is that the
>      interrupt leaves an incomplete PDF; the viewer
>      window then must lose contact between the in-memory
>      version and the on-disc file. (I don't know how
>      you cope with this situation.)
>      Or maybe it's something quite different.
>
>
>  c.  Resuming after an "Interrupt" should be possible too.
>      (This already works when errors occur, or when
>      processing stops for a \show or \showthe ;
>      so this shouldn't be a difficult issue.)
>
>
> Finally, can we expect to see active hyperlinks in the PDF
> any time soon ?
> The latest Preview.app has this, so why not TeXShop ?
> Perhaps it's there already, and I'm missing something.
>
>
> Cheers
>
> 	Ross
>
>
>>
>>
>> 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
>>>>>   
>>>>> ------------------------------------------------------------------- 
>>>>> ---
>>
>>
>>
>>
>>
>>
>>
>>
> ----------------------------------------------------------------------- 
> -
> Ross Moore                                         ross at maths.mq.edu.au
> Mathematics Department                             office: E7A-419
> Macquarie University                               tel: +61 +2 9850  
> 8955
> Sydney, Australia                                  fax: +61 +2 9850  
> 8114
> ----------------------------------------------------------------------- 
> -
>




More information about the XeTeX mailing list